rd_egse_hk_txt $SSW/trace/idl/info/rd_egse_hk_txt.pro
[Previous] [Next]
NAME:
	rd_egse_hk_txt
PURPOSE:
	Read the EGSE database definition files (ASCII) into structures
 CALLS: ***
	CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], FILE_EXIST [2], IDL_SPEED
	concat_dir [4], file_exist [1], file_exist [3], is_number [1], is_number [2]
	rd_tfile [1], rd_tfile [2]
 CALLED BY:
	gtt_mnem
HISTORY:
	Written 1998 by M.Morrison
     26-March-1998 - S.L.Freeland - look for SSW version of dbase file  
     12-May-  1998 - (FZ)         - Changed loop variables to long
	16-Jun-98 (MDM) - Corrected DSC hi subscripting (was getting lo)


rd_fdss $SSW/trace/idl/ops/rd_fdss.pro
[Previous] [Next]
NAME:
	rd_fdss
PURPOSE:
	To read the FDSS files and put the data into structures
SAMPLE CALLING SEQUENCE:
	out = rd_fdss(sttim, entim, type)
	out = rd_fdss('16-Feb-98 12:00', '17-Feb-98 12:00', "durevt")
	out = rd_fdss('16-Feb-98 12:00','17-Feb-98 12:00','viewpd', $
					/qprint,/timeline, mindur=10)
INPUTS:
	sttim	- The starting date/time of the period of interest
	enttim	- The ending date/time
	type	- "orbevt" for assending/descending node/times
		- "durevt" for SAA, high lat zone, 
		- "viewpd" for station pass view of S/C
		- "grndtrk" for spacecraft ground track
		- "station" for statio pass id
OPTIONAL KEYWORD INPUTS:
	qprint	- If set, then print out the results to the screen
		  and return the string printed output (not the structure)
	timeline- If set (and also qprint) print out in the timeline
		  format
	mindur	- If set, only list data which is greater than that
		  minimum duration
 CALLS: ***
	CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], DELVARX [1], DELVARX [2]
	DELVARX [3], DELVARX [4], IDL_SPEED, RD_FDSS_S1, TAG_EXIST [1], TAG_EXIST [2]
	UNIQ [1], UNIQ [2], UNIQ [3], concat_dir [4], data_type [1], data_type [2]
	delvarx [5], fmt_tim [1], fmt_tim [2], get_logenv [1], get_logenv [2]
	int2secarr [1], int2secarr [2], rd_tfiles, sel_filetimes [1], sel_filetimes [2]
	sel_timrange [1], sel_timrange [2]
 CALLED BY:
	gtt_orbit, pr_fdss, rd_station_plan, trace_orbevt
HISTORY:
	Written 26-Nov-97 by M.Morrison
	 2-Dec-97 (MDM) - Added MINDUR
	26-Feb-98 (MDM) - Added qspeed and qdebug
	26-Feb-98 (MDM) - Added QFORCE_RD and saving the last read
			  in a common block
	27-Feb-98 (MDM) - Patched common block usage
	15-Apr-98 (MDM) - Changed to not use "rd_fdss_???_fil" routines 
			  (reads raw FDSS files), rather read the new
			  database files.
			- Also does station plan files
	22-Nov-98 (RDB) - Made SSW complient


rd_fdss_durevt_fil $SSW/trace/idl/ops/rd_fdss_durevt_fil.pro
[Previous] [Next]
NAME:
       rd_fdss_durevt_fil
PURPOSE:
       Read DUREVT ASCII file and return durevt structure.
SAMPLE CALLING SEQUENCE:
       rd_fdss_durevt_fil('/tsw/dbase/ops/fdss/R98046DUREVT.00')
 CALLS: ***
	STR2ARR [1], STR2ARR [2], doytim2ints, rd_tfile [1], rd_tfile [2]
HISTORY:
       Written Nov-97 by F.Zele
	 9-Apr-98 (MDM) - Added variations of the section titles
			  of the FDSS file contents
	 9-Apr-98 (MDM) - Added "orig" output (original line)
	 6-Jul-98 (MDM) - Added protection for bad data file
	 4-Sep-98 (MDM) - Added Northern-Polar-Horn"
			- Added protection for new types of data


rd_fdss_grndtrk_fil $SSW/trace/idl/ops/rd_fdss_grndtrk_fil.pro
[Previous] [Next]
NAME:
       rd_fdss_grndtrk_fil
PURPOSE:
       Read GRNDTRK ASCII file and return grndtrk structure.
SAMPLE CALLING SEQUENCE:
       rd_fdss_grndtrk_fil('/tsw/dbase/ops/fdss/grndtrk/19980209.grndtrk')
 CALLS: ***
	IDL_SPEED, doytim2ints, rd_tfile [1], rd_tfile [2]
HISTORY:
       Written Feb-98 by F.Zele
	26-Feb-98 (MDM) - Made the output structure not be anonymous
			- Changed reading and processing to be vectorized


