OrsDatasetConvertor

Converts data type of datasets

author:

Dragonfly Team

contact:

https://dragonfly.comet.tech

email:

support.dragonfly@comet.tech

organization:

Comet Technologies Canada Inc.

address:

460 Ste-Catherine Ouest, suite 600, Montréal, Québec, Canada, H3B 1A7

copyright:

Comet Technologies Canada Inc. All rights reserved 2023.

date:

Oct 05 2015 16:44

dragonflyVersion:

3.0

UUID:

22d4a214761111e78995448a5b5d70c0

Class Code

class OrsPythonPlugins.OrsDatasetConvertor.OrsDatasetConvertor.OrsDatasetConvertor(*args, **kwargs)
classmethod convertDataset(dataset, newType, createNewDataset, minNormalize=None, maxNormalize=None, minFilter=None, maxFilter=None, replacement=None, replacementLower=None, replacementUpper=None, IProgress=None)

Converts a dataset to a specified data type

Both optional values minNormalize and maxNormalize should be given to use the normalization.

All optional values minFilter, maxFilter and replacement should be given to use the filtering.

Deprecated since version 2021.3: Use convertDatasetOnSelf or convertDatasetCreateNew

Parameters:
  • dataset (ORSModel.ors.Channel) – dataset to convert

  • newType (IntEnum CxvChannel_Data_Type) – datatype of the converted dataset

  • createNewDataset (bool) – if True, a new dataset will be created. Otherwise, the given dataset will be modified.

  • minNormalize (float) – lower bound of normalization range (optional)

  • maxNormalize (float) – higher bound of normalization range (optional)

  • minFilter (float) – lower bound of filter range (optional)

  • maxFilter (float) – higher bound of filter range (optional)

  • replacement (float) – replacement value for the filter value(optional), if specified it take precedence

  • replacementLower (float) – replacement value for the filter lower value(optional)

  • replacementUpper (float) – replacement value for the filter upper value(optional)

  • IProgress (ORSModel.ors.Progress) – progress object

Returns:

newDataset (ORSModel.ors.Channel) – converted dataset

interfacemethod convertDatasetCreateNew(dataset: Channel, newType: CxvChannel_Data_Type, minNormalize: float = None, maxNormalize: float = None, minFilter: float = None, maxFilter: float = None, replacement: float = None, replacementLower: float = None, replacementUpper: float = None, aProgress: Progress = None) Channel

Converts a dataset to a specified data type. A new dataset is created.

Both optional values minNormalize and maxNormalize should be given to use the normalization.

All optional values minFilter, maxFilter and replacement should be given to use the filtering.

Parameters:
  • dataset (ORSModel.ors.Channel) [const] – dataset to convert

  • newType (IntEnum CxvChannel_Data_Type) – datatype of the converted dataset

  • minNormalize (float) – lower bound of normalization range (optional)

  • maxNormalize (float) – higher bound of normalization range (optional)

  • minFilter (float) – lower bound of filter range (optional)

  • maxFilter (float) – higher bound of filter range (optional)

  • replacement (float) – replacement value for the filter value(optional), if specified it take precedence

  • replacementLower (float) – replacement value for the filter lower value(optional)

  • replacementUpper (float) – replacement value for the filter upper value(optional)

  • aProgress (ORSModel.ors.Progress) – progress object

Returns:

newDataset (ORSModel.ors.Channel) – converted dataset

interfacemethod convertDatasetOnSelf(dataset: Channel, newType: CxvChannel_Data_Type, minNormalize: float = None, maxNormalize: float = None, minFilter: float = None, maxFilter: float = None, replacement: float = None, replacementLower: float = None, replacementUpper: float = None, aProgress: Progress = None) None

Converts a dataset to a specified data type. The modifications are applied on this dataset.

Both optional values minNormalize and maxNormalize should be given to use the normalization.

All optional values minFilter, maxFilter and replacement should be given to use the filtering.

Parameters:
  • dataset (ORSModel.ors.Channel) – dataset to convert

  • newType (IntEnum CxvChannel_Data_Type) – datatype of the converted dataset

  • minNormalize (float) – lower bound of normalization range (optional)

  • maxNormalize (float) – higher bound of normalization range (optional)

  • minFilter (float) – lower bound of filter range (optional)

  • maxFilter (float) – higher bound of filter range (optional)

  • replacement (float) – replacement value for the filter value(optional), if specified it take precedence

  • replacementLower (float) – replacement value for the filter lower value(optional)

  • replacementUpper (float) – replacement value for the filter upper value(optional)

  • aProgress (ORSModel.ors.Progress) – progress object

classmethod getMainFormClass()

Gets the class of the main form

Returns:

output

prepareModelDataChanged(beforeChanges: bool, dataKind: MODEL_DATA_CHANGED)

Tells the plugin that his model of calibration data is about to be modified or that the changes are complete.