Closed saharmanavi closed 6 years ago
by the way, this was my fix for the endframe issue. Probably not the cleanest, but just in case it's helpful:
def add_endframe(trials, metadata):
trials['frame_diff'] = core_data['trials']['startframe'].diff().shift(periods=-1)
endframe = []
for idx, row in trials.iterrows():
ef = row['startframe'] + (row['frame_diff'] - 1.)
endframe.append(ef)
trials['endframe'] = endframe
trials.at[trials.index[-1], 'endframe'] = metadata['n_stimulus_frames']
del trials['frame_diff']
return trials
@ryval already created issue #165 to address the 'endframe' issue. I submitted PR #169 to address that. Awaiting review from @neuromusic
I'll investigate the 'trial_length' issue. Assigning myself.
got it, will search for errors before posting them.
I did this to fix the trial_length issue, put in after the extended_dataframe was created:
df['trial_length'] = df['endtime'].subtract(df['starttime'])
should be fixed in #169
@dougollerenshaw @neuromusic I see this issue was closed, but the trial_length key error still exists.
@saharmanavi can you check this again? I think #212 should have fixed this
A running list of key errors I'm running into when using visual_behavior_analysis functions:
gives key error: endframe when trying to create the extended dataframe. manually adding the column to the core_data['trails'] dataframe fixes this issue.
Using visual_behavior.visualization.extended_trials.daily -> make_daily_figure with the df output from above (with endframe added in) gives the key error: trial_length
I'll continue to update as I find more.