rd_fdss_orbevt_fil $SSW/trace/idl/ops/rd_fdss_orbevt_fil.pro
[Previous] [Next]
NAME:
       rd_fdss_orbevt_fil
PURPOSE:
       Read ORBEVT ASCII file and return orbevt structure.
SAMPLE CALLING SEQUENCE:
       rd_fdss_orbevt_fil('/tsw/dbase/ops/fdss/orbevt/19980215_0000.orbevt')
 CALLS: ***
	STR2ARR [1], STR2ARR [2], doytim2ints, rd_tfile [1], rd_tfile [2]
HISTORY:
       Written Nov-97 by F.Zele


rd_fdss_viewpd_fil $SSW/trace/idl/ops/rd_fdss_viewpd_fil.pro
[Previous] [Next]
NAME:
       rd_fdss_viewpd_fil
PURPOSE:
       Read VIEWPD ASCII file and return viewpd structure.
SAMPLE CALLING SEQUENCE:
       rd_fdss_viewpd_fil('/tsw/dbase/ops/fdss/R98046VIEWPD.00')
 CALLS: ***
	STR2ARR [1], STR2ARR [2], doytim2ints, rd_tfile [1], rd_tfile [2]
HISTORY:
       Written Nov-97 by F.Zele
	 9-Apr-98 (MDM) - Added logic to handle different stations


rd_hist_dbase [2] $SSW/trace/idl/egse/rd_hist_dbase.pro
[Previous] [Next]
NAME:
	rd_hist_dbase
PURPOSE:
	To read the history database definition file READ_HIST.DBS
SAMPLE CALLING SEQUENCE:
	rd_hist_dbase, ootc, blktc, lvt_param, lvt_tx, lvt_txs, ca, cas, $
		hk1, hk2, schk, pdde, pdco, pca, pcdi, infil=infil
	aa=convert_hk(/read,/force_rd)                  
 CALLS: ***
	RD_H_DBASE1, dec2sun [1], dec2sun [2], file_info2 [1], file_info2 [2]
	int2secarr [1], int2secarr [2], where_arr [1], where_arr [2]
 CALLED BY:
	convert_hk [1], convert_hk [2]
OPTIONAL KEYWORD INPUT:
	infil	- THe input file to read.
		  NOTE: When reading a .DBS file created on IRIX 4 systems,
		  the file name must have INSIM somewhere in the file name.
OUTPUT:
	ootc, blktc, lvt_param, lvt_tx, lvt_txs, ca, cas, $
		hk1, hk2, schk, pdde, pdco, pca, pcdi

	map2pack - Same length as LVT_PARAM and tells which packet the
		   mnemonic is present in.
HISTORY:
	Written Apr-94 by M.Morrison
	16-Jan-95 (MDM) - Added SCHK1, SCHK2, and SCHK4
			- Added MAP2PACK
	25-Jan-95 (MDM) - Added allowing exit when MSG_TYPE = 0
			- Print the number of bytes read
	14-Nov-95 (MDM) - Modified to handle the fact that under IRIX 5 the
			  data values that used to be written as FLOAT are
			  now written as DOUBLE.
			- Changed the default file name to READ_HIST.EOF
			  (used to be READ_HIST.DBS)
	16-Nov-95 (MDM) - Further patch to be able to read the new database
			  format (the offset values are 6 off)
	22-Feb-96 (MDM) - Patched to read the INSIM file properly (problem
			  with "pc_di" structure
	   Oct-96 (MDM) - Modified drastically to work with TRACE
			  and the new RTDB format
	 6-Mar-97 (MDM) - Changed the number of parameters for CALPOLY
			  from 4 to 6 for rtdb_v1.57.TRACE and
			  greater.
	 7-Mar-97 (MDM) - Added a "n_entry" field to CALPOLY for 
			  rtdb_v1.60.TRACE and greater
	19-May-97 (MDM) - Added expanded pd_tm defintion for
			  rtdb_v1.75.TRACE and greater
	26-Sep-97 (MDM) - Put in defintion of "dblim0" and "dbrel0"
			- Corrected "sock" structure defintion
	13-Oct-97 (MDM) - Added reading of two more HK structures
			  (for TRACE new S/C APIDs)


rd_hk [2] $SSW/trace/idl/ops/rd_hk.pro
[Previous] [Next]
NAME:
	rd_hk
PURPOSE:
	To directly read from the .mdihk files
SAMPLE CALLING SEQUENCE:
	out = rd_hk(infil)
	out = rd_hk(infil, head=head)
	out = rd_hk(infil, strec, enrec, head=head)
	dummy = rd_hk(infil, head=head, /only_head)
	head = rd_hk(infil, /only_head)
INPUT:
	infil
	strec
	enrec
OUTPUT:
	out	- The .time field is always in seconds past 1-Jan-70
		  (the epoch is adjusted for the different types)
OPTIONAL KEYWORD OUTPUT:
	head
 CALLS: ***
	BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], FILE_EXIST [2], FILE_STAT [1]
	FILE_STAT [2], GET_NBYTES, PMM [3], break_file [4], data_type [1], data_type [2]
	dec2sun [1], dec2sun [2], fid2ex [1], fid2ex [2], file_exist [1], file_exist [3]
	file_stat [3], int2secarr [1], int2secarr [2], pmm [1], pmm [2], rd_pkt_head [1]
	rd_pkt_head [2], str_replace [1], str_replace [2]
 CALLED BY:
	check_ql_after_lz, check_sci5k_trunc, dps_proc_lev0_hk, get1hk_info [1]
	get1hk_info [2], ip_que_dmpver, rd_sci5k, redo_disploi, redo_mon_sci5k
