Metadata¶
qtec_hv_sdk.ImageMeta is the top-level metadata object attached to each image. It stores
the core layout and data type directly, while richer acquisition and file-format
details are grouped into focused metadata classes.
Section |
API |
Description |
|---|---|---|
Shape |
Image dimensions and interleave layout. |
|
Camera |
Camera and lens identity, model information, serial numbers, and acquisition configuration. |
|
Spectral |
Band count, wavelength metadata, spectral binning, response width, and spectral coregistration error. |
|
Spatial |
Optical and spatial sampling details such as focal length, slit width, spatial ROI, binning, field of view, and spatial coregistration error. |
|
Radiometric |
Measurement units, valid value limits, scaling, correction flags, gain, and radiometric quality information. |
|
Temporal |
Exposure time, frame timing, averaging, trigger mode, and acquisition start/end timestamps. |
|
Calibration |
Calibration process, calibration date, and optional extra calibration information used by downstream processing. |
|
Sensor |
Sensor artifact annotations such as bad pixels, bad bands, and repaired pixels. |
|
Encoding |
Pixel storage details such as byte order, scale factor, zero point, bit depth, and compression. |
|
Display |
Visualization hints such as default RGB bands and human-readable band names. |
|
Extra |
Free-form metadata entries that are not represented by the structured
API fields, accessed with |
Image metadata¶
- class qtec_hv_sdk.ImageMeta(shape, interleave=None, dtype=None, camera=None, spectral=None, spatial=None, radiometric=None, temporal=None, calibration=None, sensor=None, encoding=None, display=None, description=None, data_offset=None, **py_kwargs)¶
Header information.
The header type contains a union of the metadata supported by the different HSI file formats. PAM files ignore certain entries, while ENVI and the custom yaml format support the full set of keys.
- Parameters:
interleave (Interleave | None)
dtype (DType)
camera (CameraMeta | None)
spectral (SpectralMeta | None)
spatial (SpatialMeta | None)
radiometric (RadiometricMeta | None)
temporal (TemporalMeta | None)
calibration (CalibrationMeta | None)
sensor (SensorMeta | None)
encoding (EncodingMeta | None)
display (DisplayMeta | None)
description (str | None)
data_offset (int | None)
py_kwargs (Any)
- extra()¶
- Returns:
Dictionary of extra metadata.
- Return type:
dict[str, Any]
- n_planes()¶
Get the number of planes in the image, i.e. the dimension of the outer axis. Depends on the interleave.
- plane_shape()¶
Get the natural plane shape, i.e. the shape of the two innermost dimensions of the interleave shape.
- calibration¶
Calibration provenance metadata.
- Type:
- camera¶
Camera identification and optics metadata.
- Type:
- data_offset¶
Get optional data offset (used for binary files with embedded headers).
- Getter:
- Type:
int | None
- description¶
Description. An arbitrary string that describes the image.
- Getter:
- Type:
str | None
- display¶
Display hint metadata.
- Type:
- encoding¶
Pixel encoding metadata.
- Type:
- interleave¶
Image interleave mode.
- Type:
- radiometric¶
Radiometric characteristics metadata.
- Type:
- sensor¶
Sensor artifact metadata.
- Type:
- spatial¶
Spatial characteristics metadata.
- Type:
- spectral¶
Spectral characteristics metadata.
- Type:
- temporal¶
Temporal acquisition metadata.
- Type:
Legacy compatibility accessors¶
These attributes are kept for older code and map onto the grouped metadata objects shown above.
- ImageMeta.byte_order¶
Data byte-ordering.
- Type:
- ImageMeta.capture¶
Camera acquisition parameters (compatibility shim).
- Type:
CaptureMeta | None
- ImageMeta.default_bands¶
Bands indexes used for displaying false color images.
- Getter:
Get current bands
- Type:
list[int] | None
- ImageMeta.measurement_info¶
Radiometric measurement info (compatibility shim).
- Type:
MeasurementInfo | None
- ImageMeta.wavelength_info¶
Information about data wavelengths.
- Getter:
- Type:
WavelengthMeta | None
Shape and layout¶
- class qtec_hv_sdk.Shape(bands, samples, lines)
Describes the shape of a hyper-spectral image.
- Parameters:
lines (int)
samples (int)
bands (int)
- bands
The spectral bands of the image.
- Type:
Dimension
- lines
This is the width of the image. For line-scan cameras, it is the length of a single line.
- Type:
Dimension
- samples
This is usually the height of the image. If the image was captured using a line-scan hyper-spectral camera, this is also the number of line images captured.
- Type:
Dimension
- class qtec_hv_sdk.ShapeMeta(streaming_dim, plane_dim, interleave)¶
- Parameters:
streaming_dim (Optional[int])
plane_dim (list[int])
interleave (Interleave)
- interleave¶
Image interleave mode.
- Type:
- plane_dim¶
Shape of each image plane.
- Type:
list[int]
- streaming_dim¶
Number of image planes in the streaming dimension.
- Type:
Dimension
- class qtec_hv_sdk.Interleave¶
Data interleave mode.
Defines the memory layout of the file. To achieve good performance, as suitable interleave mode should be used for a given application.
- BSQ: The full image for each spectral band is stored consecutively in memory. This format is
effective for spatial access.
- BIP: All spectral bands for each pixel is stored consecutively, followed by a line of pixels.
This format is effective for spectral access.
- BIL: Each line of pixels is stored consecutively for each band. This format achieves improved
spatial access along the width of the image while retaining good performance for spectral access as well.
A good default for images is the BIL format which is balanced between spatial and spectral access.
- axis_num(axis)¶
- BIL = BIL¶
- BIP = BIP¶
- BSQ = BSQ¶
- class qtec_hv_sdk.Axis
Named axes, independent of memory ordering.
- Bands = Axis.Bands
- Lines = Axis.Lines
- Samples = Axis.Samples
Metadata categories¶
- class qtec_hv_sdk.CameraMeta(id=None, architecture=None, manufacturer=None, model_name=None, serial=None, lens_manufacturer=None, lens_model=None, lens_serial=None, configuration=None, pixel_pitch_um=None)¶
Camera identification and optics metadata (P4001 §7, Camera section).
- architecture¶
Camera architecture, such as line-imaging spectrometer, scanned point spectrometer, array camera, or tunable-filter camera.
- Type:
str | None
- configuration¶
Name, description, or reference for the camera configuration used during acquisition.
- Type:
str | None
- id¶
Identifier for the camera or camera system used to acquire the image.
- Type:
str | None
- lens_manufacturer¶
Lens manufacturer name.
- Type:
str | None
- lens_model¶
Lens model name.
- Type:
str | None
- lens_serial¶
Lens serial number.
- Type:
str | None
- manufacturer¶
Camera manufacturer name.
- Type:
str | None
- model_name¶
Camera model name.
- Type:
str | None
- pixel_pitch_um¶
Camera pixel pitch in micrometers, when known.
- Type:
float | None
- serial¶
Camera serial number.
- Type:
str | None
- class qtec_hv_sdk.SpectralMeta(number_of_bands=None, binning=None, wavelengths=None, response_fwhm=None, coregistration_error=None)¶
Spectral characteristics metadata (P4001 §7, Spectral section).
- binning¶
Spectral binning factor. Omitted when no spectral binning was applied.
- Type:
int | None
- coregistration_error¶
Spectral coregistration error as a percentage.
- Type:
float | None
- number_of_bands¶
Number of spectral bands, when not implied by wavelength metadata or image shape.
- Type:
int | None
- response_fwhm¶
Spectral response function width per band, typically expressed in the same unit as the wavelengths.
- Type:
list[float] | None
- wavelengths¶
Center wavelength for each spectral band, including wavelength units.
- Type:
WavelengthMeta | None
- class qtec_hv_sdk.SpatialMeta(focal_length_mm=None, slit_width_um=None, spatial_roi=None, binning=None, fov=None, psf_width=None, coregistration_error=None)¶
Spatial characteristics metadata (P4001 §7, Spatial section).
- binning¶
Spatial binning factor. Omitted when no spatial binning was applied.
- Type:
int | None
- coregistration_error¶
Spatial coregistration error as a percentage.
- Type:
float | None
- focal_length_mm¶
Focal length in millimeters.
- Type:
float | None
- fov¶
Field of view angle.
- Type:
float | None
- psf_width¶
Sampling point spread function width.
- Type:
float | None
- slit_width_um¶
Slit width in micrometers.
- Type:
float | None
- spatial_roi¶
Spatial region of interest applied during acquisition, expressed in pixel coordinates.
- Type:
tuple[int, int] | None
- class qtec_hv_sdk.RadiometricMeta(unit=Ellipsis, dark_corrected=None, negative_truncated=None, linearity_error=None, aperture=None, read_noise=None, effective_throughput=None, adc_gain=None, limits=None, scaling=None)¶
Radiometric characteristics metadata (P4001 §7, Radiometric section).
- adc_gain¶
ADC gain in electrons per digital number for raw or uncalibrated data.
- Type:
float | None
- aperture¶
Aperture setting used for acquisition.
- Type:
float | None
- dark_corrected¶
Whether dark correction has been applied to the image data.
- Type:
bool | None
- effective_throughput¶
Effective throughput per band, used for radiometric noise estimation.
- Type:
list[float] | None
- limits¶
Valid or expected measurement limits for pixel values.
- Type:
MeasurementLimits | None
- linearity_error¶
Mean linearity error as a percentage.
- Type:
float | None
- negative_truncated¶
Whether negative values were clipped or truncated to zero.
- Type:
bool | None
- read_noise¶
Read noise in electrons.
- Type:
float | None
- scaling¶
Scale factor applied to values before storage.
- Type:
float | None
- unit¶
Radiometric unit of measurement for pixel values.
- Type:
- class qtec_hv_sdk.TemporalMeta(exposure_time_ms=None, frame_time_ms=None, n_averages=None, trigger_mode=None, start_time=None, end_time=None)¶
Temporal acquisition metadata (P4001 §7, Temporal section).
- end_time¶
End time of the collection.
- Type:
datetime.datetime | None
- exposure_time_ms¶
Integration or exposure time in milliseconds.
- Type:
float | None
- frame_time_ms¶
Acquisition frame period in milliseconds.
- Type:
float | None
- n_averages¶
Number of acquisitions averaged into each output frame.
- Type:
int | None
- start_time¶
Start time of the collection.
- Type:
datetime.datetime | None
- trigger_mode¶
Triggering mode used during acquisition.
- Type:
TriggerMode | None
- class qtec_hv_sdk.CalibrationMeta(calibration_process=None, calibration_date=None, additional_info=None)¶
Calibration provenance metadata (P4001 §7, Calibration Information section).
- additional_info¶
Additional calibration data required for downstream post-processing.
- Type:
Any | None
- calibration_date¶
Date and time of the sensor calibration.
- Type:
datetime.datetime | None
- calibration_process¶
Description of the sensor calibration process used for the image.
- Type:
str | None
- class qtec_hv_sdk.SensorMeta(bad_pixels=None, bad_bands=None, repaired_pixels=None)¶
Sensor artifact metadata (P4001 §7, Sensor Artifacts section).
- bad_bands¶
Indices of spectral bands known to be bad or unreliable.
- Type:
list[int] | None
- bad_pixels¶
Indices of pixels known to be bad or unreliable.
- Type:
list[int] | None
- repaired_pixels¶
Indices of pixels where artifact repair has been applied.
- Type:
list[int] | None
- class qtec_hv_sdk.EncodingMeta(byte_order=Ellipsis, scale_factor=None, zero_point=None, bits_per_pixel=None)¶
Pixel encoding metadata (P4001 §7, Pixel Encoding section).
- bits_per_pixel¶
Number of significant bits per pixel, for example ADC bit depth.
- Type:
int | None
- byte_order¶
Byte ordering used for multi-byte pixel values.
- Type:
- compression¶
Compression settings used for encoded pixel data.
- Type:
CompressionOptions | None
- scale_factor¶
Scale factor applied to the data in its measurement unit before storage.
- Type:
float | None
- zero_point¶
Numerical offset added to scaled output values before storage.
- Type:
float | None
Spectral metadata¶
- class qtec_hv_sdk.WavelengthMeta(band_data, unit)¶
Data wavelength information.
Describes the wavelength for each band in the represented data. All units supported by the ENVI format are supported.
- band_data¶
Value for each band.
- Type:
list[float]
- unit¶
Unit of each wavelength.
- Type:
- class qtec_hv_sdk.WavelengthUnit¶
Wavelength units.
- Angstroms = WavelengthUnit.Angstroms¶
- Centimeter = WavelengthUnit.Centimeter¶
- GHz = WavelengthUnit.GHz¶
- Index = WavelengthUnit.Index¶
- MHz = WavelengthUnit.MHz¶
- Meter = WavelengthUnit.Meter¶
- Micrometer = WavelengthUnit.Micrometer¶
- Millimeter = WavelengthUnit.Millimeter¶
- Nanometer = WavelengthUnit.Nanometer¶
- Unknown = WavelengthUnit.Unknown¶
- WaveNumber = WavelengthUnit.WaveNumber¶
Radiometric metadata¶
- class qtec_hv_sdk.MeasurementInfo(unit, limits=None, scaling=None)¶
Radiometric measurement info (kept for FFI and migration compatibility; prefer RadiometricMeta).
- limits¶
Valid or expected measurement limits for pixel values.
- Type:
MeasurementLimits | None
- scaling¶
Scale factor applied to values before storage.
- Type:
float | None
- unit¶
Radiometric unit of measurement for pixel values.
- Type:
Acquisition metadata¶
- class qtec_hv_sdk.CaptureMeta(exposure_time_micro, capture_bit_depth, gain_db)¶
Camera acquisition parameters (kept for FFI and migration compatibility; prefer TemporalMeta, EncodingMeta, and RadiometricMeta).
- Parameters:
exposure_time_micro (int)
capture_bit_depth (int)
gain_db (float)
- capture_bit_depth¶
Capture bit depth.
- Type:
int
- exposure_time_micro¶
Integration or exposure time in microseconds.
- Type:
int
- gain_db¶
Camera gain in decibels.
- Type:
float