visual_behavior_analysis icon indicating copy to clipboard operation
visual_behavior_analysis copied to clipboard

omission-aligned traces have 106 frames instead of 107 frames.

Open farznaj opened this issue 5 years ago • 0 comments

Session_id: 1000439105

Experiment_id: 1000744370 1000744376 1000744365

import visual_behavior.data_access.loading as loading
from visual_behavior.ophys.response_analysis.response_analysis import ResponseAnalysis
ophys_experiment_id = 1000744365
dataset = loading.get_ophys_dataset(ophys_experiment_id)
analysis = ResponseAnalysis(dataset)
print('shape of omission_response trace: {}'.format(analysis.omission_response_df.iloc[0]['trace'].shape))
print('')
print('trace timestamps: \n{}'.format(analysis.omission_response_df.iloc[0]['trace_timestamps']))

As per my conversation with @dougollerenshaw and my further checking of data, this problem appears to be due to a longer frame duration for these 3 experiments, and that "start_ind_offset and end_ind_offset are both cast to integers".

It would be helpful to have consistent number of frames for the omission aligned traces of all experiments.

Can you please help fix this problem? Would it not make more sense to use np.round instead of "int"?

Thanks.

farznaj avatar Jun 11 '20 02:06 farznaj