calibrationdata¶
This module is responsible for storage and application of calibration data.
-
class
runmacs.spec.calibration.calibrationdata.CalibrationData[source]¶ Representation of specMACS calibration data.
This class supports calibration data with arbitrary analytic nonlineary correction rules.
-
apply¶ Applies the calibration data to given raw data.
This property can be used as a function, to calibrate from
S0andtintto radiance units:>>> caldata = CalibrationData.fromFile('cal...') >>> calibrated = caldata.apply(signal - dark_signal, tint)
Alternatively,
applycan be sliced, if only a part of the sensor needs to be calibrated:>>> part_calibrated = caldata.apply[7,10:20](signal0[7,10:20], tint)
-
convertUnit(targetUnit, ureg=None)[source]¶ Create new calibration data for another radiance unit.
Parameters: - targetUnit – desired radiance unit
- ureg –
pintunit registry, ifNone, a temporary one is created
Returns: new
CalibrationDatawith given radiance unit
-
classmethod
fromFile(filename)[source]¶ Create
CalibrationDatafrom a givenfilename.Parameters: filename – Name of the calibration file (ENVI format, without file suffix)
-
genBinning(spatial=1, spectral=1)[source]¶ Create new calibration data for given binnings
Parameters: - spatial – spatial binning factor
- spectral – spectral binning factor
Returns: new
CalibrationDatawith given binning
-
getBadPixelFixer(strategy=None)[source]¶ Get a
BadPixelFixerfrom the bad pixels given in the calibration data.Parameters: strategy – Fixing strategy, gets passed to the BadPixelFixer.
-
rawEnviHeader¶ The raw ENVI header which describes the current calibration data.
-