artemis_gnss.process.iterative package

Submodules

artemis_gnss.process.iterative.C_split_trace_to_portions module

First major step is to roughly process the data and to detect long stop periods in order to cut portions of data between long stops Created on 20/09/24

class artemis_gnss.process.iterative.C_split_trace_to_portions.SplitTraceStep

Bases: StatefulStep

append(trace: DataFrame, options: CleanOptions, *args, **kwargs) List[DataFrame]

Append trace to current treatment

flush(*args, **kwargs) List[DataFrame]

Do last steps, return result and initialize

get_state() dict

Get dict of state variables necessary to restore the computation later :return:

initialize(*args, **kwargs)

Initialize internal variables

purge(*args, **kwargs) List[DataFrame]

Last steps to finalize treatment (if necessary)

restore(state: dict)

Restore state of the process :param state: :return:

artemis_gnss.process.iterative.E_merge_portions module

This step merges portions Created on 20/09/24

class artemis_gnss.process.iterative.E_merge_portions.MergePortionStep

Bases: StatefulStep

append(trace: DataFrame, options: CleanOptions, *args, **kwargs) List[DataFrame]

Append trace to current treatment

flush(options: CleanOptions, *args, **kwargs) List[DataFrame]

Do last steps, return result and initialize

get_state() dict

Get dict of state variables necessary to restore the computation later :return:

initialize(init_last_trip: DataFrame = None, *args, **kwargs)

Initialize internal variables

purge(options: CleanOptions, *args, **kwargs) List[DataFrame]

Last steps to finalize treatment (if necessary)

restore(state: dict, history_trips: List[DataFrame] = None)

Restore state of the process :param state: :return:

artemis_gnss.process.iterative.E_merge_portions.portion_decide_merge(current_trip: DataFrame, portion: DataFrame) bool

This function checks if a portion can be merged to a trip under construction. If it not the case, the trip must be finalized and the portion must become the beginning of the next trip. :param current_trip: trip under construction :param portion: portion to add :return: True if ok to merge

artemis_gnss.process.iterative.abc module

Base class Created on 20/09/24

class artemis_gnss.process.iterative.abc.StatefulStep

Bases: ABC

Base methods defined for a step which has an internal variable to memorize between each call

append(trace: DataFrame, *args, **kwargs) List[DataFrame]

Append trace to current treatment

flush(*args, **kwargs) List[DataFrame]

Do last steps, return result and initialize

get_state() dict

Get dict of state variables necessary to restore the computation later :return:

initialize(*args, **kwargs) List[DataFrame]

Initialize internal variables

purge(*args, **kwargs) List[DataFrame]

Last steps to finalize treatment (if necessary)

restore(state: dict)

Restore state of the process :param state: :return:

artemis_gnss.process.iterative.main_iterative module

Main entry points for process functions Created on 20/09/24

class artemis_gnss.process.iterative.main_iterative.CleanProcess

Bases: StatefulStep

append(trace: DataFrame, *args, **kwargs) List[DataFrame]

Append trace to current treatment

flush(*args, **kwargs) List[DataFrame]

Do last steps, return result and initialize

get_debug()
get_init_last_trip_edit() Tuple[bool, DataFrame]

if merge_edit_init_last_trip is enabled, the last trip in the database before the clean process can be modified this function returns the modified trip (call after purge) :return:

get_output() CleanOutput
get_output_trips()
get_state(include_trips=False) dict

Get dict of state variables necessary to restore the computation later :return:

initialize(traces: List[DataFrame] = None, *, options: CleanOptions = None, init_last_trip: DataFrame = None, **kwargs) List[DataFrame]

Reset state of main process and initialize common_timestamp from options.common_timestamp or from an initial stack of traces, sort this stack of traces according to the timestamp of the first sample :param traces: :param options: options to use for this iteration of the process process If user gives options.common_timestamp, the value from the user is used :param kwargs: :return:

process_all(traces: List[DataFrame], *, options: CleanOptions = None, init_last_trip: DataFrame = None) List[DataFrame]

Main entry point :param traces: list of raw traces to process :param options: options.common_timestamp: timestamp for t=0 in output traces Usage 1: no timestamp for each trace => the time vectors are referenced to options.common_timestamp Usage 2: give timestamp for t=0 each individual trace using trace.attrs[“timestamp”] Usage 3: give timestamp vector instead of time vector :return: list of cleaned traces

purge(*args, **kwargs) List[DataFrame]

Last steps to finalize treatment (if necessary)

restore(state: dict)

Restore state of the process :param state: :return:

Module contents

Package for processing traces iteratively Created on 20/09/24