AllenInstitute / visual_behavior_analysis

Python package for analyzing behavioral data for Brain Observatory: Visual Behavior
Other
22 stars 6 forks source link

Running Speed off-by-one (obo) resulting from get_vsig and get_vin #379

Open nicain opened 5 years ago

nicain commented 5 years ago
    foraging_file_name = '/allen/programs/braintv/production/neuralcoding/prod0/specimen_741992330/behavior_session_759661624/181001091719_411922_9aa2afc1-1142-42fa-98b3-838e7397fd40.pkl'

    data = pd.read_pickle(foraging_file_name)
    core_data = data_to_change_detection_core(data)

Need to apply the same fix as before to get running speed tat frame written

nicain commented 5 years ago

BTW the error flag for this file dumping to logs sees to be working just fine:

['ERROR::visual_behavior.translator.foraging2.extract::intervalsms record appears to be missing entries', 'WARNING::visual_behavior.translator.foraging2::loading images from foraging2 outputs is not implemented'] Attn @neuromusic @dougollerenshaw

dougollerenshaw commented 5 years ago

@nicain: @jeromelecoq noticed that this off-by-one issue has persisted. Visual_behavior logs the following error:

image

This results from the encoder vector being one-longer than the time vector. The error is logged, but then the last value of the encoder vector is ignored and processing proceeeds: https://github.com/AllenInstitute/visual_behavior_analysis/blob/db657e71dba2eecace7645163d8a5ffa43821eef/visual_behavior/translator/foraging2/extract.py#L772

Should we turn off the error and just accept this as default behavior? At this point, it seems unlikely that Foraging2 is going to be changed to avoid this length mismatch in the first place.

nicain commented 5 years ago

Should we turn off the error and just accept this as default behavior? At this point, it seems unlikely that Foraging2 is going to be changed to avoid this length mismatch in the first place.

Agreed, this seems like our only option. When we work around this in downstream code, make sure to put a comment that references this issue in the code, to explain the off-by-one.

dougollerenshaw commented 4 years ago

@corbennett just asked if this missing frame interval in the PKL is also missing from sync?