ContextLab / ContextLab/supereeg
se.save function
- Dominant language
- Python
- Stars
- 38
- Forks
- 19
- PR merge metrics
- No merged PRs in 30d
Description
currently, we have methods to save brain objects and model objects (e.g. `bo.save('filename')`). To save nifti files, the current API is: `nii = bo.to_nii('filename')` where `nii` is a nibabel nifti object in memory, and if a filename is passed, it is also saved to disk.
Another possible (or complementary) approach would be to have a separate `se.save` function (@jeremymanning proposed):
_nifti1 = se.save(bo2, 'nifti1.nii') <-- convert bo2 to a nifti image, save to disk, and return a nifti object
nift2 = se.save(bo2, 'nifti2.nii', template='template.nii') <-- convert bo2 to a nifti image using the specified template, save to disk, and return the nifti ojbect
bo2_copy = se.save(bo2, 'bo2.bo') <-- save bo2 to disk and return a copy of itself
bo3 = se.save(bo2, 'bo3.bo', template='template.nii')` <-- convert bo2 into the coordinates specified by template.nii and save to disk; return the new brain object_
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reading the existing bo.save and bo.to_nii APIs described in the issue, including how filenames and templates are handled. Define the supported se.save cases for brain objects and NIfTI output, then verify that each case saves to disk and returns the stated object type.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100