-
Notifications
You must be signed in to change notification settings - Fork 0
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
Add cell registration #19
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some questions and comments.
src/cai_lab_to_nwb/zaki_2024/interfaces/zaki_2024_cell_registration_interface.py
Outdated
Show resolved
Hide resolved
src/cai_lab_to_nwb/zaki_2024/interfaces/zaki_2024_cell_registration_interface.py
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
main_folder = data_dir_path / f"Ca_EEG_Calcium/{subject_id}/SpatialFootprints" | ||
file_paths = [] | ||
|
||
for folder in main_folder.iterdir(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you think about throwing errors when the expected folder_paths and the file_paths are not found? right now they are skipped silently but if the point of this interface is that those things should be added maybe it is better to stop the process at the tracks and throw an informative error so the user is aware of this.
I am not sure, maybe you have a good reason to skip instead of stopping.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
right! I added few lines to throw an error only when there is no file in the specific folder (matching the pattern) as expected. The folder.is_dir()
"check" is just to select the folder paths among all the type Paths objects iterdir might iterate over (both folders and files), thus no need to throw an error if that object is not a directory.
To be review after merging #18
Add cell registration as it is from CellReg output:
Output in Neurosift: