sift_py.data_import.tdms
¶
| CLASS | DESCRIPTION |
|---|---|
TdmsTimeFormat |
|
TdmsUploadService |
Service to upload TDMS files. |
| FUNCTION | DESCRIPTION |
|---|---|
sanitize_string |
Removes the characters ", \, `, ~, and | from the input string. |
| ATTRIBUTE | DESCRIPTION |
|---|---|
CHARACTER_REPLACEMENTS |
|
TDMS_TO_SIFT_TYPES |
|
TIME_CHANNEL_NAME |
|
CHARACTER_REPLACEMENTS
module-attribute
¶
TDMS_TO_SIFT_TYPES
module-attribute
¶
TDMS_TO_SIFT_TYPES = {
Boolean: BOOL,
Int8: INT_32,
Int16: INT_32,
Int32: INT_32,
Int64: INT_64,
Uint8: UINT_32,
Uint16: UINT_32,
Uint32: UINT_32,
Uint64: UINT_64,
SingleFloat: FLOAT,
DoubleFloat: DOUBLE,
String: STRING,
}
TdmsTimeFormat
¶
Bases: Enum
| ATTRIBUTE | DESCRIPTION |
|---|---|
TIME_CHANNEL |
|
WAVEFORM |
|
TdmsUploadService
¶
TdmsUploadService(rest_conf: SiftRestConfig)
Service to upload TDMS files.
| METHOD | DESCRIPTION |
|---|---|
upload |
Uploads the TDMS file pointed to by |
upload
¶
upload(
path: Union[str, Path],
asset_name: str,
prefix_channel_with_group: bool = False,
group_into_components: bool = False,
ignore_errors: bool = False,
run_name: Optional[str] = None,
run_id: Optional[str] = None,
tdms_time_format: TdmsTimeFormat = WAVEFORM,
include_metadata: bool = False,
) -> DataImportService
Uploads the TDMS file pointed to by path to the specified asset.
| PARAMETER | DESCRIPTION |
|---|---|
path
|
The path to the file to upload. |
asset_name
|
The name of the asset to upload to.
TYPE:
|
prefix_channel_with_group
|
Set to True if you want to prefix the channel name with TDMS group. This can later be used to group into folders in the Sift UI. Default is False.
TYPE:
|
ignore_errors
|
If True will skip channels without timing information. Default is False.
TYPE:
|
run_name
|
The name of the run to create for this data. Default is None. |
run_id
|
The id of the run to add this data to. Default is None. |
tdms_time_format
|
Specify how timing information is encoded in the file. Default is WAVEFORM. If using the TIME_CHANNEL format, timestamps should use the LabVIEW/TDMS epoch (number of seconds since 01/01/1904 00:00:00.00 UTC).
TYPE:
|
include_metadata
|
Whether to include TDMS file metadata as Run metadata.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
DataImportService
|
The DataImportService used to get the status of the import. |