edu.wisc.ssec.mcidas
Class CalibratorMsg

java.lang.Object
  extended by edu.wisc.ssec.mcidas.CalibratorMsg
All Implemented Interfaces:
Calibrator

public class CalibratorMsg
extends 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:

NameCalculationUnits
C1W3C1 * W^3
C1 = 2.0e5 * P * C^2radiance/(cm^-1)^3)
W = 1.0e2 * (band wave numbers)(cm^-1)
C2WC2 * W
C2 = P * C / BK/(cm^-1)
W = 1.0e2 * (band wave numbers)(cm^-1)
ALPHAgain adjustment
BETAbias adjustment
GAINgain
OFFSEToffset

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

Version:
$Id: CalibratorMsg.java,v 1.7 2009-03-02 23:34:50 curtis Exp $
Author:
Bruce Flynn, SSEC

Nested Class Summary
 
Nested classes/interfaces inherited from interface edu.wisc.ssec.mcidas.Calibrator
Calibrator.CalibratorFY2
 
Field Summary
 
Fields inherited from interface edu.wisc.ssec.mcidas.Calibrator
CAL_ALB, CAL_BRIT, CAL_MAX, CAL_MIN, CAL_NONE, CAL_RAD, CAL_RAW, 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_GOES8_IMGR, SENSOR_GOES8_SNDR, SENSOR_GOES9_IMGR, SENSOR_GOES9_SNDR, SENSOR_MSG_IMGR
 
Constructor Summary
CalibratorMsg(double[][] coefs)
           
CalibratorMsg(int[] cal)
          Construct this object according to the calibration data provided.
 
Method Summary
 float[] calibrate(float[] input, int band, int calTypeOut)
          Calibrate an array of pixels from the current calibration type according to the parameters provided.
 float calibrate(float inputPixel, int band, int calTypeOut)
          Calibrate a pixel from the current calibration type according to the parameters provided.
 float calibrateFromRaw(float inputPixel, int band, int calTypeOut)
          Calibrate a pixel from RAW data according to the parameters provided.
 int setCalType(int calType)
          Set the input data calibration type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CalibratorMsg

public CalibratorMsg(int[] cal)
              throws CalibratorException
Construct 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

setCalType

public int setCalType(int calType)
Set the input data calibration type.

Specified by:
setCalType in interface Calibrator
Parameters:
calType - calibration type from Calibrator
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:
calibrate in interface Calibrator
Parameters:
input - pixel array to calibrate.
band - channel for which to perform calibration.
calTypeOut - Calibration type constant.
Returns:
calibrated pixel value or Float.NaN if 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:
calibrate in interface Calibrator
Parameters:
inputPixel - pixel value to calibrate.
band - channel for which to perform calibration.
calTypeOut - Calibration type constant.
Returns:
calibrated pixel value or Float.NaN if the calibration type cannot be performed for the specified band.

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.NaN if the calibration type cannot be performed for the specified band.