Open Aleman-Z opened 3 years ago
Besides the actual timestamp which is given by the above function, we should also save the timestamp with respect to the beginning of the recording. I don't mean the NREM one. I mean the one where time is zero in the first sample of the .continuous signal regardless of sleep state.
So in total we will have 3 timestamps:
Can define timestamp with respect to recording after this line: One could use ti and subtract its minimum value. https://github.com/DR-DOH/HFO-detector/blob/b2d3208ae3ac0b30c2938d7d966bdcb315ab5279/Scripts%20Updated/ratio_tetrode_power.m#L65
Further I think this line should be redefined to start in zero and not in 1/fs_new. I think it should be: linspace(0,(length(signal)-1)/fs_new,length(signal)).'; or just substract 1/fs_new from the whole thing.
https://github.com/Aleman-Z/HFO-detector/blob/main/Scripts%20Updated/ratio_tetrode_power.m#L135
I've made the changes asked for. Please check and let me know
The actual timestamps of the recording are obtained with the second output of the OpenEphys loading function:
[PFC, timestamps, ~] = load_open_ephys_data(name);