NAME: TABLE_APPEND PURPOSE: Routine to append STSDAS tables to create a single table. Input tables must all have identical columns. CALLING SEQUENCE: table_append,list,name INPUTS: list - string array listing the file names or a string scalar giving a file name template. name - output file name. SIDE EFFECTS: a new stsdas table is created with the specified name. OPERATIONAL NOTES: all input tables must have the same number of columns with the same names, datatypes, and column order. Header parameters are taken only from the first table. HISTORY: version 1 D. Lindler April 1989
(See /usr/local/idl/lib/zastron/sdas_table/table_append.pro)
NAME: TABLE_CALC PURPOSE: Adds a new table column from a expression using existing columns CALLING SEQUENCE: table_calc, table, expression, table_out INPUTS: table - input SDAS table table expression - expression for new or updated column values. Any legal IDL expression is valid where existing column names can be used as variables. User functions within the expression are allowed if the function is in an IDL library or previously compiled. OPTIONAL INPUT: table_out - output table name. If not supplied, the input name is used. OUTPUTS: a new SDAS table file is created. EXAMPLES: create a column WAVELENGTH in table TAB which is the average of the WLOW and WHIGH columns of table TAB. table_calc,'tab','WAVELENGTH=(WLOW+WHIGH)/2.0' add a column SINX which is the sin of column X to table JUNK. table_calc,'junk','SINX=sin(X)' add 10.0 to an existing column in table MYTAB. table_calc,'mytab','flux=flux+10.0' HISTORY version 1 D. Lindler November, 1989
(See /usr/local/idl/lib/zastron/sdas_table/table_calc.pro)
NAME: TABLE_DELETE PURPOSE: Delete specified rows from an STSDAS table CALLING SEQUENCE: table_delete, name, rows, [ outname ] INPUT: name - table name rows - row (scalar) or rows(vector) to delete from the table OPTIONAL OUTPUT: outname - output table name, if not supplied the input name is used HISTORY: version 1 D. Lindler April 1989
(See /usr/local/idl/lib/zastron/sdas_table/table_delete.pro)
NAME: TABLE_EXT PURPOSE: routine to extract columns from an stsdas table INPUTS: name - table name columns - table columns to extract. String with names separated by commas OUTPUTS: v1,...,v9 - values for the columns HISTORY: version 1 D. Lindler May 1989
(See /usr/local/idl/lib/zastron/sdas_table/table_ext.pro)
NAME: TABLE_HELP PURPOSE: Procedure to decribe an SDAS table file. CALLING SEQUENCE: table_help, tcb, header table_help, name INPUTS: tcb - table control block returned by TAB_READ or TAB_CREATE name - the table name OPTIONAL INPUTS: header - header array returned by TAB_READ. If supplied it will be printed, otherwise it won't. SIDE EFFECTS: text output as specified by !textout HISTORY: version 1 D. Lindler JAN 1988
(See /usr/local/idl/lib/zastron/sdas_table/table_help.pro)
NAME: TABLE_LIST PURPOSE: Procedure to list contents of an STSDAS table. This does not print the table in tabular form but instead for each row prints the column name followed by its value (one column per output line. CALLING SEQUENCE: table_list, name, row1, row2 INPUTS: name - table name OPTIONAL INPUTS: row1 - first row to list (default = first row) row2 - last row to list (default = last row) OUTPUT: text output as specified by !TEXTOUT HISTORY: version 1 D. Lindler May 1989
(See /usr/local/idl/lib/zastron/sdas_table/table_list.pro)
NAME: TABLE_PRINT PURPOSE: Routine to print an stsdas table. CALLING SEQUENCE: table_print, name, columns, row1, row2 INPUTS: name - table name OPTIONAL INPUTS: columns - vector of column numbers to be printed or a string with column names separated by commas. If not supplied or set to the null string, all columns are printed. row1 - first row to print. (default=0) row2 - last row to print. (default=last row in table) SIDE EFFECTS: text is printed as directed by !textout HISTORY: version 1, D. Lindler Apr 89
(See /usr/local/idl/lib/zastron/sdas_table/table_print.pro)
NAME: TABLE_SORT PURPOSE: Procedure to sort an STSDAS table by the specified column CALLING SEQUENCE: table_sort, name, column, [ name_out ] INPUTS: name - table name column - column to sort on OPTIONAL INPUTS: name_out - output table name. If not supplied, input name is used. HISTORY: version 1 D. Lindler MAY 1989
(See /usr/local/idl/lib/zastron/sdas_table/table_sort.pro)
NAME: TAB_ADDCOL PURPOSE: Procedure to add a new column to an existing stsdas table. CALLING SEQUENCE: tab_addcol, name, data, tcb, tab INPUTS: name - column name data - sample data of type to be written to the column. This parameter is only used to determine data type. INPUT/OUTPUTS: tcb - table control block tab - table array HISTORY: version 1 D. Lindler April 89
(See /usr/local/idl/lib/zastron/sdas_table/tab_addcol.pro)
NAME: TAB_COL PURPOSE: Procedure to extract column information from table control block CALLING SEQUENCE: tab_col, tcb, column, offset, width, datatype, name, units, format INPUTS: tcb - table control block returned by tab_open. column - column name (string) or column number OUTPUTS: offset - column offset bytes width - column width in bytes datatype - column data type: 6 - real*4 7 - real*8 4 - integer*4 1 - boolean 2 - character string name - column name units - column units format - format code SIDE EFFECTS: If the column is not found then !err is set to -1. Otherwise !err is set to the column number (starting at one). HISTORY: version 1 D. Lindler Jan 88 Converted to NEW IDL April 90
(See /usr/local/idl/lib/zastron/sdas_table/tab_col.pro)
NAME: TAB_CREATE PURPOSE: Procedure to create a new table file. CALLING SEQUENCE: tab_create, tcb, tab, maxcol, maxrows, row_len, tb_type OUTPUTS: tcb - table control block for reading from and writing to the file (see tab_open for description) tab - table array OPTIONAL INPUTS: maxcol - maximum allocated number of columns [default=10] maxrows - maximum allocated number of rows [default=100] row_len - row length in 2 byte units [default=2*maxcol] tb_type - table type 'row' or 'column' ordered SIDE EFFECTS: Table file is created and left opened to unit number tcb(0,0) for writing. HISTORY: version 1 D. Lindler Dec. 88
(See /usr/local/idl/lib/zastron/sdas_table/tab_create.pro)
NAME: TAB_DEL PURPOSE: Delete specified row(s) from an STSDAS table CALLING SEQUENCE: tab_del, tcb, tab, rows INPUT/OUTPUTS tcb - table control block tab - table array OPTIONAL INPUTS: rows - row (scalar) or rows(vector) to delete from the table If not supplied all rows are deleted. HISTORY: version 1 D. Lindler April 1989
(See /usr/local/idl/lib/zastron/sdas_table/tab_del.pro)
NAME: TAB_EXPAND PURPOSE: routine to expand the size of an SDAS table file. CALLING SEQUENCE: tab_expand, tcb, tab, maxcol, maxrow, rowlen INPUT/OUTPUT: tcb - table control block returned by routine TAB_READ or TAB_CREATE. tab - table array OPTIONAL INPUTS: maxcol - new maximum number of columns. maxrow - new maximum number of rows. rowlen - new maximum row length in 2 byte units. If maxcol, maxrow, or rowlen are supplied with values less than the previous maximums, the previous maximums are used. All values are defaulted to zero if not supplied. HISTORY: Version 1 D. Lindler Dec. 88
(See /usr/local/idl/lib/zastron/sdas_table/tab_expand.pro)
NAME: TAB_FORTOSPP PURPOSE: Procedure to convert a FORTRAN format to an SPP format specfication. CALLING SEQUENCE: sppformat, format, sppformat INPUTS: format - fortran format specification OUTPUTS: sppformat - sppformat specification HISTORY: version 1 D. Lindler Jan, 1989
(See /usr/local/idl/lib/zastron/sdas_table/tab_fortospp.pro)
NAME: TAB_MODCOL PURPOSE: Modify column description in a STSDAS table CALLING SEQUENCE: tab_modcol, tcb, column, units, format, newname INPUTS: tcb - table control block column - column name or number to be modified OPTIONAL INPUTS: units - string giving physical units for the column. If not supplied or set to the null string the units are not changed. format - print format (either fortran or SPP format) An spp format should be preceeded by a '%'. If not supplied or set to a null string, the print format for the column is not changed. newname - new name for the column. If not supplied or set to a null string, the name is not changed EXAMPLES: change the wavelength column to WAVE with a new format of 'F10.3' and columns units of ANGSTROMS. tab_modcol,tcb,'wavelength','ANGSTROMS','F10.3','WAVE' Change to print format of column 3 to spp format 20.10e tab_modcol,tcb,3,'','%20.10e' HISTORY: version 1 D. Lindler Apr 1989
(See /usr/local/idl/lib/zastron/sdas_table/tab_modcol.pro)
NAME: TAB_NULL PURPOSE: function to locate null values within a vector of values from an STSDAS table. CALLING SEQUENCE result = tab_null(values) INPUTS: values - data value(s) OUTPUTS: a boolean variable is returned with the same length as values. 1 indicates that the corresponding value was null OPERATIONAL NOTES: Boolean columns in an STSDAS table does not presently have the capability to flag null values. HISTORY: version 1 D. Lindler April 1989
(See /usr/local/idl/lib/zastron/sdas_table/tab_null.pro)
NAME: TAB_NULLROW PURPOSE: Insert null row(s) into a STSDAS table CALLING SEQUENCE: tab_nullrow, tcb, tab, [ row1, row2 ] INPUTS: tcb - table control block INPUT/OUTPUTS: tab - table array OPTIONAL INPUTS: row1 - first row number to insert nulls (default=0) row2 - last row number to insert nulls (default = last row) HISTORY: version 1, D. Lindler Apr 89
(See /usr/local/idl/lib/zastron/sdas_table/tab_nullrow.pro)
NAME: TAB_PRINT PURPOSE: Routine to print an stsdas table. CALLING SEQUENCE: tab_print, tcb, tab, columns, row1, row2 INPUTS: tcb - table control block returned by TAB_READ tab - table array read by TAB_READ OPTIONAL INPUTS: columns - vector of column numbers to be printed or a string with column names separated by commas. If not supplied or set to the null string, all columns are printed. row1 - first row to print. (default=0) row2 - last row to print. (default=last row in table) SIDE EFFECTS: text is printed as directed by !textout HISTORY: version 1, D. Lindler Apr 89 April 90 Converted to NEW IDL D. Lindler
(See /usr/local/idl/lib/zastron/sdas_table/tab_print.pro)
NAME: TAB_PUT PURPOSE: Procedure to place new values into a STSDAS table. CALLING SEQUENCE: tab_put, column, values, tcb, tab, row INPUTS: column - column name or number (if it is a new column then a column name must be specified) values - data values to add to the table INPUT/OUTPUTS: tcb - table control block tab - table array OPTIONAL INPUT: row - starting row to insert values HISTORY: version 1 D. Lindler April 1989
(See /usr/local/idl/lib/zastron/sdas_table/tab_put.pro)
NAME: TAB_READ PURPOSE: Procedure to read an SDAS table file CALLING SEQUENCE: tab_read,name,tcb,table,header INPUTS: name - name of the table file OUTPUTS: tcb - table control block Longword array of size 16 x maxcols+2 where maxcols is the maximum number of columns allocated for the table. tcb(*,0) contains: word 0 SPARE 1 number of user parameters 2 max. number of user par. allowed 3 number of rows in the table 4 number of allocated rows (for col. ordered tab) 5 number of columns defined 6 max number of columns 7 length of row used (in units of 2-bytes) 8 max row length (in units of 2-bytes) relevant only for row ordered tables. 9 table type (11 for row order, 12 for col. order) 15 update flag (0-readonly, 1-update) tcb(*,i) contains description of column i word 0 column number 1 offset for start of row in units of 2-bytes 2 width or column in 2-byte units 3 data type 6 = real*4 7 = real*8 4 = integer*4 1 = boolean*4 2 = character string 4-8 ascii column name up to 19 characters 9-13 column units (up to 19 characters) 14-15 format string tcb(*,max number of columns+1)= file name table - table array, Byte array row length (bytes) x nrows header - header parameters in form usable by sxpar, sxaddhist, sxaddpar, ect. HISTORY: Version 1 D. Lindler Jan 88 Converted to NEW IDL April 90 D. Lindler
(See /usr/local/idl/lib/zastron/sdas_table/tab_read.pro)
NAME: TAB_SIZE PURPOSE: Routine to extract the table size from a table control block CALLING SEQUENCE: tab_size, tcb, nrows, ncols, maxrows, maxcols, rowlen, max_rowlen INPUTS: tcb - table control block OUTPUTS: nrows - number of rows in the table ncols - number of columns in the table maxrows - number of rows allocated maxcols - number of columns allocated rowlen - length of the rows in bytes max_rowlen - allocated row length HISTORY: version 1 D. Lindler April 1989
(See /usr/local/idl/lib/zastron/sdas_table/tab_size.pro)
NAME: TAB_SORT PURPOSE: Procedure to sort table by the specified column CALLING SEQUENCE: tab_sort, column, tcb, tab INPUTS: column - column name or number to sort on tcb - table control block INPUT/OUTPUTS: tab - table array HISTORY: version 1 D. Lindler April 1989
(See /usr/local/idl/lib/zastron/sdas_table/tab_sort.pro)
NAME: TAB_SPPTOFOR PURPOSE: This procedure converts an spp format specification to a normal Fortran format specification. CALLING SEQUENCE: tab_spptofor, sppformat, format, width INPUTS: sppformat - spp format specification (without preceeding %) OUTPUTS: forformat - fortran format specification (string) width - field width (integer) HISTORY: version 1 D. Lindler Jan 1989
(See /usr/local/idl/lib/zastron/sdas_table/tab_spptofor.pro)
NAME: TAB_VAL PURPOSE: Routine to read a column from an SDAS table file CALLING SEQUENCE: values = tab_val( tcb, table, column, [ rows ] ) INPUTS: tcb - table control block returned by tab_val table - table array returned by tab_val column - scalar column name or number OPTIONAL INPUT: rows - scalar giving row number or vector giving rows. If not supplied all rows are returned. OUTPUT: the values for the specified column (and rows) is returned as the function value. If row is specified as a scalar (single row) then the result will be a scalar. HISTORY: version 1 D. Lindler Jan. 1988 Allow for a null column Landsman/Feggans April 1992
(See /usr/local/idl/lib/zastron/sdas_table/tab_val.pro)
NAME: TAB_WRITE PURPOSE: Routine to write an stsdas table to disk CALLING SEQUENCE: tab_write, name, tcb, tab, header INPUTS: name - file name (default extension = .tab) tcb - table control block tab - table array OPTIONAL INPUT: header - FITS header array HISTORY: version 1 D. Lindler April 1989
(See /usr/local/idl/lib/zastron/sdas_table/tab_write.pro)