Synchronization API reference¶
Provides higher-level python objects to easily apply synchronization method to ths objects.
- exception scared.synchronization.ResynchroError[source]¶
Error to raise in resynchronization function to reject trace.
- class scared.synchronization.Synchronizer(input_ths, output, function, overwrite=False, **kwargs)[source]¶
Higher-level python objects to apply resynchronization method to ths objects.
- input_ths¶
Input ths that contain campaign to synchronize.
- Type:
TraceHeaderSet
- output¶
If filename, an ETSWriter object is build with this filename.
- Type:
str or TraceHeaderSet
- function¶
Function to use for synchronization.
- Type:
function
- synchronized_counter¶
Number of synchronized traces.
- overwrite¶
If True, reset and overwrite output file (default: False).
- Type:
bool
- kwargs¶
Used to pass extra named arguments to the synchronization function.
Note
- The following arguments are passed to the synchronization function:
trace_object: trace object from trace set
**kwargs directly from Synchronizer
stdout is disabled during Synchronizer.run().
Warning
All plots in synchronization function must be disabled before launching Synchronizer.run().
- check(nb_traces=5, catch_exceptions=True)[source]¶
Test synchronization function on traces picked randomly in trace set.
- Parameters:
nb_traces (int) – Number of traces to test on.
catch_exceptions (bool) – If True, exceptions are caught and just printed. You can disable it to view the full traceback.
- Returns:
Trace arrays.
- Return type:
(list)