bahanonu / ciatah

CIAtah (pronounced cheetah): a software package for calcium imaging analysis of one- and two-photon imaging datasets. Documentation: https://git.io/ciatah_docs. Formerly known as calciumImagingAnalysis (ciapkg).
https://git.io/ciatah_docs
MIT License
80 stars 20 forks source link

Adding ciapkg API sub-package, improved directory management, etc. #64

Closed bahanonu closed 3 years ago

bahanonu commented 3 years ago

New

ciapkg.io.loadDependencies - Download and load CIAtah dependencies. Branch from class function.

ciapkg.getDirExternalPrograms - Returns the directory where external programs are stored. All functions should call this to find external program directory.

ciapkg.getDirPkg - Standardized location to obtain relevant CIAtah directories, e.g. location of default data folder.

ciapkg.api - This package will eventually contain pass-through functions for all CIAtah functions, e.g. this will allow CIAtah to keep organization clear by putting functions in related subpackages but also allow users to quickly access all functions using ciapkg.api.

Updated

ciapkg.nwb.setupNwb - Update _external_programs to call ciapkg.getDirExternalPrograms() to standardize call across all functions.

ciapkg.versionOnline - Updated to handle new VERSION file that includes datestamp on 2nd line.

example_downloadTestData - Function now calls data directory via standardized ciapkg.getDirPkg('data') to avoid placing data in incorrect folder.

createHdf5File - Close space_id, dset_id, and fid with low-level HDF5 functions before appending data with hdf5write to avoid read/write issues.

readHDF5Subset - Updated support for files with datasets that contain 2D matrices.

loadMovieList - Fixed loading HDF5 datasetname that has only a single frame, loadMovieList would ask for 3rd dimension information that did not exist.

loadNeurodataWithoutBorders - Parse the algorithm associated with the NWB signal extraction data.

saveNeurodataWithoutBorders - Function checks that yaml, matnwb, and nwb_schnitzer_lab loaded, else tries to load to make sure all dependencies are present and active. Update _external_programs to call ciapkg.getDirExternalPrograms() to standardize call across all functions. Added a check for inputs with a single signal and function returns as it is not supported.

computeCnmfeSignalExtraction_batch - Added trace origin type to output structure.

playMovie - Added feature to sub-sample movie to make display run faster for larger movies.

plotSignalsGraph - Function outputs the modified traces for parent functions to use for additional plotting behavior.

CIAtah class

A number of functions change calling to external programs from hardcoded value to calling ciapkg.getDirExternalPrograms().

loadDependencies - Calls non-class function for use in more functions without needing to load CIAtah class.

modelAddNewFolders - Added support for direct input of method type, useful for command-line or unit testing. 'Add CIAtah example folders.' now adds the absolute path to avoid path errors if user changes Matlab current directory.

modelExtractSignalsFromMovie - adding CELLMax and EXTRACT to public repo in anticipation of their repos being made public. Update _external_programs to call ciapkg.getDirExternalPrograms() to standardize call across all functions.

modelPreprocessMovieFunction - _inputMovieF0 now saved to processing subfolder.

bahanonu commented 3 years ago

Tested Matlab 2019b in Windows 10. Merging.

image

image