utils
A set of useful functions
Classes
scilightcon.utils.ShotToShotData
Data object from *.s2s file, produced by the Shot-To-Shot Measurement Tool software and generated by scilightcon.utils.load_s2s_data method.
Attributes:
| Name | Type | Description |
|---|---|---|
filepath |
str
|
Absolute file path of the *.s2s file |
version |
int
|
*.s2s file format format |
temporal_data_x |
List[float]
|
Delays in nanoseconds |
temporal_data_y |
List[float]
|
Measured temporal data voltages in volts |
sml_data |
List[float]
|
All measured data, normalized to the mean value |
sml_mean |
float
|
Mean voltage of measured |
nmrsd_data_x |
List[float]
|
Time points in seconds of calculated NRMSD |
nmrsd_data_y |
List[float]
|
Values of calculated NRMSD |
outliers |
List[ShotToShotOutlier]
|
Outlier data |
device_serial_number |
str
|
Serial number of device used in the measurement |
repetition_rate |
float
|
Repetition rate in kHz |
wavelength |
float
|
Wavelength of measured light |
scilightcon.utils.ShotToShotOutlier
Outlier data for the scilightcon.utils.ShotToShotData object
Attributes:
| Name | Type | Description |
|---|---|---|
time |
float
|
Time in seconds, when the outlier was recorded |
voltage |
List[float]
|
Raw voltage data of the data chunk corresponding to the outlier. |
Functions:
scilightcon.utils.interpolate_and_multiply(arr1, arr2)
Interpolate an X,Y arr2 so that it has the same X as arr1.
arr1 and arr2 can be np.ndarray or Tuple.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
arr1
|
ndarray or tuple
|
Reference array |
required |
arr2
|
ndarray or tuple
|
Array to be interpolated |
required |
Returns:
| Type | Description |
|---|---|
ndarray | Tuple[List[float], List[float]]
|
Interpolated X,Y array in the same type as arr1. |
scilightcon.utils.load_s2s_data(filepath)
Loads data from *.s2s file, produced by the Shot-To-Shot Measurement Tool software
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
filepath
|
str
|
An absolute path to the *.s2s file |
required |
Returns:
| Type | Description |
|---|---|
ShotToShotData
|
ShotToShotData object |