gunshotmatch_pipeline.unknowns

Metadata and pipeline for unknown samples.

Classes:

UnknownSettings(name, datafile, method, …)

Settings for an unknown propellant or OGSR sample.

Functions:

filter_and_identify_peaks(repeat, method, engine)

Filter peaks by minimum peak area, then identify compounds.

process_unknown(unknown, output_dir[, recreate])

Process an “unknown” sample.

class UnknownSettings(name, datafile, method, config, output_directory, data_directory='')[source]

Bases: libgunshotmatch.method.MethodBase, gunshotmatch_pipeline.projects.LoaderMixin

Settings for an unknown propellant or OGSR sample.

Parameters
  • name (str) – The unknown sample’s name or identifier.

  • datafile (str) – The input datafile

  • method (str) – Relative or absolute filename to the method TOML file. The table name is “method”.

  • config (str) – Relative or absolute filename to the configuration TOML file. The table name is “config”.

  • output_directory (str) – Relative or absolute path to the directory the output files should be placed in.

  • data_directory (str) – Relative or absolute path to the directory containing the data files. Default ''.

Attributes:

config

Relative or absolute filename to the configuration TOML file.

data_directory

Relative or absolute path to the directory containing the data files.

datafile

The input datafile

datafile_path

The absolute path to the datafile.

method

Relative or absolute filename to the method TOML file.

name

The unknown sample’s name or identifier.

output_directory

Relative or absolute path to the directory the output files should be placed in.

Methods:

from_json(json_string)

Parse an UnknownSettings from a JSON string.

from_toml(toml_string)

Parse an UnknownSettings from a TOML string.

to_toml()

Convert an UnknownSettings to a TOML string.

config

Type:    str

Relative or absolute filename to the configuration TOML file. The table name is “config”.

data_directory

Type:    str

Relative or absolute path to the directory containing the data files.

datafile

Type:    str

The input datafile

property datafile_path

The absolute path to the datafile.

Return type

PathPlus

classmethod from_json(json_string)[source]

Parse an UnknownSettings from a JSON string.

Parameters

json_string (str)

Return type

UnknownSettings

classmethod from_toml(toml_string)[source]

Parse an UnknownSettings from a TOML string.

Parameters

toml_string (str)

Return type

UnknownSettings

method

Type:    str

Relative or absolute filename to the method TOML file. The table name is “method”.

name

Type:    str

The unknown sample’s name or identifier.

output_directory

Type:    str

Relative or absolute path to the directory the output files should be placed in.

to_toml()[source]

Convert an UnknownSettings to a TOML string.

Return type

str

filter_and_identify_peaks(repeat, method, engine)[source]

Filter peaks by minimum peak area, then identify compounds.

Parameters
process_unknown(unknown, output_dir, recreate=False)[source]

Process an “unknown” sample.

Parameters
Return type

Project