Download   Help   Documents   Contact   Links   OceanColor   News   FAQ   Forum 

l1aextract_seawifs

Description:  This program is used to create a subscene file by extracting and/or subsampling from an original SeaWiFS L1A file. The output file is an HDF file and has the same format as the original L1A file. The interactive mode allows the user to display any band in original or subsampled resolution and to interactively change or move a box over the displayed image for subscene area selection. The command mode allows the user to specify either the pixel/line ranges, the lat/lon ranges, or the two lat/lon corner points for the subscene to be extracted.

[Command Mode][Interactive Mode]


Command Mode

Usage:  (extraction based on pixel/line ranges)
             l1aextract_seawifs, ifile, spix, epix, slin, elin, xsample, ysample, ofile, help=hlp

OR:      (extraction based on lat/lon ranges)
            l1aextract_seawifs, ifile, north, south, west, east, xsample, ysample, ofile, /ll_flag, help=hlp

OR:      (extraction based on two lat/lon corner points)
            l1aextract_seawifs, ifile, pnt1_lat, pnt1_lon, pnt2_lat, pnt2_lon, xsample, ysample, ofile, /pnt_flag, help=hlp

Mimimum Command:  l1aextract_seawifs, ifile, spix, epix, slin, elin, xsample, ysample, ofile

Arguments/Keywords:
ifile Input SeaWiFS L1A filename. It could be LAC, GAC or HRPT file. (Required)
spix Starting pixel in ifile for extracting. (Required)
epix Ending pixel in ifile for extracting. (Required)
slin Starting line in ifile for extracting. (Required)
elin Ending line in ifile for extracting. (Required)
north North latitude boundary that defines the area to be extracted. (See Note)
south South latitude boundary that defines the area to be extracted. (See Note)
west West longitude boundary that defines the area to be extracted. (See Note)
east East longitude boundary that defines the area to be extracted. (See Note)
pnt1_lat, pnt1_lon The lat/lon of the first point that will be converted to the pixel/line and used with the pixel/line converted with pnt2_lat and pnt2_lon to define the area to be extracted.
pnt2_lat, pnt2_lon The lat/lon of the second point that will be converted to the pixel/line and used with the pixel/line converted with pnt1_lat and pnt1_lon to define the area to be extracted.
xsample Pixel subsampling rate for the output over the area to be extracted. (Required)
ysample Line subsampling rate for the output over the area to be extracted. (Required)
ofile The output HDF file name for the subscene to be extracted. (Required)
ll_flag The keyword has to be set when the lat/lon ranges (north, south, west, east) are used to define the rectangular area to be extracted.
pnt_flag The keyword has to be set when the two lat/lon corner points (pnt1_lat, pnt1_lon, pnt2_lat, pnt2_lon) are used to define the rectangular area to be extracted.
help To list all arguments and keywords available for this program.

Note:  The ll_flag has to be set when the lat/lon ranges (north, south, west, east) are used. The program will convert lat/lon ranges to pixel/line ranges (spix, epix, slin, elin) before they are passed to the C program l1aextract_seawifs to do the subscene extraction. Basically, the north/south latitudes are used to decide the slin/elin and west/east longitudes are used to decide spix/epix. If you want to create a subscene based only on the range of scan lines (i.e. spix=1, epix=tot_pixel), you can set west=-180.o and east=180.0. In this case, the north/south latitudes will decide the slin/elin scan lines to be extracted.

Examples:

(1) l1aextract_seawifs, "$SDSDEMO/L1_lac2.hdf", 1, 1285, 20, 164, 1, 1, "ex_L1_lac2.hdf"



Interactive Mode:

[Main Widget] [File Selection] [LUT Manipulation] [Display Widget]

Main Widget:

The main widget can be accessed by selecting "l1aextract_seawifs" from the Display pull down menu in the SeaDAS main menu or from the command mode by typing: "l1aextract_seawifs".

Input/Display items:

