Package noaa.coastwatch.io
Class NOAA1bReader.ScanLine
java.lang.Object
noaa.coastwatch.io.NOAA1bReader.ScanLine
- Direct Known Subclasses:
NOAA1bV1Reader.ScanLineV1
,NOAA1bV2Reader.ScanLineV2
- Enclosing class:
- NOAA1bReader
The scan line class may be used to retrieve specific data from
one scan line of the dataset.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
The AVHRR channel 1 variable.static final int
The AVHRR channel 2 variable.static final int
The AVHRR channel 3 variable.static final int
The AVHRR channel 3a variable.static final int
The AVHRR channel 4 variable.static final int
The AVHRR channel 5 variable.static final int
The ch3 select attribute: 0 = 3b, 1 = 3a, 2 = transition (Integer).static final int
The CLAVR cloud mask variable.protected int
The sample start and count values.protected ByteBuffer
The scan line data.static final int
The latitude angle variable.static final int
The longitude angle variable.static final int
The total number of navigation data values.static final int
The quality indicator attribute (Long).static final int
The relative azimuth angle variable.static final int
The satellite zenith angle variable.static final int
The scan line day of year, [1..366] (Integer).static final int
The scan line UTC time in milliseconds (Long).static final int
The scan line number attribute (Integer).static final int
The scan line year (Integer).static final int
The scan time variable.static final int
The solar zenith angle variable.protected int
The sample start and count values. -
Constructor Summary
ConstructorDescriptionScanLine
(int line, int start, int count) Creates a new dataset scan line using the specified index. -
Method Summary
Modifier and TypeMethodDescriptionabstract float[]
calibrateChannel
(int[] countData, int channel) Calibrates channel count data to scientific units.abstract Object
getAttribute
(int index) Gets a scan line attribute.protected abstract float[]
getCalibration
(int channel) Gets the set of line-specific calibration coefficients for the specified channel.float[]
getChannel
(int channel) Gets the calibrated sensor data for the specified channel.abstract byte[]
getCloud()
Gets the CLAVR cloud mask data.int
getIndex()
Gets the scan line index, starting at 0.float[]
getNavigation
(int variable) Gets the interpolated navigation data for the specified angle variable.int[]
getRawChannel
(int channel) Gets the uncalibrated sensor count data for the specified channel.Gets the raw scan line data.abstract float[]
getRawNavigation
(int variable) Gets the raw uninterpolated navigation data for the specified angle variable.abstract long[]
Gets the scan line time data.float[]
interpolateNavigation
(float[] navData, int variable) Interpolates navigation data using the specified raw navigation data and sample range specified when this scan line was created.abstract boolean
Gets the navigation data usability flag.abstract boolean
Gets the sensor data usability flag.
-
Field Details
-
NAVIGATION_VALUES
public static final int NAVIGATION_VALUESThe total number of navigation data values.- See Also:
-
AVHRR_CH1
public static final int AVHRR_CH1The AVHRR channel 1 variable.- See Also:
-
AVHRR_CH2
public static final int AVHRR_CH2The AVHRR channel 2 variable.- See Also:
-
AVHRR_CH3
public static final int AVHRR_CH3The AVHRR channel 3 variable.- See Also:
-
AVHRR_CH3A
public static final int AVHRR_CH3AThe AVHRR channel 3a variable.- See Also:
-
AVHRR_CH4
public static final int AVHRR_CH4The AVHRR channel 4 variable.- See Also:
-
AVHRR_CH5
public static final int AVHRR_CH5The AVHRR channel 5 variable.- See Also:
-
SOLAR_ZENITH
public static final int SOLAR_ZENITHThe solar zenith angle variable.- See Also:
-
SATELLITE_ZENITH
public static final int SATELLITE_ZENITHThe satellite zenith angle variable.- See Also:
-
RELATIVE_AZIMUTH
public static final int RELATIVE_AZIMUTHThe relative azimuth angle variable.- See Also:
-
CLOUD
public static final int CLOUDThe CLAVR cloud mask variable.- See Also:
-
LATITUDE
public static final int LATITUDEThe latitude angle variable.- See Also:
-
LONGITUDE
public static final int LONGITUDEThe longitude angle variable.- See Also:
-
SCAN_TIME
public static final int SCAN_TIMEThe scan time variable.- See Also:
-
SCAN_LINE_NUMBER
public static final int SCAN_LINE_NUMBERThe scan line number attribute (Integer).- See Also:
-
QUALITY_INDICATOR
public static final int QUALITY_INDICATORThe quality indicator attribute (Long).- See Also:
-
SCAN_LINE_YEAR
public static final int SCAN_LINE_YEARThe scan line year (Integer).- See Also:
-
SCAN_LINE_DAY
public static final int SCAN_LINE_DAYThe scan line day of year, [1..366] (Integer).- See Also:
-
SCAN_LINE_MILLISECOND
public static final int SCAN_LINE_MILLISECONDThe scan line UTC time in milliseconds (Long).- See Also:
-
CH3_SELECT
public static final int CH3_SELECTThe ch3 select attribute: 0 = 3b, 1 = 3a, 2 = transition (Integer).- See Also:
-
data
The scan line data. -
start
protected int startThe sample start and count values. -
count
protected int countThe sample start and count values.
-
-
Constructor Details
-
ScanLine
Creates a new dataset scan line using the specified index.
Note that this code is now using the java.nio package and individually allocated buffers for each scan line rather than OS memory mapped buffers. As such the start and count parameters are ignored when the scan line is read, and replaced with 0 and 2048 or 409 respectively. This should be remedied in a future release by removing the start and count parameters entirely.
- Parameters:
line
- the scan line index in the range [0..lines-1].start
- the starting sensor data sample.count
- the total number of sensor data samples. If the count is 0, no sensor data is read.- Throws:
IOException
- if an error occurred reading the file data, or if a missing scan line was requested. Generally, users should not invoke this method, but useNOAA1bReader.getScanLine(int, int, int)
instead.- See Also:
-
-
Method Details
-
getIndex
public int getIndex()Gets the scan line index, starting at 0. -
getRawData
Gets the raw scan line data. -
isSensorDataUsable
public abstract boolean isSensorDataUsable()Gets the sensor data usability flag. -
getCloud
public abstract byte[] getCloud()Gets the CLAVR cloud mask data.- Returns:
- an array of cloud mask data values.
-
getScanTime
public abstract long[] getScanTime()Gets the scan line time data.- Returns:
- an array of time data values in milliseconds.
-
getAttribute
Gets a scan line attribute.- Parameters:
index
- the attribute index.- Returns:
- the attribute as an object. Primitive types are wrapped in their corresponding objects.
-
getRawChannel
public int[] getRawChannel(int channel) Gets the uncalibrated sensor count data for the specified channel.- Parameters:
channel
- the channel to retrieve, [1..5].- Returns:
- an array of uncalibrated sample count values.
-
calibrateChannel
public abstract float[] calibrateChannel(int[] countData, int channel) Calibrates channel count data to scientific units. Visible channel data is calibrated to percent albedo and thermal data to degrees Kelvin.- Parameters:
countData
- the count data as an integer array.channel
- the channel to calibrate, [1..5].- Returns:
- an array of calibrated sample values.
- See Also:
-
getCalibration
protected abstract float[] getCalibration(int channel) Gets the set of line-specific calibration coefficients for the specified channel. The order of coefficients is not important, as the coefficients are simply used as a "calibration" signature for use in creating count versus calibrated value lookup tables.- Parameters:
channel
- the channel for calibration coefficients, [1..5].- Returns:
- an array of calibration coefficients.
-
getChannel
public float[] getChannel(int channel) Gets the calibrated sensor data for the specified channel. Visible channel data is calibrated to percent albedo and thermal data to degrees Kelvin.- Parameters:
channel
- the channel to retrieve, [1..5].- Returns:
- an array of calibrated sample values.
- See Also:
-