Skip to content

Conversation

@oliche
Copy link
Contributor

@oliche oliche commented Jan 7, 2026

This PR ports the saturation method from IBL. It will introduce a new data type for holding information on events / periods of noise / saturation etc. This will take the form of a numpy recarray with fields (draft names):

[start_sample_index, stop_sample_index, segment_index, channel_x_start, channel_x_stop, channel_y_start, channel_y_stop, method_id]

This will also require:

  • update 'silence_artefacts.py` to output this new data type
  • update silence_periods.py to handle this new data type

Other notes:

  • remove_artefacts.py handles a slightly different use case (triggers at known timepoints contaminating the recording, which may also be imputed with a model-based approach) and so is not considered here

TODO:

  • document the saturation values for different probes. Note that gain can be set on the amplifier so the saturation value is not entirely dependent on the probe type.
  • the default velocity could be some ratio of the saturation value
  • We can do some confidence checks on the input to ensure it's in microvolts
  • for the two main arguments: add pre-sets and document? or at least reccomend values in documentation probably easier

@alejoe91 alejoe91 added the preprocessing Related to preprocessing module label Jan 7, 2026
Copy link
Member

@alejoe91 alejoe91 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we apply this directly in the int16 space?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

preprocessing Related to preprocessing module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants