Read fits table into a variable, which automatically becomes an array of structures:
IDL> x = mrdfits('mytable.fits',1)The array x has as many elements as the table has rows (e.g. 300, see below). Every array element x[i] is now a structure variable with tag names equal to the column names in the FITS table. You can see the structure by invoking e.g.
IDL> help, x X STRUCT = ->You can access every individual element in your IDL program as usual, e.g. print out the R_A value for object #154 in the table:Array[300] IDL> help, x, /structure ** Strcuture <82fe1dc>, 19 tags, length=136, data length=136, refs=1: NR LONG R_A DOUBLE DEC DOUBLE MC_Z FLOAT ...
IDL> print, x[154].r_a
In MIDAS just use INDISK/FITS and OUTDISK/FITS to convert between FITS and MIDAS tables, and then have all MIDAS tools available.
Back to COMBO-17 index page
Last update Feb 25, 2003, CW