Package: wfield
wfield - tools to analysis widefield dataThis is a python package for visualizing and analysing data collected with a widefield macroscope.Use the graphical interface tolaunch analysis on NeuroCAASThese tools are for:Motion correctionData reductionHemodynamic correctionMatching to the Allen CCFVisualize raw/reduced data and ROIsUse cases and instructionshereAdatasetthat can be used to demo some of the functionality of this repository will be made available in thedemoRecfolder.File format conventionsraw frame data, when stored in binary files (uint16)the filename must end with:_NCHANNELS_H_W_DTYPE.datExample: "frames_2_540_640_uint16.dat" H and W are the dimensions of a single frame.These files can be opened with the commandwfield open_raw <filename>denoised/decomposed (locally processed) data are stored asnpyarraysU.npyare the spatial components(H, W, NCOMPONENTS)SVT.npyare the temporal components(NCOMPONENTS, NFRAMES)SVTcorr.npyis the hemodynamic corrected temporal components(NCOMPONENTS, NFRAMES)info.jsonhas information about the dataset like theframe_rateor then_channelsNeuroCAAS results folderU_atlas.npyare the spatial components transformed to a common atlas reference frame.(H, W, NCOMPONENTS)reduced_spatial.npyare the spatial components from the PMD(H*W,NCOMPONENTS)The H and W of the matrix are in theconfig.yamlfile (or useU_atlas)SVTcorr.npyare the hemodynamic corrected temporal components(NCOMPONENTS, NFRAMES)reduced_temporal.npyare the temporal components for the first channel `(NCOMPONENTS, NFRAMES)LocaNMF returns a matlab file with components in spatial components in theAvariable and temporal components in theCvariable.Installation (from pip)pip install wfieldInstallation (using Anaconda)To install start by gettingAnacondaorMiniconda. Install alsogit. 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.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).Use anaconda to install all dependencies:conda env create -f env.ymlthe file env.yml is inside thewfielddirectory.Enter the environmentconda activate wfieldand install wfield using the commandpython setup.py installfollowed bypython setup.py referencesYou will need to runconda activate wfieldto activate the environment before running the software every time you start a terminal.You are all set.Typewfield -hto see the available commands.Go here forinstructionson how to use NeuroCAAS.Note:Some reference files used to match to the Allen Common Coordinate Framework are copied from the folderreferencesto$HOME/.wfieldduring installation.Note for Mac users:gitwhen you try the instructions you will be asked to install git, if that fails you can runconda install gitto install using anaconda.Note for Windows users:Get a terminal likegit bash[optional]Runconda init bashto activate conda ongit bashWhen 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 runpython 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.TutorialInstructions to use with NeuroCAAShere.There is a command-line inteface to run computations from the command line. Dowfield -hto learn more.Notebook examples arehere.Look atthis oneto load decomposed data and extract ROIs.Copyright (C) 2020 Joao Couto -jpcouto@gmail.comThis 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, seehttp://www.gnu.org/licenses/.