SeaDAS Banner Image

Output ASCII (out_ascii)

Description:  The Output ASCII function will allow outputting any combination of the following 6 variables:

to an ASCII text file, using the data associated with any loaded band or displayed window as input. Regions, lines, blotch and non-blotch areas may be specified. Many options are available including format specification, column title specification and ordering of output data (i.e., row major, column major order). Specifying a blotch or non_blotch area within a specified region is also allowed.

Sample output #1: multiple output variables in columns:
chlor_a    chlor_a_raw    Latitude   Longitude   Pixel   Line
0.101      -31899             24.187     -89.196      39      175
0.093      -31907             24.173     -89.093      40      175
0.096      -31904             24.158    -88.990       41      175

Sample output #2: single output variable, chlorophyll_a ,with default format 8(f10.3):
FORMAT = (8(F10.3))
chlor_a
     0.101     0.093     0.096     0.102     0.100     0.097     0.102     0.100
     0.102     0.094     0.093     0.094     0.090     0.091     0.100     0.102
     0.094     0.092     0.094     0.089     0.091     0.100     0.098     0.100
[Interactive Mode][Command Mode]


Command Mode:

Usage out_ascii, filename, fbuf=fbuf, band_no=band_no, vars=vars, region=region, /ll_flag, /line, blotch_col=blotch_col, titles=titles, format=format, rep_factor=rep_factor, /output_format, ord_major=ord_major, ord_row=ord_row, ord_col=ord_col, err=err

Examples:

1. Output all output variables for data loaded in band number 2 in the rectangular region defined by the two corner points [170.0 lon, -50.0 lat] and [180.0 lon, -40.0 lat].

pt1 = [170.0,-50.0] & pt2 = [180.0,-40.0]
out_ascii, band_no=2, region=[pt1,pt2], vars=[1,2,3,4,5,6], /ll_flag

2. Output latitude, longitude and geophysical values for all points in window #3 which are masked by graphics color 4.

out_ascii, fbuf=3, blotch_col=4, vars=[3,4,2]

3. Output latitude, longitude and geophysical values falling on the line defined by the two points [pixel 50, line 100] and [pixel 80, line 120]. Override the default format statement and column titles.

pt1 = [50,100] & pt2 = [80,120]
out_ascii, fbuf=3, vars=[3,4,2], /line, format='(F10.2, F10.2, F10.4)',region=[pt1,pt2],
titles=['Latitude','Longitude','Chorophyll_a']

Required Keywords:

Note:  Either fbuf or band_no are required inputs. The advantage of band_no is that it is not necessary to display the data in order to output it. The advantage of fbuf is that blotch or non-blotch specifications are allowed.
band_no The number of the loaded band to be output.
fbuf The number of the window which references the data to be output.

Optional Parameters and Keywords:
filename An output filename for your ASCII output file. One will be automatically of the form "<input_filename>_<product>.asc"
vars An array containing the list of output variables desired. If more than one variable is listed, then the output will appear in columns with the columns ordered as specified. (Default is 1, geophysical value only).
  • 1= raw data
  • 2= geophysical data
  • 3= latitude
  • 4= longitude
  • 5= pixel
  • 6= line
region An array of 4 items specifying the two points required to define a rectangular region, a line, or a single point: either [pix1, lin1, pix2, lin2] OR [lon1, lat1, lon2, lat2]. They can be specified in either pixel/line values (relative to 1) or in latitude/longitude values. If the region values are specified in latitude/longitude values then the /ll_flag keyword must be set. If not specified the default is the entire band. If region is specified without the /line or /ll_flag keywords, then the assumption is that the values denote a rectangular region in pixel/line values.
ll_flag A flag denoting that the region keyword is specified in latitude/longitude values instead of in pixel/line values. (0=latitude/longitude flag off, non-zero = latitude/longitude flag on)
line A flag specifiying to treat the region inputs as the input points describing 2 endpoints of a line. Output the data values along that line.
blotch_col The SeaDAS graphics color (1 to 7) to use as a blotch color. Output all values which lie underneath the specified blotch color. Use values -1 to -7 to specify outputting all points which are outside of the blotch color area. The fbuf keyword must be used in order to use the blotch_col keyword.
titles A string array containing the column titles to specify for your output ascii file. This will override the default column titles.
format A format specification for outputting your data. This will override the default format specification.
rep_factor A repeat factor to use in front of your format statement. (Default is 1).
output_format Include a line in the output ASCII file which contains the format statement used to write the data. (Default is 0, do not include the format statement).
ord_major
  • 0 = Row major order (default)
  • 1 = Column major order
ord_row
  • 0 = Write out rows top to bottom (default)
  • 1 = Write out rows bottom to top
ord_col
  • 0 = Write out columns left to right (default)
  • 1 = Write out columns right to left


Interactive Mode:


The Output ASCII File Widget can be selected from either the Functions->Output->Data->ASCII or from the window functions menu Functions->Output->ASCII.

Action Items:
Band No. or Window No. Specify whether you want to output ASCII data directly from any loaded band or from a displayed window. Specifying the Band No. will eliminate the need to display the data. However, if you wish to use the Blotch or Non-Blotch options, the data must first be displayed and the Window No. option must be specified.
ASCII Output Filename Output ascii filename. The default is of the form "<input filename>_<product>.asc".