OPTIONAL KEYWORD INPUT:
	only_head - If set, then just read the header, and return it
		    as the function return.
	new	  - If set, then read the file as the new "REL" organization
		    which has slightly different structure, and has an
		    ASCII header.
	cleanup	  - If set, then check the data for only good data (ie: remove
		    data which is from when the DEP is off).
NOTE:
	The TIME field coming out of RD_HK is
		SECONDS PAST 1-Jan-70
	For all epochs (MDI/TRACE) and for both the packet times and map files
HISTORY:
	Written 23-May-94 by M.Morrison
	26-May-94 (MDM) - Revised to not have a HEADER structure in
			  the .mdihk file and to only have it in the
			  .mdihkx file
	31-May-94 (MDM) - Modified to figure the number of records properly
			  when the input file is .schk
	11-Jan-95 (MDM) - Modified to work on SCHK1,2,4
	23-Jan-95 (MDM) - Added /NEW option
			- Added /QDEBUG option
	 7-Jun-95 (MDM) - Added code to figure out and handle the New flight
			  HK database (fool it by creating a false roadmap)
	12-Jun-95 (MDM) - Added /SCI option and recognizing ".sci"
			- Removed code and started using RD_PKT_HEAD
			- Removed the hardwired step size
	29-Jun-95 (MDM) - Added /CLEANUP keyword
	18-Sep-95 (MDM) - Made the record numbers be integers
	19-Sep-95 (MDM) - Fixed size of MAP array output when using /NEW
			- Added /QSTOP
	29-Sep-95 (MDM) - Added debug statement
			- Put capability of reading .REL and .QKL
	31-Oct-95 (MDM) - Added /SIMPLE option to not apply any corrections
	16-Nov-95 (MDM) - Modified to allow a workaround where the expected
			  extensions were .schk1,2,3,4 and they were implemented
			  as sc1,2,3,4
	27-Nov-95 (MDM) - Added ".exp" file types (for emergency experiment
			  packets)
	28-Nov-95 (MDM) - Modified to allow reading of the EXPHK .REL file
	29-Nov-95 (MDM) - Modified CLEANUP option to be able to recognize bad
			  times
	16-Jan-96 (MDM) - Patched error which was ending the read before the
			  end of the file (the calculation of the number of
			  packets in the file based on the file size did not
			  work for the new file format)
	27-Mar-96 (MDM) - Patch to avoid bogus data - if the time tag is way
			  off (less than 0).
	10-Jun-96 (MDM) - Modified to "clean" sc1 packets properly
	 7-Oct-96 (MDM) - Added getenv('RD_HK_FIXED_OFFSETRD_HK_FIXED_OFFSET') option
			   *********************************
	 9-Oct-96 (MDM) - Added TRACE data products
	24-Oct-96 (MDM) - Added MDI_CDROM_HKDBASE option
                       - Added ability to have default step sizes
	12-Mar-97 (MDM) - Modification to the TRACE .hk4e packet length
	14-Mar-97 (MDM) - Added "sc0a" and "sc0b"
	25-Apr-97 (SDW) - Added "sc3" 
	25-Sep-97 (MDM) - Various modifications to work for TRACE DPS files
			  with "map" files (time index)
			   *********************************
	13-Jan-98 (MDM) - Modified to find relevant information from a file
			  rather than by CASE statement
	 5-Mar-98 (MDM) - Small mod
	14-Jul-98 (MDM) - Added the correction from the online version
			       2-Apr-98 (MDM) - Corrected error with reading map file
	 4-Jan-99 (MDM) - Commented out code which allowed for different
			  HK4E packet length prior to Mar-97


rd_pkt_head [2] $SSW/trace/ssw_contributed/rd_pkt_head.pro
[Previous] [Next]
NAME:
	rd_pkt_head
PURPOSE:
	To read the ASCII header at the front of the MDI HK, S/C HK,
	and SCI5K files.
INPUT:
	fil_lun	- The file name or logical unit to read
OUTPUT:
	head	- The string array header
	nbyte	- The number of bytes of the header
	info	- A structure with information of the header
 CALLS: ***
	FILE_EXIST [2], STR2ARR [1], STR2ARR [2], data_type [1], data_type [2]
	file_exist [1], file_exist [3], remtab [1], remtab [2], where_pattern [1]
	where_pattern [2]
 CALLED BY:
	rd_hk [1], rd_hk [2], reslot
