[fitsbits] Windows FITS viewer / data extraction

William Pence pence at tetra.gsfc.nasa.gov
Mon Dec 18 13:09:35 EST 2000


George Dishman wrote:
> 
> I have FV installed and working and have exported some simple
> plots. The .ps file converts nicely to Acrobat pdf.
> 
> What I would really like to do is get the vector table
> into either Microsoft Excel or Access so that I can run
> some routines to look at systematic errors and generate
> composite curves by excluding extreme values. I have
> exported the base table to ASCII which I can then import
> but the export function is not available when viewing
> the vector table. Is there some way to get at this data?

We'll add this export function to the next release of fv.  In the meantime,
I can suggest 2 work arounds:

1)  Create a dummy FITS image (use 'New File' in fv) with a 'float' datatype
and size 182 x 5964 (the size of your vector table).  Then use the fv 'cut
and paste' buffer to copy the vector table to the image (email me off line
if you need further instructions).  Then you can export the image to a text
file.  It is rather unwieldy to deal with the whole table at once, so you
may prefer to work with a few rows at at time (e.g. copy and dump a 182 x 10
image).

2) You can easily extract a single 182-pixel vector spectrum from the FIRAS
table into a FITS image file using the 'fitscopy' program that is
distributed along with CFITSIO (or the fcopy program in ftools). For
example, the command

  fitscopy 'intable[1;spectrum(8)]' outimage.fits

will copy the 182-element vector in the 8th row of the SPECTRUM column into
the output image FITS file. You can then open this one-dimensional image
array with fv and export the data to an ASCII file.  This procedure only
handles 1 spectrum at a time, but the advantage is that the output ASCII
file is much simpler (a single column of numbers) and can more easily be
imported into a spreadsheet program.

-Bill Pence
-- 
____________________________________________________________________
Dr. William Pence                          pence at tetra.gsfc.nasa.gov
NASA/GSFC Code 662         HEASARC         +1-301-286-4599 (voice)     
Greenbelt MD 20771                         +1-301-286-1684 (fax)



More information about the fitsbits mailing list