spacer link to MAST page spacer logo image spacer
 
link to STScI page


Reading Copernicus Data Using
the IDL Astronomy User's Library Routines

The following examples show how to use three different FITS readers (available from the IDL Astronomy Users library) to read and plot counts versus wavelength.

1) READFITS and TBGET
written by J. Woffard & Wayne Landsman from the UIT project:
(Note: these first programs are not compatible with the raw Copernicus files)

Read a Coadded Scan File:

tab = readfits('c300-001.u2',h,/exten)
w = tbget(h,tab,'wavelength',0)
f = tbget(h,tab,'net_flux',0)
plot,w,f

Read all points from the Beta Ori Spectral Atlas File:

tab = readfits('betaori1.fts',h,/exten)
stpar,h,'naxis2',num
row = indgen(num)
w = tbget(h,tab,'wave',row)
f = tbget(h,tab,'counts',row)
plot,w,f
2) FXBOPEN and FXBREAD
written by Bill Thompson of the SOHO project:

Read the 5th Scan from the Raw File for Gamma Cass:

fxbopen,un,'c084.pep',5,h
fxbread,un,w,'tlambda',5
fxbread,un,f,'tcounts',5
plot,w,f

Another Example of Reading a Raw File Using FXBOPEN
Read a Coadded Scan:

fxbopen,un,'c300-001.u2',1,h
fxbread,un,w,'wavelength',1
fxbread,un,f,'net_flux',1
plot,w,f

Read the first 1000 points in the Beta Ori spectral atlas file:

fxbopen,un,'betaori1.fts',1,h
fxbread,un,w,'wave',[1,1000]
fxbread,un,f,'counts',[1,1000]
plot,w,f

3) MRDFITS
written by Tom McGlynn from HEASARC:

Read the 5th Scan from the Raw File for Gamma Cass:

res=mrdfits('c084.pep',1,h,range=[4,4])
plot,res.tlambda,res.tcounts

Coadded Scan:

res=mrdfits('c300-001.u2',1,h,range=1)
plot,res.wavelength,res.net_flux

Read the First 1000 points of the Beta Ori spectral atlas file:

res=mrdfits('betaori1.fts',1,h,range=[1000])
plot,res.wave,res.tcounts