-
Notifications
You must be signed in to change notification settings - Fork 42
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
Allow dlc pipeline to run without prior position tracking #970
Conversation
Errors related to #961 showed up with further user use. Converting to a draft until I have those patched |
…)" This reverts commit 113ce9a.
### Pipelines | ||
|
||
- DLC | ||
- Allow dlc without pre-existing tracking data #950 |
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.
Other lines reflect PR number out of my assumption that a user would want to see the set of changes from the PR, and can follow up on the linked issues for the motivation
- Allow dlc without pre-existing tracking data #950 | |
- Allow dlc without pre-existing tracking data #970 |
if ( | ||
RawPosition & key | ||
): # if spatial series exists, get metadata from there | ||
spatial_series = (RawPosition() & key).fetch_nwb()[0][ | ||
"raw_position" | ||
] | ||
reference_frame = spatial_series.reference_frame | ||
comments = spatial_series.comments | ||
else: | ||
reference_frame = "" | ||
comments = "no comments" |
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.
if ( | |
RawPosition & key | |
): # if spatial series exists, get metadata from there | |
spatial_series = (RawPosition() & key).fetch_nwb()[0][ | |
"raw_position" | |
] | |
reference_frame = spatial_series.reference_frame | |
comments = spatial_series.comments | |
else: | |
reference_frame = "" | |
comments = "no comments" | |
# if spatial series exists, get metadata from there | |
if query := (RawPosition & key): | |
spatial_series = query.fetch_nwb()[0]["raw_position"] | |
else: | |
spatial_series = None |
reference_frame=reference_frame, | ||
comments=comments, |
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.
reference_frame=reference_frame, | |
comments=comments, | |
reference_frame = getattr(spatial_series, "reference_frame", ""), | |
comments = getattr(spatial_series, "comments", "no comments"), |
reference_frame=reference_frame, | ||
comments=comments, |
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.
reference_frame=reference_frame, | |
comments=comments, | |
reference_frame = getattr(spatial_series, "reference_frame", ""), | |
comments = getattr(spatial_series, "comments", "no comments"), |
if ( | ||
RawPosition & key | ||
): # if spatial series exists, get metadata from there | ||
spatial_series = (RawPosition() & key).fetch_nwb()[0][ | ||
"raw_position" | ||
] | ||
reference_frame = spatial_series.reference_frame | ||
comments = spatial_series.comments | ||
else: | ||
reference_frame = "" | ||
comments = "no comments" |
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.
if ( | |
RawPosition & key | |
): # if spatial series exists, get metadata from there | |
spatial_series = (RawPosition() & key).fetch_nwb()[0][ | |
"raw_position" | |
] | |
reference_frame = spatial_series.reference_frame | |
comments = spatial_series.comments | |
else: | |
reference_frame = "" | |
comments = "no comments" | |
# if spatial series exists, get metadata from there | |
if query := (RawPosition & key): | |
spatial_series = query.fetch_nwb()[0]["raw_position"] | |
else: | |
spatial_series = None |
# check if a position interval exists for this epoch | ||
try: | ||
interval_list_name = ( | ||
convert_epoch_interval_name_to_position_interval_name( |
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.
It's not clear to me why convert_epoch...
should only raise an error in the populate_missing
case. I think might add another arg for raise_err
over there to avoid try/except. I was taught that try/except only belongs in production if you can't modify the underlying behavior, eg on outside package
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.
@ CBroz1 agreed. I'll tweak that function
pos_time = video_time | ||
reference_frame = "" | ||
comments = "no comments" |
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.
A similar thing could be done here as above with getattr
and supplying these as defaults
Description
Fixes #950
Fixes #961
analysis_file_name
in make functions before fetching needed dataChecklist:
CITATION.cff
alter
snippet for release notes.CHANGELOG.md
with PR number and description.