nexusLIMS.extractors.plugins.edax#

EDAX EDS spectrum (.spc/.msa) extractor plugin.

Module Contents#

Classes#

SpcExtractor

Extractor for EDAX .spc files.

MsaExtractor

Extractor for EMSA/MAS .msa spectrum files.

Functions#

get_spc_metadata

Get metadata from a .spc file.

get_msa_metadata

Get metadata from an .msa file.

API#

class nexusLIMS.extractors.plugins.edax.SpcExtractor[source]#

Extractor for EDAX .spc files.

This extractor handles metadata extraction from .spc files saved by EDAX EDS software (Genesis, TEAM, etc.).

name#

‘spc_extractor’

priority#

100

supported_extensions#

Type: typing.ClassVar

supports(context: ExtractionContext) bool[source]#

Check if this extractor supports the given file.

Parameters:

context – The extraction context containing file information

Returns:

True if file extension is .spc

Return type:

bool

extract(context: ExtractionContext) list[dict[str, Any]][source]#

Extract metadata from a .spc file.

Returns the metadata (as a list of dicts) from a .spc file. This type of file is produced by EDAX EDS software. It is read by HyperSpy’s file reader and relevant metadata extracted and returned

Parameters:

context – The extraction context containing file information

Returns:

List containing a single metadata dict with ‘nx_meta’ key. If None, the file could not be opened

Return type:

list[dict]

class nexusLIMS.extractors.plugins.edax.MsaExtractor[source]#

Extractor for EMSA/MAS .msa spectrum files.

This extractor handles metadata extraction from .msa files, which may be saved by various EDS acquisition software packages, most commonly as exports from EDAX or Oxford software.

name#

‘msa_extractor’

priority#

100

supported_extensions#

Type: typing.ClassVar

supports(context: ExtractionContext) bool[source]#

Check if this extractor supports the given file.

Parameters:

context – The extraction context containing file information

Returns:

True if file extension is .msa

Return type:

bool

extract(context: ExtractionContext) list[dict[str, Any]][source]#

Extract metadata from an .msa file.

Returns the metadata (as a list of dicts) from an .msa spectrum file. This file may be saved by a number of different EDS acquisition software, but most often is produced as an export from EDAX or Oxford software. This format is a standard, but vendors (such as EDAX) often add other values into the metadata header. See https://www.microscopy.org/resources/scientific_data/ for the fomal specification.

Parameters:

context – The extraction context containing file information

Returns:

List containing a single metadata dict with ‘nx_meta’ key. If None, the file could not be opened

Return type:

list[dict]

nexusLIMS.extractors.plugins.edax.get_spc_metadata(filename)[source]#

Get metadata from a .spc file.

Deprecated since version 1.4.0: This function is deprecated. Use SpcExtractor class instead.

Parameters:

filename (Path) – path to a file saved in the harvested directory of the instrument

Returns:

mdict – A description of the file’s metadata.

Return type:

dict

nexusLIMS.extractors.plugins.edax.get_msa_metadata(filename)[source]#

Get metadata from an .msa file.

Deprecated since version 1.4.0: This function is deprecated. Use MsaExtractor class instead.

Parameters:

filename (Path) – path to a file saved in the harvested directory of the instrument

Returns:

mdict – A description of the file’s metadata.

Return type:

dict