Allow custom basename when saving mcorr memmaps #950
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Currently, if the same input file is put through motion correction with different parameter variants the resulting motion corrected memmap will always have the same filename. I could not find a way to set the filename of mcorrr memmaps that are saved when setting
save_movie=True
inMotionCorrect.motion_correct()
.I added a kwarg called
base_name_prefix
toMotionCorrect.motion_correct()
which allows a user to append a prefix to the basename that is used when saving memmaps. By default it is set toNone
, but if a user supplies astr
it will set that as a prefix to thebase_name
when saving the memmap.Let me know if there's a better way to do this!
Type of change
Please delete options that are not relevant.
Branching
targets
dev
Has your PR been tested?
Tested that currently functionality isn't broken by running
test_demos.sh
, no failures. Also tested the new functionality and it does work, prefixes are set to saved memmaps.