Region of Interest Section: The general region of interest can denote the two corner points defining a rectangular area (default), the two points defining a line, or if both points are the same, a single point. If the intent is to interpret the two points as a line, then specify the line option in Data of Interest Within Region.
1st corner or 1st point The coordinate defined below will specify one corner of the rectangular area, one endpoint in defining a line, or a single point. Any of the values pixel, line, lat. or lon. can be modified by the user and will all update automatically.
Pixel The column or pixel number of the first coordinate, relative to 1 and relative to the lefthand side of the displayed image. Longitude will automatically update when this value is modified.
Line The row or line number of the first coordinate, relative to 1 and relative to the top row of the displayed image. Latitude will automatically update when this value is modified.
Lat. The latitude of the first coordinate. If modified, line will automatically update.
Lon. The longitude of the first coordinate. If modified, pixel will automatically update.
opp. corner or 2nd point (same as 1st corner or 1st point described above, except that it defines the 2nd coordinate).

Data of Interest Within Region Section: The data of interest within the general region of interest specified can be selected here. Data corresponding to a blotch area, non-blotch area or line can be specified here.
All Output all data within the selected ROI.
Blotch Output only the data corresponding to the selected blotch color within the selected ROI.
Non-Blotch Output only the data NOT corresponding to the selected blotch color within the selected ROI.
Line Output the line described by connecting the two points specified in the Region of Interest.
Blotch color Blotch color will only be available if the user is specifying a window number and the blotch or non-blotch entries.

Action Items:
Write File Output the ASCII file to Filename using the format set in the Setup Widget within the ROI specified above.
Setup Bring up the Output ASCII Setup Widget to modify output format defaults.
Help Display this help information in HTML viewer.
Quit Exit the Output ASCII Widget.


Output ASCII Setup Widget


Description:  The Output ASCII Setup Widget is brought up when the Setup button is pressed in the Output ASCII File Widget. It allows specification of the ASCII file output format including selecting among the 6 available output variables, specifying column number, data format and column title (optional) for each variable. In addition, a format repetition factor may be specified, whether or not to output column titles, the output format used in writing the data may be written to the ASCII file, and the output data order may be specified (i.e. row or column major order, etc.).
Add Column Variable to Output Press the button of each of the variables to be output to the ASCII file. Each item selected will be added to the Output Variable List in column order. The columns can be re-ordered by using the Move Item Up and Move Item Down buttons.
Raw Data The raw data values associated with the specified window.
GeoPhys Data The geophysical data values associated with the specified window.
Latitude The latitude for each data value.
Longitude The longitude for each data value.
Pixel The pixel or column number of the selected point. (Relative to 1 and relative to the left-hand side of the image).
Line The line or row number of the selected point. (Relative to 1 and relative to the top of the image).
Output Variable List The variables listed in the output variable list are selected for output to the ASCII output file. To add items, press the desired button in Add Column Variables to Output. The current item in the list will appear highlighted. The corresponding format and column title information for the current item will also appear in the Working Variable section. Clicking on an item in the list causes the working variable information to be updated. To modify this information, enter in new information and press the Update button.
Update Update the highlighted item in the list with the information entered in the Working Variable fields.
Move Item Up Move the highlighted item in the list up to the previous column number slot.
Move Item Down Move the highlighted item in the list, down to the next column number slot.
Delete Delete the highlighted item in the list.
Clear Clear all items from the list.
Working Variable The working variable section contains the information relating to the currently highlighted variable in the output list. This information can be modified and updated.
Format The format to be used for the current variable.
Column Title The column title to be used for the current variable. (Note: this will be ignored if Output Column Titles is set to No.)
Format Repetition Factor The format repetition factor to be appended to the final format statement. In general, a format repetition factor of 1 would be used in the case of outputting multiple variables and a repetition factor > 1 would be used for outputting single variable values. However this is not required.
Output Column Titles?
  • No - Do not write out column titles to the output ASCII file.
  • Yes - Write out column titles to the output ASCII file. (Default)
Output Format Statement?
 
  • No - Do not write out the format statement used in writing the data to the ASCII output file. (Default)
  • Yes - Write out the format statement used in writing the data to the ASCII output file using the syntax FORMAT = <format>.
  • Output Data Order This option only is in effect for rectangular ROI's.
    Major Order
    By row Output the selected data in row major order, i.e. row by row. (Default)
    By column Output the selected data in column major order, i.e. column by column.
    Row Order
    Top to bot. Output the rows from top to bottom. (Default)
    Bot. to top Output the rows from bottom to top.
    Col. Order
    L to R Output columns from left to right. (Default)
    R to L Output columns from right to left.
    Write File Write the ASCII output file in the format specified using the data from the specified ROI. This button performs the same function as the Write File button on the main ASCII Output Widget as is repeated here for convenience.
    Quit Exit the Output ASCII Setup Widget. All defaults selected will still be in effect until the main ASCII Output Widget is exited. This Setup WIdget can be exited and re-entered repeatedly without losing information, as long as the main ASCII Output WIdget remains open.


    Curator: OceanColor Webmaster

    Authorized by: gene carl feldman

    NASA logo

    Privacy Policy and Important Notices

    Updated: 15 December 2008