spikeinterface icon indicating copy to clipboard operation
spikeinterface copied to clipboard

Remove artifact function with explicit timestamps

Open khl02007 opened this issue 3 years ago • 3 comments

RemoveArtifactsRecording takes as input list_triggers, which are in frames. On the other hand, ms_before and ms_after are in milliseconds. This is converted to frames using the sampling rate later. As a result, one cannot make use of ms_before and ms_after if one uses explicit timestamps (perhaps because there are missing samples in the recording). @alejoe91 @samuelgarcia what do you think about changing this such that get_times is used to infer the conversion from ms to frames? This means the padding must be computed separately for each trigger, so the performance may take a hit. Alternatively, could make the user specify frames_before and frames_after, which are computed manually before calling remove artifact.

khl02007 avatar May 05 '22 05:05 khl02007

@khl02007 was this fixed?

alejoe91 avatar Aug 01 '22 14:08 alejoe91

will test this out and let you know

khl02007 avatar Aug 02 '22 21:08 khl02007

oops, sorry I thought this was the one about masking out single samples. I don't think there has been a PR to address this - I had opened it to ask you guys your thoughts. what do you think - specify frames before and after, or keep the ms before and after and just infer the number of frames it corresponds to with the explicit timestamps?

khl02007 avatar Aug 02 '22 22:08 khl02007

@khl02007 I would keep ms_before and ms_after and add optionally frames_before and frames_after. If the latter are givem, the ms_* params are ignored. @khl02007 does that sound ok?

alejoe91 avatar Dec 28 '22 10:12 alejoe91

@alejoe91 that sounds like it would work. happy new year!

khl02007 avatar Jan 02 '23 09:01 khl02007

Happy new year to you too Kyu!!!

alejoe91 avatar Jan 02 '23 09:01 alejoe91

By the way, happy to make these changes and submit a PR if you are OK with that

khl02007 avatar Jan 02 '23 09:01 khl02007

I'm super OK with that! :)

alejoe91 avatar Jan 02 '23 09:01 alejoe91

@alejoe91 Did this idea never pan out? Does RemoveArtifactsRecording now have that functionality?

h-mayorquin avatar Jul 19 '23 13:07 h-mayorquin