OrbitFilter

class typhon.datasets.filters.OrbitFilter[source]

Generic, abstract class for any kind of filtering.

Implementations of this class are intended to be used between and after each orbit file is read by Dataset.read_period. One important implementation for this class are the various OverlapFilter implementations, that make sure overlaps are removed. This can either be done after each orbit or when all orbits have been read.

Different filters may need different meta-information that needs to be provided by specific Dataset._read implementations. For example, the FirstlineDBFilter needs a header name (or the entire header from which to extract this). Each filterer can state what keyword arguments need to be passed on to the reading routine using the args_to_reader attribute.

Moments in filtering that this class takes is responsible for:

  • Before the first orbit is read: .reset()

  • After each orbit is read. .filter(…)

  • After the last orbit is read: .finalise(…)

You can also use this class for validation, i.e. to check that data are correct and if they aren’t, raise an exception, if they are, return data as-is.

__init__()

Methods

__init__()

filter(scanlines, **extra)

finalise(arr)

reset()

Attributes

args_to_reader