loader module
Define functions to prepare data for MultipactorTest.
- TRIGGER_POLICIES
How consecutive-same power points should be treated.
"keep_all": keep all data (default)"trim": remove trailing points"average": average the data on the same point"first": only consider first point (least conditionned)"last": only consider last point (most conditionned)"max": retain maximum value"min": retain minimum value
alias of
Literal[‘keep_all’, ‘trim’, ‘average’, ‘first’, ‘last’, ‘max’, ‘min’]
- load(filepath, sep='\\t', trigger_policy='keep_all', index_col='Sample index', remove_metadata_columns=False, **kwargs)[source]
Load the LabViewer file.
If
trigger_policyis set, perform operations to select the desired trigger. These operations do not preserve original sample indexes.- Parameters:
filepath (
Path) – LabViewer file to be loaded.sep (
str, default:'\\t') – Column separator.trigger_policy (
Literal['keep_all','trim','average','first','last','max','min'], default:'keep_all') – How consecutive measures at the same power should be treated.index_col (
str, default:'Sample index') – Name of the column holding indexes.remove_metadata_columns (
bool, default:False) – Remove the rightmost columns holding metadata.kwargs – Other kwargs passed to
_load_file().
- Return type:
- Returns:
pandas.DataFrame – Holds data.
list[str] – The comments, without their comment character, line by line. If loading a
XLSX, an empty list is returned.
- _load_file(filepath, index_col='Sample index', comment='#', **kwargs)[source]
Load the data file.
Todo
Allow for
TXTorXLSXinput files.- Parameters:
- Return type:
- Returns:
pandas.DataFrame – Holds data.
list[str] – The comments, without their comment character, line by line. If loading a
XLSX, an empty list is returned.
- _apply_trigger_filtering(trigger_policy, data, dbm_column='NI9205_dBm', tol=1e-10)[source]
Apply desired trigger policy.
Original indexes are not preserved.