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


Converting a Single Scan from a Raw (.pep) File to an ASCII Text File using FTOOLS

We start FTOOLS as usual. As before, the raw data file consists of primary array header, a binary table extension header, and multiple rows of 6 column binary table data. What we want to do is read in a single row corresponding to a scan we are interested in using.

Let us say we are interested in scan number 800 taken of the star lambda Sco (which is star number 1). We first down-load the raw data file c001.pep from the archive. The FTOOLS command we want to use is fdump, but the default output format of this command is to list the contents of the different columns sequentially (ie. all of the wavelength information, then all of the fluxes, etc) while one usually wants to have the wavelength, net flux, etc on a single line. So what we do is set some of the flags to get a multi-column ascii table without header, column name, or row number information as the output using the command pset:

	>pset fdump
	Name of FITS file and [ext#] ():  
	Name of optional output file (STDOUT):  
	Names of columns ():  
	Lists of rows (-):  
	Define a new field separator (default is space) ():  
	Page width (80):  132
	Print header keywords? (yes): no
	Print data? (yes):  
	Print column names? (yes):  no
	Print column units? (yes):  no
	Print row numbers? (yes):  no
	Show scaled values? (yes):  
	Align columns with names? (yes):  
	Print every nth row (1):  
	Use TDISPn keywords? (no):  
	Display entire row at once? (no):  
	Page through output to terminal (yes):  
	Overwrite output file if exists? (no):  
	Be case sensitive about column names? (no):  
	More? (yes):  
	mode (ql):

We can now use the fdump command to create the ascii file for the scan we have selected (scan 800), being sure to specify that we want the TLAMBDA, TCOUNTS, and TBACK columns:

	>fdump
	Name of FITS file and [ext#][] c001.pep
	Name of optional output file[STDOUT] c001_0800.txt
	Names of columns[] -
	Lists of rows[-] 800

We then have an ascii file with three columns of data (the wavelength, raw counts, and particle background) that we can read into other plotting or analysis programs.


<- Back to Copernicus Data Formats


Example provided by jtl