Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 2 commits into from
Feb 25, 2021

Conversation

bahanonu
Copy link
Owner

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.

## 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
Copy link
Owner Author

Tested Matlab 2019b in Windows 10. Merging.

image

image

@bahanonu bahanonu merged commit afd1405 into master Feb 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant