Filtering parameters management

Filtering methods
Filtering methods aim at attaching quality factors to each data point in the input dataset (see scheme above). Each FilteringMethod
class comes with a ParamSet
containing the necessary parameters.
As of now (September 2024), four filtering methods are implemented :
Fat Filtering method
The FatFilterMethod
method consists in cutting out the data out of the bounds defined by the fat_filter parameter.

>>> import palantir.filters as filters
>>> method = filters.fat_filter.FatFilterMethod()
>>> method.getAsDict()
Good periods method
The GoodPeriodsMethod
method removes bad periods from the trace detecting regions of non-stationary quality

>>> import palantir.filters as filters
>>> method = filters.good_periods.GoodPeriodsMethod()
>>> method.getAsDict()
Restrict method
RestrictMethod
>>> import palantir.filters as filters
>>> method = filters.good_periods.RestrictMethod()
>>> method.getAsDict()
Cycle slips method
CycleSlipsMethod
>>> import palantir.filters as filters
>>> method = filters.cycle_slips.CycleSlipsMethod()
>>> method.getAsDict()
Default parameters
Each Observable
instance has its own default filtering parameters attached in a .yml file on the computing server. See the wiki for more information.
Given an Observable
instance, here is how the filtering parameters can be read.
>>> observable.timeChunk.filteringMethods
Customize parameters
To customize filtering parameters, we must start from an existing Observable
instance and its default associated filtering methods (See the wiki for more information).
First, let’s start from an Observable
instance, here E2EObservable
>>> import palantir.links as links
>>> startDate = '240128'
>>> endDate = '240128'
>>> startTime = '000000'
>>> endTime = '100000'
>>> STH2_ID = 1
>>> fiberLinkProcessor = links.E2E_Freelink(STH2_ID, startDate, endDate, startTime, endTime, 'UTC')
>>> observable = fiberLinkProcessor.e2e
Then, we get its default TimeChunk
as a dictionary, fed from its associated .yml file
>>> observable.loadDefaultTimeChunk()
>>> timeChunkDict = observable.timeChunk.getAsDict()
Finally, let’s update the __filter_fat__ parameter of the dictionary that will later feed a FatFilterMethod
instance.
>>> timeChunkDict["methods"][1]["parameters"]["filter_fat"] = 9e-16
>>> observable.process(e2eTimeChunk=timeChunkDict)