HISTORY:
	Written 12-Jun-95 by M.Morrison
	29-Sep-95 (MDM) - Inserted check to not read past the end of the
			  file (for small files)
			- Added NUM_PACK to the output structure
	 6-Feb-97 (MDM) - Put in logic to recognize MDI CDROM HK files
	25-Sep-97 (MDM) - PUt in logic to recognize TRACE DPS HK files


rd_raw_station_plan $SSW/trace/idl/ops/rd_raw_station_plan.pro
[Previous] [Next]
NAME:
	rd_raw_station_plan
PURPOSE:
	Read the TRACE station pass plan files
SAMPLE CALLING SEQUENCE:
	out = rd_raw_station_plan(sttim, entim)
	out = rd_raw_station_plan('12-feb','14-feb', /qdeb)
	out = rd_raw_station_plan(/qdebug)
INPUT:
	sttim	- Start time of interest
	entim	- End time of interest
 CALLS: ***
	BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], RD_RAW_STATION_PLAN_S1
	STR2ARR [1], STR2ARR [2], anytim2ints [1], anytim2ints [2], break_file [4]
	doytim2ex [1], doytim2ex [2], file_list [1], file_list [2], fmt_tim [1]
	fmt_tim [2], gt_day [1], gt_day [2], gt_time [1], gt_time [2], int2secarr [1]
	int2secarr [2], is_number [1], is_number [2], prstr [1], prstr [2], rd_tfile [1]
	rd_tfile [2], rd_tfiles, sel_filetimes [1], sel_filetimes [2], sel_timrange [1]
	sel_timrange [2]
OPTIONAL KEYWORD INPUT:
	dir 	- The input directory.  Default is
		  /tsw/dbase/ops/stations
	all	- If set, don't do the filtering to return
		  only TRACE entries
	text	- If set, return the station pass info as
		  a text string array.  Pass the structure
		  out as optional keyword "struct"
	infil	- Pass the input file name instead of the 
		  start date/time
HISTORY:
	Written 6-Oct-97 by M.Morrison
	10-Mar-98 (MDM) - Revisited and fixed up
			- Strip out change log items
	12-Mar-98 (FZ)  - Added logic for year rollover within same file
	 1-Apr-98 (MDM) - Handle midnight roll-over problem
			- Added "text" output option
	 7-Apr-98 (MDM) - Changed EST/PST to EDT/PDT
	 9-Apr-98 (MDM) - Added INFIL option
	15-Apr-98 (MDM) - Added skipping one line of header because 
			  of several bad files
			- Renamed from RD_STATION_PLAN to RD_RAW_STATION_PLAN
	 5-Jan-99 (MDM) - Corrected hardwiring of station pass year
	 2-Jan-02 (MDM) - Changed extraction of year to be the first day/year in the
			  week range, not the last day/year.
TODO:
	Use predicted when no actual's available


rd_station_plan $SSW/trace/idl/ops/rd_station_plan.pro
[Previous] [Next]
NAME:
	rd_station_plan
PURPOSE:
	Read the TRACE station pass plan files
SAMPLE CALLING SEQUENCE:
	out = rd_station_plan(sttim, entim)
	out = rd_station_plan('12-feb','14-feb', /qdeb)
	out = rd_station_plan(/qdebug)
INPUT:
	sttim	- Start time of interest
	entim	- End time of interest
 CALLS: ***
	anytim2ints [1], anytim2ints [2], data_type [1], data_type [2], fmt_tim [1]
	fmt_tim [2], gt_day [1], gt_day [2], gt_time [1], gt_time [2], int2secarr [1]
	int2secarr [2], rd_fdss
OPTIONAL KEYWORD INPUT:
	all	- If set, don't do the filtering to return
		  only TRACE entries
	text	- If set, return the station pass info as
		  a text string array.  Pass the structure
		  out as optional keyword "struct"
HISTORY:
	Written 6-Oct-97 by M.Morrison
	10-Mar-98 (MDM) - Revisited and fixed up
			- Strip out change log items
	12-Mar-98 (FZ)  - Added logic for year rollover within same file
	 1-Apr-98 (MDM) - Handle midnight roll-over problem
			- Added "text" output option
	 7-Apr-98 (MDM) - Changed EST/PST to EDT/PDT
	 9-Apr-98 (MDM) - Added INFIL option
	15-Apr-98 (MDM) - Gutted and replaced with a call to RD_FDSS
			- Removed infil and indir options
       11-Nov-98 (CMH) - Changed time offsets to EST/PST from EDT/PDT
        9-Apr-99 (CMH) - Switched the times back
        3-Apr-00 (CMH) - Guess this is going to be a bi-annual thing for me .. switched to EDT
                          I'm sure there's a better way but haven't looked yet....
        1-Nov-00 (CMH) - Yep, here I am again, switching it back.
        5-Apr-01 (CMH) - and again...
       29-Oct-01 (CMH) - still switchin'
       15-Apr-02 (CMH) - switch to EDT/PDT
       06-Jan-03 (TEG) - switch to EST/PST
       08-Apr-03 (TEG) - switch to EDT/PDT
       ??-???-04 (TEG) - switch to EST/PST
       04-Apr-05 (TEG) - switch to EDT/PDT
       08-Nov-06 (DCM) - switch to EST/PST
