Skip to main content

wfield - tools to analysis widefield data

picture

This is a python package for visualizing and analysing data collected with a widefield macroscope.

Use the graphical interface to launch analysis on NeuroCAAS

These tools are for:

  • Motion correction
  • Data reduction
  • Hemodynamic correction
  • Matching to the Allen CCF
  • Visualize raw/reduced data and ROIs

Use cases and instructions here

A dataset that can be used to demo some of the functionality of this repository will be made available in the demoRec folder.

File format conventions

  • raw frame data, when stored in binary files (uint16)
    the filename must end with: _NCHANNELS_H_W_DTYPE.dat
    Example: "frames_2_540_640_uint16.dat" H and W are the dimensions of a single frame.
    These files can be opened with the command wfield open_raw <filename>

  • denoised/decomposed (locally processed) data are stored as npy arrays
    U.npy are the spatial components (H, W, NCOMPONENTS)
    SVT.npy are the temporal components (NCOMPONENTS, NFRAMES)

  • SVTcorr.npy is the hemodynamic corrected temporal components (NCOMPONENTS, NFRAMES)

  • info.json has information about the dataset like the frame_rate or the n_channels

NeuroCAAS results folder

  • U_atlas.npy are the spatial components transformed to a common atlas reference frame.
    (H, W, NCOMPONENTS)
  • reduced_spatial.npy are the spatial components from the PMD (H*W,NCOMPONENTS)
    The H and W of the matrix are in the config.yaml file (or use U_atlas)
  • SVTcorr.npy are the hemodynamic corrected temporal components (NCOMPONENTS, NFRAMES)
  • reduced_temporal.npy are the temporal components for the first channel `(NCOMPONENTS, NFRAMES)
  • LocaNMF returns a matlab file with components in spatial components in the A variable and temporal components in the C variable.

Installation (from pip)

pip install wfield

Installation (using Anaconda)

To install start by getting Anaconda or Miniconda. Install also git. Run the following commands from a terminal window (Anaconda prompt or git Bash on Windows, the Mac OS terminal). Check the notes below for common issues.

  1. Go to the folder where you want to install and clone the repository: git clone https://github.com/jcouto/wfield.git. This creates a directory; go inside that directory: cd wfield. Alternatively you can download the repository as a [zip file] (https://github.com/churchlandlab/wfield/archive/master.zip).

  2. Use anaconda to install all dependencies: conda env create -f env.yml the file env.yml is inside the wfield directory.

  3. Enter the environment conda activate wfield and install wfield using the command python setup.py install

  4. You will need to run conda activate wfield to activate the environment before running the software every time you start a terminal.

  5. You are all set.
    Type wfield -h to see the available commands.
    Go here for instructions on how to use NeuroCAAS.

Note: Some reference files used to match to the Allen Common Coordinate Framework are copied from the folder references to $HOME/.wfield during installation.

Note for Mac users:

  • git when you try the instructions you will be asked to install git, if that fails you can run conda install git to install using anaconda.

Note for Windows users:

  • Get a terminal like git bash [optional]
    Run conda init bash to activate conda on git bash
  • When you install Anaconda, set the option to install as system python (this makes that it is visible from the terminal without having to run the Anaconda Prompt).

Note for developers: In some cases you may want to make changes to the software, if you need this run python setup.py develop (you can not move the folder after this - the installation will point to that directory).

The software was tested on Windows, Linux and MacOS Catalina. Installation takes less than 5 minutes on a standard computer with fast access to internet and a previous anaconda installation.

Tutorial

Instructions to use with NeuroCAAS here.

There is a command-line inteface to run computations from the command line. Do wfield -h to learn more.

Notebook examples are here.

Look at this one to load decomposed data and extract ROIs.

Copyright (C) 2020 Joao Couto - jpcouto@gmail.com

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

Metadata

Release files for wfield 0.6.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for wfield 0.6.0
File Size Uploaded Provenance Actions
wfield-0.6.0.tar.gz 265.6 kB Without provenance Details for wfield-0.6.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for wfield 0.6.0
File Interpreter ABI Platform Actions
wfield-0.6.0-py3-none-any.whl Python 3 none any Details for wfield-0.6.0-py3-none-any.whl

Total release size: 361.6 kB

Release files / wfield-0.6.0.tar.gz

Download URL wfield-0.6.0.tar.gz
Size 265.6 kB
Tags Source
SHA-256 checksum
How to use checksums
23bd0d6d2e1e4659b5abef925978bed5525909c394d56b553628cab5c2bd1948
BLAKE2b-256 checksum
How to use checksums
95a286f88ebc621ca47702fa73c0eb12e2a9a305247c12c0952933e2a798fe13
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.6

Release files / wfield-0.6.0-py3-none-any.whl

Download URL wfield-0.6.0-py3-none-any.whl
Size 96.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c64f3f130ca8c3b6892fb30e21acd8295c013820230306a054e1f548d3f513f2
BLAKE2b-256 checksum
How to use checksums
3cd7a28de0b5881bb64c1bfb23b10d030c03b0b1b6d07c7eb1b7769a60859f5a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.6

Security for wfield 0.6.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page