scippneutron.chopper.filtering.filter_in_phase#

scippneutron.chopper.filtering.filter_in_phase(frequency, *, reference, rtol)[source]#

Remove all elements where a given frequency is not in phase with a reference.

Frequencies are considered to be in-phase if they are an integer multiple of the reference or vice versa.

Parameters:
  • frequency (DataArray) – Frequency data to filter.

  • reference (Variable) – Reference frequency, e.g., the neutron source frequency.

  • rtol (Variable) – Relative tolerance.

Returns:

DataArrayfrequency with all out-of-phase elements removed.