- accepts: sdc.api.Spectrum2D
- default extension: .nir
Saves the spectra in FOSS NIR format.
usage: to-nir [-h] [-l {DEBUG,INFO,WARNING,ERROR,CRITICAL}] [-N LOGGER_NAME]
[--skip] [--split_ratios SPLIT_RATIOS [SPLIT_RATIOS ...]]
[--split_names SPLIT_NAMES [SPLIT_NAMES ...]]
[--split_group SPLIT_GROUP] [-o OUTPUT]
[--instrument_name INSTRUMENT_NAME]
[--product_code PRODUCT_CODE] [--product_code_from_field]
[--client CLIENT] [--file_id FILE_ID]
[--sample_id_1 SAMPLE_ID_1] [--sample_id_2 SAMPLE_ID_2]
[--sample_id_3 SAMPLE_ID_3] [--serial_no SERIAL_NO]
[--master MASTER] [--operator OPERATOR]
[--segment_widths SEGMENT_WIDTHS [SEGMENT_WIDTHS ...]]
[--start_points START_POINTS [START_POINTS ...]]
[--increments INCREMENTS [INCREMENTS ...]]
[--end_points END_POINTS [END_POINTS ...]] [--EOC EOC]
[--timestamp TIMESTAMP]
Saves the spectra in FOSS NIR format.
options:
-h, --help show this help message and exit
-l {DEBUG,INFO,WARNING,ERROR,CRITICAL}, --logging_level {DEBUG,INFO,WARNING,ERROR,CRITICAL}
The logging level to use. (default: WARN)
-N LOGGER_NAME, --logger_name LOGGER_NAME
The custom name to use for the logger, uses the plugin
name by default (default: None)
--skip Disables the plugin, removing it from the pipeline.
(default: False)
--split_ratios SPLIT_RATIOS [SPLIT_RATIOS ...]
The split ratios to use for generating the splits
(must sum up to 100) (default: None)
--split_names SPLIT_NAMES [SPLIT_NAMES ...]
The split names to use for the generated splits.
(default: None)
--split_group SPLIT_GROUP
The regular expression with a single group used for
keeping items in the same split, e.g., for identifying
the base name of a file or the sample ID. (default:
None)
-o OUTPUT, --output OUTPUT
The NIR file to store the spectra in. (default: None)
--instrument_name INSTRUMENT_NAME
The instrument name to use in the header (default:
<not implemented>)
--product_code PRODUCT_CODE
Either the attribute name with the product code in it,
or the actual product code to be used (default: 01)
--product_code_from_field
Whether to use the product code option as the
attribute name containing the actual product code
(default: False)
--client CLIENT The client name to use in the header (default: client)
--file_id FILE_ID The file ID to use (default: generated by spectral-
data-converter)
--sample_id_1 SAMPLE_ID_1
The sample ID 1 to use (default: )
--sample_id_2 SAMPLE_ID_2
The sample ID 2 to use (default: )
--sample_id_3 SAMPLE_ID_3
The sample ID 3 to use (default: )
--serial_no SERIAL_NO
The serial number of instrument (default:
0000-0000-0000)
--master MASTER The serial number of the master instrument (default:
0000-0000-0000)
--operator OPERATOR The instrument operator (default: spectral-data-
converter)
--segment_widths SEGMENT_WIDTHS [SEGMENT_WIDTHS ...]
The width of segments (default: [1050])
--start_points START_POINTS [START_POINTS ...]
The start points of segments (default: [400.0])
--increments INCREMENTS [INCREMENTS ...]
The wave increments (default: [2.0])
--end_points END_POINTS [END_POINTS ...]
The end points of segments (default: [1098.0])
--EOC EOC The number of EOCs per rev (default: 0)
--timestamp TIMESTAMP
The timestamp to use in the file (default: None)
Available variables:
{HOME}: The home directory of the current user.{CWD}: The current working directory.{TMP}: The temp directory.{INPUT_PATH}: The directory part of the current input, i.e.,/some/whereof input/some/where/file.txt.{INPUT_NAMEEXT}: The name (incl extension) of the current input, i.e.,file.txtof input/some/where/file.txt.{INPUT_NAMENOEXT}: The name (excl extension) of the current input, i.e.,fileof input/some/where/file.txt.{INPUT_EXT}: The extension of the current input (incl dot), i.e.,.txtof input/some/where/file.txt.{INPUT_PARENT_PATH}: The directory part of the parent directory of the current input, i.e.,/someof input/some/where/file.txt.{INPUT_PARENT_NAME}: The name of the parent directory of the current input, i.e.,whereof input/some/where/file.txt.