TODO:
	Use predicted when no actual's available


rd_therm_rs232 $SSW/trace/idl/egse/rd_therm_rs232.pro
[Previous] [Next]
NAME:
	rd_therm_rs232
PURPOSE:
	Read the TRACE thermal test RS232 temperature file
SAMPLE CALLING SEQUENCE:
	rd_therm_rs232,'15-jan','17-jan', dattim, mat, dattim2
 CALLS: ***
	CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], DELVARX [1], DELVARX [2]
	DELVARX [3], DELVARX [4], DOY2UTC, FILE_EXIST [2], IDL_SPEED, UTPLOT [1], UTPLOT [2]
	UTPLOT [3], UTPLOT [4], UTPLOT [5], UTPLOT [6], anytim [1], anytim [2], anytim [3]
	anytim [4], anytim [5], anytim2ex [1], anytim2ex [2], anytim2ints [1]
	anytim2ints [2], concat_dir [4], data_type [1], data_type [2], delvarx [5]
	ex2fid [1], ex2fid [2], file_exist [1], file_exist [3], fmt_tim [1], fmt_tim [2]
	gt_day [1], gt_day [2], gt_time [1], gt_time [2], int2secarr [1], int2secarr [2]
	rd_tfile [1], rd_tfile [2], sel_timrange [1], sel_timrange [2], str_replace [1]
	str_replace [2]
 CALLED BY:
	disp_therm_rs232, plot_therm_rs232a, plot_therm_rs232c, pr_therm_rs232
HISTORY:
	Written 16-Jan-97 by M.Morrison
	11-Feb-97 (MDM) - Modified to handle 20 more channels
			  (maintaining backward compatability)
	15-Aug-97 (MDM) - Mod for S/C TB/TV.  More channels
			- Added qdebug


rd_tr_seq_head $SSW/trace/idl/ops/rd_tr_seq_head.pro
[Previous] [Next]
NAME:
	rd_tr_seq_head
PURPOSE:
	Read & parse the header of the TRACE sequence source code and
SAMPLE CALLING SEQUENCE:
	struct = rd_tr_seq_head(infil)
	help,/st,rd_tr_seq_head('/tsw/obs_dev/cjs/seq/CJS.qrmosaic.7panel.all.1.useq')
	help,/st,rd_tr_seq_head('/tsw/obs_dev/cjs/seq/CJS.scene.fulldisk.allpanel.all.useq')
INPUT:
	infil	- The input file to read
OUTPUT:
	Structure with the information in the tags
 CALLS: ***
	ARR2STR [1], Arr2Str [2], FILE_EXIST [2], STR2ARR [1], STR2ARR [2], file_exist [1]
	file_exist [3], rd_tfile [1], rd_tfile [2], remtab [1], remtab [2], strextract
	tbeep [1], tbeep [2], tbeep [3], wc_where [1], wc_where [2]
 CALLED BY:
	timeline, web_seq
HISTORY:
	Written 21-Jul-97 by M.Morrison


rd_trace_i0 [1] $SSW/trace/idl/egse/rd_trace_i0.pro
[Previous] [Next]
NAME:
	rd_trace_i0
PURPOSE:
	To read in TRACE image files
SAMPLE CALLING SEQUENCE:
	rd_trace_i0, file_arr, ss_files, bhead, img, fits_head
	rd_trace_i0, infil, -1, bhead, /nodata
INPUT:
	file_arr- Files to read
	ss_files- The files to read.  -1 means read all files in the list
OUTPUT:
	camera_head - 252 word camera header(s)
	img	- the image(s)
	bhead	- the binary fits extension header (has the dp header,
		  first camera line when available, ...)
	fits_head- The FITS header(s) for the file(s)
 CALLS: ***
	MRDFITS [1], MRDFITS [2], RFITS [1], RFITS [2], RFITS [3], STR2ARR [1], STR2ARR [2]
	data_type [1], data_type [2], str_copy_tags [1], str_copy_tags [2]
	str_copy_tags [3], str_copy_tags [4], tbeep [1], tbeep [2], tbeep [3]
	trace_rd_jpeg
 CALLED BY:
	emi_summary, focus_trace [1], focus_trace [2], mk_trace_i0, pr_tr_header
	tr_summary_head, trace_rd_jpeg, xdisp_trace [1], xdisp_trace [2], xrd_trace
OPTIONAL KEYWORD INPUT:
	nodecompress - If set, then don't do the decompression