Input file The input SeaWiFS L1A file. If the <Enter> key is entered in this field, the Object field will be updated with the 8 bands for the L1A file for selection to be displayed.
Select (Input file) To display the File Selection Widget for selecting the input SeaWiFS L1A. The file selected will be displayed in the Input File field and the product name, title, dimension, and tilt information from the file will be updated to File title, Object, Dimension, Aft tilt, Changing tilt, and Forward tilt fields.
Okay If the Okay button is pressed, the file in the Input file box will be selected. The product name, title, dimension, and tilt information from the input file will be updated to File title, Object, Dimension, Aft tilt, Changing tilt, and Forward tilt fields.
File title The title extracted from the global attribute in the Input file is displayed. Basically, it tells if the Input file is a L1A.
Object The SeaWiFS L1A band to be displayed for interactive extraction. This is a drop down list. To select a different band or product, press the list button and drag the mouse to the item to be displayed and then release the mouse button. The image displayed in the Display Widget will be updated with the new selected band or product.
Dimension The pixel/line number in the Input file. (Display only)
After tilt The range of scan lines that have aft tilt. (Display only)
Changing tilt The range of scan lines that the tilt is in a changing status. (Display only)
Forward tilt The range of scan lines that have forward tilt. (Display only)
Pixel/Line subsampling rate for display The pixel/line subsampling rate to be used for displaying the band or product for interactive subscene extraction. The Apply button has to be pressed to apply the change to the Display Widget.
Apply This button applies the changes in subsampling rate to the displayed image.
Box info
Top-Left Displays the top-left location of the subscene box inside the Display Widget. The X/Y location is relative to the display window. The pixel/line location is relative to the band or product from the input file. The Lat/Lon location is the geo-location of the corresponding pixel/line pixel.
Bottom-Right Displays the bottom-right location of the subscene box inside the Display Widget. The X/Y location is relative to the display window. The pixel/line location is relative to the band or product from the input file. The Lat/Lon location is the geo-location of the corresponding pixel/line pixel.
X/Y Size The subscene box size inside the Display Widget.
Pixel/Line Size  The subscene size relative to the input file covered by the subscene box inside the Display Widget. If the Pixel/Line subsampling rate is 1/1, then Pixel/Line Size are the same as X/Y Size.
Box Color The drop down button list that includes SeaDAS graphics palette (1-7) to be used for the subscene extraction box inside the Display Widget.
User defined box
1. Lat range (N/S) The north and south latitude range to be used with Lon range (W/E) to define the subscene box when Apply 1. Lat/Lon range button is pressed.
Lon range (W/E) The west and east longitude range to be used with Lat range (N/S) to define the subscene box when Apply 1. Lat/Lon range button is pressed.
2. Pixel range The pixel range to be used with Line range to define the subscene box when Apply 2. Pixel/Line range button is pressed.
Line range The line range to be used with Pixel range to define the subscene box when Apply 2. Pixel/Line range button is pressed.
3. Point 1 (lat/lon) The lat/lon of the first point to be used with the Point 2 lat/lon to define the subscene box when Apply 3. Two points button is pressed.
Point 2 (lat/lon) The lat/lon of the second point to be used with the Point 1 lat/lon to define the subscene box when Apply 3. Two points button is pressed.
Apply 1. Lat/Lon range To redraw the subscene box based on the lat/lon ranges specified in Lat range (N/S) and Lon range (W/E).
Apply 2. Pixel/Line range To redraw the subscene box based on the pixel/line ranges specified in Pixel range and Line range.
Apply 3. Two points To redraw the subscene box based on the two lat/lon corner points specified in Point 1 (lat/lon) and Point 2 (lat/lon).

Action items:
Quit To quit this program.
Load To read the band, title, dimension, and tilt information from the Input file and update to File title, Object, Dimension, Aft tilt, Changing tilt, and Forward tilt fields. You don't need to press the button if you press the <Enter> key in the Input file field, or use the Select button to select the input file.
Coastline To display the coastline on top of the image displayed inside the Display Widget.
Gridline To display the gridlines on top of the image displayed inside the Display Widget.
Clear Graphics  To clear the coastline and gridline graphics on top of the image displayed inside the Display Widget.
Load LUT To invoke the SeaDAS LUT Manipulation Widget.
Save To open the Extraction Saving Widget for extracting and generating the subscene output HDF file.


Display Widget:

The widget is displayed when the input file is loaded initially. It will then be updated, if a new band of product is selected in the Object field, or the pixel/line subsampling rate changed and the Apply button is pressed in the Main Widget.

Action Items:
Move box Drag the left mouse button inside the display window. All the Box info fields in the Main Widget will be updated when the box moves.
Change box size  Drag the right mouse button at the box corner or any side of the box. All the Box info fields in the Main Widget will be updated when the box size changed.


Extraction Saving Widget:

The widget is displayed when the Save button in the Main Widget is pressed. This widget displays the information for the subscene to be extracted from the input file.

Input Items:
Output file The output HDF file name for the subscene to be extracted.
Select To display the File Selection Widget for selecting the output HDF file to save the subscene to be extracted. The file selected will be displayed in the Output File field.
Pixel/Line subsampling rate for saving  The pixel/line subsampling rate to be applied to the pixel/line range of the input file to be extracted.
Starting/ending pixel The starting and ending pixel in the input file to be extracted.
Starting/ending line The starting and ending line in the input file to be extracted.
Okay To extract the subscene and write to the output file.
Quit To close the widget.


Curator: OceanColor Webmaster

Authorized by: gene carl feldman
Privacy Policy and Important Notices

Updated: 20 March 2008
NASA logo