rad_spoke $SSW/soho/lasco/idl/movie/rad_spoke.pro
[Previous] [Next]
 NAME:
       rad_spoke

 PURPOSE:
       This procedure produces radia-spoke image of a directily observed 
       solar image by LASCO

 CATEGORY:
       DATA ANALYSIS

 CALLING SEQUENCE:
       rad_spoke,image_in,hdr_in,image_rad=image_rad,hdr_rad=hdr_rad

 INPUTS:
       image_in: image with direct solar observation
     
 OPTIONAL INPUTS:
       x0, y0: the Sun's center in pixel unit of the image
       r1, r2: inner and outer radius in pixel unit of the image for transformation   
       th1,th2:starting and ending azimuth angle in degree for transformation
               0 refer to north pole and increase counter-clockwise
       n_r: number of samples in radius in spoken image
       n_th: number of samples in azimuth angle in spoken image
       
 KEYWORDS

 OUTPUTS:
       image_rad: radial-spoke image

 CALLS: ***
	REVERSE
 CALLED BY:
	WRUNMOVIE [2]
 RESTRICTIONS:

 PROCEDURE:
  
 EXAMPLE:
       rad_spoke,image_in,image_rad

 MODIFICATION HISTORY:
       Written by:     J. Zhang, Mar. 1, 2001


RASSTP $SSW/soho/sumer/idl/contrib/germerott/sumer_head/rasstp.pro
[Previous] [Next]
 PROJECT:
       SOHO - SUMER

 NAME:
       RASSTP()

 PURPOSE: 
       Return number of raster steps in SUMER Image Header

 CATEGORY:
       
 
 EXPLANATION:
       
 SYNTAX: 
       Result = rasstp()

 EXAMPLES:
       
 INPUTS:
       header - BYTARR(92,*) Image Header

 OPTIONAL INPUTS: 
       None.

 OUTPUTS:
       SUMER Rasterstep size

 OPTIONAL OUTPUTS:
       None.

 KEYWORDS: 
       None.

 COMMON:
       None.

 RESTRICTIONS: 
       SUMER Image Header as Byte Array (92,*)

 SIDE EFFECTS:
       None.

 HISTORY:
       Version 1, October 7, 1996, Dietmar Germerott, MAPE Lindau. Written
       Version 2, January 19, 2006, Dietmar Germerott, MPS Lindau
          return fix value because of signed int16   

 CONTACT:
       Dietmar Germerott, MAPE Lindau (germerott@linmpi.mpg.de)


RASTER_DUR $SSW/soho/cds/idl/sci/plan/tech/raster_dur.pro
[Previous] [Next]
 Project     : SOHO - CDS     
                   
 Name        : RASTER_DUR()
               
 Purpose     : Calculates duration of a CDS raster.
               
 Explanation : Simple calculations of the CDS raster duration based on
               exposure time and telemetry data size were not sufficiently
               accurate.  This routine simulates the CDHS data processing
               and thus models the on-board raster process.  Although
               it will always be impossible to predict the duration of a
               raster precisely, this routine mimics the CDHS behaviour 
               to give durations accurate to a few seconds.  See CDS
               Software Note #xx for further details.
               
 Use         : IDL> dur = raster_dur(ras_id=ras_id, ras_varn=ras_varn.....)
                              
 Inputs      : ras_id - Fundamental raster ID
               ras_varn - Raster variation ID
               
 Opt. Inputs : None
               
 Outputs     : None
               
 Opt. Outputs: pktb - array with packet buffer history.
               expst  - array with exposure intervals
               numexp - number of exposure in raster
               
 Keywords    : ulatency - overrides calculated latency
               buff     - sets initial pkt buffer contents
               erate    - sets engineering rate (default 8 secs)
               debug    - gives extra info
               tpi      - telemetry packet interval (msec)
               pr       - packet processing rate (pkts/sec)
               spare    - (output) spare inter-exposure telemetry time
               maxtick  - maximum number of packet time ticks
               uexp     - overide number of exposures
               et       - overide raster exposure time
               dump     - calculate data dump time only

 Calls       : ***
	Bell, CP_GET_ENTRY, DATATYPE [1], DATATYPE [2], DATATYPE [3], GET_DATAWIN
	GET_RASTER, GET_UTC, GET_VDS_STATE, GET_VDS_WIN, TRIM, UPDATE_DEX, UTC2TAI
 CALLED BY:
	TP_DRAW_RASDUR, TP_RECALC_DEW, TP_WRT_VRAST
 Common      : dur_common  - to minimise database calls
               
 Restrictions: None
               
 Side effects: None
               
 Category    : Engineering, planning
               
 Prev. Hist. : None

 Written     : C D Pike, 8-Nov-97
               
 Modified    : Modify to replace calc_ras_dur for time2dump.  CDP, 12-Dec-97
               Adjusted GIS latency.  CDP, 16-Dec-97

 Version     : Version 3, 16-Dec-97


RAW2BIN $SSW/soho/sumer/idl/contrib/germerott/rawproc/raw2bin.pro
[Previous] [Next]
 PROJECT:
       SOHO - SUMER

 NAME:
       RAW2BIN

 PURPOSE: 
       Raw Telemetry processing from SUMOP2

 CATEGORY:
       SUMER Data Processing
 
 EXPLANATION:
       This procedure processes the SC TM-Rawfiles of received SUMER TM
       stored on SUMOP2

 SYNTAX: 
       raw2bin, filenames or raw2bin,file='sumer_raw:sc*.*'       

 CALLED BY:
	GET_RAWDATA
 EXAMPLES:
       
 INPUTS:
       filenames - a list of files to process

 OPTIONAL INPUTS: 
       None.

 OUTPUTS:
       None.

 OPTIONAL OUTPUTS:
       filenames - returns the filelist found if the file_spec keyword was set

 KEYWORDS: 
       file_spec - file specification to look for building own filelist
            this keyword overwrites the filenames parameter
       no_images - don't write images to files
       no_hk248 - don't write HK248 records to file
       no_hk249 - don't write HK249 records to file
       no_hk250 - don't write HK250 records to file
       no_hk251 - don't write HK251 records to file
       no_hk252 - don't write HK252 records to file
       no_hk255 - don't write HK255 records to file
       nohkall  - don't write any Scienc HK
       noimage  - don't write images (for HK selection)

       file_spec - Filespecification for Raw Data
       qklfile   - indicate its a QKL file
       debug_mode- PRINT some more informatio during execution
       pcklevel
       saverst   - produced files are restore files
       out_path  - directory where to put files
       nolog_    - don't log the last processed file
       pcegse_   - source file is extracted from SUMER PC EGSE Recorder
 
 CALLS: ***
	BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], CHECK_ENOUGH, CONCAT_DIR [1]
	CONCAT_DIR [2], CONCAT_DIR [3], SUM_SAVE_IMAGE, TKI_IMAGE_FORM, UTC_HEAD
	WRITE_HKBYDATE, break_file [4], concat_dir [4]
 COMMON:
       None.

 RESTRICTIONS: 
       None.

 SIDE EFFECTS:
       None.

 HISTORY:
       Version 1, November 11, 1998, Dietmar Germerott, MPAE Lindau. Written
       Version 1.1, April 13, 1999, Dietmar Germerott, MPAE Lindau
          corrected Byte1 Images (swap)
       Version 1.2, April 12, 2002, Dietmar Germerott, MPAE Lindau
          added more features (save Restore files) and keywords
       Version 1.3, January 22, 2003, Dietmar Germerott, MPAE Lindau
          added support for PC EGSE Recorder extracted raw files   
       Version 1.4, April 19, 2006, Dietmar Germerott, MPAE Lindau
          corrected write of hk records for 251 and 248

 CONTACT:
       Dietmar Germerott, MPAE Lindau (germerott@linmpi.mpg.de)


raw_list2pixmap $SSW/soho/mdi/idl/ops/raw_list2pixmap.pro
[Previous] [Next]
NAME:
	raw_list2pixmap,
PURPOSE:
	To convert the raw list definition into pixel map format
SAMPLE CALLING SEQUENCE:
	raw_list2pixmap, '/mdisw/dbase/ops/lists/list_crop.fits'
	raw_list2pixmap, '/mdisw/dbase/ops/lists/list_limb.fits', /display
	raw_list2pixmap, '/mdisw/dbase/ops/lists/loi3b.fits', /display, output=out
	raw_list2pixmap, '/mdisw/dbase/ops/lists/list_vwbin.fits', /display, output=out
 CALLS: ***
	BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], CONCAT_DIR [1], CONCAT_DIR [2]
	CONCAT_DIR [3], FILE_EXIST [2], RFITS [1], RFITS [2], RFITS [3], SXADDPAR [1]
	SXADDPAR [2], SXADDPAR [3], UNSIGN, break_file [4], concat_dir [4], dec2sun [1]
	dec2sun [2], file_exist [1], file_exist [3], mk_fits_head [1], mk_fits_head [2]
	str_replace [1], str_replace [2], wrt_fits [1], wrt_fits [2]
HISTORY:
	Written 8-Sep-95 by M.Morrison
	Ver 2.0 12-Sep-95 (MDM) - Modified to save the data as LONARR rather than FLOAT
				  and did not save as 3-D since the weighting is all 100%
	Ver 3.0  6-Oct-95 (MDM) - Modified to work properly when the list does not have
				  any padding at the end
				- Modified to save number of raw CCD pixels put into
				  a single IRBIN bin
	Ver 3.1	 6-Nov-95 (MDM) - Added TABLE_START keyword input
	Ver 3.2	13-Mar-96 (MDM) - Modified to use an offset of 5 for VWBIN (instead of 6)
	Ver 4.0	23-May-96 (MDM) - Modified to make the normalization value take the
				  scale and shift factors (in addition to the number of
				  pixels
	Ver 4.1	 3-Nov-97 (MDM) - Added ROWLEN (used only in CROP)


RAY_NEIGHBOUR $SSW/soho/cds/idl/util/misc/ray_neighbour.pro
[Previous] [Next]
 Project     : SOHO - CDS

 Name        : RAY_NEIGHBOUR

 Purpose     : A routine called by COSMIC_RAY_ZAPPER.

 Category    : Analysis

 Explanation : On given a row vector V creates a vector U such that:

		U(i) = ( 1/2 * (V(i-1) + V(i+1))    i != 0 or n
	       	       (
	       	       ( V(i+1)			    i=0
              	       (
              	       ( V(i-1)			    i=n
		
		where n is the number of elements of V. By doing this one can
		then do a (V/U - 1) gt cutoff to check for the existence of
		cosmic rays (see COSMIC_RAY_ZAPPER).

		Obviously there's problems if any element of U is zero, so I
 		use ARB_AMOUNT to replace any zero values.

		For elements U(0) and U(n) there is only one neighbour and so
		it is this single value that goes into V.

		Data drop-outs cause problems. I assume they have the value
		-100 and set them to zero for calculation of V. Allowing for
		drop-outs slows the routine down, so I have the flag 
		ANY_DROPOUTS which tells the routine if there are drop-outs 
		in the data.

 Syntax      : RAY_NEIGHBOUR, V, U, ARB_AMOUNT, ANY_DROPOUTS

 Inputs      : V	= a vector of dimension greater than 2

		U	= a vector of same dimension as V

		ARB_AMOUNT	= set in COSMIC_RAY_ZAPPER and used to replace
				  any zero values in U

		ANY_DROPOUTS	= 0 if no drop-outs in the data array
				  1 if drop-outs in data array

 Calls       : None.
 CALLED BY:
	CLEAN_SPIKE, Y_CHECKER
 Restrictions: V must have dimension greater than 1
		
 Side effects: 

 Prev. Hist. : 

 History     : Version 1, 15/9/96 	PRY 

 Contact     : Peter Young,  Cambridge University


rd_asc $SSW/soho/lasco/idl/display/rd_asc.pro
[Previous] [Next]
 Project     : SOHO - LASCO

 Name        : 

 Purpose     : 

 Category    : 

 Explanation : 

 Syntax      : 

 CALLED BY:
	MKQUERY, WIMG_INFO3, WLISTER, WLOAD, WLOADC, WTIME_HEIGHT, wprint
 Examples    : 

 Inputs      : None

 Opt. Inputs : None

 Outputs     : None

 Opt. Outputs: None

 Keywords    : None

 CALLS: ***
	DATATYPE [1], DATATYPE [2], DATATYPE [3], PICKFILE
 Common      : 

 Restrictions:                                  

 Side effects: Not known

 History     : Version 1, 02-Sep-1995, B Podlipnik. Written

 Contact     : BP, borut@lasco1.mpae.gwdg.de


RD_ASCII [2] $SSW/soho/sumer/idl/newtki/st_sumer/rd_ascii2.pro
[Previous] [Next]
 Project     :	SOHO - CDS

 Name        :	RD_ASCII

 Purpose     : Read sequential ASCII file

 Use         : output = rd_ascii(file)

 Inputs      : file = string file name

 Opt. Inputs : None.

 Outputs     : output = string array with ASCII text

 Opt. Outputs: None.

 Keywords    : None.

 Calls       : ***
	RD_ASCII2
 CALLED BY:
	ADD_METHOD, CDS_AR_OBS, CDS_WAVE_CAT, CFITSLIST, CHECK_FTP, CHECK_KAP, FIX_IAP
	FTP__DEFINE, GET_PROC, GET_SOHO_ROLL, GET_SSWDB, GHOST_BUSTER, GIF2PICT, GIS_HV_CAL
	HESSI_MODEL_COUNTS, HSI_SPECTROSCOPY_LIST, IAP2STC, JSMOVIE, JSMOVIE2
	KAP_CONTENTS, LIST_PRINTER_UNIX, MAKE_GOES_RESP, MK_CDS_DBASE, MK_CDS_PLAN
	MK_HEAD_CAT, MK_SOHO, MK_STUDY, NEW_EFFECTIVE_AREAS_CODE, NEW_FIG4_INPUTS
	OBS__DEFINE, PICKFITS, PRINT_GEV, PRINT_NAR, RD_ASCII_BYTE, RD_CHIANTI, READ_EPHEM
	READ_SEQFILE, SFITSLIST, SHOW_CDHS, SMART_FTP, SOCK_SSW, SOHO_CAMPAIGN, STUDY_BRIEF
	UPDATE_CAMPAIGN, WIDG_HELP, WIN_SPAWN, WRITE_ANOMALY, XDIFF, XIAP, XRECORDER, db_gbo
	del_blank_lines, del_comment_lines, eis_import_study [1], eis_import_study [2]
	fit_model_components, hessi_setup_info, hessi_var, hsi_params_write_pro
	hsi_plot_flux, hsi_ui_img, hsi_ui_spec, ihy_db, imspec [10], imspec [11]
	imspec [12], imspec [13], imspec [14], imspec [15], imspec [16], imspec [17]
	imspec [18], imspec [19], imspec [1], imspec [20], imspec [21], imspec [22]
	imspec [23], imspec [24], imspec [25], imspec [26], imspec [27], imspec [28]
	imspec [29], imspec [2], imspec [30], imspec [31], imspec [32], imspec [33]
	imspec [34], imspec [35], imspec [36], imspec [3], imspec [4], imspec [5]
	imspec [6], imspec [7], imspec [8], imspec [9], ospex_params_write_pro, remove_w_c
	strip_crt, which_hessi_version
 Common      : None.

 Restrictions: None.

 Side effects: None.

 Category    : I/O

 Prev. Hist. : None.

 Written     :	Version 1.0, DMZ (ARC) August 22 1994

 Modified    : Version 1.1, DMZ (ARC/GSFC) October 29 1994
                  Fixed potential bug in irec
               Version 1.2, September 20, 1996, Liyun Wang, NASA/GSFC
                  Added ERROR keyword

 Version     : 1.2, September 20, 1996


RD_CATALOG $SSW/soho/lasco/idl/astrometry/ephemeris/rd_catalog.pro
[Previous] [Next]
 NAME:
      RD_CATALOG

 PURPOSE:
      Read star catalogs for any of the three LASCO coronagraphs.
 CATEGORY:
      
 CALLING SEQUENCE:
      rd_catalog,telescope,catalog

 INPUTS:
      telescope: string containing telescope name.

 KEYWORD PARAMETERS:
      None.

 OUTPUTS:
      catalog: structure containing fields in catalog file.

 CALLED BY:
	POINTING3, STARFIELD
 PROCEDURE:
      Straightforward.

 MODIFICATION HISTORY:
      Written by Simon Plunkett, April 1995.


rd_ccdh_fil $SSW/soho/mdi/idl/cal/rd_ccdh_fil.pro
[Previous] [Next]
NAME:
	rd_ccdh_fil
PURPOSE:
	To read the 1109 bytes of CCDH transfer frame file 
SAMPLE CALLING SEQUENCE:
	ccd_hdr = rd_ccdh_fil(infil, pkt_info=pkt_info, n=n)
	ccd_hdr = rd_ccdh_fil('/PDS0/D10230/lev0/ffffff02_01h/017191/0000.ccdh')
INPUT:
	infil	- The input file name
OPTIONAL KEYWORD OUTPUT:
	pkt_info- A structure with the packet information
OPTIONS
	ccd_hdr = rd_ccdh_fil(infil)
	print, ccd_hdr_info(ccd_hdr, /ccdtemp)
	print, ccd_hdr_info(ccd_hdr, /nwords)
 CALLS: ***
	FILE_EXIST [2], dec2sun [1], dec2sun [2], file_exist [1], file_exist [3]
HISTORY:
	Written 12-Apr-95 by M.Morrison


RD_CDS_POINT $SSW/soho/cds/idl/util/ops/planning/rd_cds_point.pro
[Previous] [Next]
 Project     : SOHO - CDS

 Name        : RD_CDS_POINT

 Purpose     : Read CDS pointings for specified times

 Category    : planning

 Explanation : Read planned or ASRUN database

 Syntax      : IDL> plans=rd_cds_point(tstart,tend)

 Inputs      : TSTART = plot start time [def=current date]

 Opt. Inputs : TEND = plot end time [def = 24 hour window]

 Outputs     : PLANS = plan structures stored as MAPS

 Keywords    : ASRUN = plot actual pointing based on CATALOG
               QUIET = switch off message outputs
               EXCLUDE = study acronyms to exclude, e.g [SYNOP, FULLCCD]
               DEF_EXCLUDE = exclude default studies (engineering, SYNOP)
               NOENG = exclude engineering studies
               ROTATE = solar rotate pointings to TIME
               TIME = time to rotate pointings to
               COUNT = # of plans found
               NEAREST = if set and only TSTART is given, return closest
               STUDY = study program (e.g. s22906r04)
                                                                        
 CALLS: ***
	ANYTIM2TAI, ANYTIM2UTC [1], ANYTIM2UTC [2], CDS_ASRUN_POINT, CDS_PLAN_POINT
	DATATYPE [1], DATATYPE [2], DATATYPE [3], DELVARX [1], DELVARX [2], DELVARX [3]
	DELVARX [4], DPRINT, DROT_MAP_FAST, EXIST, FIND_ZDBASE, GREP, MERGE_STRUCT, MKLOG
	SET_CDS_SDB, TAG_EXIST [1], TAG_EXIST [2], TRIM, delvarx [5], get_def_times
 CALLED BY:
	PLOT_CDS_POINT [1], PLOT_CDS_POINT [2]
 History     : Written,  20-May-1998,  D.M. Zarro.  
               Modified, 30-Nov-1999, Zarro (SM&A/GSFC) - added /NEAREST
               Modified, 23-Jul-2001,  D.M. Zarro (EITI/GSFC) - added STUDY

 Contact     : DZARRO@SOLAR.STANFORD.EDU


RD_CHIANTI $SSW/soho/cds/idl/util/misc/rd_chianti.pro
[Previous] [Next]
 Project     : SOHO - CDS     
                   
 Name        : RD_CHIANTI
               
 Purpose     : Read the CHIANTI line list 
               
 Explanation : The CHIANTI line list items are put into
               a strucure variable which returns all the information
               in line list.
               The returned structure contains the following tags:


               .wavelength   - Observed wavelength
               .intensity    - Observed intensity (erg/cm2/s/sr)
               .element      - Element
               .comment      - Comment '=' ???   
               .ion          - Ionization stage
               .tmax         - Tempertur of formation
               .conf         - Configuration (upper and lower level)
               .terms        - Terms (upper and lower level)
               .info         - Information block 
 
               Not that the .conf and .terms are 2-elements arrays
               containing both lower and upper levels.
               To extract the configuration of the lower level of
               line number i: low_lev(i)=cdslist.conf(i,0)

 Use         : RD_CHIANTI, list
    
 Inputs      : none
               
 Opt. Inputs : None.
               
 Outputs     : Returns a structure with the information in the line list
               
 Opt. Outputs: None.
               
 Keywords    : SUMER  - will read SUMER lise list rather than CDS one
               ASCII  - returns a string array rather than structure


 Calls       : ***
	CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], RD_ASCII [1], RD_ASCII [2]
	STR2ARR [1], STR2ARR [2], concat_dir [4]
 Common      : None.
               
 Restrictions: Needs $CDS_ATOMIC/chianti.dat
               
 Side effects: 
               
 Category    : CDS QL
               
 Prev. Hist. : None.

 Written     : P. Brekke, 19 February 1996 
               
 Modified    : Upper/lower configuration levels split into
               separate arrays                  P. Brekke, 30 January 1996
  
               Make it return some data.  CDP, 13-July-96
               Reworked for new line list.  CDP, 10-Oct-96

 Version     : Version 3, 10-Oct-96


rd_dpc_table $SSW/soho/mdi/idl/cal/rd_dpc_table.pro
[Previous] [Next]
NAME:
	rd_dpc_table
PURPOSE:
	To read a database file
SAMPLE CALLING SEQUENCE:
	rd_dpc_table, dpc_struct
	rd_dpc_table, /qwrite
 CALLS: ***
	CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], FILE_EXIST [2], concat_dir [4]
	file_exist [1], file_exist [3], file_info2 [1], file_info2 [2], int2secarr [1]
	int2secarr [2], rd_tfile [1], rd_tfile [2], restgen [1], restgen [2], savegen [1]
	savegen [2]
 CALLED BY:
	get_dpc_info
HISTORY:
	Written 29-Aug-96 by M.Morrison (stripped out of "get_dpc_info")


rd_exec_synop_index $SSW/soho/mdi/idl/ops/rd_exec_synop_index.pro
[Previous] [Next]
NAME:
	rd_exec_synop_index
PURPOSE:
	To read the executive synopsis index file into a structure
 CALLS: ***
	rd_tfile [1], rd_tfile [2], remtab [1], remtab [2], str2cols [1], str2cols [2]
HISTORY:
	Written Aug-96 by M.Morrison
	30-Oct-96 (MDM) - Added campaign number to the list
	 6-Mar-97 (MDM) - Modified to put the index.tab file in $MDI_CAL_INFO


RD_GEN [1] $SSW/soho/mdi/idl_old/gen/ys_util/rd_gen.pro
[Previous] [Next]
 NAME:
 	RD_GEN

 PURPOSE:
	Read SXT generic file and return contents in appropriate data
	structure.  

 CALLING SEQUENCE:
	RD_GEN, filename, data [,TEXT=TEXT, HEADER=HEADER]

 INPUTS:
	FILENAME - string containing generic file name

 OUTPUTS:
	DATA - structure containing contents of file
	       (one tag field per stored data structure)

 OPTIONAL KEYWORD PARAMETERS:
 	TEXT - Generic file text description
	HEADER - System imposed header (version/creattion date)

 COMMON BLOCKS;
	NONE

 CALLS: ***
	FMT_TAG [1], FMT_TAG [2], MAKE_STR [1], MAKE_STR [2], STR2ARR [1], STR2ARR [2]
 CALLED BY:
	INQ_GEN [1], INQ_GEN [2]
 MODIFICATION HISTORY:
	Version 1 - SLF, 3/5/91
			 21-dec-92 	; restore text as array if it
					; is delimited by wrt_gen del= '\\'
	


rd_hist_dbase [1] $SSW/soho/mdi/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
	28-Feb-97 (MDM) - Modified to work with a slightly modified PCDI
			  structure for EGSE 4.2 READ_HIST.DBS file
	25-Apr-97 (SDW) - Added "sc3" 
	 7-May-97 (MDM) - Changed how to recognize the different PCDI
			  structure for EGSE 4.2 reads


rd_hk [1] $SSW/soho/mdi/idl/egse/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)


RD_LAS_CAT_FITS $SSW/soho/lasco/idl/astrometry/ephemeris/rd_las_cat_fits.pro
[Previous] [Next]
 NAME:
      RD_LAS_CAT_FITS

 PURPOSE:
      Read new star catalogs LASCO coronagraphs C2 or C3.
 CATEGORY:
      
 CALLING SEQUENCE:
      rd_las_cat_fits,telescope,catalog

 INPUTS:
      telescope: string containing telescope name.

 KEYWORD PARAMETERS:
      None.

 OUTPUTS:
      catalog: structure containing fields in catalog file.

 CALLS: ***
	FXBCLOSE [1], FXBCLOSE [2], FXBOPEN [1], FXBOPEN [2], FXBOPEN [3], FXBREAD [1]
	FXBREAD [2], FXBREAD [3]
 PROCEDURE:
      Straightforward.

 MODIFICATION HISTORY:
      Written by Doug Biesecker, May 1999.
	011101, nbr - Check in to SCCS

 11/01/01 @(#)rd_las_cat_fits.pro	1.1	; LASCO NRL IDL Library


RD_LINE_LIST $SSW/soho/cds/idl/sci/plan/tech/rd_line_list.pro
[Previous] [Next]
 Project     : SOHO - CDS     
                   
 Name        : RD_LINE_LIST
               
 Purpose     : Read a CDS line list into the line editor.
               
 Explanation : Reads an ASCII  line list file.
               
 Use         : IDL> rd_line_list, in_file, title, desc, array
    
 Inputs      : in-file    -   the name of the file with the line list.
               array      -   array of line details, is blank on entry
                              but used for its dimensions

 Opt. Inputs : None
               
 Outputs     : title - the line list title
               desc  - the line list description
               array - an array of parameters ready for putting into the 
                       line table editor
               
 Opt. Outputs: None
               
 Keywords    : None

 Calls       : ***
	BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], Bell, REPCHAR, STR2ARR [1]
	STR2ARR [2], WAVE2PIX, WHICH_GIS_BAND, WHICH_NIS_BAND, break_file [4]
 CALLED BY:
	QL_RD_LLIST
 Restrictions: Really only useful within TPLAN
               
 Side effects: None
               
 Category    : Technical planning.
               
 Prev. Hist. :

 Written     : C D Pike, 14-May-1993
               
 Modified    : Rewrite of the original.  CDP, 23-Sep-94
               Use input array to set max number of lines allowed.  
                                                              CDP, 9-Nov-95

 Version     : Version 3, 9-Nov-95


rd_mapfile [1] $SSW/soho/mdi/idl_old/gen/ys_util/rd_mapfile.pro
[Previous] [Next]
   Name: rd_mapfile

   Purpose: read in a generic file containing path/filename map information
	     (ie. read files created by mk_mapfile.pro)

   Optional Keyword Paramters:
       infile 	- string containing generic file to read 
	          (default names are keyword dependent)
       sw 	- if set, file name = $DIR_GEN_SETUP/data/swmap.genx
       data	- if set, file name = $DIR_GEN_SETUP/data/datamap.genx

   Output Parameters:
       paths	- string array of pathnames
	files	- string array of files
	map	- path/file index 
	          (full name(n) = concat_dir(paths(map(n)),files(n))
    
 CALLS:


rd_mdi [2] $SSW/soho/mdi/idl/cal/rd_mdi.pro
[Previous] [Next]
   Name: rd_mdi

   Purpose: simple mdi front end to mreadfits

   Input Parameters:
      files - list of one or more mdi fits files

   Output Paramters:
      index - the structure equivilent header vector
      data  - optional output 2D or 3D data

   Calling Sequence:
     rd_mdi, filelist, index [,data ] [,outsize=outsize]

 CALLS: ***
	anytim [1], anytim [2], anytim [3], anytim [4], anytim [5], gt_tagval [1]
	gt_tagval [2], mdi_struct [1], mdi_struct [2], mdi_struct [3], mreadfits
 CALLED BY:
	mdi_write_genxcat
   History:
      7-April-1998 - S.L.Freeland - handle the large SOI versions
      24-April-1998 - Zarro, - added check for vector index


rd_obs4 $SSW/soho/mdi/idl/egse/rd_obs4.pro
[Previous] [Next]
NAME:
	rd_obs4
PURPOSE:
	To read the IP page dump data into arrays
SAMPLE CALLING SEQUENCE:
	rd_obs4, '/md82/log/sci160k/960402_172208', 533, 19, img0, h0
	rd_obs4, '/md82/log/sci160k/960402_172208', 535, 19, img0, h0, /qsummary
	rd_obs4, '/md82/log/sci160k/960402_172208', 538, 20, img0, h0, tit, img2, /qsummary
	for i=545,556 do rd_obs4, infil, i, 19+(i ge 550), /qsummary, hc=hc
DATA:
	At Frame 19, the following are downlinked
	        0       - Sa
	        1       - Sc
	        2       - Sd
	        5       - 1024x1024 vel
	        6       - 1024x1024 linedepth
	At Frame 20, the following are downlinked
	        3       - Si
	        5       - Cropped Vel           and SCI5K data products
	        6       - SCI5K data products
	        7       - Cropped continuum     and SCI5K data products
	        14      - Time Weighted average data buffers

	           File				Frame19		Frame20
	/md82/log/sci160k/960402_172208		533-537		538-544
	/md82/log/sci160k/960402_172208		545-549		550-556
	/md82/log/sci160k/960402_172208		557-561		562-568
 CALLS: ***
	ccd_hdr_info, dpc_img_summary, mk_dpc_image, read_mdi
HISTORY:
	Written 2-Apr-96 by M.Morrison
	 2-Apr-96 (MDM) - Corrected the label for page 3


rd_pkt_head [1] $SSW/soho/mdi/idl/egse/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_PLAN $SSW/soho/gen/idl/plan/science/rd_plan.pro
[Previous] [Next]
 Project     :	SOHO - CDS

 Name        :	RD_PLAN

 Purpose     :	Read a plan for a given date range.

 Explanation :	Extracts all the plan entries which intersect an
		input time range. Essentially a wrapper around the LIST routines
               written to speed things up by not re-reading what has
               already been read.

 Use         :	RD_PLAN,PLAN, START, END, NOBS=NOBS

 Inputs      :	START, END = The range of date/time values to use in searching
			     the database.  Can be in any standard time
			     format.

 Opt. Inputs :	None.

 Outputs     :	PLAN = A structure array

 Opt. Outputs:	SOBJ_LIST - A list of science objective found in returned 
                           plan entries
               SPEC_LIST - A list of science specification found in returned 
                           plan entries

 Keywords    :	FORCE= to force reading from DB
               NOBS = total # of planned observations found
               TYPE = 0,1,2,3 for DETAILS, FLAG, SCIENCE, and ALT SCIENCE  
               (default is to read DETAILS database)
               INST = instrument to read ['C' 'S']
               NOPOINT = do not get pointing info
               DAY = extra day to read on each side of START and END
               JUMP = number of days to jump before starting a fresh read [def=10]
               QUIET = turn off messages
               LIST = keep -LIST extension on returned structure type name
                      (def is to strip it off)

 Calls       : ***
	ANYTIM2TAI, ANYTIM2UTC [1], ANYTIM2UTC [2], CONCAT_STRUCT, DATATYPE [1]
	DATATYPE [2], DATATYPE [3], DELVARX [1], DELVARX [2], DELVARX [3], DELVARX [4]
	DPRINT, EXIST, GET_INSTRUMENT, GET_PLAN_DEF, GET_PLAN_FUNCT, GET_PLAN_ITIME
	GET_PLAN_TYPE, GET_SOHO_INST, GET_UNIQ_LIST, LIST_PLAN, LIST_SOHO_DET
	MK_PLAN_SORT, TAG_EXIST [1], TAG_EXIST [2], TAI2UTC, TRIM, UTC2TAI, WHICH_INST
	delvarx [5], get_plan_spec
 CALLED BY:
	CDS_PLAN_BRIEF, CDS_PLAN_POINT, MK_PLAN_CLONE, MK_PLAN_PLOT, MK_PLAN_READ
	MK_PLAN_WRITE
 Common      :	None.

 Restrictions:	None.

 Side effects:	modifies .SCI_SPEC field with .TITLE from GET_STUDY

 Category    :	Planning, Database.

 Prev. Hist. :	None.

 Written     :	Dominic Zarro (ARC),  18 September 1994

 Modified    : Liyun Wang, GSFC/ARC, May 24, 1995
               Added SOBJ_LIST and SPEC_LIST keywords


rd_rdb [2] $SSW/soho/mdi/idl_old/gen/util/rd_rdb.pro
[Previous] [Next]
NAME:
	rd_rdb
PURPOSE:
	To read an RDB file (text file with TAB delimiters).  Optionally
	put the information into a structure with tag names equal to the
	column label.
SAMPLE CALLING SEQUENCE:
	mat = rd_rdb('/data14/morrison/raw_hc_detune/400c3100_01h.28679/record.rdb')
	mat = rd_rdb(infil, 'DATAMEAN', timarr, data)
	mat = rd_rdb(infil, /struct)
	mat = rd_rdb(infil, item, timarr, data)
INPUT:
	infil	- The input file(s)
OPTIONAL INPUT:
	item	- The label which needs to be extracted into an array
OUTPUT:
	returns a 2-D string array of the RDB file contents.  OPtionally
		  return a structure
	timarr	- A time structure array (with .TIME and .DAY tags)
	data	- The values for "item"
 CALLS: ***
	MAKE_STR [1], MAKE_STR [2], anytim2ints [1], anytim2ints [2], data_type [1]
	data_type [2], rd_tfile [1], rd_tfile [2], str_replace [1], str_replace [2]
	where_arr [1], where_arr [2]
OPTIONAL KEYWORD INPUT:
	struct	- If set, then return a structure with tags equal to the
		  column labels.
HISTORY:
	Written 18-Jun-96 by M.Morrison
	12-Jul-96 (MDM) - Corrected structure option when input is an array
	18-Sep-96 (MDM) - Adjusted to allow for "#" in the field/tag names
			- Corrected for reading structures without "REF_T"
	 6-Nov-96 (MDM) - Added documentation information


RD_RESOURCE $SSW/soho/gen/idl/plan/science/rd_resource.pro
[Previous] [Next]
 Project     :	SOHO - CDS

 Name        :	RD_RESOURCE

 Purpose     :	Read a resource (MDI, DSN, COM times etc) for a given date range.

 Explanation :	A wrapper around the LIST routines written to speed things 
               up by not re-reading what has already been read.

 Use         :	RD_RESOURCE,RES, START, END, NRES=NRES

 Inputs      :	START, END = The range of date/time values to use in searching
			     the database.  Can be in any standard time
			     format.

 Opt. Inputs :	None.

 Outputs     :	RES = A structure array

 Opt. Outputs:	None.

 Keywords    :	FORCE= to force reading from DB
               NRES = total # of resource values found
               DAY = extra day to read on each side of START and END
               JUMP = number of days to jump before starting a fresh read [def=10]

 CALLS: ***
	ADD_TAG [1], ADD_TAG [2], ANYTIM2TAI, ANYTIM2UTC [1], ANYTIM2UTC [2]
	CONCAT_STRUCT, DATATYPE [1], DATATYPE [2], DATATYPE [3], DELVARX [1], DELVARX [2]
	DELVARX [3], DELVARX [4], DPRINT, EXIST, GET_PLAN_ITIME, GET_RES_NAME, LIST_RESOURCE
	MK_PLAN_SORT, TAG_EXIST [1], TAG_EXIST [2], TAI2UTC, UTC2TAI, delvarx [5]
 CALLED BY:
	MK_CDS_PLAN, MK_PLAN_PLOT, MK_PLAN_READ
 Common      :	None.

 Restrictions:	None.

 Side effects:	None.

 Category    :	Planning, Database.

 Prev. Hist. :	None.

 Written     :	Dominic Zarro (ARC),  8 May 1995


rd_sci5k $SSW/soho/mdi/idl/egse/rd_sci5k.pro
[Previous] [Next]
NAME:
	rd_sci5k
PURPOSE:
	To read records of SCI5K data
SAMPLE CALLING SEQUENCE:
	recs = rd_sci5k(sttim, entim)
 CALLS: ***
	CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], anytim2ex [1], anytim2ex [2]
	concat_dir [4], data_type [1], data_type [2], ex2fid [1], ex2fid [2], fmt_tim [1]
	fmt_tim [2], gt_day [1], gt_day [2], gt_time [1], gt_time [2], rd_hk [1], rd_hk [2]
	str_concat [1], str_concat [2]
HISTORY:
	Written 12-Sep-96 by M.Morrison


RD_SERTS $SSW/soho/cds/idl/util/misc/rd_serts.pro
[Previous] [Next]
 Project     : SOHO - CDS     
                   
 Name        : RD_SERTS
               
 Purpose     : Read the SERTS Active Region line list 
               
 Explanation : The Active Region SERTS line list items are put into
               a strucure variable which returns all the information
               in line list.
               The returned structure contains the following tags:


               .list - Table header info
               .cent - Centroid pixel
               .wavelength   - Observed wavelength
               .wavsigm      - Wavelength sigma
               .intensity    - Observed intensity (erg/cm2/s/sr)
               .int_sig      - Intensity sigma
               .FWHM         - FWHM
               .FWHMs        - FWHM sigma
               .fit          - 
               .behr_wav     - Published wavelength - Behr
               .kelly_wav    - Published wavelength - Kelly
               .dere_wav     - Published wavelength - Dere
               .blend        - Blend flag
               .element      - Element
               .ion          - Ionization stage
               .tmax         - Tempertur of formation
               .ord          - Spectral order
               .seq          - Sequence
               .XX           - ID code (see tag .INFO for references) 
               .IES          - Isoelectronic Sequence
               .TM           - Transition number from Mewe 
               .conf         - Configuration (upper and lower level)
               .terms        - Terms (upper and lower level)
               .info         - Information block at the end of SERTS table
 
               Not that the .conf and .terms are 2-elements arrays
               containing both lower and upper levels.
               To extract the configuration of the lower level of
               line number i: low_lev(i)=sertslist.conf(i,0)

 Use         : RD_SERTS_LINES, serts_list
    
 Inputs      : none
               
 Opt. Inputs : None.
               
 Outputs     : Returns a structure with the information in the line list
               
 Opt. Outputs: None.
               
 Keywords    : None.

 Calls       : ***
	CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], ROMAN_LITERAL, STR2ARR [1]
	STR2ARR [2], concat_dir [4]
 CALLED BY:
	PICK_LINE
 Common      : None.
               
 Restrictions: Needs $CDS_ATOMIC/serts_cat89.wave
               
 Side effects: 
               
 Category    : CDS QL
               
 Prev. Hist. : None.

 Written     : P. Brekke, 22 January 1996 
               
 Modified    : Upper/lower configuration levels split into
               seperate arrays                  P. Brekke, 30 January 1996

 Version     : Version 1.1, 30-January-1996


rd_so_at_ftr $SSW/soho/mdi/idl/ops/rd_so_at_ftr.pro
[Previous] [Next]
NAME:
	rd_so_at_ftr
PURPOSE:
	Read the SOHO "FTR" attitude data file.  It has pitch, yaw and roll
	with 8 samples per second
SAMPLE CALLING SEQUENCE:
	out = rd_so_at_ftr('18-Jan-96 2:50', '18-jan-96 3:00', /qplot)
INPUT:
	sttim	- Starting time
	entim	- Ending time (don't span more than a few hours)
 CALLS: ***
	UTPLOT [1], UTPLOT [2], UTPLOT [3], UTPLOT [4], UTPLOT [5], UTPLOT [6]
	anytim2ex [1], anytim2ex [2], anytim2ints [1], anytim2ints [2], doy2date [1]
	doy2date [2], ex2fid [1], ex2fid [2], file_list [1], file_list [2], gt_day [1]
	gt_day [2], gt_time [1], gt_time [2], pprint [1], pprint [2]
OPTIONAL KEYWORD INPUT:
	qplot	- If set, then plot the data
HISTORY:
	Written Mar-96 by M.Morrison
	 2-May-96 (MDM) - Added header and put on-line.


rd_sumer [1] $SSW/soho/sumer/idl/atest/rd_sumer.pro
[Previous] [Next]
 NAME:

 rd_sumer

 PURPOSE:

 To read data and headers from SOHO/SUMER fits files including binary
 table extensions. Files which have created using wrt_sumer and have
 the extension '.genx' may also be read with rd_sumer.

 CATEGORY:

 Data retrieval.

 CALLING SEQUENCE:

 rd_sumer,filename,/query
 rd_sumer,filename,index,/nodata
 rd_sumer,filename,index,data
 rd_sumer,filename,index,data,data_cols=data_cols
 
 INPUTS:

 filename: The filename of the fits file from which data is to be
           read.

 OPTIONAL INPUTS:

 data_cols: The column numbers of the data columns to be returned in
            the data structure. The data_cols keyword has no affect
            when reading '.genx' files.
       
 KEYWORD PARAMETERS:

 query: Prints information on the contents of the file to the screen.
 compressed: checks for compressed files with .Z or .gz ext (Unix only)

 nodata: No data is returned, only the index structure.

 OUTPUTS:

 data: A structure which contains data present in the fits file. The
       default is to return all of the data. Subsets can be returned
       using the optional data_cols keyword.
 
 index: A structure which contains information about the data.

 OPTIONAL OUTPUTS:

 None.

 CALLS: ***
	DESTRING, FIND_COMPRESSED, FXBCLOSE [1], FXBCLOSE [2], FXBFIND [1], FXBFIND [2]
	FXBOPEN [1], FXBOPEN [2], FXBOPEN [3], FXBREAD [1], FXBREAD [2], FXBREAD [3]
	FXPAR [1], FXPAR [2], HEADFITS [1], HEADFITS [2], HEADFITS [3], MAKE_STR [1]
	MAKE_STR [2], RD_GENX, UNIQ [1], UNIQ [2], UNIQ [3], mk_query [1], mk_query [2]
	rd_sumer_genx, sgt_file_type, str_replace [1], str_replace [2]
 CALLED BY:
	GET_SUMER_FLAT, PICKFITS, SUMER_CALIB, mk_query_genx, mk_sumer_dbase_ff
	sa_gt_specrange, sgt_column, sgt_exposure, smk_atlas, sumer_ffdb
 COMMON BLOCKS:

 Uses the Yohkoh routines make_str and str_merge to assure unique
 structure names. 

 SIDE EFFECTS:

 None?

 RESTRICTIONS:

 This routine has not been thoroughly tested and may crash at any time!

 PROCEDURE:

 The routine calls mk_query to obtain information about the data
 stored in the FITS file. This information is used to dynamically
 create index and data structures. The tag names for the data
 structure are derived from the header keyword TTYPE. The index
 structure is based on the information stored in the primary and
 binary header files as well as in the data columns.

 For '.genx' files, the index and data structures are read using
 rd_genx.

 EXAMPLE:

 This file has six columns of data stored in two binary extension
 tables. Note that the data columns in the different binary extension
 tables have the same names but different dimensions.

 IDL> filename = 'sum_960604_060805.fits'
 IDL> rd_sumer,filename,/query
 File: sum_960604_060805.fits
 C      Name    Dimensions    Wmin    Wmax     Xmin     Xmax     Ymin     Ymax
 1 W_1533.43   (25,360,26) 1532.90 1533.96   230.25   531.31  -670.88  -670.88
 2 W_1550.77   (25,360,26) 1550.25 1551.29   230.25   531.31  -670.88  -670.88
 3 W_1548.19   (25,360,26) 1547.67 1548.71   230.25   531.31  -670.88  -670.88
 4 W_1533.43   (25,360,13) 1532.90 1533.96   389.81   534.38  -670.88  -670.88
 5 W_1550.77   (25,360,13) 1550.25 1551.29   389.81   534.38  -670.88  -670.88
 6 W_1548.19   (25,360,13) 1547.67 1548.71     0.00   534.38  -670.88     0.00
 IDL> rd_sumer,filename,index,data
 IDL> help,/str,data
 ** Structure MS_206275602001, 6 tags, length=4212000:
    W_1533_43_1     LONG      Array(25, 360, 26)
    W_1550_77_1     LONG      Array(25, 360, 26)
    W_1548_19_1     LONG      Array(25, 360, 26)
    W_1533_43_2     LONG      Array(25, 360, 13)
    W_1550_77_2     LONG      Array(25, 360, 13)
    W_1548_19_2     LONG      Array(25, 360, 13)
 IDL> help,/str,index
 ** Structure <2d5d48>, 7 tags, length=4432, refs=1:
    W_1533_43_1     STRUCT    -> <Anonymous> Array(1)
    W_1550_77_1     STRUCT    -> <Anonymous> Array(1)
    W_1548_19_1     STRUCT    -> <Anonymous> Array(1)
    W_1533_43_2     STRUCT    -> <Anonymous> Array(1)
    W_1550_77_2     STRUCT    -> <Anonymous> Array(1)
    W_1548_19_2     STRUCT    -> <Anonymous> Array(1)
    GEN             STRUCT    -> <Anonymous> Array(1)
 IDL> help,/str,index.(0)
 ** Structure <2cd5c8>, 9 tags, length=896, refs=4:
    NUM_BTE         INT              1
    REFPIX          FLOAT     Array(3)
    REFVAL          FLOAT     Array(3)
    DELTA           FLOAT     Array(3)
    DIMS            INT       Array(3)
    DESC            STRING    Array(3)
    UNITS           STRING    Array(3)
    DET_X           INT              0
    DET_Y           INT              0
    SPECTRUM        STRUCT    -> <Anonymous> Array(26)
 IDL> help,/str,index.(0).spectrum
 ** Structure <2b3fb0>, 5 tags, length=32, refs=3:
    SUM_STATUS      BYTE      Array(5)
    DET_TIME        DOUBLE           0.0000000
    EXPTIME         FLOAT           25.0003
    SOLAR_X         FLOAT           230.250
    SOLAR_Y         FLOAT          -670.875
    FLATFIELD       BYTE              0
    OPTDIST         STRING           ''
    HISTORY         STRING           ''
 
 Note that the index and data structures can be referenced without
 using the column names explicitly. For example, one could retrieve
 the jth spectrum from the ith data column using
   spectrum = data.(i)(*,*,j) 
 the reference pixels and x pointing could be retrieved using
   refpix  = index.(i).refpix
   solar_x = index.(i).spectrum(j).solar_x

 A .genx file that has been written with wrt_sumer may also be read
 with rd_sumer.
 IDL> filename = 'sum_960604_060805.fits'
 IDL> rd_sumer,filename,index,data
 IDL> wrt_sumer,index,data
 IDL> filename = 'sum_960604_060805.genx'
 IDL> rd_sumer,filename,index,data

 MODIFICATION HISTORY:

   HPW 17-JUN-1996:

   HPW 03-JUL-1996: Added query, nodata, and data_cols options as
                    well as index structures.

   HPW 09-JUL-1996: Fixed bugs related to multiple binary extension
                    tables, non-unique column names, and unexpected
                    names for data columns. Changed the index
                    structure so that its orgainization was more
                    similar to that of the data structure.

   HPW 25-JUL-1996: Changed the routine to return refpix, refval,
                    delta, dims, desc, and units for the solar x
                    direction. Fixed a bug that would cause the index
                    structure to be be concatenated with structures
                    that had been read previously.

   HPW 25-JUL-1996: Modified the routine to properly handle files
                    with no data in them.

   HPW 12-AUG-1996: Modified the routine so that the minimum value of
                    index.(*).dims is 1.

   HPW 13-AUG-1996: Modified the routine to read .genx files created
                    with wrt_sumer.

   HPW 03-SEP-1996: Added the optdist and history tag names to the
                    index structure.

   HPW 07-OCT-1996: Modified the routine to handle new format for
                    .genx files which allows the nodata switch to
                    work properly.

   HPW 31-OCT-1996: Modified the routine to identify FITS and GENX
                    files with arbitrary file names. Added a check on
                    the existence of the file.

   HPW 20-JUN-1997: Modified to look for TSPIX first then
                    TRPIX. TSPIX is used as the reference pixel in
                    the final cdrom distribution of the data.

   HPW 17-JUL-1997: Modified to use rd_sumer_genx which reads a new
                    version of the file format. The new file format
                    allows the use of the data_cols keyword with the
                    files written with wrt_sumer.

   DMZ 13-Jan-1998: Added ability to read compressed version of
                    file. (Unix only)

   HPW 15-APR-1999: Modified the index structure to include the tag
                    name ORIENTATION which will indicate if the
                    exposure has been oriented so that solar north is
                    on the top. Also added the dispersion tag.

   HPW 12-AUG-1999: Replaced strreplace with SSW str_replace.
 
   DMZ 28-Mar-2002: Made checking for compressed file a default


rd_sumer [2] $SSW/soho/sumer/idl/contrib/warren/rd_sumer.pro
[Previous] [Next]
 NAME:

 rd_sumer

 PURPOSE:

 To read data and headers from SOHO/SUMER fits files including binary
 table extensions. Files which have created using wrt_sumer and have
 the extension '.genx' may also be read with rd_sumer.

 CATEGORY:

 Data retrieval.

 CALLING SEQUENCE:

 rd_sumer,filename,/query
 rd_sumer,filename,index,/nodata
 rd_sumer,filename,index,data
 rd_sumer,filename,index,data,data_cols=data_cols
 
 INPUTS:

 filename: The filename of the fits file from which data is to be
           read.

 OPTIONAL INPUTS:

 data_cols: The column numbers of the data columns to be returned in
            the data structure. The data_cols keyword has no affect
            when reading '.genx' files.
       
 KEYWORD PARAMETERS:

 query: Prints information on the contents of the file to the screen.
 compressed: checks for compressed files with .Z or .gz ext (Unix only)

 nodata: No data is returned, only the index structure.

 OUTPUTS:

 data: A structure which contains data present in the fits file. The
       default is to return all of the data. Subsets can be returned
       using the optional data_cols keyword.
 
 index: A structure which contains information about the data.

 OPTIONAL OUTPUTS:

 None.

 CALLS: ***
	DESTRING, FIND_COMPRESSED, FXBCLOSE [1], FXBCLOSE [2], FXBFIND [1], FXBFIND [2]
	FXBOPEN [1], FXBOPEN [2], FXBOPEN [3], FXBREAD [1], FXBREAD [2], FXBREAD [3]
	FXPAR [1], FXPAR [2], HEADFITS [1], HEADFITS [2], HEADFITS [3], MAKE_STR [1]
	MAKE_STR [2], RD_GENX, UNIQ [1], UNIQ [2], UNIQ [3], mk_query [1], mk_query [2]
	rd_sumer_genx, sgt_file_type, str_replace [1], str_replace [2]
 CALLED BY:
	GET_SUMER_FLAT, PICKFITS, SUMER_CALIB, mk_query_genx, mk_sumer_dbase_ff
	sa_gt_specrange, sgt_column, sgt_exposure, smk_atlas, sumer_ffdb
 COMMON BLOCKS:

 Uses the Yohkoh routines make_str and str_merge to assure unique
 structure names. 

 SIDE EFFECTS:

 None?

 RESTRICTIONS:

 This routine has not been thoroughly tested and may crash at any time!

 PROCEDURE:

 The routine calls mk_query to obtain information about the data
 stored in the FITS file. This information is used to dynamically
 create index and data structures. The tag names for the data
 structure are derived from the header keyword TTYPE. The index
 structure is based on the information stored in the primary and
 binary header files as well as in the data columns.

 For '.genx' files, the index and data structures are read using
 rd_genx.

 EXAMPLE:

 This file has six columns of data stored in two binary extension
 tables. Note that the data columns in the different binary extension
 tables have the same names but different dimensions.

 IDL> filename = 'sum_960604_060805.fits'
 IDL> rd_sumer,filename,/query
 File: sum_960604_060805.fits
 C      Name    Dimensions    Wmin    Wmax     Xmin     Xmax     Ymin     Ymax
 1 W_1533.43   (25,360,26) 1532.90 1533.96   230.25   531.31  -670.88  -670.88
 2 W_1550.77   (25,360,26) 1550.25 1551.29   230.25   531.31  -670.88  -670.88
 3 W_1548.19   (25,360,26) 1547.67 1548.71   230.25   531.31  -670.88  -670.88
 4 W_1533.43   (25,360,13) 1532.90 1533.96   389.81   534.38  -670.88  -670.88
 5 W_1550.77   (25,360,13) 1550.25 1551.29   389.81   534.38  -670.88  -670.88
 6 W_1548.19   (25,360,13) 1547.67 1548.71     0.00   534.38  -670.88     0.00
 IDL> rd_sumer,filename,index,data
 IDL> help,/str,data
 ** Structure MS_206275602001, 6 tags, length=4212000:
    W_1533_43_1     LONG      Array(25, 360, 26)
    W_1550_77_1     LONG      Array(25, 360, 26)
    W_1548_19_1     LONG      Array(25, 360, 26)
    W_1533_43_2     LONG      Array(25, 360, 13)
    W_1550_77_2     LONG      Array(25, 360, 13)
    W_1548_19_2     LONG      Array(25, 360, 13)
 IDL> help,/str,index
 ** Structure <2d5d48>, 7 tags, length=4432, refs=1:
    W_1533_43_1     STRUCT    -> <Anonymous> Array(1)
    W_1550_77_1     STRUCT    -> <Anonymous> Array(1)
    W_1548_19_1     STRUCT    -> <Anonymous> Array(1)
    W_1533_43_2     STRUCT    -> <Anonymous> Array(1)
    W_1550_77_2     STRUCT    -> <Anonymous> Array(1)
    W_1548_19_2     STRUCT    -> <Anonymous> Array(1)
    GEN             STRUCT    -> <Anonymous> Array(1)
 IDL> help,/str,index.(0)
 ** Structure <2cd5c8>, 9 tags, length=896, refs=4:
    NUM_BTE         INT              1
    REFPIX          FLOAT     Array(3)
    REFVAL          FLOAT     Array(3)
    DELTA           FLOAT     Array(3)
    DIMS            INT       Array(3)
    DESC            STRING    Array(3)
    UNITS           STRING    Array(3)
    DET_X           INT              0
    DET_Y           INT              0
    SPECTRUM        STRUCT    -> <Anonymous> Array(26)
 IDL> help,/str,index.(0).spectrum
 ** Structure <2b3fb0>, 5 tags, length=32, refs=3:
    SUM_STATUS      BYTE      Array(5)
    DET_TIME        DOUBLE           0.0000000
    EXPTIME         FLOAT           25.0003
    SOLAR_X         FLOAT           230.250
    SOLAR_Y         FLOAT          -670.875
    FLATFIELD       BYTE              0
    OPTDIST         STRING           ''
    HISTORY         STRING           ''
 
 Note that the index and data structures can be referenced without
 using the column names explicitly. For example, one could retrieve
 the jth spectrum from the ith data column using
   spectrum = data.(i)(*,*,j) 
 the reference pixels and x pointing could be retrieved using
   refpix  = index.(i).refpix
   solar_x = index.(i).spectrum(j).solar_x

 A .genx file that has been written with wrt_sumer may also be read
 with rd_sumer.
 IDL> filename = 'sum_960604_060805.fits'
 IDL> rd_sumer,filename,index,data
 IDL> wrt_sumer,index,data
 IDL> filename = 'sum_960604_060805.genx'
 IDL> rd_sumer,filename,index,data

 MODIFICATION HISTORY:

   HPW 17-JUN-1996:

   HPW 03-JUL-1996: Added query, nodata, and data_cols options as
                    well as index structures.

   HPW 09-JUL-1996: Fixed bugs related to multiple binary extension
                    tables, non-unique column names, and unexpected
                    names for data columns. Changed the index
                    structure so that its orgainization was more
                    similar to that of the data structure.

   HPW 25-JUL-1996: Changed the routine to return refpix, refval,
                    delta, dims, desc, and units for the solar x
                    direction. Fixed a bug that would cause the index
                    structure to be be concatenated with structures
                    that had been read previously.

   HPW 25-JUL-1996: Modified the routine to properly handle files
                    with no data in them.

   HPW 12-AUG-1996: Modified the routine so that the minimum value of
                    index.(*).dims is 1.

   HPW 13-AUG-1996: Modified the routine to read .genx files created
                    with wrt_sumer.

   HPW 03-SEP-1996: Added the optdist and history tag names to the
                    index structure.

   HPW 07-OCT-1996: Modified the routine to handle new format for
                    .genx files which allows the nodata switch to
                    work properly.

   HPW 31-OCT-1996: Modified the routine to identify FITS and GENX
                    files with arbitrary file names. Added a check on
                    the existence of the file.

   HPW 20-JUN-1997: Modified to look for TSPIX first then
                    TRPIX. TSPIX is used as the reference pixel in
                    the final cdrom distribution of the data.

   HPW 17-JUL-1997: Modified to use rd_sumer_genx which reads a new
                    version of the file format. The new file format
                    allows the use of the data_cols keyword with the
                    files written with wrt_sumer.

   DMZ 13-Jan-1998: Added ability to read compressed version of
                    file. (Unix only)

   HPW 15-APR-1999: Modified the index structure to include the tag
                    name ORIENTATION which will indicate if the
                    exposure has been oriented so that solar north is
                    on the top. Also added the dispersion tag.

   HPW 12-AUG-1999: Replaced strreplace with SSW str_replace.


rd_sumer_genx $SSW/soho/sumer/idl/contrib/warren/rd_sumer_genx.pro
[Previous] [Next]
 NAME:

 rd_sumer_genx

 PURPOSE:

 To read data files written with wrt_sumer. Called by rd_sumer. See
 rd_sumer for detailed documentation.

 CATEGORY:

 Data retrieval.

 CALLS: ***
	FILE_EXIST [2], MAKE_STR [1], MAKE_STR [2], TRIM, build_str [1], build_str [2]
	file_exist [1], file_exist [3], sgt_file_type
 CALLED BY:
	rd_sumer [1], rd_sumer [2]
 MODIFICATION HISTORY:

   HPW 17-JUL-1997: Orginal version.


rd_tfile [2] $SSW/soho/mdi/idl_old/gen/ys_util/rd_tfile.pro
[Previous] [Next]
   Name: rd_tfile

   Purpose: read/return contents of text file - optionally interpret
	     and convert text table data
		
   Input Paramters:
      filename - string variable containing file name to read
      ncols - (optional) #colunms (output will be matrix, strarr(NCOLSxN)
      skip  - (optional) #lines to skip (header) for readfile compatibile 
	                  (if skip=-1, first non-numeric lines are skipped)

   Output Parameters:
      function returns file contents (string array(list) or matrix)
		if convert is set, auto-convert to numeric data type
      
   Keyword Parameters:
      delim     - table column delimiter (default is blank/tab)
      nocomment - if=1 (switch) , remove lines with (unix:#, vms:!)
		   if string (scaler), remove lines with specified character
      compress  - eliminate leading/trailing blanks and excess whitespace
		   (for table data (ncols gt 1), compress is assumed)
      quiet     - if set, suppress warning messages
      autocol   - if set, derive column count from first non-comment line
      convert   - if set, convert to numeric data type
      header    - output string(array) containing header lines
      hskip	 - header skip (sets skip to -1)
   
   Calling Sequence:
						;      RETURNS
      text=rd_tfile(filename)                  ; orig. file-> string array
      text=rd_tfile(filename,/nocomment)       ; same less comment lines
      text=rd_tfile(filename,/compress)        ; same less excess blanks
      data=rd_tfile('text.dat',3)              ; strarr(3,N) (table data)
      data=rd_tfile('fdata.dat',/auto,/convert); determine n columns and
                                               ; data type automatically
      data=rd_tfile(filename,/hskip,head=head) ; return file header in head


 CALLS: ***
	STR2ARR [1], STR2ARR [2]
 CALLED BY:
	CAT_DIRECTORY, DATA_PATHS, DSNFIL_TRIM, DSN_FINAL, EDGES_HVSPEC, EIT_SUB_SC_PIXEL
	EVAL_LINE_COMPLEX, Energy_res [2], FIND_CAT, FIND_PROC, GO_DSN_FINAL [1]
	GO_DSN_FINAL [2], HESSI FRAMEWORK TEMPLATE CLASS [2]
	HESSI FRAMEWORK TEMPLATE CLASS [3], HESSI_SHUTTERS, HESSI_SPEX [1]
	HESSI_SPEX [2], HSI_DRM_MOD CLASS, HSI_DRM_MOD_CONTROL__DEFINE
	HSI_LOCATE_FLARE [2], HSI_LOCATE_FLARE [4], HXT_FLARE_POS, JITTER_HTML
	MDI_SUMMARY, MLSO_SYN_READER, NEAR_CONJ, NORH_PR_EVX [1], NORH_PR_EVX [2]
	NORP_RD_AVG [1], NORP_RD_AVG [2], NORP_RD_DAILY [1], NORP_RD_DAILY [2], ORBIT_DN
	ORB_EXTRAP, PARSE_GROSSC_ATTITUDE, PRINT_OP, RD_BCSCAL [1], RD_BCSCAL [2]
	READ_ANALIST, READ_GDFILE_GD, ROLL_PLOT, SPEX__DEFINE, SXT_ECLIPSE, TOK_RD_DAILY
	TYKW_RD_DAILY, UNIX_CMD [1], UNIX_CMD [2], UPDATE_LINE_TEMPLATES
	UPDATE_SXT_CO_INDEX, YOHKOH_TERM_PREDICT, avsig_1 [1], cal_fig_mich
	calc_mtm_therm, calc_rad_loss, cfl_summary [1], cfl_summary [2]
	check_compile [1], check_compile [2], check_log [1], check_log [2]
	check_oldprocess [1], check_oldprocess [2], check_oldprocess [3]
	check_oldprocess [4], check_process [1], check_process [2], cont2time [1]
	cont2time [2], copy_visible, ctraj2orbit, daily_forecast [2], disk_hog [1]
	disk_hog [2], disk_monitor [1], disk_monitor [2], disp_therm_rs232, do_demo [1]
	do_demo [2], doc_head [1], doc_head [2], doc_head [3], doc_library2 [1]
	doc_library2 [2], dpc_decode, emi_plot [1], extract_val, file_append [1]
	file_append [2], file_diff, fitstap2tap [1], fitstap2tap [2], fl_mktext
	fl_sxtobsnar [1], fl_sxtobsnar [2], flares2disk, ftp_copy [1], ftp_copy [2]
	ftp_copy2sites, ftp_copy_new, genx2html [1], genx2html [2], get_ads [1]
	get_hk_mnem, get_ksc_holiday, get_mk3 [1], get_mk3 [2], get_sdm_val
	get_tty_type [1], get_tty_type [2], get_uvxsections, go_batch [1], go_batch [2]
	go_lasdisk golaserdisk, go_lasdisk2 golaserdisk, go_yo_prod_batch
	gtab_patrols, gtt_wave_tru, help_windows, hsi_clk_delta_read
	hsi_flare_position_image [1], hsi_flare_position_image [2]
	hsi_full_sun_image [1], hsi_full_sun_image [2], hsi_locate_flare [1]
	hsi_locate_flare [3], hsi_rd_durevt, hsi_rd_orbevt [1], hsi_rd_orbevt [2]
	hsi_rd_trackfile, hsi_rdstatevectorfile, hsi_read_vcfiletimes
	hsi_write_decimation_settings, html_basics, html_doc, html_form_addtime [1]
	html_form_addtime [2], html_form_addtime [3], html_get_files, html_linklist
	html_remove_template, hxt_rdpara, id2nam, idl_server_control, image2movie
	ip_que_dmpver, keyword_db, laststat [1], laststat [2], list_nrt_times
	lists2matrix [2], main_execute [1], main_execute [2], make_ssw_mirror
	map_env2dir, mdimrot, mdipdist, mdiprot, mk_bad_pix_map_load, mk_hst_summary
	mk_limb_pixmap, mk_mdi_fits, mk_mdi_iap, mk_pix [1], mk_pix [2], mk_pubydb
	mk_sfc [1], mk_sfc [2], mk_spd, mk_ssc_batch [1], mk_ssc_batch [2], mk_vcr
	mk_ydb_list, mk_ydbtape [1], mk_ydbtape [2], mo_check, mo_patch, mobad_summ
	modvolume_inf [1], modvolume_inf [2], mon_sci5k, new_dpath [1], new_dpath [2]
	nob_img_copy, nobeyama_update, norh_t2azel, nts_copy [1], nts_copy [2]
	oneline [1], oneline [2], oneline_event [1], oneline_event [2], op_rd_special
	op_term_score, page_fmt, password_info, pl_monitor_center, plot_loi_summary [1]
	plot_loi_summary [2], pr_visible, print_ogsel
	pro loadoptextfiletimeOGverboseverbose
	pro plotogonalgdogtimeogfemtimefemflgstarttimestarttimeendtimeendtimepsps
	quick_hkplot [1], quick_hkplot [2], rd_atodat [1], rd_atodat [2], rd_dpc_table
	rd_egse_hk_txt, rd_exec_synop_index, rd_fdss_durevt_fil, rd_fdss_grndtrk_fil
	rd_fdss_orbevt_fil, rd_fdss_viewpd_fil, rd_guf_ascii, rd_pnt_hist
	rd_raw_station_plan, rd_rdb [1], rd_rdb [2], rd_selsis, rd_taer, rd_tfiles
	rd_therm_rs232, rd_tr_seq_head, rd_ulin_col, rd_ydbtap, rd_ydbtapedir
	read_sooncheck, redo_disploi, redo_mon_sci5k, ref_term [2], reg_check, rmosaic [1]
	rmosaic [2], rmosaic [3], sea, search [1], search [2], search_obs, selsisi_copy
	set_logenv [1], set_logenv [2], set_logvms, set_logwindows, sfc_check
	soon_cadence, soon_catstat, soon_com2html, soon_search [1], soon_search [3]
	soon_table, special_movie, ssw_contrib_info, ssw_getapplet, ssw_install [1]
	ssw_install [2], ssw_install_explinkages, ssw_javamovie, ssw_move
	ssw_set_chianti, ssw_strfind, ssw_swmap_info, ssw_swmap_uniqinfo
	ssw_upgrade [1], ssw_upgrade [2], sswdb_info, sswdb_upgrade, sswloc
	strpair2struct, struct_where, sxt2file, sxt2mpeg, sxt_html, sxt_plan, sxt_prep [1]
	sxt_prep [2], sxt_prep [3], sxt_ssn2fits [1], sxt_where, table2struct
	tbb_info [1], tbb_info [2], teambb [1], teambb [2], term_times, tfile__define
	tim2dbase, timeline, topsdb [1], topsdb [2], tr_decode_head [1]
	tr_decode_head [2], tr_list_frames, tr_mk_seq_alph, tr_summary_head
	trace_do_data_requests, trace_dph2struct [1], trace_recent_movie_summary
	trace_request_summary, trace_submit_request, trace_success_file, trace_where
	ucon_path, url_decode, v_orbital, video_title, web_seq, wrt_fits_bin_exten [2]
	wrt_sci160k_img, wwwidl_server_check, wwwidl_watchdog [1], wwwidl_watchdog [2]
	xcheckip, xdisp_fits, xdisp_sci5k, xdisp_trace [1], xdisp_trace2, xdisp_trace3
	xgen_widget, xhkplot, xsearch_obs, xset_chain [1], xset_chain [2], xsw2tree
	xsw2tree_event, xswlist [2], ydb_install [1], ydb_install [2], ydb_use
	ys_contrib [1], ys_contrib [2]
   History:
      slf,  4-Jan-1992 - for yohkoh configuration files 
      slf,  6-Jan-1992 - remove partial comment lines 
      slf, 11-feb-1993 - added autocol keyword and function
			  added convert keyword and function
      slf, 28-Oct-1993 - temp fix for VMS variable length files
      slf, 26-jan-94 fixed bug if /auto and user supplied comment char
      dmz, 3-Mar-94 - changed type to type/nopage (for vms), otherwise
                      it is really slow
      slf, 21-May-94 - fix bug in /convert auto skip function (allow '-' !!)
      mdm, 15-Mar-95 - Modified to not crash on reading a null file.
      mdm, 12-Oct-95 - Modification to allow tab character to be the delimiter.

   Category:
      gen, setup, swmaint, file i/o, util

   Method:
      files are assumed to be ascii - file contents read into a variable
      if ncols is greater than 1, then a table is assumed and a string
      matrix is returned - table is null filled for non existant table 
      entries (ncols gt 1 forces white space removal for proper alignment)


RDFILE [1] $SSW/soho/mdi/idl_old/gen/ys_util/rdfile.pro
[Previous] [Next]
 NAME:
	RDFILE
 PURPOSE:
	Open and read an ASCII file. Read N_column columns 
	and skip first N_SKIP records. 

 CALLING SEQUENCE:
	Data = RDFILE(0)		; Will prompt for file name
	Data = RDFILE(NAME)		; Will prompt for N_COLUMN,N_SKIP
	Data = RDFILE(NAME,N_COLUMN)	; No prompts, no records skipped
	Data = RDFILE(NAME,N_COLUMN,N_SKIP)
	Data = RDFILE(NAME,N_COLUMN,N_SKIP,N_READ) ;All records are read if
						   ; N_READ is omitted
 INPUTS:
	No required inputs
 OPTIONAL INPUT PARAMETERS:
	NAME	  String variable containing input file name.
	N_COLUMN  Number of columns to read.
	N_SKIP	  Number of records at beginning of file to skip.
	N_READ	  Number of records to read after any skipped records.

 KEYWORDS:
	DOUBLE	  If true, i.e. 1, then data is read in double precision.
	HEADER	  If present, returns string array with N_SKIP records.

 OUTPUTS:
	Two dimensional data array returned: DATA(i,j)
		where 	i = 0:N_column - 1
			j = 0:Number of records - 1

 CALLED BY:
	ACRIM_READER, HXT_EFF, HXT_POSSI4, HXT_POWL, HXT_PROB, NOV93_ECLIPSE, NOV_ECLIPSE
	SXS_EFF, ULYSSES_FEM, do_ads, may_eclipse
 COMMON BLOCKS:
	None.

 SIDE EFFECTS:
	None.
 RESTRICTIONS:
	NAME	must be a scalar string variable.
	N_COLUMN, N_SKIP, and N_READ must be scalar byte, integer or real.

 PROCEDURE:

	If no arguments are present, the routine will prompt for
		NAME (filename), N_COLUMN and N_SKIP.
	If only the file name is present, routine will prompt for 
		N_COLUMN and N_SKIP.
	If NAME and N_COLUMN are present, but not N_SKIP, N_SKIP will
		be set to 0.
	If N_READ is present, then N_READ records will be read in, otherwise
		all records will be read.  (N_READ does not include skipped
               records.)  
	If keyword DOUBLE is true, i.e. 1, then data is read in double
		precision.  Syntax in procedure call is ,/DOUBLE or ,DOUBLE=1 .
	If keyword HEADER is present, will return N_SKIP header lines.

 MODIFICATION HISTORY:
	Sep, 1985,	Written, J.R. Lemen, MSSL
	Dec, 1990,	Modified, J.R. Lemen, LPARL, to make compatible with V2.
	Feb, 1991,	Modified, E.S. Claflin, LPARL, N_READ parameter and
			  DOUBLE keyword added.
 	Mar, 1991,	Modified, J.R. Lemen, LPARL, to add HEADER keyword


rdtfr $SSW/soho/mdi/idl/egse/rdtfr.pro
[Previous] [Next]
pro rdtfr, fnam, img, hdr, timeblk, nimg=nimg, first=first, dpc=dpc, qstop=qstop, nodata=nodata
  This subroutine reads images from a 160k decom file and places the requested
  images in caller's array.

  Call:
	fnam:	name of the decom file, without the file number or the .tfr extension.
	img:	array for image data (will be dimensioned [x,y,nimg])
       hdr:	array for headers (dimensioned [549,nimg])
       nimg:	on INPUT specifies number of images: routine will then return 
			only the first nimg images (or less if file ends sooner)
		on OUTPUT has the actual number of images read
		(optional parameter)
       first:	optional parameter. Used it to specify the first image to be
               extracted 
       dpc:    The data product code to be extracted.

  Method:
       The "index" file is used to determine the file number and record number
       where the first image begins. If the index file is not found, it is 
       created using the MK_TFI procedure. Successive records are read, until
       the entire image is read. The procedure is repeated if more than one image
       is to be extracted, until the required number of images has been read.

 CALLS: ***
	CLOSE_TFR, GET_TF_REC, NIMG_IN_TFR, dec2sun [1], dec2sun [2], get_dpc_info
	get_host [1], get_host [2], mk_tfi, tfr_decom
 CALLED BY:
	mdifocus2, read_mdi
  NOTE:
       The routine can be used repetitively to extract nimg images of a given type.
       To use it repetitively, the nimg and the first keywords should be variable
       names rather than values. The routine will update these variables upon exit.

       If the DPC keyword is absent, the DPC code of the first image is selected.

       The routine creates a temporary disk file to hold all the data for requested
       images. This file is deleted when control is returned to the caller but the 
       routine will fail if sufficient disk space is not available.
HISTORY:
	Written by Dnyanesh Mathur
	 4-Apr-94 (MDM) - Added code to work with DEC machines
			- Modified so that temporary disk file would not have
			  to be made.
	12-Apr-94 (MDM) - Expanded to process compressed or packed data also
			- Added DPC FFFFFF84
	15-Apr-94 (MDM) - Made MK_TFI use a long word for the record number
	18-Apr-94 (MDM) - Modified to use GET_DPC_INFO and various other changes
	 4-May-94 (MDM) - Modified to save the record number as integer*2 since
			  that is the size of the TFI_REC array.  Fixed some
			  other problems with reading on DEC versus SGI.
	 5-May-94 (MDM) - Changed TFX file to be INTEGER*4
			  Changed .tfx file name to be .tfrx
	12-May-94 (MDM) - Removed all routines and functions and made their
			  own files (to avoid compilation problems)
			- Replaced get_image_params with get_dpc_info
	21-Sep-94 (MDM) - Modified how the routine worked for unknown DPCs
			- Added /QSTOP option
			- Removed the "print, !stime" comments
	20-Jan-95 (MDM) - Modified to handle the case where a file ends 
			  exactly at the end of the data product, and the
			  data product is set up to have a buffer (number of
			  words) which is the largest possible.  The repeat
			  loop did not recognize that it is at the end of
			  the dataset.
	28-Mar-95 (MDM) - Added the option /NODATA.  Only works if calling
			  the file to read a single image
	31-Mar-95 (MDM) - Added call to close the TFR_DECOM unit at the
			  beginning - to make sure everything is starting
			  at a known state.
	20-Apr-95 (MDM) - Added another /OVERWRITE command for REFORM at
			  the end (for img)
	25-Apr-95 (MDM) - Added byte swapping for HDR when /NODATA is set
	26-Apr-95 (MDM) - Modified the REFORM of the HDR so that the 
			  reform worked properly for cases where there are
			  missing images
			- Modified how the /NODATA switch worked (involved
			  moving how the data/header is extracted)
	 3-May-95 (MDM) - Modified how the /NODATA grabs the TIMEBLK value
			  for output
	13-Oct-95 (MDM) - Corrected error when reading undefined data product
	19-Dec-95 (MDM) - Made a patch to use the block address passed in 
			  the transfer frame rather than the derived word
			  count
	29-Jan-96 (MDM) - Put the 19-Dec-95 patch on-line
			- Extended the 19-Dec-95 patch to also apply to the
			  last transfer frame portion.
	15-Oct-96 (MDM) - Patched how UNKNOWN dpc is handled


rdtfr0 [1] $SSW/soho/mdi/idl/egse/rdtfr0.pro
[Previous] [Next]
pro mk_tfi, fname

 PURPOSE: To create an index file for specified data set

 PARAMETERS: fname - Data set name


rdtfr0 [2] $SSW/soho/mdi/idl/egse/rdtfr0.pro
[Previous] [Next]
pro list_tfi, fnam

 Procedure to list an index file


rdtfr0 [3] $SSW/soho/mdi/idl/egse/rdtfr0.pro
[Previous] [Next]
pro rdtfr, fnam, img, hdr, timeblk, nimg=nimg, first=first, dpc=dpc 
  This subroutine reads images from a 160k decom file and places the requested
  images in caller's array.

  Call:
	fnam:	name of the decom file, without the file number or the .tfr extension.
	img:	array for image data (will be dimensioned [x,y,nimg])
       hdr:	array for headers (dimensioned [549,nimg])
       nimg:	on INPUT specifies number of images: routine will then return 
			only the first nimg images (or less if file ends sooner)
		on OUTPUT has the actual number of images read
		(optional parameter)
       first:	optional parameter. Used it to specify the first image to be
               extracted 
       dpc:    The data product code to be extracted.

  Method:
       The "index" file is used to determine the file number and record number
       where the first image begins. If the index file is not found, it is 
       created using the MK_TFI procedure. Successive records are read, until
       the entire image is read. The procedure is repeated if more than one image
       is to be extracted, until the required number of images has been read.

  NOTE:
       The routine can be used repetitively to extract nimg images of a given type.
       To use it repetitively, the nimg and the first keywords should be variable
       names rather than values. The routine will update these variables upon exit.

       If the DPC keyword is absent, the DPC code of the first image is selected.

       The routine creates a temporary disk file to hold all the data for requested
       images. This file is deleted when control is returned to the caller but the 
       routine will fail if sufficient disk space is not available.


rdtfr2 [1] $SSW/soho/mdi/idl/egse/rdtfr2.pro
[Previous] [Next]
pro mk_tfi, fname

 PURPOSE: To create an index file for specified data set

 PARAMETERS: fname - Data set name


rdtfr2 [2] $SSW/soho/mdi/idl/egse/rdtfr2.pro
[Previous] [Next]
pro list_tfi, fnam

 Procedure to list an index file


rdtfr2 [3] $SSW/soho/mdi/idl/egse/rdtfr2.pro
[Previous] [Next]
pro rdtfr, fnam, img, hdr, timeblk, nimg=nimg, first=first, dpc=dpc 
  This subroutine reads images from a 160k decom file and places the requested
  images in caller's array.

  Call:
	fnam:	name of the decom file, without the file number or the .tfr extension.
	img:	array for image data (will be dimensioned [x,y,nimg])
       hdr:	array for headers (dimensioned [549,nimg])
       nimg:	on INPUT specifies number of images: routine will then return 
			only the first nimg images (or less if file ends sooner)
		on OUTPUT has the actual number of images read
		(optional parameter)
       first:	optional parameter. Used it to specify the first image to be
               extracted 
       dpc:    The data product code to be extracted.

  Method:
       The "index" file is used to determine the file number and record number
       where the first image begins. If the index file is not found, it is 
       created using the MK_TFI procedure. Successive records are read, until
       the entire image is read. The procedure is repeated if more than one image
       is to be extracted, until the required number of images has been read.

  NOTE:
       The routine can be used repetitively to extract nimg images of a given type.
       To use it repetitively, the nimg and the first keywords should be variable
       names rather than values. The routine will update these variables upon exit.

       If the DPC keyword is absent, the DPC code of the first image is selected.

       The routine creates a temporary disk file to hold all the data for requested
       images. This file is deleted when control is returned to the caller but the 
       routine will fail if sufficient disk space is not available.
HISTORY:
	Written by Dnyanesh Mathur
	 4-Apr-94 (MDM) - Added code to work with DEC machines
			- Modified so that temporary disk file would not have
			  to be made.
	12-Apr-94 (MDM) - Expanded to process compressed or packed data also
			- Added DPC FFFFFF84
	15-Apr-94 (MDM) - Made MK_TFI use a long word for the record number
	18-Apr-94 (MDM) - Modified to use GET_DPC_INFO and various other changes


READ_BIN_HK0 $SSW/soho/sumer/idl/contrib/germerott/sumer_hk0dec/read_bin_hk0.pro
[Previous] [Next]
 PROJECT:
       SOHO - SUMER

 NAME:
       READ_BIN_HK0()

 PURPOSE: 
       Read SUMER HK0 packages from file

 CATEGORY:
       
 
 EXPLANATION:
       This Routine looks for a valid HK0 Data file contents
       and then reads the data in a 200 by N byte array.
       This array can be decoded with the routines s_hk0_....

 SYNTAX: 
       Result = read_bin_hk0(filename)

 EXAMPLES:
       result = read_bin_hk0('hk0data.dat')
       result = read_bin_hk0(date='25-feb-1999')
 INPUTS:
       filename - input file whith binary hk0 data

 OPTIONAL INPUTS: 
       None.

 OUTPUTS:
       bytearray with hk0 data

 OPTIONAL OUTPUTS:
       None.

 KEYWORDS: 
       count - returns number of hk0 blocks
       helpp - gives usage message
       errmsg - returns error message
       datestring - date for which hk0 should be read
                    (overwrites filename)

 COMMON:
       None.

 RESTRICTIONS: 
       Keyword DATESTRING only works with the environment at Lindau

 SIDE EFFECTS:
       None.

 HISTORY:
       Version 1, December 28, 1999, GERMEROTT, MPAE LINDAU. Written
          replaces all other versions of read_bin_hk0 and read_hk0   

 CONTACT:
       GERMEROTT, MPAE LINDAU (GERMEROTT@linmpi.mpg.de)


READ_BITP_SCE $SSW/soho/lasco/idl/scenario/read_bitp_sce.pro
[Previous] [Next]
 NAME:
	READ_BITP_SCE

 PURPOSE:
	Read a bitpacked scenario file (output from schedule tool)
	and print commands in the file

 CATEGORY:
	Debug

 CALLING SEQUENCE:

	READ_BITP_SCE, Scenario_filename 


 INPUTS:
	Scenario_filename: Name of Scenario file

 OPTIONAL INPUTS:
	
 KEYWORD PARAMETERS:
	PRINTIT:  Put output in Scenario_filename.prt
		

 OUTPUTS:

 OPTIONAL OUTPUTS:

 CALLS: ***
	HEX2DEC, OBETIME2TAI, PARSE_HEX
 COMMON BLOCKS:

 SIDE EFFECTS:

 RESTRICTIONS:

 PROCEDURE:

 EXAMPLE:

		READ_BITP_SCE,'LAS19990917000.IPT.sce'

 MODIFICATION HISTORY:
 	Written by:	Dennis Wang - 21 Sep 1999

	@(#)read_bitp_sce.pro	1.1 09/22/99 LASCO IDL LIBRARY


READ_BLOCK $SSW/soho/lasco/idl/reduce/fuzzy/read_block.pro
[Previous] [Next]
 PROJEcT:
       SOHO - LASCO

 NAME:
       READ_BLOCK

 PURPOSE:
       returns the block (array of pixel) at column i and row j

 CATEGORY:
       Missing Blocks

 CALLING SEQUENCE:
       block = read_block (image, i, j)

 INPUTS:
       image           the image where to read the block onto
       i, j            the column i and the row j of the block
                       (i and j ranges from 0 to 31)

 KEYWORD PARAMETERS:
       SIDE            the side of the square blocks (default is 32 pixels)

 OUTPUTS:
       The function returns the corresponding block, a 32 x 32 integer array

 CALLED BY:
	FUZZY_BLOCK
 MODIFICATION HISTORY:
       written by J.More, September 1996


read_cal $SSW/soho/lasco/idl/las-c2/calib5.pro
[Previous] [Next]
 NAME: read_cal.pro
 PURPOSE: Gets a calibration image from disk and visualizes it 
 CATEGORY: Calibrations high level routine   
 CALLING SEQUENCE: READ_CAL, ima_name, itest, ima, hdr  
 INPUTS: ima_name                         image name of calibration
         itest                            =0 rebin si nx = 1124
                                          =1 no rebin pour nx = 1124  
 OPTIONAL INPUT PARAMETERS:               None
 KEYWORD PARAMETERS:                      None
 OUTPUTS:                                 Image on screen 
         ima                              image array 
         hdr                              header of image array
 OPTIONAL OUTPUT PARAMETERS:              None
 COMMON BLOCKS:                           None
 SIDE EFFECTS: hdr array is defined as DEFINE_IMA_HDR
 RESTRICTIONS:
 PROCEDURE:
 MODIFICATION HISTORY:   defined by ALL 6/24/93

 SCCS variables for IDL use

 @(#)read_cal.pro  1.0 25/6/93 :LAS


READ_CALFITS $SSW/soho/cds/idl/sci/data_handling/i_o/fits/cds/calib/read_calfits.pro
[Previous] [Next]
 Project     :	SOHO - CDS

 Name        :	READ_CALFITS

 Purpose     :	Reads CDS calibration data from column in FITS binary table.

 Explanation :	Reads data stored within a column of a CDS calibration FITS
		binary table into a structure variable containing the array and
		associated information.

 Use         :	READ_CALFITS, UNIT, DATA, COLUMN

		FXBOPEN, UNIT, 'testcaldata.fits', 1	;Opens the table
		READ_CALFITS, UNIT, DATA, 'WINDOW1'	;Reads WINDOW1 data
		FXBCLOSE, UNIT				;Closes the table

 Inputs      :	UNIT	= Logical unit number corresponding to the file
			  containing the binary table.

		COLUMN	= Column in the binary table to read data from, either
			  as a character string containing a column label
			  (TTYPE), or as a numerical column index starting from
			  column one.

 Opt. Inputs :	None.

 Outputs     :	DATA	= The output data will be read into an anonymous
			  structure variable with the following tag names:

				ARRAY	= The actual data array.  If /HEADER is
					  set, then this is simply the number
					  zero.
				LABEL	= The column label from TTYPEn.
				UNITS	= The units of the data.
				AXES	= The labels for the axes of ARRAY.
					  The last axis is always labelled
					  "EXPOSURE".

			  There will also be the following additional tag names
			  for columns containing detector data windows.

				DETX	= Starting detector column in pixels.
				DETY	= Starting detector row in pixels (NIS
					  only).

			  This is a simplified version of the structure used
			  during operations (see READ_CDS).

 Opt. Outputs:	None.

 Keywords    :	NANVALUE = Value signalling data dropout.  All points
			   corresponding to IEEE NaN (not-a-number) are
			   converted to this number.  Ignored unless DATA is of
			   type float, double-precision or complex.  The
			   default is -1.

			   It is anticipated that the CDS data files will
			   always be stored as integers, so that the use of
			   this keyword should be unnecessary.

		HEADER	= If set, then only the header is read in.

		STATUS	= If defined and passed, then any error messages will
			  be returned to the user in this parameter rather than
			  depending on the MESSAGE routine in IDL.  If no
			  errors are encountered, then a null string is
			  returned.  In order to use this feature, STATUS must
			  be defined first, e.g.

				STATUS = ''
				READ_CALFITS, STATUS=STATUS, ...
				IF STATUS NE '' THEN ...

 Calls       : ***
	FXBCOLNUM [1], FXBCOLNUM [2], FXBHEADER [1], FXBHEADER [2], FXBISOPEN [1]
	FXBISOPEN [2], FXBREAD [1], FXBREAD [2], FXBREAD [3], FXBTDIM [1], FXBTDIM [2]
	FXPAR [1], FXPAR [2], TRIM
 CALLED BY:
	CAL_DETREAD, CAL_DETSELECT
 Common      :	None.

 Restrictions:	The binary table must have been opened with FXBOPEN.

		This routine is intended solely for CDS calibration data.  It
		makes certain assumptions about what keywords will be present
		in the FITS binary table header.

 Side effects:	None.

 Category    :	Data_Handling, I_O, FITS, CDS, Calibration.

 Prev. Hist. :	None.

 Written     :	William Thompson, GSFC, 15 December 1993.

 Modified    :	Version 1, William Thompson, GSFC, 15 December 1993.
			Based on READ_CDS.
		Version 2, William Thompson, GSFC, 27 May 1994.
			Added HEADER keyword.
		Version 3, William Thompson, GSFC, 21 June 1994
			Added STATUS keyword.
               Version 4, C D Pike, RAL, 22 June 1994
                          Fixed compilation bug on endif (line 170)
		Version 5, William Thompson, GSFC, 23 June 1994
			Modified so that STATUS is not touched if not defined.

 Version     :	Version 5, 23 June 1994


READ_CARR_LONG $SSW/soho/lasco/idl/synoptic/read_carr_long.pro
[Previous] [Next]
 NAME:
	READ_CARR_LONG

 PURPOSE:
	This procedure reads in the carrington number and date information file.
	It is called from other routines as needed, and thus doesn't need to be
	called by the user explicitly.

 CATEGORY:
	LASCO Synoptic

 CALLING SEQUENCE:
	READ_CARR_LONG, Date, Cr, Clong

 INPUTS:
	None

 OPTIONAL INPUTS:
	None

 OUTPUTS:
	The only output is the storing of the carrington information into a common block.
	
 CALLS: ***
	GETENV_SLASH, STR2UTC [1], STR2UTC [2], STR2UTC [3], UTC2TAI
 CALLED BY:
	CARRDATE [1], CARRDATE [2], CARRLONG
 COMMON BLOCKS:
	carr_long:	Contains the start date of the carrington rotations from
			the almanac.  Generated by this routine.

 EXAMPLE:
       

 MODIFICATION HISTORY:
 	Written by:	RA Howard, NRL, 3/18/96

	@(#)read_carr_long.pro	1.5 12/14/05 LASCO IDL LIBRARY


READ_CDS $SSW/soho/cds/idl/sci/data_handling/i_o/fits/cds/read_cds.pro
[Previous] [Next]
 Project     : SOHO-CDS

 Name        : READ_CDS

 Purpose     : read a sequence of CDS FITS files into QL structures

 Category    : data analysis

 Explanation : 

 Syntax      : read_cds,files,ql

 CALLED BY:
	read_cds_im
 Examples    :

 Inputs      : FILES = CDS file names

 Opt. Inputs : None


 Outputs     : DATA = array of quicklook structures

 Opt. Outputs: None

 Keywords    : See GT_CDS_QL

 CALLS: ***
	CONCAT_STRUCT, DATATYPE [1], DATATYPE [2], DATATYPE [3], PR_SYNTAX, READCDSFITS
 Common      : None

 Restrictions: Could blow-up when mixing files of different raster/window
               combinations.

 Side effects: None

 History     : Written 22 March 1998, D. Zarro, SAC/GSFC

 Contact     : dzarro@solar.stanford.edu


read_cds_im $SSW/soho/cds/idl/sci/data_anal/ql/line_fit/read_cds_im.pro
[Previous] [Next]
 Project     : SOHO - CDS     
                   
 Name        : read_cds_im
               
 Purpose     : Read a cds image file from disk
               
 Explanation : 
               
 Use         : IDL> read_cds_im,image-array,line-name
    
 Inputs      : None
               
 Opt. Inputs : None
               
 Outputs     : CDS-image with fits header
               
 Opt. Outputs: None
               
 Keywords    : None

 Calls       : ***
	FXBCLOSE [1], FXBCLOSE [2], FXBOPEN [1], FXBOPEN [2], FXBOPEN [3], READ_CDS
 CALLED BY:
	tot_int
 Common      : None
               
 Restrictions: None
               
 Side effects: None
               
 Category    : ?
               
 Prev. Hist. : ?

 Written     : Nils Brynildsen, ITA, UiO, 19-July-1993
               
 Modified    : Version 1.1 Nils Brynildsen, ITA, UiO, 25-Oct-1993

		Corrected file directory for testdata.fits
               Changed test data file to testdata3.fits.  CDP, 20-Apr-95

 Version     : Version 3, 20-Apr-95


READ_DOOR_STATUS $SSW/soho/lasco/idl/database/read_door_status.pro
[Previous] [Next]
 NAME:
	READ_DOOR_STATUS

 PURPOSE:
	Returns an array of the LASCO door status

 CATEGORY:
	DATABASE

 CALLING SEQUENCE:
       Result = READ_DOOR_STATUS()

 INPUTS:
	None

 OUTPUTS:
	This function returns the door status as a structure array with tags:
		.tele	; int (0-3) telescope
		.closed	; double, date closed TAI time format
		.opened	; double, date opened TAI time format

 PROCEDURE:
	Reads lasco/eit door close/open dates from datafile.

 CALLS: ***
	STR2UTC [1], STR2UTC [2], STR2UTC [3], UTC2TAI
 EXAMPLE:
	door_status = READ_DOOR_STATUS()

 MODIFICATION HISTORY:
 	Written by:	Scott Paswaters, NRL, Mar 1998

	@(#)read_door_status.pro	1.2 03/31/99 LASCO IDL LIBRARY


read_eit $SSW/soho/eit/idl/util/read_eit.pro
[Previous] [Next]
   Name: read_eit

   Purpose: read eit image(s) into 2D or 3D array & map header->structure 

   Input Parameters:
      files - FITS file name(s) to read
      
   Output Parameters:
      index - IDL structure containing  FITs information (vector)
      data  - 2D or 3D array of EIT images
      nodata - switch, if set, only read and map headers (faster)

   Calling Sequence:
      read_eit, files, index , /nodata		 ; only read headers
      read_eit, files, index, data		 ; return 2D or 3D cube
      read_eit, files, index, data, outsize=256 ; rebin all DATA to outsize

   Keyword Parameters:
      outsize (input)  - output size (rebinning) - scalar size or [x,y]
      header  (output) - FITS header of last file in filelist
      comment (output) - COMMENT records for all input files 
      ccnts   (output) - used with COMMENT in call to 'mreadfits_info'

 CALLED BY:
	EIT_MKMOVIE, EIT_QUALITY [1], EIT_QUALITY [2], EIT_SUB_MOVIE, MK_EIT_MAP
	READ_EIT_FILE, datify, eit_fulldisk, eit_genx_cat, eit_proton_summary
	get_eit_info, lasteit, ssw_fov_context, ssw_track_demo, todays_targets
	trace_movie_context
   History:
      27-apr-1996 S.L.Freeland 
       9-May-1996 S.L.Freeland - pass NODATA through to mreadfits
      24-May-1996 S.L.Freeland - update MJD tag
      20-aug-1996 S.L.Freeland - fill in expdur tag (exptime+shutclose)
      22-oct-1996 S.L.Freeland - add 3D file ("lz") support
      23-oct-1996 S.L.Freeland - use anytim(ints,out_style='utc_int')
                                 (in place of anytim2utc(stringtime) )
      10-dec-1996 S.L.Freeland - protect against old QKL (no SHUTTER CLOSE...)
      14-jan-1997 S.L.Freeland - update DATE_OBS -> CCSDS (soho 'standard')
                                 add INITIALIZE keyword in eit_fxpar 3D call
      15-jan-1997 S.L.Freeland - add OUTSIZE (pass to mreadfits)
      28-jan-1997 S.L.Freeland - update for enhanced mreadfits (some 3D work)
                                 (removes single 3D file restriction)
      11-apr-1997 S.L.Freeland - avoid carrying large coment tag around
      12-apr-1997 S.L.Freeland - add documentation, COMMENT and CCNTS output
       7-may-1997 S.L.Freeland - extract non-3D "COMMENT KEYWORDS"
                                 (protect against SHUTTER CLOSE ss problem?)
      29-may-1997 S.L.Freeland - make new stuff work for single input file!
      23-feb-1998 J.S. Newmark - add path finding for filenames
      26-mar-1998 J.S. Newmark - add handling for corrected date_obs
      06-apr-1998 J.S. Newmark - fix pointing info for old data
       8-Feb-1999 S.L.Freeland - resolve times
      22-apr-1999 S.L.Freeland - only fill date_obs from coor_obs if not null
      28-jul-1999 J.S.Newmark  - fix bug in corr_obs field
      15-Jan-2002 S.L.Freeland - handle case of mixed corr_obs (null and non-null)
      14-May-2003 S.L.Freeland - replace strsplit with ssw_strsplit

   Method:
      use mreadfits.pro for reading and structure mapping
   
 CALLS: ***
	DELVARX [1], DELVARX [2], DELVARX [3], DELVARX [4], EIT_FXPAR, EIT_PIXSIZE
	STR2ARR [1], STR2ARR [2], UNIQ [1], UNIQ [2], UNIQ [3], anytim [1], anytim [2]
	anytim [3], anytim [4], anytim [5], anytim2ints [1], anytim2ints [2], delvarx [5]
	eit_file2path, eit_point, eit_struct, gt_day [1], gt_day [2], gt_tagval [1]
	gt_tagval [2], gt_time [1], gt_time [2], is_fits [1], is_fits [2], mreadfits
	mreadfits_info, ssw_strsplit, str_replace [1], str_replace [2], tag_index [1]
	tag_index [2]
   Restrictions:


read_eits $SSW/soho/eit/idl/util/read_eits.pro
[Previous] [Next]
   Name: read_eits

   Purpose: read of one or multiple EIT files

   Input: 
      eitfiles - input file array

   Output Parameters:
      odata   - data array - 2D or 3D

   Calling Sequence:
      read_eits, eitfiles

 CALLS: ***
	CONGRID [1], CONGRID [2], CONGRID [3], READFITS [1], READFITS [2], READFITS [3]
	data_chk [1], data_chk [2]
   History:
      15-Jan-1996 (SLF) - orig LPARL access of EIT quicklook data
      17-jan-1996 (SLF) - allow multiple reads (cube returned)
      29-jan-1996 (SLF) - use index file for summary information
      18-feb-1996 (SLF) - broke the info part out


READ_EXP_FACTOR $SSW/soho/lasco/idl/expfac/read_exp_factor.pro
[Previous] [Next]
 NAME:
	READ_EXP_FACTOR

 PURPOSE:
	This function reads the exposure factor file for a given date

 CATEGORY:
	EXPFAC

 CALLING SEQUENCE:
	Result = READ_EXP_FACTOR(Date)

 INPUTS:
	Tel:		Telescope (string: 'c1','c2','c3')
	Date:		Date for which the exposure factors are wanted, either
			in YYMMDD, MJD, or CDS time structure formate

 OUTPUTS:
	Result:		0 = Successful read
			-1 = File not found

 CALLS: ***
	FILEPATH, FILE_DATE_MOD, UTC2YYMMDD, YYMMDD2UTC
 CALLED BY:
	CHECK_EXP_FACTOR_DUPS, GET_EXP_FACTOR [1], GET_EXP_FACTOR [2], PLOT_EXP_FACTOR
 COMMON BLOCKS:
	EXP_FACTOR_ARRAY:	The exposure facotor information for a given date.

 PROCEDURE:
	Called by GET_EXP_FACTOR

	The file for the image date specified in the image header is 
	read into the common block.
  
	The format in the exposure factor file is:
      fname       tsnnnnnn.fts    (a12)  
      factor      number          (f10.6)  
      bias        number          (f10.1)  
      date        YYMMDD          (a6)  
      time        SEC.MM          (12.2)  
      Filter      string          (a12)  
      Polarizer   string          (a12)  
      Wavelength  NNNN.NNNN       (a9)  
      Nregion     NNNN            (i4)
      Sigma       NNNN.NNNN       (f10.2)

	Checks for duplicate entries and only saves the last one read in.

 MODIFICATION HISTORY:
 	Written by:	RA Howard, NRL, 21 September 1997
	6 October 1997	RAH, Split read away from GET_EXP_FACTOR
	20 Feb 98	RAH, added fits filenames to the common block
			and changed the variable name to be nregion instead
			of nzero
	22 Feb 98	RAH, check for duplicate entries, and permit any format
			for date
	 4 Dec 01 	Use FILEPATH for filename
	17 Sep 02	Add filedate to common block, from file_date_mod
       K Battams 051021        Add ,/swap_if_little_endian keyword to OPEN calls


 @(#)read_exp_factor.pro	1.13, 10/21/05 :LASCO IDL LIBRARY

	


READ_FULL_ATT $SSW/soho/gen/idl/plan/science/read_full_att.pro
[Previous] [Next]
 Project     :	SOHO - CDS

 Name        :	READ_FULL_ATT

 Purpose     :	Reads a SOHO full resolution attitude file.

 Category    :	Class3, Coordinates

 Explanation :	Reads a SOHO full resolution attitude file.  The user can
		either request the data by date or by filename.

 Syntax      :	READ_FULL_ATT, DATE, DATA  [, HEADER ]
		READ_FULL_ATT, FILENAME, DATA,  [ HEADER, ]  /FILENAME_PASSED

 Examples    :	READ_FULL_ATT, '1996/05/11', DATA, HEADER
		READ_FULL_ATT, 'SO_AT_FTR_19951202_V04.TXT', DATA, /FILENAME

 Inputs      :	DATE	 = Date to read attitude file for.  Can be in any of
			   the standard CDS time formats.

 Opt. Inputs :	FILENAME = Name of file to read.  Can be passed in place of the
			   DATE parameter if /FILENAME_PASSED is used.

 Outputs     :	DATA	 = A structure containing the attitude data, with the
			   following tags:

				MSEC	= Number of milliseconds into the day
				ROLL	= Spacecraft roll
				PITCH	= 

 Opt. Outputs:	HEADER	 = The file header

 Keywords    :	FILENAME_PASSED = If set, then the filename was passed rather
				  than the date.

		ERRMSG = If defined and passed, then any error messages will be
			 returned to the user in this parameter rather than
			 depending on the MESSAGE routine in IDL.  If no errors
			 are encountered, then a null string is returned.  In
			 order to use this feature, ERRMSG must be defined
			 first, e.g.

				ERRMSG = ''
				READ_FULL_ATT, ERRMSG=ERRMSG, ... 
				IF ERRMSG NE '' THEN ...

 Calls       : ***
	ANYTIM2CAL, ANYTIM2UTC [1], ANYTIM2UTC [2], CONCAT_DIR [1], CONCAT_DIR [2]
	CONCAT_DIR [3], IEEE_TO_HOST [1], IEEE_TO_HOST [2], IEEE_TO_HOST [3]
	IEEE_TO_HOST [4], OS_FAMILY, REVERSE, TRIM, concat_dir [4]
 Common      :	None.

 Restrictions:	The environment variable ANCIL_DATA must be set.

 Side effects:	None.

 Prev. Hist. :	None.

 History     :	Version 1, 23-May-1996, William Thompson, GSFC
		Version 2, 03-Sep-1996, William Thompson, GSFC
			Also look for filename with a dollar sign
			prepended--this is how VMS treats uppercase filenames.
		Version 3, 11-Oct-1996, William Thompson, GSFC
			Only prepend $ in VMS.
		Version 4, 22-Jan-1997, William Thompson, GSFC
			Modified to reflect reorganization of attitude files.
		Version 5, 30-Jan-1997, William Thompson, GSFC
			Fixed VMS bug introduced in version 4

 Contact     :	WTHOMPSON


read_hrts_im $SSW/soho/cds/idl/sci/data_anal/ql/line_fit/read_hrts_im.pro
[Previous] [Next]
 Project     : SOHO - CDS     
                   
 Name        : read_hrts_im
               
 Purpose     : Read a hrts image file from disk
               
 Explanation : 
               
 Use         : IDL> read_hrts_im,inf-array,anf-array,image-array
    
 Inputs      : None
               
 Opt. Inputs : None
               
 Outputs     : Header info. (inf,anf), HRTS-image
               
 Opt. Outputs: None
               
 Keywords    : None

 Calls       : None
 CALLED BY:
	hrts_w [1], hrts_w [2]
 Common      : None
               
 Restrictions: Can only read one special HRTS image at the moment
               
 Side effects: None
               
 Category    : ?
               
 Prev. Hist. : ?

 Written     : Nils Brynildsen, ITA, UiO, 29-June-1993
               
 Modified    : Version 1 Nils Brynildsen, ITA, UiO, 29-June-1993

 Version     : Version 1 29-June-1993


READ_HT $SSW/soho/lasco/idl/movie/read_ht.pro
[Previous] [Next]
 NAME:
	READ_HT

 PURPOSE:
	This procedure is used to read height-time files.

 CATEGORY:
	MOVIE

 CALLING SEQUENCE:
	READ_HT,Filename,

 INPUTS:
	Filename:	If filename is present then it is used immediately

 OUTPUTS:
	The procedure returns the contents of the height time file in the
	common block.

 CALLS: ***
	STR2UTC [1], STR2UTC [2], STR2UTC [3], TRIM, UTC2TAI
 CALLED BY:
	WRITE_HT, XCME_MES, XPLOT_HT
 COMMON BLOCKS:
	None

 RESTRICTIONS:
	The file should not have any blank lines.

 PROCEDURE:
   	Reads in the height-time file, stores the height, time and position
	angle into arrays.  Time is converted to tai.

 MODIFICATION HISTORY:
 	Written by:	Scott H. Hawley, NRL Summer Student, June 1996
       02 May 97       RAH, Made into a separate file
	30 Sep 97	RAH, Mods for version 2
	 3 Feb 98	RAH, Correct read of feature description, add array to comments
	 3 Jul 02	NBR, Provide for case of no feature description

 07/03/02 @(#)read_ht.pro	1.8 :LASCO IDL LIBRARY



read_ima $SSW/soho/lasco/idl/las-c2/calib5.pro
[Previous] [Next]
 NAME:                         read_ima
 PURPOSE:                      reads a image and their header
 CATEGORY:                     BASIC_INTERFACES
 CALLING SEQUENCE:             ima = read_ima(ima_name, hdrima, ichoice)
 INPUTS:                       ima_name  Name of image
                               hdrima    Header structure
                               ichoice   Type of header
                                         0 = IMA, 1 = BSC, 2=CAL, 3=C1
                                         4 = CCD. else external header
 OPTIONAL INPUT PARAMETERS:    None
 KEYWORD PARAMETERS:           None
 OUTPUTS:                      ima       Image frame
                               hdrima    Filled header structure
 OPTIONAL OUTPUT PARAMETERS:
 COMMON BLOCKS:                None
 SIDE EFFECTS:
 RESTRICTIONS:
 PROCEDURE:
 MODIFICATION HISTORY:         RAH 10/1/89
                               RAH 8/20/91  Added AES BSBD camera keywords
                               ALL 04/27/93 takes only standard KEYWORDS

 SCCS variables for IDL use

 @(#)read_ima.pro      1.1 7/6/92 :NRL Solar Physics


READ_IMA_FRAME $SSW/soho/lasco/idl/las-c2/calib5.pro
[Previous] [Next]
 NAME:                         READ_IMA_FRAME
 PURPOSE:                      reads a image frame from disk
 CATEGORY:                     BASIC_INTERFACE
 CALLING SEQUENCE:             a = read_ima_frame(name,bitpix,nx,ny)
 INPUTS:                       name = string of the name of the file to read
                               bitpix = nb of bits/pixel
                               nx =  nb de pixels en x
                               ny =  nb de pixels en y
 OPTIONAL INPUT PARAMETERS:    None
 KEYWORD PARAMETERS:           None
 OUTPUTS:                      a = array containing the image
 OPTIONAL OUTPUT PARAMETERS:   None
 COMMON BLOCKS:                None
 SIDE EFFECTS:
 RESTRICTIONS:
 PROCEDURE:
 MODIFICATION HISTORY:         RAH 7/2/90
                               rah 3/21/90 to account for non-integer input fil
                               es
                               rah 3/33/90 to check for datamax & datamin
                               ALL 5/12/93
 SCCS variables for IDL use

 @(#)read_ima_frame.pro        1.3 4/10/93 :NRL Solar Physics


read_ima_hdr $SSW/soho/lasco/idl/las-c2/calib5.pro
[Previous] [Next]
 NAME:                 read_ima_hdr
 PURPOSE:              function procedure to read header from disk file, f
                       and store in a standard header structure type
 CATEGORY:             BASIC_INTERFACES
 CALLING SEQUENCE:     read_ima_hdr,ima_name,ima_header
 INPUTS:               ima_name = string containing the header filename
                       ima_header = structure
                       verbose = 1, print all absent variables
                       verbose = 0, print only a resumee
 OPTIONAL INPUT PARAMETERS:    None
 KEYWORD PARAMETERS:   None
 OUTPUTS:              ima_header = header structure from disk
 OPTIONAL OUTPUT PARAMETERS:
 COMMON BLOCKS:        None
 SIDE EFFECTS:
 RESTRICTIONS:
 PROCEDURE:
 MODIFICATION HISTORY:         RAH 10/1/89, ACG 11/21/89, rah 1/9/91
                               rah 3/15/91 to account for unrecognized keyword
                               rah 8/20/91 to trim leading and trailing blanks
                               DW  8/27/91 change delimiter to '='
                               DW  2/26/93 put TEMP_FNG in TEMP as well
                               All 4/25/93 for VMS image files in general
                                           Common supression
 SCCS variables for IDL use

 @(#)read_ima_header.pro       1.3 4/10/93 :NRL Solar Physics


READ_IMG $SSW/soho/lasco/idl/display/read_img.pro
[Previous] [Next]
 NAME:				READ_IMG
 PURPOSE:			reads a ccd image from disk
 CATEGORY:			C1
 CALLING SEQUENCE:		a = read_img(filename)
				a = read_img(filename,hdr)
 INPUTS:			filen = string of the name of the file to read
 OPTIONAL INPUT PARAMETERS:	None
 KEYWORD PARAMETERS:		nx - number of rows
                               ny - number of coloumns
                               data_type - data type in bytes
 OUTPUTS:			a = array containing the image
 OPTIONAL OUTPUT PARAMETERS:	hdr = header to read from disk
 COMMON BLOCKS:		writes the header to ccd_header
 SIDE EFFECTS:			
 RESTRICTIONS:                 None
 PROCEDURE:
 MODIFICATION HISTORY:		bp 3/16/93

 SCCS variables for IDL use
 
 @(#)read_img.pro	1.0  3/16/93 : MPAe


READ_IP_DAT $SSW/soho/lasco/idl/convert/read_ip_dat.pro
[Previous] [Next]
 NAME:
	READ_IP_DAT

 PURPOSE:
	Returns an array of structures comtaining defined
	image processing id codes and descriptions.

 CATEGORY:
	LASCO CONVERT

 CALLING SEQUENCE:
	Result = READ_IP_DAT ()

 INPUTS:
	None

 OUTPUTS:
	Result = array of structures containing:
		Result.ip_num    ;int: compression type as understood by OBE
		Result.ip_char   ;string: 1 character compression code 
		Result.ip_description  	;string: String describing compression step 

 CALLS: ***
	FILEPATH, GET_DB_STRUCT
 CALLED BY:
	CNVRT_IP
 RESTRICTIONS:
	The file cnvrt_ip.dat must exist in $NRL_LIB/lasco/convert

 MODIFICATION HISTORY:
         Written,  SE Paswaters, NRL
   Version 1  sep  13 Jun 1996
     Karl Battams   2 Nov 2005 - Add swap_if_little_endian keyword for opening binary data files

       @(#)read_ip_dat.pro	1.6 11/02/05  LASCO IDL LIBRARY


READ_KAP $SSW/soho/gen/idl/plan/science/read_kap.pro
[Previous] [Next]
 Project     :	SOHO - CDS/SUMER

 Name        :	READ_KAP()

 Purpose     :	Reads in a KAP file.

 Explanation :	Reads in a KAP file, and stores the information in the
		appropriate databases.

 Use         :	Result = READ_KAP( FILENAME )

		Result = READ_KAP( FILENAME, IGNORE='CDS')
		Result = READ_KAP( FILENAME, IGNORE='SUMER')

 Inputs      :	FILENAME = The name of the file to read.

 Opt. Inputs :	None.

 Outputs     :	The result of the function is a logical value representing
		whether or not the operation was successful, where 1 is
		successful and 0 is unsuccessful.

 Opt. Outputs:	None.

 Keywords    :	IGNORE	 = If passed, then contains the name or code value (see
			   GET_INSTRUMENT) of an instrument to ignore when
			   reading in SCIPLAN entries.  This is so that one can
			   avoid overwriting one's own SCIPLAN entries, if
			   desired.

		ERRMSG   = If defined and passed, then any error messages will
			   be returned to the user in this parameter rather
			   than being handled by the IDL MESSAGE utility.  If
			   no errors are encountered, then a null string is
			   returned.  In order to use this feature, the string
			   ERRMSG must be defined first, e.g.,

				ERRMSG = ''
				Result = READ_KAP( FILENAME, ERRMSG=ERRMSG )
				IF ERRMSG NE '' THEN ...

               NOPURGE  = set to not purge the DB's each time
                          (useful when calling the routine in a loop)

               NOSET     = skip updating KAP version file

               NORES     = skip updating resource DB

 Calls       : ***
	ADD_INST_DLYD, ADD_NRT_RES, ADD_OTHER_OBS, ADD_RESOURCE, ADD_TEL_MODE
	ADD_TEL_SUBMODE, ANYTIM2TAI, ANYTIM2UTC [1], ANYTIM2UTC [2], BEGIUN, CLR_NRT_RES
	CLR_OTHER_OBS, CLR_RESOURCE, CLR_TEL_MODE, CLR_TEL_SUBMODE, COPY_STRUCT [1]
	COPY_STRUCT [2], COPY_STRUCT [3], DATATYPE [1], DATATYPE [2], DATATYPE [3]
	DEF_INST_PLAN, DELVARX [1], DELVARX [2], DELVARX [3], DELVARX [4], DPRINT, EXIST
	GET_INSTRUMENT, GET_KAP_TIMES, GET_PLAN_ITIME, GET_SOHO_INST, KAP_VERS
	LAST_KAP_VERS, LIST_PLAN, LIST_RES_TYPE, LIST_SOHO_DET, MK_PLAN_CHANGE
	MK_PLAN_WRITE, OPEN_KAP, PRG_PLAN, PRG_SOHO_DET, READ_KAP_ITEM, SET_KAP_VERS
	STR_FORMAT, TAG_EXIST [1], TAG_EXIST [2], TRIM, TRIM2, WHERE_VECTOR, WHICH_INST
	delvarx [5]
 CALLED BY:
	UPDATE_IAP, UPDATE_KAP
 Common      :	None.

 Restrictions:	When using the CDS database system, !PRIV must be 3 or greater
		to use this routine.  This restriction is enforced except in
		VMS, where it is assumed that the Oracle-based SUMER system is
		used instead.

 Side effects:	None.

 Category    :	Planning, science.

 Prev. Hist. :	None.

 Written     :	William Thompson, GSFC, 3 April 1995

 Modified    :	Version 1, William Thompson, GSFC, 10 April 1995
		Version 2, William Thompson, GSFC, 11 April 1995
			Added IGNORE keyword
		Version 3, William Thompson, GSFC, 12 April 1995
			Added support for PROGRAM item.
		Version 4, William Thompson, GSFC, 13 April 1995
			Added support for OTHER_OBS item.
		Version 5, William Thompson, GSFC, 19 May 1995
			Modified to ignore MDI's "Struct_Prog" program which
			overlaps other MDI programs.
		Version 6, William Thompson, GSFC, 22 May 1995
			Modified to write to database at end, to speed up.
		Version 7, William Thompson, GSFC, 24 May 1995
			Added called to PRG_ routines.
			Added call to SET_KAP_VERS.
		Version 8, William Thompson, GSFC, 8 August 1995
			Modified to ignore MDI's "FD_Mag" program which
			overlaps other MDI programs.
		Version 9, Dominic Zarro, GSFC, 8 March 1996
			Added reading of DELAYED commanding DB
               Version 10, Dominic Zarro, GSFC, 16 June 1996
                       Added NOPURGE keyword and clearing of SCI and DET
                       databases
               Version 11, Dominic Zarro, GSFC, 10 January 1997
                       Centralized clearing and adding of resources
                       Made IGNORE a vector

 Version     :	Version 10


READ_KAP_ITEM $SSW/soho/gen/idl/plan/science/read_kap_item.pro
[Previous] [Next]
 Project     :	SOHO - CDS/SUMER

 Name        :	READ_KAP_ITEM

 Purpose     :	Reads an item from a KAP

 Explanation :	Reads the next recognizable item from an ECS Keyword-formatted
		Activity Plan (KAP) file.  The file must have been opened first
		with OPEN_KAP.  If the end of the file is reached, the file is
		closed automatically.

 Use         :	READ_KAP_ITEM, UNIT, TYPE, ITEM

		OPEN_KAP, UNIT, FILENAME
		TYPE = 'Test'
		WHILE TYPE NE '' THEN BEGIN
			READ_KAP_ITEM, UNIT, TYPE, ITEM
			...
		ENDWHILE

 Inputs      :	UNIT	 = Unit number from OPEN_KAP

 Opt. Inputs :	None.

 Outputs     :	TYPE	 = The type of item read in.  If nothing was found,
			   then this will be the null string.
		ITEM	 = Structure containing the item read in.  The format
			   of this structure will depend on the type of item.

 Opt. Outputs:	None.

 Keywords    :	ERRMSG   = If defined and passed, then any error messages will
			   be returned to the user in this parameter rather
			   than being handled by the IDL MESSAGE utility.  If
			   no errors are encountered, then a null string is
			   returned.  In order to use this feature, the string
			   ERRMSG must be defined first, e.g.,

				ERRMSG = ''
				READ_KAP_ITEM, UNIT, TYPE, ITEM, ERRMSG=ERRMSG
				IF ERRMSG NE '' THEN ...

 Calls       : ***
	CHECK_KAP_ANOMALY, DPRINT, GET_INSTRUMENT, GET_OBJECT, GET_SOHO_INST, STR2ARR [1]
	STR2ARR [2], TAG_EXIST [1], TAG_EXIST [2], TRIM, UTC2TAI, is_number [1]
	is_number [2]
 CALLED BY:
	READ_KAP
 Common      :	None.

 Restrictions:	The file must have been opened with OPEN_KAP.

 Side effects:	None.

 Category    :	Planning, science

 Prev. Hist. :	None.

 Written     :	William Thompson, GSFC, 16 February 1995

 Modified    :	Version 1, William Thompson, GSFC, 31 March 1995
		Version 2, William Thompson, GSFC, 13 April 1995
			Fixed bug with OTHER_OBS
		Version 3, William Thompson, GSFC, 19 May 1995
			Remove trailing spaces from mnemonic.
		Version 4, William Thompson, GSFC, 22 May 1995
			Modified so that all returned structures are named.
		Version 5, William Thompson, GSFC, 9 August 1995
			Modified so that STATUS is assumed to be CONFIRMED
			unless specified otherwise.
		Version 6, William Thompson, GSFC, 18 August 1995
			Added tags XCEN, YCEN for SCIPLAN entries.
		Version 7, William Thompson, GSFC, 5 February 1996
			Added NOTES tag to KAP_PROGRAM structure.
			Added STATUS tag to KAP_ACTIVITY structure.
               Version 8, Dominic Zarro, ARC/GSFC, 26 Februrary 1996
                       Added check for anomalous use of activity keywords
                       (e.g. ACTIVITY_PAYLOAD_RESERVED)
               Version 9, Dominic Zarro, GSFC, 24 April 1996
                       Converted SCIPLAN slots for CELIAS, SWAN, and ERNE
                       for use by JOP, SOC, and CMP

 Version     :	Version 9, 24 April 1996


READ_KEY [3] $SSW/soho/mdi/idl_old/gen/ssw_lib/read_key.pro
[Previous] [Next]
 Project     :	SOHO - CDS

 Name        :	
	READ_KEY

 Purpose     :	
	Returns ASCII equivalent of keystroke.

 Explanation :	
	Reads a keystroke and return its ASCII equivalent, unless an
	ESCAPE sequence was produced.  In that case, if the sequence is
	recognized, a code is returned.

 Use         :	
	key = READ_KEY(Wait)

 Inputs      :	
	Wait  -  The wait flag.  If non-zero, execution is halted until a
	         key is struck.  If zero, execution returns immediately and
	         a zero is returned if there was no keystroke waiting in the
	         keyboard buffer.  If not specified, zero is assumed.

 Opt. Inputs :	None.

 Outputs     :	
	Returned - The key struck.  The ASCII code for non-escape sequences.
	           Escape sequence equivalents:
			Up Arrow     --  128
			Down Arrow   --  130
			Left Arrow   --  129
			Right Arrow  --  131
			Else         --    0

	The return value is a byte value.

 Opt. Outputs:	None.

 Keywords    :	None.

 Calls       :	None.
 CALLED BY:
	SELECT_O [1], SELECT_O [2], SELECT_O [3], SELECT_X
 Common      :	None.

 Restrictions:	None.

 Side effects:	None.

 Category    :	Utilities, user_interface.

 Prev. Hist. :	
	Written by Michael R. Greason, STX, 22 June 1990.
	Rewritten for a SUN workstation.  MRG, STX, 23 August 1990.

 Written     :	Michael R. Greason, STX, 22 June 1990.

 Modified    :	Version 1, William Thompson, GSFC, 30 March 1995
			Incorporated into CDS library

 Version     :	Version 1, 30 March 1995


READ_LASCO_SPECTRA $SSW/soho/lasco/idl/inout/read_lasco_spectra.pro
[Previous] [Next]
 NAME:
	READ_LASCO_SPECTRA

 PURPOSE:
	This procedure reads the LASCO filter spectral data

 CATEGORY
	CALIBRATION

 CALLING SEQUENCE:
	READ_LASCO_SPECTRA,Fname,Wl,Int,Np

 INPUTS:
	Fname:	String containing the file name

 Outputs:
	Wl:	Array containing the wavelengths
	Int:	Array containing the intensities
	Np:	Number of points in the array

 OPTIONAL OUTPUTS:
	Title:	Title of file

 CALLED BY:
	PLOT_LASCO_SPECTRA
 MODIFICATION HISTORY:
	Written by R.A. Howard, NRL

 @(#)read_lasco_spectra.pro	1.1 07/31/97 :NRL Solar Physics


READ_LIMB_DARK $SSW/soho/lasco/idl/inout/read_limb_dark.pro
[Previous] [Next]
 NAME:
	READ_LIMB_DARK

 PURPOSE:
	This procedure reads the LASCO filter spectral data

 CATEGORY
	CALIBRATION

 CALLING SEQUENCE:
	READ_LIMB_DARK,Wavel,Limbdark

 INPUTS:
	None

 Outputs:
	Wavel:		An array of wavelengths in nm
	Limbdark:	An array of limb darkening parameters

 MODIFICATION HISTORY:
	Written by R.A. Howard, NRL, Nov 29, 1998

 @(#)read_limb_dark.pro	1.1 11/28/98 :LASCO IDL LIBRARY



read_ltc file $SSW/soho/mdi/idl/cal/ltc.pro
[Previous] [Next]
FUNCTION: read_ltc, file 
 CALLS:


read_mdi $SSW/soho/mdi/idl/cal/read_mdi.pro
[Previous] [Next]
NAME:
	read_mdi
PURPOSE:
	To read MDI FITS files, telemetry files, or Microvax "F0" files
SAMPLE CALLING SEQUENCES:
	read_mdi, '/umbradata3/optest/940222_190446', [0,1,2], img, h
	read_mdi, '/umbradata2/optest/pdist616.',     [3,4,5], img, h
	read_mdi, 621, indgen(20), img, h

	read_mdi, seq_filnam, images, code, txtnam, /type_info

	read_mdi, seq_filnam, dummy, all_files, /list_files
INPUT:
	seq_filnam	- Integer ==> sequence number and it is 
				      FITS file on quake
			  (OR 4 character string with first 3 char as integer)
			- String with first 6 characters as integers
				  ==> telemetry file
			- Otherwise ==> Microvax/IDL "F0" file
	images		- List of images to read
			  Count from 0, so add one for telemetry reader
 CALLS: ***
	BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], CONCAT_DIR [1], CONCAT_DIR [2]
	CONCAT_DIR [3], FILE_EXIST [2], FZRD, MASK, NIMG_IN_TFR, RDHR, RFITS [1], RFITS [2]
	RFITS [3], STR2ARR [1], STR2ARR [2], SXADDPAR [1], SXADDPAR [2], SXADDPAR [3]
	SXPAR [1], SXPAR [2], SXPAR [3], anytim [1], anytim [2], anytim [3], anytim [4]
	anytim [5], anytim2ints [1], anytim2ints [2], break_file [4], ccd_hdr_info
	concat_dir [4], data_type [1], data_type [2], file_exist [1], file_exist [3]
	file_list [1], file_list [2], mk_fits_head [1], mk_fits_head [2], prstr [1]
	prstr [2], rdtfr
 CALLED BY:
	awbinchk, cal_pol, check_dumps [1], check_ff_load, chkffscl, disp_sci160k [1]
	disp_sci160k [2], do_fit_gcross, dpc_img_summary
	exp_scale min_exp max_exp [1], get_linearity sig e_min e_max, ipcom
	jitter_gif_xyimg, ltc, make_fake_dark, mdi_comp_eff, mdidust, mdifocus2, mdiiss
	mdimrot, mdipdist, mdipict, mdiprot, mk_mdi_fits, monitor_center [1], rd_obs4
	read_ltc file, read_mdi16, tfr_summary, tfr_summary2
	to check data generated by the IP instruction TWAVG
	to display data generated by the ip_test procedure, wrt_sci160k_img
	xcheckip, xdisp_tfr, xset_chain [1], xset_chain [2]
OPTIONAL KEYWORD INPUT:
	type_info	- if set, then return the type of input file
			  and a string which is the text file output
			  filename.
	list_files	- If set, then return the .FITS files in that
			  directory
	nimages		- If set, then return the number of images for
			  that sequence or telemetry file
OPTIONAL OUTPUT:
	code		- if /TYPE_INFO is set, return input data type
				0 = FITS file on quake	
				1 = telemetry file	
				2 = Microvax/IDL "F0" file
	txtfil		- if /TYPE_INFO is set, return text filename
			  For the examples above:
				"940222_190446"
				"pdist616"
				"seq612"
HISTORY:
	Written Feb-94 by M.Morrison
	15-Mar-94 (MDM) - Modified to convert the time returned by
			  RDTFR and create a FITS header
	18-Mar-94 (MDM) - Modification so that FITS header is created
			  properly for telemetry file
	30-mar-94 (MDM) - Modified to allow "SEQ_FILNAM" to be a
			  4 character string with first 3 char as integer
			  and be recognized as a FITS file
	 4-Apr-94 (MDM) - Added /nimages option
	 5-Apr-94 (MDM) - Modified to put the CCD temperature into the
			  FITS header from the telemetry integer array hdr
	 6-Apr-94 (MDM) - Added "tfr_head" optional output
			- Added M1TUNE and M2TUNE info into FITS header
	 7-Apr-94 (MDM) - Added /RDHR option
	12-Apr-94 (MDM) - Modified to recognize telemetry file names
			  if first three leters are "tlm"
	15-Apr-94 (MDM) - Modified how CAT series are recognized
	26-May-94 (MDM) - Added M1TUNE and M2TUNE into FITS header
			  when reading FITS file (gotten from SEQID)
			- REMOVED ^^ code
	15-Jun-94 (MDM) - Add M1TUNE and M2TUNE to FITS header
			  by first checking DESCR_D and _E and then
			  check SEQID if it is 0 in _D and _E.
	17-Jun-94 (MDM) - Added /QSTOP and /QDEBUG
	21-Jun-94 (MDM) - Added check of /mdisw/dbase/cal/info/lev0log if
			  /home/soi/data/lev0log did not give results.
	 9-Aug-94 (MDM) - Added DIR_MANUAL option to override locations
			  of the FITS files (the default is to figure out
			  the directory by looking in /home/soi/data)
			- Modified to figure out FITS files location on
			  non-stanford machines by looking in /md55/fits.
	 1-Sep-94 (MDM) - Corrected error introduced 9-Aug-94 when running
			  on quake
	 6-Sep-94 (MDM) - Corrected error when rotation of the image was
			  needed.
			- Changed logic when reading out of lev0log file 
			  to use the last entry listed (for case of
			  double listing as in apr903)
	 6-Oct-94 (MDM) - Added patch so that the OCT series files which
			  are not simply 0000.fits can be read.
	 7-Oct-94 (MDM) - Modified to use "EUR" for datasets over 2000
	20-Dec-94 (MDM) - Modified to be able to read multiple 1-D 
			  vector datasets.  Previously it only allowed
			  multiple 2-D datasets.
	28-Mar-95 (MDM) - Added /NODATA option
			- Changed the time calculation to use double
	20-Apr-95 (MDM) - Modified to work on new DSDS "raw" directory
	26-May-95 (MDM) - Modified to check $MDI_CAL_INFO for the "lev0log"
			  file first and then /home/soi/data/lev0log
			  (it previously did the opposite order)
	 1-Jun-95 (MDM) - Put more debugging statements in
	30-Jun-95 (MDM) - Changed the DSDS warning message (not online/doesn't
			  exist)
			- Changed FILE_LIST to use ???? instead of *
	13-Oct-95 (MDM) - Expanded FITS header generated when reading TFR file
			  to have the DPC and SEQID
	30-Apr-96 (MDM) - Modified to use CCD_HRD_INFO to get the DPC and SEQID
			  values
			- Added FRAMEN and REFTIME keywords to the FITS header
	28-Mar-97 (MDM) - Added offset locations (X_OFFSET and Y_OFFSET)
			- Added binning (X_SCALE and Y_SCALE)
      4-Jan-2000 (RIB) - Changed way REFTIME, DATE-OBS, TIME-OBS are calculated
                         removed M1TUNE & M2TUNE, added DPC_STR & SQID


read_mdi16 $SSW/soho/mdi/idl/cal/read_mdi16.pro
[Previous] [Next]
NAME:
	read_mdi16
PURPOSE:
	Read the 16 parts of an image and build it into a 
	1024x1024 image
SAMPLE CALLING SEQUENCE:
	read_mdi16, infil, dpc, frame, img, h
	infil = '/data13/data_eof/sci160k/960523/960523_152153'
	read_mdi16, infil, '40512400'x, 6, img, h, /clean
	read_mdi16, infil, '40502400'x, indgen(10)+1, img, h
	infil = '/data14/data_eof/sci160k/960724/960724_152951
	read_mdi16, infil, '40502400'x, indgen(10)+1, img, h
INPUTS:
	infil	- The TFR input file name
	dpc	- The dpc to get
			'40502400'x == ltc
			'40512400'x == darks
	frame	- The frame number(s) to get (repeats within 
		  a minute).  It's usually a different exposure
		  duration per frame.
OUTPUT:
	img	- the image data
	h	- the FITS header
 CALLS: ***
	ccd_hdr_info, data_type [1], data_type [2], list_tfi, read_mdi
OPTIONAL KEYWORD INPUT:
	clean	- If set, then mask out all values <0 and >4096.
		  It set's those values to -1
HISTORY:
	Written 2-Jul-96 by M.Morrison
	22-Aug-96 (MDM) - Added stdset
			- Made it read only 16 of a given frame


READ_MERGED_DSN $SSW/soho/gen/idl/plan/science/read_merged_dsn.pro
[Previous] [Next]
 Project     :	SOHO - CDS

 Name        :	READ_MERGED_DSN

 Purpose     :	Read DSN-27 passes from the dsn_merged file.

 Explanation : This function tries to find the merged_dsn file.  If available, 
 		it reads the pass information from the file and extracts the 
		DSN 27 passes into an array.

 Use         :	d27 = READ_MERGED_DSN (tstart, tend, /INCLUSIVE, /TRUNCATE)

 Inputs      :	None.

 Opt. Inputs : tstart	The earliest time to extract DSN 27 passes from the
			file in any acceptable time format.  The interpretation
			of this parameter varies depending on if the /INCLUSIVE
			keyword is set.  If not included, then all DSN 27 from
			the file will be returned.

		tend	The latest time to extract DSN 27 passes from the
			file in any acceptable time format.  The interpretation
			of this parameter varies depending on if the /INCLUSIVE
			keyword is set.  May only be included if the parameter
			tstart is also included.

 Outputs     :	None.

 Opt. Outputs:	None.

 Keywords    : inclusive	When set, any passes intersecting the start or 
				end times specified by the inputs tstart and 
				tend will be returned.  Otherwise, only passes
				which fall completely within the boundries 
				delineated by tstart and tend will be returned.

		truncate	Trim the times of DSN 27 passes returned by this
				function so that no pass begins earlier then
				tstart and no pass ends later then tend.  This
				only make sense in conjuction with the INCLUSIVE
				keyword 

 Returns     : An array of structures with the following tags:

			START_TIME:	Starting time of pass in TAI format 
			END_TIME: 	Ending time of pass in TAI format
			PASS_DURATION:	Pass duration in seconds
			RES_NAME:	'DSN_27', 

		In the event that no DSN 27 pass are found then, a single
		structure will be returned with only the RES_NAME tag defined.

 CALLS: ***
	ANYTIM2UTC [1], ANYTIM2UTC [2], GET_UTC, IS_DIGIT, UTC2TAI, file_list [1]
	file_list [2]
 CALLED BY:
	MK_PLAN_READ
 Common      :	None.

 Restrictions:	The enviroment variable CDS_DSN_MERGE should be defined and point
		to the location of the file dsn_merged.dat.  If this enviroment
		variable is not defined, then the fuction will look for this file
		in its default directory.

 Side effects:	None.

 Category    :	Planning

 Prev. Hist. :	None.

 Written     :	Ronald Yurow (EITI)

 Modified:   : Ronald Yurow, EITI, October 5, 2001
                  Initial Release
		Ronald Yurow, EITI, October 15, 2001
		   Modified structure tag names to insure compatibility
		   with other software modules.

 Version     :	Version 2, October 15, 2001


READ_MONEXP_DATA $SSW/soho/lasco/idl/expfac/read_monexp_data.pro
[Previous] [Next]
 NAME:
	READ_MONEXP_DATA

 PURPOSE:
	This procedure reads in the MONEXP data for the given telescope and date.

 CATEGORY:
	LASCO data analysis

 CALLING SEQUENCE:
	READ_MONEXP_DATA,Tel,Dtea,Dteb

 INPUTS:
	Tel:	String giving the telescope: C1, C2, C3
	Dtea:	First date to be read in, either YYMMDD, or MJD or UTC
	Dteb:	Last date to be read in, either YYMMDD, or MJD or UTC

 KEYWORD PARAMETERS:
	NOSORT:	If set then the MONEXP data are not sorted by time.  The default is
		to sort the data

 OUTPUTS:
	Stores data into the common array

 CALLS: ***
	STRPAD, UTC2YYMMDD, YYMMDD2UTC
 CALLED BY:
	CHECK_MONEXP_DUPS, COMPUTE_MONEXP_FACTORS, CORR_ALLSUBS, PLOT_MONEXP_STD
 COMMON BLOCKS:
	MONEXP_DATA

 SIDE EFFECTS:
	Reads in the data files of the form, $MON_EXP/cx_monexp_yymmdd.dat
		where cx is c1, c2, c3, or c4
		and   yymmdd is the year, month, day

 RESTRICTIONS:

 PROCEDURE:

 MODIFICATION HISTORY:
 	Written by:	RAHoward, NRL, June 2 1997
	Modified:	11/11/97  RAH	Check to see if MON_EXP file exists
	         	06/06/97  RAH	Added nosort option, check for nrec=0
	         	12/18/98  RAH	Added check for compressed files
	         	10/20/05  RAH	Added swap if little endian to OPEN

	@(#)read_monexp_data.pro	1.10 10/20/05 LASCO IDL LIBRARY


READ_MSP_FILE $SSW/soho/gen/idl/plan/msproject/read_msp_file.pro
[Previous] [Next]
 Project     :	SOHO - CDS/SUMER

 Name        :	READ_MSP_FILE()

 Purpose     :	Reads in a Microsoft Project file.

 Explanation :	Reads in a Microsoft Project file, and stores the 
               information in the appropriate databases.

 Use         :	Result = READ_MSP_FILE ( FILENAME )

		Result = READ_MSP_FILE ( FILENAME, IGNORE='CDS')
		Result = READ_MSP_FILE ( FILENAME, IGNORE='SUMER')

 Inputs      :	FILENAME = The name of the file to read.

 Opt. Inputs :	None.

 Outputs     :	The result of the function is a logical value representing
		whether or not the operation was successful, where 1 is
		successful and 0 is unsuccessful.

 Opt. Outputs:	None.

 Keywords    :	IGNORE	 = If passed, then contains the name or code value 
                          (see GET_INSTRUMENT) of an instrument to ignore when
			   reading in entries.  This is so that one can
			   avoid overwriting one's own SCIPLAN entries, if
			   desired.

               SVM      = If passed, then this keyword will cause activities 
                          for the spacecraft (SVM) to be processed and 
                          entered into the database.  Normally, spacecraft 
                          activities are ignored.

               BLOCK    = If passed, then this keyword will block header
                          activities -- which are used to group experiment
                          activities into blocks -- will be processed and
                          entered into the database.  Normally, block header
                          activities are ignored.  Note setting this flag may
                          cause other software to crash since the block header
                          activity will span the same time frame as all of
                          the activities in the block.

		ERRMSG   = If defined and passed, then any error messages will
			   be returned to the user in this parameter rather
			   than being handled by the IDL MESSAGE utility.  If
			   no errors are encountered, then a null string is
			   returned.  In order to use this feature, the string
			   ERRMSG must be defined first, e.g.,

		           ERRMSG = ''
		           Result = READ_MSP_FILE (FILENAME, ERRMSG=ERRMSG )
				IF ERRMSG NE '' THEN ...

 Calls       : ***
	DATATYPE [1], DATATYPE [2], DATATYPE [3], GET_INSTRUMENT, GET_UTC, OPEN_MSP_FILE
	PRG_PLAN, READ_MSP_ITEM, UPD_PLAN, UTC2TAI
 Common      :	None.

 Restrictions:	When using the CDS database system, !PRIV must be 3 or greater
		to use this routine.  This restriction is enforced except in
		VMS, where it is assumed that the Oracle-based SUMER system is
		used instead.

 Side effects:	None.

 Category    :	Planning, science.

 Prev. Hist. :	This procedure is based on READ_KAP, version 8.
               Written by William Thompson, GSFC, 8 August 1995.

 Written     :	Ron Yurow, 7 November 1995

 Modified    :	Version 1, Ron Yurow, 7 November 1995

 Version     :	Version 1, 7 November 1995


READ_MSP_ITEM $SSW/soho/gen/idl/plan/msproject/read_msp_item.pro
[Previous] [Next]
 Project     :	SOHO - CDS/SUMER

 Name        :	READ_MSP_ITEM

 Purpose     :	Reads an item from a Microsoft Project file.

 Explanation :	Reads the information in the next line of a Microsoft 
               Project file.  The file must have been opened first
		with OPEN_MSP_FILE.  If the end of the file is reached, 
               the file is closed automatically.

 Use         :	READ_MSP_ITEM, UNIT, TYPE, ITEM

		OPEN_MSP_FILE, UNIT, FILENAME
		TYPE = 'Test'
		WHILE TYPE NE '' THEN BEGIN
			READ_MSP_ITEM, UNIT, TYPE, ITEM
			...
		ENDWHILE

 Inputs      :	UNIT	 = Unit number from OPEN_MSP_FILE

 Opt. Inputs :	None.

 Outputs     :	TYPE	 = The type of item read in.  If nothing was found,
			   then this will be the null string.  Otherwise
                          this parameter will be MSPBLOCK

		ITEM	 = Structure containing the item read in.  The format
			   of this structure is as follows:

                          NAME :     MSP_ITEM

                          TAGS :     LINE_NO           INTEGER
                                     INSTRUME          CHARACTER STRING
                                     BLOCK_NO          INTEGER
                                     SUB_BLOCK_NO      INTEGER
                                     AUX_BLOCK_NO      INTEGER
                                     BLOCK_LABEL       CHARACTER STRING
                                     OBJECTIVE         CHARACTER STRING
                                     START_TIME_STR    CHARACTER STRING
                                     END_TIME_STR      CHARACTER STRING
                                     START_TIME        DOUBLE
                                     END_TIME          DOUBLE
                                     RESOURCE_STR      CHARACTER STRING
                                     DURATION_STR      CHARACTER STRING

 Opt. Outputs:	None.

 Keywords    :	ERRMSG   = If defined and passed, then any error messages 
                          will be returned to the user in this parameter 
                          rather than being handled by the IDL MESSAGE 
                          utility.  If no errors are encountered, then a 
                          null string is returned.  In order to use this 
                          feature, the string ERRMSG must be defined first,
                          e.g.,

			     ERRMSG = ''
			     READ_MSP_ITEM, UNIT, TYPE, ITEM, ERRMSG=ERRMSG
			       IF ERRMSG NE '' THEN ...

 Calls       : ***
	CNVRT_MSPTIME, GET_INSTRUMENT, GET_SECTION_NO, STR2UTC [1], STR2UTC [2]
	STR2UTC [3], UTC2TAI
 CALLED BY:
	READ_MSP_FILE
 Common      :	None.

 Restrictions:	The file must have been opened with OPEN_MSP_FILE.

 Side effects:	None.

 Category    :	Planning, science

 Prev. Hist. :	This procedure is based on READ_KAP_ITEM, version 6.
               Written by William Thompson, GSFC, 18 August 1995.

 Written     :	Ron Yurow, 7 November 1995

 Modified    :	Version 1, Ron Yurow, 7 November 1995

 Version     :	Version 1, 7 November 1995


READ_MVI $SSW/soho/lasco/idl/movie/read_mvi.pro
[Previous] [Next]
PRO READ_MVI, lu, file_hdr, ihdrs, imgs, swapflag, NO_COLOR=no_color, RGBVEC=rgbvec

 Project     : SOHO - LASCO/EIT

 Name        : READ_MVI

 Purpose     : Read MVI format files

 Use         : IDL> openr,1,'file.mvi'
		IDL> read_mvi, 1, mvihdr, framehdrs, images

 Inputs      : 
	lu	INT	logical unit of MVI file to read

 Optional Inputs:

 Outputs     :
	file_hdr  STRUCT	describes movie
	ihdrs  	BYTE File Array	describes frame headers
	imgs  	BYTE File Array	descrives frame data (images)
	swapflag  BYTE	byte-swap ON (1) or OFF (0)

 Keywords    :
	/NO_COLOR	Do not load color tables in mvi file 
	RGBVEC=[r,g,b]	Returns color table vectors

 Comments    :

 CALLED BY:
	COMBINE_MVI, MAKE_DIFF_MPEG, MVI2DATA_CUBE, MVI2FRAMES, MVIPLAY, WRUNMOVIE [2]
	WRUNMOVIEM, WRUNMOVIEM_RT, mvi2gif, mvi_summary
 Side effects: creates structure FILE_HDR

 Category    : Image Display.  Animation.

 Added keyword rgbvec to allow color tables from mvi file to be passed back
 to calling routine. SPP (USRA/NRL) 97/10/10.

 Version     :
       @(#)read_mvi.pro	1.7, 09/23/04 : NRL LASCO LIBRARY

 Modifications:
	010711	the jake	Added Version 3 to handle RTHETA Movies
	011109  thejake		After testing, additions do not seem to have done any harm so adding
				WRUNMOVIEM3, MVIPLAY3, WRITE_DISK_MOVIE3, and READ_MVI3 to library.
				Once an MVI is written with the version 3 software, it will need to
				be read with it as well.
	030828, nbr - Incorporate read_mvi3.pro/RTheta header; add version 4 header w/ RECTIFY


READ_MVI3 $SSW/soho/lasco/idl/movie/read_mvi3.pro
[Previous] [Next]
 Project     : SOHO - LASCO/EIT

 Name        : READ_MVI3

 Purpose     :

 Use         : IDL>

 Inputs      :

 Optional Inputs:

 Outputs     :

 Keywords    :

 Comments    :

 CALLED BY:
	BREAK_FILE [2], MVIPLAY3, WRUNMOVIEM3
 Side effects:

 Category    : Image Display.  Animation.

 Added keyword rgbvec to allow color tables from mvi file to be passed back
 to calling routine. SPP (USRA/NRL) 97/10/10.


	010711	the jake	Added Version 3 to handle RTHETA Movies
	011109  thejake		After testing, additions do not seem to have done any harm so adding
				WRUNMOVIEM3, MVIPLAY3, WRITE_DISK_MOVIE3, and READ_MVI3 to library.
				Once an MVI is written with the version 3 software, it will need to
				be read with it as well.




 Version     :

 07/09/03 @(#)read_mvi3.pro	1.3 :LASCO IDL LIBRARY


READ_NIMCP_CAL $SSW/soho/cds/idl/sci/cal/vds/inten/read_nimcp_cal.pro
[Previous] [Next]
 Project     :	SOHO - CDS

 Name        :	READ_NIMCP_CAL

 Purpose     :	Read in NIMCP burn-in calibration files.

 Category    :	Class4, Calibration

 Explanation :	Reads in an NIMCP burn-in calibration file.  Two formats are
		supported.  The older format puts all the parameters on a
		single line, and has filenames like "nimcp_cal5.dat".

		The newer format is more self-describing, with a header line
		followed by lines describing the center position, width, shape
		parameter, and depth functions.  The depth function must come
		last for each line, and can consist of a series of functions
		which added together replicate the depth data.  These files
		have names like "nimcp_cal6a.dat".

		With the instrument changes that resulted from SOHO's accident
		in the summer of 1998, it was decided to split the burn-in
		description into three separate databases:

		"Old":	The files discussed above, describing the burn-in
			history up until the accident.

		"Pre":	Files with names like "nimcp_cal_pre1.dat", which
			describe how the pre-accident burned-in lines affects
			post-recovery data.  There is a slight format
			difference between "Pre" files and the other two
			databases in how the depth parameters are formatted and
			interpreted.

		"Post":	Files with names like "nimcp_cal_post1.dat", which
			describe the new post-recovery burned-in lines.  The
			"Pre" and "Post" files exist in pairs--e.g. one should
			use "nimcp_cal_pre3.dat" together with
			"nimcp_cal_post3.dat".  The version numbers should not
			be mixed.

		The "Old" database is used for pre-accident data, while the
		"Pre" and "Post" databases are used for post-recovery data.

		This routine is called from GET_NIMCP.

 Syntax      :	READ_NIMCP_CAL, FILENAME, OUTPUT  [, /FIND ]

 CALLED BY:
	GET_NIMCP
 Examples    :	To read in files explicitly by name

			READ_NIMCP_CAL, 'nimcp_cal3.dat', OUTPUT

			READ_NIMCP_CAL, 'nimcp_cal_pre1.dat', OUTPUT, /PRE
		
		To find the most recent "Old" database for pre-accident data:

			READ_NIMCP_CAL, FILENAME, OUTPUT, /FIND

		To find the most recent "Pre" database for post-recovery data:

			READ_NIMCP_CAL, FILENAME, OUTPUT, /FIND, /PRE

		To do the same, but allow failover to an "Old" database if no
		"Pre" database is found:

			PRE = 0
			READ_NIMCP_CAL, FILENAME, OUTPUT, /FIND, /POST, PRE=PRE

		The variable PRE will be returned as 1 if a "Pre" database was
		found, or 0 if it failed over to an "Old" database.

		To read in the "Post" database associated with a previously
		read-in "Pre" database.

			FILENAME = 'nimcp_cal_pre1.dat'
			MSG = ''
			READ_NIMCP_CAL, FILENAME, OUTPUT, /POST, ERRMSG=MSG

		If MSG is modified, then there is no associated "Post"
		database.

 Inputs      :	FILENAME = The name of the file to read in.

 Opt. Inputs :	None.

 Outputs     :	OUTPUT = An array of structures containing the NIMCP
		calibration data.  Each structure element contains the
		following tags:

			DET	= Either "N1" or "N2"
			CENTER	= The average center pixel position
			PC	= The polynomial describing the center pixel
				  position
			PW	= The polynomial describing the width
			PS	= The polynomial describing the shape parameter
			PD	= The polynomial describing the depth

 Opt. Outputs:	If FIND is set, then FILENAME is an output parameter rather
		than an input parameter.

 Keywords    :	FIND   = If set, then find the latest burn-in calibration file.
			 See the examples above for how the FIND keyword
			 interacts with the PRE and POST keywords.

		PRE    = If set, then read in a file describing the effect of
			 the pre-accident lines on post-accident data.  When
			 used with FIND, can also be used as an output
			 variable.  See the examples above.

		POST   = When used with /FIND, then finds the most up-to-date
			 calibration file for post-recovery data.  When /FIND
			 is not set, then reads in the "Post" file associated
			 with the "Pre" file as identified in the variable
			 FILENAME.  See the examples above.

		ERRMSG = If defined and passed, then any error messages will
			 be returned to the user in this parameter rather than
			 depending on the MESSAGE routine in IDL.  If no errors
			 are encountered, then the original string is returned.
			 In order to use this feature, ERRMSG must be defined
			 first, e.g.

				ERRMSG = ''
				READ_NIMCP_CA, ERRMSG=ERRMSG, ...
				IF ERRMSG NE '' THEN ...

 Calls       : ***
	BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], DATATYPE [1], DATATYPE [2]
	DATATYPE [3], DELVARX [1], DELVARX [2], DELVARX [3], DELVARX [4]
	FIND_WITH_DEF [1], FIND_WITH_DEF [2], FIND_WITH_DEF [3], NTRIM, STR_SEP
	break_file [4], delvarx [5]
 Common      :	None.

 Restrictions:	None.

 Side effects:	None.

 Prev. Hist. :	None.

 History     :	Version 1, 11-Jun-1998, William Thompson, GSFC
		Version 2, 06-Aug-1999, William Thompson, GSFC
			Added keywords PRE and POST
		Version 3, 12-Jan-2000, William Thompson, GSFC
			Search for "pre" files with both "a.dat" and ".dat"

 Contact     :	WTHOMPSON


READ_OCC_DAT $SSW/soho/lasco/idl/convert/read_occ_dat.pro
[Previous] [Next]
 NAME:
         READ_OCC_DAT

 PURPOSE:
         Returns an array of structures containing LASCO occulter centers, and EIT Sun Centers

 CATEGORY:
         LASCO CONVERT

 CALLING SEQUENCE:
         Result = READ_OCC_DAT ()

 INPUTS:
         None

 OUTPUTS:
         Result = 4 by 5 by 2 element array of structures containing:
			 4 for C1,C2,C3,EIT
			 5 for filter position
			 2 for valid dates (now have only two)
                   Result.xcen    ;double: x center of occulter
                   Result.ycen    ;double: y center of occulter
                   Result.mjd     ;long: start date of validity

 CALLS: ***
	FILEPATH, STR2UTC [1], STR2UTC [2], STR2UTC [3]
 CALLED BY:
	GET_SUN_CENTER [2], GET_SUN_CENTER [3], OCCLTR_CNTR
 RESTRICTIONS:
         The file occulter_center.dat must exist in $NRL_LIB/lasco/convert

 MODIFICATION HISTORY:
         Written,  SE Paswaters, NRL
         Version 1  sep  30 Aug 1996
         Version 2  rah  27 Nov 1998	added valid date
	11 Jan 2002, nbr - Change path for windows compatibility
       Karl Battams   2 Nov 2005 - Add swap_if_little_endian keyword for opening binary data files

 11/02/05 @(#)read_occ_dat.pro	1.9 :NRL Solar Physics



READ_PACKET_FNAMES $SSW/soho/lasco/idl/packets/read_packet_fnames.pro
[Previous] [Next]
 NAME:
	READ_PACKET_FNAMES

 PURPOSE:
	This routine reads in all packets specified by the files

 CATEGORY:
	LASCO PACKETS

 CALLING SEQUENCE:
	Result = READ_PACKET_FNAMES ( Files )

 INPUTS:
	Files:	A string or array of strings specifying the file names

 OUTPUTS:
	This function returns the packet information as a 2D array
	in which the packet information is the first dimension and time is
	the second dimension.

 CALLS: ***
	READ_TM_PACKET
 CALLED BY:
	READALLSV1, READALLSV2, READALLSV4
 COMMON BLOCKS:
	None

 PROCEDURE:
	Calls the routine READ_TM_PACKET
	Reformats the packet information from each file into a singly dimensioned
	array.  Then the information from each file can be concatenated together.
	When all files have been read in then the array can be reformatted into
	the 2D array.

 EXAMPLE:
	Read in the ECS housekeeping data for the files, files

		hk = READ_PACKET_FNAMES (files)

 MODIFICATION HISTORY:
 	Written by:	R.A. Howard, 1998
	Sep, 1998	Taken from READALLSV1

 @(#)read_packet_fnames.pro	1.1 09/24/98 :LASCO IDL LIBRARY


READ_PS2 $SSW/soho/mdi/idl_old/gen/util/read_ps2.pro
[Previous] [Next]
NAME:
	READ_PS2
PURPOSE:
	To convert ps files into gif images.  It uses ImageMagick's convert 
	program to convert it and then rotates it if the image is Landscape.
SAMPLE CALLING SEQUENCE:
	img = read_ps2(infil, r, g, b)
	img = read_ps2('idl.ps', enlarge=1.5)
	img = read_ps2('idl.ps', gif='out.gif')
INPUT:
	infil	- The Postscript input file name
OUTPUT:
	returns the 2-D image
	r	- the red color table vector
	g	- the green color table vector
	b	- the blue color table vector
 CALLS: ***
	BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], CONCAT_DIR [1], CONCAT_DIR [2]
	CONCAT_DIR [3], FILE_EXIST [2], READ_GIF, break_file [4], concat_dir [4]
	data_type [1], data_type [2], file_exist [1], file_exist [3]
OPTIONAL KEYWORD INPUT:
	gif	- If set, then write out a GIF file
	outdir	- If set, and /GIF or /JPEG, then write the output
		  file to this directory
	enlarge - Blow up the image to make it larger
	pagenum	- If the Postscript has multiple pages in the file, this
		  allows the selection of which page.
NOTES
	Currently the jpeg option does not work
METHOD:
	The ImageMagick executable "convert" must be in the
	$MDI_EXE_DIR directory.
HISTORY
	Written by Dan Goldberg 7-Aug-96
	 6-Nov-96 (MDM) - Added documentation information
			- Renamed from READ_PS to READ_PS2


READ_SC_ATT $SSW/soho/gen/idl/plan/science/read_sc_att.pro
[Previous] [Next]
 Project     :	SOHO - CDS

 Name        :	READ_SC_ATT

 Purpose     :	Read SOHO spacecraft attitude files.

 Category    :	Class3, Orbit, Coordinates

 Explanation :	Read the definitive attitude file to get the spacecraft
		pointing and roll information.

 Syntax      :	READ_SC_ATT, DATE, DATA
		READ_SC_ATT, FILENAME, DATA, /FILENAME_PASSED

 Examples    :	READ_SC_ATT, '1996/05/11', DATA
		READ_SC_ATT, 'SO_AT_DEF_19951202_V01.FITS', DATA, /FILENAME

 Inputs      :	DATE	= The date to get the attitude information for.  Can be
			  in any CDS time format.

 Opt. Inputs :	None.

 Outputs     :	DATA	= A structure containing the spacecraft attitude
			  information.  It contains the following tags:

				TIME (milliseconds of day)
				SC_AVG_PITCH_ECLIP
				SC_AVG_ROLL_ECLIP
				SC_AVG_YAW_ECLIP
				SC_AVG_PITCH
				SC_AVG_ROLL
				SC_AVG_YAW
				GCI_AVG_PITCH
				GCI_AVG_ROLL
				GCI_AVG_YAW
				GSE_AVG_PITCH
				GSE_AVG_ROLL
				GSE_AVG_YAW
				GSM_AVG_PITCH
				GSM_AVG_ROLL
				GSM_AVG_YAW
				SC_STD_DEV_PITCH
				SC_STD_DEV_ROLL
				SC_STD_DEV_YAW
				SC_MIN_PITCH
				SC_MIN_ROLL
				SC_MIN_YAW
				SC_MAX_PITCH
				SC_MAX_ROLL
				SC_MAX_YAW

			  All parameters are in radians.

 Opt. Outputs:	None.

 Keywords    :	FILENAME_PASSED = If set, then the filename was passed rather
				  than the date.

		ERRMSG	= If defined and passed, then any error messages will
			  be returned to the user in this parameter rather than
			  depending on the MESSAGE routine in IDL.  If no
			  errors are encountered, then a null string is
			  returned.  In order to use this feature, ERRMSG must
			  be defined first, e.g.

				ERRMSG = ''
				READ_SC_ATT, ERRMSG=ERRMSG, ...
				IF ERRMSG NE '' THEN ...

 Calls       : ***
	ANYTIM2CAL, ANYTIM2UTC [1], ANYTIM2UTC [2], CONCAT_DIR [1], CONCAT_DIR [2]
	CONCAT_DIR [3], FXBCLOSE [1], FXBCLOSE [2], FXBISOPEN [1], FXBISOPEN [2]
	FXBOPEN [1], FXBOPEN [2], FXBOPEN [3], FXBREAD [1], FXBREAD [2], FXBREAD [3]
	OS_FAMILY, REVERSE, TRIM, concat_dir [4]
 Common      :	None.

 Restrictions:	The environment variable ANCIL_DATA must be defined.

 Side effects:	None.

 Prev. Hist. :	None.

 History     :	Version 1, 23-May-1996, William Thompson, GSFC
		Version 2, 03-Sep-1996, William Thompson, GSFC
			Also look for filename with a dollar sign
			prepended--this is how VMS treats uppercase filenames.
		Version 3, 11-Oct-1996, William Thompson, GSFC
			Only prepend $ in VMS.
		Version 4, 22-Jan-1997, William Thompson, GSFC
			Modified to reflect reorganization of attitude files.
		Version 5, 30-Jan-1997, William Thompson, GSFC
			Fixed VMS bug introduced in version 4

 Contact     :	WTHOMPSON


READ_TM_PACKET $SSW/soho/lasco/idl/packets/read_tm_packet.pro
[Previous] [Next]
 NAME:
	READ_TM_PACKET

 PURPOSE:
	This routine reads in raw telemetry packets.

 CATEGORY:
	LASCO PACKET

 CALLING SEQUENCE:
	Result = READ_TM_PACKET (Pckt_file_name)

 INPUTS:
	Pckt_file_name:	String containing the name of the file to be read in.
	
 KEYWORD PARAMETERS:

	NO_HDR:	 	Strips off the 12 byte header information added by DACS
	FIRST_ONLY:	Only returns first packet in file
	SILENT:		Suppresses informational messages

 OUTPUTS:
	Result:	A 2D byte array containing the packets.  The contents of 
		one packet is in the first dimension, and time is in the
		second dimension.

 CALLS: ***
	DATATYPE [1], DATATYPE [2], DATATYPE [3], INIT_APID_STRUCT, READ_TM_PACKET_INFO
 CALLED BY:
	FIX_TIME_JUMP, GET_MISSING_PCKTS, MAKE_INDEX, READALLHK, READ_PACKET_FNAMES
	SPLIT_QKL, UNPACK_ALL_SCIENCE, WPLOT_NONOP, WPLOT_SUBHTR [2], rel_ql_fill
 COMMON BLOCKS:
	READ_TM_PACKET_COMMON:	Contains the TM packet types that have been
	read in by INIT_APID_STRUCT

 MODIFICATION HISTORY:
 	Written by:	S.E. Paswaters, NRL, Jan 1996
	Version 2  23 Mar 1996   RAHoward	Corrected No_HDR option
	Version 3  26 Mar 1996   RAHoward	Added .dat file type to archive
						type for LZ HK.
       Version 4  23 Jan 1998   Ed Esfandiari  added .s01 and .sat data types
                                               (sub-sampled .d01 and dat data).
                 Oct 17, 2005   Karl Battams  add /swap_if_little_endian keyword to open so
                                               that Linux (etc) machines can run this.

 @(#)read_tm_packet.pro	1.3 10/17/05 :LASCO IDL LIBRARY


READ_ZONE $SSW/soho/lasco/idl/reduce/fuzzy/read_zone.pro
[Previous] [Next]
 PROJET:
	SOHO - LASCO

 NAME:
	READ_ZONE

 PURPOSE:
	Gets the missing zone surrounding a given list of missing blocks

 CALLED BY:
	FUZZY_BLOCK, FUZZY_IMAGE, GRAD, GRAD_ZONE, HCIE_ZONE [2], MULTI_INTERP, MULTI_SMOOTH
	hcie_zone [1]
 PROCEDURE:
	Gets the missing zone (array of pixel) surrounding a given list of
	missing blocks

	A missing zone is defined as the smallest rectangle of blocks that
	surrounds a cluster of missing blocks (likely to be neighbor missing
	blocks) but has  no missing block on its border (its outermost rows
	and columns)
	For example, 1 single block leads to a 3x3 surrounding block zone

 CATEGORY:
	Missing Blocks

 CALLING SEQUENCE:
	zone = 	read_zone (image, list_miss_blocks [,zone_width, zone_height])

 INPUTS:
	image				the image containing the zone to read
	list_miss_blocks		a list of missing blocks (or 1 block)
					that the missing zone will surround
 KEYWORD INPUT:
	rebindex : rebin index (see fuzzy_image.pro)

 OUTPUTS:
	zone				the zone surrounding these blocks

 Optional OUTPUTS:
	zone_width, zone_height 	the dimentions of the zone, in pixels

 MODIFICATION HISTORY:
	Written by J.MORE, September 1996
	Add of rebindex keyword on 28/01/2000 by A.Thernisien


READALLHK $SSW/soho/lasco/idl/packets/readallhk.pro
[Previous] [Next]
 NAME:
	READALLHK

 PURPOSE:
	This routine reads in all LASCO housekeeping packets for a given date.

 CATEGORY:
	LASCO PACKETS

 CALLING SEQUENCE:
	Result = READALLHK ( Date )

 INPUTS:
	Date:	A string specifying the date in the format YYMMDD

 KEYWORD PARAMETERS:
	ECS:	This keyword will indicate that the file type to be read in
		are files generated by the EOF Core System (ECS).  If the
		keyword is not present, the routine assumes the files were
		generated by DACS.

       HKLZ:   This keyword will indicate that the file type to be read in
               are house keeping level-0 files (i.e. *.d01).

       LOW_RES: This keyword will indicate that the file type to be read in
                are house keeping level-0 compressed file. (i.e. *.s01). It 
                must be used in combination with HKLZ keyword.

 OUTPUTS:
	This function returns the LASCO housekeeping data as a 2D byte array
	in which the packet information is the first dimension and time is
	the second dimension.

 CALLS: ***
	READ_TM_PACKET
 CALLED BY:
	PLOT_HKLZ
 COMMON BLOCKS:
	None

 RESTRICTIONS:
	The current working directory must be the directory where the files
	are located,  except for /HKLZ option.

 PROCEDURE:
	Calls the routine READ_TM_PACKET

 EXAMPLE:
	Read in the ECS housekeeping data for the date 6 March 1996:

		hk = READALLHK ('960306',/ecs)
               or
               hk = READALLHK ('960306',/hklz)
               or
               hk = READALLHK ('960306',/hklz,/low_res)

 MODIFICATION HISTORY:
 	Written by:	R.A. Howard, 1992
	Jan, 1996	Modified for ECS and READ_TM_PACKET.
       Jan, 1998       AEE - Added /hklz (level-0 house keeping)  and
                             /low_res keyword options.
       Sep, 1998       AEE - Added HK2 (G016) to get Motor Encoder Positions.
       Oct, 1998       RAH - Added environment variable TMPCKTS
       Dec, 1998       AEE - Added path (from TMPCKTS) to the ecs files.
       Sep, 1999       AEE _ Check first 6 chars of a line for the yymmdd instead of the whole line.

 @(#)readallhk.pro	1.4 10/02/98 :LASCO IDL LIBRARY



READALLSV1 $SSW/soho/lasco/idl/packets/readallsv1.pro
[Previous] [Next]
 NAME:
	READALLSV1

 PURPOSE:
	This routine reads in all service module housekeeping packets type 1,
	(SVMHK1) for a given date.

 CATEGORY:
	LASCO PACKETS

 CALLING SEQUENCE:
	Result = READALLSV1 ( Date )

 INPUTS:
	Date:	A string or array of strings specifying the date in the format YYMMDD

 KEYWORD PARAMETERS:
	ECS:	This keyword will indicate that the file type to be read in
		are files generated by the EOF Core System (ECS).  If the
		keyword is not present, the routine assumes the files were
		generated by DACS.

 OUTPUTS:
	This function returns the SVMHK1 housekeeping data as a 2D byte array
	in which the packet information is the first dimension and time is
	the second dimension.

 CALLS: ***
	GET_PACKET_FNAMES, READ_PACKET_FNAMES
 COMMON BLOCKS:
	None

 RESTRICTIONS:
	If the environment variable, TMPCKTS, is not defined then the current 
	working directory must be the directory where the files are located.

 PROCEDURE:
	Calls the routines READ_TM_PACKET, GET_PACKET_FNAMES and READ_PACKET_FNAMES

 EXAMPLE:
	Read in the ECS housekeeping data for the date 6 March 1996:

		hk = READALLSV1 ('960306',/ecs)

 MODIFICATION HISTORY:
 	Written by:	R.A. Howard, 1992
	Jan, 1996	Modified for ECS and READ_TM_PACKET.
	Sep, 1998	Added environment variable TMPCKTS
	Sep, 1998	Changed method of accumulating packets
			Permit an array of dates
			Use GET_PACKET_FNAMES and READ_PACKET_FNAMES

 @(#)readallsv1.pro	1.4 07/05/00 :LASCO IDL LIBRARY


READALLSV2 $SSW/soho/lasco/idl/packets/readallsv2.pro
[Previous] [Next]
 NAME:
	READALLSV2

 PURPOSE:
	This routine reads in all service module housekeeping packets type 2,
	(SVMHK2) for a given date.

 CATEGORY:
	LASCO PACKETS

 CALLING SEQUENCE:
	Result = READALLSV2 ( Date )

 INPUTS:
	Date:	A string specifying the date in the format YYMMDD

 KEYWORD PARAMETERS:
	ECS:	This keyword will indicate that the file type to be read in
		are files generated by the EOF Core System (ECS).  If the
		keyword is not present, the routine assumes the files were
		generated by DACS.

 OUTPUTS:
	This function returns the SVMHK2 housekeeping data as a 2D byte array
	in which the packet information is the first dimension and time is
	the second dimension.

 CALLS: ***
	GET_PACKET_FNAMES, READ_PACKET_FNAMES
 CALLED BY:
	ALL_NONOP_TEMPS
 COMMON BLOCKS:
	None

 RESTRICTIONS:
       If the environment variable, TMPCKTS, is not defined then the current
       working directory must be the directory where the files are located.

 PROCEDURE:
	Calls the routines READ_TM_PACKET, GET_PACKET_FNAMES and READ_PACKET_FNAMES

 EXAMPLE:
	Read in the ECS housekeeping data for the date 6 March 1996:

		hk = READALLSV2 ('960306',/ecs)

 MODIFICATION HISTORY:
 	Written by:	R.A. Howard, 1992
	Jan, 1996	Modified for ECS and READ_TM_PACKET.
       Sep, 1998       Added environment variable TMPCKTS
       Sep 24, 1998	Use GET_PACKET_FNAMES and READ_PACKET_FNAMES

 @(#)readallsv2.pro	1.3 09/24/98 :LASCO IDL LIBRARY


READALLSV4 $SSW/soho/lasco/idl/packets/readallsv4.pro
[Previous] [Next]
 NAME:
	READALLSV4

 PURPOSE:
	This routine reads in all service module housekeeping packets type 4,
	(SVMHK4) for a given date.

 CATEGORY:
	LASCO PACKETS

 CALLING SEQUENCE:
	Result = READALLSV4 ( Date )

 INPUTS:
	Date:	A string specifying the date in the format YYMMDD

 KEYWORD PARAMETERS:
	ECS:	This keyword will indicate that the file type to be read in
		are files generated by the EOF Core System (ECS).  If the
		keyword is not present, the routine assumes the files were
		generated by DACS.

 OUTPUTS:
	This function returns the SVMHK4 housekeeping data as a 2D byte array
	in which the packet information is the first dimension and time is
	the second dimension.

 CALLS: ***
	GET_PACKET_FNAMES, READ_PACKET_FNAMES
 CALLED BY:
	ALL_NONOP_TEMPS
 COMMON BLOCKS:
	None

 RESTRICTIONS:
       If the environment variable, TMPCKTS, is not defined then the current
       working directory must be the directory where the files are located.

 PROCEDURE:
	Calls the routines READ_TM_PACKET, GET_PACKET_FNAMES and READ_PACKET_FNAMES

 EXAMPLE:
	Read in the ECS housekeeping data for the date 6 March 1996:

		hk = READALLSV4 ('960306',/ecs)

 MODIFICATION HISTORY:
 	Written by:	R.A. Howard, 1992
	Jan, 1996	Modified for ECS and READ_TM_PACKET.
       Sep, 1998       Added environment variable TMPCKTS
       Sep 25, 1998	Use GET_PACKET_FNAMES and READ_PACKET_FNAMES

 @(#)readallsv4.pro	1.3 09/24/98 :LASCO IDL LIBRARY


READCALFITS $SSW/soho/cds/idl/sci/data_handling/i_o/fits/cds/calib/readcalfits.pro
[Previous] [Next]
 Project     : SOHO - CDS     
                   
 Name        : READCALFITS()
               
 Purpose     : Read and return the contents of a CDS FITS level-1 file
               
 Explanation : Reads:
			- header data (for the whole file), 
			- fits variables for all detector data windows
			- detector data 
               	- fits variables for auxiliary data
			- auxiliary data

		Returns all data in one IDL structure (the CDS QL
		data format)

 Use         : VAR = READCALFITS( FILENAME )
    
 Inputs      : FILENAME = the name of the CDS FITS level-1 file.
               
 Opt. Inputs : None.
               
 Outputs     : Returns an IDL structure with data from the FITS file
		(CDS QL data format)
               
 Opt. Outputs: None.
               
 Keywords    : /DISPLAY : set this keyword to invoke DSP_INFO
		to display information about the data in the
		file. 

		/SELECT : set to prompt for selection of only some
		of the detector data windows.

		/HEADER : Set to only read descriptive information
		about detector data windows -- no data will be loaded

		/AUTO : Set to force silent truncation of the data
		by reading just those detector data windows that
		fit below the memory limit

		MEMLIMIT : Set to the maximum size of memory that
		the detector data are allowed to occupy.

		STATUS : Set to a initialized, named variable to 
		return an error message instead of crashing. If
		everything's ok, a null string will be returned.


 Calls       : ***
	CAL_AUXREAD, CAL_DETREAD, CAL_DETSELECT, DATATYPE [1], DATATYPE [2], DATATYPE [3]
	DSP_INFO, FXBCLOSE [1], FXBCLOSE [2], FXBOPEN [1], FXBOPEN [2], FXBOPEN [3], QLMGR
 CALLED BY:
	READCDSFITS
 Common      : None.

 Restrictions: The file MUST be a CDS FITS level-1 file.
               
 Side effects: Starts QLMGR if not installed.
               
 Category    : Data_Handling, I_O, FITS, CDS, QuickLook
               
 Prev. Hist. : None.

 Written     : Stein Vidar Hagfors Haugan, 27 September 1993
               
 Modified    : SVHH, 1 October 1993  - Added keyword inheritance to DSP_INFO.
		SVHH, 2 October 1993  - QLMGR registration included
		SVHH, 5 October 1993  - SELECT keyword/functionality included
               cdp  25-Oct-93  cut out _EXTRA
		SVHH, 24 May 94 Version 2
			Added /header, /auto, memlimit=memlimit,
			status=status
		SVHH, 28 May 94 V 2.1 -- Implemented ERRMSG in call to FXBOPEN
		SVHH, 11 June 94, Version 3
			Split DETREAD into DETSELECT and DETREAD to
			minimize memory overhead.
			Also had to shorten structure names due to problems
			with EXECUTE maximum string length (512 ?).
               Version 4, SVHH, 28 February 1996
                       Added HDRTEXT tag to make the QLDS pass
                       through QLMGR (the standard QLDS has been
                       somewhat revised since this routine was in use)

 Version     : 4, 28 February 1996


READCDSCOL $SSW/soho/cds/idl/sci/data_handling/i_o/fits/cds/readcdscol.pro
[Previous] [Next]
 Project     :	SOHO - CDS

 Name        :	READCDSCOL

 Purpose     :	Reads CDS data from a column in a FITS binary table.

 Explanation :	Reads data stored within a column of a CDS FITS binary table
		into a structure variable containing the array and associated
		information.

 Use         :	READCDSCOL, UNIT, DATA, COLUMN  [, ROW ]

		FXBOPEN, UNIT, 'testdata.fits', 1	;Opens the table
		READCDSCOL, UNIT, HE304, 'he304'	;Reads HE 304 data
		FXBCLOSE, UNIT				;Closes the table

 Inputs      :	UNIT	= Logical unit number corresponding to the file
			  containing the binary table.

		COLUMN	= Column in the binary table to read data from, either
			  as a character string containing a column label
			  (TTYPE), or as a numerical column index starting from
			  column one.

 Opt. Inputs :	ROW	= Either row number in the binary table to read data
			  from, starting from row one, or a two element array
			  containing a range of row numbers to read.  If not
			  passed, then the entire column is read in.

			  Row must be passed for variable length arrays.

			  It is anticipated that CDS binary table files will
			  consist of a single row, and that there will be no
			  variable length arrays.  However, the ROW parameter
			  is retained for possible future use.

 Outputs     :	DATA	= The output data will be read into an anonymous
			  structure variable with the following tag names:

				ARRAY	= The actual data array.  If /HEADER is
					  set, then this is simply the number
					  zero.
				LABEL	= The column label from TTYPEn.
				UNITS	= The units of the data.
				MISSING	= Value representing missing data.
				AXES	= The labels for the axes of ARRAY.
				ORIGIN	= The value of the first point along
					  each of the axes of ARRAY.
				SPACING	= The pixel spacing along each axis.
				ROTATION= The rotation of each axis relative to
					  the standard coordinate system.  This
					  is only relevant for spatial
					  dimensions.

			  There will also be the following additional tag names
			  for columns containing detector data windows.

				DETX	= Starting detector column in pixels.
				DETY	= Starting detector row in pixels (NIS
					  only).
				BINX	= Binning factor across columns, in
					  pixels.
				BINY	= Binning factor across rows, in pixels
					  (NIS only).
				WAVELENGTH = Wavelength of observation, in
					  Angstroms.
				WAVEMIN	= Minimum wavelength.
				WAVEMAX	= Maximum wavelength.
				WAVEBAND= Wavelength band.
				GR_ORDER= Grating order.

 Opt. Outputs:	None.

 Keywords    :	NANVALUE = Value signalling data dropout.  All points
			   corresponding to IEEE NaN (not-a-number) are
			   converted to this number.  Ignored unless DATA is of
			   type float, double-precision or complex.  If used,
			   then the MISSING tag in the returned DATA structure
			   reflects this value.  The default is -1.

			   It is anticipated that the CDS data files will
			   always be stored as integers, so that the use of
			   this keyword should be unnecessary.

		HEADER	= If set, then only the header is read in.

		STATUS	= If defined and passed, then any error messages will
			  be returned to the user in this parameter rather than
			  depending on the MESSAGE routine in IDL.  If no
			  errors are encountered, then a null string is
			  returned.  In order to use this feature, STATUS must
			  be defined first, e.g.

				STATUS = ''
				READCDSCOL, STATUS=STATUS, ...
				IF STATUS NE '' THEN ...

 Calls       : ***
	DATATYPE [1], DATATYPE [2], DATATYPE [3], FXBCOLNUM [1], FXBCOLNUM [2]
	FXBHEADER [1], FXBHEADER [2], FXBISOPEN [1], FXBISOPEN [2], FXBREAD [1]
	FXBREAD [2], FXBREAD [3], FXBTDIM [1], FXBTDIM [2], FXPAR [1], FXPAR [2], TRIM
 CALLED BY:
	AUXREAD, CAL_AUXREAD, CDS_IMAGE, DETREAD, DETSELECT, GET_VDS_BIAS
 Common      :	None.

 Restrictions:	The binary table must have been opened with FXBOPEN.

		This routine is intended solely for CDS data.  It makes certain
		assumptions about what keywords will be present in the FITS
		binary table header.  The present version of this routine was
		written to be compatible with the sample file "testdata.fits"
		generated based on SERTS data.

		Currently, the returned value of DATA.ORIGIN will not be
		correct if all values of TRPIXn are not equal to 1.  However,
		it is not anticipated that any other values of TRPIX will be
		used for the foreseeable future.

 Side effects:	If multiple rows are read, then the last entry in DATA.AXES
		will be "RECORD".  DATA.ORIGIN, DATA.SPACING, and DATA.ROTATION
		will be similarly updated to reflect this additional dimension.

 Category    :	Data_Handling, I_O, FITS, CDS

 Prev. Hist. :	None.

 Written     :	William Thompson, GSFC, 2 July 1993.

 Modified    :	Version 1, William Thompson, GSFC, 2 July 1993.
		Version 2, William Thompson, GSFC, 15 December 1993.
			Modified so that additional dimension is annotated when
			multiple rows are read.
		Version 3, William Thompson, GSFC, 27 May 1994.
			Added HEADER keyword.
		Version 4, William Thompson, GSFC, 21 June 1994.
			Changed from Y-Z to X-Y coordinate system.
			Added WAVEBAND and GR_ORDER tags.
			Added STATUS keyword.
			Renamed from READ_CDS to READCDSCOL
		Version 5, William Thompson, GSFC, 23 June 1994
			Modified so that STATUS is not touched if not defined.
		Version 6, William Thompson, GSFC, 2 August 1995
			Added tags BINX and BINY

 Version     :	Version 6, 2 August 1995


READCDSFITS $SSW/soho/cds/idl/sci/data_handling/i_o/fits/cds/readcdsfits.pro
[Previous] [Next]
 Project     : SOHO - CDS     
                   
 Name        : READCDSFITS()
               
 Purpose     : Read and return the contents of a CDS FITS level-1 file
               
 Explanation : Reads:
			- header data (for the whole file), 
			- fits variables for all detector data windows
			- detector data 
               	- fits variables for auxiliary data
			- auxiliary data

		Returns all data in one IDL structure (the CDS QL
		data format)

 Use         : VAR = READCDSFITS( FILENAME )
    
 Inputs      : FILENAME = the name of the CDS FITS level-1 file.
               
 Opt. Inputs : None.
               
 Outputs     : Returns an IDL structure with data from the FITS file
		(CDS QL data format)
               
 Opt. Outputs: None.
               
 Keywords    : /DISPLAY : set this keyword to invoke DSP_INFO
		to display information about the data in the
		file. 

		/SELECT : set to prompt for selection of only some
		of the detector data windows.

               PRESELECTED : Array of selected windows to read in. 
               References the windows by their index (0..Nwindows-1)

		/HEADER : Set to only read descriptive information
		about detector data windows -- no data will be loaded

		/AUTO : Set to force silent truncation of the data
		by reading just those detector data windows that
		fit below the memory limit

               /BATCH : Set to suppress xack window popping up
               when there are problems with the GSET_ID.

		MEMLIMIT : Set to the maximum size of memory that
		the detector data are allowed to occupy.

		STATUS : Set to a initialized, named variable to 
		return an error message instead of crashing. If
		everything's ok, a null string will be returned.

		In addition, any keywords accepted by UPD_CDS_POINT, such as
		/NOROLL, are also accepted.


 Calls       : ***
	ANYTIM2UTC [1], ANYTIM2UTC [2], AUXREAD, BREAK_FILE [1], BREAK_FILE [2]
	BREAK_FILE [3], CDS_PAD_QLDS, CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3]
	DATATYPE [1], DATATYPE [2], DATATYPE [3], DEFAULT, DETREAD, DETSELECT, DSP_INFO
	FILE_EXIST [2], FIND_WITH_DEF [1], FIND_WITH_DEF [2], FIND_WITH_DEF [3]
	FXBCLOSE [1], FXBCLOSE [2], FXBISOPEN [1], FXBISOPEN [2], FXBOPEN [1], FXBOPEN [2]
	FXBOPEN [3], FXPAR [1], FXPAR [2], GET_UTC, GET_WAVECAL, HDRREAD, LOAD_WAVECAL, QLMGR
	READCALFITS, RM_FILE, TRIM, UPD_CDS_POINT, XACK, break_file [4], concat_dir [4]
	file_exist [1], file_exist [3]
 CALLED BY:
	AN_NIMCP, AN_NIMCP_1_2, AN_NIMCP_AVG, APPLY_CDS_ADEF, BP_SEEK_POS, CDS_ENG_N1_RD
	CDS_ENG_N4_AN, CDS_MOSAIC, CDS_SIMPLE_FITS, CDS_SNAPSHOT, CDS_THUMBNAIL
	CDS_VEL_SLICE [2], FIND_COSMIC_RAYS, GIS_UTPLOT, GT_CDS_QL, GT_WLIMITS
	MK_CDS_FITS, MK_CDS_GIF, MK_CDS_MAP, MK_SYNOPTIC, PICKFITS, PLOT_SPEC [2], QL_MENU
	READ_CDS, SNAP_MOVIE, XCAT, XCDS_SNAPSHOT, XCOR_CDS
 Common      : None.

 Restrictions: The file MUST be a CDS FITS level-1 file.
               
 Side effects: Starts QLMGR if not installed.
               
 Category    : Data_Handling, I_O, FITS, CDS, QuickLook
               
 Prev. Hist. : None.

 Written     : Stein Vidar Hagfors Haugan, 27 September 1993
               
 Modified    : SVHH, 1 October 1993  - Added keyword inheritance to DSP_INFO.
		SVHH, 2 October 1993  - QLMGR registration included
		SVHH, 5 October 1993  - SELECT keyword/functionality included
               CDP  25-Oct-93  cut out _EXTRA
		SVHH, Version 2, 8-June-1994
			Added /header, /auto, memlimit=memlimit,status=status
		SVHH, Version 3, 11-June-1994
			Split DETREAD into DETSELECT + DETREAD, to minimize
			memory overhead.
               CDP, Search for input files in CDS_FITS_DATA if not in
                    curent (or specified) directory and make default 
                    extension .fits.  1-Jun-95
		Version 5, William Thompson, GSFC, 2 June 1995
			Use FIND_WITH_DEF to accomplish changes of version 4
               Version 6, SVHH, 27-Sept-1995
                       Added some auxiliary data tags + renamed
                       other auxiliary data tags to conform to a single
                       naming convention (Fits TTYPE + DATA/DESC)
		Version 7, SVHH, 9-November-1995
                       Added BACKGROUND handling for the NIS.
               Version 8, CDP, Trap entering array (even array(1)) of
                               filenames.   16-Nov-95
               Version 9, SVHH, 15-January-1996, Fixed typo error in
                       'SLI_POS' --> 'SLIT_POS'.
               Version 10, SVHH, 22-February-1996. 
                       Added BKGRCD/BKGPCD/BKMGULCD data. Also added
                       tag HDRTEXT, containing the header text array.
                       The DETDATA array is now always a float, so no
                       duplication of the structure need to be
                       performed when debiasing or converting to
                       physical units.
               Version 11, SVHH, 13 April 1996
                       Added support for wavelength calibrations 
                       (wavecal tag).
               Version 12, SVHH, 14 April 1996
                       Automatic switch to readcalfits if it's a
                       calibration fits file.
                       Using !def_gset_id for default GSET_ID
               Version 13, SVHH, 18 April 1996
                       Added BATCH switch for turning off xack dialog box.
               Version 14, SVHH, 8 May 1996
                       Added PRESELECTED option.
               Version 15, William Thompson, 6 August 1996, GSFC 
                       Added /RESET to FIND_WITH_DEF
               Version 16, SVHH, 18 August 1996
                       New storage system doesn't use DETDATA.
                       Added cds_pad_qlds call to make all windows equal.
                       It's possible to select the new storage system by
                       setting OLDSYS=0. If the environment variable
                       USE_NEW_STORAGE is defined and not an empty string,
                       then you can turn OFF the new storage system by
                       setting /OLDSYS.
               Version 17, SVHH, 23 August 1996
                       PITCHBITS => PTCHBITS, to reflect actual name of
                       data column in fits files.
               Version 18, SVHH, 4 April 1997
                       Fixed a bug setting STATUS=1 on successful completion,
                       and added a CATCH,ERROR statement in case of
                       unforeseen trouble.
               Version 19, SVHH, 10 May 1997
                       Added support for compressed files.
               Version 20, SVHH, 13 May 1997
                       Decompression into $CDS_FITS_TEMP_W (first choice), or
                       $CDS_FITS_DATA_W. Also setting umask 002 before
                       decompressing to share data.
               Version 21, SVHH, 14 May 1997
                       Modified how .Z and .gz extensions were tested in case
                       .fits file extension is already supplied.
               Version 22, SVHH, 10 June 1997
                       Made the BACKGROUND tag become a named structure.
               Version 23, SVHH, 29 June 1997
                       Added call to UPD_CDS_POINT, and keyword /NOROLL.
               Version 24, SVHH, 11 July 1997
                       Fixed a bug in decompression directories & will now
                       compress to current directory and delete file after
                       read when $CDS_FITS_TEMP_W/$CDS_FITS_DATA_W are not
                       set.
               Version 25, SVHH, 15 July 1997
                       Renamed STATUS keyword => ERRMSG for consistency with
                       e.g., FXBOPEN etc.
		Version 26, 17-Dec-1997, William Thompson, GSFC
			Allow any UPD_CDS_POINT keyword to be passed through.
               Version 27, 3-Dec-1999, Zarro (SM&A/GSFC) - added check
                       for existence of !DEBUG & !DEF_GSET_ID
               Version 28, 8-Oct-2001, Zarro (EITI/GSFC) - propagated
                       error from UPD_CDS_POINT
               Version 29, 12-Aug-2003, Peter Young, RAL
                       Modified so that it can read compressed fits files
                       on a Windows machine with gzip installed.
               Version 30, 10-Oct-2003, William Thompson, GSFC
                       Fixed FILE_TEST() problem before IDL 5.4

 Version     : Version 30


READFITS [3] $SSW/soho/mdi/idl_old/gen/fits/readfits.pro
[Previous] [Next]
 NAME:
	READFITS
 PURPOSE:
	Read a FITS file into IDL data and header variables.

 CALLING SEQUENCE:
	Result = READFITS( Filename,[ Header, NOSCALE = , EXTEN_NO = ,
			SILENT = , NaNVALUE = , STARTROW = , NUMROW = ] )

 INPUTS:
	FILENAME = String containing the name of the file to be read.

 OUTPUTS:
	Result = FITS data array constructed from designated record.

 OPTIONAL OUTPUT:
	Header = String array containing the header from the FITS file.

 OPTIONAL INPUT KEYWORDS:
	NOSCALE - If present and non-zero, then the ouput data will not be
		scaled using the optional BSCALE and BZERO keywords in the 
		FITS header.   Default is to scale.

	SILENT - Normally, READFITS will display the size the array at the
		terminal.  The SILENT keyword will suppress this

	NaNVALUE - This scalar is only needed on Vax architectures.   It 
		specifies the value to translate any IEEE "not a number"
		values in the FITS data array.   It is needed because
		the Vax does not recognize the "not a number" convention.

	EXTEN_NO - scalar integer specify the FITS extension to read.  For
		example, specify EXTEN = 1 or /EXTEN to read the first 
		FITS extension.    Extensions are read using recursive
		calls to READFITS.

	POINT_LUN  -  Position (in bytes) in the FITS file at which to start
		reading.   Useful if READFITS is called by another procedure
		which needs to directly read a FITS extension.    Should 
		always be a multiple of 2880.

	STARTROW - This keyword only applies when reading a FITS extension
		It specifies the row (scalar integer) of the extension table at
		which to begin reading. Useful when one does not want to read 
		the entire table.

	NUMROW -  This keyword only applies when reading a FITS extension. 
		If specifies the number of rows (scalar integer) of the 
		extension table to read.   Useful when one does not want to
		read the entire table.

 CALLED BY:
	C2_CALIBRATE, C3_CALIBRATE, CAT_PHASER, COMB_FULL_EQ, CONGRID [1], CONGRID [3]
	DEMO_4TH_PIX, EIT_DISPLAY, EIT_IMAGE, EIT_PA_PROCESS, EIT_PA_VIEW, EIT_POSTAGE
	EIT_PREP, EIT_SUB_UTIL_FILE, EVAL_SHERB, FITSRGB_to_TIFF, FITS_HDR_LIST
	FITS_HDR__READ [1], FIX_OBESUMERROR, GENERIC_MOVIE, GET_AVGSPEC, GET_PT, GFITS_R
	LASCO_IMAGE, LASCO_READFITS [1], LASER8, MAKE_BKGD, MKDI_C1, MKMOVIE
	MKMOVIE0 obsolete version of mkmoviepro, MK_ALL_MIN, MK_DAILY_C1_MED
	MK_DAILY_MIN, MK_IMAGE, MK_IMG, MK_MONTHLY_MIN, MOVIE_MAKER, NORH_RD_IMG [1]
	NORH_RD_IMG [2], NORH_RD_TCX [1], NORH_RD_TCX [2], NORH_RD_TSX [1]
	NORH_RD_TSX [2], NSTAR, RDPSF, RD_HXRBS_FITS, READFITSL, READ_CONT_FITS, READ_DISCSC
	READ_DISCSP_FITS, READ_MER, READ_SHER, READ_SHERB, READ_STTE, READ_TTS_FITS
	REMOVE_CR, RTMOVIE, SCORE_BPROJ, SHOW_SYNOPTIC, SUBSTAR, SUMER_DISTORT_COR
	SXIG12_READ [1], SXIG12_READ [2], SXIG12_READ_ONE [1], SXIG12_READ_ONE [2]
	SXT_IMAGE, SYNSCAN, TRACE_MOSAIC_IMAGE, TRACE_SSWHERE [1], T_APER, T_GETPSF, T_GROUP
	T_NSTAR, T_SUBSTAR, VIEW_TRACE_MOSAIC, WEBGET, WLOADC, WRITE_LAST_IMG [2], XSM_PREP
	ZCLIP, ZPICK, c2_vig1, cal_fig_pol, carrmapdisp, carrmapmaker2
	cmap2gif ftsfile maxdmind ROOTroot CONTROLcontrol, cr_rem_file
	data_sum2fits, eit_find_last_cal, eit_findcalgroup, eit_getlimb, eit_lzsort
	eit_norm_response [1], eit_parms, eit_readcal, eitoversxt, fixinate_eit
	fixinate_trace, fpc1_phot, ft_sumread_fits, img_read, las_exp_norm, laser8ew
	mk_minim, mreadfits, plot_fov [1], polariz, rd_goes_fits, read_eits
	smei_frm_flatfield, smei_frm_read, smei_fts_read, smei_htm_testcase
	smei_sky_read, smei_star_remove, smei_star_standard, smei_zodiac_remove, sxt2eit
	trace_sswhere [2], trace_sswhere [3], trace_sswhere [4], viewlist, wso_read
	zreadfits
 EXAMPLE:
	Read a FITS file TEST.FITS into an IDL image array, IM and FITS 
	header array, H.   Do not scale the data with BSCALE and BZERO.

		IDL> im = READFITS( 'TEST.FITS', h, /NOSCALE)

	If the file contain a FITS extension, it could be read with

		IDL> tab = READFITS( 'TEST.FITS', htab, /EXTEN )

	To read only rows 100-149 of the FITS extension,

		IDL> tab = READFITS( 'TEST.FITS', htab, /EXTEN, 
					STARTR=100, NUMR = 50 )

 CALLS: ***
	IEEE_TO_HOST [1], IEEE_TO_HOST [2], IEEE_TO_HOST [3], IEEE_TO_HOST [4]
	SXADDPAR [1], SXADDPAR [2], SXADDPAR [3], SXPAR [1], SXPAR [2], SXPAR [3]
	WHERENAN [1], WHERENAN [2], WHERENAN [3], WHERENAN [4]
 RESTRICTIONS:
	(1)	Cannot handle random group FITS
	(2)     Users with versions of IDL before 2.2.1 should remove the
		call to the TEMPORARY function near the end of the program

 NOTES:
	The procedure FXREAD can be used as an altnerative to READFITS.
	FXREAD has the option of reading a subsection of the primary FITS data.

 PROCEDURES USED:
	SXPAR, IEEE_TO_HOST, WHERENAN

 MODifICATION HISTORY:
	MODIFIED, Wayne Landsman  October, 1991
	Added call to TEMPORARY function to speed processing     Feb-92
	Added STARTROW and NUMROW keywords for FITS tables       Jul-92
	Close logical unit if EOF encountered
	Make SILENT keyword work for tables                      Oct-92
	Work under "windows"   R. Isaacman                       Jan-93
	Check for SIMPLE keyword in first 8 characters           Feb-93


READFITSL $SSW/soho/lasco/idl/display/readfitsl.pro
[Previous] [Next]
 Project     :

 Name        : READFITSL
	
 Purpose     : Read a FITS file into IDL data and header variables.

 Category    :
 
 Explanation :

 Syntax      : Result = READFITSL( Filename,[ Header, /NOSCALE, EXTEN_NO = ,
			/SILENT , NaNVALUE = , STARTROW = , NUMROW = ] )
 CALLED BY:
	mk_stdim_list
 Example     :
	Read a FITS file TEST.FITS into an IDL image array, IM and FITS 
	header array, H.   Do not scale the data with BSCALE and BZERO.

		IDL> im = READFITSL( 'TEST.FITS', h, /NOSCALE)

	If the file contain a FITS extension, it could be read with

		IDL> tab = READFITSL( 'TEST.FITS', htab, /EXTEN )

	To read only rows 100-149 of the FITS extension,

		IDL> tab = READFITSL( 'TEST.FITS', htab, /EXTEN, 
					STARTR=100, NUMR = 50 )

 Inputs      :	FILENAME = Scalar string containing the name of the FITS file  
		(including extension) to be read.

 Opt.Inputs  :
	NOSCALE - If present and non-zero, then the ouput data will not be
		scaled using the optional BSCALE and BZERO keywords in the 
		FITS header.   Default is to scale.

	SILENT - Normally, READFITS will display the size the array at the
		terminal.  The SILENT keyword will suppress this

	NaNVALUE - This scalar is only needed on Vax architectures.   It 
		specifies the value to translate any IEEE "not a number"
		values in the FITS data array.   It is needed because
		the Vax does not recognize the "not a number" convention.

	EXTEN_NO - scalar integer specify the FITS extension to read.  For
		example, specify EXTEN = 1 or /EXTEN to read the first 
		FITS extension.    Extensions are read using recursive
		calls to READFITS.

	POINT_LUN  -  Position (in bytes) in the FITS file at which to start
		reading.   Useful if READFITS is called by another procedure
		which needs to directly read a FITS extension.    Should 
		always be a multiple of 2880.

	STARTROW - This keyword only applies when reading a FITS extension
		It specifies the row (scalar integer) of the extension table at
		which to begin reading. Useful when one does not want to read 
		the entire table.

	NUMROW -  This keyword only applies when reading a FITS extension. 
		If specifies the number of rows (scalar integer) of the 
		extension table to read.   Useful when one does not want to
		read the entire table.

 Outputs     :
	Result = FITS data array constructed from designated record.

 Opt. Outputs:
	Header = String array containing the header from the FITS file.

 Keywords    :

 CALLS: ***
	IEEE_TO_HOST [1], IEEE_TO_HOST [2], IEEE_TO_HOST [3], IEEE_TO_HOST [4]
	READFITS [1], READFITS [2], READFITS [3], SXADDPAR [1], SXADDPAR [2], SXADDPAR [3]
	SXPAR [1], SXPAR [2], SXPAR [3], WHERENAN [1], WHERENAN [2], WHERENAN [3]
	WHERENAN [4]
 Common      :

 Restrictions:
		Cannot handle random group FITS

	The procedure FXREAD can be used as an alternative to READFITS.
	FXREAD has the option of reading a subsection of the primary FITS data.

    	Procedures used:
       Functions:   SXPAR, WHERENAN
	Procedures:  IEEE_TO_HOST, SXADDPAR

 History     :
	MODIFIED, Wayne Landsman  October, 1991
	Added call to TEMPORARY function to speed processing     Feb-92
	Added STARTROW and NUMROW keywords for FITS tables       Jul-92
	Close logical unit if EOF encountered
	Make SILENT keyword work for tables                      Oct-92
	Work under "windows"   R. Isaacman                       Jan-93
	Check for SIMPLE keyword in first 8 characters           Feb-93
	Removed EOF function for DECNET access                   Aug-93
	Work under "alpha"                                       Sep-93
       Null array processing fixed:  quotes in a message 
          properly nested, return added.  Affected case when
          readfits called from another procedure.   R.S.Hill    Jul-94
       Added CONTINUE keyword in messages : 
          message, 'ERROR - EOF encountered while reading
	             FITS header',/CONTINUE 
	   message,'ERROR - Header does not contain required
	             SIMPLE keyword',/CONT 
	   and return,-1.	B.Podlipnik			 Feb-95

 Contact     : BP, borut@lasco1.mpae.gwdg.de


READSUM2CDS $SSW/soho/cds/idl/sci/data_handling/soho/sumer/readsum2cds.pro
[Previous] [Next]
 Project     : SOHO - CDS     
                   
 Name        : READSUM2CDS()
               
 Purpose     : Read and return the contents of a SUMER FITS level-1 file
               
 Explanation : SUMER version of the CDS routine READCDSFITS.

		Reads:
			- header data (for the whole file), 
			- fits variables for all detector data windows
			- detector data 
               	- fits variables for auxiliary data
			- auxiliary data

		Returns all data in one IDL structure (the CDS QL
		data format)

 Use         : VAR = READSUM2CDS( FILENAME )
    
 Inputs      : FILENAME = the name of the SUMER FITS level-1 file.
               
 Opt. Inputs : None.
               
 Outputs     : Returns an IDL structure with data from the FITS file
		(CDS QL data format)
               
 Opt. Outputs: None.
               
 Keywords    : /DISPLAY : set this keyword to invoke DSP_INFO
		to display information about the data in the
		file. 

		/SELECT : set to prompt for selection of only some
		of the detector data windows.

               PRESELECTED : Array of selected windows to read in. 
               References the windows by their index (0..Nwindows-1)

		/HEADER : Set to only read descriptive information
		about detector data windows -- no data will be loaded

		/AUTO : Set to force silent truncation of the data
		by reading just those detector data windows that
		fit below the memory limit

               /BATCH : Set to suppress xack window popping up
               when there are problems with the GSET_ID.

		MEMLIMIT : Set to the maximum size of memory that
		the detector data are allowed to occupy.

		STATUS : Set to a initialized, named variable to 
		return an error message instead of crashing. If
		everything's ok, a null string will be returned.


 Calls       : ***
	DATATYPE [1], DATATYPE [2], DATATYPE [3], DSP_INFO, FIND_WITH_DEF [1]
	FIND_WITH_DEF [2], FIND_WITH_DEF [3], FXBCLOSE [1], FXBCLOSE [2], FXBMHEADER
	FXBOPEN [1], FXBOPEN [2], FXBOPEN [3], HDRREAD, QLMGR, SUMDETREAD, SUMDETSELECT
 Common      : None.

 Restrictions: The file MUST be a CDS FITS level-1 file.
               
 Side effects: Starts QLMGR if not installed.
               
 Category    : Data_Handling, I_O, FITS, CDS, SUMER, QuickLook
               
 Prev. Hist. : Based on READCDSFITS by Stein Vidar Hagfors Haugan

 Written     : William Thompson, GSFC, 5 July 1996
               
 Modified    : Version 1, William Thompson, GSFC, 5 July 1996

 Version     : Version 1, 5 July 1996


READSUMCOL $SSW/soho/cds/idl/sci/data_handling/soho/sumer/readsumcol.pro
[Previous] [Next]
 Project     :	SOHO - CDS

 Name        :	READSUMCOL

 Purpose     :	Reads SUMER data from a column in a FITS binary table.

 Explanation :	SUMER version of CDS routine READCDSCOL.

		Reads data stored within a column of a CDS FITS binary table
		into a structure variable containing the array and associated
		information.

 Use         :	READSUMCOL, UNIT, DATA, COLUMN  [, ROW ]

		FXBOPEN, UNIT, 'testdata.fits', 1	;Opens the table
		READSUMCOL, UNIT, HE304, 'he304'	;Reads HE 304 data
		FXBCLOSE, UNIT				;Closes the table

 Inputs      :	UNIT	= Logical unit number corresponding to the file
			  containing the binary table.

		COLUMN	= Column in the binary table to read data from, either
			  as a character string containing a column label
			  (TTYPE), or as a numerical column index starting from
			  column one.

 Opt. Inputs :	ROW	= Either row number in the binary table to read data
			  from, starting from row one, or a two element array
			  containing a range of row numbers to read.  If not
			  passed, then the entire column is read in.

			  Row must be passed for variable length arrays.

			  It is anticipated that CDS binary table files will
			  consist of a single row, and that there will be no
			  variable length arrays.  However, the ROW parameter
			  is retained for possible future use.

 Outputs     :	DATA	= The output data will be read into an anonymous
			  structure variable with the following tag names:

				ARRAY	= The actual data array.  If /HEADER is
					  set, then this is simply the number
					  zero.
				LABEL	= The column label from TTYPEn.
				UNITS	= The units of the data.
				MISSING	= Value representing missing data.
				AXES	= The labels for the axes of ARRAY.
				ORIGIN	= The value of the first point along
					  each of the axes of ARRAY.
				SPACING	= The pixel spacing along each axis.
				ROTATION= The rotation of each axis relative to
					  the standard coordinate system.  This
					  is only relevant for spatial
					  dimensions.

			  There will also be the following additional tag names
			  for columns containing detector data windows.

				DETX	= Starting detector column in pixels.
				DETY	= Starting detector row in pixels.
				BINX	= Binning factor across columns, in
					  pixels.  (Not yet implemented.)
				BINY	= Binning factor across rows, in
					  pixels.  (Not yet implemented.)
				WAVELENGTH = Wavelength of observation, in
					  Angstroms.

 Opt. Outputs:	None.

 Keywords    :	NANVALUE = Value signalling data dropout.  All points
			   corresponding to IEEE NaN (not-a-number) are
			   converted to this number.  Ignored unless DATA is of
			   type float, double-precision or complex.  If used,
			   then the MISSING tag in the returned DATA structure
			   reflects this value.  The default is -1.

			   It is anticipated that the CDS data files will
			   always be stored as integers, so that the use of
			   this keyword should be unnecessary.

		HEADER	= If set, then only the header is read in.

		STATUS	= If defined and passed, then any error messages will
			  be returned to the user in this parameter rather than
			  depending on the MESSAGE routine in IDL.  If no
			  errors are encountered, then a null string is
			  returned.  In order to use this feature, STATUS must
			  be defined first, e.g.

				STATUS = ''
				READSUMCOL, STATUS=STATUS, ...
				IF STATUS NE '' THEN ...

 Calls       : ***
	DATATYPE [1], DATATYPE [2], DATATYPE [3], FXBCOLNUM [1], FXBCOLNUM [2]
	FXBDIMEN [1], FXBDIMEN [2], FXBHEADER [1], FXBHEADER [2], FXBISOPEN [1]
	FXBISOPEN [2], FXBMHEADER, FXBREAD [1], FXBREAD [2], FXBREAD [3], FXBTDIM [1]
	FXBTDIM [2], FXPAR [1], FXPAR [2], REARRANGE, TRIM
 CALLED BY:
	SUMDETREAD, SUMDETSELECT
 Common      :	None.

 Restrictions:	The binary table must have been opened with FXBOPEN.

		This routine is intended solely for CDS data.  It makes certain
		assumptions about what keywords will be present in the FITS
		binary table header.  The present version of this routine was
		written to be compatible with the sample file "testdata.fits"
		generated based on SERTS data.

		Currently, the returned value of DATA.ORIGIN will not be
		correct if all values of TRPIXn are not equal to 1.  However,
		it is not anticipated that any other values of TRPIX will be
		used for the foreseeable future.

 Side effects:	If multiple rows are read, then the last entry in DATA.AXES
		will be "RECORD".  DATA.ORIGIN, DATA.SPACING, and DATA.ROTATION
		will be similarly updated to reflect this additional dimension.

 Category    :	Data_Handling, I_O, FITS, CDS, SUMER

 Prev. Hist. :	Converted from READCDSCOL by William Thompson

 Written     :	William Thompson, GSFC, 5 July 1996

 Modified    :	Version 1, William Thompson, GSFC, 5 July 1996
		Version 2, William Thompson, GSFC, 8 July 1996
			Accommodate SUMER's incorrect use of TRPIX.
			Add DETX, DETY to output.

 Version     :	Version 2, 8 July 1996


RECONVERT [1] $SSW/soho/lasco/idl/display/gammasca.pro
[Previous] [Next]
 NAME:
	RECONVERT

 PURPOSE:
	Converts data to a specified data type

 CATEGORY:
	PICO

 CALLING SEQUENCE:
	result = reconvert(image, data_type)

 INPUTS:
	image:  array to be converted
	data_type: an integer between 0 and 7 specifying 
		to which data_type the image should be 
		converted.

 OPTIONAL INPUT PARAMETERS:
	None

 KEYWORD PARAMETERS:
	None

 OUTPUTS:
	result: the converted image of the new data type

 OPTIONAL OUTPUT PARAMETERS:
	None

 CALLED BY:
	MASKE
 COMMON BLOCKS:
	None

 SIDE EFFECTS:
	Unknown

 RESTRICTIONS:
	None

 PROCEDURE:
	Straightfroward

 MODIFICATION HISTORY:         ae 11-AUG-1994 Pic Du Midi


RECONVERT [2] $SSW/soho/lasco/idl/display/reconvert.pro
[Previous] [Next]
 NAME:
	RECONVERT

 PURPOSE:
	Converts data to a specified data type

 CATEGORY:
	PICO

 CALLING SEQUENCE:
	result = reconvert(image, data_type)

 INPUTS:
	image:  array to be converted
	data_type: an integer between 0 and 7 specifying 
		to which data_type the image should be 
		converted.

 OPTIONAL INPUT PARAMETERS:
	None

 KEYWORD PARAMETERS:
	None

 OUTPUTS:
	result: the converted image of the new data type

 OPTIONAL OUTPUT PARAMETERS:
	None

 CALLED BY:
	MASKE
 COMMON BLOCKS:
	None

 SIDE EFFECTS:
	Unknown

 RESTRICTIONS:
	None

 PROCEDURE:
	Straightfroward

 MODIFICATION HISTORY:         ae 11-AUG-1994 Pic Du Midi


RECOVER $SSW/soho/cds/idl/sci/data_anal/ql/ql_disp/recover.pro
[Previous] [Next]
 Project     : SOHO - CDS     
                   
 Name        : RECOVER
               
 Purpose     : A general crash recovery procedure -- recovers stored QLDS
               
 Explanation : If anyghing goes wrong, type "@recover", and the data
		you've given to the QL routines are recovered.
               
 Use         : @recover
    
 Inputs      : None.
               
 Opt. Inputs : None.
               
 Outputs     : Global variables a,b,c,.....
               
 Opt. Outputs: None.
               
 Keywords    : None.

 Calls       : CONCAT_DIR(), DATATYPE(), QLDS_CHECKIN, QLMGR, TRIM()
 Common      : QLMGR : See qlmgr.pro
               QLSAVE : See qlmgr.pro

 Restrictions: 
               
 Side effects: Kills all widgets
               
 Category    : 
               
 Prev. Hist. : None.

 Written     : Stein Vidar Hagfors Haugan, 10-December 1994
               
 Modified    : Never.

 Version     : 1.0


RECPOL [3] $SSW/soho/mdi/idl_old/gen/jhuapl/recpol.pro
[Previous] [Next]
 NAME:
       RECPOL
 PURPOSE:
       Convert 2-d rectangular coordinates to polar coordinates.
 CATEGORY:
 CALLING SEQUENCE:
       recpol, x, y, r, a
 INPUTS:
       x, y = vector in rectangular form.           in
 KEYWORD PARAMETERS:
       Keywords:
         /DEGREES means angle is in degrees, else radians.
 OUTPUTS:
       r, a = vector in polar form: radius, angle.  out
 CALLS: ***
	ARRAY_JHUAPL [1], ARRAY_JHUAPL [2], ISARRAY [1], ISARRAY [2], ISARRAY [3]
 CALLED BY:
	GET_SUN [1], GET_SUN [2], SPHDIST, SUN [1], SUN [2]
 COMMON BLOCKS:
 NOTES:
 MODIFICATION HISTORY:
       R. Sterner. 18 Aug, 1986.
       Johns Hopkins University Applied Physics Laboratory.
       RES 13 Feb, 1991 --- added /degrees.
	30-Apr-92 (MDM) changed calls to "array" to call "array_jhuapl"

 Copyright (C) 1986, Johns Hopkins University/Applied Physics Laboratory
 This software may be used, copied, or redistributed as long as it is not
 sold and this copyright notice is reproduced on each copy made.  This
 routine is provided as is without any express or implied warranties
 whatsoever.  Other limitations apply as described in the file disclaimer.txt.


redo_disploi $SSW/soho/mdi/idl/ops/redo_disploi.pro
[Previous] [Next]
NAME:
	redo_disploi
PURPOSE:
	Re-create the LOI average summary files from the SCI5K data file(s)
SAMPLE CALLING SEQUENCE:
	redo_disploi, date
	redo_disploi, '30-Jul-96'
 CALLS: ***
	ARR2STR [1], Arr2Str [2], CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3]
	DECODE_SCI5K, DELVARX [1], DELVARX [2], DELVARX [3], DELVARX [4], DISPLOI_MON5K
	ISVALID [1], ISVALID [2], ISVALID [3], MASK, SSW_FILE_DELETE, STR2ARR [1]
	STR2ARR [2], UNSIGN, 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], fmt_tim [1]
	fmt_tim [2], gt_time [1], gt_time [2], int2secarr [1], int2secarr [2], mon_sci5k
	rd_hk [1], rd_hk [2], rd_tfile [1], rd_tfile [2], str_replace [1], str_replace [2]
	timstr2ex [1], timstr2ex [2], ut_time [1], ut_time [2], wc_where [1], wc_where [2]
HISTORY:
	Written 2-Aug-96 by M.Morrison
	22-Aug-96 (MDM) - Corrected deleting of 'v' file
	24-Nov-99 (RIB) - Change /mdisw/data/health to /mdisw/health/loi_summary


redo_mon_sci5k $SSW/soho/mdi/idl/egse/redo_mon_sci5k.pro
[Previous] [Next]
NAME:
	redo_mon_sci5k
PURPOSE:
	To give a summary of the SCI5K contents
SAMPLE CALLING SEQUENCE:
	redo_mon_sci5k, '24-nov-95', '24-nov-95 12:00'
	redo_mon_sci5k, '14-Jun-95 12:00', '14-Jun-95 23:00'
	redo_mon_sci5k, infil='/md83/ecs/done_ecs/MDISC_960113_235115.QKL'
RESTRICTION:
	Time cannot span over a day boundary
 CALLS: ***
	ARR2STR [1], Arr2Str [2], BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3]
	CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], DECODE_SCI5K, DELVARX [1]
	DELVARX [2], DELVARX [3], DELVARX [4], DISPLOI_MON5K, ISVALID [1], ISVALID [2]
	ISVALID [3], MASK, STR2ARR [1], STR2ARR [2], UNSIGN, anytim [1], anytim [2]
	anytim [3], anytim [4], anytim [5], anytim2ex [1], anytim2ex [2], anytim2ints [1]
	anytim2ints [2], break_file [4], concat_dir [4], data_type [1], data_type [2]
	delvarx [5], ex2fid [1], ex2fid [2], fmt_tim [1], fmt_tim [2], gt_day [1]
	gt_day [2], gt_time [1], gt_time [2], int2secarr [1], int2secarr [2], mon_sci5k
	rd_hk [1], rd_hk [2], rd_tfile [1], rd_tfile [2], str_replace [1], str_replace [2]
	timstr2ex [1], timstr2ex [2], ut_time [1], ut_time [2], wc_where [1], wc_where [2]
HISTORY:
	Written 22-Nov-95 by M.Morrison
	19-Dec-95 (MDM) - Corrected fundamental error which caussed the
			  data to be offset from what it should be
	16-Jan-96 (MDM) - Added INFIL option
			- Changed output file to be the time of the first
			  packet, not the time that the routine was run.


REDUCE_DAILY $SSW/soho/lasco/idl/reduce/reduce_daily.pro
[Previous] [Next]
 NAME:
	REDUCE_DAILY

 PURPOSE:
	This procedure performs the reduction tasks that are done on a daily basis.

 CATEGORY:
	LASCO REDUCE

 CALLING SEQUENCE:
	REDUCE_DAILY

 INPUTS:
	None

 OPTIONAL INPUTS:
	STDate:	A string in the format YYMMDD that defines the starting date to be processed.
		If not present, the routine looks at the dates in daily.dat
	ENDATE:	A string in the format YYMMDD that defines the ending date to be processed.
		If not present, then only one date is processed
	
 KEYWORD PARAMETERS:
	LZ:	If present the level 0 data are to be processed.  The default is
		to process the quick look data.
	NOMED:	Do not do daily median images
	NO_C3:	Do not do C3 daily medians

 PROCEDURE:
	This procedure calls the routines to do the following tasks:

		check the monexp file for duplicates
		generate the daily median image
		generate PB and %P images

	All 4 telescopes are processed.

 CALLS: ***
	CHECK_MONEXP_DUPS, LOADCT, MK_DAILY_MED, UTC2STR, UTC2YYMMDD, YYMMDD2UTC, do_polariz
 EXAMPLE:
	To process the quick look files for June 1, 1998:

		REDUCE_DAILY,'980601'

	To process the level 0 files for June 1, 1998:

		REDUCE_DAILY,'980601',/lz

 MODIFICATION HISTORY:
 	Written by:	RA Howard, NRL, 6/19/98
	NB Rich	 6/23/98	Comment out make-movie calls
	NB Rich 11/06/98 	Add DO_POLARIZE
	NB Rich 07/07/99	Fixed typo with 'endate'
	NB Rich    12/99	Add NOMED keyword
	NB Rich	   01/00	Add NO_C3 keyword
       D  Wang 12 Jul 00       Added /VIG,/PTF to DO_POLARIZ call
	NB Rich 11 Jan 01	Fix call to open weekly.dat
	NB Rich 13 Apr 01 	Add NOREBIN to calls to MK_DAILY_MED
	NB Rich 31 Jan 02	Add /SH to spawn calls
	jake	030716		removing old commented out code
						fixing indentations
       K Battams 051021        Add ,/swap_if_little_endian keyword to OPEN calls


	%W% %H%: LASCO IDL LIBRARY


REDUCE_IMAGE $SSW/soho/lasco/idl/reduce/reduce_image.pro
[Previous] [Next]
 NAME:				REDUCE_IMAGE

 PURPOSE:			Perform the pipeline processing for one file

 CATEGORY:			REDUCTION

 CALLING SEQUENCE:		REDUCE_IMAGE,File_name,Source

 INPUTS:			File_name = Name of DDIS file to be processed
				Source    = 0 for R/T processed at GSFC
					    1 for R/T processed at NRL
					    2 for Level 0/PB processed at NRL

 OUTPUTS:			None

 OPTIONAL OUTPUTS:		None

 CALLS: ***
	GET_DB_STRUCT, GET_UTC, REDUCE_LEVEL_05, REDUCE_LEVEL_1, REDUCE_TRANSFER
	db_insert
 CALLED BY:
	REDUCE_MAIN, UNPACK_REDUCE_MAIN
 COMMON BLOCKS:		DBMS

 SIDE EFFECTS:			Moves DDIS file, Creates FITS file

 PROCEDURE: 			Processes a new image created by DDIS and 
				detected by the CRON job moves the image to a 
				new directory for permanent storage.  Log 
				entries are written.

 MODIFICATION HISTORY:		Written, RA Howard, NRL, 13 Oct 1995
   Version 1
           2      RAH    15 Nov 1995    Modified log output
           3      RAH    14 Dec 1995    Corrected condition to call to reduce_level_1

       @(#)reduce_image.pro	1.1 04 Apr 1996 LASCO IDL LIBRARY


REDUCE_IMG_HDR $SSW/soho/lasco/idl/reduce/reduce_img_hdr.pro
[Previous] [Next]
 NAME:
	REDUCE_IMG_HDR

 PURPOSE:
	This procedure appends information from the current image header to 
	the header files in $LAST_IMG and in the current image directory.

 CATEGORY:
	REDUCTION

 CALLING SEQUENCE:
	REDUCE_IMG_HDR, Hdr

 INPUTS:
	Hdr = FITS header

 OPTIONAL INPUTS:
	None
	
 KEYWORD PARAMETERS:
	DAY_ONLY	Only update current directory

 OUTPUTS:
	None

 OPTIONAL OUTPUTS:
	None

 CALLS: ***
	FXPAR [1], FXPAR [2], GETENV_SLASH, STR2UTC [1], STR2UTC [2], STR2UTC [3], STR_SEP
	TRIM, UTC2YYMMDD
 CALLED BY:
	REDUCE_LEVEL_05, REDUCE_LEVEL_1
 MODIFICATION HISTORY:
	Written, RA Howard, NRL
   VERSION 1  rah 16 Dec 1995
           2  rah 28 Dec 1995  Changed environment variable to LAST_IMG
           3  rah 29 Mar 1996  Write info to date directory also
           4  rah  4 Apr 1996  Modify filt/polar filed to be A6 from A5
           5  rah 26 Aug 1996  Added FP WL and OS Num to listing
	    6  nbr  6 Mar 1997  Write info to catalogs/daily directory
	    7  sep  3 Sep 1997  Write info to catalogs/daily_combined directory
           8  aee 21 Oct 1997  If level 1 or 2 image, write img_hdr.txt info 
                               only to the date directory.
	nbr 29 Aug 2000	- Write catalog files to $LAST_IMG instead of $IMAGES;
			  Add DAY_ONLY keyword
	nbr 11 Oct 2000 - Write img_hdr.txt file in $IMAGES also if NE $LAST_IMG
	nbr  9 Apr 2003 - Modify for level 1 processing
	nbr 25 Aug 2003 - imghdr changes
       k.battams 6/03/2005 -- get correct format for Level-1 img_hdr's

 SCCS variables for IDL use
 
 @(#)reduce_img_hdr.pro	1.13 09/08/03 :NRL LASCO IDL LIBRARY



REDUCE_IMG_HDR2 $SSW/soho/lasco/idl/display/reduce_img_hdr2.pro
[Previous] [Next]
 NAME:
	REDUCE_IMG_HDR2

 PURPOSE:
	This procedure appends information from the current image header to 
	the header files in $LAST_IMG and in the current image directory.

 CATEGORY:
	REDUCTION

 CALLING SEQUENCE:
	REDUCE_IMG_HDR2, Hdr

 INPUTS:
	Hdr = FITS header

 OPTIONAL INPUTS:
	None
	
 KEYWORD PARAMETERS:
	None

 OUTPUTS:
	None

 OPTIONAL OUTPUTS:
	None

 CALLS: ***
	DATATYPE [1], DATATYPE [2], DATATYPE [3], FXPAR [1], FXPAR [2], GETENV_SLASH
	SXPAR [1], SXPAR [2], SXPAR [3]
 MODIFICATION HISTORY:
	Written, RA Howard, NRL
   VERSION 1  rah 16 Dec 1995
           2  rah 28 Dec 1995  Changed environment variable to LAST_IMG
           3  rah 29 Mar 1996  Write info to date directory also
           4  rah  4 Apr 1996  Modify filt/polar filed to be A6 from A5

       @(#)reduce_img_hdr2.pro	1.1 11/02/01 LASCO IDL LIBRARY


REDUCE_LEVEL_05 $SSW/soho/lasco/idl/reduce/reduce_level_05.pro
[Previous] [Next]
 NAME:
		REDUCE_LEVEL_05

 PURPOSE:
		Perform the Level 0.5 Processing

 CATEGORY:
		REDUCTION

 CALLING SEQUENCE:
		Result = REDUCE_LEVEL_05 (File_name,Fits_name,Source)

 INPUTS:
		File_name = Name of file to process in the 
				            format YYMMDD_HHMMSS.img
		Source    = parameter indicating file source

 OPTIONAL INPUTS:
		Fits_name = If DB_ONLY is set, then use this file to create 
				a database update file
	
 KEYWORD PARAMETERS:
	DB_ONLY		If set, then only create database update file from 
			input fits_name

 OUTPUTS:
 		Fits_name = Name of FITS file created
   		Result = 0 do process to level 1
			 1 don't process to level 1

 OPTIONAL OUTPUTS:
		None

 CALLS: ***
	CALC_DARK_BIAS, CHECK_OBESUMERROR, CHECK_SUM_DIFF, DATATYPE [1], DATATYPE [2]
	DATATYPE [3], FXADDPAR [1], FXADDPAR [2], FXPAR [1], FXPAR [2], GETENV_SLASH
	GET_CROTA, GET_DB_STRUCT, GET_NEW_FILE_NUMBER, GET_UTC, LASCO_FITSHDR2STRUCT
	MAKE_BROWSE [1], MAKE_BROWSE [2], MAKE_FITS_HDR, MAKE_UNIQUE_OSNUM
	MONITOR_EXP_IMG, READ_LEB_IMAGE, REDUCE_IMG_HDR, REDUCE_RECTIFY
	REDUCE_RECTIFY_P1P2, REDUCE_REFCOORD, REDUCE_STATISTICS, TAG_EXIST [1]
	TAG_EXIST [2], WRITEFITS [1], WRITEFITS [2], WRITE_LAST_IMG [1]
	WRITE_LAST_IMG [2], db_insert
 CALLED BY:
	REDUCE_IMAGE
 COMMON BLOCKS:
		DBMS

 PROCEDURE:

   processes a compressed LEB image created by DDIS to level 0.5
   the image is assumed to be located in the current directory
   level 0.5 consists of 
           decompression
           remove readout port effect
           rotate image to put solar north at top of image
           make FITS file
	    generate DBMS update records
           make gif file for lastimg_cx

   The level 0.5 image file is named according to the standard name 
   convention in the subdirectory tree:  
              $IMAGES/level_05/date/tel
   Note: if dark, cal lamp or continuous image then put in 
              $IMAGES/misc/tel/[dark,lamp,cont]/date
         if header from Ground to Peripheral LP then put in 
              $IMAGES/misc/leb/gnd/date

 MODIFICATION HISTORY:
 	WRITTEN    RA Howard, 3 October 1995
   Version 1      rah    3 Oct 95    Initial release
           2      rah    6 Nov 95    Add log output
           3      rah   15 Nov 95    Modified log output
           4      rah   11 Dec 95    Changed call to write_last_image to be 
                                     fits header
           5      rah   15 Dec 95    Changed call to rectify to be fits header
           6      rah   11 Jan 96    Changed rectify to include solar north
           7      rah   12 Jan 96    Added call to rectify P1, P2 coords
           8      rah   17 Jan 96    Corrected handling of read_leb_image 
                                     image read error
           9      rah   29 Mar 96    Rearranged reduce_img_hdr to be after 
				      changing to date directory to be able to
				      write img hdr also to date directory.
				      Changed browse image to be 128 x 128
				      Changed browse name to form from fits
                                     Added call to REDUCE_STATISTICS
                                     Added call to fill up DBMS IMG_STATS
          10      rah   03 Apr 96    Added DBMS update of leb_img_hdr & _ip
                                     Added non-hdr parameters to leb_img_hdr
          11      rah   10 Apr 96    Only compute stats if image found
          12      rah   15 Apr 96    Added call to REDUCE_REFCOORD
          13      sep   04 Jun 96    Added compression_str to img_leb_hdr table
                                     Corrected insertions into img_ip table
          14      sep   28 Jun 96    Added chmod 640 on .fts files
          15      sep   17 Jul 96    Modified for new LEB hdr (obev145+)
                                     added version and fp_order to DB updates.
          16      sep   02 Oct 96    added proc_time, p1row, p1col, p2row, p2col to DB updates.
          17      rah   21 Oct 96    added fits_hdr in call to make_browse
	   18	   nbr   11 Mar 97    print FITS_filename and directory 
	   19	   rah   23 Mar 97    moved REDUCE_REFCOORD and REDUCE_STATISTIC
                                     to always process, not just if DISPLAY
                                     Also, added call to CHECK_OBESUMERROR
          20      sep   13 Jun 97    Modified for new LEB hdr (obev203+)
          21      aee   27 Jun 97    Added unique_os field to img_leb_hdr
          22      rah   18 Jul 97    Check for image summing/differencing
          23      sep   14 Apr 98    Modified diskpath entry to use $IMAGES (always /net/corona/cplex..)
          24      rah   12 Jun 98    Add monexp and dark calcs
	   25      nbr   31 Jul 98    Change diskpath to use $DSKPATH
	   26	   nbr   22 Oct 98    Use LASCO_FITSHDR2STRUCT, not FITSHDR2STRUCT
	   27	   nbr   09 Mar 99    Set a.dateorig='NULL' for img_leb_hdr table
	   28	   nbr   12 Apr 99    Set chmod to 644 on .fts files
	nbr	29 Aug 00 - Change to SCCS version for ver; Use $LAST_IMG as location
			    of link directory if different from $IMAGES
          30      aee   21 Nov 00    Subtract lpulse from exp3 (and therefore from exptime)
                                     for cal lamp images on and after july 28, 1997.
	nbr	22 Jan 01 - Add door_cls output directory
	nbr 	30 Nov 01 - Add DB_ONLY option
	nbr	11 Dec 01 - Fix ss variable definition
	nbr	 1 Feb 02 - Add /SH to SPAWN calls
	jake	030721	added CROTA[12] keywords to EIT images
					(these keywords are added to LASCO in REDUCE_REFCOORD)
	jake	030804	replaced GET_SOHO_ROLL with GET_CROTA
       Karl Battams   2 Nov 2005 - Add swap_if_little_endian keyword for opening binary data files
                                     

 SCCS variables for IDL use
 
version=  '@(#)reduce_level_05.pro	1.30 11/02/05' ; LASCO IDL LIBRARY



REDUCE_LEVEL_1 $SSW/soho/lasco/idl/reduce/reduce_level_1.pro
[Previous] [Next]
 NAME:
	REDUCE_LEVEL_1

 PURPOSE:
	This procedure performs the standard pipeline processing to 
	take the level 0.5 image to Level 1. 
   *** Note: This procedure is now designed to operate without
	any calling procedure. Simply input a level_05 FITS
	filename with path and it will do the rest.
	- NBR, 8/4/00

 CATEGORY:
	LASCO REDUCTION

 CALLING SEQUENCE:
	REDUCE_LEVEL_1, Fits_name

 INPUTS:
	Fits_name = Name of FITS file to process, including path

 OPTIONAL INPUTS:
	$RED_L1_PATH, $REDUCE_OPTS: environment variable for pipeline processing
	
 KEYWORD PARAMETERS:
  /REM_CR	Perform cosmic ray removal algorithm - THIS OPTION IS NOT RECOMMENDED because it 
		doesn't work very well
  /NO_VIG	Do not apply vignetting correction
  /PIPELINE	Process for pipeline (saves in pipeline directory, creates database entry)
  /RESET	Read in calibration images (vignetting, mask, ramp, etc.) from file instead
		of using what is stored in the common block
  SAVEDIR = 'pathname'		Directory to save output in. Default is current directory.


 OUTPUTS:
   Default:
	Writes FITS file in current directory or SAVEDIR (or $IMAGES if PIPELINE set)
	Writes ./reduce_level_1.log (or unique log file if PIPELINE set)
	Description of keywords in FITS header are at 
		http://lasco-www.nrl.navy.mil/level_1/level_1_keywords.html

 OPTIONAL OUTPUTS:
	None

 CALLS: ***
	ADJUST_HDR_TCR, ANYTIM2TAI, ANYTIM2UTC [1], ANYTIM2UTC [2], C2_CALIBRATE, C2_WARP
	C3_CALIBRATE, C3_WARP, DATATYPE [1], DATATYPE [2], DATATYPE [3], DIFF
	FILE_EXIST [2], FIND_MISS_BLOCKS, FIXWRAP, FXADDPAR [1], FXADDPAR [2], FXHMAKE [1]
	FXHMAKE [2], FXPAR [1], FXPAR [2], GETENV_SLASH, GET_DB_STRUCT, GET_DELIM
	GET_ROLL_OR_XY, GET_SEC_PIXEL, GET_SOLAR_RADIUS, GET_SUN_CENTER [1]
	GET_SUN_CENTER [2], GET_SUN_CENTER [3], GET_UTC, LASCO_READFITS [1]
	LASCO_READFITS [2], MAXMIN, REDUCE_IMG_HDR, REDUCE_STATISTICS2, STR_SEP, TAI2UTC
	TRIM, UTC2STR, WRITEFITS [1], WRITEFITS [2], db_insert, file_exist [1]
	file_exist [3], nums2string
 CALLED BY:
	REDUCE_IMAGE
 COMMON BLOCKS:
	DBMS, REDUCE_HISTORY

 RESTRICTIONS:
	Must have LASCO IDL Library
	Must have environment $LASCO_DATA defined
	The REM_CR option is not currently supported outside of NRL
  ***  Current versions of calibration files only tested for images observed before July 1998!!! ***
   	Polarization processing or background removal is Level 2

 PROCEDURE:

   Level 1 consists of calibrating for 
           dark current
           flat field
           stray light 
           distortion  
           vignetting  
           photometry (physical units)
	    corrected time and position


 MODIFICATION HISTORY:
		Written	 RA Howard, NRL
   Version 1	rah  3 Oct 1995    Initial release
           2   rah 15 Nov 1995    Modified log output
           3   rah 21 Oct 1996    Added fits_hdr to make_browse
           4   aee 23 Oct 1997    Added fits name error handling and camera 
                                  case statement and modified the code to
                                  use C3_CALIBRATE instead of photocal. Also
                                  introduced environment variable 
                                  REDUCE_L1_OPTS which must contain 'DBMS'
                                  in order to create a DB file. Set negative
                                  image intensity values to zeros. Also adds
                                  image info to the img_hdr.txt file. Also
                                  added stray light and distortion correction.
	   	nbr  5 Oct 1998	   changed output directory; no database entry
	    5   nbr  1 Mar 1999    Added header updates from GET_IMG_LEB_HDR_UPDATES;
				   added IMG_LEB_HDR for .db files; open .db file
	nbr  4 Aug 2000 - Update version recording; reconstruct FITS header for Level 1;
			  compute roll, suncenter, time corrections
	nbr  7 Aug 2000 - Edit HISTORY fields
	nbr 26 Oct 2000 - Edit call to C3_CALIBRATE
	nbr 14 Nov 2000 - Add header field N_MISSING, REM_CR keyword
	nbr 12 Jan 2001 - Apply mask after warp
	nbr 25 Jan 2001 - Add bkg, mask_blocks, zblocks0 to common block; add MISSLIST to header
	nbr 15 Feb 2001 - Add C2
	nbr 15 May 2001 - Change SOLAR_R to R_SUN in hdr
	nbr 31 May 2001 - Change $ANCIL_DATA to $LASCO_DATA
	nbr  8 Nov 2001 - Modify for use outside of pipeline; remove c3_cal_img COMMON block
	nbr  3 Dec 2001 - Make paths compatible with Windows SSW for GSV
	nbr 17 Dec 2001 - Make paths compatible with Windows SSW for GSV
	nbr 24 Jun 2002 - Use RED_L1_PATH for pipeline savedir and for log and db files;
			  use yyyymmdd for output dir
	nbr  5 Jul 2002 - Change comment for CROTA; reinsert READPORT in header because is 
			  used in offset_bias.pro
	nbr 17 Sep 2002 - Use BSCALE and BZERO to save images as integers; 
			  add BLANK keyword; use .txt instead of .sav for c3[2]nullblocks
	nbr  9 Jan 2003 - mask_flag=0 for debugging
	nbr 14 Mar 2003 - Reinsert COMMON c3_cal_img for mask; don't get mask in this program;
			  add fixwrap for summed images; convert only C3 Clear to type integer;
			  use adjust_hdr_tcr() for time, roll, suncenter
	nbr  9 Apr 2003 - reduce_img_hdr DAY_ONLY if not pipeline
	nbr 14 Apr 2003 - Modify to do monthly images.
	nbr 16 May 2003 - Modify keyword comments
	nbr 11 Sep 2003 - Change img_leb_hdr db update
	04.04.01, nbr - Use best available values post-interruption and note in header;
                obsolete TIME-OBS; rotate inverted images
       04.04.08, nbr - Update for bkg images
       05.07.25, nbr - Update/fix C3 mask implementation
       05/07/28 KarlB - Change output directory structure
       Aug 1,05  KB  - Another minor change to output dir
       Sep21,05 KarlB - Routine now skips files that don't exist as LZ data
       Sep30,05 KarlB - Change format of 'DATE'
       Oct03,05 KarlB - Add "LEVEL = 1.0" to fits header
                      - Remove "tab" spaces from HISTORY comments
       May09,05 KBattams - Add savedir k/w (which appeared to be missing)
                       - made some mods to how filenames of rolled monthly images are formed
       Jun22,06 KB/RCC - reduce_img_hdr now only called during pipeline processing

version= '@(#)reduce_level_1.pro	1.44, 06/22/06' ; LASCO IDL LIBRARY


REDUCE_MAIN $SSW/soho/lasco/idl/reduce/reduce_main.pro
[Previous] [Next]
 NAME:				REDUCE_MAIN

 PURPOSE:			Main program to search for new files created by
				DDIS to perform pipeline processing on.

 CATEGORY:			REDUCTION

 CALLING SEQUENCE:		REDUCE_MAIN, Src

 INPUTS:			None

 OPTIONAL INPUTS:		Src = 0 for processing R/T files at GSFC
 				      1 for processing R/T files at NRL
 				      2 for processing PB files at NRL
	
 KEYWORD PARAMETERS:		Auto = if set then use closed_img_file
                                      if not set then use closed_img_file2
                               reduce_only -- for use by user reduce only. Nobody  
                                       else should need it

 OUTPUTS:			None

 OPTIONAL OUTPUTS:		None

 CALLS: ***
	DDISTIM2ECS, DIFF2TIME, GETENV_SLASH, GET_UTC, REDUCE_IMAGE, STR2UTC [1]
	STR2UTC [2], STR2UTC [3], STR_INDEX [1], STR_INDEX [2], TRIM, UTC2TAI, UTC2YYMMDD
 CALLED BY:
	reformat [1], reformat [2], reformat [3]
 COMMON BLOCKS:		DBMS

 SIDE EFFECTS:

 RESTRICTIONS:

 PROCEDURE:

 EXAMPLE:

 MODIFICATION HISTORY:		Written  RA Howard, NRL
    Version 1   RAH, 6 Nov 1995,    Initial Release
    Version 2   rah, 15 Nov 1995,   Added closed_img_file flag file
                                    Modified log printing
    Version 3   rah, 18 Nov 1995,   Added source as optional parameter
    Version 4   rah,  7 Dec 1995,   Minor corrections to version
    Version 5   rah,  4 Jan 1996,   Correction to handling of .mem files
    Version 6   rah, 15 Jan 1996,   Minor correction to file name and get_lun,luf
    Version 7   rah, 18 Jan 1996,   Corrected handling of contents of closed_img_file
				     to correct FP files
    Version 8   rah, 09 Apr 1996,   Added check of letter extension to filename
    Version 9   rah, 19 Apr 1996,   More mods to account for letter extension
    Version 10  rah, 27 Apr 1996,   Added error handling opening closed_img_file
    Version 11  rah, 08 May 1996,   Added creation of file for update list
    Version 12  nbr, 08 Apr 1997,   Changed target directories for .log and .db files
    Version 13  rah, 26 Aug 1997,   Error handling opening closed_img_file
    Version 14  rah, 27 Sep 1997,   Handling of files created out of time order
    Version 15  rah, 16 Jan 1998,   Process mem files first before img files
    Version 16  nbr, 03 Jun 1998,   Remove old .img dirs from previous session
    Version 17  rah, 19 Oct 1998,   Remove old log files for GSFC processing
    Version 18  nbr,  4 Jan 1999,   Add row to .db file to remove QL LEB_HDR
    Version 19  nbr, 20 Oct 1999,   Send message to user if gap between current and last
					.img files is > 1 hour; add check for good date
    Version 20  nbr,  4 Apr 2000,   Halt processing of QL for db update at 2AM; move save lastdate.sav
    Version 21  nbr, 24 Jul 2000,   Add /SH to spawn commands
    Version 22 nbr , 17 Oct 2001,   Change filename sent in email for db update halt
    Version 23 nbr,   1 Feb 2002 - Use /noshell keyword for two spawn commands; move chmod updates to end; Add /SH to SPAWN calls
    Version 23 nbr,   4 Feb 2002 - Move chmod to correct location
				jake,	030813	-	changed mail's to /usr/ucb/mail's
       Karl Battams  14 Oct 2004 - Add reduce_only keyword to specify LASCO_DATA variable
       Karl Battams   2 Nov 2005 - Add swap_if_little_endian keyword for opening binary data files
                                 - Tweak spawn commands (change them to /bin/* -- should work fine for most everyone)
       Karl Battams  18 Nov 2005 - Replace findfile() with file_search()

			PLEASE CORRECTLY USE TABS FOR INDENTATION
			POORLY INDENTED CODE IS HARD TO READ!

 @(#)reduce_main.pro	1.32 11/18/05 :LASCO IDL LIBRARY



REDUCE_RECTIFY $SSW/soho/lasco/idl/reduce/reduce_rectify.pro
[Previous] [Next]
 NAME:			REDUCE_RECTIFY
 PURPOSE:
	function procedure to rectify the CCD image to account
	for the port that the image has been read out
 
 CATEGORY:
 CALLING SEQUENCE:	x = REDUCE_RECTIFY (a,h)

 INPUTS:		a = input image
			h = FITS header

 OUTPUTS:		x = rectified image
			h will be modified to reflect the rectification

 OPTIONAL OUTPUT PARAMETERS:
 CALLS: ***
	FXADDPAR [1], FXADDPAR [2], FXPAR [1], FXPAR [2], REDUCE_RECTIFY_P1P2
 CALLED BY:
	REDUCE_LEVEL_05
 COMMON BLOCKS:
 SIDE EFFECTS:
 RESTRICTIONS:
 PROCEDURE:
	rectifies an image taken with the CCD camera to be as
	though the observer were looking through the CCD.
	The telescope is assumed to be an erecting one.

	If !order is 0, the image will be displayed on the screen
	properly.
 MODIFICATION HISTORY:

	rah 3/16/93  revised to use idl built in function, rotate
	rah 11/7/95  revised to accept readport as string or number
	V4  rah 11/7/95  revised to accept header as FITS header
	V5  rah 1/11/96  revised to rectify image for !order=0, origin at
                        bottom left of image
	V6  rah 1/14/96  EIT doesn't need a rotation, it is an inverting 
			 telescope
	V7  rah 1/30/96  Correction to C1
	V8  rah 3/6/96   Correction to C1 orientation and "R" coordinates

 SCCS variables for IDL use
 

	@(#)reduce_rectify.pro	1.1 04 Apr 1996 LASCO IDL LIBRARY


REDUCE_RECTIFY_P1P2 $SSW/soho/lasco/idl/reduce/reduce_rectify_p1p2.pro
[Previous] [Next]
 NAME:	
			REDUCE_RECTIFY_P1P2

 PURPOSE:
			Generate R1 and R2 coordinates from the P1,P2
			CCD coordinates that simulate coordinates
			that would have been used if the CCD had been
			read out in the rectified position.
			
 CATEGORY:		
			LASCO REDUCTION

 CALLING SEQUENCE:
			REDUCE_RECTIFY_P1P2,Effport,Hdr

 INPUTS:		
			Effport:  A character 'A' to 'D' indicating
				  the CCD readout port, corrected for
				  the telescope position on the S/C
			Hdr:	  The FITS image header

 OUTPUTS:		
			None

 OPTIONAL OUTPUT PARAMETERS:
			None

 CALLS: ***
	FXADDPAR [1], FXADDPAR [2], FXPAR [1], FXPAR [2]
 CALLED BY:
	REDUCE_LEVEL_05, REDUCE_RECTIFY
 COMMON BLOCKS:
			None

 SIDE EFFECTS:
			Adds parameters R1COL, R1ROW, R2COL, R2ROW,
			EFFPORT to the FITS headers

 RESTRICTIONS:
			If the port is not A..D then the values of R1
			and R2 are just set to P1 and P2

			If R1 is less than 1, the R1 and R2 coordinates
			are adjusted accordingly

 PROCEDURE:
 MODIFICATION HISTORY:
	Version 1	RA Howard 11 Jan 96	Written

       @(#)reduce_rectify_p1p2.pro	1.1 04 Apr 1996 LASCO IDL LIBRARY


REDUCE_REFCOORD $SSW/soho/lasco/idl/reduce/reduce_refcoord.pro
[Previous] [Next]
 NAME:
	REDUCE_REFCOORD

 PURPOSE:
	Converts coordinate system to the standard coordinate system
	using the FITS keyword notation

 CATEGORY:
	LASCO DATA REDUCTION

 CALLING SEQUENCE:
	REDUCE_REFCOORD, Hdr, Level

 INPUTS:
	Hdr:	FITS header
	Level:	String indicating level to define coordinate system:
			'0.5', '1.0', '2.0'

 CALLS: ***
	FXADDPAR [1], FXADDPAR [2], FXPAR [1], FXPAR [2], GET_CROTA, GET_SEC_PIXEL
	GET_SUN_CENTER [1], GET_SUN_CENTER [2], GET_SUN_CENTER [3]
 CALLED BY:
	LASCO_READFITS [1], REDUCE_LEVEL_05
 SIDE EFFECTS:
	Keywords are added to the FITS header, where n=1,2:
		CRPIXn, CRVALn, CROTAn, CDELTn, CTYPEn, CUNITn

 PROCEDURE:
	The 12 FITS keywords are computed for each of the processing
	levels and added to the header.  The keywords for one level
	do not require that the keywords for the preceeding level are 
	present.

 SUBROUTINE CALLS:
	FXPAR, FXADDPAR, GET_SUN_CENTER, GET_SEC_PIXEL

 MODIFICATION HISTORY:
       RA Howard, NRL, 14 April 1996
	Vers 1   14 Apr 1996, Initial Release
	     2   23 May 1997, All levels use solar coords
			030710 jake	added lines to account for nominal_roll_attitude
			030716 jake	using get_soho_roll instead of get_crota
			030804 jake replaced GET_SOHO_ROLL with GET_CROTA

	@(#)reduce_refcoord.pro	1.7 10/16/06 LASCO IDL LIBRARY


REDUCE_STATISTICS $SSW/soho/lasco/idl/reduce/reduce_statistics.pro
[Previous] [Next]
 NAME:

	REDUCE_STATISTICS

 PURPOSE:

	This procedure generates image statistics for the level 0.5 processing.

 CATEGORY:

	LASCO REDUCTION

 CALLING SEQUENCE:

	REDUCE_STATISTICS, Img, Hdr

 INPUTS:

	Img:	The 2D image to compute statistics on.

	Hdr:	A FITS header

 OUTPUTS:

	Hdr:	The FITS header will have additional keywords added.

 CALLS: ***
	FXADDPAR [1], FXADDPAR [2], STDEV
 CALLED BY:
	REDUCE_LEVEL_05
 PROCEDURE:
	Generates the following statistical quantities:
	   minimum value not equal to 0 
	   maximum value not equal to saturated (16383)
	   number of zero pixels
	   percentage of saturated pixels
	   percentile values for 1%, 10%, 25%, 75%, 90%, 95%, 98% 99%
	   mean of image
	   standard deviation of image


 MODIFICATION HISTORY:
 	Written by:	RA Howard, NRL, 20 Mar 1996
	Version 2  RAH, 19 Apr 1996   Made low a long word
	V3  RAH, 18 Jul 1997   Added check for data type for maximum

       @(#)reduce_statistics.pro	1.5 09/28/05 LASCO IDL LIBRARY


REDUCE_STATISTICS2 $SSW/soho/lasco/idl/reduce/reduce_statistics2.pro
[Previous] [Next]
 NAME:

	REDUCE_STATISTICS2

 PURPOSE:

	This procedure generates image statistics for the level 1 processing.

 CATEGORY:

	LASCO REDUCTION, modified

 CALLING SEQUENCE:

	REDUCE_STATISTICS2, Img, Hdr

 INPUTS:

	Img:	The 2D image to compute statistics on.

	Hdr:	A FITS header

 KEYWORDS:

	SATMAX	set equal to value to be considered saturated (upper cutoff)
	SATMIN	sat equal to value to be considered minimum cutoff

 OUTPUTS:

	Hdr:	The FITS header will have additional keywords added.

 CALLS: ***
	FXADDPAR [1], FXADDPAR [2], STDEV
 CALLED BY:
	REDUCE_LEVEL_1
 PROCEDURE:
	Generates the following statistical quantities:
	   minimum value not equal to 0 
	   maximum value not equal to saturated (input value or max of image)
	   number of zero pixels
	   percentage of saturated pixels
	   percentile values for 1%, 10%, 25%, 75%, 90%, 95%, 98% 99%
	   mean of image
	   standard deviation of image


 MODIFICATION HISTORY:
 	Written by:	NB Rich, NRL -- Copied from REDUCE_STATISTICS.PRO by RA Howard
	NBR, 1 Sep 1998	 Make generic, change name, add sat input 
	NBR, 19 Jan 2001 - Change value of DATASAT keyword in output
	NBR, 29 Aug 2002 - Add SATMAX keyword in input and change handling of this value; 
			add SATMIN; add NDATASAT, DSATMIN, NDSATMIN in output
	NBR, 11 Mar 2003 - Do percentiles before truncation if SATMAX set

       %H% %W% LASCO IDL LIBRARY


REDUCE_STD_SIZE $SSW/soho/lasco/idl/data_anal/reduce_std_size.pro
[Previous] [Next]
 NAME:

	REDUCE_STD_SIZE

 PURPOSE:

	Create a "full image" 512x512 of the input image.  Accounts for sub 
	images and pixel summing.

 CATEGORY:

	LASCO DATA REDUCTION

 CALLING SEQUENCE:

	Result = REDUCE_STD_SIZE(Img,Hdr)

 INPUTS:

	Img:	Input Image array
	Hdr:	FITS header or LASCO header structure

 OPTIONAL INPUTS:
	None
	
 KEYWORD PARAMETERS:

	FULL:	   Returns an image of size 1024x1024 pixels if set. The default is a 
		   512x512 image.

	NO_REBIN:  Set this to return an array which has not been rescaled 
		   into 512 or 1024.  The default is to perform a rebin to 
                  resize the image.

	BIAS:	Subtracts bias and corrects values for binning before returning image. 
		If the bias is set to 1, then the OFFSET_BIAS routine is called.
               If the bias is greater than 1, then the value in the bias keyword is used.

	SAVEHDR:	Do not put new values in header

 OUTPUTS:

	The function result is a full image, with the input image inserted into
	the correct place in the full image. Also, hdr is modified.

 OPTIONAL OUTPUTS:
	bias

 CALLS: ***
	DATATYPE [1], DATATYPE [2], DATATYPE [3], GET_SUN_CENTER [1], GET_SUN_CENTER [2]
	GET_SUN_CENTER [3], LASCO_FITSHDR2STRUCT, OFFSET_BIAS
 CALLED BY:
	C3_WARP, COMB_FULL_EQ, IMG2DNPERSEC, MAKE_IMAGE_EIT img hdr, MKMOVIE
	MKMOVIE0 obsolete version of mkmoviepro, MKMOVIEM, MK_DAILY_MED, MK_IMG, RTMOVIE
	WRITE_LAST_IMG [1], WRITE_LAST_IMG [2], carrmapmaker2
 COMMON BLOCKS:
	None

 SIDE EFFECTS:
	None

 PROCEDURE:

	The input image is inserted into its proper place in a full image.  
	On-chip and off-chip pixel summing are properly considered. The output 
	image is resized to a 512 x 512 image.  Optionally, it can be resized 
	to 1024 x 1024 or any size, or not resized at all.  

	If the image is not resized, then each dimension would be determined
	by the amount of summing along each axis according to 1024 / SUM,
	where SUM is the number of pixels summed along the axis.  i.e., if 2x2 
	summing is used, then the image size would be 512 x 512.  If 4x2 
	summing were used, then the image size would be 256 x 512.

	IF BIAS keyword is set, output image values are corrected for summing 
	and offset bias. LEBSUM and SUM header values are changed to reflect output. 

 EXAMPLE:

	To obtain the default 512 x 512 image:

		Output = REDUCE_STD_SIZE(Img,Hdr)

	To obtain a 1024 x 1024 image:

		Output = REDUCE_STD_SIZE(Img,Hdr,/full)

	To obtain an image sized by the summing:

		Output = REDUCE_STD_SIZE(Img,Hdr,/no_rebin)

 MODIFICATION HISTORY:		Written, RA Howard, NRL
    VERSION 1   rah    29 Aug 1996
    VERSION 1.1 sep    29 Sep 1996	added /FULL keyword, and ability to
					handle header structures
    VERSION 1.2 rah    22 Oct 1996	Added /no_rebin keyword
    VERSION 1.3 rah    17 Jul 1997	Corrected handling of image sizes >1024
    VERSION 1.4 nbr	11 Dec 1998	Corrected handling of summed images with sizes > 512
    VERSION 1.5 nbr    11 Feb 1999	Modify R[1,2][row,col] in header (returned)
   		 nbr	12 Feb 1999	Divide by lebxsum*lebysum if binned image
		 nbr	17 Feb 1999	See notes below
		 nbr	18 Feb 1999	Do not divide by lebxsum*lebysum if %P or PB image
		 nbr	23 Mar 1999	Modify NAXIS[1,2] in header
		 nbr 	23 Apr 1999	Added telescope check
		nbr	 7 Dec 1999	Replace stc_flag with LASCO_FITSHDR2STRUCT; fix
					problem with unsummed, rebinned images
		nbr,  1 Aug 2000 - Modify for MK4 images
	nbr, 30 Jan 01 - Add BIAS keyword and streamline program
	nbr, 15 Jun 01 - Remove conditional on REBIN
	nbr, 19 Nov 01 - Handle zero-size images
	nbr, 14 Mar 03 - Correct binning correction again; add /SAVEHDR
	nbr,  5 May 04 - Update crpix values in header if subfield
       rah, 27 Feb 06 - Add the capability to use the bias value input to the program

 
 02/27/06 @(#)reduce_std_size.pro	1.16 :NRL Solar Physics


REDUCE_TRANSFER $SSW/soho/lasco/idl/reduce/reduce_transfer.pro
[Previous] [Next]
 NAME:				REDUCE_TRANSFER

 PURPOSE:			Peform the transfer of an image file
				created by DDIS into $LEB_IMG to the 
				appropriate subdirectory under $LAST_IMG

 CATEGORY:			REDUCTION

 CALLING SEQUENCE:	 	Result = REDUCE_TRANSFER (File_name, Source)

 INPUTS:			File_name = Name of DDIS file to transfer
				Source = parameter giving source of data

 OPTIONAL INPUTS:		None
	
 KEYWORD PARAMETERS:		None

 OUTPUTS: 			Result =  0 process to level 0.5
               			  1 don't process further

 OPTIONAL OUTPUTS:		None

 CALLS: ***
	GETENV_SLASH, GET_DB_STRUCT, GET_UTC, READ_LEB_IMAGE, STR2UTC [1], STR2UTC [2]
	STR2UTC [3], db_insert
 CALLED BY:
	REDUCE_IMAGE
 COMMON BLOCKS:

 SIDE EFFECTS:			None

 PROCEDURE:			
	The subdirectories under $RAW are:
	$RAW/YYMMDD if .img file
	The subdirectories under $IMAGES are not used in the procedure.
	The subdirectories under $LAST_IMG are:
       $LAST_IMG/misc/leb/mem/YYMMDD if memory dump
       $LAST_IMG/misc/leb/gnd/YYMMDD if ground to peripheral header
   Also enters the appropriate information into the data base

 MODIFICATION HISTORY:		Written, RA Howard, NRL

   Version 1	RAH   13 Oct 1995     Initial Release
           2   RAH   15 Nov 1995     Modified log printouts
           3   RAH   18 Mar 1996     Added leb summing to DB
           4   RAH   03 Apr 1996     Moved DBMS update of hdr & ip to 05
           5   RAH   09 Apr 1996     Check validity of image date
           6   RAH   29 Oct 1996     Added -f option to mv to force the move
	    7   NBR   19 May 1997     Use 'RAW' env var to place .img files
	    8	NBR   24 Dec 1997     Handle 0-length .img files
	    9   NBR   03 Feb 1999     Change upper bound of validdate to today + 2
		NBR   29 Aug 2000 - Use $LAST_IMG instead of $IMAGES
	NBR, 31 Jan 2002 - Add /SH to spawn calls


       @(#)reduce_transfer.pro	1.10 02/01/02 ; NRL LASCO IDL LIBRARY


reformat [2] $SSW/soho/lasco/idl/reduce/reformat.pro
[Previous] [Next]
 reformat.pro
 Run the reformatting code in the EOF
 
 SCCS variables for IDL use
 
 @(#)reformat.pro	1.1 05/14/97 :NRL Solar Physics

 CALLS:
 CALLED BY
	go_get_sirius, yoyo_man2


reformat_date $SSW/soho/lasco/idl/database/reformat_date.pro
[Previous] [Next]

 fixed for year 2000 - 2020 AD

 @(#)reformat_date.pro	1.2 01/21/99 : NRL IDL Library

+
 NAME:
	reformat_date

 PURPOSE:
       change dates like m/d/yy to mm/dd/yyyy format.

 CATEGORY:
       Time Utility

 CALLING SEQUENCE:

	RESULT = reformat_date ( date )


 INPUTS:
	date:  string with date in m/d/yy format	

 OPTIONAL INPUTS:
	
 KEYWORD PARAMETERS:

 OUTPUTS:
       returns string in mm/dd/yyyy format

 OPTIONAL OUTPUTS:

 COMMON BLOCKS:

 SIDE EFFECTS:

 RESTRICTIONS:
	For years 1951 - 2050 only

 PROCEDURE:

 EXAMPLE:

       datestring='12/1/99'
	result = reformat_date(datestring)

       Produces datestring equal to '12/1/1999'

 MODIFICATION HISTORY:
 	Written by:	Ed Esfandiari -  April 1997
       21 Jan 99 -     Y2k Fix for years 2000-2050 - DW

	@(#)reformat_date.pro	1.2 01/21/99 LASCO IDL LIBRARY


REG_CDROM $SSW/soho/cds/idl/util/ops/database/reg_cdrom.pro
[Previous] [Next]
 Project     :	SOHO - CDS

 Name        :	REG_CDROM

 Purpose     :	Register information about the level zero CDROMs.

 Category    :	Class4, Operations, Catalog

 Explanation :	Puts an entry in the CDROM database about a CDROM disk
		containing CDS level-zero telemetry data.  The sequence number
		and volume number are stored, together with the start and end
		times of the telemetry packets.

		Called from the routine LOAD_CDROM

 Syntax      :	Result = REG_CDROM( SEQUENCE, VOLUME, MJD )

 Examples    :	IF NOT REG_CDROM( ... ) THEN ...

 Inputs      :	SEQUENCE = The sequence number of the CDROM, taken from the
			   file voldesc.sfd.  For example, if the sequence
			   number was 2, then the CDROM would have the name
			   "SO_CDS_LZ_0002" on the cover.

		VOLUME	 = The volume number of the CDROM, taken from the
			   file voldesc.sfc.  For example, if the volume
			   number was 4, then the CDROM cover might say
			   something like "4 of 9" on the cover.

		MJD      = The modified julian day number of a date contained
			   on the CDROM.

 Opt. Inputs :	None.

 Outputs     :	The result of the function is 1 if successful, or 0 if
		unsuccessful.

 Opt. Outputs:	None.

 Keywords    :	ERRMSG = If defined and passed, then any error messages will be
			 returned to the user in this parameter rather than
			 depending on the MESSAGE routine in IDL.  If no errors
			 are encountered, then a null string is returned.  In
			 order to use this feature, ERRMSG must be defined
			 first, e.g.

				ERRMSG = ''
				Result = REG_CDROM( ERRMSG=ERRMSG, ... )
				IF ERRMSG NE '' THEN ...

 Calls       : ***
	DATATYPE [1], DATATYPE [2], DATATYPE [3], DBBUILD [1], DBBUILD [2], DBBUILD [3]
	DBCLOSE [1], DBCLOSE [2], DBCLOSE [3], DBFIND [1], DBFIND [2], DBFIND [3]
	DBOPEN [1], DBOPEN [2], DBOPEN [3], TRIM
 Common      :	None.

 Restrictions:	None.

 Side effects:	None.

 Prev. Hist. :	None.

 History     :	Version 1, 04-Apr-1996, William Thompson, GSFC
		Version 2, 10-Apr-1996,	William Thompson, GSFC
			Modified for version 2 of the CDROM database

 Contact     :	WTHOMPSON


reg_check $SSW/soho/mdi/idl/ops/reg_check.pro
[Previous] [Next]
NAME:
	reg_check
PURPOSE:
	To take an .ips file as input and to find all of the register
	usage and to look for conflicts.  Conflicts are flagged with
	a >>
SAMPLE CALLING SEQUENCE:
	reg_check
	reg_check, infil, outfil
	reg_check, '/mdisw/cfl/dev/ip/mkdps.ips', 'dd.out'
OPTIONAL INPUT:
	infil	- The .ips input file.  Default is:
		  '/mdisw/cfl/dev/ip/mkdps.ips'
	outfil	- If present, save the results to the output file.
OPTIONAL KEYWORD OUTPUT:
	hc	- If set, send the results to the printer.
 CALLS: ***
	STR2ARR [1], STR2ARR [2], prstr [1], prstr [2], rd_tfile [1], rd_tfile [2]
	remtab [1], remtab [2], str_replace [1], str_replace [2], wc_where [1]
	wc_where [2]
HISTORY:
	Written 1-Aug-95 by M.Morrison
	 1-Aug-95 (MDM) - Added information on what instructions was used
			  with the register


REGEN_SYNOP $SSW/soho/cds/idl/util/misc/regen_synop.pro
[Previous] [Next]
 Project     :	SOHO - CDS

 Name        :	REGEN_SYNOP

 Purpose     :	Regenerates the synoptic datasets.

 Category    :	CDS, Class3, Synoptic

 Explanation :	Scans the directory CDS_CDROM_DATA to determine what time range
		is represented, and regenerates the synoptic datasets
		accordingly.  Called from FITSGEN_EVENT.

 Syntax      :	REGEN_SYNOP

 Examples    :	

 Inputs      :	None.

 Opt. Inputs :	None.

 Outputs     :	None.

 Opt. Outputs:	None.

 Keywords    :	None.

 Calls       : ***
	BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], CONCAT_DIR [1], CONCAT_DIR [2]
	CONCAT_DIR [3], FIND_FILE, LIST_MAIN, MK_SYNOPTIC, STR2UTC [1], STR2UTC [2]
	STR2UTC [3], TRIM, UNIQ [1], UNIQ [2], UNIQ [3], break_file [4], concat_dir [4]
 Common      :	None.

 Restrictions:	None.

 Side effects:	None.

 Prev. Hist. :	None.

 History     :	Version 1, 21-Nov-1996, William Thompson, GSFC
		Version 2, 02-May-1997, William Thompson, GSFC
			Make more intelligent about what days to process.
		Version 3, 11-May-1997, William Thompson, GSFC
			Fix bug introduced in version 2.

 Contact     :	WTHOMPSON


REGIS [2] $SSW/soho/mdi/idl_old/gen/ssw_lib/regis.pro
[Previous] [Next]
 Project     : SOHO - CDS

 Name        : REGIS

 Purpose     : Sets graphics device to REGIS mode.

 Explanation : SETPLOT is called to save and set the system variables.

 Use         : REGIS

 Inputs      : None.

 Opt. Inputs : None.

 Outputs     : A message is printed to the screen.

 Opt. Outputs: None.

 Keywords    : None.

 Calls       : ***
	SETPLOT [1], SETPLOT [2]
 Common      : None.  But calls SETPLOT, which uses common block PLOTFILE.

 Restrictions: It is best if the routines TEK, REGIS, etc.  are used (i.e.
		those routines that use SETPLOT) to change the plotting device.

		In general, the SERTS graphics devices routines use the special
		system variables !BCOLOR and !ASPECT.  These system variables
		are defined in the procedure DEVICELIB.  It is suggested that
		the command DEVICELIB be placed in the user's IDL_STARTUP file.

 Side effects: If not the first time this routine is called, then system
		variables that affect plotting are reset to previous values.

 Category    : Utilities, Devices.

 Prev. Hist. : W.T.T., Nov. 1987.

 Written     : William Thompson, GSFC, November 1987.

 Modified    : Version 1, William Thompson, GSFC, 27 April 1993.
			Incorporated into CDS library.

 Version     : Version 1, 27 April 1993.


rel_ql_fill $SSW/soho/lasco/idl/packets/rel_ql_fill.pro
[Previous] [Next]
 Purpose:
  Fill in gaps in *.REL Sci TM with packets from QKL files and write new
  output REL file 

  This will fill in data gaps from the first packet to the last packet 
  in the REL file.  For preceding gaps or trailing gaps use the FIRST and LAST
  keywords to set the range of packet seq numbers  

 CALL:
   rel_ql_fill,rel_file,ql_file,out_file,rel,ql,out

 INPUT:  
       rel_file - *.REL file with data gap(s)
       ql_file -  *.QKL file used to fill data gap(s)
       out_file - name of output file


 OUTPUT: 
 	rel - byte array containing input REL packets
 	 ql - byte array containing input QKL packets
	out - output byte array containing merge packets
        

 KEYWORDS:
	DEBUG  - output debug information
	WRITE  - write output file (default is not to write)
       FIRST  - set the start Packet Seq Num 
                (error if first is not found in REL file)
       LAST   - set the last Packet Seq Num 

 CALLS: ***
	DECODE_SCI_PKT_B, READ_TM_PACKET, TAI2UTC, WRITE_REL
 EXAMPLE:  

 HISTORY:
 25 Oct 1999 D.Wang    - Created

 @(#)rel_ql_fill.pro	1.1 10/28/99 :LASCO NRL IDL LIBRARY

 COMMENTS:
 1. Compared to *.rec files QKL and REL are offset by 9 words e.g word 9 
    in *.recs  are bytes 0 and 1 in rel and ql

 2. Packet Sequence Number is 14 bits and rolls over at 16383. So this routine
    can only handle up to 16383 packets.  Since the typical *.REL file is
    about 4000 packets this should be OK.

 3. REL files have a FITS like header header that contains the start and 
    end times and the number of packets in the file.  Output REL files
    generated by this routine modify only the number of packets, start time 
    and end time

 4. REL files have a trailer that contains ???????

 for *.recs files
 standard lo-rate sci packet
 pacor time received in first 6 words
 word 0: sync 1A1
 word 1: year - 1900
 word 2: day of year (0 = Jan 1)
 word 3: hour
 word 4: minute
 word 5: second

 word 9: APID
 word 10: packet counter and TM mode (hi-bits)
 word 11: packet size
 word 12: TAI time
 word 13: TAI time
 word 14: TAI time
 word 15: subpacket hdr - hi-byte = word count lo-byte = type
 word 16: subpacket hdr - hi 2 bits = TM type, lo 14 bits = packet counter


reltime [2] $SSW/soho/mdi/idl_old/gen/ys_util/reltime.pro
[Previous] [Next]
   Name: reltime

   Purpose: return relative UT time or time range (default is offset from NOW)

   Calling Examples:
      yest=reltime(/yesterday)		; 24 hours ago ut
      tomm=reltime(/tommorrow)		; 24 hours from now
      daybef=reltime(/daybefore)	; 48 hours ago
      daybef=reltime(/dayafter)	; 48 hours from now

   Keyword Parameters:
      yesterday, tommorrow, daybefore, dayafter - obvious
      day_only - dont return the time (just relative day)
   
   Method: keyword inheritance, execute statement, timegrid call
 CALLS:
 CALLED BY
	GOES_TEK [1], QUICKSTRAY [2], eit_fulldisk, eit_mirror, flare_hist, ftp_list_since
	get_goes_defsat [1], get_goes_defsat [2], go_sxt_sss2secondary
	go_yo_prod_batch, lasco_time2file, lasco_time2nrlwww, les_archive_info
	mdi_time2file, mk_ssc_batch [1], mk_ssc_batch [2], plot_ace, plot_goesp
	rd_goesp_ascii, rd_goesx_ascii, ref_term [2], save_idl_routines, ssc_files [1]
	ssc_files [2], ssc_files [3], ssw_apkpbar, ssw_get_sources, ssw_getcme_cactus
	ssw_getdst, ssw_time2filelist, sxt_files, sxt_uvf_info [1], sxt_uvf_info [3]
	trace_last_movie_queue, trace_wave2point, yohkoh_files


REM_DUP [3] $SSW/soho/mdi/idl_old/gen/ssw_lib/rem_dup.pro
[Previous] [Next]
 Project     : SOHO - CDS     
                   
 Name        : REM_DUP()
               
 Purpose     : Function to remove duplicate values from a vector. 
               
 Explanation : None
               
 Use         : result = rem_dup( vector, [ flag ] )  

               Eg. Remove duplicate values in vector a.
                          a = a( rem_dup(a) )

                   Remove duplicates in vector WAVE.  When duplicate values
                   are found, select the one with the largest intensity, INTE.

                          sub  = rem_dup( wave, inte)
                          wave = wave( sub )
                          inte = inte( sub )

    
 Inputs      : vector - vector of values from which duplicates are to be found
               
 Opt. Inputs : flag   - if supplied then when duplicates occur,
                        the one with the largest value of flag is selected.
                        If not supplied the the first occurence of the value
                        in 'vector' is selected.  Should be a vector with 
                        the same number of elements as in 'vector'.
               
 Outputs     : A vector of subscripts in 'vector' is returned.  Each subscript
               points to a selected value such that vec(rem_dup(vec,flag))
               has no duplicates.
               
 Opt. Outputs: None
               
 Keywords    : None

 Calls       : ***
	BSORT [1], BSORT [2], BSORT [3], BSORT [4]
 CALLED BY:
	ARRAY_XOR, DBHELP [1], DBHELP [2], DBHELP [3], FIND_COMMON, FTDELROW, GROUP
	MAKE_ION_LIST, MK_HEAD_CAT, REM_COM, SEL_LINE_EVENT, SHOW_FITS_HDR, TBDELROW, TFTD
	ch_ss
 Restrictions: None
               
 Side effects: The returned subscripts will sort the values in 'vector' in 
               ascending order with duplicates removed.
               
 Category    : Util, misc
               
 Prev. Hist. : D. Lindler  Mar. 87

 Written     : CDS version by C D Pike, RAL, 22-Oct-93
               
 Modified    : Use BSORT instead of SORT to maintain order.  CDP 7-Nov-94

 Version     : Version 2, 7-Nov-94


rem_elem [2] $SSW/soho/mdi/idl_old/gen/ys_util/rem_elem.pro
[Previous] [Next]
   Name: rem_elem

   Purpose: return subscripts of input array remaining after elements in 
	     a second array are removed

   Input Parameters:
      inarray - array to search/remove from
      remarray - array of elements to search/remove from inarray

   Output Parameters:
      count - number of elements (subscripts) returned     

   Calling Sequence:
      ss = rem_elem(inarray,remarray) ; subscripts remaining or -1

 CALLED BY:
	LIST_OP [1], LIST_OP [2], SPEX_FITINT__DEFINE, SPEX_FIT__DEFINE, WHERE_WITHIN
	XSTRUCT, dir_since, fitshead2struct, html_get_files, is_bestnode [1]
	is_bestnode [2], mk_spd, mk_trace_i1, mk_ydb_list, mk_ydbtab, mk_ydbtape [1]
	mk_ydbtape [2], mobad_summ, new_dpath [1], new_dpath [2], path_ucon, pathfix
	plotman, quick_hkplot [1], quick_hkplot [2], ref_term [2], set_fastpath [1]
	set_fastpath [2], sfc_check, soon_table, spex_gen_strategy_holder
	ssw_build_trace, ssw_check_contrib, ssw_conflicts, ssw_instr_info, ssw_set_instr
	sswdb_info, struct2ssw, timeavg [1], timeavg [2], timeline, topsdb [1], topsdb [2]
	web_seq, where_arr [1], where_arr [2], xhkplot, xset_chain [1], xset_chain [2]
   History:
      slf, 20-jan-1993
      slf,  7-feb-1993 - documentation carification and variable name change


REM_FST $SSW/soho/cds/idl/util/ops/planning/rem_fst.pro
[Previous] [Next]
 Project     :	SOHO - CDS

 Name        :	REM_FST

 Purpose     :	Returns the indeces of the last occurring unique elements in the argument array.

 Explanation :	Allows removal of repeated elements in input array. Where elements are repeated
               returns the index of the last occurring element.

 Use         : <rem_fst, vector>

 Inputs      : vector = input array.

 Opt. Inputs : None.

 Outputs     : indeces = indeces of unique elements.

 Opt. Outputs:	None.

 Keywords    : None.

 Calls       : ***
	BSORT [1], BSORT [2], BSORT [3], BSORT [4], UNIQ [1], UNIQ [2], UNIQ [3]
 CALLED BY:
	CP_GET_MNEMONIC
 Common      :	None.

 Restrictions:	None.

 Side effects:	None.

 Category    :	Command preparation.

 Prev. Hist. :	None.

 Written     :	Version 0.0, Martin Carter, RAL, 24/5/95

 Modified    :	

 Version     :	Version 0.0, 24/5/95


REMCHAR [3] $SSW/soho/mdi/idl_old/gen/ssw_lib/remchar.pro
[Previous] [Next]
 Project     : SOHO - CDS

 Name        : 
	REMCHAR
 Purpose     : 
	Remove all appearances of a character from a string.
 Explanation : 
	Remove all appearances of character (char) from string (st).
 Use         : 
	REMCHAR,ST,CHAR
 Inputs      : 
	ST  - String from which character will be removed.  
	CHAR- Character to be removed from string. 
 Opt. Inputs : 
	None.
 Outputs     : 
	ST	= The modified string is returned in ST.
 Opt. Outputs: 
	None.
 Keywords    : 
	None.
 Calls       : 
	None.
 CALLED BY:
	CHECK_CONFLICT, EIT_DAILY, EXTAST, FITSDIR, FTHELP, FXTPIO_READ, FXTPIO_WRITE
	HESSI SOHDATA CLASS DEFINITION, HSI_CHK_DUPLICATE, IRAFDIR, KAP_DATE, KAP_VERS
	PURPOSE, QUERYVIZIER, READCOL [1], READCOL [2], READCOL [3], READFMT, RTMVIPLAY [1]
	RTMVIPLAY [2], RTMVIPLAYPNG, TBHELP, TFTD, XDIFF
 Common      : 
	None.
 Restrictions: 
	None.
 Side effects: 
	None.
 Category    : 
	Utilities, strings.
 Prev. Hist. : 
	Written D. Lindler October 1986
	Test if empty string needs to be returned   W. Landsman  Feb 1991
 Written     : 
	Don Lindler, GSFC/HRS, October 1986.
 Modified    : 
	Version 1, William Thompson, GSFC, 12 April 1993.
		Incorporated into CDS library.
 Version     : 
	Version 1, 12 April 1993.


REMOVE_CR $SSW/soho/lasco/idl/data_anal/remove_cr.pro
[Previous] [Next]
 NAME:
       REMOVE_CR 

 PURPOSE:
       Removes cosmic rays (and other bright pixels which are not stars). 

 CALLS: ***
	DATATYPE [1], DATATYPE [2], DATATYPE [3], DEFROI [1], DEFROI [2], FILTER_IMAGE
	GETBKGIMG, GET_STAR_MOTION, LASCO_FITSHDR2STRUCT, MAXMIN, MOMENT, ONE2TWO
	READFITS [1], READFITS [2], READFITS [3], STR2UTC [1], STR2UTC [2], STR2UTC [3]
	TRIM, TVBOX, UTC2TAI
 CALLED BY:
	MKMOVIE, MKMOVIE0 obsolete version of mkmoviepro, MK_IMG
 PROCEDURE:
	Compares each pixel of crnt_im with the pixel in im1 where 
	a star would be if there was a star in that pixel. If the ratio
	exceeds 'threshold', then that pixel = median value of superpixel
	in the previous image.

 CALLING SEQUENCE:
       Result = REMOVE_CR(im1,h1,crnt_im,h2,again) 

 INPUTS:
       im1	(num)ARR	previous image
       h1	STRUCT		header from previous image
	crnt_im (num)ARR	current image
	h2	STRUCT		header from current image
	AGAIN	STRING 		'y' to prompt for ROI
	shrink	FLOAT		Factor by which the image is shrunk from 1024x1024

 KEYWORDS:
	ALL	remove cosmic rays AND stars
	INIT	define ROI on first time through
	SUMSTARS	Sum star images
	PF	Return point-filtered image

 Returned in Common block:
	N_CR	Returns number of pixels removed
 	COORDS	Returns coordinates of removed pixels


 OUTPUTS:
       crnt_im with cosmic rays removed is returned

 PROCEDURE:
 Compute point filtered image. Subtract point filtered image from current image (imdiff). 
 Subtract background image from point filtered image (bkgdiff).
 Compute std dev of each superpixel of bkgdiff. Candidate crays 
 and stars are where imdiff is greater than TWICE the interpolated standard deviation for each 
 superpixel of bkgdiff. For each candidate pixel, check in the previous image in a 5x5 box 
 where that pixel should have been if it was a star, based on a given star motion across 
 the FOV. If the maximum value from this box is less than the value of that pixel in the 
 current image minus the standard deviation of the superpixel from diff, than replace with 
 the median value of the superpixel of the previous image.



 MODIFICATION HISTORY:
               Written 12/23/98, N Rich - NRL/Interferometrics
	4/12/99 NBR	Use median-filtered image to check for CRs
	7/14/99 NBR	Fix problem when gaps in im1
	11/14/00 NBR	Add N_CR keyword, reduce_history common block; use point_filter
	11/21/00 NBR - Optimized for raw images
	12/28/00 NBR - Use C3clearmask2.fts for defining no-check area
	 7/19/01 NBR - Tinkering; using dn/sec images

 LIMITATIONS:
	- may remove comets, planets, etc. if not exempted by setting 
	  again to 'y' which calls the DEFROI routine

version = '@(#)remove_cr.pro	1.2 11/02/01'  ; NRL LASCO IDL LIBRARY


remtab [2] $SSW/soho/mdi/idl_old/gen/ys_util/remtab.pro
[Previous] [Next]
NAME:
	remtab
PURPOSE:
	To remove the tabs from a line
	but to maintain the positions where the characters were
	Assumes tabs are every 8 columns
INPUT:
	in_str	- input string or string array
OUTPUT:
	out_str	- output string or string array
 CALLED BY:
	DETAB, disp_therm_rs232, doc_head [1], doc_head [2], doc_head [3]
	mk_bad_pix_map_load, rd_exec_synop_index, rd_pkt_head [1], rd_pkt_head [2]
	rd_tr_seq_head, rd_ulin_col, rd_video_menu, reg_check, rmosaic [1], rmosaic [2]
	rmosaic [3], str2cols [1], str2cols [2], str2html [1], str2html [2], str2html [3]
	sxt_plan, timeline, topsdb [1], topsdb [2], web_seq, where_table [1]
	where_table [2], where_table [3], xdisp_fits, xdisp_trace [1], xdisp_trace2
	xdisp_trace3, xgen_widget, xset_chain [1], xset_chain [2]
HISTORY:
	Written 1988 by M.Morrison
               2-Jun-94 (SLF) allow string arrays - skip lines w/no tabs
			       ues lookup for substituion for speed


rename [2] $SSW/soho/mdi/idl_old/gen/ys_util/rename.pro
[Previous] [Next]
   Name: rename 

   Purpose: rename unix files (new string replaces old string)

   Input Parameters
      old - pattern to replace
      new - new pattern to insert (default is null)

   Keyword Parameters:
      filt - file filter - replace done on subset matching this pattern
	      normally, old pattern is used for file matching
	      include wild cards on one or both sides
      lowcase - if set, convert to lower case
      upcase  - if set, convert to upper case
   
 CALLS: ***
	str_replace [1], str_replace [2]
 CALLED BY:
	check_log [1], check_log [2], renbad, selsisi_copy
   Restrictions: unix only

   Caution: make sure your pattern only occurs where you expect it!!
            all occureneces are replaced

   History - slf, Feb 1992
	      slf, 10-Oct-1992 - add lowcase/upcase keywords
	      slf, 16-mar-1993 - allow directory renames (eliminate ':')


REPLACIMA $SSW/soho/lasco/idl/las-c2/align1.pro
[Previous] [Next]
 NAME:
	REPLACIMA.PRO
 PURPOSE:
         Select an interval of pixels values and replace these one by another
 CATEGORY:
	??
 CALLING SEQUENCE:
	REPLACIMA, IMA, minval, maxval, selectval
 INPUTS:
	ima                          image array (in memory)
       minval                       lower cuts value selected
       maxval                       higher cuts value selected
       selectval                    new value of pixels between lcuts & hcuts
 KEYWORD PARAMETERS:               
                                   None
 OUTPUTS:
          ima with the selected intervals replaced
 CALLS: ***
	ALIGN1, visu_cal
 COMMON BLOCKS:
	None.
 SIDE EFFECTS:
	None
 RESTRICTIONS:

 PROCEDURE:
	Straightforward.
 MODIFICATION HISTORY:
	Written by M.B  v.1.0       LAS  12/13/93           


REPSTR [3] $SSW/soho/mdi/idl_old/gen/ssw_lib/repstr.pro
[Previous] [Next]
 Project     : SOHO - CDS     
                   
 Name        : REPSTR()
               
 Purpose     : Replaces all occurrences of a substring within a string.
               
 Explanation : All occurrences of the specified string within a string 
               are replaced by the new string.

               eg.  IDL> x = 'abcdefgcd'
                         print,repstr(x,'cd','qq')  --> 'abqqefgqq'

               See STREP for replacement of first occurrence only.
               
 Use         : IDL> new = repstr(old,out_str [,in_str])
    
 Inputs      : old      - string in which to replace string.
               out_str  - string to be replaced

 Opt. Inputs : in_str  - string to be inserted in place of out_str.
                         (Default is a space).

               
 Outputs     : Function returns suitably adapted string.
               
 Opt. Outputs: None
               
 Keywords    : None

 Calls       : None
 CALLED BY:
	CAT_FITS, CDS_ADEF_PARSEFILE, CH_LINE_LIST, CONVERT_TERMS, CONVERT_TERMS_ALL
	DSP_AUX, DSP_WAV, EXTAST, Files_Handling [1], Files_Handling [2], LIST_FITS
	MK_CDS_ANALYSIS, QUERYSIMBAD, QUERYVIZIER, TFTD, hsi_params_write_pro
	ospex_params_write_pro
 Common      : None
               
 Restrictions: None
               
 Side effects: None
               
 Category    : Util, string
               
 Prev. Hist. : Robert S. Hill, ST Systems Corp., April 1989.

 Written     : CDS version by C D Pike, RAL, 24-Jun-94
               
 Modified    : 

 Version     : Version 1, 24-Jun-94


ReqPerVal [1] $SSW/soho/mdi/idl_old/gen/ys_sxt_widget/reqperval.pro
[Previous] [Next]
	NAME:
		ReqPerVal
	Purpose:
		Converts user requests for specific "periph" status
		into a binary representation.
	CALLING SEQUENCE:
		seaVal = ReqPerVal([aspdr=aspdr, shut=shut, xray=xray,
			opt=opt])
	KeyWord Input:
		aspdr	Open if present, closed if not 
		shut 	mechinal if present, frame transfer if not.
		xray	if present, the string is converted to fix value
		opt 	if present, the string is converted to fix value
	Output:	
		returned value is the sum of all requests.
 CALLS: ***
	gt_filta, gt_filtb
 CALLED BY:
	SXTKaySea [1], SXTKaySea [2]
	History:
		written 29-Apr-91 for testing.
		modified 13-May-91 for use.
		mod 10-jan-92 for gt functions


rescale $SSW/soho/lasco/idl/display/rescale.pro
[Previous] [Next]
 Project     : SOHO - LASCO

 Name        : 

 Purpose     : 

 Category    : 

 Explanation : 

 Syntax      : 

 CALLED BY:
	deriv_lud
 Examples    : 

 Inputs      : None

 Opt. Inputs : None

 Outputs     : None

 Opt. Outputs: None

 Keywords    : None

 CALLS: ***
	CONGRID [1], CONGRID [2], CONGRID [3]
 Common      : 

 Restrictions:                                  

 Side effects: Not known

 History     : Version 1, 02-Sep-1995, B Podlipnik. Written

 Contact     : BP, borut@lasco1.mpae.gwdg.de


RESET [3] $SSW/soho/mdi/idl_old/gen/ssw_lib/reset.pro
[Previous] [Next]
 Project     : SOHO - CDS

 Name        : 
	RESET
 Purpose     : 
	Resets system variables to their default values.
 Explanation : 
	Resets the system variables for the currently selected device, and
	sets the following system variables to their default settings:

		!LINETYPE	!PSYM		!NOERAS
		!X.TITLE	!Y.TITLE	!P.TITLE
		!XTICKS		!YTICKS

	The routine SETPLOT is called to reinitialize the relevant system 
	parameters for the selected device.  Then the above mentioned system
	variables are set to their defaults.

 Use         : 
	RESET
 Inputs      : 
	None.
 Opt. Inputs : 
	None.
 Outputs     : 
	None.
 Opt. Outputs: 
	None.
 Keywords    : 
	None.
 Calls       : ***
	SETPLOT [1], SETPLOT [2]
 CALLED BY:
	DSPEXP, Data Display, fig_tsmean [1], fig_tsmean [2]
 Common      : 
	None, but this routine calls SETPLOT which uses the PLOTFILE common 
	block.
 Restrictions: 
	In general, the SERTS graphics devices routines use the special system
	variables !BCOLOR and !ASPECT.  These system variables are defined in
	the procedure DEVICELIB.  It is suggested that the command DEVICELIB be
	placed in the user's IDL_STARTUP file.

 Side effects: 
	None.
 Category    : 
	Utilities, Devices.
 Prev. Hist. : 
	William Thompson, January 23, 1989.
	William Thompson, January 1993, changed to use current system variable
		names.
 Written     : 
	William Thompson, GSFC, 23 January 1989.
 Modified    : 
	Version 1, William Thompson, GSFC, 27 April 1993.
		Incorporated into CDS library.
 Version     : 
	Version 1, 27 April 1993.


RESOLVE_ALL $SSW/soho/sumer/idl/newtki/tki/resolve_all.pro
[Previous] [Next]
 NAME:
	RESOLVE_ALL

 PURPOSE:
	Resolve (by compiling) all procedures and functions.
	This is useful when preparing .sav files containing all the IDL
	routines required for an application.
 CATEGORY:
	Programming.
 CALLING SEQUENCE:
	RESOLVE_ALL
 INPUTS:
	None.
 KEYWORD PARAMETERS:
	QUIET = if set, produce no messages.
       EXCLUDE = List of routine names to be excluded from compiling

 OUTPUTS:
	No explicit outputs.
 CALLS: ***
	DELVARX [1], DELVARX [2], DELVARX [3], DELVARX [4], GREP, RUN_RESOLVE, delvarx [5]
 COMMON BLOCKS:
	None.
 SIDE EFFECTS:
 RESTRICTIONS:
	Will not resolve procedures or functions that are called via
	CALL_PROCEDURE, CALL_FUNCTION, or EXECUTE.  Only explicit calls
	are resolved.

	If an unresolved procedure or function is not in the IDL 
	search path, an error occurs, and no additional routines
	are resolved.

 PROCEDURE:
	This routine iteratively determines the names of unresolved calls
	to user-written or library procedures and functions, and then
	compiles them.  The process stops when there are no unresolved
	routines.
 EXAMPLE:
	RESOLVE_ALL.
 MODIFICATION HISTORY:
 	Written by:	Your name here, Date.
	DMS, RSI, January, 1995.
       LYW, NASA/GSFC, September 16, 1996 
          Added exclude keyword


restenv [2] $SSW/soho/mdi/idl_old/gen/ys_util/restenv.pro
[Previous] [Next]
   Name: restenv

   Purpose: restore environment (UNIX environmentals/VMS logicals)
            (which were stored by previous call to saveenv)

   History:
      9-Jan-1994 (SLF)

   Method:
      calls set_logenv.pro to update envrionment

 CALLS: ***
	get_logenv [1], get_logenv [2], set_logenv [1], set_logenv [2]
   Common Blocks:
      saveenv_blk (store environmentals and translation)


restgen [2] $SSW/soho/mdi/idl_old/gen/ys_util/restgen.pro
[Previous] [Next]
   Name: restgen

   Purpose:
      read & restore parameters (idl variables) from a generic file
      [front end to rd_genx - reads files written by savegen.pro]

   Output Parameters
      p0,p1,p2...p15 - variables to restore from file

   Optional Keyword Parameters
      file   - (Input) generic file name [default='save.genx']
      struct - (Output) entire data structure from generic file
      text   - (Output) optional text section from file (if it exists)
      header - (Output) system imposed file header (added via wrt_genx)
      quiet  - (input)  if set, inhibit some messages
      inquire - (input) if set, display summary of generic file
      nodata  - (input) if set, dont read data section (just header and text)
      
   Calling Sequence:
      restgen,v1, [,v2...v15 , file=filename, text=text, header=header, /inq]
                  [,struct=struct, /nodata]
		    
   Calling Examples:
      restgen, a, b, c, text=text		; restore 'save.genx' 
      restgen, file='newdat',/inquire,/nodata  ; show summary of 'newdat.genx'
      restgen, struct=struct			; file contents as structure
      restgen, head=head,text=text		; just header and text 
      [see documentation for savegen.pro]

 CALLS: ***
	RD_GENX
 CALLED BY:
	BCS_COMP, BUILD_DRM_MER_CONT, CF_174LG, CF_177LG, CF_180LG, CF_765LG, CF_770LG
	CF_GIS1A, CF_GIS1B, CF_GIS1C, CF_GIS2A [1], CF_GIS4A, CF_GIS4B, CF_GIS4C
	EIS_LIST_EXPER [1], EIS_LIST_EXPER [2], FIRST_LIGHT [1], FIRST_LIGHT [2]
	GET_SUMER_FILES, GE_WINDOW [1], GOES_MEWE_TEM, GOES_TF, GOES_TF_COEFF
	HESSI_FLARE_SPECTRUM, HESSI_MODEL_COUNTS
	HW_SYNSPEC__DEFINE defines the class HW_SYNSPEC Objects of this [1]
	HW_SYNSPEC__DEFINE defines the class HW_SYNSPEC Objects of this [2]
	HXA2HXAXY [1], HXA2HXAXY [2], LOG_DERIV, LWA_TE, MAKE_GOES_RESP, N511_VS_HVSPEC
	NEW_EFFECTIVE_AREAS_CODE, SPEX_DATA_GENX [1], SPEX_DATA_GENX [2]
	SPEX_DRM_GENX [1], SPEX_DRM_GENX [2], SXT_DRDT, SXT_POWL, SXT_POWL_EBAR
	SXT_POWL_NN, SXT_TE, SXT_TEEM2 [1], SXT_TEEM2 [2], SXT_TEEM2 [3], SXT_THERM
	SXT_THERM_EBAR, SXT_WEIGHT, UPDATE_KAP, UPDATE_TERM, XCDS_BOOK, XCPT
	XR_RD_ABUNDANCE, atr2hxa_dbase, cam_run_sum, ccd_sunc [1], ccd_sunc [2], ch_ss
	compare_resp, eit_eff_area, eit_genx_cat, fl_goesplot [1], fl_goesplot [2]
	fl_goesplot [3], fl_summary [1], fl_summary [2], fl_summary [3], fl_suntoday [1]
	fl_suntoday [2], fl_suntoday [3], fl_sxtobsnar [1], fl_sxtobsnar [2]
	full_graph_gif, genx2html [1], genx2html [2], genx_newver [1], genx_newver [2]
	get_mwlt_roll, go_lasdisk golaserdisk, go_lasdisk2 golaserdisk, go_nvs5
	hxt_count, hxt_ratio, jitter_gif_xyimg, linflx [1], linflx [2], list_mo_log [1]
	list_mo_log [2], make_goes_chianti_response [1]
	make_goes_chianti_response [2], make_goes_chianti_response [3]
	make_goes_chianti_response [4], merc_lwa, merc_pix, merge_genxcat, mk_mo_disk
	mk_mo_disk2, mk_mo_list, mk_mo_log, mk_pix [1], mk_pix [2], mk_sdm, mk_trace_i1
	mo2wks, mo_prep, model_spec, path_data [1], path_data [2], plot_eit_flux
	plot_new_respon, pmtras_analysis, rd_dpc_table, rd_dt_genx, rd_mapfile [1]
	rd_mapfile [2], rd_modb, read_hessi_4_ospex, read_hessi_4_spex [1]
	read_hessi_4_spex [2], read_spartan, res_freq, seq_run_sum [1], seq_run_sum [2]
	sfc_prep [1], sfc_prep [2], show_hxafid, show_pix [1], show_pix [2]
	show_pix_event [1], show_pix_event [2], show_pix_event [3], show_pixf
	sun_today [1], sun_today [2], sun_today [3], sxl2radiance, sxt_dn_int
	sxt_eff_area, sxt_etemp, sxt_flux [1], sxt_flux [2], sxt_flux [3], sxt_fsp_resp
	sxt_mornint, sxt_mwave, sxt_resp_inp, sxt_summary, sxt_t6_resp0, term_score2
	timeline, topsdb [1], topsdb [2], trace_recent_movie_summary, trace_t_resp
	trace_uv_resp, wbs_grs_response [1], wbs_grs_response [2], web_seq
	wrt_fits_bin_exten [2], xlinflx, xr_mk_abun_file, xset_chain [1], xset_chain [2]
   History: slf, 11/1/91
	8-Nov-91 MDM expanded from 10 to 15 parameters
      29-jan-93 slf, added quiet keyword
      24-mar-93 slf, documentation , protect file input from clobber
		      added inquire and nodata keywords
      30-Mar-94 slf, minor docmentation fixes
      17-May-94 ras, fix double period bug in filename construction


RESTORE_CDS_ADEF $SSW/soho/cds/idl/util/fitting/restore_cds_adef.pro
[Previous] [Next]
 Project     : SOHO - CDS     
                   
 Name        : RESTORE_CDS_ADEF()
               
 Purpose     : Restore a CDS Analysis Definition (saved with SAVE_CDS_ADEF)
               
 Explanation : Fairly straightforward - uses the file name passed (or the
               file name of the passed ADEF), then restores it from disk and
               returns it. If an ADEF is passed, it's handles etc. will be
               (re)-used, otherwise a new one is generated.
               
 Use         : ADEF = RESTORE_CDS_ADEF( [ FILENAME | ADEF ] )
    
 Inputs      : None required.
 
 Opt. Inputs : FILENAME or ANALYSIS DEFINITION (containing file name)
               
 Outputs     : Returns analysis definition, or 0 if aborted.
               
 Opt. Outputs: None.
               
 Keywords    : /OTHER : Set to always ask the user for confirmation of the
                        file name, even if supplied.

               /VERBOSE : Passed on to the SAVE command.

 Calls       : ***
	BIGPICKFILE, BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], CDS_ADEF_PARSEFILE
	CHK_DIR [1], CHK_DIR [2], DATATYPE [1], DATATYPE [2], DATATYPE [3], DEFAULT, EXIST
	MK_CDS_ADEF_STC, TEST_OPEN, break_file [4]
 CALLED BY:
	XCDS_ANALYSIS
 Common      : None
               
 Restrictions: ...
               
 Side effects: ...
               
 Category    : Analysis
               
 Prev. Hist. : None

 Written     : SVH Haugan, UiO, 17 October 1997
               
 Modified    : Not yet.

 Version     : 1,  17 October 1997


RESTORE_QLDS $SSW/soho/cds/idl/sci/data_handling/i_o/cds/restore_qlds.pro
[Previous] [Next]
 Project     : SOHO - CDS     
                   
 Name        : RESTORE_QLDS
               
 Purpose     : Restore a QLDS saved with SAVE_QLDS
               
 Explanation : With the new storage scheme using handles it's not possible to
               use the SAVE command to store all the data in a QLDS with just
               one simple statement. This function (together with the
               procedure QLDS_SAVE) provides a simple interface to save and
               restore Quick Look Data Structures.

 Use         : A = RESTORE_QLDS(FILENAME)
    
 Inputs      : FILENAME : The file name to restore the QLDS from.
               
 Opt. Inputs : None.
               
 Outputs     : Returns a QLDS.
               
 Opt. Outputs: None.
               
 Keywords    : None.

 Calls       : ***
	DATATYPE [1], DATATYPE [2], DATATYPE [3], QLMGR, TAG_EXIST [1], TAG_EXIST [2], TRIM
 Common      : None.
               
 Restrictions: Only handles 60 data windows.
               
 Side effects: None known.
               
 Category    : Data_Handling, I_O, Quicklook.
               
 Prev. Hist. : None.

 Written     : Stein Vidar H. Haugan (UiO), 3 October 1996
               
 Modified    : Not yet.

 Version     : 1, 3 October 1996


RESTORE_WAVECAL $SSW/soho/cds/idl/sci/cal/vds/wave/restore_wavecal.pro
[Previous] [Next]
 Project     : SOHO - CDS

 Name        : RESTORE_WAVECAL 

 Purpose     : Restores sensible default wavelength calibration from a given qlds

 Explanation : This procedure restores the wavelength calibration for
               any input qlds, assuming sensible defaults.
               Useful after restoring a QLDS from a savefile.

 Use         : e.g.
                   IDL> qlds   = restore_qlds ('qlfile.qlsave')
                   IDL> result = restore_wavecal (qlds)

 Inputs      : QLDS    = Structure variable of CDS data as read by READCDSFITS.

 Opt. Inputs : None.

 Outputs     : result  = returned with 1 if wavelength calibration loaded correctly 

 Opt. Outputs: None.

 Keywords    : None.

 Calls       : ***
	GT_DETECTOR, GT_START, LOAD_WAVECAL
 CALLED BY:
	GHOST_INFO, GIS_CALIB, GIS_FIT
 Common      : None.

 Restrictions: None.

 Side effects: None.

 Category    : Data analysis, wavelength calibration.

 Prev. Hist. : None.

 Written     : Eddie Breeveld, erb@mssl.ucl.ac.uk  12 December 1997

 Modified    : 

 Version     : Version 1, 12 Dec 1997


restsys [2] $SSW/soho/mdi/idl_old/gen/ys_util/restsys.pro
[Previous] [Next]
   Name: restsys

   Purpose: restore idl system variables using values saved via savesys.pro
            (values from Yohkoh system variables:ys_idlsys_temp,ys_idlsys_init)

   Input Keyword Parameters:
      all -   if set, restore all (writeable) idl system variables 
      aplot -  if set, restore all plot related variables (!x,!y,!z,!p)
      x,y,z - if set, restore specified axis variable (!x, !y, and/or !z)
      c,order,map,more - restore associated system variable(s)
      init  - if set, restore specified variables to startup values

   Calling Examples:
      restsys,/x,/y             ; restore !x, !y (from !ys_idlsys_temp)
      restsys,/p                ; save !p
      restsys,/aplot            ; save !x,!y,!z,!p
      restsys,/all              ; save above plus some others (!c, !map..)
      restsys,/init,/all	 ; startup values (from !ys_idlsys_init)

      Generally, a routine would use this routine paired with savesys.pro

        pro junk,a,b,c
        savesys,/aplot          ; save plot variables
        <change !x,!y,!p>       ; routine plays with global variables
        restsys,/aplot          ; restore plot values
        return


 CALLED BY:
	DRAW_GRID [1], DRAW_GRID [2], FIRST_LIGHT [1], FIRST_LIGHT [2]
	HSI_CWTOOLS_LINESET, HSI_FORWARDFIT, NORH_GRID [1], NORH_GRID [2], PLOT_CLON
	POLAR_GRID, SXT_GRID [1], SXT_GRID [2], SXT_GRID [3], TV_SYNOP, event_movie [1]
	event_movie [2], goes_summary, goes_widget, last_lc, lcur_image, plot_nar [1]
	plot_nar [2], sun_grid
   Side Effects:
      def_yssysv.pro is called if it has not been done already
      
 CALLS: ***
	def_yssysv [1], def_yssysv [2]
   Common Blocks:
      def_yssysv_blk	- determine if Yohkoh system variables are defined

   History:
      21-Apr-1993 (SLF)
      22-apr-1993 (SLF) ; remove !more references


REV_SWAP [2] $SSW/soho/mdi/idl_old/gen/ssw_lib/rev_swap.pro
[Previous] [Next]
 Project     :	SOHO - CDS

 Name        :	REV_SWAP

 Purpose     :	Swaps data between reverse network and host byte order.

 Explanation :	This routine takes data with bytes in reverse network
		(little-endian) order, as used by DEC computers and PCs, and
		converts it to the correct byte order for the current host.
		Conversely, it can also convert data in host to reverse network
		order.

 Use         :	REV_SWAP, DATA

 Inputs      :	DATA	= Data in reverse network order.

 Opt. Inputs :	None.

 Outputs     :	DATA	= The byte swapped data is returned in place of the
			  input array. 

 Opt. Outputs:	None.

 Keywords    :	None.

 Calls       : ***
	DATATYPE [1], DATATYPE [2], DATATYPE [3]
 CALLED BY:
	CAT_OPEN [1]
 Common      :	The common block REV_SWAP_CMN is used internally to keep track
		of whether the current computer uses network or reverse network
		byte order.

 Restrictions:	Only the byte order of the data is affected.  No other
		conversions, such as for example IEEE to host floating point
		formats, are performed on the data.  If such conversions are
		necessary, then the call to REV_SWAP can be followed up with
		either IEEE_TO_HOST or HOST_TO_IEEE.

 Side effects:	None.

 Category    :	Utilities, Operating_system.

 Prev. Hist. :	None.

 Written     :	William Thompson, GSFC, 10 February 1994

 Modified    :	Version 1, William Thompson, GSFC, 10 February 1994

 Version     :	Version 1, 10 February 1994


REWIND [2] $SSW/soho/mdi/idl_old/gen/ssw_lib/rewind.pro
[Previous] [Next]
 Project     :	SOHO - CDS

 Name        :	REWIND

 Purpose     :	Emulates the VMS REWIND function in Unix.

 Explanation :	Emulates the VMS REWIND function in the Unix environment.

		**Unix only**

 Use         :	REWIND, UNIT

 Inputs      :	UNIT = Tape unit number.  Tape drives are selected via the UNIX
		       environment variables "MT1", "MT2", etc.  The desired
		       tape drive is thus specified by numbers, as in VMS.
		       Must be from 0 to 9.

 Opt. Inputs :	None.

 Outputs     :	None.

 Opt. Outputs:	None.

 Keywords    :	None.

 Calls       : ***
	CHECK_TAPE_DRV [1], CHECK_TAPE_DRV [2]
 CALLED BY:
	FXTAPEREAD, RD_EXB, mt
 Common      :	None.

 Restrictions:	The environment variable "MTn", where n corresponds to the
		variable UNIT, must be defined.  E.g.,

			setenv MT0 /dev/nrst0

		Requires IDL v3.1 or later.

 Side effects:	The device file is opened.

 Category    :	Utilities, I/O, Tape.

 Prev. Hist. :	VERSION 1, R. W. Thompson 11/30/89
		William Thompson, Apr 1991, rewrote to better emulate VMS
			version.

 Written     :	R. W. Thompson, GSFC/IUE, 30 November 1989.

 Modified    :	Version 1, William Thompson, GSFC, 21 December 1993.
			Rewrote to use IOCTL.

 Version     :	Version 1, 21 December 1993.


RFITS2 [2] $SSW/soho/mdi/idl_old/gen/fits/rfits2.pro
[Previous] [Next]
 NAME:
        RFITS2
 PURPOSE:
        Reads multiple standard fits or compressed fits files into array
 CALLING SEQUENCE:
        result = rfits2(filename)
 INPUTS:
        files= string or string array containing the file name(s)
 OPTIONAL (KEYWORD) INPUT PARAMETERS:
        index = nonnegative integer. If this parameter is present, a period
              and the index number are appended to the filename (e.g., '.34').
              This option makes handling of data in the MCCD file naming
              convention easier.
        scale = if set, floating point array is returned, reflecting
                that true value = read value * bscale + bzero.
	 xsize = the images can be resized to this value as each image is read.
	 ysize = the images can be resized to this value as each image is read.
		If xsize is passed, but ysize is not, then ysize=xsize.
	 nodata= If set, then just read the headers
 OUTPUTS:
        result = byte, integer, or long array, containing the FITS data array.
               The dimensionality of result reflects the structure of the FITS
               data.  If keyword scale is set, then floating point array.
 OPTIONAL (KEYWORD) OUTPUT PARAMETERS:
        date_obs = date of observation (string).
        time_obs = time of observation (string).
        head     = string vector, containing the full FITS header (each element
                 of the vector contains one FITS keyword parameter).
 CALLS: ***
	CONGRID [1], CONGRID [2], CONGRID [3], FILE_EXIST [2], RFITS [1], RFITS [2]
	RFITS [3], SXADDPAR [1], SXADDPAR [2], SXADDPAR [3], data_type [1], data_type [2]
	file_exist [1], file_exist [3], file_uncompress [1], file_uncompress [2]
 CALLED BY:
	ALIGN1BIGGRAM, edac_summary, fits2time [1], fits2time [2], fits2time [3]
	focus_trace_flt, get1gbo, get_gbo_pfi, get_selsis, lastgbo, mon_health [1]
	mon_health [2], new_edac_summary, new_mon_health [1], new_mon_health [2]
 COMMON BLOCKS:
        None.
 SIDE EFFECTS:
        None.
 RESTRICTIONS:
        Only simple FITS files are read. FITS extensions (e.g., groups and
        tables) are not supported.
 MODIFICATION HISTORY:
	SLF - 7-Jul-1993 - handle compressed fits data
	21-Jul-93 (MDM) - The FITS header was not being assembled properly for
			  multiple file extraction
	 7-Oct-93 (SLF) - Use home directory for temporary (uncompressed) files
	 8-Oct-93 (SLF) - try DIR_GBO_SC first, HOME if it does not exist
	28-Jul-94 (MDM) - Added XSIZE and YSIZE
       15-sep-94 (SLF) - past date_obs and time_obs out correctly
	30-Apr-96 (MDM) - Modified to allocate the memory on the first
			  at the beginning and to insert the data into it
			  (rather than to constantly append)
			- Added /qdebug
	22-Aug-96 (MDM) - Added /nodata


RINTER [2] $SSW/soho/lasco/idl/las-c2/crosscorr.pro
[Previous] [Next]

FUNCTION RINTER, P, X, Y, DFDX, DFDY
+
 NAME:
	RINTER
 PURPOSE:
	Cubic interpolation of an image at a set of reference points
	points.   Optionally obtain the X and Y derivatives at 
	these points.    Used by the DAOPHOT PSF sequence but can also
	be for general cubic interpolation.

 CALLING SEQUENCE:
	Z = RINTER( P, X, Y, [ DFDX, DFDY ] )

 INPUTS:                 
	P  - Two dimensional data array, 
	X  - Either an N element vector or an N x M element array,
		containing X subscripts where cubic interpolation is desired.
	Y -  Either an N element vector or an N x M element arra, 
		containing Y subscripts where cubic interpolation is desired.

 OUTPUT:
	Z -  Result = interpolated vector or array.  If X and Y are vectors,
		then so is Z, but if X and Y are arrays then Z will be also.
		If P is DOUBLE precision, then so is Z, otherwise Z is REAL.

 OPTIONAL OUTPUT:
	DFDX - Vector or Array, (same size and type as Z), containing the 
		derivatives with respect to X
	DFDY - Array containing derivatives with respect to Y

 CALLED BY:
	CROSSCORR [1], DAO_VALUE, GETPSF, crosscorr [2]
 EXAMPLE:
	suppose P is a 256 x 256 element array and X = FINDGEN(50)/2. + 100.
	and Y = X.  Then Z will be a 50 element array, containing the
	cubic interpolated points.

 SIDE EFFECTS:
	can be time consuming.

 RESTRICTION:
	Interpolation is not possible at positions outside the range of 
	the array (including all negative subscripts), or within 2 pixel
	units of the edge.  No error message is given but values of the 
	output array are meaningless at these positions.

 PROCEDURE:
	invokes CUBIC interpolation algorithm to evaluate each element
	in Z at virtual coordinates contained in X and Y with the data
	in P.                                                          

 CALLS: ***
	CONGRID [1], CONGRID [2], CONGRID [3], CROSSCORR [1], LOADCT, crosscorr [2]
 COMMON BLOCKS:
	If repeated interpolation of the same array is to occur, then
	one can save time by initializing the common block RINTER
 REVISION HISTORY:
	March 1988 written W. Landsman STX Co.
	Checked for IDL Version 2, J. Isensee, September, 1990
	Corrected call to HISTOGRAM, W. Landsman November 1990


RM_PATH [2] $SSW/soho/mdi/idl_old/gen/ssw_lib/rm_path.pro
[Previous] [Next]
 PROJECT:
       SOHO - CDS

 NAME:
       RM_PATH

 PURPOSE: 
       Remove directory (and optionally its subdirs) from IDL path

 EXPLANATION:
       
 CALLING SEQUENCE: 
       RM_PATH, path_name [,/expand] [index=index]

 INPUTS:
       PATH_NAME -- A string scalar containing directory name to be
                    removed

 OPTIONAL INPUTS: 
       None.

 OUTPUTS:
       None. !path may be changed though.

 OPTIONAL OUTPUTS:
       INDEX -- Index of the removed directory in the !path.

 KEYWORD PARAMETERS: 
       EXPAND -- Set this keyword to remove all subdirectories under
                 PATH_NAME from the IDL path.

 CALLS: ***
	ARR2STR [1], Arr2Str [2], DATATYPE [1], DATATYPE [2], DATATYPE [3], DELVARX [1]
	DELVARX [2], DELVARX [3], DELVARX [4], REST_MASK, STR_SEP, delvarx [5]
 COMMON BLOCKS:
       None.

 RESTRICTIONS: 
       None.

 SIDE EFFECTS:
       None.

 CATEGORY:
       Utilities, OS
       
 PREVIOUS HISTORY:
       Written October 7, 1994, by Liyun Wang, GSFC/ARC

 MODIFICATION HISTORY:
       Version 2, Liyun Wang, GSFC/ARC, October 19, 1994
          Added the EXPAND keyword

 VERSION:
       Version 2, October 19, 1994


rmosaic [3] $SSW/soho/mdi/idl_old/gen/ys_util/rmosaic.pro
[Previous] [Next]
   Name: rmosaic

   Purpose: spawn background mosaic job, optional 'solar' hotlist lookup

   Calling Sequence:
      rmosaic				; url menu select
      rmosaic [,/search_string]	; search string = url lookup

   Calling Examples:
      rmosiac,/trace			; TRACE home page
      rmosaic,/yag			; Yohoh analysis guide
      rmosaic,/soho			; SOHO home page

   History:
      26-Jan-95 (SLF) 
       2-Feb-95 (SLF) - add keyword inheritence for search strings to allow
                        automatic expansion

 CALLS: ***
	CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], concat_dir [4], rd_tfile [1]
	rd_tfile [2], remtab [1], remtab [2], str2cols [1], str2cols [2], strjustify
	wmenu_sel [1], wmenu_sel [2]
   Restrictions:
      if no local version, environmental <mosaic_host> should
      point to remote host - in this case, must have RSH priviledge


ROI_SECTOR $SSW/soho/lasco/idl/cme/roi_sector.pro
[Previous] [Next]
 NAME:
	ROI_SECTOR

 PURPOSE:
	This function returns the 1D list of indices contained within
	the specified sector

 CATEGORY:
	CME

 CALLING SEQUENCE:
	Result = ROI_SECTOR (Hdr,R1,R2,T1,T2)

 INPUTS:
	Hdr:	Image header (LASCO header structure)
	R1:	Inner radius of the sector (in solar radii), from sun center
	R2:	Outer radius of the sector (in solar radii), from sun center
	T1:	Left hand boundary of the sector (in degrees)
	T2:	Right hand boundary of the sector (in degrees)

 KEYWORD PARAMETERS:
	PIXEL:	If set, the inner and outer radii are specified in pixels
	DRAW:	If set, the perimeter of the sector is drawn on the image

 OUTPUTS:
	This function returns the indices of the pixels contained within
	the sector as an array of long integers.

 CALLS: ***
	GET_SOLAR_RADIUS, GET_SUN_CENTER [1], GET_SUN_CENTER [2], GET_SUN_CENTER [3]
 CALLED BY:
	C3_CME_FRONT, CME_MASSIMG2TOTAL
 COMMON BLOCKS:
	None

 SIDE EFFECTS:
	None

 RESTRICTIONS:

 PROCEDURE:
	A sector is defined as the region bounded by two radial lines 
	(from sun center) at two position angles and the annulus (centered 
	on the sun) at two heights.

	The pixel coordinates of the inner and outer boundaries of the 
	annulus are computed at one degree increments from one position
	angle to the next.  Correction is made if the sector spans the
	North pole (where the position angle is 0/360).

	POLYFILLV is used to fill in the indices from the definition of
	the boundary.

	The image header is used in determining the sun center and the 
	number of pixels per radius.

 CALLED ROUTINES:
	GET_SUN_CENTER, GET_SOLAR_RADIUS, POLYFILLV

 EXAMPLE:
	To obtain the indices of a sector from 5 to 10 solar radii and
	position angles 270 to 280.  Note that the left hand boundary
	as viewed from the sun is 280 and the right hand boundary is 270.
	The outline of the sector is drawn on the display

	Result = ROI_SECTOR(hdr,5,10,280,270,/draw)

 MODIFICATION HISTORY:
 	Written by:	RA Howard, NRL, 2 December 1997

	@(#)roi_sector.pro	1.1 03/14/98 LASCO IDL LIBRARY


ROLL_PLOT $SSW/soho/mdi/idl/ops/roll_plot.pro
[Previous] [Next]
 NAME:
	ROLL_PLOT
 
 PURPOSE:
	Generate a plot of the SOHO roll angle versus time

 CALLING SEQUENCE:
	ROLL_PLOT, [duration], [endtime], [keywords=keywords]
	
 INPUTS:
 	ENDTIME:  Time the plot should *END* (default is Right NOW!)

 KEYWORD INPUTS:
	DURATION: Duration of the plot in hours (default is 24)
	OUTFILE: If specified, the output is saved here.
	AV:	If set, averaging is done.  If set to 
		a value greater than 5, averaging is done over that
		many minutes (values less than five cause five-minute
		averaging).
	SMOOTH:	Synonym to AV.
	ORBIT:	If set, use only minutes for which orbit data were available
	CALC:	If set, use only minutes for which calculated orbit was used.

	P:	If set, report solar "P" angle (this is also the default)
 	ECLIPTIC: If set, report angle from ecliptic north

	YRANGE: If set, specify the output Y range in degrees  (otherwise,
		ROLL_PLOT guesses, using an algorith that loses some outlying
		points in order to see small variations in the roll).

	DESPIKE: If set, throw out all the points that look "spiky" -- ie
		those that exceed a threshhold number of standard deviations
		from the average from both their neighbors.
	
	NSIGMA: Number of standard deviations to use in autoscaling and in
		despike threshholding (default is 3).
	
 KEYWORD OUTPUTS:
	OUTPLOT : If set, gets the plot itself as a byte array.

 CALLS: ***
	DELVARX [1], DELVARX [2], DELVARX [3], DELVARX [4], ISVALID [1], ISVALID [2]
	ISVALID [3], LOADCT, NLM [1], NLM [2], OUTPLOT [1], OUTPLOT [2], OUTPLOT [3]
	UTPLOT [1], UTPLOT [2], UTPLOT [3], UTPLOT [4], UTPLOT [5], UTPLOT [6], anytim [1]
	anytim [2], anytim [3], anytim [4], anytim [5], delvarx [5], rd_tfile [1]
	rd_tfile [2], tv2 [1], tv2 [2], ut_time [1], ut_time [2], xyouts2 [1], xyouts2 [2]
	zbuff2file [1], zbuff2file [2]
 CALLED BY:
	FOT_ROLL
 HISTORY:
	Written 20-May-99 CED
	Added time-of-plot 20-May-99 CED
	Fixed missing-day contingency, 20-May-99 CED
	Fixed plotsize bug, 21-May-99 CED
 	Added dual-trace plotting for times when both orbital and calculated
		rolls are listed in the file (to avoid unsightly jumps!) 
		8-Jun-99 CED
	Added std-deviation-based scaling and despiking, 2-Aug-99, CED
	Added rejection of outlying dates; added SMOOTH synonymo for AV.
	Added simple singularity avoidance near the -180/180 branch jump. CED.
       Modified handling of zbuffer to speed up display/output. 3-Dec-99 RIB.


ROLL_TIMES $SSW/soho/lasco/idl/data_anal/roll_times.pro
[Previous] [Next]
 NAME:
	ROLL_TIMES

 PURPOSE:
	Returns dates/times of time periods when SOHO is rolled in TAI seconds

 CATEGORY:
	Attitude

 CALLING SEQUENCE:
	roll_times,stautc,enutc

 INPUTS:
	None

 OUTPUTS:
    Double-arrays of seconds (times)
  stautc	Start times of roll periods
  enutc	End times of roll periods
	
 KEYWORD PARAMETERS:


 CALLS: ***
	STR2UTC [1], STR2UTC [2], STR2UTC [3], UTC2TAI
 CALLED BY:
	GETBKGIMG, MKMOVIE
 MODIFICATION HISTORY:
 	Written by:	Nathan Rich, NRL/Interferometrics - 20 Nov. 2001

	@(#)roll_times.pro	1.1, 11/30/01 LASCO IDL LIBRARY


ROT_CDS_XY $SSW/soho/cds/idl/util/ops/planning/rot_cds_xy.pro
[Previous] [Next]
 Project     : SOHO - CDS     
                   
 Name        : ROT_CDS_XY
               
 Purpose     : solar rotate deferred CDS pointing
               
 Category    : Planning
               
 Explanation : computes pointing in CDS planning structures by
               computing solar rotation during time interval since first
               pointing.
               
 Syntax      : IDL> rplan=rot_cds_xy(plan)
    
 CALLED BY:
	MK_CDS_PLAN
 Examples    : 

 Inputs      : PLAN = plan structure (can be array)
               
 Opt. Inputs : None
               
 Outputs     : RPLAN = rotated plan structures

 Opt. Outputs: None
               
 Keywords    : RPLAN = reference plan coordinates to rotate from
               MATCH = rotate relative to matching pointing entries
                      (if RPLAN has same number of pointing as PLAN)
               WARN = warning if rotation steps are less than 2"

 CALLS: ***
	DATATYPE [1], DATATYPE [2], DATATYPE [3], DELVARX [1], DELVARX [2], DELVARX [3]
	DELVARX [4], DPRINT, EXIST, GET_CDS_DUR, GET_CDS_XY, GET_OPS_POS, GET_PLAN_ITIME
	GET_PLAN_TYPE, GET_STUDY_PAR, ROT_XY, TAG_EXIST [1], TAG_EXIST [2], delvarx [5]
 Common      : None
               
 Restrictions: Input plans must have deferred pointing
               
 Side effects: None.
               
 History     : Version 1,  17-July-1996,  D M Zarro.  Written
               Version 2,   6-June-1997, Zarro, modified to only
               accept rotation steps greater than 2" since this
               is the basic OPS step size.
               Version 3,   20-May-1998, Zarro, fixed small bug in
               timing for multiple repeats of last raster 

 Contact     : DZARRO@SOLAR.STANFORD.EDU


ROT_COMP rotation compensator $SSW/soho/sumer/idl/contrib/chae/rot_comp.pro
[Previous] [Next]
 NAME :
     ROT_COMP (rotation compensator)
 PURPOSE : 
     When given a set of pointing coordinates X0 and Y0,
     to find out  another set of pointing coordinates X 
     and Y specifying the same point after a time delay DT
 CALLING SEQUENCE:
     ROT_COMP, BETA, X0, Y0, DT, X, Y
 INPUT :
     BETA : tilt angle (in unit of radians)
     X0, Y0 : the  present pointing coordinates (in unit of
         solar radius). origin = solar disk center.           
         The Y-axis increases toward the solar north and parallel
         to the projection of the solar axis.
         The X-axis is directed toward the west.
     DT : the time delay (in unit of day)
          DT may have a negative value.     
 OUTPUT :
     X, Y : the new pointing coordinates.
             (in unit of solar radius)
 REFERENCE :
     SOHO Mission, p228           
 CALLS: ***
	ROT_COMP
 MODIFICATION HISTORY:
     May 22 1996  Jong-Chul Chae


ROTCOMP $SSW/soho/sumer/idl/contrib/germerott/sumer_head/rotcomp.pro
[Previous] [Next]
 PROJECT:
       SOHO - SUMER

 NAME:
       ROTCOMP()

 PURPOSE: 
       Return rotation compensation time

 CATEGORY:
       
 
 EXPLANATION:
       
 SYNTAX: 
       Result = rotcomp()

 EXAMPLES:
       
 INPUTS:
       header - BYTARR(92) Image Header

 OPTIONAL INPUTS: 
       None.

 OUTPUTS:
       None.

 OPTIONAL OUTPUTS:
       None.

 KEYWORDS: 
       None.

 COMMON:
       None.

 RESTRICTIONS: 
       None.

 SIDE EFFECTS:
       None.

 HISTORY:
       Version 1, October 7, 1996, Dietmar Germerott, MAPE Lindau. Written

 CONTACT:
       Dietmar Germerott, MAPE Lindau (germerott@linax1.mpae.gwdg.de)


round1var $SSW/soho/lasco/idl/las-c2/simcircle.pro
[Previous] [Next]
FUNCTION: round1,var
  ;; by JP.L & M.B at LAS : 02/11/94
  ;;Arrondit la variable a la valeur la plus proche
 CALLS:


ROUTINE_NAME [8] $SSW/soho/lasco/idl/template.pro
[Previous] [Next]
 NAME:
	ROUTINE_NAME

 PURPOSE:
	Tell what your routine does here.  I like to start with the words:
	"This function (or procedure) ..."
	Try to use the active, present tense.

 CATEGORY:
	Put a category (or categories) here.  For example:
	Widgets.

 CALLING SEQUENCE:
	Write the calling sequence here. Include only positional parameters
	(i.e., NO KEYWORDS). For procedures, use the form:

	ROUTINE_NAME, Parameter1, Parameter2, Foobar

	Note that the routine name is ALL CAPS and arguments have Initial
	Caps.  For functions, use the form:
 
	Result = FUNCTION_NAME(Parameter1, Parameter2, Foobar)

	Always use the "Result = " part to begin. This makes it super-obvious
	to the user that this routine is a function!

 INPUTS:
	Parm1:	Describe the positional input parameters here. Note again
		that positional parameters are shown with Initial Caps.

 OPTIONAL INPUTS:
	Parm2:	Describe optional inputs here. If you don't have any, just
		delete this section.
	
 KEYWORD PARAMETERS:
	KEY1:	Document keyword parameters like this. Note that the keyword
		is shown in ALL CAPS!

	KEY2:	Yet another keyword. Try to use the active, present tense
		when describing your keywords.  For example, if this keyword
		is just a set or unset flag, say something like:
		"Set this keyword to use foobar subfloatation. The default
		 is foobar superfloatation."

 OUTPUTS:
	Describe any outputs here.  For example, "This function returns the
	foobar superflimpt version of the input array."  This is where you
	should also document the return value for functions.

 OPTIONAL OUTPUTS:
	Describe optional outputs here.  If the routine doesn't have any, 
	just delete this section.

 COMMON BLOCKS:
	BLOCK1:	Describe any common blocks here. If there are no COMMON
		blocks, just delete this entry.

 SIDE EFFECTS:
	Describe "side effects" here.  There aren't any?  Well, just delete
	this entry.

 RESTRICTIONS:
	Describe any "restrictions" here.  Delete this section if there are
	no important restrictions.

 PROCEDURE:
	You can describe the foobar superfloatation method being used here.
	You might not need this section for your routine.

 EXAMPLE:
	Please provide a simple example here. An example from the PICKFILE
	documentation is shown below.

	Create a PICKFILE widget that lets users select only files with 
	the extensions 'pro' and 'dat'.  Use the 'Select File to Read' title 
	and store the name of the selected file in the variable F.  Enter:

		F = PICKFILE(/READ, FILTER = ['pro', 'dat'])

 MODIFICATION HISTORY:
 	Written by:	Your name here, Date.
	July, 1994	Any additional mods get described here.  Remember to
			change the stuff above if you add a new keyword or
			something!

	%W% %H% LASCO IDL LIBRARY


rt $SSW/soho/lasco/idl/movie/rt.pro
[Previous] [Next]
PRO RT, tele, RUNNING_DIFF=running_diff, FFV=ffv, LENGTH=length, SKIP=skip

 Procedure to call RTMVIPLAY to play real-time movie

 INPUTS:

 tele:	'eit_195'
	'eit_304'
	'eit_171'
	'eit_284'
	'c1_fexiv'
	'c2'
	'c3'

 KEYWORDS:
  /FFV  for full resolution images (default is 1/2 resolution  ex. 512x512)
  /LENGTH	Set equal to desired length of movie
  /SKIP	Skip every other frame

 CALLS: ***
	RTMVIPLAY [1], RTMVIPLAY [2], w256 [1], w256 [2]
 Example:  IDL> rt, 'c2'

 MODIFIED:
	nbr, 11/9/01 - Add documentation in header
       Karl, 7/26/04 -- change gif_dir path

	@(#)rt.pro	1.6, 07/26/04 - IDL NRL LASCO Library


rt_carrmapmaker yymmdd num_r rad limb wlimb hdr disp saveset nextrot $SSW/soho/lasco/idl/synoptic/rt_carrmapmaker.pro
[Previous] [Next]
FUNCTION: rt_carrmapmaker, yymmdd, num_r, rad, limb, wlimb, hdr, disp, saveset, nextrot


PURPOSE: 
	Restores partially finished Carrington Maps for a given limb/camera 
	and appends the passed day's worth of images.

INPUTS:
	yymmdd	STRING:	date
	num_r	INT:	number of radii to make maps for-passed empty
	rad	FLTARR(num_r):		radii for maps-passed empty
	cmap	FLTARR(mapsize,181,num_r):	passed undefined
	limb	INTARR:	0 or 1 tells which limb for carrdate procedure
	disp	INT:	1 to display images
	wlimb	STRING:	'wl' or 'el'
	hdr	STRUCT: dummy header sent back to carrmap3 for fits header
	saveset	STRING:	filename of saved set of carrmapmaker
	nextrot	INT	1 if going on to the next rotation


 OUTPUTS:	rad = fltarr(num_r)	:	radii of maps
		num_r	: number of radii
		RESULT = fltarr(mapsize,181,num_r):	carrington maps, one per radius
		

ROUTINES CALLED:
    carrdate2.pro
    getc2c3norm2.pro
    savestrips.pro

 AUTHOR:	Nathan Rich, NRL, Nov. 1996
		Julia Kraemer, NRL, June 7, 1996

 MODIFIED:
	11/12/98 NBR	modified from carrmapmaker2.pro
	12/09/98 NBR	do cn=cn+1 in beginning
	04/16/99 NBR	make into a function
	06/08/99 NBR	Put check for m LE 0 (median)
	11/23/99 NBR	Change strip end skip criteria
	02/2000  NBR	GET_BKG=2 for any_year
	12/17/01 NBR	Use GET_BKG=1 for current year

 12/17/01, @(#)rt_carrmapmaker.pro	1.2

 CALLS:


rt_display_3 $SSW/soho/mdi/idl/egse/rt_display_3.pro
[Previous] [Next]
pro get_image,win_idx

 Program to read and display real time High rate data


RTMOVIE $SSW/soho/lasco/idl/movie/rtmovie.pro
[Previous] [Next]
 Project     : SOHO - LASCO/EIT
                   
 Name        : RTMOVIE
               
 Purpose     : Display movie of images as they are received in real time at the EOF.
               
 Explanation : Starts a movie of the previous 48 (~2 days) images.  As new images
		are received at the EOF they are added to the movie in time order.
               
 Use         : IDL> RTMOVIE [, telescope, num_frames, /MPEG ]

 Optional Inputs:
	        telescope   ;string 'c2' or 'c3'  -  default is 'c2'
	        num_frames  ;integer number of images to load  -  default is 48

 Keywords    : /MPEG ;will write out new .mvis and mpeg movies every time a new image is received.

 Calls       : ***
	ANYTIM2UTC [1], ANYTIM2UTC [2], BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3]
	CW_BGROUP, DATATYPE [1], DATATYPE [2], DATATYPE [3], EIT_DEGRIDN, FILE_EXIST [2]
	FXADDPAR [1], FXADDPAR [2], GETBKGIMG, GET_SEC_PIXEL, GET_SOLAR_RADIUS
	GET_SUN_CENTER [1], GET_SUN_CENTER [2], GET_SUN_CENTER [3], GET_UTC
	LASCO_READFITS [1], LASCO_READFITS [2], L_RDFTS, OFFSET_BIAS, PICKFILE
	PIXMAPS2MPEG, READFITS [1], READFITS [2], READFITS [3], REDUCE_STD_SIZE
	RTMOVIE_ADD_IMG, RTWRUNMOVIE2, RTWRUNMOVIE_BGROUP2, RTWRUNMOVIE_DRAW2
	RTWRUNMOVIE_EVENT2, STR2UTC [1], STR2UTC [2], STR2UTC [3], STRUCT2FITSHDR, STR_SEP
	TAI2UTC, TVCIRCLE, UTC2STR, UTC2TAI, WIN2PS, WRITE_DISK_MOVIE [1]
	WRITE_DISK_MOVIE [2], WRITE_DISK_MOVIE [3], XLOADCT [1], XLOADCT [2]
	XLOADCT [3], XMANAGER, break_file [4], file_exist [1], file_exist [3]
 Side effects: None.
               
 Category    : Image Display.  Animation.
               
 Written     : Scott Paswaters, NRL Dec. 2 1996.
               
 Version     : RAH, NRL, 2/18/97  Mods for computation of center
               SEP, NRL, 3/25/97  Save .mvi files

	@(#)rtmovie.pro	1.5 09/12/97 LASCO IDL LIBRARY


RTMVI [1] $SSW/soho/lasco/idl/movie/rtmvi.pro
[Previous] [Next]
 Project     : SOHO - LASCO/EIT
                   
 Name        : RTMVI
               
 Purpose     : Write GIF images as they are received in real time.
               
 Use         : IDL> RTMVI [, /MPEG, /TV, CAM=['c2','c3','eit','eit_195','eit_171','eit_284','eit_304']]

 Inputs      : None

 Optional Inputs: None

 Outputs     : GIF, JPG, MPG files

 Keywords    :
	NOMPEG	Does not generate .mpg files, and exits after finishing one cycle through all cameras.
	TV	Generate and save GIFs in videodir
	CAM	Set equal to one telescope to process
	DEBUG	Write file transfer durations to ~/cmd_times.lst and certain event times to ~/rt_times.lst
	MPEG_ONLY	Does not generate gif or jpeg images

 Calls       : ***
	ARR2STR [1], Arr2Str [2], BIN_DATE, CONGRID [1], CONGRID [2], CONGRID [3]
	DATATYPE [1], DATATYPE [2], DATATYPE [3], FILE_DATE_MOD, FILE_EXIST [2], GAMMA_CT
	GETENV_SLASH, GET_UTC, GIF2JPG24, GIFS2MPEG, IMG_HDR_TXT2STRUCT, ISARRAY [1]
	ISARRAY [2], ISARRAY [3], LASCO_READFITS [1], LASCO_READFITS [2], LOADCT
	MAKE_IMAGE_C2, MAKE_IMAGE_C3, MAKE_IMAGE_EIT, READ_GIF, RTC1IMG, RTMOVIE_ADD_IMG
	STR2UTC [1], STR2UTC [2], STR2UTC [3], STR_SEP, TAI2UTC, TRIM, UTC2DOW, UTC2STR, UTC2TAI
	UTC2YYMMDD, WRITE_GIF, WRTMVI, WRTMVI_DIFF, WRTMVI_MPEG, file_exist [1]
	file_exist [3], w256 [1], w256 [2]
 Side effects: None.
               
 Category    : Image Display.  Animation.

 Written     : Scott Paswaters, NRL Dec. 2 1996.
               
 Version     : RAH, NRL, 2/18/97  Mods for computation of center
		SEP, NRL, 3/25/97  Save .mvi files
		RAH, NRL, 2/04/98  EIT normalization box changed to bottom of image, and AL +1 filter
				   added as a valid option for the filter wheel (in addition to clear)
		SEP, NRL, 4/06/98  Changed to write GIF images instead of MVI files
		NBR, NRL, 3/22/99  Write JPEG images also
		NBR, NRL, 4/21/99  Fix removal of old JPEG images
		NBR, NRL, 5/17/99  Add RTMVI_COMMON_IMG block; utilize FIXGAPS keyword
		NBR, NRL, 5/27/99  Add /NOMPEG keyword
		DW,  NRL, 6/11/99  Add mpeg_dir variable
		NBR, NRL, 7/22/99  Change call for GIF2JPG24
		NBR, NRL, 7/23/99  Changed mpeg_dir
		NBR, NRL, 8/6/99   Add 13 day mpeg
		DW,  NRL, 8/09/99  Add nrl_mpeg_dir variable
		NBR, NRL, Sep 1999 Reduce TIMER settings; Change movie making interval to 3 hours;
				   Move NOMPEG keyword action
		DW , NRL, 8 Sep 1999 Check each movie directory for old files
		NBR, NRL, 9/20/99  Change order of cameras; Add CAM keyword
		NBR, NRL,  Jan 2000  Make daily mpegs; chmod daily mpg
		NBR, NRL,  Feb 2000  GOTO, next instead of do_movies
		NBR, NRL,  Mar 2000  EIT option for CAM keyword
		NBR, NRL,  May 2000  Add VIDEO and PICT outputs
		NBR, NRL,  Aug 2000  Skip files where exptime LT 6 (to omit C3 Clear of about 5.3sec)
		NBR, NRL, 3/22/01 - Make RT EIT movies (108 frames > 2 days long)
		NBR, NRL, 3/29/01 - Add quit button
		NBR, NRL, 4/9/01  - Skip bad images; do not copy to lasco6
		NBR, NRL, 5/17/01 - Add TV keyword; implement env var usage; disable daily mpg
		GW, NRL, 7/24/01 - Use EIT_PREP
		NBR, NRL, 7/31/01 - Use $LAST_IMG for txtfile
		NBR, NRL, 8/ 6/01 - Set last_ptr for reading txtfile and add
					to common block
		NBR, NRL, 9/ 4/01 - Comment out daily movie part of WRTMVI_EVENT
		jake, NRL, 011220 -	fix indentation of code with TABS
							fix CAPITALIZATION
							began writing WRTMVI_DIFF
		jake, NRL, 020104 - adding diff mpegs
		NBR, NRL, 5/ 1/02 - CD,'' in wrtmvi_event
		nbr, nrl,10/11/02 - Add days2save variable; set at 4; add xtra=2 for C2 and C3
		jake, NRL, 021022 - changed s_file to include differential gifs
		jake, NRL, 021022 - changed s_file back and d_file
		jake, NRL, 021023 - modified RTMVI_COMMON to include d_file
		jake, NRL, 021209 - adding messages to console again, bc somehow got removed
		jake, NRL, 030117 - making Diff stuff every 8 hrs instead of 4 hrs.
		NBR, NRL,  030124 - Allow half-res C2 and C3
		jake, NRL, 030213 - made wrtmvi_diff check last made dif-gif, not first
		jake, NRL, 030227 - making Diff stuff every 24 hrs instead of 8 hrs.
						using RTMVI instead of MVI to keep hera out of loop
		jake, NRL, 030228 - changing to 12 instead of 24, because 24 doesn't work right
		jake, NRL, 030303 - changed back to 24
		jake, NRL, 030303 - added "l" after last 60 because was overflowing variable
		jake, NRL, 030304 - added touch diffs routine to try to keep diffs near midnight only
		jake, NRL, 030321 - added some code to begin archiving 13day realtime mpegs
		jake, NRL, 030414 - modified 13day archive code because difference between
				UTC and local time was sometimes causing 2 files to be saved.
		jake, NRL, 030430 - added WRITE_PNG so can use idl56
		jake, NRL, 030807 - diff image creation begins at 10PM now
		jake, NRL, 030807 - preserving last 100 LASCO images to avoid all realtime gifs
							from being deleted in times with no telemetry
		nbr, NRL, 030912 - Add t argument to WRTMVI_DIFF; increase logging; edit use of first_mvi
		nbr, NRL, 030929 - add debugset to common block; more logging
		nbr, NRL, 031024 - add dompegset, no_img_set to common block; keyword MPEG_ONLY
		nbr, NRL, 031028 - Use n2save to determine how many to delete, set to 200 (*2 for EIT195)
		nbr, NRL, 031030 - Eliminate widgets and make RTMVI a function
		nbr, NRL, 031105 - Fix tai_old bug in WRTMVI_DIFF
               nbr, NRL, 031222 - Change running_diff implementation: rdiff image is computed in make_image_*.pro
               KB, NRL,  040607 - Mods at line 746-ish and 980-ish
		KB, NRL,  040609 - Add missed_count to rtmvi_common. Attempt at fixing 'skipped images' problem.
		KB, NRL,  040610 - Edit line 983 -- stop procedure from looking in wrong directory for some c3 files
		KB, NRL,  040616 - Add code to force a reprocess when GT 8 images are skipped (line 752)
		KB, NRL,  040706 - Tweaked to make sure "skipped image" problem is finally solved...
               KB, NRL,  040929 - Filter out long exposure images


	@(#)rtmvi.pro	1.69 12/22/03 :LASCO IDL LIBRARY


RTMVI [2] $SSW/soho/lasco/idl/movie/rtmvi020102.pro
[Previous] [Next]
 Project     : SOHO - LASCO/EIT
                   
 Name        : RTMVI
               
 Purpose     : Write GIF images as they are received in real time.
               
 Use         : IDL> RTMVI [, /MPEG, /TV, CAM=['c2','c3','eit','eit_195','eit_171','eit_284','eit_304']]

 Inputs      : None

 Optional Inputs: None

 Outputs     : GIF, JPG, MPG files

 Keywords    :
	NOMPEG	Does not generate .mpg files, and exits after finishing one cycle through all cameras.
	TV	Generate and save GIFs in videodir
	CAM	Set equal to one telescope to process
	DEBUG	Write file transfer durations to ~/cmd_times.lst and certain event times to ~/rt_times.lst

 Calls       : $SSW/soho
	Comments    : Must be running IDL on a machine with /net/lasco6/data mounted.
	LAST_IMG, Must setenv MVIS, QL_IMG, WEBDIR
 Side effects: None.
               
 Category    : Image Display.  Animation.
               
 Written     : Scott Paswaters, NRL Dec. 2 1996.
               
 Version     : RAH, NRL, 2/18/97  Mods for computation of center
               SEP, NRL, 3/25/97  Save .mvi files
               RAH, NRL, 2/04/98  EIT normalization box changed to bottom of image, and AL +1 filter
				   added as a valid option for the filter wheel (in addition to clear)
               SEP, NRL, 4/06/98  Changed to write GIF images instead of MVI files
		NBR, NRL, 3/22/99  Write JPEG images also
		NBR, NRL, 4/21/99  Fix removal of old JPEG images
		NBR, NRL, 5/17/99  Add RTMVI_COMMON_IMG block; utilize FIXGAPS keyword
		NBR, NRL, 5/27/99  Add /NOMPEG keyword
		DW,  NRL, 6/11/99  Add mpeg_dir variable
		NBR, NRL, 7/22/99  Change call for GIF2JPG24
		NBR, NRL, 7/23/99  Changed mpeg_dir
		NBR, NRL, 8/6/99   Add 13 day mpeg
		DW,  NRL, 8/09/99  Add nrl_mpeg_dir variable
		NBR, NRL, Sep 1999 Reduce TIMER settings; Change movie making interval to 3 hours;
				   Move NOMPEG keyword action
               DW , NRL, 8 Sep 1999 Check each movie directory for old files
		NBR, NRL, 9/20/99  Change order of cameras; Add CAM keyword
		NBR, NRL,  Jan 2000  Make daily mpegs; chmod daily mpg
		NBR, NRL,  Feb 2000  GOTO, next instead of do_movies
		NBR, NRL,  Mar 2000  EIT option for CAM keyword
		NBR, NRL,  May 2000  Add VIDEO and PICT outputs
		NBR, NRL,  Aug 2000  Skip files where exptime LT 6 (to omit C3 Clear of about 5.3sec)
		NBR, NRL, 3/22/01 - Make RT EIT movies (108 frames > 2 days long)
		NBR, NRL, 3/29/01 - Add quit button
		NBR, NRL, 4/9/01  - Skip bad images; do not copy to lasco6
		NBR, NRL, 5/17/01 - Add TV keyword; implement env var usage; disable daily mpg
		GW, NRL, 7/24/01 - Use EIT_PREP
		NBR, NRL, 7/31/01 - Use $LAST_IMG for txtfile
		NBR, NRL, 8/ 6/01 - Set last_ptr for reading txtfile and add
					to common block
		NBR, NRL, 9/ 4/01 - Comment out daily movie part of WRTMVI_EVENT

 %H% %W% :LASCO IDL LIBRARY


RTMVIPLAY [1] $SSW/soho/lasco/idl/movie/rtmviplay.pro
[Previous] [Next]
 Project     : SOHO - LASCO/EIT

 Name        : RTMVIPLAY

 Purpose     : Widget tool to display animation sequence from gif files.

 Explanation : This tool allows the user to view a series of gif images as
               an animation sequence.  The user can control the direction,
               speed, and number of frames with widget controls.  A directory
		is monitored for new images and they are added to the movie
		in time order.

 Use         : IDL> RTMVIPLAY, match, LENGTH=length, GIF_DIR=gif_dir, IMG_REBIN=img_rebin, 
 			RUNNING_DIFF=running_diff

 Inputs      : match : string to use to match gif files to load.
	           ex : RTMVIPLAY, 'c1_fexiv'
	           ex : RTMVIPLAY, 'c2'
	           ex : RTMVIPLAY, 'c3'
	           ex : RTMVIPLAY, 'eit_195'
	           ex : RTMVIPLAY, 'eit_304'
	           ex : RTMVIPLAY, 'eit_171'
	           ex : RTMVIPLAY, 'eit_284'

 Outputs     : None.

 Keywords    : 
               LENGTH=length     : maximum number of frames to load (default is all).
               GIF_DIR=gif_dir   : directory to read gif images from (default is $MVIS/rtmovie/gifs/ 
                                   or current directory if $MVIS doesn't exist)**
                                   **New default is /net/solardata/sd4/rtmovie/gifs/  -- KB
               IMG_REBIN=img_rebin  : set to dimensions to rebin (or congrid) images to
				     : ex. IMG_REBIN=[512,512]
               /RUNNING_DIFF     : set this flag for a running difference movie

 Calls       : ***
	BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], CHECK_PERMISSION, CONGRID [1]
	CONGRID [2], CONGRID [3], CW_BGROUP, CW_PDMENU, DATATYPE [1], DATATYPE [2]
	DATATYPE [3], FXADDPAR [1], FXADDPAR [2], LOADCT, PICKFILE, PIXMAPS2MPEG, READ_GIF
	REMCHAR [1], REMCHAR [2], REMCHAR [3], RTMVIPLAY_BGROUP, RTMVIPLAY_DRAW
	RTMVIPLAY_EVENT, STR2UTC [1], STR2UTC [2], STR2UTC [3], TAG_EXIST [1]
	TAG_EXIST [2], UTC2TAI, WIN2PS, WRITE_DISK_MOVIE [1], WRITE_DISK_MOVIE [2]
	WRITE_DISK_MOVIE [3], WRITE_GIF, WRUNMOVIEM_RT, XLOADCT [1], XLOADCT [2]
	XLOADCT [3], XMANAGER, break_file [4]
 CALLED BY:
	rt
 Side effects: None.

 Category    : Image Display.  Animation.

 Written     : Scott Paswaters, NRL Apr. 8 1998.

 MODIFIED:
	A. Vourlidas, 11/9/01 - Put WRUNMOVIEM_RT button in widget
	N. Rich, 11/14/01 - CD to olddir if calling wrunmoviem_rt
       Karl B  7/26/04 - changed gif directory to solardata instead of $MVIS
       Karl B  7/26/04 - changed mvidir to /net/mercury/mvi/


 See Also    : MKMOVIE.PRO
       @(#)rtmviplay.pro	1.8, 07/26/04 - NRL LASCO IDL LIBRARY


RTMVIPLAY [2] $SSW/soho/mdi/idl/ops/rtmviplay_mdi.pro
[Previous] [Next]
 Project     : SOHO - LASCO/EIT

 Name        : RTMVIPLAY

 Purpose     : Widget tool to display animation sequence from gif files.

 Explanation : This tool allows the user to view a series of gif images as
               an animation sequence.  The user can control the direction,
               speed, and number of frames with widget controls.  A directory
		is monitored for new images and they are added to the movie
		in time order.

 Use         : IDL> RTMVIPLAY, match, LENGTH=length, GIF_DIR=gif_dir, IMG_REBIN=img_rebin, 
 			RUNNING_DIFF=running_diff

 Inputs      : match : string to use to match gif files to load.
	           ex : RTMVIPLAY, 'c1_fexiv'
	           ex : RTMVIPLAY, 'c2'
	           ex : RTMVIPLAY, 'c3'
	           ex : RTMVIPLAY, 'eit_195'
	           ex : RTMVIPLAY, 'eit_304'
	           ex : RTMVIPLAY, 'eit_171'
	           ex : RTMVIPLAY, 'eit_284'

 Outputs     : None.

 Keywords    : 
               LENGTH=length     : maximum number of frames to load (default is all).
               GIF_DIR=gif_dir   : directory to read gif images from (default is $MVIS/rtmovie/gifs/ 
                                   or current directory if $MVIS doesn't exist)
               IMG_REBIN=img_rebin  : set to dimensions to rebin (or congrid) images to
				     : ex. IMG_REBIN=[512,512]
               /RUNNING_DIFF     : set this flag for a running difference movie

 Calls       : ***
	BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], CHECK_PERMISSION, CONGRID [1]
	CONGRID [2], CONGRID [3], CW_BGROUP, CW_PDMENU, DATATYPE [1], DATATYPE [2]
	DATATYPE [3], FXADDPAR [1], FXADDPAR [2], LOADCT, PICKFILE, PIXMAPS2MPEG, READ_GIF
	REMCHAR [1], REMCHAR [2], REMCHAR [3], RTMVIPLAY_BGROUP, RTMVIPLAY_DRAW
	RTMVIPLAY_EVENT, RTMVIPLAY_MDI, STR2UTC [1], STR2UTC [2], STR2UTC [3]
	TAG_EXIST [1], TAG_EXIST [2], UTC2TAI, WIN2PS, WRITE_DISK_MOVIE [1]
	WRITE_DISK_MOVIE [2], WRITE_DISK_MOVIE [3], WRITE_GIF, XLOADCT [1], XLOADCT [2]
	XLOADCT [3], XMANAGER, break_file [4], file_list [1], file_list [2]
 CALLED BY:
	rt
 Side effects: None.

 Category    : Image Display.  Animation.

 Written     : Scott Paswaters, NRL Apr. 8 1998.

 See Also    : MKMOVIE.PRO
       @(#)rtmviplay.pro       1.1 10/12/96 LASCO IDL LIBRARY


RTMVIPLAYPNG $SSW/soho/lasco/idl/movie/rtmviplaypng.pro
[Previous] [Next]
 Project     : SOHO - LASCO/EIT

 Name        : RTMVIPLAYPNG

 Purpose     : Widget tool to display animation sequence from png files.

 Explanation : This tool allows the user to view a series of png images as
               an animation sequence.  The user can control the direction,
               speed, and number of frames with widget controls.  A directory
		is monitored for new images and they are added to the movie
		in time order.

 Use         : IDL> RTMVIPLAYPNG, match, LENGTH=length, PNG_DIR=png_dir, IMG_REBIN=img_rebin, 
 			RUNNING_DIFF=running_diff

 Inputs      : match : string to use to match png files to load.
	           ex : RTMVIPLAYPNG, 'c1_fexiv'
	           ex : RTMVIPLAYPNG, 'c2'
	           ex : RTMVIPLAYPNG, 'c3'
	           ex : RTMVIPLAYPNG, 'eit_195'
	           ex : RTMVIPLAYPNG, 'eit_304'
	           ex : RTMVIPLAYPNG, 'eit_171'
	           ex : RTMVIPLAYPNG, 'eit_284'

 Outputs     : None.

 Keywords    : 
               LENGTH=length     : maximum number of frames to load (default is all).
               PNG_DIR=png_dir   : directory to read png images from (default is $MVIS/rtmovie/pngs/ 
                                   or current directory if $MVIS doesn't exist)
               IMG_REBIN=img_rebin  : set to dimensions to rebin (or congrid) images to
				     : ex. IMG_REBIN=[512,512]
               /RUNNING_DIFF     : set this flag for a running difference movie

 Calls       : ***
	BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], CHECK_PERMISSION, CONGRID [1]
	CONGRID [2], CONGRID [3], CW_BGROUP, CW_PDMENU, DATATYPE [1], DATATYPE [2]
	DATATYPE [3], FXADDPAR [1], FXADDPAR [2], LOADCT, PICKFILE, PIXMAPS2MPEG
	REMCHAR [1], REMCHAR [2], REMCHAR [3], RTMVIPLAYPNG_BGROUP, RTMVIPLAYPNG_DRAW
	RTMVIPLAYPNG_EVENT, STR2UTC [1], STR2UTC [2], STR2UTC [3], TAG_EXIST [1]
	TAG_EXIST [2], UTC2TAI, WIN2PS, WRITE_DISK_MOVIE [1], WRITE_DISK_MOVIE [2]
	WRITE_DISK_MOVIE [3], WRUNMOVIEM_RT, XLOADCT [1], XLOADCT [2], XLOADCT [3]
	XMANAGER, break_file [4]
 CALLED BY:
	rtpng
 Side effects: None.

 Category    : Image Display.  Animation.

 Written     : Scott Paswaters, NRL Apr. 8 1998.

 MODIFIED:
	A. Vourlidas, 11/9/01 - Put WRUNMOVIEM_RT button in widget
	N. Rich, 11/14/01 - CD to olddir if calling wrunmoviem_rt
	jake 030430 - created RTMVIPLAYPNG from RTMVIPLAY
				changed all GIF to PNG
	jake 030509 - idl53 needs pngs rotated


 See Also    : MKMOVIE.PRO
       @(#)rtmviplaypng.pro	1.2, 05/09/03 - NRL LASCO IDL LIBRARY


rtpng $SSW/soho/lasco/idl/movie/rtpng.pro
[Previous] [Next]
PRO RTPNG, tele, RUNNING_DIFF=running_diff, FFV=ffv, LENGTH=length, SKIP=skip

 Procedure to call RTMVIPLAY to play real-time movie

 INPUTS:

 tele:	'eit_195'
	'eit_304'
	'eit_171'
	'eit_284'
	'c1_fexiv'
	'c2'
	'c3'

 KEYWORDS:
  /FFV  for full resolution images (default is 1/2 resolution  ex. 512x512)
  /LENGTH	Set equal to desired length of movie
  /SKIP	Skip every other frame

 CALLS: ***
	RTMVIPLAYPNG, w256 [1], w256 [2]
 Example:  IDL> rt, 'c2'

 MODIFIED:
	nbr, 11/9/01 - Add documentation in header
	jake 030430 - created rtpng from rt
				change all GIF to PNG

	@(#)rtpng.pro	1.1, 05/01/03 - IDL NRL LASCO Library