HISTORY:
	Written Sep-96 by M.Morrison
	17-Oct-96 (MDM) - Put in protection for EOF problems
	 8-Nov-96 (MDM) - Added passing out the data product header 
			  and first enginerring line
			- Added more documentation header
			- Make the DP header be the 3rd parameter 
			  instead of the camera header
			- Added reading of the extended header of
			  the FITS file
	13-Nov-96 (MDM) - MOdified to return the extended header
			  structure as the 3rd parameter (instead
			  of the integer array DP header)
			- Implemented an option to not read the data
	14-Nov-96 (MDM) - Modified to make the output 3D array smaller
			  when it's required
	18-Nov-96 (MDM) - Corrected /nodata option from 14-Nov mods
	 1-Jul-97 (MDM) - Added FHEADS output
	 7-Jul-97 (MDM) - Corrected FHEADS option when /NODATA is used
	 1-Aug-97 (MDM) - Added JPEG decompression on the reads
			- Modified the header
	27-Aug-97 (MDM) - Added to not call TRACE_RD_JPEG when /NODATA
	29-Sep-97 (MDM) - Put in protection for bad file (header not
			  readable and gets into infinite loop)
	14-Oct-97 (MDM) - Added /NODECOMPRESS


rd_trace_i0 [2] $SSW/trace/idl/egse/rd_trace_i1.pro
[Previous] [Next]
NAME:
	rd_trace_i0
PURPOSE:
	To read in TRACE image files
SAMPLE CALLING SEQUENCE:
	rd_trace_i0, file_arr, ss_files, bhead, img, fits_head
	rd_trace_i0, infil, -1, bhead, /nodata
INPUT:
	file_arr- Files to read
	ss_files- The files to read.  -1 means read all files in the list
OUTPUT:
	camera_head - 252 word camera header(s)
	img	- the image(s)
	bhead	- the binary fits extension header (has the dp header,
		  first camera line when available, ...)
	fits_head- The FITS header(s) for the file(s)
 CALLS: ***
	FXREAD [1], FXREAD [2], MRDFITS [1], MRDFITS [2], RD_TRACE_I1, RFITS [1], RFITS [2]
	RFITS [3], STR2ARR [1], STR2ARR [2], data_type [1], data_type [2]
	str_copy_tags [1], str_copy_tags [2], str_copy_tags [3], str_copy_tags [4]
	trace_rd_jpeg
 CALLED BY:
	emi_summary, focus_trace [1], focus_trace [2], mk_trace_i0, pr_tr_header
	tr_summary_head, trace_rd_jpeg, xdisp_trace [1], xdisp_trace [2], xrd_trace
OPTIONAL KEYWORD INPUT:
	nodecompress - If set, then don't do the decompression
HISTORY:
	Written Sep-96 by M.Morrison
	17-Oct-96 (MDM) - Put in protection for EOF problems
	 8-Nov-96 (MDM) - Added passing out the data product header 
			  and first enginerring line
			- Added more documentation header
			- Make the DP header be the 3rd parameter 
			  instead of the camera header
			- Added reading of the extended header of
			  the FITS file
	13-Nov-96 (MDM) - MOdified to return the extended header
			  structure as the 3rd parameter (instead
			  of the integer array DP header)
			- Implemented an option to not read the data
	14-Nov-96 (MDM) - Modified to make the output 3D array smaller
			  when it's required
	18-Nov-96 (MDM) - Corrected /nodata option from 14-Nov mods
	 1-Jul-97 (MDM) - Added FHEADS output
	 7-Jul-97 (MDM) - Corrected FHEADS option when /NODATA is used
	 1-Aug-97 (MDM) - Added JPEG decompression on the reads
			- Modified the header
	27-Aug-97 (MDM) - Added to not call TRACE_RD_JPEG when /NODATA
	29-Sep-97 (MDM) - Put in protection for bad file (header not
			  readable and gets into infinite loop)
	14-Oct-97 (MDM) - Added /NODECOMPRESS


rdfdb $SSW/trace/idl/egse/rdfdb.pro
[Previous] [Next]
 CALLS: ***
	listfdb
HISTORY:
	Written Jul-97 by D.Mathur
	16-Oct-97 (MDM) - Changed open statement to use /GET_LUN
	 4-Dec-97 (MDM) - Changed to use /www instead of /hosts/pore1/...
	 6-Jan-98 (MDM) - Cleared the on_ioerror after doing the read


READ_ANALIST $SSW/trace/idl/info/read_analist.pro
[Previous] [Next]
 NAME:
       READ_ANALIST

 PURPOSE:
       Reads a list of files and frame indices created by the ANA Browser

 CATEGORY:

 CALLING SEQUENCE:
       read_analist,analist_filename,files, dsets  [,filestr]

 INPUTS:
	analist_filename	name of input list file

 OPTIONAL INPUT PARAMETERS:

 KEYWORD PARAMETERS:
   nopath - switch - if set, dont translate to local names

 OUTPUTS:
	files		list of files
	dsets		datasets within the files

 OPTIONAL OUTPUT PARAMETERS:
	filestr		structure containing file, dsets, week directory of
			the file, and on-line status of the files

 Calling Sequence:
    ...ana-browser - > direct selections to file

    IDL> read_analist, anafile, tracefiles, dsets [,filestr] ; ana->tracefiles
    IDL> read_trace, tracefiles, dsets, index [,data]        ; -> read_trace
    

 CALLS: ***
	BOX_MESSAGE, CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], FILE_EXIST [2]
	STR2ARR [1], STR2ARR [2], STRTAB2VECT, STR_SEP, UNIQ [1], UNIQ [2], UNIQ [3]
	concat_dir [4], data_chk [1], data_chk [2], file_exist [1], file_exist [3]
	gt_tagval [1], gt_tagval [2], mxf_read_header, rd_tfile [1], rd_tfile [2]
	str2cols [1], str2cols [2], strarrcompress, strsplit, totvect, trace_file2path
 MODIFICATION HISTORY:
       RDB     Sep-98  Written
       SLF     4-Sep-1998 - add call to 'trace_file2path'
                            make default filelist if not supplied
                            added quiet keyword (makes list 'transportable')
       SLF    14-May-1999 - optimize, make dset relative to filelist
                            [otherwise, cannot pass multi-files->read_trace]
                            (call some newer ssw sw)


