-
Notifications
You must be signed in to change notification settings - Fork 13
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
[BUG] Fixed timestamps when there are more than one event #48
Conversation
handler_overrides=hover)] | ||
timestamps = img[0]['data']['fccd_image_lightfield'] | ||
timestamps = [i['data'][tag] for i in img if tag in i['data'].keys()] |
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.
This will silently drop images that do not have a time stamp which may make it difficult to realign the timestamps with the images later. Maybe something like
timestamps = [i['data'][tag] if tag in i['data'].keys() else np.nan for i in img]
which will fill in np.nan
for the missing values. Or, as these are dictionaries coming back
timestamps = [d['data'].get(tag, np.nan) for d in img]
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.
I see what you say, but this does not place np.nan
for fccd timestamps that don't exist but rather for events that don't have a tag
. Your suggestion would make the output list be of length of all events, not just events that have a tag
. Perhaps both behaviors would be best to add with a fill
kwarg
Current coverage is 27.12%@@ master #48 diff @@
========================================
Files 11 11
Lines 304 306 +2
Methods 0 0
Branches 0 0
========================================
Hits 83 83
- Misses 221 223 +2
Partials 0 0
|
Attn @cmazzoli