AllenNeuralDynamics / aind-fip-dff

This capsule takes an input raw NWB file of fiber data and creates processed DFF traces
MIT License
0 stars 0 forks source link

processed FIP timeseries have double timestamps #10

Closed alexpiet closed 4 days ago

alexpiet commented 1 month ago
from aind_dynamic_foraging_data_utils import nwb_utils as a
nwb = a.load_nwb_from_filename(NEW_NWB_FILES[1])

fib_df_tidy = a.create_fib_df(nwb, tidy=True)

Note that G_2_preprocessed has two entries with the same timestamp, but different data

Image

This is present in the NWB file itself:

stamps = nwb.acquisition['G_2_preprocessed'].timestamps[:]
data = nwb.acquisition['G_2_preprocessed'].data[:]

Image

alexpiet commented 2 weeks ago

Spot checking this issue in different data assets:

The doubling of timestamps appears to happen during preprocessing, because G_2 is not effected when G_2_preprocessing is

alexpiet commented 2 weeks ago

@j-friedrich says this is an artifact of pandas combining two preprocessing methods, instead of separating them into two different columns

jeromelecoq commented 5 days ago

Ahad needs to test stability of this issue.

alexpiet commented 5 days ago

Test this pull request: https://github.com/AllenNeuralDynamics/aind-fip-dff/pull/7

Ahad-Allen commented 4 days ago

Will test with a copy of the pipeline using that pr's branch! :)

Ahad-Allen commented 4 days ago

Looks resolved, just note that this results in multiple fields being formed instead of one 'preprocessed' one Image I'll give the pr a review :)

Ahad-Allen commented 4 days ago

I think this just needs to be merged, I'll hand it off to ya'll for that! :)

alexpiet commented 4 days ago

@Ahad-Allen can you point me to the output of the test? I want to double check that the double timestamps issue has been resolved

Ahad-Allen commented 4 days ago

Just shared :)

alexpiet commented 4 days ago

Confirmed this problem is resolved by the PR.