read_trace $SSW/trace/idl/info/read_trace.pro
[Previous] [Next]
   Name:  read_trace

   Purpose: Read TRACE data image files, headers or headers & data

   Input Parameters:
      files - list of one or more files to read
      dsets - integer indices

   Output Parameters:
     index - vector of IDL structures with desired tags decoded
     data  - 2D/3D data (one image per dset request)
  
   Calling Sequence:
      read_trace, files, dsets, index, data
      read_trace,files,dsets,index,data,/millisec - times w/ms resolution
      read_trace, infil, [4,5,6], index, data, /nodata

   Keyword Parameters:
      taglist     - optional list of tags to include (pass to trace_dph2struct)
      alphabetize - switch, if set, structure tags are alpha (def=db order)
      catalog     - if set, taglist is CATALOG subset
      all         - if set, taglist is all in keyword dbase
      fileinfo    - if set, include some fields from PRIMARY header
                    (switch for defaults or comma delimited set of PH tags)
      loud        - if set, show some status
      original -  if set, force DPH decode (override FILE_TYPE)
      phead (Output) - vector of primary header structures (1 per file)
      outsize/mag_factor - rebin the images appropriately
      image - if set, use extended image keyword set (may become default)
      subfield - [x0, y0, nx, ny] - CAUTION - functional but index pointing
                 parameters not yet updated to reflect reality if used
                 (for speed/diagnostics - use 'tr_ext_subimg' for rigor) 
      quiet - if set, skip the 'jpeg decomp' messages ( 1 per image)
      flat_fits - if set, files are flat fits (default are mxf)
      millisec - if set, time tags have ms resolution  
      ms       - synonym for millisec 
  
 CALLED BY:
	READ_TRACE_FOV, TRACE_PREP, TR_DARK_SUB, TR_FLAT_SUB, euv_read, focus_trace_flt
	ssw_fov_context, trace_build_mosaic3, trace_cat2data, trace_get1www_image
	trace_last_movie [1], trace_last_movie [2], trace_last_movie [3]
	trace_make_tma, trace_make_tsma, trace_movie_context, trace_request_summary
	trace_special_movie [1], trace_special_movie [2], trace_special_movie [3]
	trace_special_movie2, trace_success_file, trace_write_genxcat, unpack_trace
	xdisp_trace3
HISTORY:
	Written 15-Jan-98 by S.Freeland/M.Morrison via call to S.L.F
                         routines mxf_xxx and trace_dph2struct
	30-Jan-98 (MDM) - Added "dph" to the arguments passed to dph2struct
        2-Mar-98 (SLF) - add TAGFILE keyword and function
                         made no data output parameter imply /NODATA
        4-Mar-98 (SLF) - add ALPHABETIZE keyword (pass to trace_dph2struct)
       10-Mar-98 (SLF) - add /CATALOG keyword (map via keywords_catalog.tdb)
       11-Mar-98 (SLF) - add /ROTATE keyword (pass to mxf_read_data)
                         add /MAG_FACTOR and OUTSIZE (pass to mxf_read_data)
       15-Mar-98 (SLF) - add DATATYPE (careful - override value in mxf structure)
                         and /INTEGER (DATATYPE=>2)
       19-Mar-98 (SLF) - pass /LOUD -> trace_dph2struct
       23-Mar-98 (SLF) - add FILE_TYPE check, add /ORIGINAL
       25-Mar-98 (SLF) - change file_type from extension header to primary
                         return PHEAD, add FILEINFO keyword and function
       24-apr-98 (SLF) - pointing info->SSW
       27-Apr-98 (SLF) - fix TAGFILE bug
        9-May-98 (SLF) - permit CRVAL w/o CRPIX (catalog, for example)
       11-Jun-98 (SLF) - permit flat FITS file reading (just call mreadfits)
       23-Sep-98 (SLF) - add /IMAGE keyword and tr_hsm_fix call
       19-Nov-98 (SLF) - derive CRPIX instead of CRVAL coords from xcen/ycen
        8-Dec-98 (SLF) - nCEN->CRPIXn for flat fits also (TMA, for example)
       20-jul-99 (SLF) - add SUBFIELD keyword (pass to mxf_read_data)
       15-Dec-99 (SLF) - for flat fits, passs NODATA to mreadfits or if no
                         no DATA output parameter requested
       21-Dec-99 (SLF) - remove hsm call (all tri on mag disk)
       10-Feb-2000 (SLF) - add /QUIET switch
       8-Nov-2000 (SLF) - add .pl to flatfits list, and keyword /FLAT_FITS
       8-Jul-2005 (SLF) - add /MS & /MILLISEC (future default?)
       2-aug-2005 (SLF) - repair a problem with WAVE_LEN
      31-aug-2005 (SLF) - fix 2-aug fix
  
 CALLS: ***
	ADD_TAG [1], ADD_TAG [2], ALL_VALS [1], ALL_VALS [2], BOX_MESSAGE, COMP_FITS_CRPIX
	CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], DELVARX [1], DELVARX [2]
	DELVARX [3], DELVARX [4], GET_DELIM, JOIN_STRUCT [1], JOIN_STRUCT [2]
	REP_TAG_VALUE, STR_LASTPOS [1], TAG_EXIST [1], TAG_EXIST [2], anytim [1]
	anytim [2], anytim [3], anytim [4], anytim [5], concat_dir [4], data_chk [1]
	data_chk [2], data_type [1], data_type [2], delvarx [5], gt_tagval [1]
	gt_tagval [2], gtt_info, mreadfits, mxf_dset_map, mxf_read_data, mxf_read_header
	required_tags, set_logenv [1], set_logenv [2], str_lastpos [2], str_subset
	strmids [1], strmids [2], trace_dph2struct [1], trace_dph2struct [2]
	where_arr [1], where_arr [2]
 Restrictions:
   INDEX parameters not yet updated when SUBFIELD specified - 


