edges_analysis.filters.filters.gsdata_filter

class edges_analysis.filters.filters.gsdata_filter(multi_data: bool = False)[source]

A decorator to register a filtering function as a potential filter.

Any function that is wrapped by gsdata_filter() must implement the following signature:

def fnc(
    data: GSData | Sequence[GSData],
    use_existing_flags: bool,
    **kwargs
) -> GSFlag

Where the data is either a single GSData object, or sequence of such objects.

The return value should be a GSFlag object, which contains the flags.

Parameters:

multi_data (bool) – Whether the filter accepts multiple objects at the same time to filter. This is usually so as to enable more accurate filtering when comparing different days for instance, rather than just performing a loop over the days and flagging each independently.

Methods

__init__([multi_data])

Method generated by attrs for class gsdata_filter.

Attributes

multi_data