nexusLIMS.extractors.plugins.tescan_tif#
Tescan (P)FIB/SEM TIFF extractor plugin.
Module Contents#
Classes#
Extractor for Tescan FIB/SEM TIFF files. |
Data#
TIFF tag ID where Tescan stores INI-style metadata in TIFF files. The tag contains holds instrument configuration, beam parameters, stage position, detector settings, and other acquisition metadata. |
API#
- nexusLIMS.extractors.plugins.tescan_tif.TESCAN_TIFF_TAG#
50431
TIFF tag ID where Tescan stores INI-style metadata in TIFF files. The tag contains holds instrument configuration, beam parameters, stage position, detector settings, and other acquisition metadata.
- class nexusLIMS.extractors.plugins.tescan_tif.TescanTiffExtractor[source]#
Extractor for Tescan FIB/SEM TIFF files.
This extractor handles metadata extraction from .tif files saved by Tescan FIB and SEM instruments (e.g., AMBER X). The extractor uses a two-tier strategy:
Primary: Look for sidecar .hdr file with full metadata in INI format
Fallback: Extract basic metadata from TIFF tags if no .hdr file exists
The .hdr file contains comprehensive acquisition parameters in two sections: [MAIN] and [SEM], which are parsed using Python’s configparser.
- name#
‘tescan_tif_extractor’
- priority#
150
- supported_extensions#
Type: typing.ClassVar
- supports(context: ExtractionContext) bool[source]#
Check if this extractor supports the given file.
Performs content sniffing to verify this is a Tescan TIFF file by:
Checking file extension (.tif or .tiff)
Looking for either a sidecar .hdr file or Tescan-specific TIFF tags
- Parameters:
context – The extraction context containing file information
- Returns:
True if this appears to be a Tescan TIFF file
- Return type:
- extract(context: ExtractionContext) list[dict[str, Any]][source]#
Extract metadata from a Tescan FIB/SEM TIFF file.
Returns the metadata (as a list of dictionaries) from a .tif file saved by Tescan instruments. Uses a three-tier extraction strategy:
Try to parse embedded HDR metadata from TIFF Tag 50431
If that fails, look for a sidecar .hdr file
Always extract basic TIFF tags as well