Opening data and processing¶
Opening existing data¶
To work with data you recorded earlier, or data from another instrument, click Open Session in the main window.
-
Data folder: choose the folder that holds the session. QCLM scans it, and its subfolders named
frames,cubes,results,capture,rawordata, then sorts what it finds:Found Recognised by Raw frames .raw,.bin,.dat,.hdr(ENVI),.tif/.tiffSpectral cubes .npy,.h5/.hdf5,.nc,.zarrfoldersResults .json,.csv,.yml/.yamlWhite reference file name contains whitereforwhite_refDark reference file name contains darkrefordark_ref -
Choose the Experiment type: Hyperspectral or Sparse Wavelength.
- Set the Processing options to apply on import: Normalize image, Savitzky-Golay destripe and ROI bounds.
- Click Open Session ▶. QCLM uploads the data to the backend (Import to Server), parses it into a spectral cube and opens it in the acquisition window.
Supported file formats¶
| Format | Extensions | Notes |
|---|---|---|
| ENVI | .hdr + data file |
BSQ, BIL and BIP interleave; reads data type, byte order and wavelengths from the header |
| HDF5 | .h5, .hdf5 |
Uses the first 3-D dataset; wavelengths are read from an attribute if present |
| NetCDF | .nc |
Uses the first 3-D variable; wavelengths are read from a variable or attribute if present |
| NumPy | .npy |
float32/float64; 3-D arrays in (bands, rows, cols) order, 2-D arrays as a single band |
| TIFF | .tif, .tiff |
Multi-page TIFF, one page per band; 8/16-bit integer or 32/64-bit float |
| Zarr | .zarr |
Float data (f4 / f8), uncompressed or zlib |
| Raw binary | .bin, .raw, .dat |
QCLM's own format: a header of three little-endian ints (bands, rows, cols), then float64 values band by band |
Processing options¶
The Processing tab controls how frames become a calibrated cube. The same options are available when importing a session.
| Option | What it does |
|---|---|
| Reference correction | White/dark correction: converts raw counts into relative reflectance using a white reference and a dark reference. Set White ref and Dark ref. |
| Destriping | Removes column stripes caused by detector readout. Window and Order set the Savitzky-Golay smoothing. |
| Normalize | Rescales each band to the range 0–1. |
| Band cropping | Keeps only a range of bands (by band index) and drops the rest. |
| Downsample | Averages each n × n block of pixels into one, so the image shrinks by a factor of n in each direction. |
| Row / Column bounds | Crops the cube to a rectangular region of interest. |
Click Process (Cube Build) to apply them. With Auto-process pipeline enabled, they are applied automatically after every scan.
Processing pipeline gives the exact formulas and the order of the steps.
Good references matter
Record the white reference on a uniform, highly reflective target, with the same settings as your sample. Record the dark reference with the source blocked. Correction divides by (white − dark), so noisy references add noise to every pixel.
Regions of interest and masks¶
The ROI tab defines which pixels the analysis uses.
- Draw ROI on canvas: draw a region on the image, or use Lasso for a freehand shape. Add current ROI stores it as a sub-ROI, and you can keep several.
- Measurement ROI: the region used for index plots and statistics.
- Mask tools: Draw and Erase with a Brush size, or Threshold mask to mask by intensity.
- Mask operations: Union, Intersect, Subtract and Invert mask. Clean mask removes small specks, and Remove borders clears the image edges.
- Mask I/O: Save to file and Load from file, so you can reuse masks across sessions.