Calibration (via analyze command)¶
No Standalone Calibrate Command
Hyperseed does not have a standalone calibrate command. Calibration is performed automatically as part of the analyze workflow.
How Calibration Works¶
Calibration is automatically performed when you run the analyze command:
The calibration process:
- Automatically finds white and dark reference files in the dataset
- Applies reflectance calibration with bad pixel interpolation
- Clips negative values and maximum reflectance (configurable)
- Passes calibrated data to preprocessing and segmentation
Calibration via Python API¶
For programmatic control over calibration, use the Python API:
from hyperseed.core.calibration.reflectance import ReflectanceCalibrator
# Create calibrator with custom settings
calibrator = ReflectanceCalibrator(
clip_negative=True,
clip_max=1.0
)
# Calibrate from directory (auto-finds references)
calibrated_data, reader = calibrator.calibrate_from_directory(
"path/to/dataset"
)
# Or calibrate with explicit references
calibrated = calibrator.calibrate(
raw_data=raw_data,
white_ref=white_reference,
dark_ref=dark_reference
)
Configuration Options¶
Configure calibration in your YAML config file:
Then use with analyze:
See Also¶
- analyze command: Full analysis pipeline including calibration
- Configuration Guide: Calibration configuration options
- API Reference: ReflectanceCalibrator class documentation