Class CalibratorMsg
- java.lang.Object
-
- edu.wisc.ssec.mcidas.CalibratorMsg
-
- All Implemented Interfaces:
- Calibrator
public class CalibratorMsg extends java.lang.Object implements Calibrator
Calibration routines for the Meteosat Second Generation (MSG) instrument.At the time this module was written the McIDAS documentation for the MSG Instrument did not reflect that calibration data is now stored by band in the calibration block.
Current understanding is that an MSG ASCII calibration block should be prefixed by the string MSGT followed by the following 6 values for the Inverse Planck Funciton corresponding to each band:
Name Calculation Units C1W3 C1 * W^3 C1 = 2.0e5 * P * C^2 radiance/(cm^-1)^3) W = 1.0e2 * (band wave numbers) (cm^-1) C2W C2 * W C2 = P * C / B K/(cm^-1) W = 1.0e2 * (band wave numbers) (cm^-1) ALPHA gain adjustment BETA bias adjustment GAIN gain OFFSET offset
Where C = speed of light, P = planck constant, B = Boltzmann constant.Each string value is 17 characters with 10 decimal places (fortran E17.10), and should be parseable using
Double.parseDouble. After converting cal block from ints to a string calibration values for the first band, including the header should look like:MSGT 0.0000000000E+00 0.0000000000E+00 0.0000000000E+00 0.0000000000E+00 0.2312809974E-01-0.1179533087E+01
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface edu.wisc.ssec.mcidas.Calibrator
Calibrator.CalibratorFY2
-
-
Field Summary
Fields Modifier and Type Field and Description booleanisPreCalibrated-
Fields inherited from interface edu.wisc.ssec.mcidas.Calibrator
CAL_ALB, CAL_BRIT, CAL_MAX, CAL_MIN, CAL_NONE, CAL_RAD, CAL_RAW, CAL_REFL, CAL_TEMP, SENSOR_FY2D, SENSOR_FY2E, SENSOR_FY2F, SENSOR_FY2G, SENSOR_FY2H, SENSOR_GOES10_IMGR, SENSOR_GOES10_SNDR, SENSOR_GOES12_IMGR, SENSOR_GOES12_SNDR, SENSOR_GOES13_IMGR, SENSOR_GOES13_SNDR, SENSOR_GOES14_IMGR, SENSOR_GOES14_SNDR, SENSOR_GOES15_IMGR, SENSOR_GOES15_SNDR, SENSOR_GOES16_IMGR, SENSOR_GOES16_SNDR, SENSOR_GOES8_IMGR, SENSOR_GOES8_SNDR, SENSOR_GOES9_IMGR, SENSOR_GOES9_SNDR, SENSOR_MSG10_IMGR, SENSOR_MSG8_IMGR, SENSOR_MSG9_IMGR
-
-
Constructor Summary
Constructors Constructor and Description CalibratorMsg(double[][] coefs)CalibratorMsg(int[] cal)Construct this object according to the calibration data provided.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description float[]calibrate(float[] input, int band, int calTypeOut)Calibrate an array of pixels from the current calibration type according to the parameters provided.floatcalibrate(float inputPixel, int band, int calTypeOut)Calibrate a pixel from the current calibration type according to the parameters provided.int[]calibratedList(int band, boolean isPreCal)java.lang.StringcalibratedUnit(int calType)floatcalibrateFromRaw(float inputPixel, int band, int calTypeOut)Calibrate a pixel from RAW data according to the parameters provided.float[]convertBritToTemp(float[] inputData)convert a gray scale value to brightness temperaturefloatconvertBritToTemp(int inVal)convert a gray scale value to brightness temperaturebooleangetIsPreCalibrated()return isPrecalibrated valuevoidinitMsg(int[] cal)intsetCalType(int calType)Set the input data calibration type.voidsetIsPreCalibrated(boolean isPrecalibrated)set isPrecalibrated value
-
-
-
Constructor Detail
-
CalibratorMsg
public CalibratorMsg(int[] cal) throws CalibratorExceptionConstruct this object according to the calibration data provided. On initalization the calibration array is cloned and all bands available are read from the block.- Parameters:
cal- calibration block from an MSG AREA file.- Throws:
CalibratorException- on invalid calibration block.
-
CalibratorMsg
public CalibratorMsg(double[][] coefs) throws CalibratorException- Parameters:
coefs-- Throws:
CalibratorException
-
-
Method Detail
-
initMsg
public void initMsg(int[] cal) throws CalibratorException- Throws:
CalibratorException
-
setCalType
public int setCalType(int calType)
Set the input data calibration type.- Specified by:
setCalTypein interfaceCalibrator- Parameters:
calType- calibration type fromCalibrator- Returns:
- 0 if calibration type is valid, -1 otherwise.
-
calibrate
public float[] calibrate(float[] input, int band, int calTypeOut)Calibrate an array of pixels from the current calibration type according to the parameters provided.- Specified by:
calibratein interfaceCalibrator- Parameters:
input- pixel array to calibrate.band- channel for which to perform calibration.calTypeOut- Calibration type constant.- Returns:
- calibrated pixel value or
Float.NaNif the calibration type cannot be performed for the specified band.
-
calibrate
public float calibrate(float inputPixel, int band, int calTypeOut)Calibrate a pixel from the current calibration type according to the parameters provided.- Specified by:
calibratein interfaceCalibrator- Parameters:
inputPixel- pixel value to calibrate.band- channel for which to perform calibration.calTypeOut- Calibration type constant.- Returns:
- calibrated pixel value or
Float.NaNif the calibration type cannot be performed for the specified band.
-
calibratedList
public int[] calibratedList(int band, boolean isPreCal)- Specified by:
calibratedListin interfaceCalibrator
-
calibrateFromRaw
public float calibrateFromRaw(float inputPixel, int band, int calTypeOut)Calibrate a pixel from RAW data according to the parameters provided.- Parameters:
inputPixel- pixel value to calibrate.band- channel for which to perform calibration.calTypeOut- Calibration type constant.- Returns:
- calibrated pixel value,
Float.NaNif the calibration type cannot be performed for the specified band.
-
calibratedUnit
public java.lang.String calibratedUnit(int calType)
- Specified by:
calibratedUnitin interfaceCalibrator
-
convertBritToTemp
public float convertBritToTemp(int inVal)
convert a gray scale value to brightness temperature- Specified by:
convertBritToTempin interfaceCalibrator- Parameters:
inVal- input data value
-
convertBritToTemp
public float[] convertBritToTemp(float[] inputData)
convert a gray scale value to brightness temperature- Specified by:
convertBritToTempin interfaceCalibrator- Parameters:
inputData- input data array
-
getIsPreCalibrated
public boolean getIsPreCalibrated()
return isPrecalibrated value- Specified by:
getIsPreCalibratedin interfaceCalibrator
-
setIsPreCalibrated
public void setIsPreCalibrated(boolean isPrecalibrated)
set isPrecalibrated value- Specified by:
setIsPreCalibratedin interfaceCalibrator
-
-
DMelt 3.0 © DataMelt by jWork.ORG