spatialtopology / spacetop-prep

code for transferring data and preprocessing
MIT License
0 stars 3 forks source link

[BUG] UnboundLocalError: local variable 'scr_epochs' referenced before assignment #45

Closed Michael-Sun closed 9 months ago

Michael-Sun commented 10 months ago

Which module is this from?

physio

What is the issue?

Attempted the following code: scr_phasic = utils.preprocess.extract_SCR(df=physio_df, eda_col='physio_eda', amp_min=0.01, event_stimuli=event_stimuli, samplingrate=samplingrate, epochs_start=SCR_epoch_start, epochs_end=SCR_epoch_end, baseline_correction=True, plt_col=['trigger_mri', 'event_hot', 'event_warm', 'event_img', 'event_rest'], plt_savedir='./plt')

What was your expected behavior?

SCR signals should be extracted.

How can we reproduce this?

Run the above code with the following parameters: event_stimuli=physio_df[['ttl']] SCR_epoch_start = 0; SCR_epoch_end = 5 samplingrate=2000

Any additional context?

Michael-Sun commented 9 months ago

This has to deal with the definition of event_stimuli, which needs to be a dictionary.