READ_TRACE_FOV $SSW/trace/idl/util/read_trace_fov.pro
[Previous] [Next]
 NAME:
       READ_TRACE_FOV
 PURPOSE:
       Reads selected sub-image, etc. from TRACE data files
 CATEGORY:
 CALLING SEQUENCE:
	read_trace_fov, files, ss, index, data
	read_trace_fov, struct, ss, index, data
 INPUTS:
       files or struct		either:
				1) list of files OR
				2) structure with catalog records
	ss			vector of images in files
 OPTIONAL INPUT PARAMETERS:
 KEYWORD INPUT PARAMETERS:
	sub_frame 		Array defining limits of subframe (x0,y0,x1,y1)
 OUTPUTS:
 OPTIONAL OUTPUT PARAMETERS:
 KEYWORD OUTPUT PARAMETERS:
 CALLS: ***
	BOX_CURSOR, BOX_MESSAGE, COMP_FITS_CRPIX, DATATYPE [1], DATATYPE [2], DATATYPE [3]
	PMM [3], STDEV, WDEF [1], WDEF [2], draw_boxcorn [1], draw_boxcorn [2], fmt_tim [1]
	fmt_tim [2], pmm [1], pmm [2], read_trace, trace_scale, trace_struct2filename
 COMMON BLOCKS:
 SIDE EFFECTS:
       Displays image
 RESTRICTIONS:
	All images should have the same dimensions
	Section between ;******* should be replaced by call to upgraded read_trace
 PROCEDURE:

 MODIFICATION HISTORY:
          Oct-98  RDB  Written
	03-Nov-98  rdb	Moved cadence stuff into trace_sswhere
	29-Jul-99  rdb	Corrected calculation of crpix1 and crpix2; test if different image dims. 


reslot $SSW/trace/idl/egse/reslot.pro
[Previous] [Next]
NAME:
	reslot
PURPOSE:
	Reslot the bad telemetry file
 CALLS: ***
	BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], CLOSEALL, CONCAT_DIR [1]
	CONCAT_DIR [2], CONCAT_DIR [3], FILE_EXIST [2], GET_NBYTES, STR_DIFF, UNSIGN
	anytim2ex [1], anytim2ex [2], anytim2ints [1], anytim2ints [2], break_file [4]
	concat_dir [4], ex2fid [1], ex2fid [2], file_exist [1], file_exist [3]
	fmt_tim [1], fmt_tim [2], int2secarr [1], int2secarr [2], rd_pkt_head [1]
	rd_pkt_head [2]
HISTORY:
	Written Apr-97 by M.Morrison
	21-Apr-97 (MDM) - Modified to not overwrite the packet time in the packet
			  (just derive the slot number) -- that mod was then removed
			- Modified to have two offsets possible
			- Added DAY check (that the derived time is within the day'
			- Put in checks for moving backwards in time 
			  (funny telemetry stream 18-Apr)
			  (two blocks of time where it jumps backwards and reruns a time span)
	12-May-97 (MDM) - Added MINREC for ignoring everything before MINREC
	19-May-97 (MDM) - DPS level zero slotting
			- Changed format of "day" variable
	30-May-97 (MDM) - 29-May reslot
	 6-Jun-97 (MDM) - Reslot the remade junk file directly from ChrisH