M1ANGLE $SSW/soho/lasco/idl/util/m1angle.pro
[Previous] [Next]
 NAME:
	M1ANGLE

 PURPOSE:
	Compute the angular offset of the M1 mirror from LVDT values.

 CATEGORY:
	LASCO-UTIL

 CALLING SEQUENCE:
	Result = M1ANGLE (LVDT)

 INPUTS:
	LVDT:	A three element array giving the values of the LVDT
		for the P1, P2 and P3 piezo electric stacks.
		The LVDT values are obtained by running the LP to
		for the M1 measurement unit.

 OPTIONAL INPUTS:
	None
	
 KEYWORD PARAMETERS:
	None

 OUTPUTS:
	This function returns a 2 element array giving the pointing angles
	in the X and Y directions.  The values returned are in units of
	arc seconds in the M1 coordinate system.

 OPTIONAL OUTPUTS:
	None

 COMMON BLOCKS:
	None

 SIDE EFFECTS:
	None

 RESTRICTIONS:
	None

 PROCEDURE:
	The equations provided by Kaiser-Trede have been implemented.

 EXAMPLE:
	To find the offset associated with the LVDT values (547, 603, 767):

	Result = M1ANGLE ([547,603,767])

 MODIFICATION HISTORY:
 	Written by:	RA Howard, 1993

	@(#)m1angle.pro	1.1 10/05/96 LASCO IDL LIBRARY


M1COEFF $SSW/soho/lasco/idl/util/m1coeff.pro
[Previous] [Next]
 NAME:
	M1COEFF

 PURPOSE:
	This routine returns coefficients needed for computing the M1 pointing.
	It is used by other routines.

 CATEGORY:
	UTIL

 CALLING SEQUENCE:
	M1COEFF,B,C,F,K7,K8,K9

 INPUTS:
	None

 OUTPUTS:
	B,C,F,K7,K8,K9:	The coefficients for the M1 mirror pointing

 CALLED BY:
	m1wobble
 MODIFICATION HISTORY:
 	Written by:	RA Howard, NRL, 1994

	@(#)m1coeff.pro	1.1 10/05/96 LASCO IDL LIBRARY


M1DACS $SSW/soho/lasco/idl/util/m1dacs.pro
[Previous] [Next]
 NAME:
	M1DACS

 PURPOSE:
	This function returns a 3 word array of the P1, P2 and P3 DAC values
	to command the M1 mirror to a given offset.

 CATEGORY:
	LASCO-UTIL

 CALLING SEQUENCE:
	Result = M1DACS ( Alphax, Alphay)

 INPUTS:
	Alphax:	The pointing angle in the x direction in the M1 coordinate 
		system.  The value is in arc seconds.
	Alphay:	The pointing angle in the y direction in the M1 coordinate 
		system.  The value is in arc seconds.

 OPTIONAL INPUTS:
	None
	
 KEYWORD PARAMETERS:
	None

 OUTPUTS:
	This function returns a three word array containing the values
	of the P1, P2 and P3 DACS necessary to move to the input offset
	angles.

 OPTIONAL OUTPUTS:
	None

 COMMON BLOCKS:
	None

 SIDE EFFECTS:
	None

 RESTRICTIONS:
	None

 PROCEDURE:
	The equations provided by Kaiser-Trede have been implemented.
	The input values are relative to the "active zero" point.

 EXAMPLE:
	To move to a point that is located at (+10.2, -5.7) arc seconds

	     Result = M1DACS (10.2,-5.7)

 MODIFICATION HISTORY:
 	Written by:	RA Howard, 1993
	Version 2	RAH 26 May 1996	Deleted the various models.

	@(#)m1dacs.pro	1.1 10/05/96 LASCO IDL LIBRARY


M1DYNIMG $SSW/soho/lasco/idl/util/m1dynimg.pro
[Previous] [Next]
 NAME:
	M1DYNIMG

 PURPOSE:
	Returns a 4 word array of the constants for dynamic imaging.

 CATEGORY:
	LASCO-UTIL

 CALLING SEQUENCE:
	Result = M1DYNIMG (Alhpax, Alphay)

 INPUTS:
	Alphax:	The angle (in arc sec) to move the M1 in the X direction.
	Alphay:	The angle (in arc sec) to move the M1 in the Y direction.

 OPTIONAL INPUTS:
	None
	
 KEYWORD PARAMETERS:
	None

 OUTPUTS:
	This function returns a 4 word array containing the constants
	A, B, C and D that are used by the LEB to compute the DAC values
	in the dynamic imaging LP.

 OPTIONAL OUTPUTS:
	None

 COMMON BLOCKS:
	None

 SIDE EFFECTS:
	None

 RESTRICTIONS:
	None

 PROCEDURE:
	The equations provided by Kaiser-Trede have been implemented.

 EXAMPLE:
	Normally, dynamic imaging will move the M1 by 0.5 pixel steps
	To find the coefficients to move in 0.5 pixel steps:

	Result = M1DYNIMG ( 0.5*5.6, 0.5*5.6 )

 MODIFICATION HISTORY:
 	Written by:	RA Howard, NRL, 1993

	@(#)m1dynimg.pro	1.1 10/05/96 LASCO IDL LIBRARY


M1REVERSE $SSW/soho/lasco/idl/util/m1reverse.pro
[Previous] [Next]
 NAME:
	M1REVERSE

 PURPOSE:
	This function reverses the bits of the m1 lvdt reading.

 CATEGORY:
	UTIL

 CALLING SEQUENCE:
	M1REVERSE,Dd

 INPUTS:
	Dd:	Then DN value from the M1 LVDT

 OUTPUTS:
	This function returns the value of the M1 LVDT reading after bit
	reversal.

 MODIFICATION HISTORY:
 	Written by:	RA Howard, NRL, 1994

	@(#)m1reverse.pro	1.1 10/05/96 LASCO IDL LIBRARY


m1tees $SSW/soho/lasco/idl/util/m1tees.pro
[Previous] [Next]
   alphax and alphay are the pointing angles in arc seconds 

   returns a 3 word array of the P1, P2 and P3 DAC values

	@(#)m1tees.pro	1.1 10/05/96 LASCO IDL LIBRARY
 CALLED BY
	m1wobble


m1wobble $SSW/soho/lasco/idl/util/m1wobble.pro
[Previous] [Next]
   computes the m1 wobble parameters, A, B, C, D

	@(#)m1wobble.pro	1.1 10/05/96 LASCO IDL LIBRARY
 CALLS:


mail [2] $SSW/soho/mdi/idl_old/gen/ys_util/mail.pro
[Previous] [Next]
NAME:
	mail
PURPOSE:
	To send a mail message to yourself or a list of users
CALLING SEQUENCE:
	mail, message
	mail, message, users='lemen,freeland'
	mail, message, subj="Test"
	mail, file=file, users=users, /self
OPTIONAL INPUT:
	message	- a string array of the message that is to
		  be sent.  Either the "message" or the "file"
		  parameter must be used.
 CALLS: ***
	ARR2STR [1], Arr2Str [2], CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3]
	FILE_EXIST [2], concat_dir [4], file_append [1], file_append [2], file_exist [1]
	file_exist [3], get_logenv [1], get_logenv [2]
 CALLED BY:
	ACOPY [1], ACOPY_TEST, bbso_copy [1], bbso_copy [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], ckdderr, cp_fns [1]
	cp_fns [2], daily_forecast [2], disk_monitor [1], disk_monitor [2], do_ads, dotar
	eit_genx_cat, get_ads [1], get_selsis, get_sirius [1], get_sirius [2], goes2str
	killold [1], killold [2], laststat [1], laststat [2], mk_gsn_obs_s1, mk_mo
	mk_mo2 [1], mk_mo2 [2], mk_mo_disk2, mk_orbit [1], mk_orbit [2], mk_orbit_files
	mk_pix [1], mk_pix [2], mk_sfc [1], mk_sfc [2], mo_patch, monitor_scratch [1]
	monitor_scratch [2], nob_img_copy, nts_copy [1], nts_copy [2], rd_ydbtap
	ref_term [2], search_obs, selsisi_copy, sfc_check, soon_search [1]
	soon_search [3], ssw_check_contrib, ssw_conflicts, ssw_strfind, tr_build_img [1]
	trace_do_data_requests, trace_special_movie [2], trace_special_movie [3]
	wwwidl_server_check, xsxt_prep, ycopy, ydump, ys_contrib [1], ys_contrib [2]
OPTIONAL KEYWORD INPUT:
	users	- a string containing the users who should receive
		  the message.  If it is undefined, it will send the
		  message to yourself only (can be used as notification
		  that a program is finished)
	subj	- a string that should appear on the subject line.  It 
		  cannot have the " character in the string
	file	- the name of a file that should be sent to the users
		  Either the "message" or the "file" parameter must
		  be used.  File can be an array of file names.
	self	- if set, send a copy to yourself also

       no_defsubj - if set, use user supplied subject only

RESTRICTIONS:
	Only works on Unix machines right now
HISTORY:
	Written 21-Mar-92 by M.Morrison
	24-Nov-92 (MDM) - Modified not to use the subject option when running
			  on the SGI machine.
	14-Dec-92 (MDM) - Modified to work on MIPS machines
	18-Dec-92 (MDM) - Modified to have the file name in the subject on
			  non-SGI machines.
	17-Feb-94 (SLF) - add no_defsubj 
       26-feb-95 (SLF) - make sure proper mail (Mail) is selected
			  (seperate from .cshrc/path) - avoid pipe (very slow)
			  if message is string array, make temporary file,
			  and recurse with file option, remove file...
        3-mar-95 (SLF) - use /nodefsubj when recursing


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

   Purpose: execute idl 'command' file (in IDL_STARTUP format)

   Input Paramters:
      filename - file containing idl startup commands

 CALLED BY:
	setssw_windows, ssw_addmm_gen, ssw_set_chianti, ssw_setup_windows
   History:
      slf -  5-feb-1993 - allow chaining of multiple IDL_STARTUP files
      slf - 30-mar-1993 - return to caller on error
      slf - 21-apr-1993 - trap executive commands (.run, .size, etc)

 CALLS: ***
	rd_tfile [1], rd_tfile [2]
   Restrictions:
      filename contents must conform to IDL_STARTUP format
      Cannot execute idl executive commands (TBD)
      Uses execute function so no recursion allowed - multiple line block
      commands are limited to total string length of 512 (execute limit)


MAKE_ALL_DAYS $SSW/soho/lasco/idl/synoptic/make_all_days.pro
[Previous] [Next]
 NAME:
	MAKE_ALL_DAYS

 PURPOSE:
	This procedure is an easy interface to the MK_DAILY_MED procedure

 CATEGORY:
	LASCO SYNOPTIC

 CALLING SEQUENCE:
	MAKE_ALL_DAYS,Tel,Stdte,Endte

 INPUTS:
	Tel:	Telescope to be processed, (string), eg. 'C1','C2','C3'
	Stdte:	The starting date specified as a string: YYMMDD, eg. 960601
	Endte:	The ending date specified as a string: YYMMDD, eg, 960630

 OUTPUTS:
	This function generates images in $MONTHLY_IMAGES of the daily
	medians for the specfied telescope, and for each day specfied by the
	starting and ending dates.

 KEYWORDS:
	QL:	If set then use quick look date, else use level 0 data
	FILTER:	String denoting the filter position.  The default depends on 
		the telescope:
			C1:  FeXIV
			C2:  Orange
			C3:  Clear
			C4:  Clear
	POLAR:	String denoting the polarizer position.  The default depends on
		the telescope:
			C1:  Clear
			C2:  Clear
			C3:  Clear
			C4:  304A
	WLU:	String denoting the upper FP wavelength of an interval. 
	ANYSIZE:	Accept images with any dimensions GT 256
	NOREBIN:	Do not rebin images to 512x512
	ROLLED:		Save result in 'daily/rolled' directory; set equal to roll angle (CROTA)
	VERBOSE:	Print information on rows during loop

 CALLS: ***
	MK_DAILY_C1_MED, MK_DAILY_MED, STR2UTC [1], STR2UTC [2], STR2UTC [3], YYMMDD2UTC
 RESTRICTIONS:
	
	
 PROCEDURE:
	A loop is generated between the start and end dates, in which the
	routine MK_DAILY_MED is called for each day.

 EXAMPLE:
	To make all the daily median images for the month of June, 1996 for
	C3:

		MAKE_ALL_DAYS,'c3','960601','960630'

 MODIFICATION HISTORY:
 	Written by:	RA Howard, 20 October, 1996
	9/20/99   NBR	Had to add QL to mk_daily_med call
	12/1999	  NBR	Make y2k compliant; add MK_DAILY_MED keywords
	07/2000   NBR   Add ROLLED keyword
	5/2/2002, NBR	Add keyword descriptions

	07/14/03 @(#)make_all_days.pro	1.5 LASCO IDL LIBRARY


MAKE_ALL_MINDAYS $SSW/soho/lasco/idl/synoptic/make_all_mindays.pro
[Previous] [Next]
 NAME:
	MAKE_ALL_MINDAYS

 PURPOSE:
	This procedure is an easy interface to the MK_DAILY_MIN procedure

 CATEGORY:
	LASCO SYNOPTIC

 CALLING SEQUENCE:
	MAKE_ALL_MINDAYS,Tel,Stdte,Endte

 INPUTS:
	Tel:	Telescope to be processed, (string), eg. 'C1','C2','C3'
	Stdte:	The starting date specified as a string: YYMMDD, eg. 960601
	Endte:	The ending date specified as a string: YYMMDD, eg, 960630

 OUTPUTS:
	This function generates images in $MONTHLY_IMAGES of the daily
	minimums for the specfied telescope, and for each day specfied by the
	starting and ending dates.

 CALLS: ***
	MK_DAILY_C1_MIN, MK_DAILY_MIN, STR2UTC [1], STR2UTC [2], STR2UTC [3], YYMMDD2UTC
 RESTRICTIONS:
	These routines only generate the default filter and polarizer images.
	
 PROCEDURE:
	A loop is generated between the start and end dates, in which the
	routine MK_DAILY_MIN is called for each day.

 EXAMPLE:
	To make all the daily median images for the month of June, 1996 for
	C3:

		MAKE_ALL_MINDAYS,'c3','960601','960630'

 MODIFICATION HISTORY:
 	Written by:	RA Howard, 20 October, 1996
	9/20/99   NBR	Had to add QL to mk_daily_med call
	12/1999	  NBR	Make y2k compliant

	11/05/01 @(#)make_all_mindays.pro	1.1 LASCO IDL LIBRARY


MAKE_ALL_MONEXP $SSW/soho/lasco/idl/synoptic/make_all_monexp.pro
[Previous] [Next]
 NAME:
	MAKE_ALL_MONEXP

 PURPOSE:
	This procedure is an easy interface to the MONITOR_EXP procedure

 CATEGORY:
	LASCO SYNOPTIC

 CALLING SEQUENCE:
	MAKE_ALL_MONEXP,Stdte,Endte

 INPUTS:
	Stdte:	The starting date specified as a string: YYMMDD, eg. 960601
	Endte:	The ending date specified as a string: YYMMDD, eg, 960630
	Lz:	0 for QL, 1 for LZ

 OUTPUTS:
	This function generates images in $MON_EXP of the statistics for each
	image for each day specfied by the starting and ending dates for all
	three LASCO telescopes.

 PROCEDURE:
	A loop is generated between the start and end dates, in which the
	routine MONITOR_EXP is called for each day.

 CALLS: ***
	MONITOR_EXP, STR2UTC [1], STR2UTC [2], STR2UTC [3]
 EXAMPLE:
	To compute all of the image statistics for the month of June, 1996:

		MAKE_ALL_MONEXP,'960601','960630'

 MODIFICATION HISTORY:
 	Written by:	RA Howard, 22 May 1997

	@(#)make_all_monexp.pro	1.1 09/26/97 LASCO IDL LIBRARY


MAKE_ALL_MONTHS $SSW/soho/lasco/idl/synoptic/make_all_months.pro
[Previous] [Next]
 NAME:
	MAKE_ALL_MONTHS

 PURPOSE:
	This procedure is an easy interface to the MK_MONTHLY_MIN procedure

 CATEGORY:
	LASCO SYNOPTIC

 CALLING SEQUENCE:
	MAKE_ALL_MONTHS,Tel,Stdte,Endte

 INPUTS:
	Tel:	Telescope to be processed, (string), eg. 'C1','C2','C3'
	Stdte:	The starting date specified as a string: YYMMDD, eg. 960601
	Endte:	The ending date specified as a string: YYMMDD, eg, 960630

 OUTPUTS:
	"Monthly" minimum FITS files in $MONTHLY_IMAGES; filenames have dates 
	corresponding to 3m_clcl_xx'*'.fts
	Logs written in $MONTHLY_IMAGES/logs

 KEYWORDS:
	ALL_YEARS: Use daily images from multiple years.
	FWPW: String representing filter/polarizer combination; if not
		   set, defaults to 'clcl' for C3 and 'orcl' for C2
	INTERVAL: Number of days between minimum images; default is 7
	NDAYS: Number of days used to compute the min; default is 27
	MANUAL: Override automatic determination of days to use and filename
	TEST:	Write output in $MONTHLY_IMAGES/testdir
	DOREBIN:	Make output half size (2x2 binned)

 CALLS: ***
	MK_MONTHLY_MIN, STR2UTC [1], STR2UTC [2], STR2UTC [3], UTC2YYMMDD, YYMMDD2UTC
 RESTRICTIONS:
	
	
 PROCEDURE:
	IF MANUAL is not set, this procedure calls mk_monthly_min.pro for dates 
	corresponding to the included list of dates in between the starting and 
	ending dates. Gaps of more that 2 days are not spanned. IF MANUAL is set, 
	all days in the input interval (inclusive) which exist will be used to 
	compute the minimum image, and it will be named according to the midpoint 
	of the interval of days used.

 EXAMPLE:
	To make all the monthly minimum images for the month of June, 1996 for
	C3:

		MAKE_ALL_MONTHS,'c3','960601','960630'

 MODIFICATION HISTORY:
 	Written by:	RA Howard, 20 October, 1996
 	Mofified:	
		06 Oct 1997 SEP - Added ALL_YEARS flag
		1999/02/11  NBR - Added keywords FILT_POLR, DAYS_BETWN, DAYS_COMPT
		1999/12     NBR - Make y2k compliant
		   Jan 2000 NBR - Add NOREBIN keyword
		   Jun 2000 NBR - Add ROLL keyword
	25Feb02, NBR - Use 3m_clcl_xx'*'.fts for dates used.
	10Jul02, NBR - Add TEST keyword
	17Jul02, NBR - Change NOREBIN to DOREBIN
	28Jan04, NBR - default nbetween = 7

      %W% %H%   LASCO IDL LIBRARY


make_avg_daily_roll $SSW/soho/lasco/idl/data_anal/make_avg_daily_roll.pro
[Previous] [Next]
pro make_avg_daily_roll, rollsi, timesi, rollso, timeso, C3=c3, C2=c2, NYEARS=nyears

 Writes file with a median value for roll for each day in input file

 INPUTS
  rollsi	FLTARR	array of roll values
  timesi	UTC Structure ARR	utc date,time of each roll value

 KEYWORDS (1 is required)
  /C2	write c2 file
  /C3	write c3 file

  NYEARS = number of years included in inputs (default 1)

 %H, %W - IDL NRL LASCO Library

 CALLS:


MAKE_BROWSE [2] $SSW/soho/lasco/idl/reduce/make_browse.pro
[Previous] [Next]
 NAME:
		MAKE_BROWSE

 PURPOSE:
		Generates a "browse" image from the input image

 CATEGORY:
		REDUCTION

 CALLING SEQUENCE:
		Result = MAKE_BROWSE (Image, File_name)

 INPUTS:
		Image = Input 2D image
		File_name = String containing the File name 

 KEYWORD PARAMETERS:
		Maxpix = Maximum number of columns or rows of browse image. 
                        If maxpix of browse image is not defined then set to 
                        256
		Noblob = Controls the output
		Nokeep = Delete the JPEG file
		Qual   = starting quality indicator (<=100)

 OUTPUTS:
		Result = The JPEG compressed browse image is returned as the 
			 function result if noblob is not set.  If set the 
			 output is the browse image without compression

 CALLS: ***
	CONGRID [1], CONGRID [2], CONGRID [3], HIST_EQUAL
 CALLED BY:
	REDUCE_LEVEL_05
 PROCEDURE:

      The browse image is defined to be a byte array not larger than the 
      optional input parameter or a default size if it is not defined.  The 
      browse image is compressed using the JPEG algorithm.  The objective is 
      to create a representation of the full image which is less than 3 kbytes,
      in order to be able to quickly transfer the information electronically.
      The browse image can then be used to determine if the full image should 
      be transferred, which might take much longer to transfer.  The browse 
      image is not intended to be used for analysis purposes.

      browse = JPEG ( bytscl (congrid(image,maxpix,maxpix)))

 MODIFICATION HISTORY:
	Written  RA Howard, NRL, 4 Oct 1995
       Version 1
       Version 2  RAH  2/12/96   Changed order from 1 to 0
       Version 3  RAH  3/09/96   Write image to specific directory and 
                                 optionally save.  Scale image using log
       Version 4  RAH  3/29/96   Changed max size to 2000 bytes, qf=90
       Version 5  RAH  4/20/96   Removed "w" as second character in name
       Version 6  RAH  5/15/96   Corrected error if zeros everywhere
       Version 7  RAH  5/25/96   Use histogram equalization to scale image
       Version 8  RAH  10/21/96  Subtract background model
       Version 9  RAH  02/20/97  Correct case of constant image
	VERSION 10 NBR	02/01/02  Add /SH to SPAWN

       @(#)make_browse.pro	1.8 02/01/02 LASCO IDL LIBRARY


MAKE_DAILY_IMAGE $SSW/soho/lasco/idl/synoptic/make_daily_image.pro
[Previous] [Next]
 NAME:
	MAKE_DAILY_IMAGE

 PURPOSE:
	This function generates the daily image for the SOHO summary images.

 CATEGORY:
	LASCO_SYNOPTIC

 CALLING SEQUENCE:
	Result - MAKE_DAILY_IMAGE (Date, Tele)

 INPUTS:
	Date:	Date for which the image is desired, (YYMMDD)
		If undefined, then uses the current date
	Tele:	Telescope designator, string of 'c2','c3'

 KEYWORD PARAMETERS:
	TIME:	If set use the image closest to the specified time (HHMM)
		else uses the latest image
	FITS:	If set create a FITS file as output
	GIF:	If set create a GIF file as output
	LZ:	IF set, use level 0 data else use quick look data
	SCREEN:	If set, writes the resultant image to the current display
		else writes to the Z buffer
	ARCHIVE:	If set, write to the SOHO Summary file area

 OUTPUTS:
	Result:	Returns the byte-scaled image if successful, else returns -1.

 RESTRICTION:
	Only works for C2 and C3

 PROCEDURE:
	If the input parameter, date, is defined, then that date is used
	otherwise the current date is used.  Then reads in the img_hdr.txt 
	file corresponding to the desired date.
	Finds the image that is closest to the input time if set, else
	finds the latest image.  The standard synoptic type of image is
	selected (C2: orange/clear; C3: clear/clear).  The image shold
	be large enough and not have too many missing blocks.
	Then the image is scaled by the background model.

 CALLS: ***
	ADD_LASCO_LOGO, AWIN, DATATYPE [1], DATATYPE [2], DATATYPE [3], FILE_EXIST [2]
	FIND_CLOSEST, FXADDPAR [1], FXADDPAR [2], FXPAR [1], FXPAR [2], GAMMA_CT, GETBKGIMG
	GET_SEC_PIXEL, GET_SOLAR_RADIUS, GET_SUN_CENTER [1], GET_SUN_CENTER [2]
	GET_SUN_CENTER [3], GET_TIME_DELAY, GET_UTC, HEADFITS [1], HEADFITS [2]
	HEADFITS [3], IMG_HDR_TXT2STRUCT, LASCO_READFITS [1], LASCO_READFITS [2], LOADCT
	OFFSET_BIAS, REVERSE, STR2UTC [1], STR2UTC [2], STR2UTC [3], TVCIRCLE, UTC2STR
	UTC2TAI, UTC2YYMMDD, WRITEFITS [1], WRITEFITS [2], WRITE_GIF, YYMMDD2UTC
	file_exist [1], file_exist [3]
 EXAMPLE:
	cimg = MAKE_DAILY_IMAGE('960810','c3')

 MODIFICATION HISTORY:
 	Written by:	S.E. Paswaters, NRL, Dec 1997
	1/31/01, nbr - Change bkg model settings for C2

	%H% %W% LASCO IDL LIBRARY


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

 Name        : MAKE_DIFF_MPEG

 Purpose     : Make Diff MPEG from existing MVI files

 Use         : IDL>	MAKE_DIFF_MPEG, '020120', '020205'

 Inputs      :

 Optional Inputs:

 Outputs     :

 Keywords    :

 Comments    :

 CALLS: ***
	GETENV_SLASH, GIFS2DIFS, GIFS2MPEG, MVIHDR2STRUCT, READ_MVI, UTC2STR, UTC2YYMMDD
	YYMMDD2UTC, mvi2gif
 Side effects:

 Category    : Image Display.  Animation.

 Written     : Jake Wendt, NRL, February 2002

 Version     :	020401	jake	modified cleanup lines to remove files then dirs
		030117	jake	made working directories in /tmp
		030205	jake	switched search dirs for existing mvis
				to search monthdir first
		030715	jake	adding PNG keyword to pass on



	10/13/06 @(#)make_diff_mpeg.pro	1.11 : LASCO IDL LIBRARY


MAKE_FF $SSW/soho/sumer/idl/contrib/schuehle/tools/make_ff.pro
[Previous] [Next]
 PROJECT:
       SOHO - SUMER

 NAME:
       MAKE_FF

 PURPOSE: produce flat-field matrix from the raw 
          flat-field exposures

 CATEGORY:
       
 
 EXPLANATION:
       
 SYNTAX: 
       make_ff,'filespec'[,outpath = '']

 EXAMPLES:
       
 INPUTS:
       filespec - files to be processed
		(e.g., 'calibration:[flight.ffraw]*.*')
       outpath  - directory where output will be stored

 OPTIONAL INPUTS: 
       None.

 OUTPUTS:
       processed files

 OPTIONAL OUTPUTS:
       None.

 KEYWORDS: 
       None.

 CALLS: ***
	BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], CONCAT_DIR [1], CONCAT_DIR [2]
	CONCAT_DIR [3], DETECTOR, PIXPOS, SLITNUM, break_file [4], concat_dir [4]
 COMMON:
       None.

 RESTRICTIONS: 
       Expects data files that are decompressed and reversed.
       unless 'noreverse' is specified

 SIDE EFFECTS:
       None.

 HISTORY:
       Version 1, February, 2003, Udo Schuehle, MPAE Lindau. Written
         
 CONTACT:
       Udo Schuehle, MPAE Lindau (schuehle@linmpi.mpg.de)


MAKE_FITS_HDR $SSW/soho/lasco/idl/reduce/make_fits_hdr.pro
[Previous] [Next]
 NAME:				MAKE_FITS_HDR

 PURPOSE:			Generate a FITS header for Level 0.5 images

 CATEGORY:			REDUCTION

 CALLING SEQUENCE:		Result = MAKE_FITS_HDR (h,img)

 INPUTS:			H   = Header structure
				Img = Image

 OUTPUTS:			Result = FITS header

 CALLS: ***
	CNVRT_FILTER, CNVRT_IP, CNVRT_LP, CNVRT_POLAR, CNVRT_PORT, FXADDPAR [1]
	FXADDPAR [2], FXPAR [1], FXPAR [2], OFFSET_BIAS, STR2UTC [1], STR2UTC [2]
	STR2UTC [3], SUBTENSE, UTC2TAI
 CALLED BY:
	REDUCE_LEVEL_05
 PROCEDURE:			Makes calls to FXADDPAR

 MODIFICATION HISTORY:		Written RA Howard, NRL, 31 Oct 1995
   Version 2  rah 16 Nov 1995   Converted filter/polarizer/lp_num/readport
   Version 3  rah 11 Dec 1995   Corrected tag name of polarizer & eit/detector
   Version 4  rah 18 Jan 1996   Corrected exposure time to be entire exp & 
                                added subsection times
   Version 5  rah 15 Feb 1996   Corrected DATE-OBS/TIME-OBS
   Version 6  rah 22 Feb 1996   Corrected FP WL Keywords to be 8 characters
   Version 7  rah 18 Mar 1996   Added KW for LEB summing, and corrected exptime
   Version 8  rah 19 Mar 1996   Corrected exposure time for dark and continuous images
   Version 9  rah 27 Mar 1996   Corrected lp_num structure tag
   Version 10 rah 03 Apr 1996   Modified exposure mid point names
   Version 11 rah 05 Apr 1996   Compute exposure time in real
   Version 12 sep 17 Jul 1996   Modified to work with new LEB header (obev145+)
                                units on exp[1,2,3], version, order
   Version 13 rah 22 Jul 1996   Increased WAVELENG to double precision
   Version 14 rah 01 Aug 1996   Modified exptime calc for new OBE version
                                Increased FP_WL* to double precision
   Version 15 sep 18 Jun 1997   Changed call for new OFFSET_BIAS()
   Version 16 rah 18 Jul 1997   BITPIX set to reflect the image data type

 @(#)make_fits_hdr.pro	1.10 07/24/97 :NRL Solar Physics


MAKE_GIFS $SSW/soho/lasco/idl/inout/make_gifs.pro
[Previous] [Next]
 Project     : SOHO - LASCO/EIT
                   
 Name        : MAKE_GIFS
               
 Purpose     : Write GIF images from list.
               
 Use         : IDL> MAKE_GIFS, list

 Inputs      :	list	STRARR	List of FITS files

 Keywords    : SAVEDIR STRING	Directory where images are to be saved. Default is '.'.
		NOLABEL		When set, omits time and logo on images (c3 only)
		PICT	Save as PICT files
		VIDEO	Save as 640x480 video size
		TIFF	Save as TIFF files
		PAN	Rebin image (ex: Pan=0.5)
		BW	Use B&W color table
		NOLOGO	Omit logo only (c3 only)

 Calls       : ***
	CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], CONGRID [1], CONGRID [2]
	CONGRID [3], DATATYPE [1], DATATYPE [2], DATATYPE [3], GAMMA_CT, GIF2JPG24
	LASCO_READFITS [1], LASCO_READFITS [2], LOADCT, MAKE_IMAGE_C2, MAKE_IMAGE_C3
	MAKE_IMAGE_EIT, RTC1IMG, STR2UTC [1], STR2UTC [2], STR2UTC [3], TRIM, UTC2YYMMDD
	WRITE_GIF, WRITE_PICT, concat_dir [4], w256 [1], w256 [2]
 Side effects: None.
               
 Category    : Image Display.  Animation.
               
 Written     : Nathan Rich, Jan 2000.  From rtmvi.pro
               
 Changes     :
	5/9/2000, NBR, Add PICT option
	10/27/00, NBR, Auto create pictprefx
	 3/12/01, nbr, Add TIFF option
	 5/ 2/01, nbr, Add /sh to spawn; save picts in SAVEDIR
	 5/22/01, nbr, Add BW keyword, NOLABEL for C3
	 4/ 8/02, nbr, Implement eit_prep
	 9/20/02, nbr, Change output filename for TIFF and GIF; add NOLOGO and NOLABEL for C2


 10/01/02 @(#)make_gifs.pro	1.4 :LASCO IDL LIBRARY


MAKE_IMAGE_EIT img hdr $SSW/soho/lasco/idl/movie/make_image_eit.pro
[Previous] [Next]
FUNCTION: MAKE_IMAGE_EIT, img, hdr, $
	FIXGAPS=fixgaps, $
	NOLABEL=nolabel, $
	NOBYTESCL=nobytescl, $
	FILENAME=filename, $
	USEEITPREP=useeitprep, $
	RDIFF=rdiff


 Returns scaled EIT image with time label and sets color table for viewing
 image.

 INPUTS:
  img		512x512 or 1024x1024 EIT image array
  hdr		LASCO header structure

 OUTPUTS:
  1024x1024 BYTARR

 KEYWORDS:
  FIXGAPS	If set, replace gaps with previous image (in common block)
  NOLABEL	If set, do not put on time label
  NOBYTESCL	If set, floating point array with no time label
  FILENAME	Set to full filename if image to be read here
  USEEITPREP	Set if wanting to use EIT_PREP, must also use FILENAME
  RDIFF	Set equal to variable which will contain scaled running difference image

 CALLS: ***
	CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], DATATYPE [1], DATATYPE [2]
	DATATYPE [3], EIT_PREP, LASCO_FITSHDR2STRUCT, MAKE_IMAGE_EIT, MAXMIN, OFFSET_BIAS
	REDUCE_STD_SIZE, RTMVIXY, STRUCT2FITSHDR, concat_dir [4], eit_degrid, eit_flat
	eit_norm_response [1], eit_norm_response [2]
 SIDE EFFECTS:
  changes color table

 MODS:

 1999/05/21	N B Rich	Add FIXGAPS keyword, common block
 1999/05/26	N B Rich	Move case statement; make all images 1024x1024
 1999/11/15 	N B Rich	Adapt for Mercury transit images (horiz. strips)
 1999/12	N B Rich	Check for allowable nz
 2000/01	N B Rich	Add NOLABEL keyword
 2000/09/08	N B Rich	Add EIT_NORM_RESPONSE and change bmin/bmax settings
 2000/09/22	n b rich	Divide by exptime and sumcol^2
 2001/01/29    n.b.rich	Change bmin/bmax after updating SSW library
 2001/02/09	n.b.rich	Move reduce_std_size and remove box_refn
 2001/02/12	n.b.rich	Add NOBYTESCL option
 2001.03.01	n.b.rich	Reset bmin,bmax and colortables for new flat field;
				fixed hsize
 2001.03.02	n.b.rich	Fix ind00 again and fix call to EIT_DEGRID
 2001.03.06	n.b.rich	Do ind00 before reduce_std_size
 2001.04.11  	n.b.rich	Add default box_avg values

 20010516		jake	Added autoscaling of images based on median to help
				correct for binned image problems.  Corrected indentations
				on all code.
 2001.06.07	n.b.rich	Omit /ORIG from EIT_DEGRID call for SSW
 20010724		jake	began incorporation of EIT_PREP
 2002.04.08	n.b.rich	Change location of .dat files
 2002.08.05	n.b.rich	Change lasco_hdr2struct to lasco_fitshdr2struct
	030723		jake		rotate image if CROTA1 = 180
 2003.12.22, nbr - Add rdiff keyword

  12/23/03 @(#)make_image_eit.pro	1.11 - IDL NRL LASCO Library


MAKE_INDEX $SSW/soho/lasco/idl/reduce/make_index.pro
[Previous] [Next]
 Project     : SOHO - LASCO/EIT

 Name        :	MAKE_INDEX

 Purpose     :

 Use         : IDL>

 Inputs      :

 Optional Inputs:

 Outputs     :

 Keywords    :

 Comments    :

 CALLS: ***
	OBT2TAI, READ_TM_PACKET
 Side effects:

 Category    :

 Written     :

 Version     :

 Modification:	020606 Jake Changed End of Repeat loop to check numpckts as well
	03.10.08, nbr - change name of output file

 @(#)make_index.pro	1.5 10/08/03 :LASCO IDL LIBRARY


make_mpeg $SSW/soho/lasco/idl/display/make_mpeg.pro
[Previous] [Next]
 MAKE_MPEG

 Usage:
	make_mpeg, filename[, destdir]

 Arguments:
	filename string	input	The name of the MPEG file (if not
				given, then use lasco.mpg).
	destdir	string	input	The name of the directory in which to
				put the mpeg file. (If not given then
				use: ${LASCO_WORK}/${USER}/gif)

 Keywords:
	times	int	input	If set, then put the time on the
				frames before dumping them. (1 -
				bottom left, 2 - bottom right, 3 - top
                                                left, 4 - bottom right)
	scratchdir string in	The directory to which to write the gif
				files (default = destdir)
	table	int	input	The colour table to use
	range	float	input	The range of image values to display
				(default min & max of first image)
	ncolours int	input	The number of colours to use in each
				frame (Default !d.table_size) N.B. if
				this key is set, then TABLE must be
				set as well.
	names	int	input	If set, put the names of the input
				files on the files before dumping them
				(same code as time and note it's not
				clever enough to check if they are
				going on top of each other)
	rescale	int	input	The rescaling factor (-n = increase by
				2^n, +n = decrease by 2^n)
 Method:
	Saves the selected images as PPM (Portable PixMap) format
	files and then spawns "mpeg_encode" to convert them to an MPEG
	file (the PPM files are deleted after the operation)

 CALLED BY:
	mpeg_wid
 Restrictions:
	1) Can handle a maximum of 1000 frames
	2) Must have MPEG_ENCODE available.
	3) Any prexisting files called Lnnn.ppm or MPEG.PARAM will be
		overwritten.

 History:
	Original: 23/7/96; SJT
	Change from GIF to PPM: 25/7/96; SJT


MAKE_STR [2] $SSW/soho/mdi/idl_old/gen/ys_util/make_str.pro
[Previous] [Next]
 NAME:
	MAKE_STR 

 PURPOSE:
	Control dynamic structure building - avoids collision of
	names which might result if different modules used the same
	structure names and had different numbber/types of tag fields 

 CALLING SEQUENCE:
	user_value= MAKE_STR(ustr_string [,str_name=str_name, /NOEXEC]

 INPUTS:
	USTR_STRING - string of form '{dummy,T1:intarr(10), T2:oL...}'

 OUTPUTS:
	return value  = structure defined by USTR_STRING

 OPTIONAL KEYWORD PARAMETERS:
	STR_NAME - (Output) Structure name created
	NOEXEC - If set, a unique name is allocated but no structure
		 is created - in this case, the return value is the
		 allocated name (string variable), not the structure
		 
 COMMON BLOCKS;
       MAKE_STR_PRIVATE - used to generate unique names (via counter)
       MAKE_STR_BLK  - track previously created structures
       MAKE_STR_BLK1 - flag to enable/disable structure exist checks

 FILE I/O:
	NONE

 METHOD
 	uses a common block to store counter which is incremented on
	each call and incorporated into the structrure name.  Uses the
	IDL EXECUTE statement to dynamically create the structure

 CALLS: ***
	STR2ARR [1], STR2ARR [2], str_checks [1], str_checks [2], strstat [1], strstat [2]
 CALLED BY:
	CALL_TRIWARP, CkTimeNkey, DO_TEEM, GT_CDS_QL, MERGE_STRUCT, MK_BSC_STR [1]
	MK_BSC_STR [2], MkFnMapMake Filename Map, Multi_draw [1], Multi_draw [2]
	RD_GEN [1], RD_GEN [2], READ_SPFDGRS, READ_SPFDHXS, SMK_FULLDET, SS2DSET, SUM_GAUSSB
	WRT_GEN [1], WRT_GEN [2], aRCHsCRPT, build_str [1], build_str [2], ccd_sunc [1]
	ccd_sunc [2], extract_val, fidmap, file_info [1], file_info [2], filter_os1
	fitshead2struct, genx_head [1], genx_head [2], get1doc [1], get1doc [2]
	get1hk_info [1], get1hk_info [2], get_elemabun [1], get_elemabun [2]
	get_hk_info [1], get_hk_info [2], getmenu [1], getmenu [2], go_get_sirius
	input_time [1], input_time [2], mkdirst, nn_rd2_sxt_noaa, nn_rd3_sxt_noaa
	nn_rd_sxt_noaa, rd_rasm, rd_rdb [1], rd_rdb [2], rd_sumer [1], rd_sumer [2]
	rd_sumer_genx, save_data [1], save_data [2], sparse [1], sparse [2], sparse [3]
	str_merge [1], str_merge [2], str_subset, strpair2struct, struct2ms [1]
	struct2ms [2], sxt_uniq [1], table2struct, tar_size, tim2intstr [1]
	tim2intstr [2], timeavg [1], timeavg [2], tr_decode_head [1], tr_decode_head [2]
	trace_bin_struct, trace_dph2struct [1], url_decode, wdefroi [3], wdefroi [4]
	wfilpck, wmkkey [1], wmkkey [2], xspr [1], xspr [2], xstepper [1], xstepper [2]
 MODIFICATION HISTORY:
	Version 1 -   SLF, 3/5/91
	Version 1.1 - SLF, 10/23/91 - added call to strstat to check for
				      structure existance
       Version 2.0 - slf, 15-jan-93  - added 2nd common block to track
				        defined structures
		      slf, 18-jan-93  - add string compress
		      slf,  1-feb-93  - kludge for strings large than 512
                     slf,  3-feb-93  add make_str_blk for 
		      slf,  7-feb-93  improved feb 1 upgrades
		      slf, 26-mar-93  use systime + counter for str names

  


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

 PURPOSE:
	This procedure makes a series of gif files from a movie, 
	stored in mvi format for putting onto a VHS tape

 CATEGORY:
	Movie

 CALLING SEQUENCE:
	MAKE_VHS_GIF,Gif_file


 INPUTS:
	Gif_file:	A string giving the root file name of the gifs:
			It should be no more than 8 characters.  It is
			suggested that the name should end in gif, leaving
			5 characters for the useful information.  The
			files will then have an extension of 001, 002, etc.
			A path can be included at the beginning of the string.

 OPTIONAL INPUTS:
	Movie_file:	The name of the .mvi file.  If this is not present
			you will be allowed to select the file.
	
 KEYWORD PARAMETERS:
	Title:		An optional title to be added to the top of the image.

 OUTPUTS:
	A series of gif files will be written to disk.

 CALLS: ***
	BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], CONGRID [1], CONGRID [2]
	CONGRID [3], DATATYPE [1], DATATYPE [2], DATATYPE [3], PICKFILE, WRITE_GIF
	break_file [4]
 EXAMPLE:
	To create a series of gif files:

		MAKE_VHS_GIF,'c3j96gif',title='SOHO/LASCO  3.7 - 32 Rs'

 MODIFICATION HISTORY:
 	Written by:	R.A. Howard, NRL, 9/25/96

	@(#)make_vhs_gif.pro	1.2 09/12/97 LASCO IDL LIBRARY


make_views $SSW/soho/mdi/idl_old/gen/ys_sxt_widget/make_views.pro
[Previous] [Next]
   Name: make_views

   Purpose: make multiple multi window viewports 
   
   Inputs: rmap - roadmap vector

    Outputs: function returns widget ids of top level multi_draw
	     viewports

   Catagory: X-display and X-manage
 CALLS:
 CALLED BY
	sda_look [1]


MAKE_WIDG_EV [1] $SSW/soho/mdi/idl_old/gen/ys_util/yo_tape_widg.pro
[Previous] [Next]

 NAME: 
 	MAKE_WIDG_EV

 PURPOSE:
       The event handler for YO_TAPE_WIDG

 CATEGORY:
       YOHKOH tape

 CALLING SEQUENCE:
       XMANAGER, 'YO_TAPE_WIDG', BASE, EVENT_HANDLER='MAKE_WIDG_EV'

 CALLED BY:
       YO_TAPE_WIDG

 CALLS TO:
	none

 INPUTS:
       none explicit, only through common and UVALUE
		UVALUE=BUTT	contains the widget ID for the buttons

 OPTIONAL INPUTS:
	none

 OUTPUTS:
       none explicit, only through commons

 OPTIONAL OUTPUTS:
	none

 CALLS: ***
	XMANAGER, YO_TAPE_WIDG [2], YO_TAPE_WIDG [4], yo_tape_widg [1], yo_tape_widg [3]
 CALLED BY:
	YO_TAPE_WIDG [2], YO_TAPE_WIDG [4], yo_tape_widg [1], yo_tape_widg [3]
 COMMON BLOCKS:
	COMMON EVENT,  $            	; needed for the event handler
			INDEX, $	; record the status of the buttons	
			IST,   $        ; remember the last selected button
			IEN,   $	; remember the second to last
			EXCLUS		; if set, simulate exclusive buttons
	
 SIDE EFFECTS:
	none

 RESTRICTIONS:
	none

 PROCEDURE:
	Handle the button events as they are clicked

 MODIFICATION HISTORY:
       OCT 93 - Elaine Einfalt (HSTX)


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

   Purpose: hide/show map/unmap sensitize/desensitize widgets

   Input Parameters:
      ids - widget id(s) to map/show - longword vector or scaler
      show     - vector or scaler show parameter
      map=map	- vector or scaler map parameter 
      sensitive=sensitive - vector or scaler sensitive parameter 
      All parameters default to OFF (unmap, hide, desensitize)

 CALLED BY:
	get_hk_mnem, goes_widget, show_pix [1], show_pix [2], show_pix_event [1]
	show_pix_event [2], show_pix_event [3], xanal_emi, xcheckip, xdisp_fits
	xdisp_sci5k, xdisp_tfr, xdisp_trace [1], xdisp_trace2, xdisp_trace3, xhkplot
	xread_hist, xsearch_obs, xset_chain [1], xset_chain [2], xspr [1], xspr [2]
	xstep_uevent [1], xstep_uevent [2], xstepper [1], xstepper [2], xstepper_event
	xsw2tree, xsw2tree_event, xswlist [2], xsxt_prep_event
   History: slf, 7/91
   	     slf, 2-8-92 - added sensitive parameter
			   allow vectors for parameters
	     slf, 31-oct-93 - added bad_id=destroyed


MARK_ON_IMAGE $SSW/soho/sumer/idl/atest/mark_on_image.pro
[Previous] [Next]

 NAME :
      MARK_ON_IMAGE
 PURPOSE :
      Removes an old crosshair from an image and mark a new one on it
 CALLING SEQUENCE:
      MARK_ON_IMAGE,  xpos_dev,  ypos_dev,  $
        color=color, xsize=xsize, ysize=ysize, $
        mark_only=mark_only, remove_only=remove_only  
 OPTIONAL INPUTS:
       XPOS_DEV, YPOS_DEV      mark position in device units
 KEYWORDS : 
       COLOR    the color index of mark (optional input)
       xsize    crosshair horizontal size  (optional input, def=20)
       ysize    crosshair vertical size(optional input, def=20)
       thick    crosshair thickness(optional input, def=1)
       mark_only  if set, only a new crosshair is marked on the image
       remove_only  if set, only the old crosshair is removed.
       restore    if set, the old crosshair is restored.
 CALLED BY:
	SUMER_DISPLAY_IMA, SUMER_TOOL_MAIN_EVENT, XGAUSSFIT, XRASTER [1], XRASTER [2]
 EXAMPLE :
        TVSCL,  DIST(200)
        MARK_ON_IMAGE, 70, 80, /mark_only
        MARK_ON_IMAGE, 70, 130, /mark_only
        MARK_ON_IMAGE, 120, 150
        MARK_ON_IMAGE, /remove_only   

 COMMON BLOCKS:
       mark_on_image_block  
 MODIFICATION HISTORY
       March 1997 Jongchul Chae
       April 1997  J Chae   Introduce keyword RESTORE


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

   Purpose: highlight features on plot (default is open crosshair)

   Input Parameters:
      dpix - distance from marked poition to start highlinght (def=10 pix)
	      (for /box, dpix=box half-width, for /circle, dpix= circle radius)

      npix - length of highlight from dpix (only used for open crosshair)

   Keyword Parameters:
      box    - if set, draw a box of diameter=2*dpix
      circle - if set, draw a circle of radius=dpix
      plus   - if set, draw a plussign of length=2*dpix

   Calling Sequence:
      markplot [,dpix [,npix , /uselast , color=color, thick=thick, $
				/box , /circle  ]]

   Calling Examples:
      markplot                      ; open crosshair at cursor
      markplot,15,/box,thick=2      ; 15x15 box at cursor.
      markplot,5, /plus             ; 10 pix long plussign at cursor
      for i=5,55,10 do markplot,i,/uselast,/circle  ; uselast & circle
      for i=5,55,10 do markplot,i,/uselast,/box     ; demo uselast & box

   History:
      10-Nov-1993 (SLF)
       2-nov-1994 (SLF) add keyword inheritance - add PLUS keyword, document

   Restrictions:
      Uses keyword inheritance which was not introduced until IDL V3.2.


mask_out $SSW/soho/lasco/idl/exposure/mask_out.pro
[Previous] [Next]
 MASK_OUT
	Determine missing telemetry blocks.

 Usage:
	mask=mask_out(img,hdr)

 Return value:
	mask	byte	A 2-d byte array with the same size as the
			input image with zeroes in the telemetry holes
			and ones elsewhere.

 Arguments:
	img	any	input	The image to be analysed
	hdr	string	input	The FITS header associated with the
				image.

 Method:
	The size of a telemetry block in the image is determined from
	the SUMCOL or LEBYSUM, R?COL and the actual image size. The image is
	rebinned to a 4-d array its minimum value is subtracted and
	the resulting array is summed over the telemetry
	blocks. Zeroes in the summed array are assumed to be missing
	blocks. This is justified as (a) real data are +ve definite
	and (b) the probability of getting the whole of a telemetry
	block having the same value if there are real data present is
	vanishingly small. This algorithm has the advantage of not
	being dependent on whether the exposures have been normalized
	or whether the camera bias has been subtracted.
 CALLS:
 CALLED BY
	las_exp_norm, mk_stdim, mk_stdim_list


MASKE $SSW/soho/lasco/idl/display/maske.pro
[Previous] [Next]
 NAME:  
	MASKE

 PURPOSE:
	Performs a unsharp mask treatment with an image

 CATEGORY:
	PICO

 CALLING SEQUENCE:
	result = MASKE(image, level, region)

 INPUTS:
	image:  The two dimensional array containing the
		image to be masked.
	level:  An integer specifying the level at which
		the image should be treated. See procedure
		for more explanations
	region: The size of the averaging region for the
		smoothed image. See below.

       If both level and region are NOT set, a default 
       value of 3,8 is supposed.

 OPTIONAL INPUTS:
	None

 KEYWORD PARAMETERS:
	MEDIAN: If set, the median filter is used to smooth
		the image instead of a simple averaging
		mean value filter
	NOAUTOLIMIT: The image will not be limited to the 
		same levels as the input image.

 OUTPUTS:
	result: The resulting image, treated by the unsharp
		mask

 OPTIONAL OUTPUTS:
	None

 EXAMPLE:
	To treat an image with a 8x8 unsharp mask at a level
	of 3 type

	result=MASKE(image,3,8)
	
 CALLS: ***
	RECONVERT [1], RECONVERT [2]
 COMMON BLOCKS:
	None

 SIDE EFFECTS:
	Unknown

 RESTRICTIONS:
	None

 PROCEDURE:
	From the original image, multiplied by (level+1), 
	the original image multiplied by level and
	smoothed over region x region pixels is subtracted.
	By default the IDL SMOOTH(image,region) function is 
	used. The MEDIAN functioon can be used by setting
	the MEDIAN keyword.

 MODIFICATION HISTORY:
	Alexander Epple, AUG-1994


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

 Name        :	
	MATCH
 Purpose     :	
	Routine to match values in two vectors.
 Explanation :	
	Routine to match values in two vectors.
 Use         :	
	match, a, b, suba, subb

 CALLED BY:
	COPY_STRUCT [1], COPY_STRUCT [2], COPY_STRUCT [3], COPY_STRUCT_INX
	DBFIND_SORT [1], DBFIND_SORT [2], DBFIND_SORT [3], GET_BSA_ANS [1]
	GET_BSA_ANS [2], GET_PLAN_FUNCT, MATCH_STRUCT, MOVIE_MAP, MRDFITS [1], MRDFITS [2]
	SHOW_SYNOP__DEFINE, SMK_FULLDET, SSEL_DATCOL, hsi_getflare, hsi_ui_flarecat
	plot_bda, trace_movies_prioritize [1], trace_movies_prioritize [2]
	EXAMPLE: If a = [3,5,7,9,11]   & b = [5,6,7,8,9,10]
	then 
		IDL> match, a, b, suba, subb, COUNT = count

	will give suba = [1,2,3], subb = [0,2,4],  COUNT = 3
	and       suba(a) = subb(b) = [5,7,9]

 Inputs      :	
	a,b - two vectors to match elements

 Opt. Inputs :	None.

 Outputs     :	
	suba - subscripts of elements in vector a with a match
		in vector b
	subb - subscripts of the positions of the elements in
		vector b with matchs in vector a.

	suba and subb are ordered such that a(suba) equals b(subb)

 Opt. Outputs:	None.

 Keywords    :	
	COUNT - set to the number of matches, integer scalar

 Calls       :	None.
 Common      :	None.

 Restrictions:	
	a and b should not have duplicate values within them.
	You can use rem_dup function to remove duplicate values
	in a vector

 Side effects:	
	!ERR is set to the number of matches, can be used instead of COUNT

 Category    :	Utilities, Array

 Prev. Hist. :	
	D. Lindler  Mar. 1986.
	Fixed "indgen" call for very large arrays   W. Landsman  Sep 1991
	Added COUNT keyword    W. Landsman   Sep. 1992

 Written     :	D. Lindler, GSFC/HRS, March 1986

 Modified    :	Version 1, William Thompson, GSFC, 29 March 1994
			Incorporated into CDS library

 Version     :	Version 1, 29 March 1994


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

	Purpose: compute the maximum image size given the size of the
		image and display.

	Calling Sequence:
		maxspect, ximg, yimg, xwin, ywin, nxsize, nysize

	where,
	
	INPUT:
		ximg	is the image size in x-dim.
		yimg	is the image size in y-dim.
		xwin	is the window size in x-dim.
		ywin	is the window size in y-dim.
	OUTPUT:
		nxsize	is the new maximum size image with same aspect ratio
		nysize  is the new maximum size image with same aspect ratio

 CALLED BY:
	mk_movie [1], mk_movie [2], mk_ptv_movie
	History:
		written 30-Jun-94, gal


MB2STRMAP $SSW/soho/lasco/idl/reduce/mb2str/mb2strmap.pro
[Previous] [Next]
 PROJET:
	SOHO - LASCO

 NAME:
	MB2STRMAP

 PURPOSE:
  Convert a missing block image map to a 'string map'

 CATEGORY:
  missing blocks

 CALLING SEQUENCE:


 INPUTS:

 OUTPUTS:


 OPTIONAL OUTPUTS:

 KEYWORD INPUT:


 CALLS: ***
	INTTOB32
 CALLED BY:
	FIND_MISS_BLOCKS
 MODIFICATION HISTORY:
	V1.0 Writen by A.Thernisien on 18/09/2001
 CVSLOG:
  $Log: mb2strmap.pro,v $
  Revision 1.2  2002/07/11 07:24:17  arnaud
  Insertion of the Log in each header



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

 NAME:
       MC2POS()

 PURPOSE: 
       Return Position of MC2

 CATEGORY:
       
 
 EXPLANATION:
       
 SYNTAX: 
       Result = mc2pos()

 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)


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

 NAME:
       MC3POS()

 PURPOSE: 
       Return Position of MC3

 CATEGORY:
       
 
 EXPLANATION:
       
 SYNTAX: 
       Result = mc3pos()

 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)


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

 NAME:
       MC4POS()

 PURPOSE: 
       Return Position of MC4

 CATEGORY:
       
 
 EXPLANATION:
       
 SYNTAX: 
       Result = mc4pos()

 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)


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

 NAME:
       MC6POS()

 PURPOSE: 
       Return Position of MC6

 CATEGORY:
       
 
 EXPLANATION:
       
 SYNTAX: 
       Result = mc6pos()

 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)


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

 NAME:
       MC8POS()

 PURPOSE: 
       Return Position of MC8

 CATEGORY:
       
 
 EXPLANATION:
       
 SYNTAX: 
       Result = mc8pos()

 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)


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

 NAME:
       MCERR()

 PURPOSE: 
       Return Error of Motor Controler

 CATEGORY:
       
 
 EXPLANATION:
       
 SYNTAX: 
       Result = mcerr()

 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)


MCGETERAMVALUE $SSW/soho/sumer/idl/newtki/tki/mcgeteramvalue.pro
[Previous] [Next]
 PROJECT:
       SOHO - SUMER

 NAME:
       MCGETERAMVALUE()

 PURPOSE: 
       Internal Dummy Check for MCGETERAMVALUE

 CATEGORY:
       
 
 EXPLANATION:
       
 SYNTAX: 
       Result = mcgeteramvalue()

 CALLED BY:
	TKI_DO_MC_CMD
 EXAMPLES:
       
 INPUTS:
       dev - MC-Device of SUMER [0...6]

 OPTIONAL INPUTS: 
       None.

 OUTPUTS:
       None.

 OPTIONAL OUTPUTS:
       None.

 KEYWORDS: 
       None.

 CALLS: ***
	TKI_MESSAGE
 COMMON:
       None.

 RESTRICTIONS: 
       None.

 SIDE EFFECTS:
       None.

 HISTORY:
       Version 1, September 12, 1996, Dietmar Germerott, MAPE Lindau. Written

 CONTACT:
       Dietmar Germerott, MAPE Lindau (germerott@linax1.mpae.gwdg.de)


MCGETERR $SSW/soho/sumer/idl/newtki/tki/mcgeterr.pro
[Previous] [Next]
 PROJECT:
       SOHO - SUMER

 NAME:
       MCGETERR()

 PURPOSE: 
       Internal Dummy Check for MCGETERR

 CATEGORY:
       
 
 EXPLANATION:
       
 SYNTAX: 
       Result = mcgeterr()

 CALLED BY:
	TKI_DO_MC_CMD
 EXAMPLES:
       
 INPUTS:
       dev - MC-Device of SUMER [0...6]

 OPTIONAL INPUTS: 
       None.

 OUTPUTS:
       None.

 OPTIONAL OUTPUTS:
       None.

 KEYWORDS: 
       None.

 CALLS: ***
	TKI_MESSAGE
 COMMON:
       None.

 RESTRICTIONS: 
       None.

 SIDE EFFECTS:
       None.

 HISTORY:
       Version 1, September 12, 1996, Dietmar Germerott, MAPE Lindau. Written

 CONTACT:
       Dietmar Germerott, MAPE Lindau (germerott@linax1.mpae.gwdg.de)


MCGETFREQ $SSW/soho/sumer/idl/newtki/tki/mcgetfreq.pro
[Previous] [Next]
 PROJECT:
       SOHO - SUMER

 NAME:
       MCGETFREQ()

 PURPOSE: 
       Internal Dummy Check for MCGETFREQ

 CATEGORY:
       
 
 EXPLANATION:
       
 SYNTAX: 
       Result = mcgetfreq()

 CALLED BY:
	TKI_DO_MC_CMD
 EXAMPLES:
       
 INPUTS:
       dev - MC-Device of SUMER [0...6]

 OPTIONAL INPUTS: 
       None.

 OUTPUTS:
       None.

 OPTIONAL OUTPUTS:
       None.

 KEYWORDS: 
       None.

 CALLS: ***
	TKI_MESSAGE
 COMMON:
       None.

 RESTRICTIONS: 
       None.

 SIDE EFFECTS:
       None.

 HISTORY:
       Version 1, September 13, 1996, Dietmar Germerott, MAPE Lindau. Written

 CONTACT:
       Dietmar Germerott, MAPE Lindau (germerott@linax1.mpae.gwdg.de)


MCGETIRAMVALUE $SSW/soho/sumer/idl/newtki/tki/mcgetiramvalue.pro
[Previous] [Next]
 PROJECT:
       SOHO - SUMER

 NAME:
       MCGETIRAMVALUE()

 PURPOSE: 
       Internal Dummy Check for MCGETIRAMVALUE

 CATEGORY:
       
 
 EXPLANATION:
       
 SYNTAX: 
       Result = mcgetiramvalue()

 CALLED BY:
	TKI_DO_MC_CMD
 EXAMPLES:
       
 INPUTS:
       dev - MC-Device of SUMER [0...6]

 OPTIONAL INPUTS: 
       None.

 OUTPUTS:
       None.

 OPTIONAL OUTPUTS:
       None.

 KEYWORDS: 
       None.

 CALLS: ***
	TKI_MESSAGE
 COMMON:
       None.

 RESTRICTIONS: 
       None.

 SIDE EFFECTS:
       None.

 HISTORY:
       Version 1, September 13, 1996, Dietmar Germerott, MAPE Lindau. Written

 CONTACT:
       Dietmar Germerott, MAPE Lindau (germerott@linax1.mpae.gwdg.de)


MCGETSTEPS $SSW/soho/sumer/idl/newtki/tki/mcgetsteps.pro
[Previous] [Next]
 PROJECT:
       SOHO - SUMER

 NAME:
       MCGETSTEPS()

 PURPOSE: 
       Internal Dummy Check for MCGETSTEPS

 CATEGORY:
       
 
 EXPLANATION:
       
 SYNTAX: 
       Result = mcgetsteps()

 CALLED BY:
	TKI_DO_MC_CMD
 EXAMPLES:
       
 INPUTS:
       dev - MC-Device of SUMER [0...6]

 OPTIONAL INPUTS: 
       None.

 OUTPUTS:
       None.

 OPTIONAL OUTPUTS:
       None.

 KEYWORDS: 
       None.

 CALLS: ***
	TKI_MESSAGE
 COMMON:
       None.

 RESTRICTIONS: 
       None.

 SIDE EFFECTS:
       None.

 HISTORY:
       Version 1, September 13, 1996, Dietmar Germerott, MAPE Lindau. Written

 CONTACT:
       Dietmar Germerott, MAPE Lindau (germerott@linax1.mpae.gwdg.de)


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

 NAME:
       MCPI()

 PURPOSE: 
       Return Value of MCP-Current

 CATEGORY:
       
 
 EXPLANATION:
       
 SYNTAX: 
       Result = mcpi()

 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)


MCPOWER $SSW/soho/sumer/idl/newtki/tki/mcpower.pro
[Previous] [Next]
 PROJECT:
       SOHO - SUMER

 NAME:
       MCPOWER()

 PURPOSE: 
       Internal Dummy Check for MCPOWER

 CATEGORY:
       
 
 EXPLANATION:
       
 SYNTAX: 
       Result = mcpower()

 EXAMPLES:
       
 INPUTS:
       dev - device number (0 - 6)
       func - 0 - off
              1 - lvdt & adc on
              2 - lvdt & adc off
              3 - adc on

 OPTIONAL INPUTS: 
       None.

 OUTPUTS:
       None.

 OPTIONAL OUTPUTS:
       None.

 KEYWORDS: 
       None.

 CALLS: ***
	TKI_MESSAGE
 COMMON:
       None.

 RESTRICTIONS: 
       None.

 SIDE EFFECTS:
       None.

 HISTORY:
       Version 1, September 13, 1996, Dietmar Germerott, MAPE Lindau. Written

 CONTACT:
       Dietmar Germerott, MAPE Lindau (germerott@linax1.mpae.gwdg.de)


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

 NAME:
       MCPV()

 PURPOSE: 
       Return MCP High Voltage

 CATEGORY:
       
 
 EXPLANATION:
       
 SYNTAX: 
       Result = mcpv()

 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)


MCREADHK $SSW/soho/sumer/idl/newtki/tki/mcreadhk.pro
[Previous] [Next]
 PROJECT:
       SOHO - SUMER

 NAME:
       MCREADHK()

 PURPOSE: 
       Internal Dummy Check for MCREADHK

 CATEGORY:
       
 
 EXPLANATION:
       
 SYNTAX: 
       Result = mcreadhk()

 CALLED BY:
	TKI_DO_MC_CMD
 EXAMPLES:
       
 INPUTS:
       dev - MC-Device of SUMER [0...6]

 OPTIONAL INPUTS: 
       None.

 OUTPUTS:
       None.

 OPTIONAL OUTPUTS:
       None.

 KEYWORDS: 
       None.

 CALLS: ***
	TKI_MESSAGE
 COMMON:
       None.

 RESTRICTIONS: 
       None.

 SIDE EFFECTS:
       None.

 HISTORY:
       Version 1, September 13, 1996, Dietmar Germerott, MAPE Lindau. Written

 CONTACT:
       Dietmar Germerott, MAPE Lindau (germerott@linax1.mpae.gwdg.de)


MCRELPOS $SSW/soho/sumer/idl/newtki/tki/mcrelpos.pro
[Previous] [Next]
 PROJECT:
       SOHO - SUMER

 NAME:
       MCRELPOS()

 PURPOSE: 
       Internal Dummy Check for MCRELPOS

 CATEGORY:
       
 
 EXPLANATION:
       
 SYNTAX: 
       Result = mcrelpos()

 CALLED BY:
	TKI_DO_MC_CMD, TKI_MC_TST_REL
 EXAMPLES:
       
 INPUTS:
       dev - MC-Device of SUMER [0...6]
       num_step - number of steps

 OPTIONAL INPUTS: 
       None.

 OUTPUTS:
       None.

 OPTIONAL OUTPUTS:
       None.

 KEYWORDS: 
       None.

 CALLS: ***
	TKI_MESSAGE
 COMMON:
       None.

 RESTRICTIONS: 
       None.

 SIDE EFFECTS:
       None.

 HISTORY:
       Version 1, September 13, 1996, Dietmar Germerott, MAPE Lindau. Written

 CONTACT:
       Dietmar Germerott, MAPE Lindau (germerott@linax1.mpae.gwdg.de)


MCRELPOSANS $SSW/soho/sumer/idl/newtki/tki/mcrelposans.pro
[Previous] [Next]
 PROJECT:
       SOHO - SUMER

 NAME:
       MCRELPOSANS()

 PURPOSE: 
       Internal Dummy Check for MCRELPOSANS

 CATEGORY:
       
 
 EXPLANATION:
       
 SYNTAX: 
       Result = mcrelposans()

 CALLED BY:
	TKI_DO_MC_CMD
 EXAMPLES:
       
 INPUTS:
       dev - MC-Device of SUMER [0...6]

 OPTIONAL INPUTS: 
       None.

 OUTPUTS:
       None.

 OPTIONAL OUTPUTS:
       None.

 KEYWORDS: 
       None.

 CALLS: ***
	TKI_MESSAGE
 COMMON:
       None.

 RESTRICTIONS: 
       None.

 SIDE EFFECTS:
       None.

 HISTORY:
       Version 1, September 13, 1996, Dietmar Germerott, MAPE Lindau. Written

 CONTACT:
       Dietmar Germerott, MAPE Lindau (germerott@linax1.mpae.gwdg.de)


MCRESET $SSW/soho/sumer/idl/newtki/tki/mcreset.pro
[Previous] [Next]
 PROJECT:
       SOHO - SUMER

 NAME:
       MCRESET()

 PURPOSE: 
       Internal Dummy Check for MCRESET

 CATEGORY:
       
 
 EXPLANATION:
       
 SYNTAX: 
       Result = mcreset()

 CALLED BY:
	TKI_DO_MC_CMD
 EXAMPLES:
       
 INPUTS:
       dev - MC-Device of SUMER [0...6]

 OPTIONAL INPUTS: 
       None.

 OUTPUTS:
       None.

 OPTIONAL OUTPUTS:
       None.

 KEYWORDS: 
       None.

 CALLS: ***
	TKI_MESSAGE
 COMMON:
       None.

 RESTRICTIONS: 
       None.

 SIDE EFFECTS:
       None.

 HISTORY:
       Version 1, September 13, 1996, Dietmar Germerott, MAPE Lindau. Written

 CONTACT:
       Dietmar Germerott, MAPE Lindau (germerott@linax1.mpae.gwdg.de)


MCSCANMOTION $SSW/soho/sumer/idl/newtki/tki/mcscanmotion.pro
[Previous] [Next]
 PROJECT:
       SOHO - SUMER

 NAME:
       MCSCANMOTION()

 PURPOSE: 
       Internal Dummy Check for MCSCANMOTION

 CATEGORY:
       
 
 EXPLANATION:
       
 SYNTAX: 
       Result = mcscanmotion()

 EXAMPLES:
       
 INPUTS:
       dev - device number (0 - 6)
       pha - phase current
       cur - retaining current

 OPTIONAL INPUTS: 
       None.

 OUTPUTS:
       None.

 OPTIONAL OUTPUTS:
       None.

 KEYWORDS: 
       None.

 CALLS: ***
	TKI_MESSAGE
 COMMON:
       None.

 RESTRICTIONS: 
       None.

 SIDE EFFECTS:
       None.

 HISTORY:
       Version 1, September 13, 1996, Dietmar Germerott, MAPE Lindau. Written

 CONTACT:
       Dietmar Germerott, MAPE Lindau (germerott@linax1.mpae.gwdg.de)


MCSCANSTEP $SSW/soho/sumer/idl/newtki/tki/mcscanstep.pro
[Previous] [Next]
 PROJECT:
       SOHO - SUMER

 NAME:
       MCSCANSTEP()

 PURPOSE: 
       Internal Dummy Check for MCSCANSTEP

 CATEGORY:
       
 
 EXPLANATION:
       
 SYNTAX: 
       Result = mcscanstep()

 CALLED BY:
	TKI_DO_MC_CMD
 EXAMPLES:
       
 INPUTS:
       dev - device number (0 - 6)
       num_step - number of steps

 OPTIONAL INPUTS: 
       None.

 OUTPUTS:
       None.

 OPTIONAL OUTPUTS:
       None.

 KEYWORDS: 
       None.

 CALLS: ***
	TKI_MESSAGE
 COMMON:
       None.

 RESTRICTIONS: 
       None.

 SIDE EFFECTS:
       None.

 HISTORY:
       Version 1, September 13, 1996, Dietmar Germerott, MAPE Lindau. Written

 CONTACT:
       Dietmar Germerott, MAPE Lindau (germerott@linax1.mpae.gwdg.de)


MCSELFTEST $SSW/soho/sumer/idl/newtki/tki/mcselftest.pro
[Previous] [Next]
 PROJECT:
       SOHO - SUMER

 NAME:
       MCSELFTEST()

 PURPOSE: 
       Internal Dummy Check for MCSELFTEST

 CATEGORY:
       
 
 EXPLANATION:
       
 SYNTAX: 
       Result = mcselftest()

 CALLED BY:
	TKI_DO_MC_CMD
 EXAMPLES:
       
 INPUTS:
       dev - MC-Device of SUMER [0...6]

 OPTIONAL INPUTS: 
       None.

 OUTPUTS:
       None.

 OPTIONAL OUTPUTS:
       None.

 KEYWORDS: 
       None.

 CALLS: ***
	TKI_MESSAGE
 COMMON:
       None.

 RESTRICTIONS: 
       None.

 SIDE EFFECTS:
       None.

 HISTORY:
       Version 1, September 13, 1996, Dietmar Germerott, MAPE Lindau. Written

 CONTACT:
       Dietmar Germerott, MAPE Lindau (germerott@linax1.mpae.gwdg.de)


MCSETERAMVALUE $SSW/soho/sumer/idl/newtki/tki/mcseteramvalue.pro
[Previous] [Next]
 PROJECT:
       SOHO - SUMER

 NAME:
       MCSETERAMVALUE()

 PURPOSE: 
       Internal Dummy Check for MCSETERAMVALUE

 CATEGORY:
       
 
 EXPLANATION:
       
 SYNTAX: 
       Result = mcseteramvalue()

 CALLED BY:
	TKI_DO_MC_CMD
 EXAMPLES:
       
 INPUTS:
       dev - MC-Device of SUMER [0...6]

 OPTIONAL INPUTS: 
       None.

 OUTPUTS:
       None.

 OPTIONAL OUTPUTS:
       None.

 KEYWORDS: 
       None.

 CALLS: ***
	TKI_MESSAGE
 COMMON:
       None.

 RESTRICTIONS: 
       None.

 SIDE EFFECTS:
       None.

 HISTORY:
       Version 1, September 13, 1996, Dietmar Germerott, MAPE Lindau. Written

 CONTACT:
       Dietmar Germerott, MAPE Lindau (germerott@linax1.mpae.gwdg.de)


MCSETIRAMVALUE $SSW/soho/sumer/idl/newtki/tki/mcsetiramvalue.pro
[Previous] [Next]
 PROJECT:
       SOHO - SUMER

 NAME:
       MCSETIRAMVALUE()

 PURPOSE: 
       Internal Dummy Check for MCSETIRAMVALUE

 CATEGORY:
       
 
 EXPLANATION:
       
 SYNTAX: 
       Result = mcsetiramvalue()

 CALLED BY:
	TKI_DO_MC_CMD
 EXAMPLES:
       
 INPUTS:
       dev - MC-Device of SUMER [0...6]

 OPTIONAL INPUTS: 
       None.

 OUTPUTS:
       None.

 OPTIONAL OUTPUTS:
       None.

 KEYWORDS: 
       None.

 CALLS: ***
	TKI_MESSAGE
 COMMON:
       None.

 RESTRICTIONS: 
       None.

 SIDE EFFECTS:
       None.

 HISTORY:
       Version 1, September 13, 1996, Dietmar Germerott, MAPE Lindau. Written

 CONTACT:
       Dietmar Germerott, MAPE Lindau (germerott@linax1.mpae.gwdg.de)


MCSETVARIABLE $SSW/soho/sumer/idl/newtki/tki/mcsetvariable.pro
[Previous] [Next]
 PROJECT:
       SOHO - SUMER

 NAME:
       MCSETVARIABLE()

 PURPOSE: 
       Internal Dummy Check for MCSETVARIABLE

 CATEGORY:
       
 
 EXPLANATION:
       
 SYNTAX: 
       Result = mcsetvariable()

 CALLED BY:
	TKI_DO_MC_CMD
 EXAMPLES:
       
 INPUTS:
       dev - device number (0 - 6)
       tmp - variable number
             0 - set number of steps/ramp
             1 - set maximal step frequency
       val_t  - value (0 - 255)

 OPTIONAL INPUTS: 
       None.

 OUTPUTS:
       None.

 OPTIONAL OUTPUTS:
       None.

 KEYWORDS: 
       None.

 CALLS: ***
	TKI_MESSAGE
 COMMON:
       @tki_common_priv

 RESTRICTIONS: 
       None.

 SIDE EFFECTS:
       None.

 HISTORY:
       Version 1, September 13, 1996, Dietmar Germerott, MAPE Lindau. Written

 CONTACT:
       Dietmar Germerott, MAPE Lindau (germerott@linax1.mpae.gwdg.de)


mdi_comp_eff $SSW/soho/mdi/idl/egse/mdi_comp_eff.pro
[Previous] [Next]
NAME:
	mdi_comp_eff
PURPOSE:
	To simulate the compression efficiency of the MDI telemetry
SAMPLE CALLING SEQUENCE:
	mdi_comp_eff, img
	mdi_comp_eff, img, out_struct, out_limit
 CALLS: ***
	SXPAR [1], SXPAR [2], SXPAR [3], ccd_hdr_info, deriv_arr [1], deriv_arr [2]
	read_mdi
HISTORY:
	Written 28-Mar-96 by M.Morrison


mdi_display $SSW/soho/mdi/idl/egse/mdi_display.pro
[Previous] [Next]
NAME:
	mdi_display
PURPOSE:
	To display the images as they are received by the EGSE.
	The executable "mdi_sci" is used to copy the telemetry data through
	shared memory
 CALLS: ***
	CONGRID [1], CONGRID [2], CONGRID [3], DELVARX [1], DELVARX [2], DELVARX [3]
	DELVARX [4], LOADCT, STDEV, ccd_hdr_info, delvarx [5], get_dpc_info, gt_time [1]
	gt_time [2], mk_dpc_image, pointing, tbeep [1], tbeep [2], tbeep [3]
HISTORY:
	Written 1993 by M.Levay (?)
	21-Sep-94 (MDM) - Modified to use GET_DPC_INFO and a database
			  file to get the data product information rather than
			  case statements in the program
			- Allow continuous display to the window as the
			  data is assembled.
			- Added a "-a" to the mdi_sci call if EGSE_VER is
			  greater than or equal to 3.1
			- Added /RESTART option
			- Incorporated changes made in RC.PRO
			- Added /QDISP_CON and /NODIFF
	25-Oct-94 (RAC) - changed /retain=1 to /retain=2 (full backing store)
			- Added /retain=2 to window,7 call that didn't have one
       13-Apr-95 (DPM) - Created mdi_display3; Uses R0-R9 to obtain temperatures
                         commented out Count and Page number display
	14-Sep-95 (MDM) - Modified to show the CFFFFF25 and CFFFFF26 as croped images
			- Fixed some bugs with undefined data products
			- Added some info for displaying with the image
			  (DPC, frame#)
	15-Sep-95 (MDM) - Various other fixes/options
	 9-Oct-95 (MDM) - Made some changes related to using the data product
			  size as send down in the data product header
			- Made several debug statements come out only when /QDEBUG
			  is set
	12-Oct-95 (MDM) - Modified the DPC table format (but all changes necessary
			  should have been in GET_DPC_INFO)
			- Modification to find the min/max of the crop region only,
			  not the embedded image
	13-Oct-95 (MDM) - Modified to use MK_DPC_IMAGE
	17-Oct-95 (MDM) - Modification to rebin a 1024x1024 image down
			  to 256x256
	27-Oct-95 (MDM) - Modified the format of the AVG and DEV string format.
			  Also display the average in the IDL window
	 7-Nov-95 (MDM) - Modified so it doesn't crash if having a problem
	 9-Nov-95 (MDM) - Removed setting of !order - display from bottom up
	11-Dec-95 (MDM) - Corrected an error which resulted in WIN_IDX variable
			  not being defined.
	10-Jan-96 (MDM) - Added capability to congrid 1040x1033 images down to 
			  256x256 for display purposes
	17-Jan-96 (MDM) - Protected against stdev of a single value
			- Added "Number of data pixels received does not match 
			  the NXxNY value." statement
	22-Jan-96 (MDM) - Modified to have /QCENTER option to display the center
			  of the sun location
	28-Mar-96 (MDM) - Modified to display the images which are not 1024 but are
			  larger than 256 properly.
	   Jul-96 (MDM) - Modified to work with EGSE 5.1
	24-Jul-96 (MDM) - Replaced REBIN with CONGRID
	16-Oct-96 (MDM) - Put in protection to never try to display a 1-D array
	 5-May-97 (MDM) - Removed "retain=retain"


mdi_idl_startup $SSW/soho/mdi/idl/site/mdi_idl_startup.pro
[Previous] [Next]
NAME:
	mdi_idl_startup
PURPOSE:
	Execute the MDI specific IDL startup.  It does the following:
		* Calls WMENU_SEL_SET to define the x-terminal window size
 CALLS: ***
	get_tty_type [1], get_tty_type [2], ssw_path, wmenu_sel_set [1]
	wmenu_sel_set [2]
HISTORY:
	Written 4-May-94 by M.Morrison
	10-Aug-95 (MDM) - Added execution of UITDBLIB
	30-Oct-96 (MDM) - Removed execution of UITDBLIB
			- Added prepending MDI directories if
			  SSW_MDI_PREPEND is set to "yes"
	31-Oct-96 (MDM) - changed /PREPEND to /FULL_PREPEND
	 8-Nov-96 (MDM) - Added astron dir to TRACE setup
	15-Apr-97 (MDM) - Added idl_lib/astron for all setups
			- Added SSW_CONTRIBUTED
	21-May-97 (MDM) - Removed the code which was checking to
			  see if we're running the SSW startup


mdi_imagetool $SSW/soho/mdi/idl/ops/mdi_imagetool.pro
[Previous] [Next]
NAME:
	mdi_imagetool
PURPOSE:
	Front end to call IMAGETOOL (SSW SOHO tool)
	* Sets the MDI high resolution fixed field of view
	* Converts coordinates to corner pixels
SAMPLE CALLING SEQUENCE:
	mdi_imagetool, '21-Nov-96 16:00'
OPTIONAL INPUT:
	date	- The date/time of the observation in the future
 CALLS: ***
	IMAGE_TOOL, MK_POINT_STC, fmt_tim [1], fmt_tim [2], int2secarr [1], int2secarr [2]
	ut_time [1], ut_time [2]
OPTIONAL KEYWORD INPUT:
	fd	- If set, then the extract is for full disk pixels
	hr	- If set, then the extract is for high resolution
		  pixels (the default)
	npix	- Number of pixels in the extracted field of view
		  if the X and Y size is the same.  Default=256
	xnpix	- E/W extract size in pixels (Default=256)
	ynpix	- N/S extract size in pixels (Default=256)
	roll90	- Simulate a 90 degree roll such that the west
		  limb ends up at the top of the CCD where the
		  north limb used to be.
HISTORY:
	Written Apr-96 by M.Morrison
	20-Nov-96 (MDM) - Renamed to mdi_imagetool
			- Documented and put on-line


mdi_plots $SSW/soho/mdi/idl/egse/mdi_plots.pro
[Previous] [Next]
 MDI_plots.pro 

 This file contains a collection of procedures to plot
 MDI housekeeping data. The routines are listed below;

  1. line_ok         Checks if command is valid
  2. check_date      validates user input date in format: dd-mmm-yy 
  3. check_time      validates user input time in format: hh:mm or hh:mm:ss
  4. check_duration  validates user input duration in format: hh:mm or hh:mm:ss
                     or with local time specifier: hh:mmL or hh:mm:ssL
  5. get_input       Gets plot times and items.
  6. get_hk          Read in data for an item for a specified time period.
  7. plot_it         plots data 
  8. plot_hc         plots data to a postscript file for hardcopy
  9. set_plotdata    Initializes variables in plotdata common block
 10. do_plot         Obtains requested data and sets up plot parameters
 11. do_oplot        Sets up overplot parameters
 12. do_average      Plots averages of specified items

 (RTPLOT and HKPLOT programs make use of the above routines.)

 The MDI HK data is read using the read_hist utility. It assumes
 that the history files are in the directory MDI_HISTORY_DIR.

 To access history files from another directory:
  1) Abort this program
  2) exit IDL
  3) Type: setenv MDI_HISTORY_DIR <dir>
     where <dir> is the new history file directory
  4) start IDL
  5) Run rtplot or hkplot.

 NOTE: In order for this program to remove the temporary files generated
 by read_hist in the temporary files directory, the directory must be
 writable by the user. Currently anyone in the mdi group can access
 MDI data because a 'chmod g+w $MDI_TEMP_DIR' was done.


mdi_plots0 $SSW/soho/mdi/idl/egse/mdi_plots0.pro
[Previous] [Next]
 MDI_plots.pro 

 This file contains a collection of procedures to plot
 MDI housekeeping data. The routines are listed below;

  1. line_ok         Checks if command is valid
  2. check_date      validates user input date in format: dd-mmm-yy 
  3. check_time      validates user input time in format: hh:mm or hh:mm:ss
  4. check_duration  validates user input duration in format: hh:mm or hh:mm:ss
                     or with local time specifier: hh:mmL or hh:mm:ssL
  5. get_input       Gets plot times and items.
  6. get_hk          Read in data for an item for a specified time period.
  7. plot_it         plots data 
  8. plot_hc         plots data to a postscript file for hardcopy
  9. set_plotdata    Initializes variables in plotdata common block
 10. do_plot         Obtains requested data and sets up plot parameters
 11. do_oplot        Sets up overplot parameters
 12. do_average      Plots averages of specified items

 (RTPLOT and HKPLOT programs make use of the above routines.)

 The MDI HK data is read using the read_hist utility. It assumes
 that the history files are in the directory MDI_HISTORY_DIR.

 To access history files from another directory:
  1) Abort this program
  2) exit IDL
  3) Type: setenv MDI_HISTORY_DIR <dir>
     where <dir> is the new history file directory
  4) start IDL
  5) Run rtplot or hkplot.

 NOTE: In order for this program to remove the temporary files generated
 by read_hist in the temporary files directory, the directory must be
 writable by the user. Currently anyone in the mdi group can access
 MDI data because a 'chmod g+w $MDI_TEMP_DIR' was done.


mdi_struct [3] $SSW/soho/mdi/idl/cal/mdi_struct.pro
[Previous] [Next]

 MDI_STRUCT

 Return a structure containing a minimal subset of
 MDI FITS keywords

 Craig DeForest, 28-Apr-1997
 Sam Freeland, add some soi pointing info
 CALLED BY
	mdialign, rd_mdi [1], rd_mdi [2]


MDI_SUMMARY $SSW/soho/mdi/idl/egse/mdi_summary.pro
[Previous] [Next]
NAME:
	MDI_SUMMARY
PURPOSE
	To create a file that appends the results from mdi_summary_sub1,  seq_run_sum
	seq_frame_stats, and cam_run_sum.  An executive summary is printed a the top
	of the file to give a brief description.
HISTORY
	27-Feb-96 written by Dan Goldberg
V1.2	 2-Apr-96 (MDM) - Modified to include the IPERR summary
			- Added logging when the program was run
			- Renamed variable "outdir" to "outfil"
 CALLS:


MDI_SUMMARY_SUB1 $SSW/soho/mdi/idl/egse/mdi_summary_sub1.pro
[Previous] [Next]
NAME:
	MDI_SUMMARY_SUB1
PURPOSE
	to summarize when a certain mnemonic was closed or open 
	over a certain interval
INPUT
	mnem- can be an array of mnemonics
	operation- is an array of values the same size as the mnemonic array
		   where each value corresponds to an operation
	    the possible values are:
	       0:  prints every instance when the mnemonic was not zero
	       1:  prints the time span when the mnemonic was not zero and 
		the amount of time it was like that
	       2:  prints when the mnemonic was opening and closing
HISTORY
	written by Dan Goldberg 27-Feb-96
	13-Mar-96 (DBG) Corrected an error for operation #1
 CALLS:
 CALLED BY
	MDI_SUMMARY


mdi_trans_uobs $SSW/soho/mdi/idl/ops/mdi_trans_uobs.pro
[Previous] [Next]
NAME:
	mdi_trans_uobs
PURPOSE:
	To translate the user's obs frame list to a pre-load format file.
SAMPLE CALLING SEQUENCE:
	mdi_trans_uobs, 'dt5x5_cal.uobs', /sim
	ff = findfile('/mdisw/cfl/comm/dep/*.uobs')
	for i=0,n_elements(ff)-1 do mdi_trans_uobs, ff(i), /sim
HISTORY:
	Written 9-Nov-95 by M.Morrison


mdidust $SSW/soho/mdi/idl/cal/mdidust.pro
[Previous] [Next]
NAME:
	mdidust
PURPOSE:
	Program to make dust images at various positions through
	the instrument.
SAMPLE CALLING SEQEUENCE:
	mdidust, '/md66/log/sci160k/940402_033500'
	mdidust, '950630_214927', corr_image=[0,0,0,0,0,0,-1,-1,-1], force_nseries=245
INPUT:
	seq_filnam
 CALLS: ***
	CONGRID [1], CONGRID [2], CONGRID [3], DISP_MDIDUST, PAUSE [1], RAD2LOCATION
	REMOVEGRAD1, STDEV, WDEF [1], WDEF [2], pause [2], pprint [1], pprint [2], read_mdi
	sat_obs_loc, tv2 [1], tv2 [2], xyouts2 [1], xyouts2 [2]
OPTIONAL KEYWORD INPUT:
	obsmode	- Set if the observations are in obs mode (default is
		  cal mode)
	fd	- Set if you wish to analyze the Full Disk images
		  (default is to analyze the high res (HR) images)
	hole_man- If set, allow the user to manually select the hole
		  positions
	hole_centroid - If set, derive the hole positions by finding
		  the center of gravity of the images
	rad_arr	- The radius array of the positions through the 
		  instrument which should be checked in "funny" units
		  (see Jesper Schou)
	corr_image - An array of the correction offsets to get to the
		  correct image (for cases when an image is missing)
OUTPUT:
	pox	- input images used
	cpox	- dust image for each radius location 
METHOD:
	Corrects for number of images used at each point
	reads raw images and removes gradients and limb-darkening
HISTORY:
	Originally Jesper Schou's DUST2.PRO
	Written 4-Apr-94 by M.Morrison
V1.0	 4-Apr-94 (MDM) - Made it a procedure, not a program
			- Removed all of the questions and
			  added keywords for the options
			- Changed format of output quite a bit
V1.1	 5-Apr-94 (MDM) - Changed format/info printed
V1.2	25-Apr-94 (MDM) - Added /ONE_PAGE option
V1.3	26-Jul-95 (MDM) - Added CORR_IMAGE optional input and
			  FORCE_NSERIES


mdifocus2 $SSW/soho/mdi/idl/cal/mdifocus2.pro
[Previous] [Next]
NAME:
	mdifocus2
PURPOSE:
	To digest and display the MDI focus data
SAMPLE CALLING SEQUENCE:
	mdifocus2, '/md66/log/sci160k/940402_045113'
INPUTS:
	seq_filnam- The sequence number (ie: 750) or the telemetry file name
 CALLS: ***
	CLOSE_TFR, CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], GET_TF_REC, NIMG_IN_TFR
	SHARPFOCUS2, concat_dir [4], dec2sun [1], dec2sun [2], disp_focus, get_dpc_info
	get_host [1], get_host [2], mk_tfi, rdtfr, read_mdi, tfr_decom, yesnox [1], yesnox [2]
OPTIONAL KEYWORD INPUT:
	title	- A title to be displayed
	cal	- If set, ??
	hc	- If set, make a hardcopy
OUTPUTS:
	img	- The 3-D data (nx,ny,N) cube with the images which were used
		  (N is normally 73)
	sharp	- A 2-D array (2,N) with the sharpness for each image (except
		  the dark image) (N is normally 72)
	norm	- ??
	dark	- The dark image used
HISTORY:
V1.0	Written 6-Apr-94 by M.Morrison taking Igor's "mdifocus.pro" and
							"anafocus.pro"
V1.1	25-Apr-94 (MDM) - Slight change to logic of when to ask if want
			  a hardcopy
V1.2	26-Apr-94 (MDM) - Remove the text file before writing it


mdiiss $SSW/soho/mdi/idl/cal/mdiiss.pro
[Previous] [Next]
NAME:
	mdiiss
PURPOSE:
	To analyze the MDI ISS performance
SAMPLE CALLING SEQUENCE:
	mdiiss, '/md66/log/sci160k/940425_213204'
	mdiiss,   '/md54/mdisw_idl_guide/940425_213204'
INPUT:
	seq	- Telemetry or series number
OUTPUT:
	a	- the image array
	sharp	- The sharpness
	norm	- The normalization array
 CALLS: ***
	CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], LOADARR, SHARPFOCUS2
	concat_dir [4], plotiss, read_mdi, yesnox [1], yesnox [2]
OPTIONAL KEYWORD INPUT:
	hc	- If set, make a hardcopy
HISTORY:
	Written ?? by ??
	26-Apr-94 (MDM) - Added /HC option
			- Replaced call to RDTFR with READ_MDI
			- Added documentation header
V2.0	23-Jun-95 (MDM) - Modified to save an ASCII file with
			  the sharpness results.
			- Added some information to the plot display
V2.1	26-Jun-95 (MDM) - Finished up the 23-Jun work
V2.2	12-Jul-95 (MDM) - Reversed the Open/Closed to be Closed/Open ratios


mdilaser $SSW/soho/mdi/idl/cal/mdilaser.pro
[Previous] [Next]
NAME:
	mdilaser
PURPOSE:
	To process the LFFT "mdilaser" results for Michelson wavelengths
SAMPLE CALLING SEQUENCE:
	mdilaser, '/md66/log/sci160k/940402_033500'
	mdilaser, '/md66/log/sci160k/940402_033500', str_ipos='0'
	mdilaser, '/md66/log/sci160k/940402_033500', str_ipos='3,4,5'
INPUT:
	seq_filnam - the sequence number of telemetry file name
 CALLS: ***
	DISP_MMAP, STR2ARR [1], STR2ARR [2], input [1], input [2], yesnox [1], yesnox [2]
OPTIONAL KEYWORD INPUT:
	str_ipos - A string array with a list of the positions to
		   process
HISTORY:
	Written 6-Apr-94 by M.Morrison
V1.1	25-Apr-94 (MDM) - Added STR_IPOS optional keyword input
			- Changed to pass 27 images to DISP_MMAP instead of 22


mdimrot $SSW/soho/mdi/idl/cal/mdimrot.pro
[Previous] [Next]
NAME:
	mdimrot
INPUT:
	seq_filnam - The series number or telemetry file name
INPUT/OUPTUT:
	mat	- The matrix of cross locations
OPTINAL KEYWORD INPUT:
	force_calc - If set, then force the grid calculation to be done over
		  even if it is already done.  The default is to not 
		  recalculate the cross locations if already done.
	hc	- If set, make a hardcopy
	qdisp	- If set, when doing the fitting of the cross locations, 
		  display the image and the first guess
	qplot	- If set, when doing the fitting of the cross locations,
		  display the fit to the cross
       plot_list - If set, only plot the plots listed in that string
                   String items: rawp, smoop, diff, m1, m2, pol
 CALLS: ***
	CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], FILE_EXIST [2], concat_dir [4]
	do_fit_gcross, file_exist [1], file_exist [3], plot_gcross, pprint [1], pprint [2]
	rd_tfile [1], rd_tfile [2], read_mdi
HISTORY:
	Written 26-Apr-94 by M.Morrison (using PLOT_GROSS2 as a start)
V1.1    3-Jun-94 (MDM) - Added capability to only do single plot
                         (so that we can do guide plots)
                         (added PLOT_LIST optional keyword input)


mdipdist $SSW/soho/mdi/idl/cal/mdipdist.pro
[Previous] [Next]
NAME:
	mdipdist
INPUT:
	seq_filnam - The series number or telemetry file name
INPUT/OUPTUT:
	mat	- The matrix of cross locations
OPTINAL KEYWORD INPUT:
	force_calc - If set, then force the grid calculation to be done over
		  even if it is already done.  The default is to not 
		  recalculate the cross locations if already done.
	all_boxes- If set, then display the grid distortion for all of the
		  boxes (not just the center box)
	hc	- If set, make a hardcopy
	qdisp	- If set, when doing the fitting of the cross locations, 
		  display the image and the first guess
	qplot	- If set, when doing the fitting of the cross locations,
		  display the fit to the cross
	zero_net - If set, then adjust the net "pixel coordinate change"
		  to be zero.
       plot_list - If set, only plot the plots listed in that string
                   String items: rawp, lr_abs, lr_siz, 045_abs, 045_siz
       nodark - If set, assume no dark image present and don't correct for it

 CALLS: ***
	ARROW, CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], DISTGRID_OFFSET
	FILE_EXIST [2], MK_SQUARE2, PAUSE [1], UNIQ [1], UNIQ [2], UNIQ [3], concat_dir [4]
	do_fit_gcross, file_exist [1], file_exist [3], pause [2], plot_gcross
	plottime [1], plottime [2], pprint [1], pprint [2], rd_tfile [1], rd_tfile [2]
	read_mdi, sgn [1], sgn [2]
HISTORY:
	Written 27-Apr-94 by M.Morrison (using PLOT_GROSS3C as a start)
V1.1	 5-May-94 (MDM) - Added /ZERO_NET option
V1.2	12-May-94 (MDM) - Adjusted how distgrid_offset worked (tolerance
			  and figuring out the map)
V1.3    3-Jun-94 (MDM) - Added capability to only do single plot
                         (so that we can do guide plots)
                         (added PLOT_LIST optional keyword input)
V1.4	 7-Jun-94 (MDM) - Corrected small typo in V1.3
V1.5	 2-Nov-94 (IZ) 	- Added /nodark keyword to analyse "dark-less" data


mdipict $SSW/soho/mdi/idl/cal/mdipict.pro
[Previous] [Next]
NAME:
	mdipict
PURPOSE:
	To display a summary page for each "mdipict" image
SAMPLE CALLING SEQUENCE:
	mdipict, '/md66/log/sci160k/940401_143902
INPUT:
	seq_filnam - The sequence or telemetry file name
 CALLS: ***
	PAUSE [1], SXPAR [1], SXPAR [2], SXPAR [3], gt_day [1], gt_day [2], img_summary [1]
	img_summary [2], pause [2], read_mdi
OPTIONAL KEYWORD INPUT:
	hc	- If set, produce a hardcopy (don't display to the screen)
	stimg	- The starting image to display (default is first image)
	enimg	- The ending image to display (default is last image)
HISTORY:
	Written 5-Apr-94 by M.Morrison
V1.2	19-Apr-94 (MDM) - Added MARGIN keyword to IMG_SUMMARY call
			- Changed format of comments somewhat
	17-Jul-95 (MDM) - Removed "rdtfr2" compilation


mdiprot $SSW/soho/mdi/idl/cal/mdiprot.pro
[Previous] [Next]
NAME:
	mdiprot
INPUT:
	seq_filnam - The series number or telemetry file name
INPUT/OUPTUT:
	mat	- The matrix of cross locations
OPTINAL KEYWORD INPUT:
	force_calc - If set, then force the grid calculation to be done over
		  even if it is already done.  The default is to not 
		  recalculate the cross locations if already done.
	hc	- If set, make a hardcopy
	qdisp	- If set, when doing the fitting of the cross locations, 
		  display the image and the first guess
	qplot	- If set, when doing the fitting of the cross locations,
		  display the fit to the cross
	qiss	- If set, then "mdiprot.src" was run for one set of repeats
		  with ISS off and then on.
       plot_list - If set, only plot the plots listed in that string
                   String items: rawp, smoop, diff, m1, m2, pol, iss_on, iss_off
 CALLS: ***
	CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], FILE_EXIST [2], concat_dir [4]
	do_fit_gcross, file_exist [1], file_exist [3], plot_gcross, pprint [1], pprint [2]
	rd_tfile [1], rd_tfile [2], read_mdi
HISTORY:
	Written 26-Apr-94 by M.Morrison (using PLOT_GROSS2 as a start)
V1.1	12-May-94 (MDM) - Added /QISS option
V1.2    3-Jun-94 (MDM) - Added capability to only do single plot
                         (so that we can do guide plots)
                         (added PLOT_LIST optional keyword input)


MEAN_2D_FRM $SSW/soho/lasco/idl/las-c2/polm1m2.pro
[Previous] [Next]
 NAME: MEAN_2D_FRM.PRO
 PURPOSE: make an image of local means and of standard deviation
 CATEGORY: General tools high level routine
 CALLING SEQUENCE: mean_2d_frm,ima_in,kx,ky,ima_moy,ima_std
 INPUTS: ima_in                           image array
         kx                               step_size in x
         ky                               step_size in y
 OPTIONAL INPUT PARAMETERS:               None
 KEYWORD PARAMETERS:                      None
 OUTPUTS:ima_moy                          mapping of local means
         ima_std                          mapping of local sigmas
 OPTIONAL OUTPUT PARAMETERS:              None
 CALLS: ***
	MOY, POLM1M2, pro_cal
 CALLED BY:
	POLM1M2
 COMMON BLOCKS:                           None
 SIDE EFFECTS:                            None
 RESTRICTIONS:                            None
 PROCEDURE:
 MODIFICATION HISTORY:   defined by M.B 07/12/93

 SCCS variables for IDL use

 @(#)mean_2d_frm.pro  1.0 07/12/93 :LAS


mgaussfit $SSW/soho/sumer/idl/atest/mgaussfit.pro
[Previous] [Next]
 NAME : mgaussfit
 PURPOSE : 
              Multi gaussian fitting
 ARGUMENT :
    INPUT
         x : independent  variable data 
         y : dependent variable data 
         w :  inverse square of the noise level of the data at each point
           
           Notice .  X, Y, W should have the same elements.
 
         par : Gaussian parameters (initial guess)
            1 D  array with elements of 6, 9 , 12, .. which depends 
                  on the number of lines 
                   
         
         y(i) = par(0) + par(1)*(x(i)-par(4))/par(5) 
                   + par(2)*((x(i)-par(4))/par(5))^2 +
          par(3) * exp(-0.5*((x(i)-par(4))/par(5))^2) +
          par(6) * exp(-0.5*((x(i)-par(7))/par(8))^2)+...
                 i=0,1,.., n_spectral-1
                 k=0,1,.., nspatial-1
          
    OUTPUT :
        result   fitted result
        par :  determined parameters

  KEYWORD
         free_par :  the indice of free parameters 
              default value = the indice of given parameters
         expected_free : the expected values of free parameters
         weight_free :  inverse   square  of the allowable differences
                           between the expected and the true free parameters.
        value : if set , calculate functional values without modifying  $
        the paramteres.

         Notice : the  weight corresponding to peak values
                     should be  an inverse square of uncertanity in the 
                    common logarithmic values. A typical
                   value may be 1./0.3^2. 
     
        itmax     maximum number of iteration 
   MODIFICATION HISTORY
       May 1997       J. Chae  : adapted from MULTI_GAUSS_FIT  
 CALLS:
 CALLED BY
	XGAUSSFIT


MIN_2D_FRM $SSW/soho/lasco/idl/las-c2/calib5.pro
[Previous] [Next]
 NAME: MIN_2D_FRM.PRO
 PURPOSE: make an image of local minima
 CATEGORY: General tools high level routine
 CALLING SEQUENCE: ima_out = min_2d_frm( ima_in, kx, ky)
 INPUTS: ima_in                           image array
         kx                               step_size in x
         ky                               step_size in y
 OPTIONAL INPUT PARAMETERS:               None
 KEYWORD PARAMETERS:                      None
 OUTPUTS:ima_out                          mapping of local minima
 OPTIONAL OUTPUT PARAMETERS:              None
 COMMON BLOCKS:                           None
 SIDE EFFECTS:                            None
 RESTRICTIONS:                            None
 PROCEDURE:
 MODIFICATION HISTORY:   defined by M.B and A.LL 26/10/93

 SCCS variables for IDL use

 @(#)min_2d_frm.pro  1.0 26/10/93 :LAS


min_nz [2] $SSW/soho/lasco/idl/exposure/min_nz.pro
[Previous] [Next]
 MIN_NZ
	Extract the smallest positive element of an array.

 Call:
	val = min_nz(array[, mindex, max=max])

 Return Value:
	val	any	The smallest positive value or -1 if no positive
			values.

 Argument:
	array	any	input	The array whose min is needed
	mindex	long	output	The (first) location in the array at
				which the min value is found.

 Keyword:
	max	any	output	The maximum value in the array.

 CALLED BY:
	mk_minim, mk_stdim_list
 History:
	Prototype: 24/1/91; SJT
	Improve and changes to smallest >0: 22/2/91; SJT
	Add MAX keyword: 31/3/92; SJT
	Add optional second argument for location of min value:
							20/8/93; SJT
	Add "finite" condition: 6/12/93; SJT


MISS_BLOCKS $SSW/soho/lasco/idl/reduce/miss_blocks.pro
[Previous] [Next]
 NAME:
	MISS_BLOCKS

 PURPOSE:
	This function returns a list of the missing telemetry block numbers.

 CATEGORY:
	REDUCE

 CALLING SEQUENCE:
	Result = MISS_BLOCKS (Img, Hdr)

 INPUTS:
	Img:	The image to be processed
	Hdr:	The fits header of the image

 OUTPUTS:
	The function result is a long word array of the absolute block numbers
	that are missing.  If no blocks are missing, the result is -1.

 CALLS: ***
	FXPAR [1], FXPAR [2]
 PROCEDURE:
	The input image is rebinned to a 32 x 32 array and then teh IDL where 
	function is used to identify the locations where the super pixels are
	zero.

 MODIFICATION HISTORY:
 	Written by:	RA Howard, 4 Oct 1995

	@(#)miss_blocks.pro	1.1 10/05/96 LASCO IDL LIBRARY


MISS_PCKTS $SSW/soho/lasco/idl/packets/miss_pckts.pro
[Previous] [Next]
 NAME:
	MISS_PCKTS

 PURPOSE:
	This procedure generates a file containing a list of missing
	science telemetry packets in a d01 file in same location

 CATEGORY:
	LASCO PACKETS

 CALLING SEQUENCE:
	MISS_PCKTS

 OPTIONAL INPUTS:
	Fname:	Specifies the telemetry filename to read in.  If no
		argument is present then all files are read in.

 KEYWORDS:
  /AUTO	Analyze all d01 files in $TMOUT
	
 CALLS: ***
	OBT2TAI, TAI2UTC, TRIM, UTC2STR
 CALLED BY:
	LZ_DISK_INIT [1]
 SIDE EFFECTS:
	A file "miss_pckts.lst" is generated and put into the user's home
	directory.

 PROCEDURE:
	The input files must reside in the current working directory.
	It then finds missing or out of order packets in science stream by 
	looking at the packet counter, which should increment by one.

 EXAMPLE:
	To process all telemetry files in the current directory:

		MISS_PCKTS

 MODIFICATION HISTORY:
 	Written by:	R.A. Howard, NRL, 7 Mar 1996
	961216 by N. Rich	prompt for input on processing status, CD info;
				changed variable volno to seqno; made /all
				keyword the default
	970131 by N. RIch	use TMFILES env variable
	970210 by RAHoward	Determine packet length to account for TM rate
	970328 by N. Rich	change default TM directory; save results file
				to start directory rather than home
	970826 by N. RIch	change default TM dir; add suff prompt
	990401 by N. Rich	Change default TM dir to gorgon; allow 4-digit
				volume numbers
	990621 by N. Rich	Change seqno to STRING input
	2000/02   N. RIch	Change default TM dir

	000630 - the Jake -	Beginning modifications to provide full scripting
				ability of this script.  ie. remove all interaction 
				and set default values.
				fname
				seqno
				vol
				proc
	000922 - the Jake -	Changed hardcoded directories to GETENV's
	001006 - the Jake -     Changed write outfile in $TMOUT dir instead of 'old' directory
	001229 - nbr -	        Changed getenv TMFILES to TMOUT
	03.10.10, nbr -         Write output file for each input file (each day)
       051018 - K Battams  -   Add ,/swap_if_little_endian kwd to all OPEN* calls.

	@(#)miss_pckts.pro	1.23 12/14/05 LASCO IDL LIBRARY


MK_ALL_MIN $SSW/soho/lasco/idl/synoptic/mk_all_min.pro
[Previous] [Next]
 TITLE:
	MK_ALL_MIN
 PURPOSE:
	This procedure generates the minimum of the all of the monthly
	minimum images.

 CATEGORY:
	DATA_ANAL

 CALLING SEQUENCE:
	MK_ALL_MIN,Tel,Filpol

 INPUTS:
	Tel:	String denoting the telescope: 'c1','c2','c3','c4'
	Filpol:	String denoting the filter/polarizer configuration

 OUTPUTS:
	None.  The routine will store the minimum image in a file
		named tm_all.fts, where t is the telescope number,
		m is the letter 'm', and _all is the string '_all'

 CALLS: ***
	BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], FXADDPAR [1], FXADDPAR [2]
	FXPAR [1], FXPAR [2], GET_UTC, READFITS [1], READFITS [2], READFITS [3], STR2UTC [1]
	STR2UTC [2], STR2UTC [3], UTC2STR, WRITEFITS [1], WRITEFITS [2], break_file [4]
 MODIFICATION HISTORY:
	WRITTEN 	RA Howard, NRL, 3 Oct 96
	 8 Nov 96	RAH, checks for bad blocks are <= 0
	30 Jan 97	SEP, check filenames for YYMMDD

	@(#)mk_all_min.pro	1.4 11/05/01 LASCO IDL LIBRARY


mk_ascii_list $SSW/soho/mdi/idl/ops/mk_ascii_list.pro
[Previous] [Next]
NAME:
	mk_ascii_list
PURPOSE:
	To take a data product dump from the IP and to decipher the
	list and make an ascii file describing the contents
SAMPLE CALLING SEQUENCE:
	mk_ascii_list, 'list_awbin.fits'
	mk_ascii_list, infil, outfil
INPUTS:
	infil	- The input FITS file containing the list
	outfil	- The output file name.  If not defined, it will
		  be the input file name with a ".ascii" exension
 CALLS: ***
	MARK_ENTRY, RFITS [1], RFITS [2], RFITS [3], SEA_MARK_LIST, SXPAR [1], SXPAR [2]
	SXPAR [3], UNSIGN, bits [1], bits [2], data_type [1], data_type [2], str_replace [1]
	str_replace [2]
HISTORY:
	Written 2-Jun-95 by M.Morrison
	25-Jul-95 (MDM) - Modified to work with AWBIN
	31-Jul-95 (MDM) - Added TABLE_START
	 2-Aug-95 (MDM) - Fixed bug with IRBIN processing
	 6-Oct-95 (MDM) - Fixed typo in IRBIN processing
	 6-Nov-95 (MDM) - Modified to use TABLE_START argument if passed in
			  for the other lists (used to work for IRBIN)
       19-Mar-96 (MDM) - Added capability to stop list processing when
                         reach the number of entries (for VWBIN) because
                         of problem with 6003 list.
	 3-Apr-96 (MDM) - Corrected to allow it to work with list passed in
			  directly (not from a file)
	16-Apr-96 (MDM) - Patched 3-Apr-96 patch


mk_atlas $SSW/soho/sumer/idl/contrib/kucera/atlas/mk_atlas.pro
[Previous] [Next]
Project:
	SOHO - SUMER
Name:
	mk_atlas
Purpose:
	To calculate construct full reference spectra from SUMER reference 
	spectra observations
Use:
	mk_atlas,filenames,lambda,spec,header,SpecRange=SpecRange,$
		more_info=more_info
Inputs
	FileNames - Names of files containing the reference spectrum.
		If there is more than one file, this should be an array of 
		type string.
Output
	Lambda_Out - Wavelength values in Angstroms (2nd order)
	Spec_Out - Spectral data summed over spectral bands specified by 
		   SpecRange. Units are counts/s/pix
	Head_Out - An abreviated header based on the FITS headers

Input Keywords:
	SpecRange - Array containing the spatial ranges over which the 
		spectra should be summed. Should have dimensions 2 x N,
		where N is the number of spectral locations, and in 
		units of pixels. If this is not entered the program
		Gt_SpecRange will be called so that the user may
		select the ranges graphically.
	Splice_Adjust - If set the user will be prompted to manually
		select the splice point between each overlapping pair
		of exposures. If more than one spectral zone has been
		selected, the splice selection plots will be made with
		the zone given by Splice_Adjust.
	DetRange -  Range on the Detector to use in making spectra. Default corresponds
		to the KBr coated portion with an extention to include Ly Alpha.
		OverRides keywords BareL, BareR, KBrOnly, and AllDetector
	KBrOnly - use only the KBr coated part of the detector to make spectra,
		 do not attempt to include Ly Alpha on attenuators
	FullDetector - use entire detector to make spectra
	BareL - use the bare portion of the detector to the left (lower co-pixels) of 
		the KBr Portion
	BareR -  use the bare portion of the detector to the right (higher co-pixels) of 
		the KBr Portion
	Warp - Correct for pixel scale image distortion (tri-warp)
              Faster, but less accurate than destretch

      Destretch - Correct for pixel scale image distortion (detsretch)

Output Keywords:
	More_Info - Stucture containing information about how the
		   components of the spectra were put together.
		   Tags: 
		   Trans - indexes in lambda_out of transitions between 
			   different exposures. 
		   Uncoated - array containg indexes of elements taken from 
			   uncoated part of detector. If no such elements,
			   it will = -1
                  Attenuated - array containg indexes of elements taken from 
			  attenuated part of detector. If no such elements,
			  it will = -1
		   Edge - array containg indexes of elements taken from 
			  edge of detector. If no such elements, it will = -1
Calls: ***
	ANYTIM2UTC [1], ANYTIM2UTC [2], AVERAGE, CALL_WARP, FXADDPAR [1], FXADDPAR [2]
	FXPAR [1], FXPAR [2], UTC2TAI, ft_sumread_fits, splice_sel
Common:	
	None
Written:
	Terry Kucera, 27 Feb 1996 
Modifications
	Added Splice_Adjust                                                                        TAK, 9 Apr 1996
	Added keywords for warping and selcting which part of 
                             detector to use                                                                      TAK, 21 May 1996
       Added keyword for warping with DESTRETCH
                                   P.Brekke, 10 Oct 1996


MK_CDS_ADEF_STC $SSW/soho/cds/idl/util/fitting/mk_cds_adef_stc.pro
[Previous] [Next]
 Project     : SOHO - CDS     
                   
 Name        : MK_CDS_ADEF_STC()
               
 Purpose     : Make a CDS Analysis Definition Structure with default values.
               
 Explanation : Creates and returns a CDS Analysis Definition (ADEF)
               structure, and initializes it with default values. If a QLDS
               is passed as a keyword, the RAS_ID and RAS_VAR fields will be
               filled with information from the QLDS.
               
 Use         : ADEF = MK_CDS_ADEF_STC( [ QLDS=QLDS ] )
    
 Inputs      : None required.
 
 Opt. Inputs : QLDS : Quick Look Data Structure
               
 Outputs     : Returns ADEF.
               
 Opt. Outputs: None.
               
 Keywords    : QLDS.

 Calls       : ***
	QLMGR
 CALLED BY:
	RESTORE_CDS_ADEF, 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


MK_CDS_ADEF_WIN_STC $SSW/soho/cds/idl/util/fitting/mk_cds_adef_win_stc.pro
[Previous] [Next]
 Project     : SOHO - CDS     
                   
 Name        : MK_CDS_ADEF_WIN_STC
               
 Purpose     : Create CDS Analysis Definition (ADEF) window structure
               
 Explanation : Used to create a structure describing one data block (data
               window) to be included into a CDS Analysis.

               The structure definition (with default values):

               {CDS_ADEF_WINDOW,
                IX : 0L          ; A long containing the WINDOW INDEX 
                GR_ORDER:1       ; Integer telling what grating order is to
                                 ; be used when generating the lambda array.
                LABEL: ''        ; Window label
                CROP: CROP       ; A structure describing how the data window
                                 ; is to be cropped when the data are included
                                 ; into an analysis.
               
 Use         : WIN_STC = MK_CDS_ADEF_WIN_STC()
    
 Inputs      : None
 
 Opt. Inputs : None.
               
 Outputs     : Returns a CDS ADEF window structure.
               
 Opt. Outputs: None.
               
 Keywords    : None

 Calls       : None
 CALLED BY:
	XCDS_ANALYSIS
 Common      : None
               
 Restrictions: ...
               
 Side effects: ...
               
 Category    : QuickLook, Analysis
               
 Prev. Hist. : None

 Written     : SVH Haugan, UiO, 29 September 1997
               
 Modified    : Not yet.

 Version     : 1, 29 September 1997


MK_CDS_ANALYSIS $SSW/soho/cds/idl/util/fitting/mk_cds_analysis.pro
[Previous] [Next]
 Project     : SOHO - CDS     
                   
 Name        : MK_CDS_ANALYSIS()
               
 Purpose     : Make a CFIT analysis structure from CDS data
               
 Explanation : This function extracts data from one data window of a QLDS,
               along with other information, and returns it as an ANALYSIS
               structure, ready for input to e.g., XCFIT_BLOCK.

               WAVELENGTH ARRAY

               A a wavelength array that is tilt-corrected (according to the
               values in TILT_NIS1_DEMO & TILT_NIS2_DEMO) is calculated, with
               the same dimension as the window data. It is expected that the
               wavelength calculation will include e.g., mirror position
               dependence some time in the future.

               GRATING ORDER
               
               The wavelength array is divided by the value of the keyword
               GR_ORDER, whose default value is taken from the DETDESC tag
               describing the window that is extracted.

               DATA WEIGHTS
               
               The routine calculates data weights according to the
               theoretical noise levels.  For the GIS detector, Poisson
               statistics are used, while for the VDS detector, the statistics
               are based on CDS Software Note #49.  Note that due to the
               smoothing of single-photon events over several pixels in the
               VDS detector, the error estimate will appear to be too high
               (too small weights).  However, this is an illusion--the error
               estimate is correct.

               DATA UNITS/CALIBRATION

               (applies only to NIS data)

               The input QLDS must have data that have been calibrated *no
               further* than VDS_CALIB (i.e., VDS_DEBIAS/VDS_CALIB may have
               been performed, but not NIS_CALIB). This is to ensure that it's
               possible to calculate weights according to the statistical
               model (e.g. Poisson).

               Output units may be selected by setting various calibration
               flags, (DEBIAS and VDS_CALIB will have a permanent effect on
               the QLDS!).

               The calibration flags are:

                   DEBIAS, VDS_CALIB, NOBURNIN, USE_COUNTS, CALIBRATE, ERGS,
                   STERADIANS, ANGSTROMS.

               If no flags are set, the output data will have the units of
               the data in the QLDS on input.

               The following units will result if the input QLDS has units
               'ADC' (analog digital counts) by setting flags:

                      DEBIAS     : DEBIASED-ADC

                      VDS_CALIB  : PHOTON-EVENTS/PIXEL/SEC

                      USE_COUNTS : PHOTON-EVENTS/PIXEL

                      CALIBRATE  : PHOTONS/CM^2/SEC/ARCSEC^2

               When calibrate is set, the keywords ERGS/STERADIANS/ANGSTROMS
               may be set to modify the units - see NIS_CALIB for further
               information.

               PRE-CALIBRATED INPUT
               
               It is also possible to supply your own, pre-calibrated QLDS,
               through the keyword QLDS_CALIBRATED - in that case, all
               calibration keywords will be ignored (but the input QLDS must
               still be NO MORE than VDS_CALIB'ed, to enable weight
               calculations).

               To receive (for later re-use) the calibrated QLDS that is used
               internally in this routine, set the keyword
               /LEAVE_CALIBRATION, and the calibrated QLDS will be returned
               through the QLDS_CALIBRATED keyword.

               DATA CROPPING

               A useful feature for analyzing parts of e.g., a full-spectrum
               readout is the data cube cropping mechanism. A cropping of
               *any* IDL data cube may be described by two LONG arrays with 7
               elements each, representing the start and stop indices. A
               cropping structure thus consists of two tags, e.g.:

                  CROP = {B:LONARR(7),E:LONARR(7)}

               and the cropping is performed as (with B=CROP.B & E=CROP.E):

                  DATA = DATA(b(0):e(0),b(1):e(1),b(2):e(2),b(3):e(0),$
                              b(0):e(0),b(0):e(0),b(0):e(0))

               By supplying a cropping structure through the keyword CROP
               this will be done automatically.
               
 Use         : ANA = MK_CDS_ANALYSIS(QLDS,WINDOWI [,DOWNSAMPLE] [calib. kw])

               then

               XCFIT_BLOCK,ANA=ANA
    
 Inputs      : QLDS : Quick Look Data Structure

               WINDOWI : The window index of the window to extract.

 Opt. Inputs : DOWNSAMPLE : A factor to downsample the spatial/time
                            dimensions of the data block (for smaller, test
                            data sets). Not completely robust...


 Outputs     : Returns a CFIT ANALYSIS structure, containing wavelengths,
               data, weights, various auxiliary information (ORIGIN/SCALE,
               MISSING, etc) to be used by e.g., XCFIT_BLOCK.

 Opt. Outputs: 
               
 Keywords    : QLDS_CALIBRATED : If supplied, this QLDS will be taken as the
                                 source for the data cube, with no more
                                 calibrations applied.

               LEAVE_CALIBRATION : If set, QLDS_CALIBRATED will contain the
                                   calibrated QLDS on output.
                                   
               DEBIAS : Perform VDS_DEBIAS on QLDS before extracting data

               VDS_CALIB : Perform VDS_CALIB on QLDS before extracting data
                           (also implies DEBIAS).
                           
               NOBURNIN : Passed on to VDS_CALIB

               USE_COUNTS : Perform VDS_CALIB and multiply by exposure time
                            to get units in PHOTON-EVENTS/PIXEL.

               CALIBRATE : Perform NIS_CALIB (on a *copy* of the QLDS) before
                           extracting data. Modify with /ERGS, /STERADIANS
                           and /ANGSTROMS.

 Calls       : ***
	ARR2STR [1], AVERAGE, Arr2Str [2], BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3]
	CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], COPY_QLDS, DATATYPE [1]
	DATATYPE [2], DATATYPE [3], DEFAULT, DELETE_QLDS, DIMREBIN, DIMREFORM, GET_MIRSHIFT
	GET_TILTCAL, GT_WINDATA, MK_ANALYSIS, MK_CDS_ANALYSIS_DOWNSAMP, NIS_CALIB
	PIX2WAVE, POLY, QLMGR, REPSTR [1], REPSTR [2], REPSTR [3], TRIM, VDS_CALIB, VDS_DEBIAS
	break_file [4], concat_dir [4]
 CALLED BY:
	APPLY_CDS_ADEF
 Common      : None
               
 Restrictions: ...
               
 Side effects: ...
               
 Category    : 
               
 Prev. Hist. : None

 Written     : SVH Haugan, UiO, 
               
 Modified    : Version 2, SVHH, 13 February 1998
                       Getting the tilt coefficients through GET_TILTCAL
               Version 3, SVHH, 25 January 1999
                       Added correction for mirror shift of wavelength
                       calibration.
		Version 4, 06-Dec-1999, William Thompson, GSFC
			Changed noise model for VDS data.

 Version     : Version 4, 06-Dec-1999


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

 Name        :	MK_CDS_COM

 Purpose     :	Common blocks for MK_CDS_PLAN

 Explanation : See purpose

 Use         : N.A.

 Inputs      :	None.

 Opt. Inputs :	None.

 Outputs     :	None.

 Opt. Outputs:	None.

 Keywords    :	None.

 Calls       :	None.
	Called from :	N.A.
 Common      :	Itself

 Restrictions:	None.

 Side effects:	None.

 Category    :	Planning, science

 Prev. Hist. :	None.

 Written     :	Dominic Zarro (ARC), 1 October 1994.


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

 Name        :	MK_CDS_DBASE

 Purpose     :	makes a widget interface to CDS Detailed Plan

 Explanation :	

 Use         :	MK_CDS_DBASE,PARENT,DBASE

 Inputs      :	PARENT = parent widget upon which to construct widgets

 Opt. Inputs :	None.

 Outputs     :	DBASE  = created child widget 

 Opt. Outputs:	None.

 Keywords    :	MAP = 1/0 for visible/invisible
               LFONT = font for label widgets
               BFONT = font for button widgets

 CALLS: ***
	CW_BSELECTOR2, CW_TEXT, FIND_WITH_DEF [1], FIND_WITH_DEF [2], FIND_WITH_DEF [3]
	MK_DFONT, RD_ASCII [1], RD_ASCII [2], STRPAD, TRIM, XMENU2, XPDMENU
 CALLED BY:
	MK_CDS_PLAN
 Common      :	None.

 Restrictions:	None.

 Side effects:	None.

 Category    :	Planning

 Prev. Hist. :	None.

 Written     :	Dominic Zarro (ARC),  22 January 1995

 Modified    : Changed location of newdata .pdm file.  CDP, 29-Jul-96

 Version     : Version 2, 29-Jul-96


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

 Name        : MK_CDS_FITS

 Purpose     : make simple CDS FITS files

 Category    : data analysis

 Explanation : 

 Syntax      : MK_CDS_FITS,FSTART,FEND

 Examples    :

 Inputs      : FSTART,FEND = start/end FITS file numbers

 Opt. Inputs : None


 Outputs     : None

 Opt. Outputs: None

 Keywords    : CALIB = set to FlatField
             : CLEAN = set to remove spikes
             : BYTE  = set to BYTE scale

 CALLS: ***
	CDS_SIMPLE_FITS, EXIST, FIND_WITH_DEF [1], FIND_WITH_DEF [2], FIND_WITH_DEF [3]
	LIST_EXPER, QLMGR, READCDSFITS, TRIM, UPD_CDS_POINT, VDS_CALIB
 Common      : None

 Restrictions: None

 Side effects: None

 History     : Written 22 October 1996, D. Zarro, ARC/GSFC

 Contact     : dzarro@solar.stanford.edu


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

 Name        : MK_CDS_GIF

 Purpose     : make CDS snapshot GIS files

 Category    : imaging

 Explanation : 

 Syntax      : IDL> mk_cds_gif,fstart,fend

 CALLS: ***
	BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], CDS_SNAPSHOT, CHK_DIR [1]
	CHK_DIR [2], CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], DATATYPE [1]
	DATATYPE [2], DATATYPE [3], DELVARX [1], DELVARX [2], DELVARX [3], DELVARX [4]
	DPRINT, EXIST, FIND_WITH_DEF [1], FIND_WITH_DEF [2], FIND_WITH_DEF [3], LIST_EXPER
	LOADCT, READCDSFITS, SSW_WRITE_GIF, TEST_OPEN, TRIM, UPD_CDS_POINT, VDS_CALIB
	WRITE_PICT, break_file [4], concat_dir [4], delvarx [5]
 Examples    :

 Inputs      : FSTART,FEND = start/end FITS files numbers

 Opt. Inputs : None

 Outputs     : None

 Opt. Outputs: None

 Keywords    : XSIZE,YSIZE = pixel size of GIF files [def= 640,512]
               COLOR = color table to load
               LIS_GIF = file name with listing of GIF file names [def='gis.lis']
               DIR_GIF = directory location of GIF files [def=curr]
               ROTATE = direction for rotating images
               PICT   = make PICT files instead
               FRAME  = use FRAME number in output file name
               ZBUFF  = use ZBUFFER

 History     : Written 22 December 1996, D. Zarro, ARC/GSFC
               Version 2, 13-Aug-2003, William Thompson
                       Use SSW_WRITE_GIF instead of WRITE_GIF

 Contact     : dzarro@solar.stanford.edu


MK_CDS_PLAN $SSW/soho/cds/idl/util/ops/planning/mk_cds_plan.pro
[Previous] [Next]
 PROJECT:
       SOHO - CDS

 NAME:
       MK_CDS_PLAN

 PURPOSE: 
       Create/edit detailed, science, alternative and flag plan for CDS

 CATEGORY:
       Widgets, planning
 
 EXPLANATION:
       
 SYNTAX: 
       MK_CDS_PLAN

 INPUTS:
       None.

 OPTIONAL INPUTS: 
       TSTART - display start time (can be string [e.g. 96/1/1] or TAI format) 

 OUTPUTS:
       None.

 OPTIONAL OUTPUTS:
       None.

 KEYWORDS: 
       GROUP    - event id of widget that calls MK_CDS_PLAN
       RESET    - purge studies/plan saved in memory
       NODETACH - Keep the graphic window from being detached from
                  the main widget if set
       LOCK -   - LOCK planning databases

 CALLS: ***
	ANYTIM2UTC [1], ANYTIM2UTC [2], ARR2STR [1], Arr2Str [2], CDS_PLAN_BRIEF
	CHECK_CDS_MODES, CLEANPLOT [1], CLEANPLOT [2], CLEANPLOT [3], CONCAT_DIR [1]
	CONCAT_DIR [2], CONCAT_DIR [3], CONCAT_STRUCT, COPY_STRUCT [1], COPY_STRUCT [2]
	COPY_STRUCT [3], CW_BSELECTOR2, CW_TEXT, DATATYPE [1], DATATYPE [2], DATATYPE [3]
	DEF_CDS_STUDY, DEF_INST_PLAN, DELETE_FILE [1], DELETE_FILE [2], DELVARX [1]
	DELVARX [2], DELVARX [3], DELVARX [4], DPRINT, EXIST, FIND_ZDBASE, FIX_ZDBASE
	GET_CDS_DUR, GET_CDS_GIS, GET_CDS_OH, GET_CDS_RASTER, GET_CDS_STUDY, GET_CDS_XY
	GET_GIS_DET, GET_HANDLER_ID, GET_INST_COLOR, GET_PLAN_DEF, GET_PLAN_FUNCT
	GET_PLAN_ITIME, GET_PLAN_SCI, GET_PLAN_TT, GET_PLAN_TYPE, GET_RASTER_PAR
	GET_SOHO_INST, GET_STUDY_PAR, GET_UNIQ_LIST, GET_UTC, GREP, HAVE_WIDGETS [1]
	HAVE_WIDGETS [2], IMAGE_TOOL, IMPORT_PLAN, LIST_DETAIL, LIST_GSET, LIST_OBJECT
	LOADCT, LOCATE_FFCAL, LOCK_ZDBASE, LOC_FILE [1], LOC_FILE [2], LOC_FILE [3]
	MATCH_STRUCT, MK_CDS_ADD, MK_CDS_BUTTON, MK_CDS_CHECK, MK_CDS_CMP, MK_CDS_CORR
	MK_CDS_DBASE, MK_CDS_DETACH, MK_CDS_DRAW, MK_CDS_DTIME, MK_CDS_ENG, MK_CDS_ERASE
	MK_CDS_ETIME, MK_CDS_FIELD, MK_CDS_FLAG, MK_CDS_GIS, MK_CDS_HPLAN, MK_CDS_INSERT
	MK_CDS_LAST, MK_CDS_MOVE, MK_CDS_OBJ, MK_CDS_OPS, MK_CDS_PDUR, MK_CDS_PLAN_EVENT
	MK_CDS_PLOT, MK_CDS_POINT, MK_CDS_READ, MK_CDS_RECEIVE, MK_CDS_REDRAW
	MK_CDS_REFRESH, MK_CDS_REP, MK_CDS_REPOINT, MK_CDS_REREAD, MK_CDS_RESET
	MK_CDS_ROTP, MK_CDS_RULE, MK_CDS_SAVE, MK_CDS_SBASE, MK_CDS_SCI, MK_CDS_SDUR
	MK_CDS_SELECT, MK_CDS_SEND, MK_CDS_SENSIT, MK_CDS_SPECIAL, MK_CDS_START
	MK_CDS_STARTDIS, MK_CDS_SWAP, MK_CDS_SWITCH, MK_CDS_TCHANGE, MK_CDS_UNDO
	MK_CDS_UPD, MK_CDS_UPDATE, MK_CDS_WARN, MK_CDS_WIDGETS, MK_CDS_WINDOW, MK_CDS_ZONE
	MK_CDS_ZOOM, MK_DFONT, MK_PLAN_ADD, MK_PLAN_CAMP, MK_PLAN_COMP, MK_PLAN_CONV
	MK_PLAN_COPY, MK_PLAN_CORR, MK_PLAN_CUSTOM, MK_PLAN_FIND [1], MK_PLAN_FIND [2]
	MK_PLAN_LOAD, MK_PLAN_ORDER, MK_PLAN_POINT, MK_PLAN_PRIV, MK_PLAN_READ
	MK_PLAN_REM, MK_PLAN_RESET, MK_PLAN_SORT, MK_PLAN_UNLOAD, MK_PLAN_WHERE
	MK_PLAN_WRITE, MK_PLAN_XY, MK_POINT_STC, MK_STUDY, NEW_EDIT_ITEM, NUM2STR
	OPLOT_SPLAN, PICKFILE, PLAN_XCAT_SUMM, PLOT_SPLAN, PS [1], PS [2], PSCLOSE [1]
	PSCLOSE [2], RD_ASCII [1], RD_ASCII [2], RD_RESOURCE, REP_TAG_VALUE, REVERSE
	RM_FILE, ROT_CDS_XY, ROUND_OFF, SEC2DHMS, SELECT_WINDOWS, SEND_PRINT, SET_LINE_COLOR
	SHOW_RES_STC, SMART_WINDOW, STRPAD, STR_FORMAT, STUDY_BRIEF, TAG_EXIST [1]
	TAG_EXIST [2], TAI2UTC, TRIM, UNIQ [1], UNIQ [2], UNIQ [3], UNLOCK_ZDBASE, UPDATE_KAP
	UPD_SCI_PLAN, UTC2TAI, VALID_CDS_POINT, WHERE_VECTOR, WHICH_ZDBASE, WIDG_HELP
	WIDG_TYPE, X2PS, XACK, XALIVE, XANSWER, XCAMP, XCAT, XCDS_BOOK, XCHOICE, XCLONE_PLAN, XCPT
	XDOC, XIAP, XINPUT, XKILL, XLIST, XMANAGER, XMANAGER_RESET, XPORT, XPRINT [1], XPRINT [2]
	XPRINT [3], XPRINT [4], XPRINT [5], XPROGRAM, XPS_SETUP, XREGISTERED, XSEL_LIST [1]
	XSEL_LIST [2], XSET_VALUE, XSHOW, XSTRUCT, XSTUDY, XTEXT, XZOOM_PLAN, ZONE_DEF_ID
	ZONE_DEF_LABEL, concat_dir [4], delvarx [5], get_plan_spec
 CALLED BY:
	MK_PLAN
 COMMON:
       MK_CDS_COM

 RESTRICTIONS: 
       None.

 SIDE EFFECTS:
       None.

 HISTORY:
       Version 1, November 10, 1994, D. M. Zarro, GSFC/ARC. Written
       Modified, 15 June 2000, Zarro (EIT/GSFC) - fixed display output
        of offset pointings
       Modified, 9 April 2001, Zarro (EIT/GSFC) -- added auto update
       of SCI_PLAN during XCPT

 CONTACT:
       Dominic M. Zarro, GSFC/ARC (zarro@smmdac.nascom.nasa.gov)


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

 Name        :	MK_CDS_STUDY

 Purpose     : create studies by appending rasters to fundamental part

 Use         : STUDY=MK_CDS_STUDY(FSTUDY,RASTERS)

 Inputs      : FSTUDY = fundamental study definition.
               RASTERS = raster definition.

 Opt. Inputs : None.

 Outputs     : STUDY = created study

 Opt. Outputs: None.

 Keywords    : None.

 Explanation :

                STUDY.N_RASTERS = N_RASTERS0 + N_RASTERS1
                STUDY.DURATION  = DURATION0  + N_RASTERS1 * DURATION1
 Calls       : ***
	ADD_TAG [1], ADD_TAG [2], DATATYPE [1], DATATYPE [2], DATATYPE [3], GET_RASTER_PAR
	REM_TAG [1], REM_TAG [2], TAG_EXIST [1], TAG_EXIST [2]
 CALLED BY:
	MK_STUDY
 Common      : None.

 Restrictions: None.

 Side effects: None.

 Category    : Planning

 Prev. Hist. : None.

 Written     :	Version 1, Zarro (ARC/GSFC) 31 October 1994


MK_DAILY_C1_MED $SSW/soho/lasco/idl/synoptic/mk_daily_c1_med.pro
[Previous] [Next]
 NAME:
	MK_DAILY_C1_MED

 PURPOSE:
	This procedure generates an image by taking all the files of a given
	type for one day and finding the median value for each pixel.

 CATEGORY:
	DATA_ANAL

 CALLING SEQUENCE:
	MK_DAILY_C1_MED,Tel,Date

 INPUTS:
	Tel:	String denoting the telescope, 'c1','c2','c3','c4'
	Date:	Gives the date to be processed in one of the following formats:
			YYMMDD,	6 character string
			YYYY/MM/DD, 10 character string
			CDS Date Structure
			Long Word of the modified julian date

 OPTIONAL INPUTS:
	None

 KEYWORD PARAMETERS:
	FILTER:	String denoting the filter position.  The default depends on 
		the telescope:
			C1:  FeXIV
			C2:  Orange
			C3:  Clear
			C4:  Clear
	POLAR:	String denoting the polarizer position.  The default depends on
		the telescope:
			C1:  Clear
			C2:  Clear
			C3:  Clear
			C4:  304A
	WLL:	String denoting the lower FP wavelength of an interval. 
	WLU:	String denoting the upper FP wavelength of an interval. 
	ONOFF:  String denoting whether the on line or off line wavelength should be used
	QL:	If set uses QL data, else LZ

 OUTPUTS:
	None.

 CALLS: ***
	ABBRV_FILPOL, DATATYPE [1], DATATYPE [2], DATATYPE [3], FXADDPAR [1], FXADDPAR [2]
	FXPAR [1], FXPAR [2], GET_UTC, HEADFITS [1], HEADFITS [2], HEADFITS [3], OFFSET_BIAS
	READFITS [1], READFITS [2], READFITS [3], STR2UTC [1], STR2UTC [2], STR2UTC [3]
	UTC2STR, WRITEFITS [1], WRITEFITS [2]
 CALLED BY:
	MAKE_ALL_DAYS
 SIDE EFFECTS:
	Writes a fits file to $MONTHLY_IMAGES/daily.

 RESTRICTIONS:
	Only looks for full resolution, full width, any height.

 PROCEDURE:
	For each image that satifies the selection conditions, (naxis1=1024),
       filter and polarizer as requested), the median image is computed of 
	the median value of all the images for a single day after being
	normalized to the median exposure time.  

	If the number of images is less than 7 for any pixel, that pixel is 
	not computed in the first pass.  In the second pass, all full images
	within +/- 2 days of the given day.  

 EXAMPLE:
	To create the daily median image for 1 Sep 1996:

		MK_DAILY_C1_MED,'c3','960901'
	or
		MK_DAILY_C1_MED,'c3','1996/09/01'

 MODIFICATION HISTORY:
 	Written by:	R.A. Howard, NRL, 9/27/96

	Version 2,      RAH, 10/10/96, Modified to accept all image sizes
	Version 3,      RAH, 10/21/96, Added filter and polarizer as inputs
	Version 4,      SEP, 11/12/96, Fixed problem with equatorial img boundary lines.
				       Added check for ADCT compressed images.
			NBR,  8/ 9/01, Change output directory to $MONTHLY_IMAGES/daily


	@(#)mk_daily_c1_med.pro	1.2 08/09/01 LASCO IDL LIBRARY


MK_DAILY_MED $SSW/soho/lasco/idl/synoptic/mk_daily_med.pro
[Previous] [Next]
 NAME:
	MK_DAILY_MED

 PURPOSE:
	This procedure generates an image by taking all the files of a given
	type (up to 25) for one day and finding the median value for each pixel.

 CATEGORY:
	DATA_ANAL

 CALLING SEQUENCE:
	MK_DAILY_MED,Tel,Date

 INPUTS:
	Tel:	String denoting the telescope, 'c1','c2','c3','c4'
	Date:	Gives the date to be processed in one of the following formats:
			YYMMDD,	6 character string
			YYYY/MM/DD, 10 character string
			CDS Date Structure
			Long Word of the modified julian date

 OPTIONAL INPUTS:
	None

 KEYWORD PARAMETERS:
	QL:	If set then use quick look date, else use level 0 data
	FILTER:	String denoting the filter position.  The default depends on 
		the telescope:
			C1:  FeXIV
			C2:  Orange
			C3:  Clear
			C4:  Clear
	POLAR:	String denoting the polarizer position.  The default depends on
		the telescope:
			C1:  Clear
			C2:  Clear
			C3:  Clear
			C4:  304A
	WLL:	String denoting the lower FP wavelength of an interval. 
	WLU:	String denoting the upper FP wavelength of an interval. 
	ONOFF:  String denoting whether the on line or off line wavelength should be used
	ANYSIZE:	Accept images with dimensions GT 256
	NOREBIN:	Do not rebin images to 512x512
	SAVEDIR:	Specify where to save result
	ROLLED:		Save result in 'rolled' directory; set equal to roll angle (CROTA)
	FILES:	If set to a strarr, then use files in array to compute the median image
	VERBOSE:	Print row information for zero rows

 OUTPUTS:
	None.

 CALLS: ***
	ABBRV_FILPOL, DATATYPE [1], DATATYPE [2], DATATYPE [3], FXADDPAR [1], FXADDPAR [2]
	GET_CACHE, GET_SC_POINT, GET_UTC, HIST_EQUAL, IMG_HDR_TXT2STRUCT
	LASCO_READFITS [1], LASCO_READFITS [2], MAXMIN, OFFSET_BIAS, REDUCE_STD_SIZE
	REVERSE, STR2UTC [1], STR2UTC [2], STR2UTC [3], TAI2UTC, TRIM, UTC2STR, UTC2TAI
	WRITEFITS [1], WRITEFITS [2]
 CALLED BY:
	MAKE_ALL_DAYS, REDUCE_DAILY
 SIDE EFFECTS:
	Writes a fits file to $MONTHLY_IMAGES/daily of the format td_fwpw_yymmdd[raaa[x]].fts
	where 	t  = telescope [1,2,3]
		d  = d (daily image)
		fw = filter abbreviation from abbrv_filpol.pro
		pw = polarizer abbreviation from abbrv_filpol.pro
		yymmdd = date of the image
		r = r if roll of image GT 2 degrees from north
		aaa = average (dwell) roll angle during interval in degrees CCW
		x = x if roll angle varies more than 5 degrees during interval

 RESTRICTIONS:
	

 PROCEDURE:
	For each image that satifies the selection conditions, (default naxis1=1024,
       filter and polarizer as requested), the median image is computed of 
	the median value of all the images for a single day after being
	normalized to the median exposure time.  

	If the number of images is less than 7, there is a second pass. 
  	In the second pass, images within +/- 2 days of the given day are used, 
	up to 15 per day.  

 EXAMPLE:
	To create the daily median image for 1 Sep 1996:

		MK_DAILY_MED,'c3','960901'
	or
		MK_DAILY_MED,'c3','1996/09/01'

 MODIFICATION HISTORY:
 	Written by:	R.A. Howard, NRL, 9/27/96

	Version 2,      RAH, 10/10/96, Modified to accept all image sizes
	Version 3,      RAH, 10/21/96, Added filter and polarizer as inputs
	Version 4,      SEP, 11/12/96, Fixed problem with equatorial img boundary lines.
				       Added check for ADCT compressed images.
	Version 5,	RAH, 6/1/98, Added keyword parameter, QL to select QL or LZ images
					Force write to $MONTHLY_IMAGES
	Version 6,	NBR, 2/11/99,  Fix 1999 bug (LE instead of LT 99)
	Version 7,	NBR, 8/27/99,  Re-fix 1999 bug; rebin result to 512x512
	Version 8, 	NBR, 12/1999,	Update to use header structure; use READLIST 
					instead of HEADFITS to filter images; change 
			jjmax to 100; Add ANYSIZE and NOREBIN keywords; Make b INTARR
	NBR,  8. 8.01 - Change output directory to $MONTHLY_IMAGES/daily
	NBR, 11. 9.01 - Use IMG_HDR_TXT2STRUCT and fix exptime problem
	NBR, 11.13.01 - Add ROLLED keyword
	NBR, 11.16.01 - Fix findfile and ih conflict; add FILES keyword
	NBR, 11.20.01 - Add CROTA to header
	NBR, 12. 7.01 - Header changes
	NBR, 12.18.01 - Fix bug in Pass 2
	NBR,  5.10.02 - Change jjmax to 50; make date_obs of result midpoint between 
			date_obs of first and last images used; add N_IMAGES to header;
			Use get_sc_point for CROTA; cancel Pass 2 and make n_median_min=5;
			Change VERBOSE reporting; Move sdir and postd to end
	NBR,  5.23.02 - add caching
	NBR,  7.10.02 - Fix P[12]COL/ROW
	jake	030716	fixed indentation
	NBR, 	030718	Automatically check ROLL, even if it changes during a day
   	NBR, 06.10.16	Use standard exptime for C2 and C3; give preference to FFV images;
   	    	    	more /verbose messages


	version= '@(#)mk_daily_med.pro	1.23, 10/16/06'	; NRL LASCO IDL LIBRARY
	;version = 'MK_DAILY_MED testing 2002/05/23 by NBR'


MK_DAILY_MIN $SSW/soho/lasco/idl/synoptic/mk_daily_min.pro
[Previous] [Next]
 NAME:
	MK_DAILY_MIN

 PURPOSE:
	This procedure generates an image by taking all the files of a given
	type for one day and finding the minimum value for each pixel.

 CATEGORY:
	DATA_ANAL

 CALLING SEQUENCE:
	MK_DAILY_MIN,Tel,Date

 INPUTS:
	Tel:	String denoting the telescope, 'c1','c2','c3','c4'
	Date:	Gives the date to be processed in one of the following formats:
			YYMMDD,	6 character string
			YYYY/MM/DD, 10 character string
			CDS Date Structure
			Long Word of the modified julian date

 OPTIONAL INPUTS:
	None

 KEYWORD PARAMETERS:
	QL:	If set then use quick look date, else use level 0 data
	FILTER:	String denoting the filter position.  The default depends on 
		the telescope:
			C1:  FeXIV
			C2:  Orange
			C3:  Clear
			C4:  Clear
	POLAR:	String denoting the polarizer position.  The default depends on
		the telescope:
			C1:  Clear
			C2:  Clear
			C3:  Clear
			C4:  304A
	WLL:	String denoting the lower FP wavelength of an interval. 
	WLU:	String denoting the upper FP wavelength of an interval. 
	ONOFF:  String denoting whether the on line or off line wavelength should be used

 OUTPUTS:
	None.

 CALLS: ***
	ABBRV_FILPOL, DATATYPE [1], DATATYPE [2], DATATYPE [3], FXADDPAR [1], FXADDPAR [2]
	FXPAR [1], FXPAR [2], GET_UTC, HEADFITS [1], HEADFITS [2], HEADFITS [3], IMG_DIF_MIN
	OFFSET_BIAS, READFITS [1], READFITS [2], READFITS [3], STR2UTC [1], STR2UTC [2]
	STR2UTC [3], UTC2STR, WRITEFITS [1], WRITEFITS [2]
 CALLED BY:
	MAKE_ALL_MINDAYS
 SIDE EFFECTS:
	Writes a fits file to $MONTHLY_IMAGES/daily.

 RESTRICTIONS:
	Only looks for full resolution, full width, any height.

 PROCEDURE:
	For each image that satifies the selection conditions, (naxis1=1024),
       filter and polarizer as requested), the minimum image is computed of 
	the minimum value of all the images for a single day after being
	normalized to the median exposure time.  

	If the number of images is less than 7 for any pixel, that pixel is 
	not computed in the first pass.  In the second pass, all full images
	within +/- 2 days of the given day.  
	Adapted from MK_DAILY_MED

 EXAMPLE:
	To create the daily minimum image for 1 Sep 1996:

		MK_DAILY_MIN,'c3','960901'
	or
		MK_DAILY_MIN,'c3','1996/09/01'

 MODIFICATION HISTORY:
 	Written by:	R.A. Howard, NRL, 9/27/96

	Version 2,      RAH, 10/10/96, Modified to accept all image sizes
	Version 3,      RAH, 10/21/96, Added filter and polarizer as inputs
	Version 4,      SEP, 11/12/96, Fixed problem with equatorial img boundary lines.
				       Added check for ADCT compressed images.
	Version 5,	RAH, 6/1/98, Added keyword parameter, QL to select QL or LZ images
					Force write to $MONTHLY_IMAGES
	Version 6,	NBR, 2/11/99,  Fix 1999 bug (LE instead of LT 99)
	Version 7,	NBR, 8/27/99,  Re-fix 1999 bug; rebin result to 512x512
			NBR,  8/ 9/01, Change output directory to $MONTHLY_IMAGES/daily



 @(#)mk_daily_min.pro	1.3 08/09/01 :LASCO IDL LIBRARY



mk_dpc_image $SSW/soho/mdi/idl/ops/mk_dpc_image.pro
[Previous] [Next]
NAME:
	mk_dpc_image
PURPOSE:
	For certain data products it is necessary to rebuild the image into
	a simple 2-D form.  This routine takes the 1-D vector of data values
	and makes an image.  Typically the output image can be of size
	1024, 512, 256, 128, or 64.
SAMPLE CALLING SEQUENCE:
	img = mk_dpc_image(1024, dp_arr, 'cfffff25'x)
	img = mk_dpc_image(512, dp_arr, head=fits_header)
INPUT:
	disp_size - The size of the output image (typically 1024, 512, 256
		  128 or 64).  If the size is negative and the keyword PIXMAP2
		  is set, then that pixmap file is used and the image is 
		  congridded to the absolute value of "disp_size")
	dp_arr	- The data product array
	dpc	- The data product code for that array.  Optionally the
		  FITS header can be passed
 CALLS: ***
	CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], CONGRID [1], CONGRID [2]
	CONGRID [3], FILE_EXIST [2], RFITS [1], RFITS [2], RFITS [3], STR2ARR [1]
	STR2ARR [2], SXPAR [1], SXPAR [2], SXPAR [3], UNSIGN, concat_dir [4], data_type [1]
	data_type [2], file_exist [1], file_exist [3], get_dpc_info, str_replace [1]
	str_replace [2]
 CALLED BY:
	DISPLOI_MON5K, disp_sci160k [1], disp_sci160k [2], disp_sci5k, dpc_img_summary
	mdi_display, mk_mdi_fits, mon_health [1], mon_health [2], monitor_center [1]
	new_disp_sci5k [1], new_disp_sci5k [2], new_mon_health [1], new_mon_health [2]
	rd_obs4, xdisp_sci5k, xdisp_tfr, xset_chain [1], xset_chain [2]
OPTIONAL KEYWORD INPUT:
	head	- The FITS header
	pixmap2 - If set, read the secondary pixmap file
	qforce_rd - If set, then force the DPC_TABLE.TXT file to be read
		  again (contents are saved in common block otherwise).
	missing - The value to set all points outside of where there is data.
		  The default is 0.
	nonorm	- If set, then do not normalize the image to account for the 
		  number of pixels binned (only relevant for LOI/IRBIN)
	qfloat	- If set, and it's an LOI image, return the result in
		  floating point.
OPTIONAL KEYWORD OUTPUT:
	npixarr - the number of pixels in the bin (LOI only)
HISTORY:
	Written 12-Oct-95 by M.Morrison
		(extracted pieces from xdisp_sci5k and xdisp_tfr)
	19-Oct-95 (MDM) - Added UNSIGN call for flux budget and limb figure to
			  make it an unsigned 16 bit number
	 8-Nov-95 (MDM) - Added normalization for LOI IRBIN images and allowd
			  /NONORM option
	25-Jan-96 (MDM) - Modified to allow floating point normalization for LOI
			  IRBIN image (added /QFLOAT) option
	31-Jan-96 (MDM) - Tweaked to allow 1024 image reconstruction
	14-Mar-96 (MDM) - Modified to handle if the "DPC" fits keyword entry
			  is of string type (used to be integer)
	23-May-96 (MDM) - Made the definition of the output array be float if
			  /qfloat is set
	23-May-96 (MDM) - Modification to NPIXARR - make it a LONARR
	28-May-96 (MDM) - Modified to correct for the LOI-C dataproduct
	12-Jul-96 (MDM) - Modified to return the input if no format
			  file is found
	27-Jan-97 (MDM) - Added common block to not re-read the map file if
			  it is the same as last time (or the first time)
	29-Jul-97 (CED) - Added check for structure-type headers for the 
			  DPC determination (mreadfits-compatibility)
			  WARNING: Doesn't work if the DPC is stored in 
			  DECIMAL ASCII format in the header (which it 
			  shouldn't anyhow).
	08-Feb-2006 (SEG) - Fixing LOI_C scaling with Jeneen's fix
	22-Mar-2006 (SEG) - Commenting out the fix for LOI_C 
	


MK_EIT_L1 $SSW/soho/eit/idl/anal/mk_eit_l1.pro
[Previous] [Next]
 Project     : SOHO - EIT

 Name        : 
	MK_EIT_L1
 Purpose     : 
	Create Level 1 FITS files via eit_prep. Demo program to show usage.
 Use         : 
	mk_eit_l1,date
        IDL> mk_eit_l1,'20-mar-1997'
        IDL> mk_eit_l1,['5-mar-1997','10-mar-1997']


 Inputs      : 
        DATE : Date in any accepted format or 2 element array consisting
               of start and stop dates.
 Opt. Inputs :
        List = input file listing, for use instead of date parameter 
        fullfov = set if want only full FOV images
        fullres = set if want only full resolution FOV images
        response_norm = if set normalize response

 Outputs     : 
         Create a single output FITS file for each image. The processing
         is done by EIT_PREP. A background is subtracted off, image is
         degridded, flat fielded, exposure time normalized, filter normalized,
         and optionally response normalized

 Calls       : ***
	EIT_CATRD [1], EIT_CATRD [2], EIT_FXPAR, EIT_PREP, HEADFITS [1], HEADFITS [2]
	HEADFITS [3], eit_catrd [3], eit_file2path
 Common      : 
	None.
 Restrictions: 
	None.
 Side effects: 
 Category    : 
	Data Handling, I/O, FITS.
 Written     : 1997 March 20, J. Newmark
               1997 July 23 Added fullfov keyword, use /nodata
                            in eit_prep to save memory J Newmark
               1997 Aug 14 Added fullres keyword J. Newmark
               1997 Sep 23 added input LIST keyword, fixed partial fov bug. J. Newmark
               1998 Jan 21 added response_norm keyword J. Newmark
               1998 Mar 27 update for new EIT_PREP, EIT_CATRD


mk_ff_load $SSW/soho/mdi/idl/ops/mk_ff_load.pro
[Previous] [Next]
NAME:
	mk_ff_load
PURPOSE:
	To make the source files for the flat field upload
SAMPLE CALLING SEQUENCE:
	mk_ff_load, 0, 15, infil=infil, outdir=outdir
	mk_ff_load, 0, 15, infil=infil, outdir='.'
	for i=0,1023,16 do mk_ff_load, i, i+15, img=img
	for i=0,1023,16 do mk_ff_load, i, i+15, img=img, outdir='/mdisw_bbs/cfl/flat/src'

	for i=   0,511,16 do mk_ff_load, i, i+15, '50080000'x+i*1024L, img=img, $	;bottom 512 lines in top of page 10
					reflin=i
	for i=512,1023,16 do mk_ff_load, i, i+15, '50080000'x+(i-512)*1024L, img=img, $	;top 512 lines in top of page 10
					reflin=i

	for i=0,1023,16 do mk_ff_load, i, i+15, img=img, outdir='.', infil='/mdisw/dbase/cal/files/flat_005.fits', prefix='ld_ff2_'
	for i=0,1023,16 do mk_ff_load, i, i+15, img=img, outdir='.', $
				infil='/mdisw/dbase/cal/files/flat_003.fits', prefix='ld_ff1_'
 CALLS: ***
	CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], RFITS [1], RFITS [2], RFITS [3]
	circle_mask, concat_dir [4], mk_mdi_load
HISTORY:
	Written 11-Apr-96 by M.Morrison
V2.0	17-Apr-96 (MDM) - Modified to not make the loads be cropped.
V3.0	18-Apr-96 (MDM) - Modified to transfer every 4 lines to the IP
			  (not every 2)
			- Modified to use a different portion of the DEP
			  memory
V3.1	18-Apr-96 (MDM) - Modified the masking radius to be 520 pixels
			- Modified to have portion outside of the mask be
			  set to 1.0
V4.0	14-May-96 (MDM) - Modified to write to page 12 instead of page 10
			- Also modified to load one less word because of
			  DEP/IP conflict.
			- Added /NOWARN to mk_mdi_load call
V5.0	21-Nov-96 (MDM) - Ver 4.0 was never put online
			- Revert back to load into page 10
			- Added base_addr parameter
			- Removed the "one less word" patch since it 
			  left things out of sync
V5.1	 7-Jul-97 (MDM) - Added PREFIX option
V5.2	 8-Jul-97 (MDM) - Changed default to be the new flat field
V5.3	10-Jul-97 (MDM) - Corrected major mistake in that the IP destination
			  address was not being updated properly
			- Added REFLINE


mk_ff_patch $SSW/soho/mdi/idl/ops/mk_ff_patch.pro
[Previous] [Next]
NAME:
	mk_ff_patch
PURPOSE:
	To build the control file to patch the flat field data
 CALLS: ***
	BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], SSW_FILE_DELETE, break_file [4]
	zformat [1], zformat [2]
HISTORY:
	Written May-96 by M.Morrison
	27-Jun-96 (MDM) - Added new list of pixels
			- Changed some of the comments for each pixel
	11-Jul-96 (MDM) - Modification to allow VEL table #2 patches
			- Modification to format negative words properly
       15-Aug-96 (MDM) - Created the patch #2 for velocity
	16-Sep-96 (MDM) - Patch for FF for Sep-96
	24-Sep-96 (MDM) - Patch for FF for second Sep-96 fix
	25-Sep-96 (MDM) - Corrected "mbiptbl" command generation for
			  the case between LIST and TABLE loads
			  (Tables = velocity, lists = flat field)
			- Patch for FF for third (last?) Sep-96 fix
	30-Sep-96 (MDM) - Another Sep-96 4 pixel patch (944592)
	14-Oct-96 (MDM) - Added capability to do VWBIN patch
	21-Oct-96 (MDM) - Added velocity patch entry for 19-Oct blip
	28-Oct-96 (MDM) - FF patch
	 5-Nov-96 (MDM) - Added capability to do sqrt#1 patch
			- Removed the directory name from the output file
	12-Nov-96 (MDM) - Added Nov-96 VWBIN patch (pixel 31314)
	13-Nov-96 (MDM) - Added FF patch for page 10
	13-Nov-96 (MDM) - Changed wait from 60 to 90 seconds because
			  the 60 sec wait causes FE0x and FBAD errors!
			  (this was true months ago too)
	15-Nov-96 (MDM) - Added patch to page 10 when in proper location
	19-Nov-96 (MDM) - More patches to page 10
	25-Nov-96 (MDM) - Patches to page 12 (4 pixels)
	25-Nov-96 (MDM) - Added capability to do SQRT#4 patch
	27-Nov-96 (MDM) - Few patches to page 12
	 2-Dec-96 (MDM) - Single pixel patch in page 12
        2-Jan-97 (CNF) - Single pixel patch in page 12
	 6-Jan-97 (MDM) - Added IRBIN 7005 and 7007
			- Added SET_LIST_ADDR call for VWBIN (put
			  it in for IRBIN too)
	 9-Jan-97 (MDM) - Added sqrt#2, sqrt#3, sqrt#4, and recip#1
			- Renumbered the option menu
	15-Jan-97 (MDM) - Added crop
	27-Jan-97 (CNF) - Patch single point of vwbin
	 2-Jan-97 (CNF) - Patch single pixel in ff
 	20-Feb-97 (CNF) - Patch 3 pixels in ff
	17-Mar-97 (CNF) - Single pixel patch to sqrt4 table
	23-Mar-97 (CNF) - Patch 3 pixels in ff
   	28-Mar-97 (CNF) - Patch 2 pixels in ff
	 2-Apr-97 (CNF) - Patch 1 pixel in ff
        7-Apr-97 (CNF) - Patch 1 pixel in ff 
	16-Apr-97 (MDM) - Patch 1 pixel in ff
	21-Apr-97 (MDM) - Patch SQRT2 and RECIP1
       29-Apr-97 (CNF) - Patch 7 pixels in ff
	28-May-97 (CNF) - Patch 1 pixel in ff
       30-May-97 (CNF) - Patch 1 pixel if ff
	 4-Jun-97 (CNF) - Patch 1 pixel in ff
	 9-Jun-97 (MDM) - Patch 1 pixel if Vel2
	15-Jul-97 (MDM) - Many pixel patch for new Flat field
			- Changed flat field to flat_005.fits
	17-Jul-97 (CNF) - Patch 1 pixel in sqrt2 table
	23-Jul-97 (EBZ) - Patch 1 pixel in ff
  	13-Aug-97 (CNF) - Patch 2 points in recip1
       13-Aug-97 (CNF) - Patch 1 point in sqrt2 table
	16-Sep-97 (CNF) - Patch 1 pixel in ff
	30-Sep-97 (MDM) - Added RWBIN patch
			- Patched RWBIN pixel 8489
	06-Oct-97 (EBZ) - Patch 1 pixel in ff
       20-Oct-97 (EBZ) - Patch 1 pixel in sqrt4 table
	13-Nov-97 (CNF) - Patch 1 pixel in ff	
       24-Nov-97 (EBZ) - Patch 1 pixel in vwbin table
	25-Nov-97 (EBZ) - Patch 1 pixel in ff
	01-Dec-97 (EBZ) - Patch 1 pixel in ff
	08-Dec-97 (EBZ) - Patch 1 pixel in vwbin table
       22-Dec-97 (EBZ) - Patch 4 pixels in ff
        7-Jan-98 (CNF) - Patch 5 pixels in rwbin
        2-Feb-98 (CNF) - Patch 1 pixel in recip1
	24-Feb-98 (EBZ) - Patch 1 pixel in vwbin table
	 2-Mar-98 (EBZ) - Patch 1 pixel in ff
	18-Mar-98 (EBZ) - Patch 1 pixel in ff
	20-Apr-98 (EBZ) - Patch 1 pixel in ff
       23-Apr-98 (EBZ) - Patch 1 pixel in ff
	12-May-98 (EBZ) - Patch 2 pixels in ff
	27-May-98 (EBZ) - Patch 1 pixel in sqrt2 table
	20-Oct-98 (CNF) - Patch 20 pixels in vwbin
	23-Oct-98 (EBZ) - Patch 1 pixel in vwbin table
	26-Oct-98 (EBZ) - Patch the same bad pix in vwbin table
	 3-Nov-98 (EBZ) - Patch 1 pixel in ff
	12-Nov-98 (EBZ) - Patch 1 pixel in ff
	 3-Feb-99 (EBZ) - Patch 1 pixel in sqrt3 table
	 3-Feb-99 (EBZ) - Patch 4 pixels in ff
	10-Mar-99 (EBZ) - Patch 1 pixel in ff
	19-Apr-99 (CNF) - Patch 4 pixels in ff
	23-Apr-99 (EBZ) - Patch 7 pixels in ff
	26-Apr-99 (EBZ) - Patch 1 pixel in ff
        4-Jun-99 (SEG) - Patch 1 pixel in sqrt4 table
	29-Jun-99 (SEG) - Patch 1 pixel in ff
        7-Jul-99 (SEG) - Patch 1 pixel in irbin table
       26-Jul-99 (SEG) - Patch 1 pixel in velocity2 table
       03-Aug-99 (SEG) - Patch 1 pixel in vwbin table
       23-Aug-99 (SEG) - Patch 1 pixel in velocity2 table
	26-Aug-99 (SEG) - Patch 1 pixel in ff
	20-Sep-99 (SEG) - Patch 2 pixels in ff
   	21-Sep-99 (SEG) - Patch 2 pixels in ff
	24-Sep-99 (SEG) - Patch 7 pixels in ff
	27-Sep-99 (EBZ) - Patch 18 pixels in ff
	27-Sep-99 (EBZ) - Changed table number to be 0 instead of a strange
			  number that was accidentally there
	13-Oct-99 (SEG) - Patch 1 bad pixel in ff
	26-Oct-99 (EBZ) - Patch 1 pixel in ff
	28-Oct-99 (EBZ) - Patch 1 pixel in velocity2 table
	15-Nov-99 (SEG) - Patch 1 pixel in the ff
	31-Dec-99 (SEG) - Patch 1 pxiel in the ff
	12-Apr-00 (EBZ) - Patch 1 pixel in ff
	24-Apr-00 (SEG) - Patch 1 pixel in ff
	 8-May-00 (EBZ) - Patch 2 pixels in vwbin table
	 9-Jun-00 (EBZ) - Patch 1 pixel in ff
	11-Jul-00 (SEG)	- Patch 2 pixel in ff
	17-Jul-00 (SEG) - Patch 1 pixel in vel2 table
		  (SEG) - Patch 1 pixel in vwbin table
	10-Aug-00 (SEG) - Patch 1 pixel in ff
	05-Oct-00 (SEG) - Patch 1 pixel in ff
	12-Oct-00 (SEG) - Patch 1 pixel in ff
	 9-Nov-00 (SEG) - Patch 2 pixels in ff
	 5-Dec-00 (SEG) - Patch 1 pixel in ff
	18-Apr-01 (SEG) - Patch 1 pixel in ff
	25-May-01 (SEG) - Patch 2 pixel in ff
	04-Jun-01 (SEG) - Patch 1 pixel in ff
	11-Jun-01 (SEG)	- Patch 1 pixel in recip1 
	28-Aug-01 (JLRS) - Patch 1 pixel in recip1
	19-Sep-01 (SEG)	- Patch 1 pixel in ff
	15-Oct-01 (SEG) - Patch 1 pixel in ff
	05-Nov-01 (SEG) - Patch 1 pixel in ff
	08-Nov-01 (SEG) - Patch 5 bad pixels in ff
	17-Dec-01 (SEG) - Patch 1 bad pixel in ff
	04-Jan-02 (SEG) - Patch 2 bad pixel in ff
	13-Feb-02 (SEG) - Patch 14 bad pixels in ff
	14-Feb-02 (SEG) - Patch 2 bad pixels in vwbin table
	10-Apr-02 (SEG) - Patch 1 bad pixel in ff
	30-Apr-02 (SEG) - Patch 1 bad pixel in ff
	14-May-02 (SEG) - Patch 1 bad pixel in ff
	17-May-02 (SEG) - Patch 1 bad pixel in ff
	05-Jun-02 (SEG) - Patch 1 bad pixel in ff
	13-Jun-02 (SEG) - Patch 1 bad pixel in ff
	25-Jun-02 (SEG) - Patch 2 bad pixels in lookup_recip1 table
	08-Jul-02 (SEG) - Patch 2 bad pixels in the ff
	14-Oct-02 (SEG) - Patch 6 bad pixels in the ff
	07-Nov-02 (JLRS) - Patch 1 bad pixel in the ff
	27-Nov-02 (SEG) - Patch 1 bad pixel in the ff
	13-Dec-02 (SEG) - Patch 1 bad pixel in the ff
	26-Dec-02 (SEG) - Patch 1 bad pixel in the ff
	17-Mar-03 (SEG) - Patch 1 bad pixel in the ff
	16-Apr-03 (JLRS) - patch 1 bad pixel in the ff
	25-Apr-03 (SEG) - Patch 1 bad pixel in vwbin table
	12-May-03 (SEG) - Patch 1 bad pixel in the ff
	18-Aug-03 (SEG) - Patch 1 bad pixel in the ff
	12-Sep-03 (SEG) - Patch 1 bad pixel in the lookup_recip1 table
	01-Oct-03 (SEG) - Patch 1 bad pixel in the ff
	10-Oct-03 (SEG) - Patch 1 bad pixel in the ff
	03-Dec-03 (SEG) - Patch 2 bad pixels in the ff
	01-Mar-04 (SEG) - Patch 1 bad pixel in the ff
	17-May-04 (SEG) - Patch 1 bad pixel in lookup_velocity2 table
	21-May-04 (SEG) - Patch 1 bad pixel in the ff
	21-Jul-04 (SEG) - Patch 1 bad pixel in the ff
	26-Jul-04 (ZAF) - Patch 1 bad pixel in the ff
	02-Aug-04 (SEG) - Patch 1 bad pixel in the ff
	16-Aug-04 (SEG) - Patch 1 bad pixel in the ff
       14-Sep-04 (SEG) - Patch 1 bad pixel in the ff
       25-Oct-04 (SEG) - Patch 1 bad pixel in the ff 
	10-Nov-04 (SEG) - Patch 1 bad pixel in the lookup_sqrt4 table
       29-Nov-04 (SEG) - Patch 2 bad pix in the ff
	31-Jan-05 (SEG) - Patch 1 bad pixel in the ff
	20-Feb-05 (SEG) - Patch 1 bad pixel in the rwbin_5005 table
	22-Feb-05 (SEG) - Patch 1 bad pixel in the ff
	10-Mar-05 (SEG) - Patch 1 bad pixel in the ff
	26-May-05 (SEG) - Patch 2 bad pixels in the ff
	27-Jun-05 (SEG) - Patch 1 bad pixel in the lookup_sqrt4 table
	30-Jun-05 (SEG) - Patch 1 bad pixel in the rwbin_5005 table
	01-Jul-05 (SEG) - Patch 1 bad pixel in the ff
	13-Jul-05 (SEG) - Patch 1 bad pixel in the ff
	18-Jul-05 (SEG) - Patch 1 bad pixel in the ff
	26-Aug-05 (SEG) - Patch 1 bad pixel in the ff
	01-Sep-05 (SEG) - Patch 1 bad pixel in the ff
       06-Sep-05 (SEG) - Patch 1 bad pixel in the vwbin_6007 table
       31-Oct-05 (SEG) - Patch 1 bad pixel in the ff
	09-Dec-05 (SEG) - Patch 6 bad pixels in the ff
	01-Jan-06 (SEG) - Patch 1 bad pixels in the ff
	09-Jan-06 (SEG) - Patch 1 bad pixel in the ff
	12-Jan-06 (SEG) - Patch 1 bad pixel in the ff
       17-Jan-06 (SEG) - Patch 1 bad pixel in the vwbin_6007 table
       07-Feb-06 (JLRS) - Patch 1 bad pixel in the ff
	14-Feb-06 (ZAF) - Patch 1 bad pixel in the vwbin_6007 table
	22-Feb-06 (SEG) - Patch 2 bad pixels in the ff
	13-Mar-06 (SEG) - Patch 1 bad pixel in the ff
	24-Apr-06 (SEG) - Patch 1 bad pixel in the lookup_velocity2 table 
	26-Apr-06 (SEG) - Patch 1 bad pixel in the irbin_7005 table
	16-May-06 (HHT) - Patch 1 bad pixel in the ff
	22-May-06 (SEG) - Patch 1 bad pixel in the vwbin_6007 table
	19-Jun-06 (SEG) - Patch 2 bad pixels in the ff
       31-Jul-06 (SEG) - Patch 1 bad pixel in the ff
	24-Aug-06 (SEG) - Patch 1 bad pixel in the ff
	25-Sep-06 (SEG) - Patch 1 bad pixel in the ff
	30-Oct-06 (SEG) - Patch 1 bad pixel in the ff
	08-Nov-06 (SEG) - Patch 1 bad pixel in the ff
	17-Nov-06 (SEG) - Patch 2 bad pixels in the rwbin table
	13-Dec-06 (SEG) - Patch 3 bad pixels in the ff

break_file, outfil, dsk_log, dir000, filnam
if (n_elements(descr) eq 0) then descr = 'Load something to address ' + string(addr, format='(z8.8)')

if (keyword_set(append)) then begin
    openu, lun, outfil, /get_lun, /append
    printf, lun, ' '
    printf, lun, '##--------------------------------------------------------------
    printf, lun, ' ' 
end else begin
    ssw_file_delete, outfil
    openw, lun, outfil, /get_lun
    printf, lun, '# File: ' + outfil
    printf, lun, '# Created: ' + !stime
    for i=0,n_elements(comment)-1 do printf, lun, '# ' + comment(i)
    printf, lun, '#'
    printf, lun, 'program "%Z% MODULE: %M% RELEASE: %R%.%L% CREATED: %G% %U%"'
    printf, lun, 'source "' + outfil + '"'
    printf, lun, 'descr "' + filnam + ' - ' + descr + '"'
end

n = n_elements(list)

fmt0 = '(" 0x", z4.4, 1x)'
fmt = '(' + strtrim(n,2) + fmt0 + ')'
source = ' 0x8000 0x8810 '
slist = zformat(list, 4, /mdi_leading, /string)
idest = '50000000'x + addr
idest = '60000000'x + addr
idest = base_addr + addr
;dest = string( (idest mod '10000'x), (idest/'10000'x), format='(2'+fmt0+')')
dest = zformat( [(idest mod '10000'x), (idest/'10000'x)], /mdi_leading, /string)
dest = zformat( [idest and 'ffff'x, ishft(idest, -16)], /mdi_leading, /string)
fmt99 = '(a, i8, "  X:", i4, "  Y", i4, a)'

type = ' 10 '						;flat field (or) list
if (keyword_set(table)) then type = ' 8 '		;velocity table
if (keyword_set(gen_data)) then type = ' 11 '		;flat field in page 10 (simple data)

printf, lun, ' '
printf, lun, '# *********** Fixing Pixel: ', addr, addr mod 1024, addr/1024, '****************', format=fmt99
printf, lun, 'tcb mbdpml 0x2000 0x0000 \
printf, lun, '      ' + slist
printf, lun, '
printf, lun, 'tcb mbdpml 0 0x547a 0xa390	## patch to remove increment
printf, lun, 'tcb mbiptbl ' + type + dest + '  0   0 0x2000 ' + strtrim(n,2)
printf, lun, 'wait time 90			## allow IP interrupt
printf, lun, 'tcb mbdpml 0 0x547a 0xa340	## patch back to original


free_lun, lun
end


mk_fits_head [2] $SSW/soho/mdi/idl_old/gen/fits/mk_fits_head.pro
[Previous] [Next]
NAME:
	mk_fits_head
PURPOSE:
	Given a data array, build the minimal FITS header.
CALLING SEQUENCE:
	head = mk_fits_head(data)
	head = mk_fits_head(data, time='17:00:01', date='27-Oct-92')
INPUT:
	data	- The data array
 CALLS: ***
	GET_NBYTES, data_type [1], data_type [2]
 CALLED BY:
	DISPLOI_MON5K, mk_limb_pixmap, mk_mdi_fits, norik_name_fix, raw_list2pixmap
	rd_hirsaiso, read_mdi, wrt_fits [1], wrt_fits [2]
OPTIONAL KEYWORD INPUT:
	time	- Time that the image was taken
	date	- The date that the image was taken
	comment	- Optional comments
	history	- Optional history information
OUTPUT:
	ASCII string array with the FITS header.  The length is only the
       length used, and the END string is not included
HISTORY:
	Written 27-Oct-92 by M.Morrison
	 2-Feb-93 (MDM) - Modified to save floating points properly
	17-Mar-94 (MDM) - Modified to make the string length 80 
			  characters
	28-Jun-94 (MDM) - Modified to save double points properly
	30-Aug-96 (MDM) - Modified to shift the values over 1 character
			  to be proper FITS standard.


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

   Purpose: make FORM-ready html segment for times (start [and stop])

   Input Paramters:
      start_select - set default start time
      stop_select  - set default stop time

   Calling Sequence:
      outarray=mk_formt_html(start_select [,stop_select], t0=tim0, t1=tim1)
 CALLS:
 CALLED BY
	html_form_addtime [1], html_form_addtime [2], html_form_addtime [3]


mk_gif_mag_index $SSW/soho/mdi/idl/ops/mk_gif_mag_index.pro
[Previous] [Next]
NAME:
	mk_gif_mag_index

PURPOSE:
	To write a gif_mag index in html.

SAMPLE CALLING SEQUENCE:
	mk_gif_mag_index
	mk_gif_mag_index, outfil, year

INPUTS:
	outfil	-if not passed in, will write to the file 
		/md86/public_html/health_mon/gif_mag_index.html
	year	-if not passed in will write only the current year

 CALLS: ***
	CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], REVERSE, SSW_FILE_DELETE
	concat_dir [4], fid2ex [1], fid2ex [2], file_list [1], file_list [2], fmt_tim [1]
	fmt_tim [2], int2secarr [1], int2secarr [2], ut_time [1], ut_time [2]
HISTORY:
	Written 20-Aug-96 by Sabrina Qwan
	31-Jul-97 (SQ) -Added year option and Continuum column.
	31-Jul-97 (MDM) - Changed "infil" to "outfil"
			- Changed default outfile to not have "test"
			- Delete the output file before writing
	 9-Aug-97 (MDM) - Changed mdiems reference to mdiwww
	16-Oct-97 (MDM) - Corrected FILE_LIST call
	 3-Feb-99 (CED) - Changed /mde0 to /md86
       12-Feb-99 (RIB) - Changed html header to include base ref
       13-Feb-99 (RIB) - General cleanup; source files in /md86/gif
       19-Nov-99 (RIB) - Changed /md86/public_html to MDI_WEB_ROOT
                         changed /md86/gif to MDI_GIF_DIR
      6-Dec-2000 (RIB) - Commented out html header base ref


MK_GIS_PLT $SSW/soho/cds/idl/sci/cal/gis/inten/mk_gis_plt.pro
[Previous] [Next]
 Project     : SOHO - CDS     
                   
 Name        : MK_GIS_PLT
               
 Purpose     : Plot engineering data from all four GIS detectors on one plot.
               
 Explanation : This is a general routine for displaying engineering data from
		all four GIS detectors on a single plot.  The plot is designed
		to look like a strip chart, with tick marks on the Y axis
		being used only to give a relative indication of the actual
		data values being plotted.  The X axis is marked in regular
		time increments, which are appropiate to the temporal range
		of the data set.  Currently, up to 8 days worth of data can
		be plotted.  Although this routine is designed to work with 
		data from the GIS detectors, it could be used with other
		engineering data as well.    
               
 Use         : 	MK_GIS_PLT, data1, data2, data3, data4, [keywords]
    
 Inputs      : dt1	Engineering data from GIS detector 1. 
		dt2	Engineering data from GIS detector 2.
		dt3	Engineering data from GIS detector 3.
		dt4	Engineering data from GIS detector 4.

 Opt. Inputs : None.
               
 Outputs     : None, but procedure creates a plot.
               
 Opt. Outputs: None.
               
 Keywords    :	TIME		UTC time values to plot detector data against.
				This must be included in any call to this 
				procedure.
		PLTNAME		Text string to use for plot title.
		Y_AXIS_LABEL	Text string to use as general Y axis label.
		RANGE		Range of data values to plot.  Data values
				outside of this range will plotted in another
				detectors graph space.
		D1_LABEL	Text string to label data from detector 1.
		D2_LABEL	Text string to label data from detector 2.
		D3_LABEL	Text string to label data from detector 3.
		D4_LABEL	Text string to label data from detector 4.
		UNITS 		Text string describing the units which the
				data values represent. 
		PRINT		When set, spacing between certain elements 
				is adjusted to allow for differences between
				plotting to a printer and plotting to the 
				display.

 Calls       : ***
	ANYTIM2UTC [1], ANYTIM2UTC [2], MK_GISPLOT_LBL, SEC2UTC, UTC2SEC, UTC2STR
 CALLED BY:
	GISPLOT, MK_GISPLOT_LBL
 Common      : None.
               
 Restrictions: All four datasets must use the same time scale.  The time
		values must be included in any call to this procedure.  
               
 Side effects: None
               
 Category    : Engineering.
               
 Prev. Hist. : None

 Written     : Ron Yurow, SM&A, 13 May 1999
               
 Modified    : Version 1, Initial Release		RY, 13 May 1999

 Version     : Version 1, 13 May 1999


MK_GISPLOT_LBL $SSW/soho/cds/idl/sci/cal/gis/inten/mk_gis_plt.pro
[Previous] [Next]
 Project     : SOHO - CDS     
                   
 Name        : MK_GISPLOT_LBL
               
 Purpose     : Create text strings to label tick marks for MK_GIS_PLT
               
 Explanation : This function, which is only designed to work with MK_GIS_PLT
		is used to convert time values into text strings which can be
		used as tick mark labels.  The format to use when creating the
		text strings is determined by the value of label_type.  The
		legal values for this parameter are:
		
		1:	Seconds
		2:	Minutes
		3:	Hours
		4:	Days
		5:	Months
		6:	Years

		Note that Months and Years are not yet implemented.

               
 Use         : 	MK_GISPLOT_LBL, time, label_type
    
 Inputs      : time		Time value expressed in seconds to convert to
				text string.
		label_type	The format to use when creating the text label.

 Opt. Inputs : None.
               
 Outputs     : None.
               
 Opt. Outputs: None.
               
 Keywords    :	None.

 Return Value: The text string to use as a tick mark label.

 Calls       : ***
	ANYTIM2UTC [1], ANYTIM2UTC [2], MK_GIS_PLT, SEC2UTC, UTC2SEC, UTC2STR
 CALLED BY:
	MK_GIS_PLT
 Common      : None.
               
 Restrictions: None.
               
 Side effects: None.
               
 Category    : Engineering.
               
 Prev. Hist. : None.

 Written     : Ron Yurow, SM&A, 12 May 1999
               
 Modified    : Version 1, Initial Release		RY, 12 May 1999

 Version     : Version 1, 12 May 1999


mk_gset $SSW/soho/cds/idl/sci/plan/tech/mk_gset.pro
[Previous] [Next]
 Project     : SOHO - CDS

 Name        : mk_gset

 Purpose     : To load, retreive, modify and add entries to the GSET database

 Explanation : The GSET database contains information needed to set up the
		GIS for use.  It includes HVs, LUTs etc.

 Use         : IDL> mk_gset

 Inputs      : Prompts user

 Opt. Inputs : None

 Outputs     : Modifies GSET database as necessary

 Opt. Outputs: None

 Keywords    : None

 Calls       : ***
	ADD_GSET, ADD_WAVECAL, CW_BGROUP, CW_FIELD, CW_PDMENU, GET_GSET, GET_WAVECAL
	GSET_LIST, GSET_MODIFY, GSET_RETRIEVE, GSET_SAVE, GSET_WAVECAL, LIST_GSET
	MK_GSET_EVENT, MOD_GSET, REVERSE, XMANAGER
 Restrictions: None

 Side effects: None

 Category    : GIS, planning

 Prev. Hist. : None

 Written     : ERB MSSL/UCL 10 November 1995

 Modified    : ERB 30 January 1996
		 New definition of the database - LUTs are byte, 
		 detector enabled flag added.
		 FFB  can only be +/- 12V
		ERB 6 February 1996
		 Bug fix to display LUT parameters
		ERB 31 May 1996, v1.4
		 Allow V4/V3 IDl compatibility
		ERB 8 July 1996, v2.0
		 Add automatic wavelength calibration based on LUT start/stop
		Version 2.5, 18-Apr-1997, William Thompson, GSFC
			Temporary fix to put launch date of '2-Dec-1995' as
			effective date.
		ERB 30 September 1999
		 printed zone text as well as numbers

 Version     : Version 2.6, 30 Sept 1999


MK_HEAD_CAT $SSW/soho/cds/idl/util/misc/mk_head_cat.pro
[Previous] [Next]
 Project     : SOHO - CDS     
                   
 Name        : MK_HEAD_CAT
               
 Purpose     : Create/update CDS FITS header catalogue.
               
 Explanation : Reads CDS FITS headers and adds entries to catalogue.
               
 Use         : IDL> mk_head_cat [, update=update, all=all, year=year]
    
 Inputs      : None
               
 Opt. Inputs : upate - specifies the number of previous days the update
                       should cover  ie "update=5" means update for any
                       files created in the last 5 days.
               
 Outputs     : Catalogue is written to cds_header_cat and into save files
               subdivided by year ie cds_header_cat.96  etc
               
 Opt. Outputs: None
               
 Keywords    : ALL  - if set then process all existing files.
               YEAR - only deal with that year's data.
               NOENV - do not redefine env variables

 Calls       : ***
	ARCMIN2HEL, BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], CDSHEADFITS
	CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], DATATYPE [1], DATATYPE [2]
	DATATYPE [3], FIND_FILES, FMT_VECT, FXPAR [1], FXPAR [2], GET_DATAWIN, GET_UTC
	HC_ADD_COMMENT, HC_UPDATE, HEADCAT, MJD2DATE, RD_ASCII [1], RD_ASCII [2]
	REM_DUP [1], REM_DUP [2], REM_DUP [3], STR_PICK, TRIM, USE_EOF_CAT, USE_EOF_DATA
	UTC2TAI, break_file [4], concat_dir [4]
 Common      : None
               
 Restrictions: None
               
 Side effects: None
               
 Category    : Catalogues
               
 Prev. Hist. : None

 Written     : C D Pike, RAL, 9-Apr-97
               
 Modified    : Add year keyword and only keep yearly catalogues.  CDP, 23-Jul-97
               Added NOENV
               Adjust for year 2000
               Adjust for year 2001 and beyond

 Version     : Version 7 05-Jan-04


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

 Name		: MK_IMAGE
	
 Purpose	: Make C1 image.
	
 Explanation	: This procedure will make C1 image of the day.For selected day
		  this routine will find the last pair of on-line and off-line 
		  images and  will process them to lasco 'level .99'.
	 
 Use		: IDL>mk_image      
              

 Keyword parameters:
	IMG0:
	IMG1:
       FILTER: The filter: filter='Fe XIV' (string) , default value
       POLAR:  The polarizer: polar='Clear' (string) , default value
       ROWS:   The number of rows in image: rows=640 (integer), default value
       COLS:   The number of cols in image: cols=768 (integer), default value
       LEBP:   The LEB program: lebp = 'Sum/Diff' (string)
       WAVE:   The off-line and on-line wave length: wave=[5309.2,5302.4]
       SCREEN: Display result to the X-Window: /screen
       FITS:   Write result as a FITS file: /fits 
       PS:     Write result as a PostScript file: /ps
       GIF:    Write result as a GIF file: /gif
       ARCHIVE:Write result as a GIF file in 'lastimage.gif' format  
       COSMIC: Remove cosmic rays: /cosmic
       OWNCT:  Use own color table: ownct (structure: ownct.r,ownct.g,ownct.b)
       LCT:    Load IDL color table: lct=8 GREEN/WHITE LINEAR
       GCT:    Gamma_ct: gct=.25  
       UP:     To cut an image at a certain upper value of its histogram: up =.9996
       LOW:    To cut an image at a certain lower value of its histogram: low=.01
       MINBOX: To cut an image at the median minimum of the background:   /minbox
      
 Example	: IDL> MK_IMAGE,IMG0,HDR0,IMG1,HDR1
		  Without any keywords program will use default values.
;
 Calls		: ***
	CCOSMICS, CUT_IMG, DATATYPE [1], DATATYPE [2], DATATYPE [3], FXPAR [1], FXPAR [2]
	GAMMA_CT, GETSUNCEN, GET_BIAS, GET_SOLAR_RADIUS, LAYOUT, LOADCT, MASK_INX
	READFITS [1], READFITS [2], READFITS [3], STRUCT2FITSHDR, UNDEFINE, WRITEFITS [1]
	WRITEFITS [2], WRITE_GIF, WRITE_LAST_C1, WRITE_PS
 Side effects	: None.

 Category	: Image Display. Data analysis.

 Written	: Borut Podlipnik, MPAe Oct. 15 1997.

 Modified	:  BP	13 Jan 1998 - Added keyword TIME
		   BP   05 May 1998 - Added keyword LOG

 Version	: 1.0  10/15/97 LASCO IDL LIBRARY


MK_IMG $SSW/soho/lasco/idl/inout/mk_img.pro
[Previous] [Next]
 Project     : SOHO - LASCO/EIT
                   
 Name        : MK_IMG
               
 Purpose     : Process FITS files for display.
               
 Explanation : This procedure  reads an image and 
		normalizes to the exposure time.
		(Not implemented: The on_off_diff keyword results in a movie
               where each on line image is displayed with a nearby offband image
               subtracted.)
               
 Use         : result = MK_IMG( filename, bmin, bmax, /TIMES, /DIFF, /NO_NORMAL, $
                        UNSHARP=unsharp, PAN=pan, COORDS=coords, BOX=box, $
                        /RATIO, /USE_MODEL,/FLAT_FIELD,/ON_OFF_DIFF,/MASK_OCC,/LG_MASK_OCC,
                        /RADIAL, /DEGRID, /FIXGAPS, /LOG_SCL, /SQRT_SCL, $
			 FILL_COL=fill_col, SAVE=save)

 CALLED BY:
	COMBINE_IMG, MK_ONE_DEB_GIF, carrmapmaker2
      Example: IDL> result = MK_IMG( '32002333.fts', -100, 100, shdr, /DIFF)

      Example: If you want to display BYTARR images straight from the FITS files without
		any scaling use:
               IDL> result = MK_IMG( filename, 0, 255, /NO_NORMAL)
    
 Inputs      : filename : string containing the filename
               bmin, bmax : Minimum and maximum DN for BYTSCL.
               
 Outputs     : processed image array.
		shdr	STRARR	FITS header as a string array
               
 Keywords    : The following keywords apply to all telescopes (C1,C2,C3,EIT)

	
	POINTFILT  : Implements point_filter on raw image; set equal to [boxsize, sensitivity, iterations]
			default is [5,7,3]
	SUNC	   ; Returns sun center structure {xcen, ycen}
	BKG	   ; Set equal to background image to use instead of GETBKGIMG; should 
		 	be normalized to exptime and correctly sized
	/INIT1	   ; Set to reset COMMON block; MK_IMG always returns zero for this value
	/EXPFAC    ; set equal to variable which contains exp correction factor 
		 	(-1 if not found)
	/ROLL      : Apply roll correction if GT 2 deg.; returns value of roll angle 
	/LIST	   : for use with PROCESS_LIST procedure
	/LOGO	   ; Add LASCO logo to bottom right corner
	/OUTMASK   : apply outer mask only
	/INMASK    : apply occulter mask only
	/NO_DISPLAY: do not display image as it is processed
	/NX	   : Desired final size of image; superseded by PAN
	/CREM	   : Set this keyword if doing CR removal; filename in or will prompt
	/HIDE_PYLON: Replace (byte) values below setting with median
	/DBIAS	   : Add this to bias before subtracting
	/NORM	   : Apply linear normalization function based on image median (5/99)
	/DO_BYTSCL : Apply bytescaling (default is not to)
	/LEE_FILT  : Apply LEEFILT function to filter noise.
       /TIMES     : Set this keyword to display date and time in images.
	/DIFF      : Set this keyword to make a difference image.  The 
			     model is subtracted.
	/NO_NORMAL : Don't normalize exposure times to that of the first image.
	/NO_SORT   : Don't sort by time in header.
       UNSHARP    : Set this keyword to make a movie of unsharp masked images.
                    The value of the keyword if any is set to the size of the
                    unsharp mask, default=25
                    Example:  A value of 9 would form a 9x9 unsharp mask
	/RATIO     : If using diff or running_diff display data as ratio of 
			image/reference frame
       /MASK_OCC  : applies a sun sized circle and removes the internal part of the 
			image and masks outer image
	/LOG_SCL   : Applies ALOG10() function to image before byte scaling
	/SQRT_SCL  : Applies SQRT() function to image before byte scaling
	/FIXGAPS   : Set to 1 to fill data gaps in image with color specified by 
			FILL_COL
		     Set to 2 to fill data gaps in image with values from previous 
			image
	FILL_COL   : Set this keyword to the color index to use for data gaps and 
			occ masks.
	SAVE       : For use in batch mode.  Set this keyword to the name of the 
			.mvi file to save as.  Routine will save movie and then exit.
	PAN        : Default is to resize images to pixel size of the first image.  
			Set this keyword to perform additional scaling.  
			Example: set to 0.5 for 2x2 rebinning.
	COORDS     : Set to 4 element array of image coordinates to use relative to 
			1024x1024 image.
		 	Example: COORDS=[0,1023,128,895] for C2 Equatorial Field
	BOX        : Set to 4 element array of image coordinates to use for box 
			normalization relative to 1024x1024 image. Images are scaled 
			relative to average counts in box of first image. 
			Example: BOX=[461,560,641,740]
	REF_BOX    : Set to avg counts specified in BOX otherwise first image is used

      : The following keywords apply only to C1

       /ON_OFF_DIFF: differences each on line image with an image taken at a continuum 
			wavelength
       /FLAT_FIELD : normalizes each image by a door closed image to remove the solar 
			spectrum
       /RADIAL	    : applies a radial filter

      : The following keywords apply only to C2 and C3

	/USE_MODEL : If using diff or running_diff use background corona model
                 as base frame.  USE_MODEL=1 for closest any_year monthly model
                                 USE_MODEL=2 for closest monthly model (1 year)
                                 USE_MODEL=3 for for overall yearly model
	/DISTORT   : Apply distortion correction for C2 or C3

       : The following keywords apply only to EIT

       /DEGRID	   : applies the degridding algorithm

 Calls       : ***
	ADD_LASCO_LOGO, BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], C2_WARP, C3_WARP
	DATATYPE [1], DATATYPE [2], DATATYPE [3], EIT_PREP, FXADDPAR [1], FXADDPAR [2]
	FXHMAKE [1], FXHMAKE [2], FXPAR [1], FXPAR [2], GETBKGIMG, GET_EXP_FACTOR [1]
	GET_EXP_FACTOR [2], GET_SEC_PIXEL, GET_SUN_CENTER [1], GET_SUN_CENTER [2]
	GET_SUN_CENTER [3], HEADFITS [1], HEADFITS [2], HEADFITS [3]
	LASCO_FITSHDR2STRUCT, LASCO_READFITS [1], LASCO_READFITS [2], LEEFILT, MAXMIN
	OFFSET_BIAS, READFITS [1], READFITS [2], READFITS [3], REDUCE_STD_SIZE, REMOVE_CR
	ROT, SHARPEN, SOLAR_EPHEM, STR2UTC [1], STR2UTC [2], STR2UTC [3], TRIM, TVCIRCLE
	UTC2TAI, VALID_NUM [1], VALID_NUM [2], VALID_NUM [3], break_file [4], point_filter
 Side effects: 
               
 Category    : Image Display.
               
 See Also    : 
	 @(#)mk_img.pro	1.11 10/03/06 :NRL Solar Physics
	11Apr01 - Change r_occ_out for C2
	13Dec01 - Fix lower left corner mask problem
	13Mar02 - Implement ROLL keyword, 15Jan04 - Add header values, 17 Dec 1998
	17Jul01 - Use separate mask for pylon and c3mask; change how dbias is computed for C3
	18Jul01 - Increase upper limit for HIDE_PYLON
	18Sep02 - Add POINTFILT keyword; add some VERBOSE comments
	1Apr02 - DON'T divide EIT images by exptime
	1Jun01 - Move REMOVE_CR and RUNNING_DIFF to before ratio/difference
	20Nov01 - Add BKG keyword; do not match pylon if BKG is set
	20Sep06 - Assume ffv output unless COORD; fix bmax for subfield
	21Nov00 - Accept image array as input for fullname
	25Apr06 - Replace all instances of "image" with "imaje" because of conflict with IDL pro of same name
	25Apr06 - Use new ROLL keyword in get_sun_center.pro
	3Sep03 - Add COMMON get_im for logging with carrmapmaker2.pro
	4Apr01 - Always use any_year=0 for images after 2000/12/03
	7Aug02 - Add images common block, 8Apr02 - Modify [hv]size
	8Jun01 - Use EIT_PREP; move READFITS to middle; add PROFILE keyword and use wset
	Based on MKMOVIE.PRO by Scott Paswaters
	CMK 16 Feb 97 - added all C1 related features and changed the procedure name to mkc1movie2
	DISTORT keywords
	INIT1 keywords; use one value for maskfill when doing a list;, Jan 1996.
	Modified    : SEP 29 May 96 - Place frames into multiple pixmaps instead of 1 large
	NBR 04 Dec 99 - Add default bmin and bmax
	NBR 06 Nov 98 - Change default fillcol to median(image); change LG_MASK_OCC for c3 to use C3clearmask2.dat
	NBR 17 Dec 98 - Change to MK_IMG; add LEE_FILT, NO_BYTSCL, NRL
	NRL/Interferferometrics, Prev. Hist. : None.
	RAH 02 Feb 98 - Now normalizes to calculated exposure time (if data exists).
	RAH 13 Dec 96 - added check for daily median image which doesn't have bias
	RAH/SEP 14 Mar 97 - integrated mkc1movie2 features into mkmovie
	SEP  9 Jul 96 - Read in img headers as structures and pass to wrunmovie
	SEP 01 Oct 97 - added /SUM keyword to OFFSET_BIAS call
	SEP 13 Nov 97 - Added /FLAT_FIELD for EIT
	SEP 18 Oct 96 - Add option to pass in STRARR of image names instead of filename.
	SEP 21 Mar 97 - corrected bias subtraction for LEB summed images
	SEP 22 Oct 97 - fixed divide by zero error for /RATIO option
	SEP 24 Oct 96 - added /RATIO and /USE_MODEL options
	SEP 31 Oct 97 - Binned images are scaled (/bin^2) for level_05 images only
	Version     :, Written     : Nathan Rich
	add EIT_NORM_RESPONSE and make DEGRID and FLATFIELD automatic for EIT
	add FILL_COL, add OUTER keyword; Use updated EIT_DEGRID
	added /NEW flag to EIT_DEGRIDN, eit_flat, f[hv]size, fix roll, for profile, nbr, nbr
	nbr, nbr, nbr, nbr, nbr, nbr, nbr, nbr, nbr, nbr, nbr, nbr, nbr, nbr, nbr, nbr, nbr
	nbr    Aug 99 - Add NX keyword
	nbr    Jul 99 - use first of two filename strings in 'fullname' to remove CRs; Move Leefilt before BYTSCL; Make MASK_OCC work for non-byte results; change HIDE_PYLON
	nbr    Mar 00 - Automatically correct for different bias value in bkg model for c3 (default); use INMASK and outmask keywords; add LIST keyword; add 1 to image for ALOG10 to prevent negative output
	nbr    Sep 99 - Add NO_DISPLAY keyword
	nbr  May 00 - Change USE_MODEL numbering; add shdr output; change NO_BYTSCL to DO_BYTSCL
	nbr  Nov 00 - Change mask radius for C2 LG_MASK_OCC; add CIRC_WIDTH keyword;
	nbr  Oct 00 - Add NO_PROFILE
	nbr 13 Apr 99 - ALlow replace gaps with prev image
	nbr 17 May 99 - Add FNAME keyword
	pixmap because of limitations on window size in IDL.


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

   Purpose: recent EIT full disk movies->WWW  (illustrate image2movie...)

   Input Parameters:
      NONE

   Optional Keyword Parameters:
      waves   - array of EIT wavelengths to include (default = all)
      outsize - output size of movie frames (default=280)
      mpeg    - if set, make the movies MPEG (Default = gif animation)
      nimg    - number of images to include (most recent NN for each WAVE)
                (default=30)

   Calling Examples:
      IDL> mk_lasteit_movie                       
      IDL> mk_lasteit_movie, outsize=100, nimg=100, waves=[195,304], /mpeg

   Calls: ***
	ARR2STR [1], Arr2Str [2], CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3]
	anytim2ex [1], anytim2ex [2], concat_dir [4], data2files, data_chk [1]
	data_chk [2], eit_colors, ex2fid [1], ex2fid [2], file_append [1], file_append [2]
	get_eit_info, get_logenv [1], get_logenv [2], html_doc, http_names, image2movie
	lasteit, prstr [1], prstr [2], str_replace [1], str_replace [2], strjustify
	ut_time [1], ut_time [2]
   History:
     15-mar-1997 - S.L.Freeland 
     18-mar-1997 - S.L.Freeland - change movie label times to ECS format
                                  thumbnail frame size ->  80x 80
                                  [via image2movie parameters]
                                  add rename as last step (assume cron only)
     21-mar-1997 - S.L.Freeland - if batch mode, move to scratch area 1st
     16-jul-1997 - S.L.Freeland - add  /JAVA option (pass to image2movie)
     22-jul-1997 - S.L.Freeland - add /loop switch in image2movie,/gif call 
     19-Mar-1997 - S.L.Freeland - boost contrast
     24-Oct-1998 - S.L.Freeland - pass PREPIT and SOBEL_WEIGHT->lasteit
     28-Oct-1998 - S.L.Freeland - pass DERIV_HIST to lasteit     
      9-Jun-1999 - S.L.Freeland - made top levels in movie subdirectory
      6-Oct-2000 - S.L.Freeland - _extra passed->img2movie

   Restrictions:
     User needs write access to $path_http/... area
     Assume html HEADER and TRAILER template files are available
     If desired, a call to eit_prep would be inserted after <lasteit> call


mk_limb_pixmap $SSW/soho/mdi/idl/ops/mk_limb_pixmap.pro
[Previous] [Next]
NAME:
	mk_limb_pixmap
PURPOSE:
	To unwrap the limb figure annulus into a rectangle
SAMPLE CALLING SEQUENCE:
	mk_limb_pixmap, 'cf50'
 CALLS: ***
	CONGRID [1], CONGRID [2], CONGRID [3], RFITS [1], RFITS [2], RFITS [3], SXADDPAR [1]
	SXADDPAR [2], SXADDPAR [3], gt_day [1], gt_day [2], mk_fits_head [1]
	mk_fits_head [2], prstr [1], prstr [2], rd_tfile [1], rd_tfile [2]
	str_replace [1], str_replace [2], wrt_fits [1], wrt_fits [2]
HISTORY:
	Written 1995 by M.Morrison
	 2-Apr-96 (MDM) - Put on-line
V1.1	17-May-96 (MDM) - Added /mk_cfil option to make the format file
			- Added /demo for certain portion of the code


mk_list $SSW/soho/lasco/idl/exposure/mk_list.pro
[Previous] [Next]
 MK_LIST
	Form a "Standard" mask image from a list or more usually from
	a set of parameters to be matched.

 Usage:
	list=mk_list( <keys> )


 Keywords: (all input)
	coronagraph	int	- Which coronagraph (1, 2 or 3)
	exposure	float	- 1-elements use exposures */10%,
				2-elements use exposures in given
				range, absent: use any exposure.
	filter		string	- Specify the filter or FP setting
				required (default "Clear")
	polarizer	string	- Specify the polarizer setting to be
				used (default clear)
	pixels		int	- Specify the size of image to use
                                 2-element array (default [1024,
                                 1024]).
	dir_pattern	string	- Specify a restricted set of
                                 directories in which to find the
                                 images (if used, this must be in a
                                 form acceptable as an argument to
                                 "find")
	upper_left	int	- Specify the location of the
                                 upper-left corner of the image
                                 (useful to distingush (say)
                                 half-resolution-whole-field images
                                 from full-resolution-quarter-field
                                 images, 2-element array (default [20,1]).

 Effects:
	A list of files matching the specified properties is
	generated.

 WARNING:
	It is the responsibility of the user to ensure that the image
	set being used is homogeneous.

 CALLS: ***
	RSTRPOS
 CALLED BY:
	w_stdim_list
 History:
	Original (modified from mk_stdim_list): 15/5/96, SJT
	Substantially improved: 14/5/96; SJT


mk_list_image $SSW/soho/mdi/idl/ops/mk_list_image.pro
[Previous] [Next]
NAME:
	mk_list_image
PURPOSE:
	To convert the list definition into an image showing which
	pixels were binned into which output pixels
SAMPLE CALLING SEQUENCE:
	img = mk_list_image('list_crop.fits', /display)
	img = mk_list_image('list_limb.fits', /display)
	img = mk_list_image(test=1)
 CALLS: ***
	RFITS [1], RFITS [2], RFITS [3], UNSIGN, dec2sun [1], dec2sun [2]
HISTORY:
	Written 2-Jun-95 by M.Morrison
	25-Jul-95 (MDM) - Cleaned up and added documentation
	 2-Aug-95 (MDM) - Fixed error in IRBIN maker - NBIN was not being
			  used properly when getting the skip/take address
			  (for NBIN not equalling 1)
        6-Oct-95 (MDM) - Modified to work properly when the list does not have
                         any padding at the end


mk_list_load $SSW/soho/mdi/idl/ops/mk_list_load.pro
[Previous] [Next]
NAME:
	mk_list_load
PURPOSE:
	TO take a 1-D vector list and a start address and to
	modify the contents so that it is consistent and then
	make the .src load file (telecommands)
SAMPLE CALLING SEQUENCE:
	mk_list_load, table_start, outfil, list
	mk_list_load, '8800'x, 'loi3.src', infil='/mdisw/dbase/ops/lists/loi3.fits'
 CALLS: ***
	RFITS [1], RFITS [2], RFITS [3], UNSIGN, WRT_LD_CMD, set_list_addr
RESTRICTIONS:
	There are several portions of the IP table load command which
	are hard-wired and they need to be paramters or need to be
	found in a different file.  (all of the LRDXFR parameters)
HISTORY:
	Written 24-Jul-95 by M.Morrison
	25-Jul-95 (MDM) - Cleaned it up a bit.


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

   Purpose: create/update generic file which maps files into pathnames

   Input Parameters:

   Optional Keyword Paramters:
	sw	- if set, the current $ys... idl routines are mapped (default)
	data	- if set, the current online data is mapped

   Category:
       system, swmaint, unix_only

   History - slf,  8-Aug-1992
	      slf, 19-nov-1992	; some upgrades for data path function
	      slf,  7-jan-1993  ; use DIR_GEN_SETUPD (DIR_GEN_SETUP/data)
	      slf, 13-Jan-1993  ; use DIR_SITE_SETUPD if exists
	      slf, 13-may-1993  ; exclude /ys/atest_NNNNN directories

   Motivation - location of reformatted data sets and software modules are
	not so dynamic to justify repeated (and slow) execution of findfile.
       Instead, the file-pathname relation ship can generally be mapped 
	once and remain valid for the session.   Associated routines would 
	read these files on the first access into a common area.  Subsequent 
	calls are via a table lookup for high efficiency.
		 
   Calling Sequence:
     	mk_mapfile [, /sw, /data]


 *** this routine should be run as a cron job (via idl_batch) a 
     few times a day

 CALLS: ***
	BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], CONCAT_DIR [1], CONCAT_DIR [2]
	CONCAT_DIR [3], DATA_PATHS, STR2ARR [1], STR2ARR [2], UNIQ [1], UNIQ [2], UNIQ [3]
	break_file [4], concat_dir [4], file_list [1], file_list [2], savegen [1]
	savegen [2]
 CALLED BY:
	sw2tree [1], sw2tree [2], ucon_check
  Restrictions: unix only.  Assumes links are used for software (/ys) and
	data directories (/ydnn).  Should be upgraded to allow environmentals
       and VMS logicals for these


mk_mdi_fits $SSW/soho/mdi/idl/ops/mk_mdi_fits.pro
[Previous] [Next]
NAME:
	mk_mdi_fits
PURPOSE:
	To make an MDI FITS file
SAMPLE CALLING SEQUENCES:
	mk_mdi_fits, infil, idset
	mk_mdi_fits, infil, idset, outdir, rescale=1.0
	mk_mdi_fits, infil, idset, outdir, qfd, 'maglc', rescale=1.0
	--- Options with SCI160K File
	mk_mdi_fits, '/md80/log/sci160k/970331_010011', 101, outdir
	mk_mdi_fits, '/md80/log/sci160k/970331_010011', 101, /nosave, img=img, h=h
	--- Options with SCI160K images read
	read_mdi, '/md80/log/sci160k/970331_010011', 101, img, h, tfr=tfr
	mk_mdi_fits, img=img, h=h, tfr=tfr
	--- Options with Stanford FITS files
	mk_mdi_fits, '/hosts/tarbell/disk3/mdi/4a4a2d01_01h.35409/0005.fits', /nocrpix, /rescale
	mk_mdi_fits, '/md84/fits/sci5k/lev0/09440fc0/960528_111800.fits', -1, $
				'/soho-archive/private/data/planning/mdi', 1, 'maglc', /zero_missing

	ff = file_list('/hosts/tarbell/disk3/mdi/4a4a2d01_01h.35409', '0*.fits')
	for i=0,n_elements(ff)-1 do mk_mdi_fits, ff(i), /nocrpix, /rescale
INPUT:
	infil	- Input file name
	dset	- dataset number (needs to be -1 if the input file is FITS)
OPTIONAL INPUT:
	outdir	- Output directory (current directory is default)
	qfd	- 0=HR, 1=FD, 2=Table
	pre1	- Prefix "maglc" or "doppl" or "ldpth"
	qsign	- Sign change for the image (-1 or 1)
 CALLS: ***
	ANYTIM2UTC [1], ANYTIM2UTC [2], CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3]
	CONGRID [1], CONGRID [2], CONGRID [3], MASK, RFITS [1], RFITS [2], RFITS [3]
	SXADDPAR [1], SXADDPAR [2], SXADDPAR [3], SXPAR [1], SXPAR [2], SXPAR [3]
	anytim [1], anytim [2], anytim [3], anytim [4], anytim [5], anytim2ex [1]
	anytim2ex [2], anytim2ints [1], anytim2ints [2], ccd_hdr_info, concat_dir [4]
	data_type [1], data_type [2], ex2fid [1], ex2fid [2], get_rb0p [1], get_rb0p [2]
	mk_dpc_image, mk_fits_head [1], mk_fits_head [2], rd_tfile [1], rd_tfile [2]
	read_mdi, str_replace [1], str_replace [2], ut_time [1], ut_time [2], wrt_fits [1]
	wrt_fits [2]
 CALLED BY:
	wrt_sci160k_img, xdisp_tfr
OPTIONAL KEYWORD INPUT:
	img	- The image to save. IT IS OVERWRITTEN WITH THE FINAL OUTPUT.
	h	- "READ_MDI" FITS header output.  IT IS OVERWRITTEN WITH THE
		  FINAL OUTPUT.
	tfr	- "READ_MDI" binary header output
	rescale	- How to re-bin.  Default is 0.5 (to 512x512).  Set this to
		  1.0 to get a 1024x1024
	zero_missing - Change the "missing" data value to zero (from -32767)
		  It is logged in the header too
	min_percent - minimum percentage of image which needs to be present
		  before it is saved.
	nocrpix	- If set, then don't write "crpix1", "crpix2", "radius" to 
		  the FITS header.  It's used when the routine is used to
		  convert a Stanford FITS level 1.5 file.
	nosave	- If set, then don't make the file
	user_extract- If the image being saved was extracted from the original
		  image, then pass the relative lower-left corner coordinate
		  (ie:  if your saving img(100:200, 500:600) then pass in
		  subextract=[100, 500]
	scale	- If set, then change the image signal level by this factor
	noclobber - Don't save files on top of other files -- rename 'em.
OPTIONAL OUTPUT:
	img	- The image
	h	- The resulting FITS header
	outfil	- Output file name
HISTORY:
	Created 26-Mar-96 by M.Morrison
V1.1	28-Mar-96 (MDM) - Added TELESCOP and INSTRUME fits keywords
			- Corrected to save image as INTEGER*2
V1.2	28-Mar-96 (MDM) - Changed the radius value to be the value
			  return from GET_RB0P instead of a fixed value of 900 arcsec
V1.21	28-Mar-96 (MDM) - Started using "last_time" option
V1.22	28-Mar-96 (MDM) - Patched to mask the 1024x780 problem line properly
V1.23	29-Mar-96 (MDM) - Modified logic to allow "mat" (mdi_plan_dpcs.tab contents)
			  to be established beforehand (not read over it)
			- Changed logging of LAST_TIME to be 12 hours before current
			  UT (run time) since stored mags will have an older time/date.
V1.24	29-Mar-96 (MDM) - Fixed logic on masking 1024x780
V1.25	29-Mar-96 (MDM) - Added HISTORY to say uncalibrated data
	 8-Apr-96 (MDM) - Corrected masking of 49432000 type DPCs
V1.26	26-Apr-96 (MDM) - Mask out the top of the 4c000fc0 DPCs
V2.00	28-May-96 (MDM) - Added SCI5K option
			- Removed the program code to choose which sci160k image to
			  save to FITS file
			- Added /zero_missing
V2.01	 4-Jun-96 (MDM) - Added rescale keyword input option
V2.02	27-Jun-96 (MDM) - Put V2.01 on-line
V2.03	12-Jul-96 (MDM) - Mod to allow 1-D tables to be saved
			- Added MIN_PERCENT
V2.04	17-Jul-96 (MDM) - Corrected MIN_PERCENT
V2.05	31-Jul-96 (MDM) - Modified to have NAXIS2 show up after NAXIS1 in the header
V2.06	 6-Aug-96 (MDM) - Made NX and NY longs
V2.07	19-Aug-96 (MDM) - Mod to fix for 2-d header array (for 49450003) 
V2.08	19-Aug-96 (MDM) - Moved search for missing data to after the sign/scale
			  instruction.
			- Make the output integer type if came in as integer
			  and sign/scale changed it to floating
V2.09	30-Aug-96 (MDM) - Corrected V2.05 patch which was causing two
			  NAXIS2 labels to be created
V2.10	 3-Sep-96 (MDM) - Corrected typo introduced in V2.09
V3.00	16-Oct-96 (MDM) - Modified to make the radius be proper, but using
			  1.9779 for FD (instead of 2.0) and 0.6054 for HR
			  (instead of 0.615), plus making the
			  GET_RADIUS values be 1% bigger because of SOHO's
			  location relative to the sun.
			- Modified to not require the "qfd" and "pre1" and to
			  have it derive from the DPC.
V3.01	20-Nov-96 (MDM) - Overwrite TIME-OBS and DATE-OBS with the Reftime
			  derived time.  It is the telemetry time when
			  reading SCI160K files and IMAGETOOL was using
			  it.
V3.02	 5-Mar-97 (MDM) - Added /NOCRPIX
			- Added output file name to FITS header
V3.03	28-Mar-97 (MDM) - Adjust CRPIX by extract location
			- Changed CRPIX numbers for HR from 490,310 to
			  494,310.
			- Added RESCALE keyword (on rebinning)
	31-Mar-97 (MDM) - Updated header
V4.00	 1-Apr-97 (MDM) - Added option to make the header/image but not
			  save it to a file  (keyword "nosave")
			- Added CTYPEn, CDELTn, REFLECT, and CROT
			- Changed CRPIX numbers to
				HR: 494.8, 310.6
				FD: 511.5, 511.5
			  They were from Zowie's MDIALIGN.PRO which referenced
			  T.Tarbell SOI-MDI technical mail message #1562.
			  but then modified HR-Y to 310.6 (from Zowie 307.3)
			- Changed default RESCALE to 1.0 (from 0.5)
			- Added "user_extract" keyword input
			- Added "REFLECT" = "F" and  "CROT" = 0
			- Added "outfil" output keyword
V4.01	17-Apr-97 (MDM) - Added SCALE option
V4.02	 6-May-97 (MDM) - Corrected error where X_SCALE and Y_SCALE come
			  in undefined.  For SCI5K level 0 dataproducts, that
			  keyword is not defined.
V4.03	20-May-97 (MDM) - Modified so that the SCALE option does not change the
			  data type
			- Adjusted MIN_PERCENT conditional 
V4.04	 3-Dec-98 (MDM) - Corrected code changes which broke the ability to 
			  pass the data in already having been read.
V4.05	10-Dec-98 (MDM) - Resubmitted 3-Dec mods since they were removed by
			  Rock when they caused another program to fail.  The
			  error is that the "infil" variable was corrupted.
			  Added protection on redefining "infil"
V4.06	04-Jan-00 (RIB) - Y2K fix for output file name (explicit check of year string)
                         updated header information to include 4 digit year
                         removed DATE-TLM and TIME-TLM keywords from fits header
V4.07	07-Jul-03 (RIB) - Temporary fix to rotate images while SOHO is rolled

       07-Oct-03 (SEG) - Temporary fix to rotate images back to 0 after 180 roll:
			  Uncommented "sxaddpar, h, 'CROT', 0" and commented out
		    	  "sxaddpar, h, 'CROT', 180"
	06-Jan-04 (SEG) - Temporary fix to rotate images back to 180 while SOHO is
			  rolled.  Commented out "sxaddpar, h, 'CROT', 0" and 
			  uncommented "sxaddpar, h, 'CROT', 180"
	22-Mar-04 (SEG) - Adding in keywords DATE-OBS and TIME-OBS for sci5k data
			  so that 5k Mags show up properly in image_tool, etc. 
       30-Mar-04 (SEG) - Added call to get_soho_roll.pro so we do not have to 
			  switch back and forth between "sxaddpar, h, 'CROT', 0"
			  and "sxaddpar, h, 'CROT', 180". 
	02-Apr-04 (SEG) - Taking out my call to get_soho_roll.pro because it's
			  just breaking everything and causing more trouble than
			  it's worth.  Setting CROT to 0 for the current roll value
	21-Jun-04 (SEG) - Trying out a new fix for the CROT keyword.  The value contained
			  in $MDI_CAL_INFO/roll_data.txt is compared to a roll value obtained
			  by get_soho_roll.pro.  If the two values, differ, roll_data.txt is
			  updated and an email is sent out to mdi-ops.  mk_mdi_fits.pro reads
			  roll_data.txt to determine the current roll value, to use as the 
			  value for CROT.
	02-May-2005 (SEG)-Had to add quite a bit to find the correct CROT value based on 
			  day and time.  Might not be the best way to do it, but it works.
			  I commented out the CROT value dependency on roll_value.txt.  Added
			  some calculations similar to what get_soho_roll.pro does based on 
			  a manually edited text file used by get_soho_roll.pro.  Should work for
			  ANY roll value, not just 180 and 0.


mk_mdi_iap $SSW/soho/mdi/idl/ops/mk_mdi_iap.pro
[Previous] [Next]
NAME:
	mk_mdi_iap
PURPOSE:
	To make a quick template/starting point for an MDI IAP
	(Instrument Activity Plan)
SAMPLE CALLING SEQUENCE:
	mk_mdi_iap, '1-may-95'
	mk_mdi_iap, '2-may-95', /edit
	mk_mdi_iap, '2-may-95', /edit, /vi
INPUTS:
	date	- The IAP date to create or edit
OPTIONAL KEYWORD INPUTS:
	edit	- If set, then edit an existing IAP and write it out
		  with a new version number.  Editing is done with
		  the editor specified in your $EDITOR environment
		  variable, or (if $EDITOR isn't specified) xedit.
	vi	- If set, edit with VI instead of $EDITOR.
METHOD:
	Read the EAP and do the following
		1. Create a header
		2. Have SCIPLAN Structure program running the whole 24 hours
		3. Identify all "TLM_MDI_M" (which is VC2) and specify
		   SCIPLAN "Standard VC2" activity entry for each occurance
		4. Identify all "TLM_MDI_H" (which is VC3) and specify
		   SCIPLAN "Campaign ??" activity entry for each occurance
		5. Have SCIPLAN "Full Disk Magnetogram" entry running the
		   whole 24 hours and list the times of the magnetogram
		   images.
SOURCE FILES:
	All MDI IAP files are written to:	/mdisw/dbase/ops/iap_kap
	The ECS KAP files must be located in: 	/mdisw/dbase/ops/iap_kap
	The source of the KAP files is either:
		1. ftp to soc2, mdi/mdi, cd iws_files/output_actplan,
		   prompt, binary, mget ECS199508*
		2. cp /sohopub/data/summary/asplanned/ECS199508* /mdisw/dbase/ops/iap_kap
	(the two above examples assume that you want all Aug-95 ECS files)
 CALLS: ***
	CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], MK_IAP_FDMAG, MK_IAP_HEAD
	MK_IAP_HR, MK_IAP_LINE, MK_IAP_SCIPLAN, RD_ECS_EAP, REPLACE_KEY, SSW_FILE_DELETE
	anytim2ex [1], anytim2ex [2], anytim2ints [1], anytim2ints [2], concat_dir [4]
	data_type [1], data_type [2], ex2fid [1], ex2fid [2], file_list [1], file_list [2]
	fmt_tim [1], fmt_tim [2], get_host [1], get_host [2], get_user [1], get_user [2]
	gt_day [1], gt_day [2], gt_time [1], gt_time [2], int2secarr [1], int2secarr [2]
	prstr [1], prstr [2], rd_tfile [1], rd_tfile [2], yesnox [1], yesnox [2]
HISTORY:
	Written 27-Apr-95 by M.Morrison
	 4-Aug-95 (MDM) - Adjusted formats of the output
			- Added some header information

	14-Mar-96 (CED) - Added support for the standard EDITOR environment
			  variable -- we now invoke the user's favorite
			  editor if that is specified in the environment.


mk_mdi_load $SSW/soho/mdi/idl/ops/mk_mdi_load.pro
[Previous] [Next]
NAME:
	mk_mdi_load
PURPOSE:
	TO take a 1-D vector and a start address and make the .src load 
	file (telecommands)
	For list loads, the contents are altered to reflect the 
	address where the list is loaded
SAMPLE CALLING SEQUENCE:
	mk_mdi_load, type, addr, outfil, list
	mk_mdi_load, 'list', '70034000'x, 'loi_v_7005.src', list, /loi_v
	mk_mdi_load, 'list', '70034000'x, 'loi_v_7005_part.src', list(0:1599), /loi_v, part_load=15312
	mk_mdi_load, 'GEN_TABLE', '80028000'x, 'ld_lookup_vel2.src', infil='/mdisw/dbase/ops/lists/lookup_velocity2.fits'
 CALLS: ***
	BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], RFITS [1], RFITS [2], RFITS [3]
	UNSIGN, WRT_LD_CMD, break_file [4], set_list_addr, tbeep [1], tbeep [2], tbeep [3]
 CALLED BY:
	mk_ff_load
RESTRICTIONS:
	There are several portions of the IP table load command which
	are hard-wired and they need to be paramters or need to be
	found in a different file.  (all of the LRDXFR parameters)
HISTORY:
	Written 3-Apr-96 (MDM) by M.Morrison (using MK_LIST_LOAD as starting point)
	 9-Apr-96 (MDM) - Modified to make all fields be hex (so that MAKE_LOAD will work)
			- Changed nwords_load to be N-1
	10-Apr-96 (MDM) - Changed all format words to be in hex
			- Added /APPEND option
	11-Apr-96 (MDM) - Added comment option
	11-Apr-96 (MDM) - Changed nwords_load to be N (back from N-1)
	12-Apr-96 (MDM) - Added GEN_DATA
			- Added "and 'ffff'x" to the formatting of the output
			- Protect the input from being changed
	18-Apr-96 (MDM) - added depaddr option
			- print warning if the number of elements of the list is not
			  (mod 8) eq 0
	14-May-96 (MDM) - Added /NOWARN option
	22-May-96 (MDM) - Added capability to set the LOI DPC low word by parameter


mk_minim $SSW/soho/lasco/idl/exposure/mk_minim.pro
[Previous] [Next]
 MK_MINIM
	Form a "Standard" mask image from a list or more usually from
	a set of parameters to be matched.

 Usage:
	mk_minim[, stdim, {list|<keys>}]

 Arguments:
	filename string	input	The name to give to the image. If
				unset, then use "stdim.fts"
	list	string	input	An array with a list of filenames to
				be used in forming the average image.

 Keywords: (all input)
	coronagraph	int	- Which coronagraph (1, 2 or 3)
	exposure	float	- 1-elements use exposures */10%,
				2-elements use exposures in given
				range, absent: use any exposure.
	filter		string	- Specify the filter or FP setting
				required (default "Clear")
	polarizer	string	- Specify the polarizer setting to be
				used (default clear)
	pixels		int	- Specify the size of image to use
                                 2-element array (default [1024,
                                 1024]).
	dir_pattern	string	- Specify a restricted set of
                                 directories in which to find the
                                 images (if used, this must be in a
                                 form acceptable as an argument to
                                 "find")
	dark		int	- Specify the dark current (defaults
                                 c1:322, c2:470, c3:319 eit:0).
	interact	??	- If set, then display each image
                                 (reduced by a factor 2 if the larger
                                 dimansion is > 512) and ask the user
                                 whether to include it - tedious but
                                                         sometimes
                                                         needed.
	upper_left	int	- Specify the location of the
                                 upper-left corner of the image
                                 (useful to distingush (say)
                                 half-resolution-whole-field images
                                 from full-resolution-quarter-field
                                 images, 2-element array (default [20,1]).
	save		??	- If set, then save the generated image
				to disk
	clevel		float	- Specify the minimum correlation with
                                 the first image for the image to be
                                 used. When this is specified the
                                 first image is displayed as in
                                 INTERACT and you are prompted whther
                                 to use it; this continues until an
                                 image is accepted. Thereafter all
                                 images better correlated with the
                                 initial image than the given value
                                 are accepted - a typical level might
                                                be in the range .98
                                                to .99.
	centre_pick	??	- If set, then determine a Sun-centre
                                 and radius manually.
	maxc		int	- Set the maximum number of counts to
                                 show in a display of the image.

 Effects:
	A "standard" average image is generated and added to the end
	of the list of loaded images. Most of its header information
	is derived from the first image of the set. N.B. The image is
	NOT saved to disk, use one of the SAVE options in DISPLAY to
	do this.

 WARNING:
	It is the responsibility of the user to ensure that the image
	set being used is homogeneous.

 CALLS: ***
	CHANDLE, CHK_DIR [1], CHK_DIR [2], FXPAR [1], FXPAR [2], LOADCT, OCCLTR_CNTR
	READFITS [1], READFITS [2], READFITS [3], RSTRPOS, SXADDPAR [1], SXADDPAR [2]
	SXADDPAR [3], SXPAR [1], SXPAR [2], SXPAR [3], WRITEFITS [1], WRITEFITS [2], cc0
	min_nz [1], min_nz [2], mk_stdim_hdr, scan4limb
 History:
	Original (modified from mk_stdim_list): 30/7/96, SJT


MK_MLO_STRUCT $SSW/soho/lasco/idl/inout/mk_mlo_struct.pro
[Previous] [Next]
 NAME:
	MK_MLO_STRUCT

 PURPOSE:
 	This procedure generates a structure type for the HAO-MLO fits files.

 CATEGORY:
	LASCO DATA ANALYSIS

 CALLING SEQUENCE:
	MK_MLO_STRUCT

 INPUTS:
	None

 OUTPUTS:
	The procedure generates a file with the desired structure.

 CALLS: ***
	FILEPATH
 SIDE EFFECTS:
	Writes a file to $NRL_LIB/lasco/inout

 EXAMPLE:
	To generate a sample header, you must have a new copy of IDL, or at least one
	that hasn't had the MLO structure defined.

	MK_MLO_STRUCT

 MODIFICATION HISTORY:
  	05.08.19, nr - add RSUN

 	Written by:	RAHoward, NRL, Oct, 1998


MK_MONTHLY_MIN $SSW/soho/lasco/idl/synoptic/mk_monthly_min.pro
[Previous] [Next]
 TITLE:
	MK_MONTHLY_MIN
 PURPOSE:
	This procedure generates the minimum of the daily median
	images for an interval (default is 27)

 CATEGORY:
	DATA_ANAL

 CALLING SEQUENCE:
	MK_MONTHLY_MIN,Tel,Td

 INPUTS:
	Tel:	String denoting the telescope: 'c1','c2','c3','c4'
	Td:	String denoting the date, in one of the following
		formats:	YYYY/MM/DD
				YYY-MM-DD
				YYMMDD

		This date is the MIDPOINT of the desired interval.

 OPTIONAL INPUTS:
	Filpol:	String denoting the filter/polarizer/sector 
		eg.  'clcl' for the clear/clear combination
		The default is 'fvcl', 'orcl' or 'clcl' for C1, C2, C3
		respectively.

 KEYWORDS:
	NDAYS:	Number of days to use in the minimum.  Must be an odd number.
		The default is 27. This keyword overrides the days-available test.
	OFF:	The string to put after the date if C1
	ALL_YEARS:Use daily images from multiple years
	NOREBIN:  Do not rebin result to 512x512
	ROLLED:	  Use $MONTHLY_IMAGES/rolled directory
	FILES	Use files in this array to compute minimum
	TEST	Save in $MONTHLY_IMAGES/testdir

 OUTPUTS:
	None.  The routine will write a FITS file in $MONTHLY_IMAGES. The 
		format of the filename is tm_fwpw_yymmdd.fts, where 
		t is the telescope number [1,2,3],
		m is the letter 'm' (monthly), 
		fwpw is the filter/polarizer abbreviation code, and 
		yymmdd is the date of the MIDPOINT of the interval used to 
			make the file

 CALLS: ***
	DATATYPE [1], DATATYPE [2], DATATYPE [3], FXADDPAR [1], FXADDPAR [2], FXHMAKE [1]
	FXHMAKE [2], FXPAR [1], FXPAR [2], GET_SC_POINT, GET_SOLAR_ROLL
	LASCO_FITSHDR2STRUCT, LASCO_READFITS [1], LASCO_READFITS [2], MAXMIN
	READFITS [1], READFITS [2], READFITS [3], STR2UTC [1], STR2UTC [2], STR2UTC [3]
	TRIM, UTC2STR, WRITEFITS [1], WRITEFITS [2], pwd [1], pwd [2]
 CALLED BY:
	MAKE_ALL_MONTHS
 PROCEDURE:
	- Date of the file output ("DATE-OBS" and filename) is ALWAYS the midpoint of 
	  interval used to make the file and is ALWAYS the input date
	- Date of file is always the same DOY (based on 3m_clcl_xx*.fts)
	- Searches daily median images in $MONTHLY_IMAGES/daily for Td +/- 13 days. 
	- Minimum interval is Td +/- 7 days (15 days); if interval is less, no file is 
	  created, unless NDAYS is set.
	- Does not span gaps more than 2 days unless NDAYS keyword is set.

 MODIFICATION HISTORY:
	Written	RA Howard, NRL, 9/27/96
	15 October 1996		RAH, mods for full images (eliminated regions)
	22 Sep 1997	RAH, corrected definition of MID_DATE and MID_TIME
			     to be mid date and time of the entire interval
	06 Oct 1997	SEP, added ALL_YEARS option.
	10 Dec 1998	NBR, for non-clear filters, save result as 512x512 image;
				divide by 4 for summed images
	25 Mar 1999	NBR, insert number of images used in the header
	20 Sep 1999	NBR, Save all images as 512x512
	   Jan 2000	NBR, Add NOREBIN keyword
	   Jun 2000	NBR, Add ROLL keyword for using *r.fts daily median files
	27 Mar 2001	NBR, change mjd0 computation
	 9 Aug 2001	NBR, Find daily images in $MONTHLY_IMAGES/daily
	20 Nov 2001	NBR, Add CROTA keyword to header
	25 Feb 2002	NBR, Modify to make files with equal number of days before
				and after date of file name; write log file
	10 Jul 2002	NBR, Fix PxCOL/ROW, RxCOL/ROW, add keyword TEST
	18 Jul 2003	NBR, Fix endutc bug for no days found; add CROTA1/2
	10 Oct 2003	NBR, Make ALL_YEARS for 2000+ only

ver=	'@(#)mk_monthly_min.pro	1.14 04/12/05'	; LASCO IDL LIBRARY


mk_newdata [1] $SSW/soho/mdi/idl_old/gen/ys_util/mk_newdata.pro
[Previous] [Next]

  Name: mk_newdata

  Purpose: job to create new data images for distribution (show_pix,etc)
	
  History:
     10-Jul-1994 (SLF) Written
     14-Jul-1994 (SLF) Add fl_suntoday, fl_sxtobsnar, fl_goesplot
			Moved distribution request into mk_pix
     12-oct-1993 (SLF) call to fl_summary, distribute jobs in parallel
                       via go_batch / taskwait
      6-Mar-1994 (SLF) remove go_batch (OSF problems)

  Method - background job submitted via auto_toban
           Parallel, distributed execution of subtasks.

  Generate images for first_light, show_pix


MK_ONE_DEB_GIF $SSW/soho/lasco/idl/inout/mk_one_deb_gif.pro
[Previous] [Next]
 NAME:
	MK_ONE_DEB_GIF

 PURPOSE:
	This function makes one gif image of debris data.

 CATEGORY:
	LASCO INOUT

 CALLING SEQUENCE:
	MK_ONE_DEB_GIF,Fname

 INPUTS:
	Fname	STRING	  FITS filename                               

 OUTPUTS:
	Writes the gif file onto the debris directory.

 CALLS: ***
	FXPAR [1], FXPAR [2], LASCO_READFITS [1], LASCO_READFITS [2], MK_DIF_IMG, MK_IMG
	SETFONT, WRITE_GIF
 COMMON BLOCKS:
	BLOCK1:	Describe any common blocks here. If there are no COMMON
		blocks, just delete this entry.

 RESTRICTIONS:

 PROCEDURE:

 EXAMPLE:

 MODIFICATION HISTORY:
 	Written by:	Nathan Rich, NRL
	12/7/00, nbr - Change input description

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


mk_opsdb_list [1] $SSW/soho/mdi/idl/ops/mk_opsdb_list.pro
[Previous] [Next]
NAME:
	mk_opsdb_list
PURPOSE:
	To dump the current status of the database into a text file.
	The job is intended to run as a cron job every hour
 CALLS: ***
	CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], OPSDB_PRINT, concat_dir [4]
HISTORY:
	Written 15-Oct-99 by R.Bush
	Converted the go_mk_opsdb_list batch job into a standalone procedure.


mk_opsdb_list [2] $SSW/soho/mdi/idl/test/mk_opsdb_list.pro
[Previous] [Next]
NAME:
	mk_opsdb_list
PURPOSE:
	To dump the current status of the database into a text file.
	The job is intended to run as a cron job every hour
 CALLS: ***
	CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], OPSDB_PRINT, concat_dir [4]
HISTORY:
	Written 15-Oct-99 by R.Bush
	Converted the go_mk_opsdb_list batch job into a standalone procedure.


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

 Name        :	MK_PLAN

 Purpose     : Shell program to run MK_CDS_PLAN or MK_SUMER_PLAN

 Use         : MK_PLAN

 Inputs      : TSTART, TSTOP = start, stop times to create plan
               (can be string [e.g. 96/1/1] or TAI format)

 Opt. Inputs : None.

 Outputs     : None.

 Opt. Outputs: None.

 Keywords    : Inherited from lower level routines

 Explanation : A wrapper routine around MK_PLAN_CDS and MK_CDS_SUMER

 Calls       : ***
	GET_CALLER, MK_CDS_PLAN, MK_PLAN_RECOVER, MK_SUMER_PLAN, WHICH_INST, XREGISTERED
 CALLED BY:
	MK_PLAN_RECOVER
 Common      : None.

 Restrictions: None.

 Side effects: None.

 Category    : Widgets, planning

 Prev. Hist. : None.

 History     : Version 1, Zarro (ARC/GSFC) 19 April 1995, written
               Version 2, Liyun Wang, GSFC/ARC, August 30, 1995
                  Renamed from MK_DETAIL


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

 Name        :	MK_PLAN_ADD

 Purpose     :	Add PLAN entry to PLANS array

 Explanation :

 Use         :	MK_PLAN_ADD,PLAN,PLANS

 Inputs      :
               PLAN = plan structure to add
               PLANS = structure array of plan entries

 Opt. Inputs : None.

 Outputs     :	None.

 Opt. Outputs:	None.

 Keywords    : INSERT = set to insert instead of ADD

 Calls       : ***
	CONCAT_STRUCT, EXIST, GET_PLAN_ITIME, GET_PLAN_TYPE, MK_PLAN_COMP, MK_PLAN_PRIV
	MK_PLAN_REM, MK_PLAN_SORT, MK_PLAN_WHERE, WHICH_INST
 CALLED BY:
	MK_CDS_PLAN, MK_SOHO, MK_SOHO_EDP
 Common      :	None.

 Restrictions:	None.

 Side effects:	PLANS will be modified

 Category    :	Planning

 Prev. Hist. :	None.

 Written     :	Dominic Zarro (ARC)

 Version     :	Version 1.0, 9 January 1995.


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

 Name        : MK_PLAN_CAMP

 Purpose     : Check validity of campaign ID

 Category    : planning

 Explanation :

 Syntax      : MK_PLAN_CAMP,PLAN

 CALLED BY:
	MK_CDS_PLAN
 Examples    :

 Inputs      : PLAN = plan structure to check

 Opt. Inputs : None


 Outputs     : None

 Opt. Outputs:

 Keywords    : ERR = error message
               DAYS = no of days to look back or ahead [def=0]

 CALLS: ***
	ANYTIM2TAI, DPRINT, EXIST, FIND_CAMPAIGN, GET_PLAN_ITIME, GET_PLAN_TYPE
	TAG_EXIST [1], TAG_EXIST [2], TRIM
 Common      : None

 Restrictions: None

 Side effects: None

 History     : Written 28 October 1996, D. Zarro, ARC/GSFC

 Contact     : dzarro@solar.stanford.edu


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

 Name        :	MK_PLAN_CHANGE

 Purpose     :	change PLAN plan entries 

 Explanation :	changes start and stop times of PLAN plan entries so
               that they don't overlap 

 Use         :	MK_PLAN_CHANGE,PLAN,NPLAN,STARTDIS,STOPDIS

 Inputs      :	PLAN = structure array of PLAN plan entries

 Opt. Inputs : STARTDIS, STOPDIS = lower and upper time limits within which
               to constrain recalculated entries.

 Outputs     :	NPLAN = time-changed plan entries

 Opt. Outputs:	None.

 Keywords    : TGAP = minimum gap between successive entries [def = 1.d-2]
               TCAL = start time at which to start recalculation 
                        [def = start of first plan]

 CALLS: ***
	ANYTIM2UTC [1], ANYTIM2UTC [2], CONCAT_STRUCT, DELVARX [1], DELVARX [2]
	DELVARX [3], DELVARX [4], DPRINT, EXIST, GET_PLAN_ITIME, GET_PLAN_TYPE, MK_PLAN_SORT
	TAI2UTC, UTC2TAI, delvarx [5]
 CALLED BY:
	MK_PLAN_ORDER, MK_SOHO, MK_SOHO_EDP, READ_KAP
 Common      :	None.

 Restrictions:	For SCIENCE plan entries only

 Side effects:	None.

 Category    :	Planning

 Prev. Hist. :	None.

 Written     :	Version 1.0, Dominic Zarro (ARC), 9 January 1995
                                            
 Modification: Version 2, Liyun Wang, GSFC/ARC, May 23, 1995
               Gereralized for use by supported instruments

 Version     :	Version 2, May 23, 1995


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

 Name        :	MK_PLAN_CLONE

 Purpose     :	clone a plan from one OPS day to another

 Explanation :

 Use         :	MK_PLAN_CLONE,OPS1,OPS2

 Inputs      :	OPS1, OPS2 = source and destination OPS days to
               clone from and to, respectively

 Opt. Inputs :	None.

 Outputs     :	None.

 Opt. Outputs:	None.

 Keywords    :	
               TYPE = 0,1,2,3 for DETAILS, FLAG, SCIENCE, and ALT  
               (default is SCIENCE database)
               DETAILS = set for DETAILS
               FLAG = set for FLAG
               SCIENCE = set for SCIENCE
               INST = instrument name 
               BETWEEN = clone all days between OPS1 and OPS2
               DAYS = days to clone from starting day [def = all days]
               TGAP = secs time gap between adjoining plans [def = 1.d-2]

 CALLS: ***
	ANYTIM2UTC [1], ANYTIM2UTC [2], CONCAT_STRUCT, DATATYPE [1], DATATYPE [2]
	DATATYPE [3], DPRINT, EXIST, GET_INSTRUMENT, GET_PLAN_DEF, GET_PLAN_FUNCT
	GET_PLAN_ITIME, GET_SOHO_INST, MK_PLAN_LOAD, MK_PLAN_PRIV, RD_PLAN, TAI2UTC, UTC2TAI
	WHICH_INST
 Common      :	MK_PLAN_SHARED (needed to communicate with MK_PLAN/MK_SOHO)

 Restrictions:	None.

 Side effects:	entire plans for days from OPS to OPS2 are modified

 Category    :	Planning, Database.

 Prev. Hist. :	None.

 Written     :	Dominic Zarro (ARC),  1 May 1995


MK_PLAN_COMP $SSW/soho/gen/idl/plan/science/mk_plan_comp.pro
[Previous] [Next]
 Project     : SOHO - CDS     
                   
 Name        : MK_PLAN_COMP
               
 Purpose     : compare contents of two plans
               
 Category    : Planning
               
 Explanation : 
               
 Syntax      : IDL> status=mk_plan_comp(plan1,plan2)
    
 CALLED BY:
	MK_CDS_PLAN, MK_PLAN_ADD, MK_PLAN_REM, MK_PLAN_WHERE, MK_PLAN_WRITE
 Examples    : 

 Inputs      : PLAN1, PLAN2 = input plans to check
               
 Opt. Inputs : None
               
 Outputs     : STATUS = 1 if perfect match, 0 otherwise

 Opt. Outputs: None
               
 Keywords    : DTAG = tag name where first difference is found
               END_TIME = check plan end times (by def, end times for
                          DETAILS are not checked).
               TRUNCATE = truncate MSECS off times

 CALLS: ***
	GET_PLAN_ITIME, GET_PLAN_TYPE, MATCH_STRUCT, STR_FORMAT
 Common      : None
               
 Restrictions: None
               
 Side effects: None
               
 History     : Version 1,  4-May-1996,  D M Zarro.  Written

 Contact     : DMZARRO


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

 Name        :	MK_PLAN_CONV

 Purpose     : convert plan time tags from TAI to UTC

 Use         : NPLAN=MK_PLAN_CONV(PLAN)

 Inputs      : PLAN = plan structure definition

 Opt. Inputs : ITIME = index of time field

 Outputs     : OPLAN = same as PLAN but with time fields in UTC string format

 Opt. Outputs: None.

 Keywords    : NOPOINT = if set, then remove pointing tags

 Explanation : None.

 Calls       : ***
	CONCAT_STRUCT, DATATYPE [1], DATATYPE [2], DATATYPE [3], EXIST, GET_INSTRUMENT
	GET_PLAN_ITIME, GET_PLAN_TYPE, REM_TAG [1], REM_TAG [2], REP_TAG_VALUE
	TAG_EXIST [1], TAG_EXIST [2], TAI2UTC
 CALLED BY:
	MK_CDS_PLAN, MK_PLAN_CORR, MK_SOHO, SHOW_RES_STC
 Common      : None.

 Restrictions: None.

 Side effects: None.

 Category    : Planning

 Prev. Hist. : None.

 Written     :	Version 1, Zarro (ARC/GSFC) 29 January 1995.


MK_PLAN_COPY $SSW/soho/gen/idl/plan/science/mk_plan_copy.pro
[Previous] [Next]
 PROJECT:
       SOHO - CDS

 NAME:	
       MK_PLAN_COPY()

 PURPOSE:
       Make a new plan entry from a selected (highlighted) plan entry

 EXPLANATION:
       
 CALLING SEQUENCE: 
       Result = mk_plan_copy(hplan)

 INPUTS:
       HPLAN - A highlighted (selected) plan entry to be copied from
       INFO  - A structure that contains basic required information for the
               operation. It should have at least the following tags:
                  ROW      - Row number in which HPLAN is in
                  STARTDIS - Start time of the display window
                  STOPDIS  - End time of the display window

 OPTIONAL INPUTS: 
       WID   - Widget IDs to show date/time of cursor position. If passed, a
               procedure routine MK_PLAN_COPY_EV must exist to be used to
               update such information. It must be a 2- or 4-element
               array: the first two elements are text widget IDs for
               starting date/time, and the last two elements (which
               are optional) are text widget IDs for end date/time.


 OUTPUTS:
       RESULT - A new plan entry ready to be inserted or appended

 OPTIONAL OUTPUTS:
       None.

 KEYWORD PARAMETERS: 
       ACTION - A string scalar indicating what can be done with the newly
                copied plan entry. Valid values can be: 'insert', 'append',
                or 'none'

 CALLS: ***
	BOX_CURSOR2, DATATYPE [1], DATATYPE [2], DATATYPE [3], GET_PLAN_ITIME, TAI2UTC
	UTC2TAI
 CALLED BY:
	MK_CDS_PLAN, MK_SOHO
 COMMON BLOCKS:
       None.

 RESTRICTIONS: 
       None.

 SIDE EFFECTS:
       None.

 CATEGORY:
       
 PREVIOUS HISTORY:
       Written May 26, 1995, Liyun Wang, GSFC/ARC

 MODIFICATION HISTORY:
       Version 1, created, Liyun Wang, GSFC/ARC, May 26, 1995
       Version 2, Liyun Wang, GSFC/ARC, June 5, 1995
          Made it possible to update widget contents for date/time
       Version 3, July 21, 1995, Liyun Wang, GSFC/ARC
          Made end date/time wdigets updatable

 VERSION:
       Version 3, July 21, 1995


MK_PLAN_COPY_EV $SSW/soho/gen/idl/plan/science/mk_plan_copy_ev.pro
[Previous] [Next]
 PROJECT:
       SOHO - CDS/SUMER

 NAME:
       MK_PLAN_COPY_EV

 PURPOSE: 
       Event "processor" for MK_PLAN_COPY

 EXPLANATION:
       MK_PLAN_COPY calls box_cursor2 (with the keyword EVENT_PRO pointing
       to this routine) to provide a boxed cursor to copy a plan entry
       graphically. This routine is used to update widget contents in 
       mk_detail for start date/time of the plan entry. 

 CALLING SEQUENCE: 
       mk_plan_copy_ev, event

 INPUTS:
       EVENT   - Event structure having the following tags: 

          DAY  - TAI at 00:00 UT on day of display
          WID  - Array of elements of 2 or 4, text widget IDs in
                 which the date/time of start (and stop) time of the
                 plan are updated
          DUR  - Duration of the plan entry in seconds
          X    - X position of the cursor in device pixels
          Y    - Y position of the cursor in device pixels

 OPTIONAL INPUTS: 
       None.

 OUTPUTS:
       None.

 OPTIONAL OUTPUTS:
       None.

 KEYWORD PARAMETERS: 
       None.

 CALLS: ***
	TAI2UTC
 COMMON BLOCKS:
       None.

 RESTRICTIONS: 
       None.

 SIDE EFFECTS:
       None.

 CATEGORY:
       
 PREVIOUS HISTORY:
       Written June 5, 1995, Liyun Wang, GSFC/ARC

 MODIFICATION HISTORY:
       Version 1, created, Liyun Wang, GSFC/ARC, June 5, 1995
       Version 2, July 21, 1995, Liyun Wang, GSFC/ARC
          Made end date/time of the copied plan updatable in their widgets
       Version 3, August 6, 1996, Liyun Wang, NASA/GSFC
          Shortened routine name to MK_PLAN_COPY_EV (for Ultrix)

 VERSION:
       Version 3, August 6, 1996


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

 Name        :	MK_PLAN_CORR 

 Purpose     :	correct plan entry so that PLAN.N_POINTINGS matches number of elements of PLAN.POINTINGS

 Explanation :	

 Use         :	PLAN=MK_PLAN_CORR(PLAN)

 Inputs      :	PLAN = input plan entry

 Opt. Inputs :	None.

 Outputs     :	CPLAN = corrected plan entry 

 Opt. Outputs: None.

 Keywords    :	UTC = convert time fields to UTC

 Calls       : ***
	MK_PLAN_CONV, REP_TAG_VALUE, TAG_EXIST [1], TAG_EXIST [2]
 CALLED BY:
	MK_CDS_PLAN
 Common      :	None.

 Restrictions:	None.

 Side effects:	None.

 Category    :	Planning, Database.

 Prev. Hist. :	None.

 Written     :	Dominic Zarro (ARC),  10 March 1995


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

 Name        : MK_PLAN_CUSTOM 

 Purpose     : widget interface for customizing MK_DETAIL 

 Use         : MK_PLAN_CUSTOM ,S, GROUP=GROUP, MODAL=MODAL

 Inputs      : See output

 Opt. Inputs : None.

 Outputs     : S - Structure that has following tags:
                   STARTDIS, STOPDIS - the selected TAI start and stop times
                   REQ_ITEMS  - string array of selected DB items
                   SHOW_NOW   - Flag (1/0) to show current UT
                   SHOW_DAY   - Flag (1/0) to show day boundary
                   SHOW_LOCAL - Flag (1/0) to show local time
                   SHOW_NTT   - Flag (1/0) to highlight Non-time-tagged items
                   DTYPE      - SOHO plan type to show. 0: SCI, 1: DET
                   TROFF      - Cursor time roundoff, in minutes
                   NOCOLOR    - 1/0 color off/on 

 Opt. Outputs: None.

 Keywords    : 
               GROUP = widget id of calling widget program
               MODAL = freeze calling program
               STATUS = 0 if user quit and wants to abort
               NOTIME = prevent customizing time parameters
               
 Explanation : User can customize features such as START/STOP times,
               which DB entry to EDIT (e.g. DETAILS, FLAG...) or 
               display as a reference (e.g. DSN, MDI, CDS, SUMER...)

 Calls       : ***
	ANYTIM2UTC [1], ANYTIM2UTC [2], CW_BSELECTOR2, DATATYPE [1], DATATYPE [2]
	DATATYPE [3], EXIST, FREE_POINTER, GET_CALLER, GET_POINTER, GET_SOHO_INST, GREP
	HAVE_WIDGETS [1], HAVE_WIDGETS [2], JOIN_STRUCT [1], JOIN_STRUCT [2]
	MAKE_POINTER, MK_DFONT, MK_PLAN_CUSTOM_EVENT, REP_TAG_VALUE, SET_POINTER
	SPLIT_STRUCT, TAG_EXIST [1], TAG_EXIST [2], TAI2UTC, UTC2TAI, WHICH_INST, XACK, XALIVE
	XKILL, XMANAGER, XMENU [1], XMENU [2], XREALIZE, XSHOW
 CALLED BY:
	MK_CDS_PLAN
 Common      : MK_PLAN_CUSTOM 

 Restrictions: None.

 Side effects: None.

 Category    : Planning, widgets

 Prev. Hist. : None.

 Written     :	Zarro (ARC/GSFC) 20 April 1995
               
 Modified    : version 1.1, Zarro (ARC/GSFC) 11 Nov 1995 -- added /NOTIME

 Version     : 1.1


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

 Name        :	MK_PLAN_DUR

 Purpose     :	compute study duration based on plan details

 Explanation :	

 Use         :	DUR=MK_PLAN_DUR(PLAN)

 Inputs      :	PLAN = CDS or SUMER detailed plan entry
               

 Opt. Inputs : None

 Outputs     :	DUR = duration of study + extra from variable rasters

 Opt. Outputs:	None.

 Keywords    : POINT = 1 to switch on pointing calculation (CDS only)

 Calls       : ***
	WHICH_INST
 CALLED BY:
	MK_PLAN_RECAL
 Common      :	None.

 Restrictions:	None.

 Side effects:	None.

 Category    :	Planning

 Prev. Hist. :	None.

 Written     :	Dominic Zarro (ARC)

 Version     :	Version 1.0, 9 January 1995.


MK_PLAN_EXIST $SSW/soho/gen/idl/plan/science/mk_plan_exist.pro
[Previous] [Next]
 Project     : SOHO - CDS     
                   
 Name        : MK_PLAN_EXIST
               
 Purpose     : check contents of MK_PLAN_SHARED common blocks
               
 Category    : Planning
               
 Explanation : 
               
 Syntax      : IDL> s=mk_plan_exist(info)
    
 CALLED BY:
	MK_PLAN_FORM
 Examples    : 

 Inputs      : INFO - Info structure that should have at least the following
                      tags:
               REQ_ITEMS  - string array of selected DB items
               DTYPE      - SOHO plan type to show. 0: SCI, 1: DET
               
 Opt. Inputs : None
               
 Outputs     : 1 - if at least one requested item is found in
                   STARTDIS/STOPDIS range.
               0 - no items found

 Opt. Outputs: None
               
 Keywords    : None

 CALLS: ***
	DATATYPE [1], DATATYPE [2], DATATYPE [3], DPRINT, EXIST, GET_INSTRUMENT
	GET_PLAN_ITIME, GET_SOHO_INST, GREP, PCHECK, TAG_EXIST [1], TAG_EXIST [2]
	WHERE_VECTOR, WHICH_INST
 Common      : MK_PLAN_SHARED
               
 Restrictions: None
               
 Side effects: None
               
 History     : Version 1,  14-Feb-1996,  D M Zarro.  Written

 Contact     : DMZARRO


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

 Name        : MK_PLAN_FIND

 Purpose     : Find all plans between STARTDIS/STOPDIS (inclusive)

 Category    : planning

 Explanation :

 Syntax      : find=mk_plan_find(plan,startdis,stopdis)

 CALLED BY:
	MK_CDS_PLAN
 Examples    :

 Inputs      : PLAN = plan structure array to check

 Opt. Inputs : None

 Outputs     : FIND = indicies of plans within STARTDIS/STOPDIS window

 Opt. Outputs:

 Keywords    : COUNT = # of plans found
               RCOUNT = # of plans outside window
               REST = indicies of plans outside window

 CALLS: ***
	EXIST, GET_PLAN_ITIME, STR_FORMAT, WHERE_VECTOR
 Common      : None

 Restrictions: None

 Side effects: None

 History     : Written 28 January 1997, D. Zarro, ARC/GSFC

 Contact     : dzarro@solar.stanford.edu


MK_PLAN_FIND [2] $SSW/soho/gen/idl/plan/science/mk_plan_find.pro
[Previous] [Next]
 Project     : SOHO-CDS

 Name        : MK_PLAN_FIND

 Purpose     : Find all plans between STARTDIS/STOPDIS (inclusive)

 Category    : planning

 Explanation :

 Syntax      : find=mk_plan_find(plan,startdis,stopdis)

 CALLED BY:
	MK_CDS_PLAN
 Examples    :

 Inputs      : PLAN = plan structure array to check

 Opt. Inputs : None

 Outputs     : FIND = indicies of plans within STARTDIS/STOPDIS window

 Opt. Outputs:

 Keywords    : COUNT = # of plans found
               RCOUNT = # of plans outside window
               REST = indicies of plans outside window

 CALLS: ***
	EXIST, GET_PLAN_ITIME, STR_FORMAT, WHERE_VECTOR
 Common      : None

 Restrictions: None

 Side effects: None

 History     : Written 28 January 1997, D. Zarro, ARC/GSFC

 Contact     : dzarro@solar.stanford.edu


MK_PLAN_FORM $SSW/soho/gen/idl/plan/science/mk_plan_form.pro
[Previous] [Next]
 PROJECT:
       SOHO

 NAME:
       MK_PLAN_FORM

 PURPOSE:
       Make SOHO plan form in PNG format

 CATEGORY:
       Utility, planning

 SYNTAX:
       mk_plan_form

 OPTIONAL INPUTS:
       TSTART - Time of beginning of display (in UTC format)

 KEYWORDS:
       ITEMS    - String scalar, items to be plotted (separated by
                  commas, e.g., 'CDS,SUMER,EIT,Telemetry')
       DUR      - Time span (in days) of the plan form (default to 1 day)
       DTYPE    - Set this keyword to plot DET plans
       GSIZE    - String scalar, size of output PNG file, in 'mmmxnnn' format
       REVERSE  - Set this keyword to make white background plot
       DIR      - Output directory
       PS       - Produce .ps file
       HTML     - Produce HTML version
       FORCE    - Set this keyword to force reading from DB
       OTHER    - set to include other instruments (VIRGO, GOLF, COSTEP)
       ERR      - error string

 CALLS: ***
	ANYTIM2UTC [1], ANYTIM2UTC [2], CHKLOG [1], CHKLOG [2], CHK_DIR [1], CHK_DIR [2]
	CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], ESPAWN, FIX_ZDBASE, GET_INST_COLOR
	GET_SOHO_INST, IDL_RELEASE, MKLOG, MK_24BIT, MK_PLAN_EXIST, MK_PLAN_READ
	MK_SOHO_TARGET, PLOT_SPLAN, SET_LINE_COLOR, STR2ARR [1], STR2ARR [2], TEST_OPEN
	UTC2TAI, concat_dir [4]
 CALLED BY:
	UPDATE_SOHO_TARGETS
 COMMON:
       @MK_PLAN_SHARED

 RESTRICTIONS:
       None.

 SIDE EFFECTS:
       Color table may be modified

 HISTORY:
       Version 1, January 22, 1996, Liyun Wang, GSFC/ARC. Written
       Version 2, January 26, 1996, Liyun Wang, GSFC/ARC
          Added REVERSE keyword
       Version 3, March 4, 1996, Liyun Wang, GSFC/ARC
          Added FORCE keyword
       Version 4, March 25, 1996, Liyun Wang, GSFC/ARC
          Added ASCII keyword to allow creating plan entries in ASCII format
       Version 5, April 25, 1996, Liyun Wang, GSFC/ARC
          Modified such that entries for CELIAS, SWAN, and ERNE appear
             as JOP, SOC, and CAMPAIGN respectively
       Version 6, Nov 18, 1996, Zarro, GSFC/ARC
          Removed VIRGO, GOLF, and COSTEP from list (never used)
       Version 7, Nov 26, 1996, Zarro, GSFC/ARC
          Added check for write permission for PNG file and ERR keyword
       Version 8, August 20, 1997, Liyun Wang, NASA/GSFC
          Removed ASCII and HTML keywords making HTML the only output format
       Version 9, Nov 27, 2000, Zarro (EIT/GSFC)
          Switched to PNG output
       Version 10, Feb 20, 2001, Zarro (EITI/GSFC)
          Added JPEG option

 CONTACT:
       Liyun Wang, GSFC/ARC (Liyun.Wang.1@gsfc.nasa.gov)


MK_PLAN_HTML $SSW/soho/gen/idl/plan/science/mk_plan_html.pro
[Previous] [Next]
 PROJECT:
       SOHO

 NAME:
       MK_PLAN_HTML

 PURPOSE:
       Make list of SOHO plans of today in HTML table format

 CATEGORY:
       Planning, Utility

 SYNTAX:
       mk_plan_html [, pdate] [, dir=dir] 

 INPUTS:
       None required.

 OPTIONAL INPUTS:
       PDATE - Date of plan schedule, can be in any CDS time format. If
               passed, it overwrites keyword YESTERDAY or TOMORROW

 OUTPUTS:
       HTML document named 'soho_today.html', 'soho_yesterday.html'
          (when keyword YESTERDAY is set),  or 'soho_tomorrow.html'
          (when keyword TOMORROW is set)

 OPTIONAL OUTPUTS:
       None.

 KEYWORDS:
       DIR       - Name of directory in which output file is written
       YESTERDAY - Make list of plans for yesterday (if PDATE not passed)
       TOMORROW  - Make list of plans for tomorrow (if PDATE not passed)
       VERBOSE   - Set this keyword to print output file name on the screen
       ERR       - Error string

 CALLS: ***
	ANYTIM2UTC [1], ANYTIM2UTC [2], CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3]
	GET_PLAN_ITIME, GET_SOHO_INST, GET_UTC, HTML_TABLE_HEADER, LIST_SOHO_DET
	SOHO_ITEMS_HTML, TEST_OPEN, UTC2TAI, concat_dir [4]
 COMMON:
       PLAN_HTML

 RESTRICTIONS:
       None.

 SIDE EFFECTS:
       None.

 HISTORY:
       Version 1, July 25, 1996, Liyun Wang, NASA/GSFC. Written
       Version 2, August 13, 1996, Liyun Wang, NASA/GSFC
          Converted pointing parameters in f15.1 format if they are
             floating point numbers (e.g., EIT entries)
       Version 3, August 13, 1996, Liyun Wang, NASA/GSFC
          Improved appearence for multi-pointing entries
       Version 4, August 23, 1996, Liyun Wang, NASA/GSFC
          Added optional input parameter PDATE
       Version 5, November 26, 1996, Zarro, NASA/GSFC
          Added output file write protection check and ERR keyword
       Version 6, August 20, 1997, Liyun Wang, NASA/GSFC
          Added campaign numbers and their links to campaign database
             pages on output 
          Improved appearence of HTML output (via SOHO_HTML_ITEMS)

 CONTACT:
       Liyun Wang, NASA/GSFC (Liyun.Wang.1@gsfc.nasa.gov)


MK_PLAN_LOAD $SSW/soho/gen/idl/plan/science/mk_plan_load.pro
[Previous] [Next]
 Project     : SOHO - CDS     
                   
 Name        : MK_PLAN_LOAD
               
 Purpose     : load contents of MK_PLAN_SHARED common blocks
               
 Category    : Planning
               
 Explanation : Depending on DB and instrument type, loads PLANS array
               into corresponding  MK_PLAN_SHARED variables
               
 Syntax      : IDL> mk_plan_load,type,plans
    
 CALLED BY:
	MK_CDS_PLAN, MK_PLAN_CLONE, MK_PLAN_PLOT
 Examples    : 

 Inputs      : TYPE  - 0,1,2,3 for PLANS, FLAG, SCIENCE, and ALT
               PLANS - structure array with plans of requested type
               
 Opt. Inputs : None
               
 Outputs     : None

 Opt. Outputs: None
               
 Keywords    : INST = instrument to update for type 2 [def = 'C' or 'S'] 

 CALLS: ***
	CONCAT_STRUCT, DELVARX [1], DELVARX [2], DELVARX [3], DELVARX [4], EXIST, WHICH_INST
	delvarx [5]
 Common      : MK_PLAN_SHARED
               
 Restrictions: This is not standalone program, but is run in conjunction with
               MK_PLAN and MK_DETAIL for CDS and SUMER only
               
 Side effects: Variables in MK_PLAN_SHARED are modified
               
 History     : Version 1,  21-Jun-1995,  D M Zarro.  Written

 Contact     : DMZARRO


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

 Name        :	MK_PLAN_ORDER

 Purpose     :	orders plan entries according to time-tags and durations

 Explanation :	

 Use         :	MK_PLAN_ORDER, PLAN, NPLAN, STARTDIS, STOPDIS

 Inputs      : PLAN = structure array of plan entries

 Opt. Inputs : STARTDIS, STOPDIS = lower and upper time limits within which
               to constrain recalculated entries.

 Outputs     :	NPLAN = time-shifted plan entries

 Opt. Outputs:	None.

 Keywords    : TGAP = time gap between adjacent entries [def = 1.d-3 s]
               TCAL = start time at which to start recalculation 
                        [def = start of first plan]
               TMAX = start time of last plan entry to check [def = last plan]
               GROUP = main base ID if called from a widget app

 Calls       : ***
	ARR2STR [1], Arr2Str [2], DPRINT, EXIST, GET_PLAN_TYPE, MK_PLAN_CHANGE
	MK_PLAN_RECAL, NUM2STR, TAI2UTC, UTC2TAI, XACK, XALIVE, XANSWER
 CALLED BY:
	MK_CDS_PLAN
 Common      :	None.

 Restrictions:	None.

 Side effects:	None.

 Category    :	Planning

 Prev. Hist. :	None.

 Written     :	Dominic Zarro (ARC)

 Version     :	Version 1.0, 24 May 1995.


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

 Name        : MK_PLAN_PLOT

 Purpose     : Plot timeline for arbitrary plan type and instruments

 Category    : planning

 Syntax      : IDL>mk_plan_plot,tstart,tend

 Inputs      : TSTART = plot start time

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

 Outputs     : None

 Opt. Outputs: None

 Keywords    : TYPE= plan type = 0/1/2/3/4 for DETAILS/FLAG/SCIENCE/ALT/SOHO
                     (def = [0,2])
               INST = SOHO instrument [def = 'CDS']
               GIF  = make GIF file
               FILE = GIF file name [def = mk_plan_plot.gif]
               SIZE = plot size = [1000,250]
               RES  = include spacecraft resources (DSN, SVM)
               JEPG = make JPEG file

 CALLS: ***
	ANYTIM2TAI, ANYTIM2UTC [1], ANYTIM2UTC [2], DATATYPE [1], DATATYPE [2]
	DATATYPE [3], DPRINT, EXIST, GET_INST_COLOR, GET_PLAN_DEF, GET_SOHO_INST
	GET_XWIN [1], HAVE_PROC, IS_WOPEN, MK_24BIT, MK_PLAN_LOAD, MK_TEMP_FILE, PLOT_SPLAN
	RD_PLAN, RD_RESOURCE, SET_LINE_COLOR, SINCE_VERSION [1], SINCE_VERSION [2]
	WHICH_INST, WRITE_GIF, get_xwin [2]
 History     : Version 1,  1-Aug-1997,  D.M. Zarro.  Written
               Vers. 2, 28-Aug-01, Zarro (EITI/GSFC) - added JPEG support

 Contact     : DZARRO@SOLAR.STANFORD.EDU


MK_PLAN_POINT $SSW/soho/gen/idl/plan/science/mk_plan_point.pro
[Previous] [Next]
 PROJECT:
       SOHO - CDS/SUMER

 NAME:
       MK_PLAN_POINT()

 PURPOSE:
       Shell program for making a pointing structure for use with IMAGE_TOOL

 EXPLANATION:

 CALLING SEQUENCE:
       Result = MK_PLAN_POINT(plan)

 INPUTS:
       PLAN - Structure defining a DET or SCI plan entry

 OPTIONAL INPUTS:
       None.

 OUTPUTS:
       RESULT - Pointing structure that has the following tags:

          MESSENGER  - ID of widget in the caller that triggers a
                       timer event in the planning tool to signal the
                       completion of pointing; must be a widget that
                       does not usually generate any event
          INSTRUME   - Code specifying the instrument; e.g., 'C' for CDS
          SCI_SPEC   - Science specification
          STD_ID     - Study ID   
          G_LABEL    - Generic label for the pointing; e.g., 'RASTER'
          X_LABEL    - Label for X coordinate of pointing; e.g., 'INS_X'
          Y_LABEL    - Label for Y coordinate of pointing; e.g., 'INS_Y'
          DATE_OBS   - Date/time of beginning of observation, in TAI format
          DO_POINTING- An integer of value 0 or 1 indicating whether pointing
                       should be handled at the planning level (i.e., by
                       IMAGE_TOOL); default is set to 1.
          N_POINTINGS- Number of pointings to be performed by IMAGE_TOOL
          POINTINGS  - A structure array (with N_POINTINGS elements) of type
                       "DETAIL_POINT" to be handled by IMAGE_TOOL. It has
                       the following tags:

                       POINT_ID - A string scalar for pointing ID
                       INS_X    - X coordinate of pointing area center in arcs
                       INS_Y    - Y coordinate of pointing area center in arcs
                       WIDTH    - Area width (E/W extent)  in arcsec
                       HEIGHT   - Area height (N/S extent) in arcsec
                       ZONE     - Description of the zone for pointing
                       OFF_LIMB - An interger with value 1 or 0 indicating
                                  whether or not the pointing area should
                                  be off limb
          N_RASTERS  - Number of rasters for each pointing (this is
                       irrelevant to the SUMER)
          RASTERS    - A structure array (N_RASTERS-element) of type
                       "RASTER_POINT" that contains raster size and pointing
                       information (this is irrelevant to the SUMER). It has
                       the following tags:

                       POINTING - Pointing handling code; valis
                                  values are: 1, 0, and -1
                       INS_X    - Together with INS_Y, the pointing to use
                                  when user-supplied values are not
                                  allowed.  Only valid when POINTING=0
                                  (absolute) or POINTING=-1 (relative to
                                  1st raster).
                       INS_Y    - ...
                       WIDTH    - Width (E/W extent) of the raster, in arcs
                       HEIGHT   - Height (N/S extent) of the raster, in arcs

 CALLED BY:
	MK_CDS_PLAN, MK_PLAN_SEND, MK_SOHO
      Note: For the case of CDS, pointings.width, pointings.height,
            pointings.ins_x, and pointings.ins_y should match the first
            raster's rasters.width, rasters.height, rasters.ins_x, and
            rasters.ins_y, respectively.

      If an error occurs, a -1 is returned

 OPTIONAL OUTPUTS:
       None.

 KEYWORD PARAMETERS:
       ERROR - Any error message returned; null string if no error

 CALLS: ***
	DATATYPE [1], DATATYPE [2], DATATYPE [3], GET_PLAN_ITIME, GET_PLAN_TYPE
	MK_POINT_STC, STR2ARR [1], STR2ARR [2], TAG_EXIST [1], TAG_EXIST [2], TRIM
	WHICH_INST
 COMMON BLOCKS:
       None.

 RESTRICTIONS:
       None.

 SIDE EFFECTS:
       None.

 CATEGORY:

 PREVIOUS HISTORY:
       Written December 28, 1995, Liyun Wang, NASA/GSFC

 MODIFICATION HISTORY:
       Version 1, Liyun Wang, NASA/GSFC, December 28, 1995
       Version 2, March 5, 1996, Liyun Wang, NASA/GSFC
          Made instrument specific function calls with CALL_FUNCTION
       Version 3, May 1, 1996, Liyun Wang, NASA/GSFC
          Added ERROR keyword
          Fixed bug for multi-pointing SCI entries
       Version 4, February 18, 1997, Liyun Wang, NASA/GSFC
          Added two tags in output structure: SCI_SPEC and STD_ID
       Version 5, March 22, 1997, Zarro, NASA/GSFC
          Cleaned up
       Version 6, May 20, 1998, Zarro, SAC/GSFC
          Allowed for CDS-ALT and -FLAG plan pointings

 CONTACT:
       Liyun Wang, NASA/GSFC (Liyun.Wang@gsfc.nasa.gov)


MK_PLAN_PRIV $SSW/soho/gen/idl/plan/science/mk_plan_priv.pro
[Previous] [Next]
 PROJECT:
       SOHO - CDS/SUMER

 NAME:
       MK_PLAN_PRIV()

 PURPOSE:
       Check to see if the user has the privilege of editing plan

 EXPLANATION:

 CALLING SEQUENCE:
       Result = mk_plan_priv(time)

 TIMES:
       TIME - can be a plan entry or a time in any valid format

 OPTIONAL TIMES:
       None.

 OUTPUTS:
       RESULT - 0/1 indicating if the privilege is granted

 OPTIONAL OUTPUTS:
       None.

 KEYWORD PARAMETERS:
       ERR   - any error message
       LOCK - any LOCK file name (input only)
       INIT  - initialize common
       NOCHECK - don't check for LOCK file
 CALLS: ***
	ANYTIM2UTC [1], ANYTIM2UTC [2], CHECK_LOCK, CONCAT_STRUCT, DATATYPE [1]
	DATATYPE [2], DATATYPE [3], DELVARX [1], DELVARX [2], DELVARX [3], DELVARX [4]
	GET_PLAN_ITIME, GET_UTC, TRIM, UTC2TAI, WHICH_INST, delvarx [5]
 CALLED BY:
	MK_CDS_PLAN, MK_PLAN_ADD, MK_PLAN_CLONE, MK_PLAN_RECAL, MK_PLAN_REM, XCLONE_PLAN
 COMMON BLOCKS:
       None.

 RESTRICTIONS:
       None.

 SIDE EFFECTS:
       None.

 CATEGORY:
       Planning

 PREVIOUS HISTORY:
       Written June 28, 1995, Liyun Wang, GSFC/ARC

 MODIFICATION HISTORY:
       Version 1, created, Liyun Wang, GSFC/ARC, June 28, 1995
       Version 2, Liyun Wang, GSFC/ARC, April 26, 1996
          Modified such that restriction applies only to SUMER
       Version 3, May 1, 1996, Liyun Wang, GSFC/ARC
          Allowed editing entries passed current UT
       Version 4, November 28, 1996, Zarro GSFC
          Added check for database locking

 VERSION:
       Version 4


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

 Name        : MK_PLAN_READ

 Purpose     : general reader for PLAN Database

 Category    : Planning

 Explanation :

 Syntax      : IDL> mk_plan_read,info

 CALLED BY:
	MK_CDS_PLAN, MK_PLAN_FORM, MK_SOHO
 Examples    :

 Inputs      : INFO - Info structure that should have at least the following
                      required tags:
               STARTDIS, STOPDIS - the selected TAI start and stop times
               Req_ITEMS  - string array of selected DB items
               DTYPE      - SOHO plan type to show. 0: SCI, 1: DET

 Opt. Inputs : None

 Outputs     : None

 Opt. Outputs: None

 Keywords    : TIME_CHANGE - 1 if INFO.STARTDIS/STOPDIS differs from
                             values in MK_PLAN_SHARED.
               FORCE - force a reread  of the DB
               NO_MDI - skip reading MDI
               NO_TAPE - skip reading tape dump
               NO_TYPE - plan type to skip reading

 CALLS: ***
	DATATYPE [1], DATATYPE [2], DATATYPE [3], DPRINT, EXIST, GET_SOHO_INST, GREP
	LIST_PLAN, LIST_SOHO_DET, RD_PLAN, RD_RESOURCE, READ_MERGED_DSN, TRIM, WHERE_VECTOR
	WHICH_INST
 Common      : MK_PLAN_SHARED - shared variables with MK_SOHO, MK_CDS_PLAN
               MK_PLAN_READ - useful database flags

 Restrictions:

 Side effects: STARTDIS and STOPDIS in MK_PLAN_SHARED updated by values
               in INFO

 History     : Version 1,  1-Jul-1995,  D M Zarro.  Written
               Version 2, January 23, 1996, Liyun Wang, GSFC/ARC
                  Added NO_X keyword
               Version 3, January 27, 1996, D, Zarro (ARC/GSFC)
                  Sped up reading of resource DB
		Version 4, October 5, 2001 R. Yurow (EITI)
		   Added code to read DSN-27 files from the dsn_merged file
		   if the telemetry line is selected for display.

 Contact     : DZARRO@SOLAR.STANFORD.EDU


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

 Name        :	MK_PLAN_RECAL

 Purpose     :	Recompute DETAILS based on time-tagged information

 Explanation :	Recalculates start and stop times of CDS plan entries

 Use         :	MK_PLAN_RECAL, DETAILS, NDETAILS

 Inputs      :	DETAILS = structure array of detailed plan entries

 Opt. Inputs : STARTDIS = if set, do not auto move non-tt plans before STARTDIS

 Outputs     :	NDETAILS = time-shifted plan entries

 Opt. Outputs:	None.

 Keywords    : TGAP = minimum gap between successive entries [def = 1.e-2]
               TCAL = start time at which to start recalculation 
                        [def = start of first plan]
               TMAX = start time of last plan entry to check [def = last plan in DETAILS]
               ERR = error string
               SERIOUS = if set, then returned error is pretty serious
                    and plan cannot be written as is.

 Calls       : ***
	ANYTIM2UTC [1], ANYTIM2UTC [2], CONCAT_STRUCT, DELVARX [1], DELVARX [2]
	DELVARX [3], DELVARX [4], DPRINT, EXIST, GET_PLAN_ITIME, GET_PLAN_TYPE, GET_UTC
	MK_PLAN_DUR, MK_PLAN_PRIV, MK_PLAN_SORT, STR_FORMAT, TAG_EXIST [1], TAG_EXIST [2]
	TAI2UTC, UTC2TAI, WHICH_INST, delvarx [5]
 CALLED BY:
	MK_PLAN_ORDER
 Common      :	None.

 Restrictions:	Works for DETAILS plan entries only

 Side effects:	None.

 Category    :	Planning

 Prev. Hist. :	None.

 Written     :	Dominic Zarro (ARC)

 Version     :	Version 1.0, 9 January 1995.


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

 Name        : MK_PLAN_RECOVER

 Purpose     : recover from a MK_PLAN crash

 Category    : operations, planning

 Explanation : call this program as a last resort if MK_PLAN crashes 
               inexplicably and does not recover on it's own. Run it
               as follows:

               IDL> retall
               IDL> mk_plan_recover
                            
               This program will execute special versions of 'dbext'
               and 'dbupdate' that will attempt to restore the integrity
               of the planning databases by deleting corrupted records
               that do not have matching index and data records in their
               respective .dbx and .dbf files. Use with extreme caution.

               In case of an unrecoverable MK_PLAN crash, it is recommended
               that you do not exit the current IDL session. Try re-starting
               MK_PLAN one more time. If MK_PLAN still fails, then try running
               MK_PLAN_RECOVER. If MK_PLAN recovers successfully, then 
               press SAVE to save the recovered entries. 

 Inputs      : None

 Outputs     : None

 Keywords    : RESET 

 CALLS: ***
	DELVARX [1], DELVARX [2], DELVARX [3], DELVARX [4], DPRINT, EXIST, GET_CALLER
	LOC_FILE [1], LOC_FILE [2], LOC_FILE [3], MKLOG, MK_PLAN, RECOMPILE, TEST_OPEN
	delvarx [5]
 CALLED BY:
	MK_PLAN
 History     : Written, 21-Oct-2000,  D.M. Zarro (EIT/GSFC)

 Contact     : DZARRO@SOLAR.STANFORD.EDU


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

 Name        :	MK_PLAN_REM

 Purpose     :	Remove PLAN entry from given list of PLANS

 Explanation :

 Use         :	MK_DETAIL_REM, PLAN, PLANS

 Inputs      :
               PLAN = plan structure
               PLANS = structure array of plan entries

 Opt. Inputs : None.

 Outputs     :	None.

 Opt. Outputs:	None.

 Keywords    : ERR  = Any error message of operation

 Calls       : ***
	DELVARX [1], DELVARX [2], DELVARX [3], DELVARX [4], EXIST, MK_PLAN_COMP
	MK_PLAN_PRIV, MK_PLAN_WHERE, delvarx [5]
 CALLED BY:
	MK_CDS_PLAN, MK_PLAN_ADD, MK_PLAN_WRITE, MK_SOHO
 Common      :	None.

 Restrictions:	None.

 Side effects:	PLANS will be modified.

 Category    :	Planning

 Prev. Hist. :	None.

 Written     :	Dominic Zarro (ARC)

 Version     :	Version 1.0, May 18, 1995


MK_PLAN_RESET $SSW/soho/gen/idl/plan/science/mk_plan_reset.pro
[Previous] [Next]
 Project     : SOHO - CDS     
                   
 Name        : MK_PLAN_RESET
               
 Purpose     : reset contents of MK_PLAN_SHARED common blocks
               
 Category    : Planning
               
 Explanation : 
               
 Syntax      : IDL> mk_plan_reset
    
 CALLED BY:
	MK_CDS_PLAN, MK_SOHO
 Examples    : 

 Inputs      : None
               
 Opt. Inputs : None
               
 Outputs     : None

 Opt. Outputs: None
               
 Keywords    : None

 CALLS: ***
	DELVARX [1], DELVARX [2], DELVARX [3], DELVARX [4], delvarx [5]
 Common      : MK_PLAN_SHARED
               
 Restrictions: None
               
 Side effects: Variables in MK_PLAN_SHARED are undefined
               
 History     : Version 1,  4-Aug-1995,  D M Zarro.  Written

 Contact     : DMZARRO


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

 Name        :	MK_PLAN_SBASE

 Purpose     :	makes a widget interface to CDS or SUMER Science Plan

 Explanation :	

 Use         :	MK_PLAN_SBASE,PARENT,SBASE

 Inputs      :	PARENT = parent widget upon which to construct widgets

 Opt. Inputs :	None.

 Outputs     :	SBASE  = created child widget 

 Opt. Outputs:	None.

 Keywords    :	MAP = 1/0 for visible/invisible
               LFONT = font for label widgets
               BFONT = font for button widgets
               CW    = CW use compound widgets for TEXT widgets
 Calls       : ***
	CW_BSELECTOR2, CW_TEXT, MK_DFONT, STRPAD
 Common      :	None.

 Restrictions:	None.

 Side effects:	None.

 Category    :	Planning

 Prev. Hist. :	None.

 Written     :	Dominic Zarro (ARC),  22 January 1995


MK_PLAN_SEND $SSW/soho/gen/idl/plan/science/mk_plan_send.pro
[Previous] [Next]
 PROJECT:
       SOHO - CDS/SUMER

 NAME:
       MK_PLAN_SEND

 PURPOSE:
       Send a new pointing structure to and trigger an event in IMAGE_TOOL

 CATEGORY:
       Planning

 SYNTAX:
       mk_plan_send, plan, messenger

 INPUTS:
       PLAN      - Structure representing a CDS/SUMER DET plan or SOHO
                   SCI plan
       MESSENGER - ID of the widget in planning tool through which
                   the pointing structure is sent back to planning
                   tool from IMAGE_TOOL; must be a widget that does
                   not usually  generate any event 

 OPTIONAL INPUTS:
       None.

 OUTPUTS:
       None.

 OPTIONAL OUTPUTS:
       None.

 KEYWORDS:
       None.

 CALLS: ***
	DATATYPE [1], DATATYPE [2], DATATYPE [3], MK_PLAN_POINT, XVALID
 CALLED BY:
	MK_SOHO
 COMMON:
       None.

 RESTRICTIONS:
       The first child of widget program IMAGE_TOOL must be a widget
       that does not usually generate events.

 SIDE EFFECTS:
       A widget timer event is generated by the first widget child of
       IMAGE_TOOL; the event handler of IAMGE_TOOL must process this
       event accordingly

 HISTORY:
       Version 1, December 27, 1995, Liyun Wang, GSFC/ARC. Written
       Version 2, January 4, 1996, Liyun Wang, GSFC/ARC
          Made it independent of common block used by IMAGE_TOOL
       Version 3, 13-Feb-1996, Zarro GSFC/ARC
          Added check for valid POINT_STC

 CONTACT:
       Liyun Wang, GSFC/ARC (Liyun.Wang.1@gsfc.nasa.gov)


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

 Name        :	MK_PLAN_SHARED

 Purpose     :	Common blocks for MK_SOHO, MK_PLAN, & MK_DETAIL

 Explanation : 

 Use         : N.A.

 Inputs      :	None.

 Opt. Inputs :	None.

 Outputs     :	None.

 Opt. Outputs:	None.

 Keywords    :	None.

 Calls       :	None.
	Called from :	N.A.
 Common      :	None.

 Restrictions:	None.

 Side effects:	None.

 Category    :	Planning, science

 Prev. Hist. :	None.

 Written     :	Version 1, Liyun Wang, GSFC/ARC, June 9, 1995
		Version 2, Ronald Yurow, EITI,	5 October 2001
		   Added variable dsn_27 to common block.

 Version     :	Version 2


MK_PLAN_SHIFT $SSW/soho/gen/idl/plan/science/mk_plan_shift.pro
[Previous] [Next]
 PROJECT:
       SOHO - CDS/SUMER

 NAME:
       MK_PLAN_SHIFT

 PURPOSE:
       Event handler of draw events for MK_SOHO's "Shift" button

 INPUTS:
       EVENT - Event structure generated from the draw widget of
               MK_SOHO_PLAN or MK_SUMER_PLAN 

 OPTIONAL INPUTS: 
       None.

 OUTPUTS:
       None.

 OPTIONAL OUTPUTS:
       None.

 KEYWORD PARAMETERS: 
       None.

 CALLS: ***
	DATATYPE [1], DATATYPE [2], DATATYPE [3], DELVARX [1], DELVARX [2], DELVARX [3]
	DELVARX [4], PLAN_SHIFT_CTIME, PLAN_SHIFT_UTIME, TAI2UTC, UTC2TAI, delvarx [5]
 CALLED BY:
	MK_SOHO
 COMMON BLOCKS:
       BUTTONS - Internal common block used by mk_plan_shift
       Others  - Listed in mk_soho_com.pro (CDS version) or in
                 mk_sumer_com.pro (SUMER version)  

 RESTRICTIONS: 
       None.

 SIDE EFFECTS:
       None.

 CATEGORY:
       Planning

 PREVIOUS HISTORY:
       Written January 6, 1995, Liyun Wang, GSFC/ARC

 MODIFICATION HISTORY:
       Version 1, January 6, 1995, Created
       Version 2, Liyun Wang, GSFC/ARC, April 28, 1995
          Improved the way of handling the dragging mode
	Version 3, William Thompson, GSFC, 8 April 1998
		Changed !D.N_COLORS to !D.TABLE_SIZE for 24-bit displays

 VERSION:
	Version 3, 8 April 1998


MK_PLAN_SORT $SSW/soho/gen/idl/plan/science/mk_plan_sort.pro
[Previous] [Next]
FUNCTION mk_plan_sort, plans, err, unique=unique, by_time=by_time, utc=utc,$
                     by_sci_obj=by_sci_obj, floating=floating, itime=itime,$
                     str=str
+
 PROJECT:
       SOHO - CDS

 NAME:	
       MK_PLAN_SORT()

 PURPOSE:
       Sort a list of plans by time

 EXPLANATION:
       
 CALLING SEQUENCE: 
       Result = sort_plan(plans [, err])

 INPUTS:
       PLANS - List of plan entries

 OPTIONAL INPUTS: 
       None.

 OUTPUTS:
       RESULT - Sorted plan entries if no error occurs, otherwise the input
                PLANS is intact or -1 for syntax error

 OPTIONAL OUTPUTS:
       ERR    - Any error message returned

 KEYWORD PARAMETERS: 
       BY_TIME = sort by time [def]
       BY_SCI_OBJ = sort by SCI objective
       UNIQUE = sort and select unique entries
       FLOATING = sort on floating point times [to avoid possible roundoff]
       ITIME = position of time tag 
       UTC   = sort on UTC times
       STR   = sort on string times (same as UTC)

 CALLS: ***
	EXIST, GET_PLAN_ITIME, STR_FORMAT, UNIQ [1], UNIQ [2], UNIQ [3]
 CALLED BY:
	LIST_TO_DETAIL, MK_CDS_PLAN, MK_PLAN_ADD, MK_PLAN_CHANGE, MK_PLAN_RECAL
	MK_PLAN_TAIL, RD_PLAN, RD_RESOURCE
 COMMON BLOCKS:
       None.

 RESTRICTIONS: 
       None.

 SIDE EFFECTS:
       None.

 CATEGORY:
       Utility, Planning

 PREVIOUS HISTORY:
       Written May 18, 1995, Liyun Wang, GSFC/ARC

 MODIFICATION HISTORY:
       Version 1, created, Liyun Wang, GSFC/ARC, May 18, 1995
       Version 1.1, Zarro, ARC, June 6, 1995 -- added UNIQUE
       Version 1.2, Zarro, ARC, Nov  1, 1995 -- remove side effect
                    of modifying input plans
       Version 2, Zarro, ARC, March 26, 1996 -- added UTC keyword
       Version 3, Zarro, ARC, Sept 5, 1996   -- made /STR the default
 VERSION:
       Version 3


MK_PLAN_TAIL $SSW/soho/gen/idl/plan/science/mk_plan_tail.pro
[Previous] [Next]
 PROJECT:
       SOHO - CDS

 NAME:
       MK_PLAN_TAIL()

 PURPOSE: 
       Find the last plan entry in the current plan block

 EXPLANATION:
       
 CALLING SEQUENCE: 
       result = mk_plan_tail(plan, plans)

 INPUTS:
       PLAN  - The plan entry to be examined 
       PLANS - List of plans 

 OPTIONAL INPUTS: 
       None.

 OUTPUTS:
       RESULT - The last plan entry in the block where PLAN is in

 OPTIONAL OUTPUTS:
       None.

 KEYWORD PARAMETERS: 
       ERROR - Returned error message; null string for no error

 CALLS: ***
	EXIST, GET_PLAN_ITIME, MK_PLAN_SORT, MK_PLAN_WHERE
 CALLED BY:
	MK_SOHO
 COMMON BLOCKS:
       None.

 RESTRICTIONS: 
       None.

 SIDE EFFECTS:
       None.

 CATEGORY:
       
 PREVIOUS HISTORY:
       Written May 26, 1995, Liyun Wang, GSFC/ARC

 MODIFICATION HISTORY:
       Version 1, created, Liyun Wang, GSFC/ARC, May 26, 1995

 VERSION:
       Version 1, May 26, 1995


MK_PLAN_UNLOAD $SSW/soho/gen/idl/plan/science/mk_plan_unload.pro
[Previous] [Next]
 Project     : SOHO - CDS     
                   
 Name        : MK_PLAN_UNLOAD
               
 Purpose     : Unload contents of MK_PLAN_SHARED common blocks
               
 Category    : Planning
               
 Explanation : Depending on DB and instrument type, unloads plan entries
               such as CDS_DETAILS into variable PLANS for
               use by MK_DETAIL.
               
 Syntax      : IDL> mk_plan_unload,type,plans
    
 CALLED BY:
	MK_CDS_PLAN
 Examples    : 

 Inputs      : TYPE  - 0,1,2,3 for DETAILS, FLAG, SCIENCE, and ALT
               
 Opt. Inputs : None
               
 Outputs     : PLANS - structure array with plans of requested type
               
 Opt. Outputs: None
               
 Keywords    : None

 CALLS: ***
	DELVARX [1], DELVARX [2], DELVARX [3], DELVARX [4], EXIST, WHICH_INST, delvarx [5]
 Common      : MK_PLAN_SHARED
               
 Restrictions: This is not standalone program, but is run in conjunction with
               MK_PLAN and MK_DETAIL for CDS and SUMER only
               
 Side effects: None
               
 History     : Version 1,  21-Jun-1995,  D M Zarro.  Written

 Contact     : DMZARRO


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

 Name        :	MK_PLAN_WHERE

 Purpose     :	Find where input TIME or PLAN is relative to PLANS

 Explanation :

 Use         :	INDEX=MK_PLAN_WHERE(TIME,PLANS)

 Inputs      :
               TIME = input time 
                        OR
                      PLAN structure (TIME = start time of PLAN)
               PLANS = structure array of plan entries to search

 Opt. Inputs : None.

 Outputs     :	INDEX = index of PLANS entry in which TIME falls
                                   OR
                       index of last PLANS element if TIME is between entries

 Opt. Outputs:	MATCH = 1 if entered PLAN exactly matches what is in PLANS 

 Keywords    : STATUS = 1 if TIME falls in PLANS, 0 otherwise
               FLOATING  = set to do checking in floating point
               ERR = error string
               LAST = use END time of input plan as reference point
               STR = set to check in string format

 CALLS: ***
	ANYTIM2TAI, EXIST, GET_PLAN_ITIME, GET_PLAN_TYPE, MK_PLAN_COMP, STR_FORMAT
 CALLED BY:
	GET_CDS_OH, GET_CDS_STATE, MK_CDS_PLAN, MK_PLAN_ADD, MK_PLAN_REM, MK_PLAN_TAIL
	MK_SOHO
 Common      :	None.

 Restrictions:	None.

 Side effects:	None.

 Category    :	Planning

 Prev. Hist. :	None.

 Written     :	Dominic Zarro (ARC)
               Modified, 18 Aug 1996, Zarro (GSFC) - made /STR the default

 Version     :	May 31, 1995


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

 Name        :	MK_PLAN_WRITE

 Purpose     :	Rewrite PLAN entries

 Explanation :	Rewrites plan entries that have changed

 Use         :	MK_PLAN_WRITE, NPLAN, PLAN 

 Inputs      :	NPLAN = new PLAN structure array
               PLAN =  old PLAN structure array

 Opt. Inputs : None

 Outputs     :	None.

 Opt. Outputs:	None.

 Keywords    : TGAP = secs gap between consecutive plans [def=1.e-2]
               NOCHECK = do not check DB for possible overlapping plans. 
               RETRY   = retry adding by deleting overlapping plans.
               NOLOOP = do not loop when adding 
               TRUNCATE = truncate MSECS off times

 CALLS: ***
	ARR2STR [1], Arr2Str [2], CONCAT_STRUCT, DELVARX [1], DELVARX [2], DELVARX [3]
	DELVARX [4], DPRINT, EXIST, GET_PLAN_FUNCT, GET_PLAN_ITIME, GET_PLAN_TYPE
	MK_PLAN_COMP, MK_PLAN_REM, RD_PLAN, STR_FORMAT, TAI2UTC, WHICH_INST, delvarx [5]
 CALLED BY:
	MK_CDS_PLAN, MK_SOHO, MK_SOHO_EDP, READ_KAP, UPD_SCI_PLAN
 Common      :	None.

 Restrictions:	None.

 Side effects:	PLAN is replaced by newly-written PLANS

 Category    :	Planning

 Prev. Hist. :	None.

 Written     :	Version 1, Dominic Zarro (ARC), 9 January 1995

 Modified    : Version 2, Liyun Wang, GSFC/ARC, May 23, 1995

 Version     :	Version 2, May 23, 1995


MK_PLAN_XY $SSW/soho/gen/idl/plan/science/mk_plan_xy.pro
[Previous] [Next]
 Project     : SOHO - CDS     
                   
 Name        : MK_PLAN_XY
               
 Purpose     : format plan pointing fields
               
 Category    : Planning
               
 Explanation : 
               
 Syntax      : IDL> rplan=mk_plan_xy(plan)
    
 CALLED BY:
	MK_CDS_PLAN
 Examples    : 

 Inputs      : PLAN = plan structure (can be array)
               
 Opt. Inputs : FORMAT = format for pointing [def = '(f8.0)']
               
 Outputs     : RPLAN = plan structures with appropriately formatted 
                       INS_X,INS_Y or XCEN,YCEN fields

 Opt. Outputs: None
               
 Keywords    : None

 CALLS: ***
	DATATYPE [1], DATATYPE [2], DATATYPE [3], EXIST, GET_PLAN_TYPE, STRPAD, STR_DEBLANK
	STR_FORMAT, TAG_EXIST [1], TAG_EXIST [2], TRIM
 Common      : None
               
 Restrictions: None
               
 Side effects: None
               
 History     : Version 1,  17-July-1996,  D M Zarro.  Written

 Contact     : DZARRO@SOLAR.STANFORD.EDU


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

 mk_query

 PURPOSE:

 To retrieve information about data stored in a SUMER/SOHO FITS file

 CATEGORY:

 Data retrieval

 CALLING SEQUENCE:

 mk_query,filename,query
 
 INPUTS:

 filename: The SUMER/FITS file that is to be examined.

 OPTIONAL INPUTS:

 None
       
 KEYWORD PARAMETERS:

 silent : Suppresses output to the screen (the default).

 ext_max: Sets the maximum number of binary table extensions in the
          file to be examined. Large numbers of BTE's (some files
          seem to have hundreds) take a very long time to read.

 OUTPUTS:

 A description of the data stored in the FITS file is printed to the
 screen. Currently the colum name and dimensions are given as well as
 the maximum and minimum of the wavelength range and pointing.

 OPTIONAL OUTPUTS:

 query: A structure containing a description of the data stored in
        the FITS file. An array of query structures will be returned
        if there is more than one column.

        {name:                   '',$   ;; name of the column
         extension:               0,$   ;; binary table extension number
         column:                  0,$   ;; column number
         dims:            intarr(3),$   ;; dimensions of the column
         dims_str:               '',$   ;; dimensions of the column
         solar_x_min:           0.0,$   ;; min x pointing of the column
         solar_x_max:           0.0,$   ;; max x pointing of the column
         solar_y_min:           0.0,$   ;; min y pointing of the column
         solar_y_max:           0.0,$   ;; max y pointing of the column
         wave_min:              0.0,$   ;; min wavelength of the column
         wave_max:              0.0}    ;; max wavelength of the column

 status: TRUE if the input file appears to contain valid data, FALSE
         if some pathology has arisen.

 CALLS: ***
	CONCAT_STRUCT, DESTRING, FILE_EXIST [2], 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], STR_SEP
	TRIM, UNIQ [1], UNIQ [2], UNIQ [3], file_exist [1], file_exist [3], mk_query_genx
	sgt_file_type, str_replace [1], str_replace [2]
 CALLED BY:
	DMOVIE [1], DMOVIE [2], MKDI_C1, rd_sumer [1], rd_sumer [2]
 COMMON BLOCKS:

 None

 SIDE EFFECTS:

 ?

 RESTRICTIONS:

 All columns in the binary table extension except for those with
 TTYPE keywords sum_status, del_time, exptime, solar_x, and solar_y
 are considered to be data from the detector.

 PROCEDURE:

 Information is gathered from information in the binary table headers
 as well as from the solar_x and solar_y data columns.

 EXAMPLE:

 IDL> filename = 'sum_960513_085055.fits'
 IDL> mk_query,filename,query
 File       : sum_960513_085055.fits
 Detector   : A
 Slit       : <2> 1.0 * 300 centered
 MAX Exptime: 100.0 sec
 MIN Exptime: 100.0 sec
 C      Name    Dimensions    Wmin    Wmax     Xmin     Xmax     Ymin     Ymax
 1 W_937.803    (50,360,5)  936.69  938.91    -1.50     4.50   400.12   400.12
 2 W_933.380    (50,360,5)  932.27  934.49    -1.50     4.50   400.12   400.12
 3 W_930.748    (50,360,5)  929.64  931.86    -1.50     4.50   400.12   400.12
 4 W_926.226    (50,360,5)  925.11  927.34    -1.50     4.50   400.12   400.12
 5 W_909.000    (50,360,5)  907.89  910.11    -1.50     4.50   400.12   400.12
 6 W_944.520    (50,360,5)  943.41  945.63    -1.50     4.50   400.12   400.12
 IDL> help,/str,query
 ** Structure <21f720>, 24 tags, length=116, refs=1:
   NAME            STRING    'W_937.803'
   EXTENSION       INT              1
   COLUMN          INT              1
   DIMS            INT       Array(3)
   DIMS_STR        STRING    '(50,360,5)'
   SOLAR_X_MIN     FLOAT          -1.50000
   SOLAR_X_MAX     FLOAT           4.50000
   SOLAR_Y_MIN     FLOAT           400.125
   SOLAR_Y_MAX     FLOAT           400.125
   WAVE_MIN        FLOAT           936.691
   WAVE_MAX        FLOAT           938.915
   WAVE_MIN1       FLOAT           936.691
   WAVE_MAX1       FLOAT           938.915
   WAVE_MIN2       FLOAT           468.346
   WAVE_MAX2       FLOAT           469.457
   REF_PIX         INT            715
   REF_VAL         FLOAT           937.803
   DELTA           FLOAT         0.0444715
   DETECTOR        STRING    'A'
   MAX_EXPTIME     FLOAT           100.000
   MIN_EXPTIME     FLOAT           100.000
   SLIT            STRING    '<2> 1.0 * 300 centered'
   SLIT_N          INT              2
   FILENAME        STRING    'sum_960513_085055.fits'

 Note that query is an array of structures with six elements.

 MODIFICATION HISTORY:

   HPW 02-JUL-1996: Orginal version.  

   HPW 24-JUL-1996: Fixed a bug which prevented the routine from
                    properly reading full sun, rear slit camera, and
                    history memory files. Modified solar_y output.

   HPW 29-JUL-1996: Changed the way detector data is identified in
                    the binary table extension columns (see
                    RESTRICTIONS), added status keyword, added code
                    to handle files without values for important
                    keywords, and fixed a bug which caused file units
                    to remain open.

   HPW 22-AUG-1996: Added the ext_max keyword which sets the upper
                    limit on the number of binary table extensions to
                    be read.

   HPW 09-JUN-1997: Added work-around for files missing the EXTNAME
                    keyword in the header.

   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 18-JUL-1997: Modified to use mk_query_genx if genx filenames are
                    passed.
 
   HPW 08-AUG-1997: Modified to return the same structure as
                    mk_query_genx and to allow for multiple filenames
                    through the use of recursion.

   HPW 04-FEB-1998: Modified to return the output as a string. Useful
                    for printing the contents of files.

   HPW 27-MAR-2002: Fixed bug related to TTYPE having null strings as
                    entries. Introduced a new bug?


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

 mk_query

 PURPOSE:

 To retrieve information about data stored in a SUMER/SOHO FITS file

 CATEGORY:

 Data retrieval

 CALLING SEQUENCE:

 mk_query,filename,query
 
 INPUTS:

 filename: The SUMER/FITS file that is to be examined.

 OPTIONAL INPUTS:

 None
       
 KEYWORD PARAMETERS:

 silent : Suppresses output to the screen (the default).

 ext_max: Sets the maximum number of binary table extensions in the
          file to be examined. Large numbers of BTE's (some files
          seem to have hundreds) take a very long time to read.

 OUTPUTS:

 A description of the data stored in the FITS file is printed to the
 screen. Currently the colum name and dimensions are given as well as
 the maximum and minimum of the wavelength range and pointing.

 OPTIONAL OUTPUTS:

 query: A structure containing a description of the data stored in
        the FITS file. An array of query structures will be returned
        if there is more than one column.

        {name:                   '',$   ;; name of the column
         extension:               0,$   ;; binary table extension number
         column:                  0,$   ;; column number
         dims:            intarr(3),$   ;; dimensions of the column
         dims_str:               '',$   ;; dimensions of the column
         solar_x_min:           0.0,$   ;; min x pointing of the column
         solar_x_max:           0.0,$   ;; max x pointing of the column
         solar_y_min:           0.0,$   ;; min y pointing of the column
         solar_y_max:           0.0,$   ;; max y pointing of the column
         wave_min:              0.0,$   ;; min wavelength of the column
         wave_max:              0.0}    ;; max wavelength of the column

 status: TRUE if the input file appears to contain valid data, FALSE
         if some pathology has arisen.

 CALLS: ***
	CONCAT_STRUCT, DESTRING, FILE_EXIST [2], 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], STR_SEP
	TRIM, UNIQ [1], UNIQ [2], UNIQ [3], file_exist [1], file_exist [3], mk_query_genx
	sgt_file_type, str_replace [1], str_replace [2]
 CALLED BY:
	DMOVIE [1], DMOVIE [2], MKDI_C1, rd_sumer [1], rd_sumer [2]
 COMMON BLOCKS:

 None

 SIDE EFFECTS:

 ?

 RESTRICTIONS:

 All columns in the binary table extension except for those with
 TTYPE keywords sum_status, del_time, exptime, solar_x, and solar_y
 are considered to be data from the detector.

 PROCEDURE:

 Information is gathered from information in the binary table headers
 as well as from the solar_x and solar_y data columns.

 EXAMPLE:

 IDL> filename = 'sum_960513_085055.fits'
 IDL> mk_query,filename,query
 File       : sum_960513_085055.fits
 Detector   : A
 Slit       : <2> 1.0 * 300 centered
 MAX Exptime: 100.0 sec
 MIN Exptime: 100.0 sec
 C      Name    Dimensions    Wmin    Wmax     Xmin     Xmax     Ymin     Ymax
 1 W_937.803    (50,360,5)  936.69  938.91    -1.50     4.50   400.12   400.12
 2 W_933.380    (50,360,5)  932.27  934.49    -1.50     4.50   400.12   400.12
 3 W_930.748    (50,360,5)  929.64  931.86    -1.50     4.50   400.12   400.12
 4 W_926.226    (50,360,5)  925.11  927.34    -1.50     4.50   400.12   400.12
 5 W_909.000    (50,360,5)  907.89  910.11    -1.50     4.50   400.12   400.12
 6 W_944.520    (50,360,5)  943.41  945.63    -1.50     4.50   400.12   400.12
 IDL> help,/str,query
 ** Structure <21f720>, 24 tags, length=116, refs=1:
   NAME            STRING    'W_937.803'
   EXTENSION       INT              1
   COLUMN          INT              1
   DIMS            INT       Array(3)
   DIMS_STR        STRING    '(50,360,5)'
   SOLAR_X_MIN     FLOAT          -1.50000
   SOLAR_X_MAX     FLOAT           4.50000
   SOLAR_Y_MIN     FLOAT           400.125
   SOLAR_Y_MAX     FLOAT           400.125
   WAVE_MIN        FLOAT           936.691
   WAVE_MAX        FLOAT           938.915
   WAVE_MIN1       FLOAT           936.691
   WAVE_MAX1       FLOAT           938.915
   WAVE_MIN2       FLOAT           468.346
   WAVE_MAX2       FLOAT           469.457
   REF_PIX         INT            715
   REF_VAL         FLOAT           937.803
   DELTA           FLOAT         0.0444715
   DETECTOR        STRING    'A'
   MAX_EXPTIME     FLOAT           100.000
   MIN_EXPTIME     FLOAT           100.000
   SLIT            STRING    '<2> 1.0 * 300 centered'
   SLIT_N          INT              2
   FILENAME        STRING    'sum_960513_085055.fits'

 Note that query is an array of structures with six elements.

 MODIFICATION HISTORY:

   HPW 02-JUL-1996: Orginal version.  

   HPW 24-JUL-1996: Fixed a bug which prevented the routine from
                    properly reading full sun, rear slit camera, and
                    history memory files. Modified solar_y output.

   HPW 29-JUL-1996: Changed the way detector data is identified in
                    the binary table extension columns (see
                    RESTRICTIONS), added status keyword, added code
                    to handle files without values for important
                    keywords, and fixed a bug which caused file units
                    to remain open.

   HPW 22-AUG-1996: Added the ext_max keyword which sets the upper
                    limit on the number of binary table extensions to
                    be read.

   HPW 09-JUN-1997: Added work-around for files missing the EXTNAME
                    keyword in the header.

   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 18-JUL-1997: Modified to use mk_query_genx if genx filenames are
                    passed.
 
   HPW 08-AUG-1997: Modified to return the same structure as
                    mk_query_genx and to allow for multiple filenames
                    through the use of recursion.

   HPW 04-FEB-1998: Modified to return the output as a string. Useful
                    for printing the contents of files.


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

 mk_query_genx

 PURPOSE:

 To retrieve information about data stored in a SUMER/SOHO data file
 that has been written with wrt_sumer. See mk_query for more
 details. This routine is called by the routine mk_query, which also
 works on the original FITS files. The data structure returned by
 mk_query_genx is more extensive, however.

 Note that this routine always displays the first order wavelengths
 unless the keyword default_wave is specified.

 CATEGORY:

 Data retrieval.

 CALLS: ***
	CONCAT_STRUCT, FILE_EXIST [2], STR_SEP, TRIM, file_exist [1], file_exist [3]
	rd_sumer [1], rd_sumer [2], sgt_delta, sgt_detector, sgt_dims, sgt_exptime
	sgt_file_type, sgt_refpix, sgt_refval, sgt_slit, sgt_solar_x, sgt_solar_y, sgt_wave
	str_replace [1], str_replace [2]
 CALLED BY:
	mk_query [1], mk_query [2]
 MODIFICATION HISTORY:

   HPW 18-JUL-1997: Orginal version.

   HPW 04-FEB-1998: Modified to return the output as a string. Useful
                    for printing the contents of files.


MK_RASTER $SSW/soho/cds/idl/sci/plan/tech/mk_raster.pro
[Previous] [Next]
 Project     : SOHO - CDS     
                   
 Name        : MK_RASTER
               
 Purpose     : Widget selection and definition of a CDS raster observation.
               
 Explanation : The user selects the required setup using various widgets to
               define the setup parameters.

 Use         : IDL> mk_raster, setup_structure

 Inputs      : setup_structure  -  is a structure this is taken to define
                                   an observation and the details are loaded
                                   into the widgets on screen.  The values
                                   can then be adjusted as required.  If the
                                   parameter is not a structure then it is
                                   taken to be an output parameter and the
                                   setup must be defined from scratch on the
                                   screen.
               
 Opt. Inputs : None
               
 Outputs     : setup_structure  - on exit, whatever its input form, this
                                  will be a structure containing the details
                                  of the observation according to the latest
                                  structure definition - see TPLAN_STRUCT

 Opt. Outputs: None
               
 Keywords    : modal        - option for when calling from other programs
               group_leader - for control from other programs
               font         - specifies something other than the default font
               fix_desc     - Not for general use.

 Calls       : ***
	ARR2STR [1], Arr2Str [2], Bell, CDS_SLINE, CONCAT_DIR [1], CONCAT_DIR [2]
	CONCAT_DIR [3], CW_FIELD, DATATYPE [1], DATATYPE [2], DATATYPE [3], DEL_WINDOW
	DISPLAY_GIS_WIN, DISPLAY_NIS_WIN, ERASE_NIS_WIN, FILE_EXIST [2]
	FIND_ALL_DIR [1], FIND_ALL_DIR [2], FIND_ALL_DIR [3], FIND_WITH_DEF [1]
	FIND_WITH_DEF [2], FIND_WITH_DEF [3], FIX_ZDBASE, FLASH_MSG, FMT_VECT
	GET_DFONT [1], GET_DFONT [2], GET_UTC, GET_VDS_STATE, GIS_IN_WINDOW, LOADCT
	LOAD_TP_STRUCT, LOAD_WAVECAL, MK_RASTER_EVENT, NIS_IN_WINDOW, NUM2STR, PIX2WAVE
	POPUP_MSG, PRIV_ZDBASE, PROFILES [1], PROFILES [2], REP_TAG_VALUE, ROUND_OFF
	SAVE_WAVECAL, SHOW_STRUCT, SORT_WINDOWS, STRPAD, TAG_EXIST [1], TAG_EXIST [2]
	TEST_OPEN, TPLAN_STRUCT, TP_BSCALE, TP_CALL_HELP, TP_CHK_RASTER, TP_CLEAR_LINES
	TP_CLEAR_RASTER, TP_CLEAR_STATE, TP_COLBAR, TP_COLTABLE, TP_DISPLAY_DEW
	TP_DISPLAY_VP, TP_DISP_IEF, TP_DISP_LLIST, TP_DISP_RAST, TP_DRAW_MESSAGE
	TP_DRAW_RASDUR, TP_DRAW_VWIN, TP_DUMP_SETUP, TP_EDIT_LINES, TP_GET_DESC
	TP_GET_DUMDATA, TP_LOAD_VDSBACK, TP_PLOT_DEW, TP_PLOT_GIS, TP_PLOT_VDS, TP_RASDUR
	TP_READ_HELP, TP_READ_TEXTW, TP_RECALC_DEW, TP_REDISPLAY, TP_UPDATE_LINES
	TP_VDS_AXES, TP_WRT_DWIN, TP_WRT_FRAST, TP_WRT_IEF, TP_WRT_LLIST, TP_WRT_VRAST
	VALID_NUM [1], VALID_NUM [2], VALID_NUM [3], WAVE2PIX, WHICH_ZDBASE, WIDG_HELP, XACK
	XALIVE, XKILL, XLOADCT [1], XLOADCT [2], XLOADCT [3], XMANAGER, XMENU [1], XMENU [2]
	XPDMENU, XREGISTERED, concat_dir [4], file_exist [1], file_exist [3]
 CALLED BY:
	MK_STUDY
 Restrictions: None
               
 Side effects: None
               
 Category    : Technical planning.
               
 Prev. Hist. : Based on the original tp_page1.

 Written     : C D Pike, RAL, 8-Jul-94
               
 Modified    : Renamed and updated from TPLAN.  CDP, 7-Dec-94
               Added scroll bars to main base widget for use on small
               screens.  CDP, 14-Feb-95
               Added font keyword, and all widgets use font.  
                                                            CDP/WT 28/Mar/95
               Use copy_struct when changing instruments.   CDP, 18-May-95
               Replace calls to NINT by ROUND.              CDP, 17-Jun-95
               Fixed error in call to ROUND.                CDP, 28-Jun-95
               Add GIS filaments to zone types.             CDP, 7-Sep-95
               Use new state database call (cp_get_state).  CDP, 07-Sep-95
               Upgrade handling of typed in exposure times. CDP, 26-Sep-95
               Limit exposure times to 1000 secs, increase size of
               descriptor widgets and handle GIS filament zone IDs.  
                                                            CDP, 17-Oct-95
               Rework messages window.                      CDP, 18-Oct-95
               Make inclusion of VDS background windows the default.
                                                            CDP, 23-Oct-95
               Include new version of 'sum over lines' compression.
                                                            CDP, 2-Nov-95
               Include IEF access.                          CDP, 8-Nov-95
               Add database IDs to display.                 CDP, 9-Nov-95
               Change security access to databases.         CDP, 10-Nov-95
               Restore ZDBASE on exit.                      CDP, 13-Nov-95
               Allow update of db descriptions.             CDP, 27-Nov-95
               Change command setting ZDBASE on exit        CDP, 18-Jan-96
               Added call to GET_DFONT to check availability
               of button fonts.
               Used STRPAD in place of XSIZE in WIDGET_LABEL
               to fix version 4 sizing problems.
               Added calls to XALIVE to recover from crashes
               when MK_RASTER is called by another program.
                                                             DMZ, 14-Feb-96
               Changed code for scrolling message window.    DMZ, 20-Feb-96
               Changed call to cp_get_state to get_vds_state CDP, 23-Feb-96
               Cleared a load of redundant code connected with 
               detector setup                                CDP, 04-Mar-96
               Gave up on SAVEGEN, back to IDL SAVE.         CDP, 14-Mar-96
               Use new wavecal system but assume linear.     CDP, 15-Mar-96
               Add curr_lheight to call to tp_get_desc       CDP, 10-Apr-96
               Limit number of mirror/slit locations to 255. CDP, 28-Apr-96
               Trap no write access for save file on exit.   CDP, 07-May-96
               Trap max exp time on type in.                 CDP, 13-May-96
               Changed newdata .pdm file 2b independent.     CDP, 19-Jul-96
               Move .pdm files to software directory,
                  tidy VDS parameter display, make 12 bit
                  truncation default NIS compression.        CDP, 29-Jul-96
               Tidy use of ZDBASE.                           CDP, 08-Aug-96
               Resize telemetry timing widgets.               CDP, 15-Aug-96
               Change handling of messages window.             CDP, 10-Oct-96
               Handle user compression scheme/include TM rate.  CDP, 06-Oct-97
               Include new LOW++ telemetry rate                  CDP, 12-Dec-97
               Extended /ALL keyword in text widget to /ALL_TEXT DMZ 1-May-98
               Add real NIS data to display.                    CDP, 05-May-99
               Added GROUP_LEADER as UVALUE to MAIN            DMZ, 27-Dec-99
               Cut out test write for directory on exit.      CDP, 20-Sep-00
 
 Version     : Version 41, 20-Sep-00


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

   Purpose: make a script file from str_data and optionally spawn it

   Input Parameters:
      str_data - string array of commands

   Optional Keyword Parameters
      name - file name for script file (default='mk_script.src')
      submit - switch; if set, the file is sourced (executed)

   Output - function return value is script file name

   History - slf, 15-nov-92
	      slf,  6-mar-92 - allow 'appending' to new file

 CALLED BY
	arctap2tap, mktap_prep


MK_SOHO $SSW/soho/gen/idl/plan/science/mk_soho.pro
[Previous] [Next]
 PROJECT:
       SOHO

 NAME:
       MK_SOHO

 PURPOSE:
       Widget interface for displaying/editing SOHO SCI plans

 EXPLANATION:

 CALLING SEQUENCE:
       mk_soho [,tstart]

 INPUTS:
       None required.

 OPTIONAL INPUTS:
       TSTART - start date to display/edit

 OUTPUTS:
       None.

 OPTIONAL OUTPUTS:
       None.

 KEYWORD PARAMETERS:
	GROUP  = event id of calling parent widget.
       MODAL  = make parent widget insensitive when MK_SOHO is called
                as child.
       EDIT   = Start the program in edit mode
       RESET  = Force the database to be read again
       DETACH = Separate the display window from the main widget if set

 CALLS: ***
	ANYTIM2UTC [1], ANYTIM2UTC [2], CONCAT_STRUCT, COPY_STRUCT [1], COPY_STRUCT [2]
	COPY_STRUCT [3], CW_BSELECTOR2, DATATYPE [1], DATATYPE [2], DATATYPE [3]
	DATE_CODE, DEF_INST_PLAN, DELVARX [1], DELVARX [2], DELVARX [3], DELVARX [4], DPRINT
	ENTRY_CLONE, EXIST, GET_DFONT [1], GET_DFONT [2], GET_INST_COLOR, GET_LATEST_KAP
	GET_PLAN_ITIME, GET_PLAN_SCI, GET_SOHO_INST, GET_UNIQ_LIST, GET_UTC, GREP
	HAVE_WIDGETS [1], HAVE_WIDGETS [2], IMAGE_TOOL, LIST_CAMPAIGN, LIST_OBJECT
	LIST_PROGRAM, LOADCT, MATCH_STRUCT, MK_PLAN_ADD, MK_PLAN_CHANGE, MK_PLAN_CONV
	MK_PLAN_COPY, MK_PLAN_POINT, MK_PLAN_READ, MK_PLAN_REM, MK_PLAN_RESET
	MK_PLAN_SEND, MK_PLAN_SHIFT, MK_PLAN_TAIL, MK_PLAN_WHERE, MK_PLAN_WRITE
	MK_SOHO_BUTTON, MK_SOHO_CUSTOM, MK_SOHO_DBASE, MK_SOHO_DRAW, MK_SOHO_EDP
	MK_SOHO_ERASELINE, MK_SOHO_EVENT, MK_SOHO_EXTPLAN, MK_SOHO_MOVE, MK_SOHO_NOTIFY
	MK_SOHO_PLOT, MK_SOHO_REDRAW, MK_SOHO_REMOVE_ALL, MK_SOHO_SAVE
	MK_SOHO_SBASE [1], MK_SOHO_SBASE [2], MK_SOHO_SCIOBJ, MK_SOHO_SWITCH
	MK_SOHO_TPLOT, MK_SOHO_UPDATE, MK_SOHO_WREFRESH, NUM2STR, OPLOT_SPLAN, PLOT_SPLAN
	PS [1], PS [2], PSCLOSE [1], PSCLOSE [2], PSPLOT [1], PSPLOT [2], RD_ASCII [1]
	RD_ASCII [2], REP_TAG_VALUE, ROUND_OFF, SETWINDOW [1], SETWINDOW [2]
	SET_LINE_COLOR, SHOW_RES_STC, STR2ARR [1], STR2ARR [2], TAG_EXIST [1]
	TAG_EXIST [2], TAI2UTC, UPDATE_KAP, UTC2TAI, VALID_TIME, WIDG_HELP, X2GIF, XACK, XANSWER
	XCLONE_PLAN, XIAP, XINPUT, XKILL, XLIST, XMANAGER, XMESSAGE, XMOVE_PLAN, XPS_SETUP
	XREGISTERED, XSEL_LIST [1], XSEL_LIST [2], XSHOW, XTEXT, delvarx [5]
 CALLED BY:
	MK_SOHO_SETUP
 COMMON BLOCKS:
       Defined in mk_soho_com.pro

 RESTRICTIONS:
       None.

 SIDE EFFECTS:
       None.

 CATEGORY:
       Planning Tool

 PREVIOUS HISTORY:
       Written May 15, 1995, Liyun Wang, GSFC/ARC

 MODIFICATION HISTORY:
       Version 1.0, created, Liyun Wang, GSFC/ARC, May 15, 1995
          Adopted from MK_PLAN
       Version 1.1, Liyun Wang, GSFC/ARC, May 30, 1995
          Added plan cloning feature
          Added COPY plan feature
       Version 2.0, Liyun Wang, GSFC/ARC, June 9, 1995
          Improved the functionality of the "Add" button
          Added graphically moving function
          Added option to choose unit of plan duration (sec, min, hour)
          Made it possible to specify start/stop/duration of a plan entry
             via mouse or directly editing of widget content
       Version 2.1, Liyun Wang, GSFC/ARC, June 27, 1995
          Replaced calls to MK_PLAN_CHK (which no longer exists) with
             MK_PLAN_WHERE
       Version 2.2, July 20, 1995, Liyun Wang, GSFC/ARC
          Fixed a bug of repeatedly removing and adding entries
       Version 2.3, July 24, 1995, Liyun Wang, GSFC/ARC
          Added DETACH keyword to separate the display window
          Added UNDO feature
       Version 3.0, August 10, 1995, Liyun Wang, GSFC/ARC
          Plotted telemtry resources and commanding resources on
             different row
          Added MDI science plan row
          Added button to read the latest KAP files
          Added feature of writing CAP files
          Added feature of cloning one selected entry to all instrument
          Added feature of deleting entries that are identical to all
             instruments
       Version 3.1, August 16, 1995, Liyun Wang, GSFC/ARC
          Added XCEN and YCEN fields to the widget
          Added cursor time round off mechanism
       Version 3.2, August 21, 1995, Liyun Wang, GSFC/ARC
          Added feature of displaying the latest KAP file
          Added capability of displaying SOHO wide detailed plan entries
       Version 3.3, August 31, 1995, Liyun Wang, GSFC/ARC
          Made cursor line extendable and color coded for different
             instruments in display mode
          Got rid of TSTOP positional parameter
       Version 3.4, October 10, 1995, Liyun Wang, GSFC/ARC
          Started using the XPS_SETUP to handle making hard copies in
             PS fromat
          Fixed a bug that would crash the program if the middle
             button is clicked earlier than the left button
       Version 3.5, November 10, 1995, Liyun Wang, GSFC/ARC
          Added capability of showing resource structures
       Version 3.6, November 20, 1995, Liyun Wang, GSFC/ARC
          Modified so that the user is warned when he leaves a
             modified, unsaved plan entry
       Version 3.7, December 4, 1995, Liyun Wang, GSFC/ARC
          Added inherit feature
       Version 3.8, December 14, 1995, Liyun Wang, GSFC/ARC
          Fixed a bug that soho_splan is not updated properly when
             shifting the timeline
          Fixed problem encountered when deleting all entries
             starting at the same time
       Version 4.0, December 28, 1995, Liyun Wang, GSFC/ARC
          Added feature to perform pointing with IMAGE_TOOL
       Version 4.1, January 12, 1996, Liyun Wang, GSFC/ARC
          Fixed bug that causes crash in editing mode if no instrume
             is chosen
          Added option to insert entry at beginning of display
       Version 4.2, January 15, 1996, Liyun Wang, GSFC/ARC
          Added current UT to the widget title
          Implemented feature to add a series plans
          Force a reset when it sees the change of ZDBASE
       Version 4.3, January 25, 1996, Liyun Wang, GSFC/ARC
          Added inheriting stop time as start time
       Version 4.4, January 30, 1996, Liyun Wang, GSFC/ARC
          Implemented zoom in/out feature
       Version 4.5, March 18, 1996, Liyun Wang, GSFC/ARC
          Fixed a bug that new entry always defaults to a CDS plan
       Version 4.6, April 10, 1996, Liyun Wang, GSFC/ARC
          Modified such that DB is not read when changing mode unless necesary
          Made Pointing Tool available to SOHO details plans as well
          Added feature of tracing the cursor time
       Version 4.7, May 1, 1996, Liyun Wang, GSFC/ARC
          Lifted restriction of disallowing edit of entries before
             current UT
          Fixed a bug of unabling to show multiple pointings in SOHO
             DET plans
       Version 4.8, August 20, 1996, Liyun Wang, NASA/GSFC
          Replaced calls to "XTEXT, /just_reg" with XMESSAGE to avoid
             hanging of IDL
          Added option to turn off color in display -- DMZ

 VERSION:
       Version 4.8, August 20, 1996


MK_SOHO_COM $SSW/soho/gen/idl/plan/science/mk_soho_com.pro
[Previous] [Next]
 Project     : SOHO

 Name        : MK_SOHO_COM

 Purpose     : Common blocks for SOHO planning tool.

 Common      : Itself

 Category    : Common

 Prev. Hist. : None

 Written     : Liyun Wang, GSFC/ARC, May 16, 1995

 Version     : Version 2, Sep 8 1995


MK_SOHO_CUSTOM $SSW/soho/gen/idl/plan/science/mk_soho_custom.pro
[Previous] [Next]
 PROJECT:
       SOHO - CDS/SUMER

 NAME:
       MK_SOHO_CUSTOM

 PURPOSE: 
       Widget interface for customizing MK_SOHO

 CATEGORY:
       Planning, widgets
 
 EXPLANATION:
       User can customize features such as START/STOP times, which DB
       entry to EDIT (e.g. DETAILS, FLAG...) or display as a
       reference (e.g. DSN, MDI, CDS, SUMER...) 

 SYNTAX: 
       mk_soho_custom, s, group=group, modal=modal

 INPUTS:
       See OUTPUTS.

 OPTIONAL INPUTS: 
       None.

 OUTPUTS:
       S - Structure that has following tags:
           STARTDIS, STOPDIS - the selected TAI start and stop times
           REQ_ITEMS  - string array of selected DB items
           SHOW_NOW   - Flag (1/0) to show current UT
           SHOW_DAY   - Flag (1/0) to show day boundary
           SHOW_LOCAL - Flag (1/0) to show local time
           NOCOLOR    - Flag (1/0) to turn off/on color plot
           OPS_MODE   - Operation mode. 0: edit SCI, 1: display SCI
                        2: display DET
           DTYPE      - SOHO plan type to show. 0: SCI, 1: DET
           TROFF      - Cursor time roundoff, in minutes
           EXT_CURSOR - Flag (1/0) to extend cursor line

 OPTIONAL OUTPUTS:
       None.

 KEYWORDS: 
       GROUP = widget id of calling widget program
       MODAL = freeze calling program
       STATUS = 0 if user quit and wants to abort

 CALLS: ***
	ANYTIM2UTC [1], ANYTIM2UTC [2], CW_BSELECTOR, DATATYPE [1], DATATYPE [2]
	DATATYPE [3], FREE_POINTER, GET_CALLER, GET_DFONT [1], GET_DFONT [2], GET_POINTER
	GET_SOHO_INST, GREP, HAVE_WIDGETS [1], HAVE_WIDGETS [2], JOIN_STRUCT [1]
	JOIN_STRUCT [2], MAKE_POINTER, MK_DFONT, MK_SOHO_CUSTOM_EVENT, REP_TAG_VALUE
	SET_POINTER, SPLIT_STRUCT, TAG_EXIST [1], TAG_EXIST [2], TAI2UTC, UTC2TAI, XACK
	XALIVE, XKILL, XMANAGER, XMENU [1], XMENU [2], XREALIZE, XSHOW
 CALLED BY:
	MK_SOHO
 COMMON:
       None.

 RESTRICTIONS: 
       None.

 SIDE EFFECTS:
       None.

 HISTORY:
       Version 1, April 20, 1995, Liyun Wang, GSFC/ARC. Written
       Version 2, January 24, 1996, Liyun Wang, GSFC/ARC
          Modified such that no carriage return is needed for start
             time string
       Version 3, March 13, 1996, Liyun Wang, GSFC/ARC
          Made the widget centered at screen
       Version 4, April 25, 1996, Liyun Wang, GSFC/ARC
          Modified such that entries for CELIAS, SWAN, and ERNE appear
             as JOP, SOC, and CAMPAIGN respectively
       Version 5, June 24, 1996, Liyun Wang, GSFC/ARC
          Added option to turn of color when drawing plan entries

 CONTACT:
       Liyun Wang, GSFC/ARC (Liyun.Wang.1@gsfc.nasa.gov)


MK_SOHO_EDP $SSW/soho/gen/idl/plan/science/mk_soho_edp.pro
[Previous] [Next]
 PROJECT:
       SOHO - CDS/SUMER

 NAME:
       MK_SOHO_EDP

 PURPOSE: 
       Clone a given plan entry to other instruments

 CATEGORY:
       Planning
 
 EXPLANATION:
       
 SYNTAX: 
       mk_soho_edp, plan, soho_splan

 CALLED BY:
	MK_SOHO
 EXAMPLES:
       
 INPUTS:
       PLAN       - Plan structure to be cloned
       SOHO_SPLAN - SOHO wide Science plan entries

 OPTIONAL INPUTS: 
       None.

 OUTPUTS:
       None, but SOHO_SPLAN may be changed

 OPTIONAL OUTPUTS:
       None.

 KEYWORDS: 
       STATUS
       GROUP 
       MODAL
       ERROR

 CALLS: ***
	ANYTIM2UTC [1], ANYTIM2UTC [2], DATATYPE [1], DATATYPE [2], DATATYPE [3], EXIST
	GET_CENT_OFF, GET_DFONT [1], GET_DFONT [2], GET_PLAN_ITIME, GET_SOHO_INST, GREP
	MK_PLAN_ADD, MK_PLAN_CHANGE, MK_PLAN_WRITE, MK_SOHO_EDP_EVENT, MK_SOHO_EXTPLAN
	REP_TAG_VALUE, XKILL, XMANAGER, XMENU [1], XMENU [2]
 COMMON:
       @mk_soho_com

 RESTRICTIONS: 
       None.

 SIDE EFFECTS:
       SOHO_PLANS is changed.

 HISTORY:
       Version 1, August 31, 1995, Liyun Wang, GSFC/ARC. Written

 CONTACT:
       Liyun Wang, GSFC/ARC (Liyun.Wang.1@gsfc.nasa.gov)


MK_SOHO_EXTPLAN $SSW/soho/gen/idl/plan/science/mk_soho_extplan.pro
[Previous] [Next]
 PROJECT:
       SOHO - CDS/SUMER

 NAME:
       MK_SOHO_EXTPLAN

 PURPOSE: 
       Extract science plans for a given instrument from SOHO SCI plans

 CATEGORY:
       Planning
 
 EXPLANATION:
       
 SYNTAX: 
       mk_soho_extract_plan, soho_splan, instrume, inst_plans, other_plans

 INPUTS:
       SOHO_SPLAN - SOHO wide SCIENCE plan entries
       INSTRUME   - Instrument name (in long form)

 OPTIONAL INPUTS: 
       None.

 OUTPUTS:
       INST_PLANS  - Extracted SCI plan entries for INSTRUME
       OTHER_PLANS - Othe SCI plan entries in SOHO_SPLAN except INST_PLANS

 OPTIONAL OUTPUTS:
       None.

 KEYWORDS: 
       None.

 CALLS: ***
	DATATYPE [1], DATATYPE [2], DATATYPE [3], DELVARX [1], DELVARX [2], DELVARX [3]
	DELVARX [4], DPRINT, GET_SOHO_INST, delvarx [5]
 CALLED BY:
	MK_SOHO, MK_SOHO_EDP
 COMMON:
       None.

 RESTRICTIONS: 
       None.

 SIDE EFFECTS:
       None.

 HISTORY:
       Version 1, August 31, 1995, Liyun Wang, GSFC/ARC. Written

 CONTACT:
       Liyun Wang, GSFC/ARC (Liyun.Wang.1@gsfc.nasa.gov)


MK_SOHO_SBASE [1] $SSW/soho/gen/idl/plan/science/mk_soho_dbase.pro
[Previous] [Next]
 PROJECT:
       SOHO - CDS/SUMER

 NAME:
       MK_SOHO_SBASE

 PURPOSE: 
       Create widget fields for SOHO DET plans

 CATEGORY:
       Planning
 
 EXPLANATION:
       
 SYNTAX: 
       mk_soho_dbase, parent, child

 INPUTS:
       PARENT - parent widget upon which to construct widgets

 OPTIONAL INPUTS: 
       None.

 OUTPUTS:
       CHILD - Widget ID of the created child widget

 OPTIONAL OUTPUTS:
       None.

 KEYWORDS: 
       MAP   - 1/0 for visible/invisible
       LFONT - font for label widgets

 CALLS: ***
	CW_BSELECTOR2, GET_DFONT [1], GET_DFONT [2], MK_SOHO_DBASE
 CALLED BY:
	MK_SOHO
 COMMON:
       None.

 RESTRICTIONS: 
       None.

 SIDE EFFECTS:
       None.

 HISTORY:
       Version 1, August 21, 1995, Liyun Wang, GSFC/ARC. Written
       Version 2, May 6, 1996, Liyun Wang, GSFC/ARC
          Added N_POINT text widget

 CONTACT:
       Liyun Wang, GSFC/ARC (Liyun.Wang.1@gsfc.nasa.gov)


MK_SOHO_SBASE [2] $SSW/soho/gen/idl/plan/science/mk_soho_sbase.pro
[Previous] [Next]
 PROJECT:
       SOHO - CDS/SUMER

 NAME:
       MK_SOHO_SBASE

 PURPOSE: 
       Create widget fields for SOHO SCI plans

 CATEGORY:
       Planning
 
 EXPLANATION:
       
 SYNTAX: 
       mk_soho_sbase, parent, child

 INPUTS:
       PARENT - parent widget upon which to construct widgets

 OPTIONAL INPUTS: 
       None.

 OUTPUTS:
       CHILD - Widget ID of the created child widget

 OPTIONAL OUTPUTS:
       None.

 KEYWORDS: 
       MAP   - 1/0 for visible/invisible
       LFONT - font for label widgets

 CALLS: ***
	CW_BSELECTOR2, GET_DFONT [1], GET_DFONT [2]
 CALLED BY:
	MK_SOHO
 COMMON:
       None.

 RESTRICTIONS: 
       None.

 SIDE EFFECTS:
       None.

 HISTORY:
       Version 1, August 21, 1995, Liyun Wang, GSFC/ARC. Written

 CONTACT:
       Liyun Wang, GSFC/ARC (Liyun.Wang.1@gsfc.nasa.gov)


MK_SOHO_SETUP $SSW/soho/gen/idl/plan/science/mk_soho_setup.pro
[Previous] [Next]
 PROJECT:
       SOHO

 NAME:
       MK_SOHO_SETUP

 PURPOSE:
       Set up things for SOC people to run MK_SOHO *more* easily

 CATEGORY:
       Planning, utility

 SYNTAX:
       mk_soho_setup [, /resume]

 INPUTS:
       None required.

 OPTIONAL INPUTS:
       None.

 OUTPUTS:
       None.

 OPTIONAL OUTPUTS:
       None.

 KEYWORDS:
       RESUME - Resume original settings
       GO     - Set this keyword to launch MK_SOHO (no effect if
                RESUME keyword is set)

 CALLS: ***
	DELVARX [1], DELVARX [2], DELVARX [3], DELVARX [4], EXIST, FIX_ZDBASE, MK_SOHO
	STREP [1], STREP [2], STREP [3], STREP [4], STREP [5], delvarx [5]
 COMMON:
       SETUP4MKSOHO (for internal use)

 RESTRICTIONS:
       None.

 SIDE EFFECTS:
       Values of several system variables are changed. To restore
       them, run this procedure with the RESUME keyword.

 HISTORY:
       Version 1, March 5, 1996, Liyun Wang, GSFC/ARC. Written

 CONTACT:
       Liyun Wang, GSFC/ARC (Liyun.Wang.1@gsfc.nasa.gov)


MK_SOHO_TARGET $SSW/soho/gen/idl/plan/science/mk_soho_target.pro
[Previous] [Next]
 PROJECT:
       SOHO - CDS/SUMER

 NAME:
       MK_SOHO_TARGET

 PURPOSE:
       Create an HTML file listing all SOHO plan targets

 CATEGORY:
       Planning, utility

 EXPLANATION:
       This program creates an HTML target page for SOHO plan
       entries for given start DATE.
       The created file contains SOHO plans and
       DSN schedule for a specific operational day.

 SYNTAX:
       mk_soho_target [, date]

 INPUTS:
       None required.

 OPTIONAL INPUTS:
       DATE - Starting date (in any ECS format) on which the targets
              to be listed; if missing, the current date is assumed
       FILE - output file name [def = soho_plan.YYYYMMDD, where YYYYMMDD
              represents the date 
 OUTPUTS:
       None.

 OPTIONAL OUTPUTS:
       None.

 KEYWORDS:

       DIRECTORY - Name of the directory in which output files are created;
                   if missing, the current IDL working directory is used

       VERBOSE   - Set this keyword to get more informative prompts
                   from the program

       SCIPLAN   - print SCI_PLAN (default = DETAILS)

       NODSN     - don't list DSN

       ERR       - error string

       NOAA      - get latest NOAA line drawing 
       
       DAYS      - # of DAYS to list [def=1]

 CALLS: ***
	ANYTIM2UTC [1], ANYTIM2UTC [2], BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3]
	CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], DATATYPE [1], DATATYPE [2]
	DATATYPE [3], ESPAWN, EXIST, FIX_ZDBASE, GET_CAMPAIGN, GET_NOAA, GET_OBJECT
	GET_PLAN_ITIME, GET_SOHO_INST, GET_SOHO_SUBMODE, GET_UTC, IS_STRING, LIST_DSN
	LIST_PLAN, LIST_SOHO_DET, LOC_FILE [1], LOC_FILE [2], LOC_FILE [3], OS_FAMILY
	PRINT_DSN, PRINT_ENTRY, SEC2DHMS, STR2ARR [1], STR2ARR [2], TAG_EXIST [1]
	TAG_EXIST [2], TEST_DIR, TRIM, UNIQ [1], UNIQ [2], UNIQ [3], WHERE_VECTOR
	break_file [4], concat_dir [4], is_number [1], is_number [2]
 CALLED BY:
	MK_PLAN_FORM, UPDATE_SOHO_TARGETS
 COMMON:
       None.

 RESTRICTIONS:
       None.

 SIDE EFFECTS:
       None.

 HISTORY:
       Version 1, March 22, 1996, Liyun Wang, GSFC/ARC. Written
       Version 2, April 26, 1996, Liyun Wang, GSFC/ARC
          Modified so that targets for CELIAS, SWAN, and ERNE appear
             as JOP, SOC, and Campaign, respectively
       Version 3, June 6 1996, Dominic Zarro, GSFC
          Modified to show DETAILED pointing and FOV
          Added call to UPDATE_KAP
       Version 4, November 26 1996, Dominic Zarro, GSFC
          Added file/directory write protection checks and ERR keyword
       Version 5, Jan 6 1997, Dominic Zarro, GSFC
          Made HTML the norm

 CONTACT:
       Liyun Wang, GSFC/ARC (Liyun.Wang.1@gsfc.nasa.gov)


mk_stdim $SSW/soho/lasco/idl/exposure/mk_stdim.pro
[Previous] [Next]
 MK_STDIM
	Form a "Standard" mask image from the current image set

 Usage:
	mk_stdim[, stdim, stexp=stexp, filename=filename]

 Arguments:
	filename string	input	The name to give to the image. If
				unset, then use "stdim.fts"

 Keywords:
	stexp	float	output	The integrated exposures of each
				pixel.
	save	??	input	If set, then save the generated image
				to disk

 Effects:
	A "standard" average image is generated and added to the end
	of the list of loaded images. Most of its header information
	is derived from the first image of the set. N.B. The image is
	NOT saved to disk, use one of the SAVE options in DISPLAY to
	do this.

 WARNING:
	It is the responsibility of the user to ensure that the image
	set being used is homogeneous.

 CALLS: ***
	CHANDLE, CHK_DIR [1], CHK_DIR [2], OCCLTR_CNTR, OFFSET_BIAS, SXADDPAR [1]
	SXADDPAR [2], SXADDPAR [3], SXPAR [1], SXPAR [2], SXPAR [3], WRITEFITS [1]
	WRITEFITS [2], mask_out, mk_stdim_hdr, scan4limb, sigma_mask
 CALLED BY:
	w_mk_stdim
 History:
	Original: Mar 96, SJT
	Reduce number of arrays to try to speed it up: 4/4/96; SJT
	Use NO_COPY handle extraction instead of GHANDLE for the same
	reason: 22/4/96; SJT


mk_stdim_hdr $SSW/soho/lasco/idl/exposure/mk_stdim_hdr.pro
[Previous] [Next]
 MK_STDIM_HDR
	Make the fits header for a standard image.

 Usage:
	mk_stdim_hdr, head, last_head

 Arguments:
	head	string	in/out	The header to be updated - must be
                                                          derived
                                                          from the
                                                          first image
                                                          of the set
                                                          if it is to
                                                          work
                                                          properly
	last_head str	input	The header of the last image of the
				set.
	image	float	input	The standard image to be described by
				the header
	filename string	input	The name of the file to include in the
				header.
	nim	int	input	The number of images incorporated.

 Keyword:
	rebin	???	input	If set & non-zero, then the image may
				have been rebinned if it was a
				low-resolution image.


 Effects:
	The FITS header is updated.

 CALLS: ***
	STDEV, SXADDPAR [1], SXADDPAR [2], SXADDPAR [3], SXDELPAR [1], SXDELPAR [2]
	SXDELPAR [3], SXPAR [1], SXPAR [2], SXPAR [3], TAI2UTC, fractile
 CALLED BY:
	mk_minim, mk_stdim, mk_stdim_list
 History:
	Original: 4/6/96; SJT


mk_stdim_list $SSW/soho/lasco/idl/exposure/mk_stdim_list.pro
[Previous] [Next]
 MK_STDIM_LIST
	Form a "Standard" mask image from a list or more usually from
	a set of parameters to be matched.

 Usage:
	mk_stdim[, stdim, {list|<keys>}]

 Arguments:
	filename string	input	The name to give to the image. If
				unset, then use "stdim.fts"
	list	string	input	An array with a list of filenames to
				be used in forming the average image.

 Keywords: (all input)
	coronagraph	int	- Which coronagraph (1, 2 or 3)
	exposure	float	- 1-elements use exposures */10%,
				2-elements use exposures in given
				range, absent: use any exposure.
	filter		string	- Specify the filter or FP setting
				required (default "Clear")
	polarizer	string	- Specify the polarizer setting to be
				used (default clear)
	pixels		int	- Specify the size of image to use
                                 2-element array (default [1024,
                                 1024]).
	dir_pattern	string	- Specify a restricted set of
                                 directories in which to find the
                                 images (if used, this must be in a
                                 form acceptable as an argument to
                                 "find")
	interact	??	- If set, then display each image
                                 (reduced by a factor 2 if the larger
                                 dimansion is > 512) and ask the user
                                 whether to include it - tedious but
                                                         sometimes
                                                         needed.
	upper_left	int	- Specify the location of the
                                 upper-left corner of the image
                                 (useful to distingush (say)
                                 half-resolution-whole-field images
                                 from full-resolution-quarter-field
                                 images, 2-element array (default [20,1]).
	save		??	- If set, then save the generated image
				to disk
	clevel		float	- Specify the minimum correlation with
                                 the first image for the image to be
                                 used. When this is specified the
                                 first image is displayed as in
                                 INTERACT and you are prompted whther
                                 to use it; this continues until an
                                 image is accepted. Thereafter all
                                 images better correlated with the
                                 initial image than the given value
                                 are accepted - a typical level might
                                                be in the range .98
                                                to .99.
	slevel		int	- Specify a pixel value to be
                                 considered as saturated (default
                                 16383). This is needed as some
                                 images show "soft saturation" at a
                                 level below 16383 counts.
	centre_pick	??	- If set, then determine a Sun-centre
                                 and radius, manually - else get a
                                 centre from OCCLTR_CNTR

 Effects:
	A "standard" average image is generated and added to the end
	of the list of loaded images. Most of its header information
	is derived from the first image of the set. N.B. The image is
	NOT saved to disk, use one of the SAVE options in DISPLAY to
	do this.

 WARNING:
	It is the responsibility of the user to ensure that the image
	set being used is homogeneous.

 CALLS: ***
	CHANDLE, CHK_DIR [1], CHK_DIR [2], FXPAR [1], FXPAR [2], LOADCT, OCCLTR_CNTR
	OFFSET_BIAS, READFITSL, RSTRPOS, SXADDPAR [1], SXADDPAR [2], SXADDPAR [3], SXPAR [1]
	SXPAR [2], SXPAR [3], WRITEFITS [1], WRITEFITS [2], cc0, mask_out, min_nz [1]
	min_nz [2], mk_stdim_hdr, scan4limb, sigma_mask
 CALLED BY:
	w_stdim_list
 History:
	Original (modified from mk_stdim): 26/4/96, SJT
	Substantially improved: 14/5/96; SJT


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

 Name        :	MK_STUDY

 Purpose     : Create CDS studies

 Use         : mk_study

 Inputs      : None.

 Opt. Inputs : STUDY = complete study definition

 Outputs     : STUDY = new study

 Keywords    :
               GROUP    = event id of widget that calls mk_study

 Explanation : Creates a new CDS study by combining rasters or modifying
               a user-supplied structure definition.

 Category    : Widgets, planning

 Modified    : Changed location of .pdm new data file.  CDP, 29-Jul-96

 Written     : Zarro ARC/GSFC) 10 October 1994
               Modified, 27 Dec 1999, Zarro (SM&A/GSFC) -- added TIMER
               check for return output from MK_RASTER

============================================================================

pro mk_study_event,  event                         ;event driver routine

common mk_study_com0,prast,vrast,sel_praster,sel_vraster,out_raster,sval,$
 prlist,vrlist,srlist,wtags,wbase,wvtags,wvbase,remb,addb,writeb,$
 sname,stext,svtext,out_study,view_details,xptext,yptext,gdef,rptext,$
 info,repb,cds_det,cbutt,pbutt,rbutt,tittext,sidtext,svatext,n_repeat_r,$
 pcol1,nrepb,popt,popts,sdur,ztext,ibutt,zlabel,texist,lfont,export_dir,$
 tried_and_failed,slit_no,tplanb2,cur_db,sel_study,sav_db,relist_xstudy,$
 id_text,var_text


widget_control, event.id, get_uvalue = uservalue

if (exist(uservalue) eq 0) then uservalue=''

 CALLS:
 CALLED BY
	MK_CDS_PLAN


MK_SUMER_CAT $SSW/soho/sumer/idl/contrib/chae/mk_sumer_cat.pro
[Previous] [Next]

 NAME :
     MK_SUMER_CAT
 PURPOSE :
     Create or update  a SUMER catalog file
 CALLING SEQUENCE : 
     MK_SUMER_CAT,  sumer_files, cat_file
 INPUTS :
     SUMER_FILES : the list of SUMER fits files to be catalogued
     CAT_FILE : catalog file. If it alredy exits, it is updated.
                Otherwise,  it is created. 
 KEYWORDS:
     None
 CALLS: ***
	BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], FXPAR [1], FXPAR [2], HEADFITS [1]
	HEADFITS [2], HEADFITS [3], SUMER_FULL_FILENAME, XDISPLAYFILE [1]
	XDISPLAYFILE [2], break_file [4]
 CALLED BY:
	XSEL_PD_EVENT
 COMMON BLOCKS :
     None  
 REQUIRED ROUTINES:
     SUMER_FULL_FILENAME
     HEADFITS    FXPAR
 RESTRICTIONS:
     This works only in SUMER machines which allows access 
     to SUMER fits disks
 SIDE EFFECTS:
     Display the content in the catalog file

 MODIFICATION HISTORY
     March 1997         Jongchul Chae


MK_SUMER_DBASE $SSW/soho/sumer/idl/atest/mk_sumer_dbase.pro
[Previous] [Next]
 Project     : SOHO - SUMER

 Name        : MK_SUMER_DBASE

 Purpose     : Make site database of SUMER FITS file locations

 Category    : analysis,planning

 Syntax      : IDL> mk_sumer_dbase,root,dbase,ext=ext,direc=direc

 Inputs      : ROOT = root or top directory containing FITS files
                      (SUMER_FITS_DATA is checked if root is not given)

 Outputs     : DBASE = array of {file: FITS filename (with path);
                                 time: FITS obs time (UTC)}

 Keywords    : EXT = FITS file extensions to search for (def =['.fits',',fts'])
               DIREC = output list of directories searched under root. 
                       
 CALLS: ***
	APPEND_ARR, BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], CHKLOG [1], CHKLOG [2]
	CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], DATATYPE [1], DATATYPE [2]
	DATATYPE [3], DELVARX [1], DELVARX [2], DELVARX [3], DELVARX [4], FID2TIME
	FIND_ALL_DIR [1], FIND_ALL_DIR [2], FIND_ALL_DIR [3], LIST_MONTHS, MERGE_STRUCT
	TEST_DIR, break_file [4], concat_dir [4], delvarx [5], savegen [1], savegen [2]
	str_replace [1], str_replace [2]
 History     : Version 1,  20-NOV-1998,  D.M. Zarro (SM&A),  Written

 Contact     : DZARRO@SOLAR.STANFORD.EDU


mk_sumer_dbase_ff $SSW/soho/sumer/idl/contrib/warren/mk_sumer_dbase_ff.pro
[Previous] [Next]
 
             NAME : mk_sumer_dbase_ff
 
          PURPOSE : To assemble a list of available sumer flat field
                    files

 CALLING SEQUENCE : dbase = mk_sumer_dbase_ff()
 
           INPUTS : None.
 
  OPTIONAL INPUTS : None.
 
         KEYWORDS : verbose - generate a listing of available files
 
          OUTPUTS : A structure containing information on the
                    available flat field files.

 OPTIONAL OUTPUTS : err - returns error messages, if any

 CALLS: ***
	CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], FILE_EXIST [2], HAVE_PROC, STR_SEP
	TRIM, anytim [1], anytim [2], anytim [3], anytim [4], anytim [5], anytim2dd79
	concat_dir [4], file_exist [1], file_exist [3], filename2time, fmt_tim [1]
	fmt_tim [2], rd_sumer [1], rd_sumer [2], sgt_detector, str_replace [1]
	str_replace [2]
    COMMON BLOCKS : None
 
          EXAMPLE : 

    IDL> db=mk_sumer_dbase_ff(/verbose)
    % MK_SUMER_DBASE_FF: 32 Flat field images found.
    % MK_SUMER_DBASE_FF: Constructing database of flat field images . . . 
                    FILE NAME                FILE TIME       DETECTOR
      sumff_960131_213144.fts      31-JAN-96  21:31:44              A
      sumff_960202_004227.fts       2-FEB-96  00:42:27              A
      sumff_960213_002157.fts      13-FEB-96  00:21:57              A
      sumff_960221_020036.fts      21-FEB-96  02:00:36              A
      sumff_960228_142057.fts      28-FEB-96  14:20:57              A
      sumff_960406_203811.fts       6-APR-96  20:38:11              A
      sumff_960407_050743.fts       7-APR-96  05:07:43              A
      sumff_960409_103722.fts       9-APR-96  10:37:22              A
      sumff_960515_042304.fts      15-MAY-96  04:23:04              A
      sumff_960724_081413.fts      24-JUL-96  08:14:13              A
      sumff_960725_030512.fts      25-JUL-96  03:05:12              A
      sumff_960911_162034.fts      11-SEP-96  16:20:34              A
      sumff_960923_143205.fts      23-SEP-96  14:32:05              A
      sumff_960924_023126.fts      24-SEP-96  02:31:26              B
      sumff_961021_233806.fts      21-OCT-96  23:38:06              B
      sumff_961218_173204.fts      18-DEC-96  17:32:04              B
      sumff_970126_235413.fts      26-JAN-97  23:54:13              B
      sumff_970227_041442.fts      27-FEB-97  04:14:42              B
      sumff_970322_002905.fts      22-MAR-97  00:29:05              B
      sumff_970424_145906.fts      24-APR-97  14:59:06              B
     sumff_970610_072306.fits      10-JUN-97  07:23:06              B
      sumff_970610_072306.fts      10-JUN-97  07:23:06              B
      sumff_970812_210207.fts      12-AUG-97  21:02:07              B
     sumff_980219_113316.fits      19-FEB-98  11:33:16              B
      sumff_980219_113316.fts      19-FEB-98  11:33:16              B
     sumff_980227_015534.fits      27-FEB-98  01:55:34              A
      sumff_980227_015534.fts      27-FEB-98  01:55:34              A
     sumff_980616_034600.fits      16-JUN-98  03:46:00              B
      sumff_980616_034600.fts      16-JUN-98  03:46:00              B
     sumff_981107_010010.fits       7-NOV-98  01:00:10              B
     sumff_990311_000204.fits      11-MAR-99  00:02:04              A
     sumff_990318_090210.fits      18-MAR-99  09:02:10              B
    
    IDL> help,/str,db
    ** Structure <1f1f598>, 4 tags, length=28, refs=1:
       FILENAME        STRING    'sumff_970610_072306.fts
       TIME            STRING    '10-JUN-97  07:23:06'
      DDAY79          LONG              6736
       DETECTOR        STRING    'B'

    SPECIAL CALLS : None

          History : Written by HPW

    HPW 31-MAR-99 : Modified to find only .fts and .fits files

    HPW 16-AUG-99 : Modified to look in the directory defined by
                    $SUMER_DBASE. Added header. Added utim tag.


mk_sumer_map [2] $SSW/soho/sumer/idl/atest/mk_sumer_map.pro
[Previous] [Next]
Project:
       SOHO - SUMER
Name:
       mk_sumer_map
Purpose:
       Make an image map from SUMER data structure
Explanation
       This program is analigous to mk_cds_map. The default output is
	a structure containing a single 2-D map and other information
	suitable of entering in certain CDS image manipulation programs
Catagory:
       Imaging
Use:
       map= mk_sumer_map(index,data,col)
Inputs
       index - The index structure returned from rd_sumer.
       data - data structrure from rd_sumer
       col - column to use in making map. If not specified, the user will
	be prompted.
Output
       Map = {data:data,xp:xp,yp:yp,id:id,time:time,soho:soho,rot:rot_num}
               where
               DATA  = 2d image array
               XP,YP = 2d cartesian coordinate arrays
               ID    = Wavelength and BTE  of map (from data tagname)
               TIME  = start time of image
               SOHO  = 1, flag identifying that image is SOHO-viewed
		ROT_NUM = Direction input used for ROTATE function
               or, if the keyword IMAGE_ONLY is used, return only the 2d map
      
Input Keywords:
              Peak - make map at wavelength of peak intesity. The default is to 
		sum over the wavelength range
              WPRange - the range in pixels in the wavelength direction to use. 
		Default is the entire range.
              Image_Only - return a 2d image rather than the default, a strucuture
	       plot_image - Return an altrnate data structure with PLOT_IMAGE
			inputs:
              Map = {data:data,origin:origin,scale:scale,id:id,time:time,$
			soho:soho,rot:rot_num}
               where
               DATA  = 2d image array
		ORIGIN = coordinates of bottom Left corner of map
		SCALE = scale of map in the X and Y directions
               ID    = Wavelength and BTE  of map (from data tagname)
               TIME  = start time of image
               SOHO  = 1, flag identifying that image is SOHO-viewed 
		ROT_NUM = Direction input used for ROTATE function

Calls: ***
	ANYTIM2TAI, ANYTIM2UTC [1], ANYTIM2UTC [2], DATATYPE [1], DATATYPE [2]
	DATATYPE [3], MK_MAP_NEW, get_sum_column, sgt_det_y, sgt_dettime, sgt_dims
	sgt_solar_x
Common:
       None
Written:
       Terry Kucera,  Oct 23, 1996.
Modifications:
       "Time" tag now correct for sumer data with more than one raster.
				 Dominic Zarro, May 15, 1997
	"PLOT_IMAGE" keyword added. TAK Oct 6, 1997	
       Added conversion to new map format - Zarro (SM&A), 29-Dec-98
Contact:
        tkucera@solar.stanford.edu


mk_sumer_map [3] $SSW/soho/sumer/idl/contrib/kucera/mk_sumer_map.pro
[Previous] [Next]
Project:
       SOHO - SUMER
Name:
       mk_sumer_map
Purpose:
       Make an image map from SUMER data structure
Explanation
       This program is analigous to mk_cds_map. The default output is
	a structure containing a single 2-D map and other information
	suitable of entering in certain CDS image manipulation programs
Catagory:
       Imaging
Use:
       map= mk_sumer_map(index,data,col)
Inputs
       index - The index structure returned from rd_sumer.
       data - data structrure from rd_sumer
       col - column to use in making map. If not specified, the user will
	be prompted.
Output
       Map = {data:data,xp:xp,yp:yp,id:id,time:time,soho:soho,rot:rot_num}
               where
               DATA  = 2d image array
               XP,YP = 2d cartesian coordinate arrays
               ID    = Wavelength and BTE  of map (from data tagname)
               TIME  = start time of image
               SOHO  = 1, flag identifying that image is SOHO-viewed
		ROT_NUM = Direction input used for ROTATE function
               or, if the keyword IMAGE_ONLY is used, return only the 2d map
      
Input Keywords:
              Peak - make map at wavelength of peak intesity. The default is to 
		sum over the wavelength range
              WPRange - the range in pixels in the wavelength direction to use. 
		Default is the entire range.
              Image_Only - return a 2d image rather than the default, a strucuture
	       plot_image - Return an altrnate data structure with PLOT_IMAGE
			inputs:
              Map = {data:data,origin:origin,scale:scale,id:id,time:time,$
			soho:soho,rot:rot_num}
               where
               DATA  = 2d image array
		ORIGIN = coordinates of bottom Left corner of map
		SCALE = scale of map in the X and Y directions
               ID    = Wavelength and BTE  of map (from data tagname)
               TIME  = start time of image
               SOHO  = 1, flag identifying that image is SOHO-viewed 
		ROT_NUM = Direction input used for ROTATE function

Calls: ***
	ANYTIM2TAI, ANYTIM2UTC [1], ANYTIM2UTC [2], DATATYPE [1], DATATYPE [2]
	DATATYPE [3], MK_MAP_NEW, get_sum_column, sgt_det_y, sgt_dettime, sgt_dims
	sgt_solar_x
Common:
       None
Written:
       Terry Kucera,  Oct 23, 1996.
Modifications:
       "Time" tag now correct for sumer data with more than one raster.
				 Dominic Zarro, May 15, 1997
	"PLOT_IMAGE" keyword added. TAK Oct 6, 1997	
Contact:
        tkucera@solar.stanford.edu


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

 Name        :	MK_SUMMARY

 Purpose     :	Produce CDS summary data

 Category    :	Class3, CDS, Operations

 Explanation :	Call MK_SYNOPTIC and WRITE_CIF to produce CDS summary data.
		Intended to be used in an automatic cron job.  Since synoptic
		scans are run around 0h UT, the most optimal time to run this
		cron job would be between 12h and 18h UT.

 Syntax      :	MK_SUMMARY

 CALLED BY:
	jitter_gif_xyimg
 Examples    :	

 Inputs      :	None.

 Opt. Inputs :	None.

 Outputs     :	The summary data files are written out to the directory
		CDS_SUMMARY_DATA_W.

 Opt. Outputs:	None.

 Keywords    :	START_TIME = Start of time range to look for synoptic scans in.
			     If not passed, then looks for data in the last 84
			     hours.

			     Also used to pass the start time to the routine
			     WRITE_CIF.  For that application, the default is
			     yesterday.

		END_TIME   = End of time range to look for synoptic scans in.
			     If not passed, then defaults to now.

		SHOW	   = If set, then MK_SYNOPTIC displays the image data
			     as it is being processed.

		ALL	   = If set, then MK_SYNOPTIC processes all the 
			     the synoptic scans in the requested time range.

 Calls       : ***
	ANYTIM2TAI, GET_UTC, LIST_MAIN, MK_SYNOPTIC, TRIM, WRITE_CIF
 Common      :	None.

 Restrictions:	None.

 Side effects:	None.

 Prev. Hist. :	None.

 History     :	Version 1, 20-May-1996, William Thompson, GSFC
		Version 2, 24-Jul-1996, William Thompson, GSFC
			Make earliest synoptic, rather than latest.  This is
			more robust. 
		Version 3, 20-Aug-1996, William Thompson, GSFC
			Fixed bug with sort.
		Version 4, 29-Oct-1998, Ron Yurow, SM&A
		        Added the keyword, ALL, to process all the synoptic
			scans in the requested time range.
		Version 5, 03-Dec-1998, Ron Yurow, SM&A
			Changed the defualt time to look back when processing
		        synoptic scans.		        


 Contact     :	WTHOMPSON


MK_SYNOPTIC $SSW/soho/cds/idl/util/display/mk_synoptic.pro
[Previous] [Next]
 Project     : SOHO - CDS     
                   
 Name        : MK_SYNOPTIC
               
 Purpose     : Puts together the CDS Meridian NIS synoptic scans.
               
 Explanation : Each day the CDS takes 9 4'x4' rasters running down the 
               solar meridian.  This routine takes those data and rearranges
               them to form images at the 4 wavelengths observed (8 if
               SYNOP_HI is used during high telemetry rate periods). It then
               writes them to summary FITS files.
               
 Use         : IDL> mk_synoptic, file_number
    
 Inputs      : file_number - the study (or equivalently FITS file) number
                             from which the data are to be read.  There
                             are 9 rasters associated with each study.
               
 Opt. Inputs : None
               
 Outputs     : None
               
 Opt. Outputs: None
               
 Keywords    : SHOW  - if present the image data are displayed
               COMP  - check for compressed data files
               CLEAN - apply cosmic ray removal routine
 
 Calls       : ***
	ANYTIM2CAL, AVERAGE, BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], CDS_NEW_SPIKE
	CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], EXPTV, FIND_WITH_DEF [1]
	FIND_WITH_DEF [2], FIND_WITH_DEF [3], FMT_VECT, FXADDPAR [1], FXADDPAR [2]
	FXHMAKE [1], FXHMAKE [2], FXWRITE [1], FXWRITE [2], GT_DIMENSION, GT_WINDATA, NTRIM
	READCDSFITS, SETIMAGE, SIGRANGE [1], SIGRANGE [2], TRIM, VALID_NUM [1]
	VALID_NUM [2], VALID_NUM [3], VDS_CALIB, VDS_DEBIAS, break_file [4]
	concat_dir [4]
 CALLED BY:
	MK_SUMMARY, REGEN_SYNOP
 Common      : None
               
 Restrictions: None
               
 Side effects: None
               
 Category    : Data analysis
               
 Prev. Hist. : None

 Written     : C D Pike, RAL, 7-May-96
               
 Modified    : Version 2, 7-May-1996, William Thompson, GSFC
			Write out to FITS files.
               Added more FITS headers etc..   CDP, 8-May-96
               Pad array if rasters missing, sort display.  CDP, 9-May-96
               Cut out debugging 'stop'    CDP, 16-May-96
		Version 6, 21-May-1996, William Thompson, GSFC
			Added FITS keywords TELESCOP and INSTRUME, as well as
			standard FITS pointing keywords.
		Version 7, 31-May-1996, William Thompson, GSFC
			Removed pointing keywords, as not really applicable to
			synoptic data.
               Version 8, Fixed typo in use of missing value. CDP, 24-Jul-96
               Version 9, SV Haugan, UiO, 30 July 1996
                       Using gt_windata instead of direct detdata access.
		Version 10, William Thompson, GSFC, 16 December 1996
			Fixed bug where wrong files could be found.
		Version 11, William Thompson, GSFC, 14 September 1997
			Accommodate study SYNOP_HI
	        Verison 12, Jeff Payne, RAL, 16 October 1997
			Modified to handle standard 4 lines from
			SYNOP or 8 lines with HI_SYNOP
	        Verison 13, Jeff Payne, RAL, 27 November 1997
			Bug fixed when generating filename for line 600
		Version 14, 23-Dec-1997, William Thompson, GSFC
			Handle only 1 line from SYNOP_LP
		Version 15, 20-Jan-1998, William Thompson, GSFC
			Fixed sorting bug where input files are on several
			disks.
		Version 16, 29-Jun-1998, William Thompson, GSFC
			Support version 4 of SYNOP_F
			Call FIND_WITH_DEF instead of FIND_FILES
               Version 17, 26-Apr-2000, CDP, add COMP & CLEAN keywords.
                                             Relax start time to avoid
                                             late start problems
               Version 18, 11-Jul-2003, William Thompson, GSFC
                       Handle upside-down images.

 Version     : Version 18, 11-Jul-2003


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

 PURPOSE: To create an index file for specified data set

 PARAMETERS: fname - Data set name
 CALLS: ***
	BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], break_file [4], dec2sun [1]
	dec2sun [2], file_list [1], file_list [2], get_host [1], get_host [2]
 CALLED BY:
	list_tfi, mdifocus2, nimg_in_tfr fnam [1], rdtfr
 HISTORY:
	Written 1994 by D.Mathur
	31-Mar-95 (MDM) - Modified to write the end record number 
			  properly for compressed data and for cases
			  of non-compressed when no fill is used
			- Added SeqID to the info saved
	31-Mar-95 (MDM) - Modified to have the proper end record number
			  for the case where the EOF is causing the write.
			  Added "+eof(lun_tfr)"
	18-Apr-95 (MDM) - Added /QDEBUG
			- Changed the format statement slightly
			- Corrected the 31-Mar-95 patch (it did not
			  handle the case where EOF was found but there
			  was one fill record after the data product --
			  ie: two matched for the end of DP cases)
	25-Apr-95 (MDM) - Added capability to get around FINDFILE 
			  limitations which were causing a false failure
	13-Nov-95 (MDM) - Added RefTime and FrameNum to the header info
	 8-Aug-96 (MDM) - Added code to handle reading Stanford sci160k files
	22-Aug-96 (MDM) - Added code to handle cases of over 100 files


mk_timarr [1] $SSW/soho/mdi/idl_old/gen/ys_util/mk_timarr.pro
[Previous] [Next]
NAME:
	mk_timarr
PURPOSE:
	Since there are cases when there is only one time tag for
	2,4,8,16 or 32 values, this routine will return a time vector
	that can be used with UTPLOT.
CALLING SEQUENCE:
	timarr = mk_timarr(index, 8)
	timarr = mk_timarr(index, data.pc.sxs_pc11, /wbs)
	timarr = mk_timarr(index, data.pc.sxs_pc11, /wbs, ref_time)

	then use: utplot, timarr, data.pc.sxs_pc11, index(0)
	or        utplot, timarr, data.pc.sxs_pc11, ref_time
INPUT:
	index	- the index structure that goes with the data
	y	- either (1) the number of repeats per DATA SET or
		  (2) the data array that is to be plotted.  If (1)
		  is used, it must be the number of repeats per data
		  set.  Since WBS data takes two major frames per data
		  set, be sure to use the correct number.  For example,
		  data.pc.sxs_pc11 has 8 samples per major frame, but
		  that is 16 samples per data set.
OPTIONAL INPUT:
	ref_time- a reference time to use to generate the time array.
		  If it is not passed, then index(0) is used as the
		  reference
	wbs	- if set, then the number of samples in the data array
		  took TWO major frames to accumulate and adjust
		  accordingly.  
OUTPUT:
	returns an floating point array with the number of seconds
	past the reference time for each data point.
OPTIONAL KEYWORD OUPTUT:
	ok_map	- A byte array the same size/dimention as the output
		  array saysing where there is data or not.  
 CALLS: ***
	anytim2ints [1], anytim2ints [2], bits [1], bits [2], deriv_arr [1], deriv_arr [2]
	dprate2sec [1], dprate2sec [2], fmt_tim [1], fmt_tim [2], int2secarr [1]
	int2secarr [2]
 CALLED BY:
	AVE_CTS, AVE_CTS2 [1], AVE_CTS2 [2], AVE_CTS2 [3], fix_hxtindex, grs32_fsp, grsl_fsp
	hxs_chsums, hxt_chsums, rd_sxs_pha [1], rd_sxs_pha [2], rd_wbs_pha [1]
	rd_wbs_pha [2]
HISTORY:
	Written 31-May-92 by M.Morrison
	29-Apr-93 (MDM) - Added check for WBS missing data
			- Added output OK_MAP
			- Added check for duplicate WBS data
			- Added STRUCT option
	11-Aug-93 (MDM) - Corrected an error which was not allowing
			  "y" to be a scalar
       23-Nov-93 (JMM) - Allows index to have only one element.
	 7-Jun-94 (MDM) - Corrected error which was happening when
			  "y" was a simple 1-D vector, or an
			  array 1xN, and "nx" was supposed to be 1
			  (it was being set to "N")
	 9-Jun-94 (MDM) - Furthur correction to 7-Jun-94 mod
			  (ok_map subscript out of range)
	17-Jun-94 (MDM) - Added some comments


mk_title [1] $SSW/soho/mdi/idl_old/gen/ys_util/mk_time_title.pro
[Previous] [Next]
 NAME:
   mk_title
 PURPOSE:
   Put Time titles on a multi-panel image plot using Yohkoh 
   data structures
 CALLING SEQUENCE:
   mk_time_title,index
   mk_time_title,index,xsize=xsize,ysize=ysize
   mk_time_title,index,numx,numy,ss=ss,xoff=xoff,yoff=yoff
 INPUTS:
   index	- Yohkoh roadmap or index
 OPTIONAL INPUTS:
   numx,numy   - Number of panels in the x and y directions
 OPTIONAL INPUT KEYWORDS:
   ss	        - Subscript array
   xoff,yoff   - X offset and Y offset in device coordinates
   xsize,ysize - Size of each panels in device coordinates
   align	- For call to xyouts (def = 0.5)
   charsize    - Character size
   charthick   - Character thickness 
   font	- To specify Hershey character font style 
   color	- Color of title
 CALLS: ***
	MK_TIME_TITLE, gt_time [1], gt_time [2]
 CALLED BY:
	mk_nvs_movie, ptv_sxt
 RESTRICTIONS:
   Only works for X device
 MODIFICATION HISTORY:
  12-jul-94, Louise Harra Murnion MSSL, Written.


MK_WAVECAL $SSW/soho/cds/idl/sci/cal/vds/wave/mk_wavecal.pro
[Previous] [Next]
 Project     : SOHO - CDS     
                   
 Name        : MK_WAVECAL
               
 Purpose     : To allow loading of CDS wavelength coefficients to database.
               
 Explanation : Allows user to type in CDS wavelength coefficients and to
               enter them into the databases.
               
 Use         : IDL> mk_wavecal
    
 Inputs      : None - all done via text widget entry
               
 Opt. Inputs : 
               
 Outputs     : None
                                         
 Opt. Outputs: None
               
 Keywords    : NC - either structure for NIS calibration or a simple
                    NIS coefficient array.  The former is as returned by
                    get_wavecal.  If supplied the values will be loaded
                    into the displays on startup.
              
               GC - same as above only for GIS details.

 Calls       : ***
	ADD_WAVECAL, ANYTIM2TAI, ANYTIM2UTC [1], ANYTIM2UTC [2], BREAK_FILE [1]
	BREAK_FILE [2], BREAK_FILE [3], Bell, DATATYPE [1], DATATYPE [2], DATATYPE [3]
	GET_UTC, GET_WAVECAL, MK_WAVECAL_EVENT, TAG_EXIST [1], TAG_EXIST [2], TAI2UTC, TRIM
	VALID_NUM [1], VALID_NUM [2], VALID_NUM [3], XANSWER, XINPUT, XMANAGER, XMENU [1]
	XMENU [2], break_file [4]
 Common      : MK_WCAL - internal to routines in this file.
               
 Restrictions: Needs write access to wavelength calibration databases if
               entries are to be stored.
               
 Side effects: None
               
 Category    : Data analysis, wavelength calibration
               
 Prev. Hist. : None

 Written     : C D Pike, RAL, 8-Mar-96
               
 Modified    : Make NIS quadratic.  CDP, 23-Jul-96
		Version 3, 18-Apr-1997, William Thompson, GSFC
			Include entry for effective date

 Version     : Version 3, 18-Apr-1997


MKAUXDESC $SSW/soho/cds/idl/sci/data_handling/i_o/fits/cds/mkauxdesc.pro
[Previous] [Next]
 Project     : SOHO - CDS     
                   
 Name        : MKAUXDESC()
               
 Purpose     : Return auxiliary data descriptor of correct type.
               
 Explanation : Based the dimenstionality of the data in DATA the correct
		type of auxiliary data descriptor is returned,
		with the descriptor values from DATA copied
		into the new structure.

 Use         : AUXDESCRIPTOR = MKAUXDESC(DATA)
    
 Inputs      : DATA	 = a structure variable of the form that 
			   is returned by READ_CDS
               
 Opt. Inputs : None.
               
 Outputs     : IDL auxiliary data descriptor, see CDS QL Data Format.
               
 Opt. Outputs: None.
               
 Keywords    : None.

 Calls       : ***
	TRIM
 CALLED BY:
	AUXREAD
 Common      : None.
               
 Restrictions: DATA must adhere to the format returned by READ_CDS
		Normally used by AUXREAD()
               
 Side effects: None.
               
 Category    : Data_Handling, I_O, FITS, CDS, QuickLook
               
 Prev. Hist. : None.

 Written     : Stein Vidar Haugan, 27 September 1993
               
 Modified    : 

 Version     : 1.0


MKDARR [2] $SSW/soho/mdi/idl_old/gen/ys_util/mkdarr.pro
[Previous] [Next]
 NAME:  MKDARR
 PURPOSE: To make an array having two elements such as:
		[(a0,b0),(a0,b1),,,(a0,bn),(a1,b0),(a1,b1),,,(a1,bn),,,
		(am,b0),(am,b1),,,(am,bn)] out of [a0,,,am] and
		[b0,,,bn], or, with xy switch,
               [(a0,b0),(a1,b0),,,(am,b0),(a0,b1),(a1,b1),,,(am,b1),,,
               (a0,bn),(a1,bn),,,(am,bn)] out of [a0,,,am] and [b0,,,bn].
 CATEGORY:
 CALLING SEQUENCE: c = mkdarr(a,b)
 INPUTS: a = arbitraty 1-d array.
	  b = arbitraty 1-d array.
 OPTIONAL INPUTS: none.
 OUTPUTS: result = c = two-element array [(a0,b0),(a0,b1),...,(a0,bn),
		    (a1,b0),(a1,b1),...,(a1,bn),...(am,b0),(am,b1),
		    ....,(am,bn)] or, with xy switch [(a0,b0),,,(am,bn),
                   ,,,,(a0,bn),,,(am,bn)].
 OPTIONAL OUTPUTS: none.
 CALLED BY:
	ACGAUNT [1], ACGAUNT [2], FIND_LIMB_INIT, str_perm
 COMMON BLOCKS: none.
 SIDE EFFECTS: none.
 RESTRICTIONS: none.
 MODIFICATIONS: written by N.Nitta, March 1991.
                modified to handle scalar inputs and the order of the
		 inputs, by NN, March 1992


MKDETWDESC $SSW/soho/cds/idl/sci/data_handling/i_o/fits/cds/mkdetwdesc.pro
[Previous] [Next]
 Project     : SOHO - CDS     
                   
 Name        : MKDETWDESC()
               
 Purpose     : Return detector data descriptor of correct type.
               
 Explanation : Based on DETECTOR (= 'NIS'/'GIS') and the dimensionality of
               the data in DATA the correct type of detector data descriptor
               is returned, with the descriptor values from DATA copied into
               the new structure.

 Use         : DETDESCRIPTOR = MKDETWDESC(DETECTOR,DATA)
    
 Inputs      : DETECTOR = 'NIS' / 'GIS'
               DATA     = a structure variable of the form that 
                          is returned by READ_CDS
               
 Opt. Inputs : None.
               
 Outputs     : IDL detector data descriptor, see CDS QL Data Format.
               
 Opt. Outputs: None.
               
 Keywords    : None.

 Calls       : ***
	TRIM
 CALLED BY:
	DETREAD, DETSELECT
 Common      : None.
               
 Restrictions: DATA must adhere to the format returned by READ_CDS
               Normally used by DETREAD()
               
 Side effects: None.
               
 Category    : Data_Handling, I_O, FITS, CDS, QuickLook
               
 Prev. Hist. : None.

 Written     : Stein Vidar Haugan, 27 September 1993
               
 Modified    : SVHH, 21 October 1993
                       Added Max/Min tags (for use by display routines)
               SVHH,  3 November 1993
                       Fixed bugs concerning GIS data (TDETY)
               SVHH,  Version 1.2, 8-June-1994
               SVHH,  25 August 1994,
                       Fixed another bug concerning GIS/TDETY etc..
                       (DetY : Data.Detx)
               PB,    26 August 1994,
                       Changed DetZ --> DetY
                               DetY --> DetX
               SVHH, 21-Aug-1995, Version 2
                       Added BinX/BinY tags.
               Version 3, SVHH, 12 August 1996
                       Compatible with both old and new data storage system.
                       (Added tag HANDLE added an X in struct name).
               Version 4, 24 September 1996
                       Added PADDING tag.
               Versiom 5, 7 April 1997
                       Made MISSING tag FLOAT for GIS data.
                       
 Version     : 5, 7 April 1997


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

 Name		: MKDI_C1
	
 Purpose	: Make C1 image of the day.
	
 Explanation	: This procedure will make C1 image of the day.For selected day
		  this routine will find the last pair of on-line and off-line 
		  images and  will process them to lasco 'level .99'.
	 
 Use		: IDL> MKDI_C1 [,DAY=day [,/SCREEN [,/GIF ,....]]]       
                 Without any inputs, program will use default values.

 Keyword parameters:
       DAY:    Selected day: day='960703' (string)
       FILTER: The filter: filter='Fe XIV' (string) , default value
       POLAR:  The polarizer: polar='Clear' (string) , default value
       ROWS:   The number of rows in image: rows=640 (integer), default value
       COLS:   The number of cols in image: cols=768 (integer), default value
       LEBP:   The LEB program: lebp = 'Sum/Diff' (string)
       WAVE:   The off-line and on-line wave length: wave=[5309.2,5302.4]
       SCREEN: Display result to the X-Window: /screen
       FITS:   Write result as a FITS file: /fits 
       PS:     Write result as a PostScript file: /ps
       GIF:    Write result as a GIF file: /gif
       ARCHIVE:Write result as a GIF file in 'lastimage.gif' format  
       QL:     Make daily C1 image from Quick Look data: /ql
       LZ:     Make daily C1 image from Lasco_lz data: /lz
       COSMIC: Remove cosmic rays: /cosmic
       OWNCT:  Use own color table: ownct (structure: ownct.r,ownct.g,ownct.b)
       LCT:    Load IDL color table: lct=8 GREEN/WHITE LINEAR
       GCT:    Gamma_ct: gct=.25  
       UP:     To cut an image at a certain upper value of its histogram: up =.9996
       LOW:    To cut an image at a certain lower value of its histogram: low=.01
       MINBOX: To cut an image at the median minimum of the background:   /minbox
	TIME:	Get closest image to this time: TIME='8:00' (string)
      
 Example	: IDL> MKDI_C1 
		  Without any keywords program will use default values.

		  Or you can use keywords:
 Example    	: IDL> MKDI_C1,DAY='971031',LEBP='Line Sca',/COSMIC

 Calls		: ***
	ANYTIM2UTC [1], ANYTIM2UTC [2], CCOSMICS, CUT_IMG, FXPAR [1], FXPAR [2], GAMMA_CT
	GETSUNCEN, GET_ARRAY, GET_BIAS, LASCO_FITSHDR2STRUCT, LASCO_READFITS [1]
	LASCO_READFITS [2], LAYOUT, LOADCT, MASK_INX, PATH_FILE, READFITS [1], READFITS [2]
	READFITS [3], STDEV, SXPAR [1], SXPAR [2], SXPAR [3], UTC2TAI, WRITEFITS [1]
	WRITEFITS [2], WRITE_GIF, WRITE_LAST_C1, WRITE_PS, YYMMDD, mk_query [1]
	mk_query [2]
 Side effects	: None.

 Category	: Image Display. Data analysis.

 Written	: Borut Podlipnik, MPAe Oct. 15 1997.

 Modified	:  BP	13 Jan 1998 - Added keyword TIME.

 Version	: 1.0  10/15/97 LASCO IDL LIBRARY


MKMOVIE0 obsolete version of mkmoviepro $SSW/soho/lasco/idl/movie/mkmovie0.pro
[Previous] [Next]
 Project     : SOHO - LASCO/EIT
                   
 Name        : MKMOVIE0 (obsolete version of mkmovie.pro)
               
 Purpose     : Load FITS files into pixmaps and call WRUNMOVIE for animation.
               
 Explanation : This procedure sorts the images by time, reads them, and 
		normalizes to the exposure time of the first image.
		WRUNMOVIE is called to start a widget interface for the 
		animation sequence.  The on_off_diff keyword results in a movie
               where each on line image is displayed with a nearby offband image
               subtracted.
               
 Use         : MKMOVIE, list, bmin, bmax, /TIMES, /DIFF, /NO_NORMAL, /NO_SORT, $
                        UNSHARP=unsharp, PAN=pan, COORDS=coords, BOX=box, $
                        /RATIO, /USE_MODEL,/FLAT_FIELD,/ON_OFF_DIFF,/MASK_OCC,/LG_MASK_OCC
                        /RUNNING_DIFF, /RADIAL, /DEGRID, /FIXGAPS, /LOG_SCL, /SQRT_SCL, $
			 FILL_COL=fill_col, SAVE=save

      Example: IDL> MKMOVIE, 'list960123', -100, 100, /DIFF

      Example: If you want to display BYTARR images straight from the FITS files without
		any scaling use:
               IDL> MKMOVIE, 'list', 0, 255, /NO_NORMAL, /NO_SORT
    
 Inputs      : list : Name of file containing names of FITS files.
		       Or a STRARR of the image names.
               bmin, bmax : Minimum and maximum DN for BYTSCL.
               
 Outputs     : None.
               
 Keywords    : The following keywords apply to all telescopes (C1,C2,C3,EIT)

		/BAD_SKIP  : Skip bad images based on NZ median
		/DBIAS	   : Adjust image bias by given amount
		/NOEXPCORR : Don't do exposure time correction, but subtract bias
		/OUTER	   : Set along with MASK_OCC to fill in outer mask only
		/STAIND	   : Start with this position in the input file (for output filenames)
		/NX,/NY	   : Output size in pixels (superceded by PAN)
		/VIDEO	   : Generate frames ready to be saved as PICT files for video
		/SDIR       : Directory to save video frames in
		/CREM	   : Remove cosmic rays using REMOVE_CR (2 image) procedure;
			     Set CREM = 2 if you wish to define an area not to do CR removal
		/LOGO	   ; Add LASCO logo to bottom right corner
		/AUTOMAX   : Compute bmin and bmax based on median
		/LEE_FILT   : Apply Leefilt function to filter noise.
               /TIMES     : Set this keyword to display date and time in images.
		/DIFF      : Set this keyword to make a difference movie.  The 
			     first image is subtracted from all subsequent images.
		/RUNNING_DIFF  : Make a difference movie, subracting the preceding image.
		/NO_NORMAL : Don't normalize exposure times to that of the first image.
		/NO_SORT   : Don't sort by time in header.
               UNSHARP    : Set this keyword to make a movie of unsharp masked images.
                            The value of the keyword if any is set to the size of the
                            unsharp mask, default=25
                            Example:  A value of 9 would form a 9x9 unsharp mask
		/RATIO     : If using diff or running_diff display data as ratio of image/reference frame
               /MASK_OCC  : applies a sun sized circle and removes the internal part of the image
               /LG_MASK_OCC:applies a sun sized circle and removes the part of the field to 1.2Rsun
                            for C1 (especially good for the longer 100s exposures).  
			     For C3 the pylon is masked
		/LOG_SCL   : Applies ALOG10() function to image before byte scaling
		/SQRT_SCL  : Applies SQRT() function to image before byte scaling
		/FIXGAPS   : Set to 1 to fill data gaps in image with color specified by FILL_COL
		             Set to 2 to fill data gaps in image with values from previous image
		FILL_COL   : Set this keyword to the color index to use for data gaps and occ masks.
		SAVE       : For use in batch mode.  Set this keyword to the name of the .mvi file
			     to save as.  Routine will save movie and then exit.
		PAN        : Default is to resize images to pixel size of the first image.  Set this
			     keyword to perform additional scaling.  Example: set to 0.5 for 2x2 rebinning.
		COORDS     : Set to 4 element array of image coordinates to use relative to 1024x1024 image.
			     Example: COORDS=[0,1023,128,895] for C2 Equatorial Field
		BOX        : Set to 4 element array of image coordinates to use for box normalization 
			     relative to 1024x1024 image. Images are scaled relative to average counts
			     in box of first image. Example: BOX=[461,560,641,740]
		REF_BOX    : Set to avg counts specified in BOX otherwise first image is used

             : The following keywords apply only to C1

               /ON_OFF_DIFF: differences each on line image with an image taken at a continuum wavelength
               /FLAT_FIELD : normalizes each image by a door closed image to remove the solar spectrum
               /RADIAL	    : applies a radial filter

             : The following keywords apply only to C2 and C3

		/USE_MODEL : If using diff or running_diff use background corona model
			     as base frame.  USE_MODEL=1 for closest average (any_year) monthly model
					     USE_MODEL=2 for closest monthly model
					     USE_MODEL=3 for for overall yearly model

             : The following keywords apply only to EIT

               /DEGRID	    : applies the degridding algorithm

 Calls       : ***
	ADD_LASCO_LOGO, BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], C2_WARP, C3_WARP
	CONGRID [1], CONGRID [2], CONGRID [3], DATATYPE [1], DATATYPE [2], DATATYPE [3]
	EIT_DEGRIDN, EIT_FLATN, FILE_EXIST [2], FXPAR [1], FXPAR [2], GETBKGIMG
	GET_EXP_FACTOR [1], GET_EXP_FACTOR [2], GET_SEC_PIXEL, GET_SOLAR_RADIUS
	GET_SUN_CENTER [1], GET_SUN_CENTER [2], GET_SUN_CENTER [3], L1_RDFTS
	LASCO_FITSHDR2STRUCT, LASCO_READFITS [1], LASCO_READFITS [2], LEEFILT, MAXMIN
	MKMOVIE0, OFFSET_BIAS, READFITS [1], READFITS [2], READFITS [3], REDUCE_STD_SIZE
	REMOVE_CR, RSTRPOS, SHARPEN, STR2UTC [1], STR2UTC [2], STR2UTC [3], STRUCT2FITSHDR
	TAI2UTC, TRIM, TVCIRCLE, UTC2STR, UTC2TAI, WRITE_PICT, WRUNMOVIE [1], WRUNMOVIE [2]
	break_file [4], file_exist [1], file_exist [3]
 Side effects: Creates multiple pixmaps.
               
 Category    : Image Display.
               
 See Also    : WMKMOVIE.PRO is a widget front-end to this procedure.
	(SCCS variables), ** diverges from new version
	AEE  4 May 99 - Added /SH keyword to spawn command
	CMK 16 Feb 97 - added all C1 related features and changed the procedure name to mkc1movie2
	Change fhsize
	GENERIC_MOVIE.PRO reads in bytescaled fits or gif files and creates a movie.
	Jan 1996.
	Modified    : SEP 29 May 96 - Place frames into multiple pixmaps instead of 1 large
	NBR    Apr 00 - Skip files with READFITS errors
	NBR    Feb 00 - Move GET_SUN_CENTER to after REDUCE_STD_SIZE
	NBR    Jan 00 - Change !D.N_COLORS to !D.TABLE_SIZE
	NBR    Mar 00 - Change USE_MODEL options to use ANY_YEAR instead of ALL; fix C1 ON_OFF_DIFF; convert C1 hdr to structure; do not multiply by 100 for C1 log scale
	NBR    Nov 99 - Move subtract bias to before REDUCE_STD_SIZE; Fix problem with ind00
	NBR  1 Aug 00 - Fix USE_MODEL if/then in for loop; modify for MK4 images (img0_x1
	NBR  3 Aug 00 - Modify for MK4 images (arcs
	NBR  3 Jun 99 - Move rebin/congrid to end; fix hsize
	NBR  3 May 99 - Fix header/time offset problem when movie starts w/ 2nd frame
	NBR  5 Apr 99 - Add CREM keyword before BYTSCL; add VIDEO keyword; refresh
	NBR  5 May 99 - Move image resize, NBR  8 Feb 99 - Add AUTOMAX keyword
	NBR  9 Apr 99 - Move initialization of yloc
	NBR 06 Nov 98 - Change default fillcol to median(image); change LG_MASK_OCC for c3 to use C3clearmask2.dat
	NBR 10 Mar 99 - Update AUTOMAX keyword
	NBR 11 Feb 99 - Move up first call of REDUCE_STD_SIZE
	NBR 14 May 99 - Changed dumim line for determining ind00 in EIT case; change check for img_hdr.txt file; change coords for MK3; add time to tai_all
	NBR 15 Oct 99 - Fix initialization of prev
	NBR 16 Dec 98 - Add LEEFILT keyword
	NBR 17 Feb 99 - Do not divide by lebxsum^2 (done in REDUCE_STD_SIZE)
	NBR 19 Mar 99 - Add LOGO keyword
	NBR 19 May 99 - Fix problem with box_ref when it hits all gap
	NBR 22 Oct 99 - Change C2 AUTOMAX settings
	NBR 26 Aug 99 - Add DBIAS keyword, NBR 26 Mar 99 - Add DISTORT keyword
	NBR 27 Aug 99 - IF exptime LT 15 sec then dbias = -7; BAD_SKIP keyword; change win_index incrementation
	NBR 29 Apr 99 - Read obs. times from img_hdr.txt instead of file headers for
	NBR 30 Apr 99 - Fix fhsize problem; put AUTOMAX in loop, NRL
	Prev. Hist. : None.
	RAH 02 Feb 98 - Now normalizes to calculated exposure time (if data exists).
	RAH 13 Dec 96 - added check for daily median image which doesn't have bias
	RAH/SEP 14 Mar 97 - integrated mkc1movie2 features into mkmovie
	SEP  9 Jul 96 - Read in img headers as structures and pass to wrunmovie
	SEP 01 Oct 97 - added /SUM keyword to OFFSET_BIAS call
	SEP 13 Nov 97 - Added /FLAT_FIELD for EIT
	SEP 18 Oct 96 - Add option to pass in STRARR of image names instead of filename.
	SEP 21 Mar 97 - corrected bias subtraction for LEB summed images
	SEP 22 Oct 97 - fixed divide by zero error for /RATIO option
	SEP 24 Oct 96 - added /RATIO and /USE_MODEL options
	SEP 31 Oct 97 - Binned images are scaled (/bin^2) for level_05 images only
	Version:  09/24/03 @(#)mkmovie0.pro	1.1 - NRL LASCO IDL Library
	Written     : Scott Paswaters, added /NEW flag to EIT_DEGRIDN
	bias subtraction, dbiasx), fvsize assignment, ind0/ind00 assignment;
	of at beginning, pixmap because of limitations on window size in IDL.
	print time stats
	ref image for longer movies; allow arbitrary final size (NX by NY)
	sec_pix; update AUTOMAX keyword, sec_pixel
	sorting; read other header info when image is read in instead
	update LEE_FILT keyword, vsize so PAN works for subfields; fix suncen, x2)


MKMOVIE $SSW/soho/lasco/idl/movie/mkmovie.pro
[Previous] [Next]
 Project     : SOHO - LASCO/EIT
                   
 Name        : MKMOVIE
               
 Purpose     : Load FITS files into pixmaps and call WRUNMOVIE for animation.
               
 Explanation : This procedure sorts the images by time, reads them, and 
		normalizes to the exposure time of the first image.
		WRUNMOVIE is called to start a widget interface for the 
		animation sequence.  The on_off_diff keyword results in a movie
               where each on line image is displayed with a nearby offband image
               subtracted. Default is to rectify images by CROTA1.
               
 Use         : MKMOVIE, list, bmin, bmax, /TIMES, /DIFF, /NO_NORMAL, /NO_SORT, $
                        UNSHARP=unsharp, PAN=pan, COORDS=coords, BOX=box, $
                        /RATIO, /USE_MODEL,/FLAT_FIELD,/ON_OFF_DIFF,/MASK_OCC,/LG_MASK_OCC
                        /RUNNING_DIFF, /RADIAL, /DEGRID, /FIXGAPS, /LOG_SCL, /SQRT_SCL, $
			 FILL_COL=fill_col, SAVE=save

 CALLED BY:
	DAILY_MOVIE
      Example: IDL> MKMOVIE, 'list960123', -100, 100, /DIFF

      Example: If you want to display BYTARR images straight from the FITS files without
		any scaling use:
               IDL> MKMOVIE, 'list', 0, 255, /NO_NORMAL, /NO_SORT
    
 Inputs      : list : Name of file containing names of FITS files.
		       Or a STRARR of the image names.
               bmin, bmax : Minimum and maximum DN for BYTSCL.
               
 Outputs     : None.
               
 Keywords    : The following keywords apply to all telescopes (C1,C2,C3,EIT)

		DBIAS = amount (DN) to subtract from raw image, in addition to bias
		/VERBOSE   : Print more info about each frame
		LABELPOS   : Set equal to 2-d array containing x-pos and y-pos of lower left
			corner of label printed on each frame; default is [10,10] for full frame
		/NORECTIFY : DO NOT Rectify images to solar north up based on roll value in 
			     $ANCIL_DATA/attitude/roll
		/KEEP	   : Tell wrunmovie not to erase pixmaps
		/TIFF	   : Save movie as TIFF frames
		/BAD_SKIP  : Skip bad frames based on nz median
		/C23	   : Use occulter mask for C2
		/NOCAM	   : Do not print detector name with time
		/HIDE_PYLON: hide pylon based on pixel values 
		/SQUARE    : Makes square 480x480 frames for video (also set /VIDEO)
		/NOEXPCORR : Don't do exposure time correction, but subtract bias
		/OUTER	   : Set along with MASK_OCC to fill in outer mask only
		/STAIND	   : Start with this position in the input file (for output filenames)
		/NX,/NY	   : Output size in pixels (superceded by PAN)
		/VIDEO	   : Generate frames ready to be saved as PICT files for video
		/SDIR       : Directory to save video frames in
		/CREM	   : Remove cosmic rays using REMOVE_CR (2 image) procedure;
			     Set CREM = 2 if you wish to define an area not to do CR removal
		/LOGO	   ; Add LASCO logo to bottom right corner
		/AUTOMAX   : Compute bmin and bmax based on median
		/LEE_FILT   : Apply Leefilt function to filter noise.
               /TIMES     : Set this keyword to display date and time in images.
		/DIFF      : Set this keyword to make a difference movie.  The 
			     first image is subtracted from all subsequent images.
		/RUNNING_DIFF  : Make a difference movie, subracting the preceding image.
		/NO_NORMAL : Don't normalize exposure times to that of the first image or subtract bias
		/NO_SORT   : Don't sort by time in header.
               UNSHARP    : Set this keyword to make a movie of unsharp masked images.
                            The value of the keyword if any is set to the size of the
                            unsharp mask, default=25
                            Example:  A value of 9 would form a 9x9 unsharp mask
		/RATIO     : If using diff or running_diff display data as ratio of image/reference frame
               /MASK_OCC  : applies a sun sized circle and removes the internal part of the image
               /LG_MASK_OCC:applies a sun sized circle and removes the part of the field to 1.2Rsun
                            for C1 (especially good for the longer 100s exposures).  
			     For C3 the pylon is masked
		/LOG_SCL   : Applies ALOG10() function to image before byte scaling
		/SQRT_SCL  : Applies SQRT() function to image before byte scaling
		/FIXGAPS   : Set to 1 to fill data gaps in image with color specified by FILL_COL
		             Set to 2 to fill data gaps in image with values from previous image
		FILL_COL   : Set this keyword to the color index to use for data gaps and occ masks.
		SAVE       : For use in batch mode.  Set this keyword to the name of the .mvi file
			     to save as.  Routine will save movie and then exit.
		PAN        : Default is to resize images to pixel size of the first image.  Set this
			     keyword to perform additional scaling.  Example: set to 0.5 for 2x2 rebinning.
		COORDS     : Set to 4 element array of image coordinates to use relative to 1024x1024 image.
			     Example: COORDS=[0,1023,128,895] for C2 Equatorial Field
		BOX        : Set to 4 element array of image coordinates to use for box normalization 
			     relative to (rectified) 1024x1024 image. Images are scaled relative to average counts
			     in box of first image. Example: BOX=[461,560,641,740]
		REF_BOX    : Set to avg counts specified in BOX otherwise first image is used

             : The following keywords apply only to C1

               /ON_OFF_DIFF: differences each on line image with an image taken at a continuum wavelength
               /FLAT_FIELD : normalizes each image by a door closed image to remove the solar spectrum
               /RADIAL	    : applies a radial filter

             : The following keywords apply only to C2 and C3

		USE_MODEL : If using diff or running_diff use background corona model
                           as base frame.   USE_MODEL=1 for closest average (any_year) monthly model
                                            USE_MODEL=2 for closest monthly model
                                            USE_MODEL=3 for for overall yearly model
					     USE_MODEL= array to do subtraction or ratio with

             : The following keywords apply only to EIT

               /DEGRID	    : applies the degridding algorithm

 Calls       : ***
	ADD_LASCO_LOGO, BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], C2_WARP, C3_WARP
	CONGRID [1], CONGRID [2], CONGRID [3], DATATYPE [1], DATATYPE [2], DATATYPE [3]
	EIT_PREP, FILE_EXIST [2], FXPAR [1], FXPAR [2], GETBKGIMG, GET_EXP_FACTOR [1]
	GET_EXP_FACTOR [2], GET_SEC_PIXEL, GET_SOLAR_RADIUS, GET_SUN_CENTER [1]
	GET_SUN_CENTER [2], GET_SUN_CENTER [3], L1_RDFTS, LASCO_FITSHDR2STRUCT
	LASCO_READFITS [1], LASCO_READFITS [2], LEEFILT, MAXMIN, OFFSET_BIAS, READFITS [1]
	READFITS [2], READFITS [3], REDUCE_STD_SIZE, REMOVE_CR, REVERSE, ROLL_TIMES, RSTRPOS
	SHARPEN, STR2UTC [1], STR2UTC [2], STR2UTC [3], TAI2UTC, TRIM, TVCIRCLE, UTC2STR
	UTC2TAI, WRITE_PICT, WRUNMOVIE [1], WRUNMOVIE [2], break_file [4], file_exist [1]
	file_exist [3]
 Side effects: Creates multiple pixmaps.
               
 Category    : Image Display.
               
 See Also    : WMKMOVIE.PRO is a widget front-end to this procedure.
	** diverges from library version
	- Change HIDE_PYLON and LG_MASK_OCC; fix C1 ON_OFF_DIFF;, - add DBIAS
	- convert C1 hdr to structure; do not multiply by 100 for C1 log scale
	AEE  4 May 99 - Added /SH keyword to spawn command
	CMK 16 Feb 97 - added all C1 related features and changed the procedure name to mkc1movie2
	Change fhsize
	GENERIC_MOVIE.PRO reads in bytescaled fits or gif files and creates a movie.
	HIDE_PYLON keywords; add toobig variable to ind00; add NOCAM keyword
	Implement BIAS keyword with REDUCE_STD_SIZE; futz with ind0 and ind00
	Jan 1996., KarlB 050824 - Minor bug fix just before call to wrunmovie
	KarlB 060712 - Just some tidying up of comments -- no actual code changes
	Modified    : SEP 29 May 96 - Place frames into multiple pixmaps instead of 1 large
	Move CREM to before diff or ratiopl
	NBR	Feb 00 - Change R to P for determining img0_x1 etc.; Move GET_SUN_CENTER to after REDUCE_STD_SIZE
	NBR	Jun 99 - let USE_MODEL be set to model you want to use
	NBR	Mar 00 - Switch USE_MODEL options ALL and ANY_YEAR;
	NBR    Apr 00 - Skip files with READFITS errors
	NBR    Aug 00 - MK4 compatibility; pylon changes (box_x1
	NBR    Jan 01 - Rebin c3mask and c3 corner box; change AUTOMAX values for daily mvis;
	NBR    Jul 99 - Fixed problem with COORDS
	NBR    Jun 00 - Compute dbias for C3 based on pylon values
	NBR    May 99 - Add SQUARE keyword; check for img_hdr.txt file;
	NBR    Oct 99 - Add RUNNING_DIFF check in FIXGAPS; change c2 values for AUTOMAX; move 'fill gap with
	NBR    Sep 99 - Move ADD LOGO to before REBIN; use updated EIT_DEGRID and EIT_FLAT
	NBR   Dec 99 -  Add TIFF keyword;
	NBR   Jan 00 -  Mask edge of all images;
	NBR  3 May 99 - Fix header/time offset problem when movie starts w/ 2nd frame
	NBR  5 Apr 99 - Add CREM keyword before BYTSCL; add VIDEO keyword; refresh
	NBR  5 May 99 - Move image resize, NBR  8 Feb 99 - Add AUTOMAX keyword
	NBR  9 Apr 99 - Move initialization of yloc
	NBR 01/03/02 - Add RECTIFY keyword
	NBR 01/07/02 - Add caching function; add LABELPOS keyword; VERBOSE keyword
	NBR 02/21/02 - Modify behavior of zero files
	NBR 03.09.22 - Call wrunmovie with RECTIFIED keyword; correct suncenter and BOX if rectified
	NBR 03.09.25 - Fix DOFULL, NBR 03.10.09 - Fix NORECTIFY error
	NBR 04.01.08 - Fix md0 (missing block) error, NBR 04.03.10 - If fits error
	NBR 04.04.19 - Add /PNG; /VIDEO does not determine output format
	NBR 06 Nov 98 - Change default fillcol to median(image); change LG_MASK_OCC for c3 to use C3clearmask2.dat
	NBR 09/19/02 - Fix parts problem for files in current directory; fixed problem with subfields
	NBR 10 Mar 99 - Update AUTOMAX keyword
	NBR 11 Feb 99 - Move up first call of REDUCE_STD_SIZE
	NBR 11/19/01 - 	Use EIT_PREP; subtract bias in REDUCE_STD_SIZE (if not EIT or NO_NORM or monthly)
	NBR 11/20/01 -	Test image times for rolled condition (disabled)
	NBR 11/21/02 - Removed file caching
	NBR 11/9/01 - 	Don't subtract bias if /NO_NORMAL
	NBR 12/20/01 - Do rebin after subimage extraction; add FULL keyword
	NBR 14 May 99 - Change dumhdr line for determining ind00 in EIT case
	NBR 16 Dec 98 - Add LEEFILT keyword
	NBR 17 Feb 99 - Do not divide by lebxsum^2 (done in REDUCE_STD_SIZE)
	NBR 19 Mar 99 - Add LOGO keyword, NBR 26 Mar 99 - Add DISTORT keyword
	NBR 29 Apr 99 - Read obs. times from img_hdr.txt instead of file headers for
	NBR 3/21/01 -	Use /ORIG for degrid
	NBR 3/23/01 -	Don't skip any frames unless BAD_SKIP set (messes up headers)
	NBR 30 Apr 99 - Fix fhsize problem; put AUTOMAX in loop
	NBR 4/12/01 - 	Fixed ind0; increased c2 r_occ_out by 0.3
	NBR 4/6/01  - 	Don't subtract bias in REDUCE_STD_SIZE; move REDUCE_STD_SIZE down
	NBR 6/7/01 - 	Omit ORIG in EIT_DEGRID call to make compatible with new version
	NBR 9/20/01-	Use fvsize instead of vsize when resizing images, NRL
	Prev. Hist. : None., Put readfits in REPEAT loop
	RAH 02 Feb 98 - Now normalizes to calculated exposure time (if data exists).
	RAH 13 Dec 96 - added check for daily median image which doesn't have bias
	RAH/SEP 14 Mar 97 - integrated mkc1movie2 features into mkmovie
	SCCS variables for IDL use
	SEP  9 Jul 96 - Read in img headers as structures and pass to wrunmovie
	SEP 01 Oct 97 - added /SUM keyword to OFFSET_BIAS call
	SEP 13 Nov 97 - Added /FLAT_FIELD for EIT
	SEP 18 Oct 96 - Add option to pass in STRARR of image names instead of filename.
	SEP 21 Mar 97 - corrected bias subtraction for LEB summed images
	SEP 22 Oct 97 - fixed divide by zero error for /RATIO option
	SEP 24 Oct 96 - added /RATIO and /USE_MODEL options
	SEP 31 Oct 97 - Binned images are scaled (/bin^2) for level_05 images only
	Version:	07/12/06 @(#)mkmovie.pro	1.42 : NRL LASCO IDL Library
	Written     : Scott Paswaters, added /NEW flag to EIT_DEGRIDN
	bias subtraction, corrected for exp time;, etc and pylon2), fvsize assignment
	img_pan bug, ind0/ind00 assignment;
	jake	030717	added lines to read hdr.CROTA1 to determine if image is rolled and compensate
	oNBR    Jun 99 - Move rebin/congrid to end; fix hsize
	oNBR   Nov 99 -  Move subtract bias to before REDUCE_STD_SIZE; Fix problem with ind00
	oNBR  Dec 99 - 	use c3clearmask2.fts with C3 LG_MASK_OCC
	oNBR  Jan 00 - 	change !D.N_COLORS to !D.TABLE_SIZE
	oNBR 27 Aug 99 - IF exptime LT 15 sec then dbias = -7; BAD_SKIP keyword; change win_index incrementation
	of at beginning, pause instead of stop
	pixmap because of limitations on window size in IDL.
	previous image' to before take ratio; Move USE_SHARP outside of RATIO group and combine
	print time stats
	ref image for longer movies; allow arbitrary final size (NX by NY)
	sec_pix;, sorting; read other header info when image is read in instead
	update LEE_FILT keyword, vsize so PAN works for subfields; fix suncen
	with UNSHARP (both options use POINT_FILTER and subtract stray light)


MKMOVIE_kpd $SSW/soho/lasco/idl/nrleit/display/mkmovie_kpd.pro
[Previous] [Next]
 Project     : SOHO - LASCO/EIT
                   
 Name        : MKMOVIE_kpd
               
 Purpose     : Load FITS files into a pixmap and call WRUNMOVIE for animation.
               
 Explanation : This procedure sorts the images by time, reads them, and 
		normalizes to the exposure time of the first image.  The
		images are loaded into pixmap 9 and WRUNMOVIE is called
		to start a widget interface for the animation sequence.
               
 Use         : MKMOVIE, list, bmin, bmax, /TIMES, /DIFF, /NO_NORMAL, /NO_SORT, $
                        IMG_REBIN=[nx,ny], IMG_COORDS='(x1:x2,y1:y2)'

      Example: IDL> MKMOVIE, 'list960123', -1000, 2000, /DIFF, IMG_REBIN=[512,512]
      Example: IDL> MKMOVIE, 'list960123', 400, 13000, /TIMES, IMG_COORDS='(0:511,*)'
    
 Inputs      : list : Name of file containing names of FITS files.
               bmin, bmax : Minimum and maximum DN for BYTSCL.
               
 Outputs     : None.
               
 Keywords    : /TIMES : Default is to display image names in widget,
			 set this keyword to display TIME_OBS.
		/DIFF  : Set this keyword to make a difference movie.  The 
			 first image is subtracted from all subsequent images.
		/RUNNING_DIFF  : Make a difference movie, subracting the preceeding image.
		/NO_NORMAL : Don't normalize exposure times to that of the first image.
		/NO_SORT   : Don't by time in header.
		UNSHARP  : Set this keyword to make a movie of unsharp masked images.
			   The value of the keyword if any is set to the size of the 
			   unsharp mask, default=25
                          Example:  A value of 9 would form a 9x9 unsharp mask
		IMG_REBIN  : Set this keyword to the size you want to REBIN all images to.
			     Example: [512,512] would REBIN a full field, full resolution
			     image down to 512x512.
		IMG_COORDS : Set this keyword to select a partial field of all images.
			     Example: '(*,0:511)' would select the bottom 1/2 of a full
			     field full resolution (1024x1024) image.
               SQRT_SCL:  to square root scaling of the image  (kpd)

 Calls       : ***
	DATATYPE [1], DATATYPE [2], DATATYPE [3], EIT_DEGRIDN, EIT_SCALE, FXPAR [1]
	FXPAR [2], HEADFITS [1], HEADFITS [2], HEADFITS [3], L_RDFTS, RSTRPOS, STR2UTC [1]
	STR2UTC [2], STR2UTC [3], SXPAR [1], SXPAR [2], SXPAR [3], TAI2UTC, UTC2STR, UTC2TAI
	WRUNMOVIE [1], WRUNMOVIE [2]
 Restrictions: IMG_REBIN is applied before IMG_COORDS if both are selected.
               
 Side effects: Creates pixmaps in windows 9 and 0.
               
 Category    : Image Display.
               
 Prev. Hist. : None.

 Written     : Scott Paswaters, NRL, Jan 1996.
               
 Modified    : 

 Version     : 


MKMOVIEM $SSW/soho/lasco/idl/movie/mkmoviem.pro
[Previous] [Next]
 Project     : SOHO - LASCO/EIT
                   
 Name        : MKMOVIEM
               
 Purpose     : Load FITS files into pixmaps and call WRUNMOVIEM for animation.
               
 Explanation : This procedure sorts the images by time, reads them, and 
		normalizes to the exposure time of the first image.
		WRUNMOVIEM is called to start a widget interface for the 
		animation sequence.
               
 Use         : MKMOVIEM, list, bmin, bmax, /TIMES, /DIFF, /NO_NORMAL, /NO_SORT, $
                        IMG_REBIN=[nx,ny], IMG_COORDS='(x1:x2,y1:y2)', UNSHARP=unsharp

      Example: IDL> MKMOVIEM, 'list960123', -100, 200, /DIFF, IMG_REBIN=[512,512]
      Example: IDL> MKMOVIEM, 'list960123', 400, 13000, /TIMES, IMG_COORDS='(0:511,*)'

      Example: If you want to display BYTARR images straight from the FITS files without
		any scaling use:
               IDL> MKMOVIEM, 'list', 0, 255, /NO_NORMAL, /NO_SORT
    
 Inputs      : list : Name of file containing names of FITS files.
               bmin, bmax : Minimum and maximum DN for BYTSCL.
               
 Outputs     : None.
               
 Keywords    : /TIMES : Default is to display image names in widget,
			 set this keyword to display TIME_OBS.
		/DIFF  : Set this keyword to make a difference movie.  The 
			 first image is subtracted from all subsequent images.
		/RUNNING_DIFF  : Make a difference movie, subracting the preceding image.
		/NO_NORMAL : Don't normalize exposure times to that of the first image.
		/NO_SORT   : Don't by time in header.
		IMG_REBIN  : Set this keyword to the size you want to REBIN all images to.
			     Example: [512,512] would REBIN a full field, full resolution
			     image down to 512x512.
		IMG_COORDS : Set this keyword to select a partial field of all images.
			     Example: '(*,0:511)' would select the bottom 1/2 of a full
			     field full resolution (1024x1024) image.
               UNSHARP    : Set this keyword to make a movie of unsharp masked images.
                            The value of the keyword if any is set to the size of the
                            unsharp mask, default=25
                            Example:  A value of 9 would form a 9x9 unsharp mask
		DERIV      : Divide difference images by time difference 
			     between frames.  Set value to the number of hours,
			     on average, between frames.
               /NOSTARS   : Attemps to remove stars using POINT_FILTER by Mike Andrews
               /FIXGAPS   : Sets data gaps so they appear as neutral grey in difference images

 Calls       : ***
	DATATYPE [1], DATATYPE [2], DATATYPE [3], LASCO_READFITS [1], LASCO_READFITS [2]
	OFFSET_BIAS, REDUCE_STD_SIZE, RSTRPOS, STR2UTC [1], STR2UTC [2], STR2UTC [3]
	TAI2UTC, UTC2STR, UTC2TAI, WRUNMOVIEM, point_filter
 Restrictions: IMG_REBIN is applied before IMG_COORDS if both are selected.
               
 Side effects: Creates multiple pixmaps.
               
 Category    : Image Display.
               
 Prev. Hist. : None.

 Written     : Scott Paswaters, NRL, Jan 1996.
               
 Modified    : SEP 29 May 96 - Place frames into multiple pixmaps instead of 1 large
				pixmap because of limitations on window size in IDL.
               SEP  9 Jul 96 - Read in img headers as structures and pass to wrunmovie
		SHH 12 Jul 96 - Display each frame after it's processed
				Use FIXEXP function rather than exposure times for image normalization
				Scale images absolutely, rather than using TVSCL
		SHH 23 Jul 96 - Added DERIV keyword 
               SEP 29 Sep 96 - Placed frames in 1024x1024 image window.

 Version     : 3.1

	@(#)mkmoviem.pro	1.1 10/12/96 LASCO IDL LIBRARY


MKMOVIEWLC $SSW/soho/lasco/idl/movie/mkmoviewlc.pro
[Previous] [Next]
 Project     : SOHO - LASCO/EIT
                   
 Name        : MKMOVIEWLC
               
 Purpose     : Load FITS files into pixmaps and call WRUNMOVIE for animation.
               
 Explanation : This procedure sorts the images by time, reads them, and 
		normalizes to the exposure time of the first image.
		WRUNMOVIE is called to start a widget interface for the 
		animation sequence.
               
 Use         : MKMOVIEWLC, list, bmin, bmax, /TIMES, /DIFF, /NO_NORMAL, /NO_SORT, $
                        IMG_REBIN=[nx,ny], IMG_COORDS='(x1:x2,y1:y2)', UNSHARP=unsharp, $
                        /RATIO, /USE_MODEL, ROLL=roll, /MASK, /SUNMASK

      Example: IDL> MKMOVIEWLC, 'list960123', -100, 200, /DIFF, IMG_REBIN=[512,512]
      Example: IDL> MKMOVIEWLC, 'list960123', 400, 13000, /TIMES, IMG_COORDS='(0:511,*)'

      Example: If you want to display BYTARR images straight from the FITS files without
		any scaling use:
               IDL> MKMOVIEWLC, 'list', 0, 255, /NO_NORMAL, /NO_SORT
    
 Inputs      : list : Name of file containing names of FITS files.
		       Or a STRARR of the image names.
               bmin, bmax : Minimum and maximum DN for BYTSCL.
               
 Outputs     : None.
               
 Keywords    : /TIMES : Default is to display image names in widget,
			 set this keyword to display TIME_OBS.
		/DIFF  : Set this keyword to make a difference movie.  The 
			 first image is subtracted from all subsequent images.
		/RUNNING_DIFF  : Make a difference movie, subracting the preceding image.
		/NO_NORMAL : Don't normalize exposure times to that of the first image.
		/NO_SORT   : Don't by time in header.
		IMG_REBIN  : Set this keyword to the size you want to REBIN all images to.
			     Example: [512,512] would REBIN a full field, full resolution
			     image down to 512x512.
		IMG_COORDS : Set this keyword to select a partial field of all images.
			     Example: '(*,0:511)' would select the bottom 1/2 of a full
			     field full resolution (1024x1024) image.
               UNSHARP    : Set this keyword to make a movie of unsharp masked images.
                            The value of the keyword if any is set to the size of the
                            unsharp mask, default=25
                            Example:  A value of 9 would form a 9x9 unsharp mask
		/RATIO     : If using diff or running_diff display data as ratio
		/USE_MODEL : If using diff or running_diff use background corona model
			     as base frame.
		ROLL       : Set this keyword to rotate the image by the roll angle.  If
			     set to 1 then read in the roll angle from the date file
		/MASK      : Set this keyword to put a mask at the edge of the field
			     at 9 R (13.4 pixels per radius)
		/SUNMASK   : Set this keyword to put a circle where the sun should be


 Calls       : ***
	DATATYPE [1], DATATYPE [2], DATATYPE [3], GETBKGIMG, MAXMIN, RSTRPOS, STR2UTC [1]
	STR2UTC [2], STR2UTC [3], TVCIRCLE, UTC2STR, UTC2TAI, WRUNMOVIE [1], WRUNMOVIE [2]
 Restrictions: IMG_REBIN is applied before IMG_COORDS if both are selected.
               
 Side effects: Creates multiple pixmaps.
               
 Category    : Image Display.
               
 Prev. Hist. : None.

 Written     : Scott Paswaters, NRL, Jan 1996.
               
 Modified    : SEP 29 May 96 - Place frames into multiple pixmaps instead of 1 large
				pixmap because of limitations on window size in IDL.
               SEP  9 Jul 96 - Read in img headers as structures and pass to wrunmovie
               SEP 18 Oct 96 - Add option to pass in STRARR of image names instead of filename.
               SEP 24 Oct 96 - added /RATIO and /USE_MODEL options
               SEP 14 Nov 96 - Modified to read in solwind wlc images
               RAH 14 May 98 - Modified to roll the image
		NBF  7 Jun 00 - Read separate header files; insert wlc image in full frame; cancel !order=1

 Version: 11/02/01 @(#)mkmoviewlc.pro	1.8 - LASCO NRL IDL Library


MKQUERY $SSW/soho/lasco/idl/display/mkquery.pro
[Previous] [Next]
 NAME:
	MKQUERY

 PURPOSE:
	This procedure will generate a list of images for selected day, create
       image reduce header catalog, sort images on date and time, write a list
       of images in $HOME or ../work/$USER/list with name of the first 
       (first_last) processed day:
	960704.lst (960704_960710.lst)
       and write processed images on ../work/$USER/fits.

 CATEGORY:
	LASCO DATA ANALYSIS

 CALLING SEQUENCE:
	MKQUERY

 INPUTS:

 KEYWORD PARAMETERS:
	INST:   A string for instrument: 'C1' is default.
       DAY:    A string array: day = ['960703','960704']
       FILTER: A string for the filter: filter = 'Fe XIV'
       POLAR:  A string for the polarizer: polar = 'Clear'
       WAVE:   A float array for the wavelength: wave = [5309.2,5302.4]
       PROCESS: If this keyword is set, C1 images will be processed.
 
 
 CALLS: ***
	ANYTIM2UTC [1], ANYTIM2UTC [2], DATATYPE [1], DATATYPE [2], DATATYPE [3], DIFF_OF
	GET_ARRAY, HEADFITSL, HEAD_INFO, PATH_FILE, QUERYCAT, RSTRPOS, SXPAR [1], SXPAR [2]
	SXPAR [3], UTC2TAI, WRT_ASC, YYMMDD, rd_asc
 SIDE EFFECTS:

 PROCEDURE:
      

 EXAMPLE:

		MKQUERY,day='960704'
               MKQUERY,day=['960703','960704'],inst='C1',filter='Fe XIV'

 MODIFICATION HISTORY:
 	Written by:	B Podlipnik, 04 Jul 1996

	Version:	1.0

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


MKSUMWDESC $SSW/soho/cds/idl/sci/data_handling/soho/sumer/mksumwdesc.pro
[Previous] [Next]
 Project     : SOHO - CDS     
                   
 Name        : MKSUMWDESC()
               
 Purpose     : Return detector data descriptor of correct type.
               
 Explanation : SUMER version of CDS routine MkDetWinDesc.

		Based on the dimenstionality of the data in DATA the correct
		type of detector data descriptor is returned, with the
		descriptor values from DATA copied into the new structure.

 Use         : DETDESCRIPTOR = MKSUMWDESC(DATA)
    
 Inputs      : DATA	 = a structure variable of the form that 
			   is returned by READSUMCOL
               
 Opt. Inputs : None.
               
 Outputs     : IDL detector data descriptor, see CDS QL Data Format.
               
 Opt. Outputs: None.
               
 Keywords    : None.

 Calls       : ***
	TRIM
 CALLED BY:
	SUMDETREAD, SUMDETSELECT
 Common      : None.
               
 Restrictions: DATA must adhere to the format returned by READSUMCOL
		Normally used by DETREAD()
               
 Side effects: None.
               
 Category    : Data_Handling, I_O, FITS, CDS, SUMER, QuickLook
               
 Prev. Hist. : Converted from MkDetWDesc by Stein Vidar Haugan

 Written     : William Thompson, GSFC, 5 July 1996
               
 Modified    : Version 1, William Thompson, GSFC, 5 July 1996
		Version 2, William Thompson, GSFC, 8 July 1996
			Add DetX and DetY to reflect changes in READSUMCOL.

 Version     : Version 2, 8 July 1996


MLO_FITSHDR2STRUCT $SSW/soho/lasco/idl/inout/mlo_fitshdr2struct.pro
[Previous] [Next]
 Project     : SOHO - LASCO
                   
 Name        : MLO_FITSHDR2STRUCT
               
 Purpose     : Converts a FITS header into a structure similar to the LASCO structure
               
 Use         : IDL> mlo_hdr = MLO_FITSHDR2STRUCT(fits_hdr)
    
 Inputs      : fits_hdr	FITS header, STRARR
               
 Outputs     : mlo_hdr   	MLO header structure.
               
 Calls       : ***
	DATATYPE [1], DATATYPE [2], DATATYPE [3], FILEPATH, FXPAR [1], FXPAR [2]
	STR2UTC [1], STR2UTC [2], STR2UTC [3]
 Category    : Data_Handling, I_O
               
 Prev. Hist. : None.

 Written     : Russ Howard, NRL, Aug. 1998. (adapted from LASCO_FITSHDR2STRUCT)
               
 Modified    : 

 Version     : Version 1.0, Aug. 22, 1998

 
 @(#)mlo_fitshdr2struct.pro	1.5 11/05/01 :LASCO IDL LIBRARY


 CALLED BY
	GET_ROLL_OR_XY, GET_SEC_PIXEL, GET_SUN_CENTER [1], LASCO_READFITS [1]
	PB_INVERTER, STDIMGPLOT, TELESCOPE_POINTING


MLO_MASSIMG $SSW/soho/lasco/idl/cme/mlo_massimg.pro
[Previous] [Next]
 NAME:
	MLO_MASSIMG

 PURPOSE:
	This function subracts the input calibrated images into a mass image

 CATEGORY:
	CME

 CALLING SEQUENCE:
	Result = MLO_MASSIMG(Bn,Fn)

 INPUTS:
	Bn:	String containing the filename of the base image
	Fn:	String containing the filename of the CME image

 KEYWORD PARAMETERS:
	ONLY_NE:If set, then compute electron density rather than mass
	NEW:	If set, then process the base image, even if it has been done

 OUTPUTS:
	This function returns an image of the calculated mass

 CALLS: ***
	CALC_CME_MASS, FXADDPAR [1], FXADDPAR [2], LASCO_READFITS [1]
	LASCO_READFITS [2], STRUCT2FITSHDR, WRITEFITS [1], WRITEFITS [2]
 RESTRICTIONS:
	Only works for calibrated images

 EXTERNAL CALLS:
	LASCO_READFITS, CALC_CME_MASS

 PROCEDURE:
	The files for the base and CME images are read in and calibrated.
	The images are then adjusted to have the same area and summing.
	The images are differenced. CALC_CME_MASS is called to 
	compute the CME mass.

 EXAMPLE:
	To find the mass of a CME, where the base image is '320004.fts' and
	the CME image is in '320005.fts', and saving the total mass information
	in 'mass.lst':

		Massimg = MLO_MASSIMG ('320004.fts','320005.fts')

 MODIFICATION HISTORY:
 	Written by:	RA Howard, NRL, 8/28/98 from C3_MASSIMG
			RAH 5/23/98, Make work and make similar to c3_cme_front

	%W% %H% LASCO IDL LIBRARY


mmap_imgnum $SSW/soho/mdi/idl/egse/mmap_imgnum.pro
[Previous] [Next]
NAME:
	mmap_imgnum
PURPOSE:
	To figure out which images are which in a Michelson tuning
SAMPLE CALLING SEQUENCE:
	mmap_imgnum, imgarr, idark, iobs, im1, im2, comment
INPUT:
	imgarr	- The integer array saying which images to use,
				 OR
		  the number of images in the cube.  COMMENT is not
		  passed back if this is the case
OUTPUT:
	idark	- The subscript(s) in imgarr which signify the dark 
		  image(s)
	iobs	- The subscript in imgarr which is the OBS image
	im1	- The subscript in imgarr where the 10 position M1 tuning starts
	im2	- The subscript in imgarr where the 10 position M2 tuning starts
	comment	- The comment line used in DISP_MMAP describing which images were used
COMMENTS:
	29 set: 1 obs, 1 dark, 10 m1 varies, 10 m2 varies, 
	        1 obs, 1 dark, 4 "nominal", 1 "continuum"
	27 set: 1 obs, 4 "nominal", 1 dust (?), 1 dark
		10 m1 varies, 10 m2 varies
	21 set: 1 dark, 10 m1 varies, 10 m2 varies
	22 set: 1 dark, 1 obs, 10 m1 varies, 10 m2 varies
 CALLS: ***
	ARR2STR [1], Arr2Str [2]
HISTORY:
	Written 15-Jun-94 by M.Morrison (removed it from MAPLASER)


mmap_unwrap $SSW/soho/mdi/idl/cal/mmap_unwrap.pro
[Previous] [Next]
NAME:
	mmap_unwrap
PURPOSE:
	To look at an phase image and see if there is wrap around within
	the image and to correct it if there is
INPUTS:
	phas	- the phase image
HISTORY:
	Written 17-Jun-94 by M.Morrison (extracted from MAP_LASER)


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

 Name        :	MOD_ALT()

 Purpose     :	Modify entry in the alternate science plan database.

 Explanation :	Modifies an entry in the alternate science plan database.
		The old entry is removed, and the new entry is added.

 Use         :	Result = MOD_ALT( OLD_DEF, NEW_DEF )

		IF NOT MOD_ALT(OLD_DEF,NEW_DEF) THEN ...

 Inputs      :	OLD_DEF	= Previous entry.  This is a structure such as that
			  returned by GET_ALT, and has the tags:

			PROG_ID	   = Program ID, linking one or more studies
				     together
			STUDY_ID   = Number defining the study
			STUDYVAR   = Number giving the study variation ID
			SCI_OBJ    = Science objective from the daily science
				     meeting
			SCI_SPEC   = Specific science objective from meeting
			CMP_NO	   = Campaign number
			OBJECT	   = Code for object planned to be observed
			OBJ_ID	   = Object identification
			START_TIME = Date/time of beginning of alternate plan,
				     in TAI format
			END_TIME   = Date/time of end of alternate plan, in
				     TAI format
			ORIG_DUR   = Original duration of the observation, in
				     seconds, before being truncated by
				     following time-tagged observations.
			N_RASTERS1 = Variable number of rasters parameter
			TRACKING   = True (1) if feature tracking to be used,
				     or false (0) otherwise
			N_POINTINGS= Number of pointings to use with study
			N_REPEAT_S = Number of times to repeat study
			GSET_ID	   = GSET ID number
			GET_RAW	   = True if raw data should be collected.

		      If N_POINTINGS is greater than 0, then there will be the
		      additional tag POINTINGS.  This is an array of pointing
		      positions.  It itself is a structure, of type
		      PLAN_PNT_STRUC, with the following tags:

			INS_X	   = Pointing in X relative to sun center
			INS_Y	   = Pointing in Y relative to sun center
			ZONE_ID	   = Pointing zone ID

		NEW_DEF = New entry.  It has the same structure as OLD_DEF.
			  Any field can be changed, including the start and end
			  times.

 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    :	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 = MOD_ALT( ERRMSG=ERRMSG, ... )
				IF ERRMSG NE '' THEN ...

 Calls       : ***
	ADD_ALT, DEL_ALT
 Common      :	None.

 Restrictions:	None.

 Side effects:	None.

 Category    :	Planning, Databases.

 Prev. Hist. :	None.

 Written     :	William Thompson, GSFC, 9 May 1995

 Modified    :	Version 1, William Thompson, GSFC, 9 May 1995

 Version     :	Version 1, 9 May 1995


MOD_CAMPAIGN $SSW/soho/gen/idl/plan/database/mod_campaign.pro
[Previous] [Next]
 PROJECT:
       SOHO - CDS

 NAME:
       MOD_CAMPAIGN()

 PURPOSE:
       Modify a CDS campaign record in the database

 CATEGORY:
       Planning, Databases

 EXPLANATION:
       This procedure takes a CDS campaign entry and modify the
       corresponding entry in database table CAMPAIGN.  This database
       contains a series of such entries, making a historical list.

 SYNTAX:
       Result = mod_campaign(DEF)

 INPUTS:
       DEF = This is an anonymous structure containing the following tags:
             CMP_NO   = Unique identifier number.  If no matches
                        are found, then a simpler structure is
                        returned with this set to -1.
             CMP_NAME = Name of the campaign.
	      CMP_TYPE = Campaign type, e.g. JOP, Intercal, etc.
             CMP_DESC = Up to five lines of text (400 characters)
                        describing the campaign.
             DATE_OBS = Starting date for the observing campaign
             DATE_END = Ending data for the campaign
             OBSERVER = Observer in overall charge of the campaign
	      COMMENT  = A comment associated with the campaign
	      INSTITUTES = Structure containing information about the
			 institutes involved, with the following tags:

			INSTITUT = The name of the institute.
			OBSERVER = The name of the observer at that institute

 OPTIONAL 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.

 OPTIONAL 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 = mod_campaign(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], DBDELETE [1], DBDELETE [2], DBDELETE [3]
	DBFIND [1], DBFIND [2], DBFIND [3], DBOPEN [1], DBOPEN [2], DBOPEN [3], DBSORT [1]
	DBSORT [2], DBSORT [3], DBUPDATE [1], DBUPDATE [2], DBUPDATE [3], DBUPDATE [4]
	GET_CAMPAIGN, TAG_EXIST [1], TAG_EXIST [2], TRIM, TRIM_CAMPAIGN
 CALLED BY:
	UPDATE_CAMPAIGN
 COMMON:
	None.

 RESTRICTIONS:
 	Only this routine and ADD_CAMPAIGN can be used to update or add
	SOHO campaigns to or from the database.
	Modifying the database by hand could corrupt its integrity.

	The data types and sizes of the structure elements must match
	the definitions in the database.

 SIDE EFFECTS:
	The dates in the structure are rounded off to millisecond
	accuracy.

 HISTORY:
       Version 1, 10-Sep-1996, William Thompson, GSFC
		Converted from SUMER version by Liyun Wang
	Version 2, 23-Sep-1996, William Thompson, GSFC
		Added campaign type, changed string lengths.
	Version 3, 21-Nov-1996, William Thompson, GSFC
		Fixed bug when modification would add a comment that didn't
		exist before.
	Version 4, 22-Nov-1996, Zarro, GSFC
		Added check for modified CMP_TYPE and call to TRIM_CAMPAIGN
	Version 5, 22-Nov-1996, William Thompson, GSFC
		Fixed bug when modification would add an institute when there
		weren't any before.
	Version 6, 19-Dec-1996, William Thompson, GSFC
		Allow COMMENTS tag to be optional.

 CONTACT:
       WTHOMPSON


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

 Name        :	MOD_CATALOG()

 Purpose     :	Modify a catalog entry

 Category    :	Catalog

 Explanation :	Called from XCAT to modify a catalog entry.  The routines
		MOD_MAIN and MOD_EXPER are called to modify the database
		entries.

 Syntax      :	Result = MOD_CATALOG( OLD, NEW )

 Examples    :	IF NOT MOD_CATALOG( OLD, NEW ) THEN ...

 Inputs      :	OLD = Old data structure, as returned by GET_EXPER or
		      LIST_EXPER.

		NEW = New data structure, as modified by the XSTRUCT program.

 Opt. Inputs :	None.

 Outputs     :	The result of the function is either 1 for success or 0 for
		failure.

		NEW: If the modification is unsuccessful, then the NEW
		structure is replaced with the OLD structure.  This can then be
		redisplayed with XSTRUCT.

		OLD: If the modification is successful, then the OLD structure
		is reread from the database.  This can then be put back into
		the array stored in the XCAT common block.

 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 = MOD_CATALOG( ERRMSG=ERRMSG, ... )
				IF ERRMSG NE '' THEN ...



 Calls       : ***
	GET_EXPER, GET_MAIN, MOD_EXPER, MOD_MAIN, TRIM
 Common      :	None.

 Restrictions:	Not all parameters can be modified.  The parameters PROG_NUM,
		SEQ_NUM, and SEQ_IND cannot be changed, because they refer to
		the location of the data in the database.  This routine also
		cannot be used to change the COMMENTS or DATE_MOD
		parameter--any changes in the structure will be ignore.

		Must have write privilege into catalog database files.

 Side effects:	None.

 Prev. Hist. :	None.

 History     :	Version 1, 06-Mar-1996, William Thompson, GSFC
		Version 2, 11-Mar-1996, William Thompson, GSFC
			Times are TAI in both new and old structures.
		Version 3, 02-Apr-1996, William Thompson, GSFC
			Modified for version 3 of the catalog databases.

 Contact     :	WTHOMPSON


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

 Name        :	MOD_DETAIL()

 Purpose     :	Modifies an entry in the science plan database.

 Explanation :	Modifies an entry in the science plan database.  There are two
		possible calling sequences.  One way to call this is to pass
		the old database entry, and the new PROG_NUM value through the
		keyword.  In this mode, the old entry remains, and only the
		PROG_NUM value is updated.

		The second way this routine can be called is to pass an old
		entry and a new entry, without a PROG_NUM keyword.  In this
		mode, the old entry is removed, and the new entry is added.

 Use         :	Result = MOD_DETAIL( OLD_DEF, PROG_NUM=PROG_NUM)
		Result = MOD_DETAIL( OLD_DEF, NEW_DEF )

		IF NOT MOD_DETAIL(OLD_DEF,NEW_DEF) THEN ...

 Inputs      :	OLD_DEF	= Previous entry.  This is a structure such as that
			  returned by GET_DETAIL or LIST_DETAIL.

 Opt. Inputs :	NEW_DEF = New entry, as used by ADD_DETAIL.  It has the tags

			PROG_ID	   = Program ID, linking one or more studies
				     together
			STUDY_ID   = Number defining the study
			STUDYVAR   = Number giving the study variation ID
			SCI_OBJ    = Science objective from the daily science
				     meeting
			SCI_SPEC   = Specific science objective from meeting
			CMP_NO	   = Campaign number
			OBJECT	   = Code for object planned to be observed
			OBJ_ID	   = Object identification
			DATE_OBS   = Date/time of beginning of observation,
				     in TAI format
			DATE_END   = Date/time of end of observation, in TAI
				     format
			ORIG_DUR   = Original duration of the observation, in
				     seconds, before being truncated by
				     following time-tagged observations.
			N_RASTERS1 = Variable number of rasters parameter
			TIME_TAGGED= True (1) if the start of the study is to
				     be a time-tagged event.  Otherwise, the
				     study will begin immediately after the
				     previous study.
			TRACKING   = True (1) if feature tracking to be used,
				     or false (0) otherwise
			N_POINTINGS= Number of pointings to use with study.
			N_REPEAT_S = Number of times to repeat study.
			FLAG_MASTER= Nonzero if flag master.
			GSET_ID	   = GSET ID number
			GET_RAW	   = True if raw data should be collected.
			PROG_NUM   = Study counter number (negative is
				     predicted).  This parameter is optional.

		      If N_POINTINGS is greater than 0, then there will be the
		      additional tag POINTINGS.  This is an array of pointing
		      positions.  It itself is a structure, of type
		      PLAN_PNT_STRUC, with the following tags:

			INS_X	   = Pointing in X relative to sun center
			INS_Y	   = Pointing in Y relative to sun center
			ZONE_ID	   = Pointing zone ID

		      Any field can be changed, including the start and end
		      times.  If the PROG_NUM keyword is not passed, then
		      NEW_DEF is a required input parameter.

 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    :	PROG_NUM = The new value for the PROG_NUM parameter.  When
			   PROG_NUM is passed, then the NEW_DEF parameter must
			   be omitted.

		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 = MOD_DETAIL( ERRMSG=ERRMSG, ... )
				IF ERRMSG NE '' THEN ...

 Calls       : ***
	ADD_DETAIL, DBFIND [1], DBFIND [2], DBFIND [3], DBOPEN [1], DBOPEN [2], DBOPEN [3]
	DBUPDATE [1], DBUPDATE [2], DBUPDATE [3], DBUPDATE [4], DEL_DETAIL, TRIM
 CALLED BY:
	PRED_PROG_NUM
 Common      :	None.

 Restrictions:	None.

 Side effects:	None.

 Category    :	Planning, Databases.

 Prev. Hist. :	None.

 Written     :	William Thompson, GSFC, 17 November 1994

 Modified    :	Version 1, William Thompson, GSFC, 17 November 1994

 Version     :	Version 1, 17 November 1994


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

 Name        :	MOD_EXPER()

 Purpose     :	Modifies a CDS experiment entry in the as-run database

 Explanation :	This procedure takes a CDS raster-level (experiment) as-run
		entry, compares it against that in the database "exper", and
		makes any necessary modifications.  Any parameter can be
		modified, except PROG_NUM, SEQ_NUM, and SEQ_IND.  (Note that
		COMMENTS can only be changed from "N"(o) to "Y"(es).)

 Use         :	Result = MOD_EXPER( OBS )

		IF MOD_EXPER( OBS ) LT 0 THEN ...

 Inputs      :	OBS = This is an anonymous structure containing the following
		      tags:

			PROG_NUM   = Study counter number.
			SEQ_NUM	   = Unique sequence number.  This serves as
				     the primary key to the database.
			OBS_SEQ	   = A character string derived from the raster
				     number and the variation number,
				     e.g. "R4V3".
			COUNT	   = The number of repeated observations making
				     up this experiment.  Normally 1.
			SEQ_IND	   = The raster counter
			RAS_ID	   = The raster ID number
			RAS_VAR	   = The raster variation index
			EXPTIME	   = The exposure time, in seconds
			OBS_MODE   = The observing mode.
			DW_ID	   = The data window ID number
			DATE_OBS   = Date/time of beginning of observation,
				     in TAI format
			DATE_END   = Date/time of end of observation, in TAI
				     format
			OBT_TIME   = Onboard date/time of beginning of
				     observation, in TAI format
			OBT_END	   = Onboard date/time of end of observation,
				     in TAI format
			XCEN	   = Center of instrument field-of-view in
				     solar X
			YCEN	   = Center of instrument field-of-view in
				     solar Y
			ANGLE	   = Angle of instrument relative to solar
				     north
			IXWIDTH	   = Width of field-of-view in instrument X
			IYWIDTH	   = Width of field-of-view in instrument Y
			INS_X0	   = The instrument origin pointing in X
			INS_Y0	   = The instrument origin pointing in Y
			INS_ROLL   = The instrument roll angle
			SC_X0	   = The spacecraft pointing in X
			SC_Y0	   = The spacecraft pointing in Y
			SC_ROLL	   = The spacecraft roll
			WAVEMIN	   = The minimum wavelength of observation, in
				     Angstroms.
			WAVEMAX	   = The maximum wavelength, in Angstroms
			TRACKING   = True if tracking is on
			SER_ID	   = The series ID number
			OPSLBITS   = The OPS-L status bits at the start of the
				     observation.
			OPSRBITS   = The OPS-R status bits at the start of the
				     observation.
			SLIT_POS   = The slit position at the start of the
				     observation.
			MIR_POS	   = The mirror position at the start of the
				     observation.
			EV_ENAB	   = True if event recognition enabled
			COMP_ERR   = True if a compression error was
				     encountered.
			VDS_PMCP   = The VDS MCP programmable voltage setting
			VDS_MODE   = The VDS readout mode.
			VDS_ORI	   = True if the VDS telemetry data is oriented
				     by columns
			VDS_ACC	   = True if VDS is operated in accumulate mode
			GSET_ID	   = GIS Setup ID
			DETECTOR   = Either N or G for NIS/GIS.
			ZONE_ID	   = Pointing zone ID
			SLIT_NUM   = Slit number
			FILENAME   = FITS file name
			SEQVALID   = True for valid science data
			DATASRC	   = Data source, either Q(uicklook) or F(inal
				     distribution).
			COMMENTS   = Either Y or N

 Opt. Inputs :	None.

 Outputs     :	The result of the function is the number of parameters that
		were modified.  If an error occurs, then -1 is returned
		instead.

 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 = MOD_EXPER( ERRMSG=ERRMSG, ... )
                       IF ERRMSG NE '' THEN ...


 Calls       : ***
	CDS_MESSAGE, DATATYPE [1], DATATYPE [2], DATATYPE [3], DBCLOSE [1], DBCLOSE [2]
	DBCLOSE [3], DBEXT [1], DBEXT [2], DBEXT [3], DBEXT [4], DBFIND [1], DBFIND [2]
	DBFIND [3], DBOPEN [1], DBOPEN [2], DBOPEN [3], DBUPDATE [1], DBUPDATE [2]
	DBUPDATE [3], DBUPDATE [4], FIND_WITH_DEF [1], FIND_WITH_DEF [2]
	FIND_WITH_DEF [3], GET_DATAWIN, GET_EXPER, GET_RASTER, GET_UTC, LOCK_DATABASE, TRIM
	UNLOCK_DATABASE, UTC2TAI
 CALLED BY:
	ADD_EXP_COMM, FIX_OBS_SEQ, MOD_CATALOG
 Common      :	None.

 Restrictions:	Only this routine can be used to modify entries in the MAIN
		database.  Modifying the database by hand could corrupt its
		integrity.

		The data types and sizes of the structure elements must match
		the definitions in the database.

		!PRIV must be 2 or greater to use this routine.

 Side effects:	The dates in the structure are rounded off to millisecond
		accuracy.

 Category    :	Planning, Databases.

 Prev. Hist. :	None.

 Written     :	William Thompson, GSFC, 3 July 1995

 Modified    :	Version 1, William Thompson, GSFC, 3 July 1995
		Version 2, William Thompson, GSFC, 21 February 1996
			Modified to be more robust.  It will complain about not
			finding IDs in the databases, but will modify the
			catalog entry anyway.
		Version 3, William Thompson, GSFC, 23 February 1996
			Modified for version 2 of the experiment databases.
		Version 4, William Thompson, GSFC, 27 March 1996
			Added parameter DATASRC
		Version 5, William Thompson, GSFC, 9 April 1996
			Added calls to LOCK_DATABASE, UNLOCK_DATABASE
		Version 6, William Thompson, GSFC, 12 April 1996
			Look in both experiment* and fexperiment*
		Version 7, William Thompson, GSFC, 26 April 1996
			Fixed bug introduced in version 6 for MOD_DATE
		Version 8, William Thompson, GSFC, 1 June 1998
			Look for entries in "_year" files

 Version     :	Version 8, 1 June 1998


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

 Name        :	MOD_FLAG()

 Purpose     :	Modify entry in the flag receiver science plan database.

 Explanation :	Modifies an entry in the flag receiver science plan database.
		The old entry is removed, and the new entry is added.

 Use         :	Result = MOD_FLAG( OLD_DEF, NEW_DEF )

		IF NOT MOD_FLAG(OLD_DEF,NEW_DEF) THEN ...

 Inputs      :	OLD_DEF	= Previous entry.  This is a structure such as that
			  returned by GET_FLAG, and has the tags:

			PROG_ID	   = Program ID, linking one or more studies
				     together
			STUDY_ID   = Number defining the study
			STUDYVAR   = Number giving the study variation ID
			SCI_OBJ    = Science objective from the daily science
				     meeting
			SCI_SPEC   = Specific science objective from meeting
			CMP_NO	   = Campaign number
			OBJECT	   = Code for object planned to be observed
			OBJ_ID	   = Object identification
			RCVR_START = Date/time of beginning of receiver status,
				     in TAI format
			RCVR_STOP  = Date/time of end of receiver status, in
				     TAI format
			ORIG_DUR   = Original duration of the observation, in
				     seconds, before being truncated by
				     following time-tagged observations.
			N_RASTERS1 = Variable number of rasters parameter
			TRACKING   = True (1) if feature tracking to be used,
				     or false (0) otherwise
			N_POINTINGS= Number of pointings to use with study.
				     Can be either 0 or 1.
			REPOINT	   = Either 1 to allow repoints or 0 to
				     disallow.
			GSET_ID	   = GSET ID number

		      If N_POINTINGS is greater than 0, then there will be the
		      additional tag POINTINGS.  This is an array of pointing
		      positions.  It itself is a structure, of type
		      PLAN_PNT_STRUC, with the following tags:

			INS_X	   = Pointing in X relative to sun center
			INS_Y	   = Pointing in Y relative to sun center
			ZONE_ID	   = Pointing zone ID

		NEW_DEF = New entry.  It has the same structure as OLD_DEF.
			  Any field can be changed, including the start and end
			  times.

 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    :	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 = MOD_FLAG( ERRMSG=ERRMSG, ... )
				IF ERRMSG NE '' THEN ...

 Calls       : ***
	ADD_FLAG, DEL_FLAG
 Common      :	None.

 Restrictions:	None.

 Side effects:	None.

 Category    :	Planning, Databases.

 Prev. Hist. :	None.

 Written     :	William Thompson, GSFC, 13 February 1995

 Modified    :	Version 1, William Thompson, GSFC, 13 February 1995

 Version     :	Version 1, 13 February 1995


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

 Name        :	MOD_GSET()

 Purpose     :	Modifies a GIS setup definition in the database

 Explanation :	This procedure allows one to modify certain parameters in the
		definition of a GIS setup.

 Use         :	Result = MOD_GSET( GSET_ID, keywords=... )

		IF NOT MOD_GSET( GSET_ID, keywords=... ) THEN ...

 Inputs      :	GSET_ID = GIS setup ID. This parameter simply allows the
			  relevant entry to be found in the database.  The
			  modifications are passed through keyword parameters.

 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    :	
       RAW_ID	  = ID number of associated raw science files (4)
	GSET_DESC = Free format descriptions (4)

		The above keywords specify the modifications to be made to the
		database.

       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 = MOD_GSET( ERRMSG=ERRMSG, ... )
                       IF ERRMSG NE '' THEN ...

 Calls       : ***
	DATATYPE [1], DATATYPE [2], DATATYPE [3], DBCLOSE [1], DBCLOSE [2], DBCLOSE [3]
	DBFIND [1], DBFIND [2], DBFIND [3], DBOPEN [1], DBOPEN [2], DBOPEN [3], DBUPDATE [1]
	DBUPDATE [2], DBUPDATE [3], DBUPDATE [4], TRIM
 CALLED BY:
	mk_gset
 Common      :	None.

 Restrictions:	Only this routine can be used to modify GIS setup definitions
		in the database.  Modifying the database by hand could corrupt
		its integrity.

		The data types and sizes of the modifications must match the
		definitions in the database.  The string lengths must not
		exceed the lengths defined in the database.

		!PRIV must be 2 or greater to use this routine.

 Side effects:	None.

 Category    :	Planning, Databases.

 Prev. Hist. :	None.

 Written     :	William Thompson, GSFC, 8 September 1995

 Modified    :	Version 1, William Thompson, GSFC, 8 September 1995
		Version 2, William Thompson, GSFC, 7 February 1996
			Fixed several bugs.

 Version     :	Version 2, 7 February 1996


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

 Name        :	MOD_LINELIST()

 Purpose     :	Modifies a linelist definition in the database

 Explanation :	This procedure allows one to modify certain parameters in the
		definition of a linelist.

 Use         :	Result = MOD_LINELIST( LL_ID, keywords=... )

		IF NOT MOD_LINELIST( LL_ID, keywords=... ) THEN ...

 Inputs      :	LL_ID = Linelist ID number.

		The above parameters simply allow the relevant entry to be
		found in the database.  The modifications are passed through
		keyword parameters.

 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    :	
       CEN_PIX = Array of central pixel positions for the lines in the
		  linelist.

		The keywords specify the modifications to be made to the
		database.  Currently, only modifications of CEN_PIX is
		supported.

       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 = MOD_LINELIST( ERRMSG=ERRMSG, ... )
                       IF ERRMSG NE '' THEN ...

 Calls       : ***
	DATATYPE [1], DATATYPE [2], DATATYPE [3], DBCLOSE [1], DBCLOSE [2], DBCLOSE [3]
	DBFIND [1], DBFIND [2], DBFIND [3], DBOPEN [1], DBOPEN [2], DBOPEN [3], DBUPDATE [1]
	DBUPDATE [2], DBUPDATE [3], DBUPDATE [4], GET_LINELIST, TRIM
 CALLED BY:
	FIX_LINELIST
 Common      :	None.

 Restrictions:	Only this routine can be used to modify linelist definitions in
		the database.  Modifying the database by hand could corrupt its
		integrity.

		The data types and sizes of the structure elements must match
		the definitions in the database.

		!PRIV must be 2 or greater to use this routine.

 Side effects:	Once a linelist definition has been added to the database, it
		must never be removed.

 Category    :	Planning, Databases.

 Prev. Hist. :	None.

 Written     :	William Thompson, GSFC, 20 November 1995

 Modified    :	Version 1, William Thompson, GSFC, 20 November 1995
               Version 2, Fix typo on parameter checking.  CDP, 27-Nov-95

 Version     :	Version 2, 27 November 1995


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

 Name        :	MOD_MAIN()

 Purpose     :	Modifies a CDS main entry in the as-run database

 Explanation :	This procedure takes a CDS study-level (main) as-run entry,
		compares it against that in the database "main", and makes any
		necessary modifications.  Any parameter can be modified, except
		PROG_NUM.  (Note that COMMENTS can only be changed from "N"(o)
		to "Y"(es).)

 Use         :	Result = MOD_MAIN( OBS )

		IF MOD_MAIN( OBS ) LT 0 THEN ...

 Inputs      :	OBS = This is an anonymous structure containing the following
		      tags:

			PROG_NUM   = Study counter number.  This forms the
				     primary key for this database.
			PROG_ID	   = Program ID, linking one or more studies
				     together
			PROG_IND   = An index, reflecting one's position within
				     a repeated sequence of studies via the
				     N_REPEAT_S mechanism.
			STUDY_ID   = Number defining the study
			STUDYVAR   = Number giving the study variation ID
			OBS_PROG   = Name of the study
			DETECTOR   = Detector, "N", "G", or "B"(oth).
			SCI_OBJ    = Science objective from the daily science
				     meeting
			SCI_SPEC   = Specific science objective from meeting
			CMP_NO	   = Campaign number
			OBJECT	   = Code for object planned to be observed
			OBJ_ID	   = Object identification
			DATE_OBS   = Date/time of beginning of observation,
				     in TAI format
			DATE_END   = Date/time of end of observation, in TAI
				     format
			OBT_TIME   = Onboard date/time of beginning of
				     observation, in TAI format
			OBT_END	   = Onboard date/time of end of observation,
				     in TAI format
			XCEN	   = Center of instrument field-of-view in
				     solar X
			YCEN	   = Center of instrument field-of-view in
				     solar Y
			ANGLE	   = Angle of instrument relative to solar
				     north
			IXWIDTH	   = Width of field-of-view in instrument X
			IYWIDTH	   = Width of field-of-view in instrument Y
			SEQ_FROM   = Start of range of observing sequence
				     numbers.
			SEQ_TO	   = End of range of observing sequence
				     numbers.
			COMMENTS   = Either Y or N

 Opt. Inputs :	None.

 Outputs     :	The result of the function is the number of parameters that
		were modified.  If an error occurs, then -1 is returned
		instead.

 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 = MOD_MAIN( ERRMSG=ERRMSG, ... )
                       IF ERRMSG NE '' THEN ...


 Calls       : ***
	CDS_MESSAGE, DATATYPE [1], DATATYPE [2], DATATYPE [3], DBCLOSE [1], DBCLOSE [2]
	DBCLOSE [3], DBFIND [1], DBFIND [2], DBFIND [3], DBOPEN [1], DBOPEN [2], DBOPEN [3]
	DBUPDATE [1], DBUPDATE [2], DBUPDATE [3], DBUPDATE [4], GET_CAMPAIGN, GET_MAIN
	GET_OBJECT, GET_PROGRAM, GET_STUDY, GET_UTC, LOCK_DATABASE, TRIM, UNLOCK_DATABASE
	UTC2TAI
 CALLED BY:
	FIX_MAIN_TIMES, MOD_CATALOG
 Common      :	None.

 Restrictions:	Only this routine can be used to modify entries in the MAIN
		database.  Modifying the database by hand could corrupt its
		integrity.

		The data types and sizes of the structure elements must match
		the definitions in the database.

		!PRIV must be 2 or greater to use this routine.

 Side effects:	The dates in the structure are rounded off to millisecond
		accuracy.

 Category    :	Planning, Databases.

 Prev. Hist. :	None.

 Written     :	William Thompson, GSFC, 30 June 1995

 Modified    :	Version 1, William Thompson, GSFC, 30 June 1995
		Version 2, William Thompson, GSFC, 21 February 1996
			Modified to be more robust.  It will complain about not
			finding IDs in the databases, but will modify the
			catalog entry anyway.
		Version 3, William Thompson, GSFC, 2 April 1996
			Modified for version 3 of the catalog.
		Version 4, William Thompson, GSFC, 9 April 1996
			Added calls to LOCK_DATABASE, UNLOCK_DATABASE
		Version 5, William Thompson, GSFC, 16 September 1997
			Converted TRIM to STRTRIM in tests (remove trailing
				blanks only).
			Added STRTRIM to test for OBS_PROG.

 Version     :	Version 5, 16 September 1997


MOD_PLAN $SSW/soho/gen/idl/plan/database/mod_plan.pro
[Previous] [Next]
 Project     :	SOHO - CDS

 Name        :	MOD_PLAN()

 Purpose     :	Modifies an entry in the science plan database.

 Explanation :	Modifies an entry in the science plan database.  The old entry
		is removed, and the new entry is added.

 Use         :	Result = MOD_PLAN( OLD_DEF, NEW_DEF )

		IF NOT MOD_PLAN(OLD_DEF,NEW_DEF) THEN ...

 Inputs      :	OLD_DEF	= Previous entry.  This is a structure such as that
			  returned by GET_PLAN, and has the tags:

			SCI_OBJ      = Science objective from the daily science
				       meeting
			SCI_SPEC     = Specific science objective from meeting
			NOTES	     = Further notes about the observation
			START_TIME   = Date/time of beginning of observation,
				       in TAI format
			END_TIME     = Date/time of end of observation, in TAI
				       format
			OBJECT	     = Code for object planned to be observed
			OBJ_ID	     = Object identification
			PROG_ID	     = Program ID, linking one or more studies
				       together
			CMP_NO	     = Campaign number
			XCEN	     = Center(s) of instrument FOV along X
				       axis, given as a character string.
			YCEN	     = Center(s) of instrument FOV along Y
				       axis, given as a character string.
			DISTURBANCES = Description of any disturbances

		NEW_DEF = New entry.  It has the same structure as OLD_DEF.
			  Any field can be changed, including the start and end
			  times.

 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    :	INSTRUMENT = Instrument to modify plan entry for.  Can be
			     passed either as the instrument name or as a
			     single character code value.  Normally, this
			     routine is used for modifying CDS records.
			     However, the use of the INSTRUMENT keyword allows
			     it to be used with the SOC planning tool.

		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 = MOD_PLAN( ERRMSG=ERRMSG, ... )
				IF ERRMSG NE '' THEN ...

 Calls       :	DEL_PLAN, ADD_PLAN
 Common      :	None.

 Restrictions:	The INSTRUMENT keyword must *only* be used with the SOC
		planning tool.  Its use disables some CDS-specific checks.

 Side effects:	None.

 Category    :	Planning, Databases.

 Prev. Hist. :	None.

 Written     :	William Thompson, GSFC, 17 November 1994

 Modified    :	Version 1, William Thompson, GSFC, 17 November 1994
		Version 2, William Thompson, GSFC, 16 May 1995
			Added keyword INSTRUMENT.

 Version     :	Version 2, 16 May 1995


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

 Name        :	MOD_V_RASTER()

 Purpose     :	Modifies a raster variation definition in the database

 Explanation :	This procedure allows one to modify certain parameters in the
		definition of a raster variation.

 Use         :	Result = MOD_V_RASTER( RAS_ID, RAS_VAR, keywords=... )

		IF NOT MOD_V_RASTER( RAS_ID, RAS_VAR, keywords=... ) THEN ...

 Inputs      :	RAS_ID	 = Raster ID number.
		RAS_VAR	 = Raster variation index.

		The above parameters simply allow the relevant entry to be
		found in the database.  The modifications are passed through
		keyword parameters.

 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    :	
       TEL_RATE = Estimated required telemetry rate, Low/Medium/High
	DURATION = Estimated duration of the raster, in seconds.
	USABLE	 = Either "Y" or "N" to signal whether or not the
		   raster is usable.  Normally "Y".

		The keywords specify the modifications to be made to the
		database.

       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 = MOD_V_RASTER( ERRMSG=ERRMSG, ... )
                       IF ERRMSG NE '' THEN ...

 Calls       : ***
	DATATYPE [1], DATATYPE [2], DATATYPE [3], DBCLOSE [1], DBCLOSE [2], DBCLOSE [3]
	DBFIND [1], DBFIND [2], DBFIND [3], DBOPEN [1], DBOPEN [2], DBOPEN [3], DBUPDATE [1]
	DBUPDATE [2], DBUPDATE [3], DBUPDATE [4], TRIM
 CALLED BY:
	FREEZE_RAS_DUR, UPDATE_RAS_DUR
 Common      :	None.

 Restrictions:	Only this routine can be used to modify raster variation
		definitions in the database.  Modifying the database by hand
		could corrupt its integrity.

		The data types and sizes of the structure elements must match
		the definitions in the database.  The string lengths must not
		exceed the lengths defined in the database.

		!PRIV must be 2 or greater to use this routine.

 Side effects:	Once a raster definition has been added to the database, it
		must never be removed.

 Category    :	Planning, Databases.

 Prev. Hist. :	None.

 Written     :	William Thompson, GSFC, 5 April 1994

 Modified    :	Version 1, William Thompson, GSFC, 4 May 1994
               Version 2, Liyun Wang, GSFC/ARC, September 22, 1994
                  Added the keyword ERRMSG.
		Version 3, William Thompson, GSFC, 29 December 1994
			Fixed bug when inputs are bytes.
		Version 4, William Thompson, GSFC, 15 March 1995
			Changed TEL_RATE to character
		Version 5, William Thompson, GSFC, 11 December 1997
			Removed TEL_RATE value check, to allow for additional
			values besides L/M/H.

 Version     :	Version 5, 11 December 1997


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

 Name        :	MOD_V_STUDY()

 Purpose     :	Modifies a study variation definition in the database

 Explanation :	This procedure allows one to modify certain parameters in the
		definition of a study variation.

 Use         :	Result = MOD_V_STUDY( STUDY_ID, STUDYVAR, keywords=... )

		IF NOT MOD_V_STUDY( STUDY_ID, STUDYVAR, keywords=... ) THEN ...

 Inputs      :	STUDY_ID = Study ID number.
		STUDYVAR = Study variation index.

		The above parameters simply allow the relevant entry to be
		found in the database.  The modifications are passed through
		keyword parameters.

 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    :	
       DURATION0 = Fixed part of the study duration, in seconds.
	DURATION1 = Number of seconds/raster for the variable part of
		    the study duration.
	USABLE	  = Either "Y" or "N" to signal whether or not the
		    study is usable.  Normally "Y".
	ZONE_ID	  = Pointing zone ID.

		The above keywords specify the modifications to be made to the
		database.

       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 = MOD_V_STUDY( ERRMSG=ERRMSG, ... )
                       IF ERRMSG NE '' THEN ...

 Calls       : ***
	DATATYPE [1], DATATYPE [2], DATATYPE [3], DBCLOSE [1], DBCLOSE [2], DBCLOSE [3]
	DBFIND [1], DBFIND [2], DBFIND [3], DBOPEN [1], DBOPEN [2], DBOPEN [3], DBUPDATE [1]
	DBUPDATE [2], DBUPDATE [3], DBUPDATE [4], TRIM
 CALLED BY:
	UPDATE_STUDY_DUR
 Common      :	None.

 Restrictions:	Only this routine can be used to modify study variation
		definitions in the database.  Modifying the database by hand
		could corrupt its integrity.

		The data types and sizes of the structure elements must match
		the definitions in the database.  The string lengths must not
		exceed the lengths defined in the database.

		!PRIV must be 2 or greater to use this routine.

 Side effects:	Once a study definition has been added to the database, it
		must never be removed.

 Category    :	Planning, Databases.

 Prev. Hist. :	None.

 Written     :	William Thompson, GSFC, 29 April 1994

 Modified    :	Version 1, William Thompson, GSFC, 3 May 1994
               Version 2, Liyun Wang, GSFC/ARC, September 22, 1994
                  Added the keyword ERRMSG.
		Version 3, William Thompson, GSFC, 29 December 1994
			Fixed bug when inputs are bytes.
		Version 4, William Thompson, GSFC, 12 May 1995
			Modified to split off separate study_title database
		Version 5, William Thompson, GSFC, 8 May 1996
			Added keyword ZONE_ID

 Version     :	Version 5, 8 May 1996


mon_health [1] $SSW/soho/mdi/idl/ops/mon_health.pro
[Previous] [Next]
NAME:
	mon_health
PURPOSE:
	To generate the health monitoring data
 CALLS: ***
	FILE_EXIST [2], LOADCT, MONH_GENERAL, MONH_HK_PLOT, MONH_IMAGES, MONH_IMAGES_RANGE
	MONH_LOI_IMG, MONH_LOI_PLOT, MONH_OUTFIL, PAUSE [1], RD_LOI_MMAD, RFITS [1]
	RFITS [2], RFITS [3], RFITS2 [1], RFITS2 [2], SSW_FILE_DELETE, SXPAR [1], SXPAR [2]
	SXPAR [3], UNIQ [1], UNIQ [2], UNIQ [3], UTPLOT [1], UTPLOT [2], UTPLOT [3]
	UTPLOT [4], UTPLOT [5], UTPLOT [6], anytim2ints [1], anytim2ints [2], bits [1]
	bits [2], disp_sci5k, file_exist [1], file_exist [3], file_list [1], file_list [2]
	fmt_tim [1], fmt_tim [2], int2secarr [1], int2secarr [2], iperr_sea, log_health
	mk_dpc_image, pause [2], plot_pzt_corr, plottime [1], plottime [2]
	quick_hkplot [1], quick_hkplot [2], sxpar2 [1], sxpar2 [2], tv2 [1], tv2 [2]
	ut_time [1], ut_time [2], xyouts2 [1], xyouts2 [2], zbuff2file [1], zbuff2file [2]
HISTORY:
	Written 23-May-96 by M.Morrison
	24-May-96 (MDM) - Added the HK plotting stuff
	28-May-96 (MDM) - Added creation of SCI5K page
			- Added creation of IP Error output
			- Broke out the main program part
	28-May-96 (MDM) - Modified to set the range for the LOI-V and LOI-C plots
			- Changed to not force the yrange for iperr count
	28-May-96 (MDM) - Added plotting the raw PZT voltages
	29-May-96 (MDM) - Modified how the filtering of loi-v and loi-c plots work
	30-May-96 (MDM) - Added edac_summary plot
	 5-Jun-96 (MDM) - Added PZT adjustment plots in arcseconds
			- Added 60 day plots for the HK data
			- Reduced the number of mnemonics plotted for temperature
			  and voltages
			- Added IP error search for the last 30 days
	 7-Jun-96 (MDM) - Added /clean to the quick_hkplot call to drop
			  out the bad data points
	 7-Jun-96 (MDM) - Changed long time span IP error listing to be 20 days
	10-Jun-96 (MDM) - Added plotting the velocity trend stuff
			- Also added simple velocity and continuum plot for long
			  time period
	11-Jun-96 (MDM) - Modified to plot IP error word with the IP error count
			- Modified to plot SEQID and VC flags together.
	11-Jun-96 (MDM) - Made the Z buff routine also make JPEG files
	13-Jun-96 (MDM) - Correction to actually plot new EDAC data
	20-Jun-96 (MDM) - Added plotting current month EDAC 
			- Moved EDAC plot generation to once per day
	 1-Jul-96 (MDM) - Cleaned up the LOI time plot (use RD_LOI_MMAD)
	29-Jul-96 (MDM) - Increased contrast of mag images
	 2-Aug-96 (MDM) - Moved EDAC mission plot generation to bit8
	 7-Aug-96 (MDM) - Changed LOI image per day to 64x64
			- MOved per day and per hour to gen once a day
	27-Aug-96 (MDM) - Modified to have month of EDAC summary be
			  a point per 10 minutes instead of a point per
			  hour
	29-Aug-96 (MDM) - Added /PRIME30 and /clean switches to plot_pzt_corr
	12-Sep-96 (MDM) - Delete the GIF output file first to make sure there
			  are no protection problems
	 7-Oct-96 (MDM) - Modified disp_sci5k calls to keep trying until
			  there is a match (up to 3 tries)
	16-Oct-96 (MDM) - Modified to use PLOT_LOI_MMAD
	28-Oct-96 (MDM) - Added 10 day HK and LOI plots
	29-Oct-96 (MDM) - Moved LOI days image generation to run on diapason
	18-Dec-96 (MDM) - Added "log_health" and a couple more gif 
			  file generations
	 6-Jan-97 (MDM) - Added LOG_FILE to EDAC_SUMMARY call
	 6-Jan-97 (MDM) - Corrected mission long plot (10-Jan-96 versus 10-Jan)
	 4-Feb-97 (MDM) - Modified how EDAC_SUMMARY is called (use times
			  instead of filter on a file name)
	 1-Jul-97 (MDM) - Added writing of limb_figure_now.gif file
	14-Oct-98 (CED) - Fixed some contingencies
	18-Nov-98 (CED) - Added error message generation to monh_outfil
	24-Nov-98 (CED) - Clear the ZBUFFER on monh_outfil,1
	 5-May-99 (RIB) - Modified plot_mtm_shift plots to 5, 50 & 500 days
			  Began mission long plot on 1-Apr-96
	21-May-99 (CED) - Added 2-day and 30-day PZT plots.
	24-Nov-99 (RIB) - Changed /mdisw/data/health to /mdisw/health/loi_images


mon_health [2] $SSW/soho/mdi/idl/ops/mon_health_svm.pro
[Previous] [Next]
NAME:
	mon_health
PURPOSE:
	To generate the health monitoring data
 CALLS: ***
	FILE_EXIST [2], LOADCT, MONH_GENERAL, MONH_HK_PLOT, MONH_IMAGES, MONH_IMAGES_RANGE
	MONH_LOI_IMG, MONH_LOI_PLOT, MONH_OUTFIL, MON_HEALTH_SVM, PAUSE [1], RD_LOI_MMAD
	RFITS [1], RFITS [2], RFITS [3], RFITS2 [1], RFITS2 [2], SSW_FILE_DELETE, SXPAR [1]
	SXPAR [2], SXPAR [3], UNIQ [1], UNIQ [2], UNIQ [3], UTPLOT [1], UTPLOT [2], UTPLOT [3]
	UTPLOT [4], UTPLOT [5], UTPLOT [6], anytim2ints [1], anytim2ints [2], bits [1]
	bits [2], disp_sci5k, file_exist [1], file_exist [3], file_list [1], file_list [2]
	fmt_tim [1], fmt_tim [2], int2secarr [1], int2secarr [2], iperr_sea, log_health
	mk_dpc_image, pause [2], plot_pzt_corr, plottime [1], plottime [2]
	quick_hkplot [1], quick_hkplot [2], sxpar2 [1], sxpar2 [2], tv2 [1], tv2 [2]
	ut_time [1], ut_time [2], xyouts2 [1], xyouts2 [2], zbuff2file [1], zbuff2file [2]
HISTORY:
	Written 23-May-96 by M.Morrison
	24-May-96 (MDM) - Added the HK plotting stuff
	28-May-96 (MDM) - Added creation of SCI5K page
			- Added creation of IP Error output
			- Broke out the main program part
	28-May-96 (MDM) - Modified to set the range for the LOI-V and LOI-C plots
			- Changed to not force the yrange for iperr count
	28-May-96 (MDM) - Added plotting the raw PZT voltages
	29-May-96 (MDM) - Modified how the filtering of loi-v and loi-c plots work
	30-May-96 (MDM) - Added edac_summary plot
	 5-Jun-96 (MDM) - Added PZT adjustment plots in arcseconds
			- Added 60 day plots for the HK data
			- Reduced the number of mnemonics plotted for temperature
			  and voltages
			- Added IP error search for the last 30 days
	 7-Jun-96 (MDM) - Added /clean to the quick_hkplot call to drop
			  out the bad data points
	 7-Jun-96 (MDM) - Changed long time span IP error listing to be 20 days
	10-Jun-96 (MDM) - Added plotting the velocity trend stuff
			- Also added simple velocity and continuum plot for long
			  time period
	11-Jun-96 (MDM) - Modified to plot IP error word with the IP error count
			- Modified to plot SEQID and VC flags together.
	11-Jun-96 (MDM) - Made the Z buff routine also make JPEG files
	13-Jun-96 (MDM) - Correction to actually plot new EDAC data
	20-Jun-96 (MDM) - Added plotting current month EDAC 
			- Moved EDAC plot generation to once per day
	 1-Jul-96 (MDM) - Cleaned up the LOI time plot (use RD_LOI_MMAD)
	29-Jul-96 (MDM) - Increased contrast of mag images
	 2-Aug-96 (MDM) - Moved EDAC mission plot generation to bit8
	 7-Aug-96 (MDM) - Changed LOI image per day to 64x64
			- MOved per day and per hour to gen once a day
	27-Aug-96 (MDM) - Modified to have month of EDAC summary be
			  a point per 10 minutes instead of a point per
			  hour
	29-Aug-96 (MDM) - Added /PRIME30 and /clean switches to plot_pzt_corr
	12-Sep-96 (MDM) - Delete the GIF output file first to make sure there
			  are no protection problems
	 7-Oct-96 (MDM) - Modified disp_sci5k calls to keep trying until
			  there is a match (up to 3 tries)
	16-Oct-96 (MDM) - Modified to use PLOT_LOI_MMAD
	28-Oct-96 (MDM) - Added 10 day HK and LOI plots
	29-Oct-96 (MDM) - Moved LOI days image generation to run on diapason
	18-Dec-96 (MDM) - Added "log_health" and a couple more gif 
			  file generations
	 6-Jan-97 (MDM) - Added LOG_FILE to EDAC_SUMMARY call
	 6-Jan-97 (MDM) - Corrected mission long plot (10-Jan-96 versus 10-Jan)
	 4-Feb-97 (MDM) - Modified how EDAC_SUMMARY is called (use times
			  instead of filter on a file name)
	 1-Jul-97 (MDM) - Added writing of limb_figure_now.gif file
	16-Sep-98 (SDW) - Added writing of hkplot1_quick_svmtemp.gif file
			  as code 5 to support plotting gifs of SVM monitors
			  of MDI temperatures


mon_sci5k $SSW/soho/mdi/idl/egse/mon_sci5k.pro
[Previous] [Next]
 CALLS: ***
	ARR2STR [1], Arr2Str [2], 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]
	anytim2ints [1], anytim2ints [2], delvarx [5], fmt_tim [1], fmt_tim [2]
	gt_time [1], gt_time [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]
 CALLED BY:
	redo_disploi, redo_mon_sci5k
OPTIONAL KEYWORD INPUT:
	simple	- If set, then simply display the first 21 words of the data segment
	fill_cnt- How often to put a message out that there were fill packets
		  in a row.  Default is 100
	disp_loi - If set, then display the LOI images
	nofile	- If set, then don't write an output file
	log	- If set, then save summary information to log directory
	file	- If set, then write an output file
	daily   - If set, then reset the output files daily near midnight.
HISTORY:
	Written Sep-95 by M.Morrison
	15-Sep-95 (MDM) - Renamed from PR_SCI5K_HEADS to MON_SCI5K
			- Added command echo and memory dump modes
			- Added changes from Mathur's off-line version
	18-Sep-95 (MDM) - Added changes from Mathur's off-line version
	21-Sep-95 (DM)  - Modifications to allow the results to be saved
			  to a file in addition to coming to the screen
	28-Sep-95 (MDM) - Modified how the NONE_CNT worked 
			- Added keyword to say how often to mark when
			  no non-fill sci5k packets are seen in a row
	17-Nov-95 (MDM) - Broke the routine into two parts to allow the
			  logic to be used on a readback basis from a
			  sci5k file.
			- Added a flush call for each packet
	16-Jan-96 (MDM) - Changed output file name to be UT, not local
	24-Jan-96 (MDM) - Added /DISP_LOI option
	30-Apr-96 (MDM) - Added option to not write to output file
	23-May-96 (MDM) - Added /LOG option
	 6-Jun-96 (MDM) - Added /FILE option and made /nofile the default
	25-Jun-96 (MDM) - Modified to work with EGSE 5.1
	11-May-99 (CED) - Some roll-logging fixes; /daily flag added.


monitor_center [1] $SSW/soho/mdi/idl/egse/monitor_center.pro
[Previous] [Next]
NAME:
	monitor_center
PURPOSE:
	To use the function POSITION to find and log the center location of the sun
SAMPLE CALLING SEQUENCE:
	monitor_center
	monitor_center,  '/md82/log/sci160k/960205_225108'
	monitor_center, infil, last, outfil='monitor_center.iss_offset'
 CALLS: ***
	CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], STDEV, SXPAR [1], SXPAR [2]
	SXPAR [3], concat_dir [4], data_type [1], data_type [2], file_append [1]
	file_append [2], get_last_tfr, gt_day [1], gt_day [2], list_tfi, mk_dpc_image
	pointing, read_mdi
HISTORY:
	Written Feb-96 by M.Morrison
	 7-Mar-96 (MDM) - Modified to not get last image
	 8-Apr-96 (MDM) - Modified to not do the waiting if using /nowait
			- Modified to write out the Sequence ID in the output file
	 8-Apr-96 (MDM) - Changed default OUTFIL
	 23-May-96 (CED) - Added new DPC
	 13-Sep-96 (MDM) - Added DPC 404b1fc0
			- Allowed image to be cropped
			- Added removing the square-root compression
	18-Sep-96 (MDM) - Changed call to POINTING to use "contrast=.4"
			- Added DPC 46481fc0
			- Modified to use image min for outside of the crop circle
			- Write out the DPC in addition to the SeqID
	8-Nov-96 (CED)  - Added DPCs  46451fc0 & 46051fc0
	27-Mar-97 (JFC) - Changed wait time to 1 minute Per Craig's request


monitor_center [2] $SSW/soho/mdi/idl/egse/monitor_center_old.pro
[Previous] [Next]
NAME:
	monitor_center
PURPOSE:
	To use the function POSITION to find and log the center location of the sun
SAMPLE CALLING SEQUENCE:
	monitor_center
	monitor_center,  '/md82/log/sci160k/960205_225108'
	monitor_center, infil, last, outfil='monitor_center.iss_offset'
HISTORY:
	Written Feb-96 by M.Morrison
	 7-Mar-96 (MDM) - Modified to not get last image
	 8-Apr-96 (MDM) - Modified to not do the waiting if using /nowait
			- Modified to write out the Sequence ID in the output file
	 8-Apr-96 (MDM) - Changed default OUTFIL
	 23-May-96 (CED) - Added new DPC
	 13-Sep-96 (MDM) - Added DPC 404b1fc0
			- Allowed image to be cropped
			- Added removing the square-root compression
	18-Sep-96 (MDM) - Changed call to POINTING to use "contrast=.4"
			- Added DPC 46481fc0
			- Modified to use image min for outside of the crop circle
			- Write out the DPC in addition to the SeqID
	8-Nov-96 (CED)  - Added DPCs  46451fc0 & 46051fc0


MONITOR_EXP $SSW/soho/lasco/idl/expfac/monitor_exp.pro
[Previous] [Next]
 NAME:
	MONITOR_EXP

 PURPOSE:
	This procedure reads all the files for a given date and processes
	the image to give statistical information for exposure monitoring.

 CATEGORY:
	DATA_ANAL

 CALLING SEQUENCE:
	MONITOR_EXP,Date,Lz

 INPUTS:
	Date:	Gives the date to be processed in one of the following formats:
			YYMMDD,	6 character string
			YYYY/MM/DD, 10 character string
			CDS Date Structure
			Long Word of the modified julian date
	Lz:	0 for Quick-look, 1 for Level-0

 OPTIONAL INPUTS:
	Tel:	The telesope designation (string):  c1, c2, c3, c4/eit
		The default is all three LASCO telescopes.

 KEYWORD PARAMETERS:
	None

 OUTPUTS:
	None.

 CALLS: ***
	DATATYPE [1], DATATYPE [2], DATATYPE [3], GET_UTC, MONITOR_EXP_IMG, STR2UTC [1]
	STR2UTC [2], STR2UTC [3], UTC2YYMMDD
 CALLED BY:
	MAKE_ALL_MONEXP
 SIDE EFFECTS:
	Appends the information to files in $MON_EXP with the file name
	telstr_monexp_YYMMDD.dat, where telstr is a string denoting the telscope
	and YYMMDD are 6 digits giving the year, month and day of the data:
		eg.   c1_monexp_961231.dat
		      c2_monexp_961231.dat
		      c3_monexp_961231.dat
	(records) in the .dat file.

 RESTRICTIONS:

 PROCEDURE:

 EXAMPLE:
	To process the exposure monitoring information for 1 Sep 1996 quick
	look data:

		MONITOR_EXP,'960901',0
	or
		MONITOR_EXP,'1996/09/01',0
	or
		MONITOR_EXP,mjd,0
	or
		MONITOR_EXP,mjd.mjd,0

 MODIFICATION HISTORY:
 	Written by:	R.A. Howard, NRL, 10/3/96
	Modified by:	J. S. Morrill, NRL, 4/8/97
	Modified by:	RAH, 5/22/97, error handling for missing directories
	Modified by:	RAH, 5/22/97, split out loop to monitor_exp_img

 @(#)monitor_exp.pro	1.7 06/02/97 :NRL Solar Physics


MONITOR_EXP_IMG $SSW/soho/lasco/idl/expfac/monitor_exp_img.pro
[Previous] [Next]
 NAME:
	MONITOR_EXP_IMG

 PURPOSE:
	This procedure reads the specified file and processes
	the image to give statistical information for exposure monitoring.

 CATEGORY:
	DATA_ANAL

 CALLING SEQUENCE:
	MONITOR_EXP_IMG,Fn

 INPUTS:
	Fn:	String containing the file name to process

 KEYWORD PARAMETERS:
	SAVEDIR		Specify directory to save output to besides $MON_EXP

 OUTPUTS:
	None.

 CALLS: ***
	BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], COMPUTE_STD_VALS, GET_UTC
	LASCO_READFITS [1], LASCO_READFITS [2], STRPAD, UTC2YYMMDD, break_file [4]
 CALLED BY:
	MONITOR_EXP, REDUCE_LEVEL_05
 SIDE EFFECTS:
	Appends the information to files in $MON_EXP with the file name
	telstr_monexp_YYMMDD.dat, where telstr is a string denoting the telscope
	and YYMMDD are 6 digits giving the year, month and day of the data:
		eg.   c1_monexp_961231.dat
		      c2_monexp_961231.dat
		      c3_monexp_961231.dat
	(records) in the .dat file.

 RESTRICTIONS:

 PROCEDURE:

 EXAMPLE:
	To process the exposure monitoring information for the image specified
	by 120050001.fts:

		MONITOR_EXP_IMG,'120050001.fts'

 MODIFICATION HISTORY:
 	Written by:	R.A. Howard, NRL, 10/3/96
	Modified by:	J. S. Morrill, NRL, 4/8/97
	Modified by:	RAH, 5/22/97, error handling for missing directories
	RAH 5/24/97, Extracted from MONITOR_EXP to be able to handle single images
	NBR 1/10/01, Extract filename from input
	NBR 1/15/02, Add SAVEDIR keyword; convert nleb and nccd to type LONGWORD
       K Battams 051021    Add ,/swap_if_little_endian keyword to OPEN calls

 @(#)monitor_exp_img.pro	1.4 10/21/05 :NRL Solar Physics


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

   Purpose: monitor scratch areas; optionally move old files to designated area

   History:
      13-May-1994 (SLF) Written

 CALLS: ***
	CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], FILE_STAT [1], FILE_STAT [2]
	concat_dir [4], dir_since, file_stat [3], get_logenv [1], get_logenv [2], mail [1]
	mail [2], rsh, strsplit
   Restrictions:
      user must have rsh priviledge to software account


MONO_SPEC $SSW/soho/cds/idl/sci/data_handling/soho/cds/mono_spec.pro
[Previous] [Next]
 Project     : SOHO - CDS     
                   
 Name        : MONO_SPEC()
               
 Purpose     : Plots a spectrum chosen graphically by user.
               
 Explanation : A spectrum from the QLDS at a user-supplied location
               is plotted.  The user graphically selects
               the spectrum to be displayed - a sort of click and look
               utility.
               
 Use         : IDL> spec = mono_spec(qlds [,image=image, window=window, $
                                            layout=layout, $
                                            fixedscale=fixedscale])
    
 Inputs      : qlds  - the standard data structure as given by READCDSFITS
              
 Opt. Inputs : None
               
 Outputs     : Function returns the last spectrum chosen
               
 Opt. Outputs: None
               
 Keywords    : WINDOW - if supplied it defines the spectral extraction window
                        from which to plot the spectrum. Note this is not
                        the "general" window ie NIS1/2 but rather the
                        data extraction window number (use GT_WLIMITS to see
                        those available). Defaults to window=0

               IMAGE  - if supplied this can be any 2-d array of the same
                        dimensions as an image that would be created from the
                        QLDS supplied.  Eg it could be a velocity map, so
                        that this routine could be used to inspect the raw
                        spectrum at any place in the map.  If this parameter
                        is not supplied then an image is created from the
                        spectral information in "window".

               LAYOUT - defines the layout for the spectral plots.
                        Must be a 2-element array giving 
                        [plots in X, plots in Y]  (cf !p.multi)

               FIXEDSCALE - fix spectral plot maximum to this value.


 Calls       : ***
	ANYTIM2UTC [1], ANYTIM2UTC [2], Bell, CIRCLE_SYM, DATATYPE [1], DATATYPE [2]
	DATATYPE [3], FMT_VECT, GT_DIMENSION, GT_WINDATA, GT_WLIMITS, LOAD_WAVECAL, PIX2WAVE
	PLOT_IMAGE, SAME_DATA [1], SAME_DATA [2], TRIM
 Common      : None
               
 Restrictions: None
               
 Side effects: None
               
 Category    : Data analysis, spectral
               
 Prev. Hist. : based on POLY_SPEC

 Written     : C D Pike, RAL, 05-Apr-95
               
 Modified    : Hardcoded data extraction for speed.  CDP, 10-Apr-96
               Trap missing or bad data.   CDP, 27-Apr-96
               Add extra info message.     CDP, 17-May-96
               Convert to use of gt_windata.  SVHH, 31-Jul-96
               Cut out missing keyword in plot_image and
               assume it is set via SETFLAG.  CDP, 20-Nov-96
               Cut out sigrange call in image display.  CDP, 4-Feb-97

 Version     : Version 7, 4-Feb-97


Month_id [2] $SSW/soho/mdi/idl_old/gen/utplot/month_id.pro
[Previous] [Next]

 NAME: 	
	Month_id

 PURPOSE: 
	Return the month number (1-12) as a function of the 3 letter
	Month string.

 CATEGORY: 
	Time format manipulation.

 CALLING SEQUENCE:  
	Numbers = Month_id( Months )

 CALLED BY: 
	Utime

 INPUTS:  
	Months, a string array or scalar

 OUTPUTS:
       none explicit, only through commons;

 CALLED BY:
	UTIME [1], UTIME [2], eit_files, eit_mirror, get_selsis
 RESTRICTIONS:
	Months must be given as strings with the first three letters spelled
	explicitly, i.e. ['Jan','Feb',...].  

 PROCEDURE:
	Converts months to uppercase and then 3 byte vectors.  Arithmetic
	operations then return a unique number for each month which is
	used as the index into an array to return the number, 1-12.  A
	returned value of 0 indicates that the string was not a valid
	input.  It is possible for for invalid strings to return a number
	from 1-12.  Written to replace looping "where" statements.  Output
	has the same dimensions as the input, scalar returned as scalar.

 MODIFICATION HISTORY:
	03-May-93, RAS


MONTHNAMES [3] $SSW/soho/mdi/idl_old/gen/jhuapl/monthnames.pro
[Previous] [Next]
 NAME:
       MONTHNAMES
 PURPOSE:
       Returns a string array of month names.
 CATEGORY:
 CALLING SEQUENCE:
       mnam = monthnames()
 INPUTS:
 KEYWORD PARAMETERS:
 OUTPUTS:
       mnam = string array of 13 items:     out
         ['Error','January',...'December']
 CALLED BY:
	DT_TM_MAK [1], DT_TM_MAK [2], DT_TM_MAK [3], SUN [1], SUN [2]
 COMMON BLOCKS:
 NOTES:
 MODIFICATION HISTORY:
       R. Sterner, 18 Sep, 1989

 Copyright (C) 1989, 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.


MORE [2] $SSW/soho/mdi/idl_old/gen/ys_util/more.pro
[Previous] [Next]
 NAME:
       MORE
 PURPOSE:
       Display a text array using the MORE method.
 CATEGORY:
 CALLING SEQUENCE:
       more, txtarr
 INPUTS:
       txtarr = string array to display.  in
 KEYWORD PARAMETERS:
       Keywords:
         /NUMBERS means display line numbers.
         FORMAT=fmt  specify format string (def=A).
           Useful for listing numeric arrays, ex:
           more,a,form='f8.3'  or  more,a,form='3x,f8.3'
 OUTPUTS:
 CALLS: ***
	FILEPATH
 CALLED BY:
	ANNOUNCEMENTS, BATSE_ONTIMES, FLARE_XRAY_MODEL, FLDISPLAY, FLIST, FSPLOT, GD
	GE_WINDOW [1], HSI_SPECTROSCOPY_LIST, LATEST_SFDS_GIF, N511_VS_HVSPEC, OCC_DBASE
	PULSE_SPREAD, QLDISPLAY, RAWDUMP, RESP_CALC response calculation, batse_menu
	doc_library2 [1], doc_library2 [2], eit_getobs, fastdoc [1], fastdoc [2]
	go_lasdisk golaserdisk, go_lasdisk2 golaserdisk, hsi_ui_img, hsi_ui_spec
	mk_sfc [1], mk_sfc [2], mo_init [1], mo_init [2], op_bdr_opt, op_term_score
	plot_eit_mirror, pr_his_index [1], pr_his_index [2], pr_his_index [3]
	pr_logwindows, pr_status [1], pr_status [2], prcols [1], prcols [2], prcols [3]
	pro ratesdump, prstr [1], prstr [2], read_spartan, search_obs, spectral_ratio [1]
	spectral_ratio [2], ssw_conflicts, sswloc, sxt_get_grill [1], sxt_get_grill [2]
	tbb_info [1], tbb_info [2], teambb [1], teambb [2]
 COMMON BLOCKS:
 NOTES:
       Note: when screen is full output will pause
        until user presses SPACE to continue.
 MODIFICATION HISTORY:
       R. Sterner, 26 Feb, 1992
       Jayant Murthy murthy@pha.jhu.edu 31 Oct 92 --- added FORMAT keyword.
       R. Sterner, 29 Apr, 1993 --- changed for loop to long int.
	25-Apr-94 (M.Morrison) - Added "on_ioerror" because it was crashing
	on SGI machine at "FREE_LUN" command (even though it closed properly)

 Copyright (C) 1992, 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.


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

   Purpose: simulate (kindof) more function for strarray

   Input Parameters:
      strarray - string array to display
     
   Ouput Parameters:
      quit - boolean to let caller know if quit was requested

   Optional Keyword Paramters:
      lcount - lincount (size of display page in rows)
      lun    - if set, output is to current open file on lun

   Method: if terminal, display pages, otherwise print to file,lun

 CALLED BY:
	get_doc [1], get_doc [2], get_doc [3], soup_info
   History: slf, 10-Aug-1992
            slf, 15-mar-1993 	; page size default changed


MOTOR_DECODE $SSW/soho/lasco/idl/packets/motor_decode.pro
[Previous] [Next]
 NAME:
	MOTOR_DECODE

 PURPOSE:
	This function returns a structure array containing the decoded motor 
	status.

 CATEGORY:
	PACKETS

 CALLING SEQUENCE:
	Result = MOTOR_DECODE (Hk,Tel)

 INPUTS:
	Hk:	A 2D byte array containg the LASCO HK packets (at least HK #2)
	Tel:	An integer (0..3) giving the telescope number 

 KEYWORD PARAMETERS:
	FOCUS:		Set for the focus motor
	FILTER:		Set for the filter wheel motor
	POLAR:		Set for the polarizer wheel motor
	SECTOR:		Set for the sector wheel motor
	SHUTTER:	Set for the shutter motor
	DOOR:		Set for the door motor
	IOCSX:		Set for the IOCS-X motor
	IOCSY:		Set for the IOCS-Y motor
	LEG1:		Set for the leg #2 motor
	LEG2:		Set for the leg #2 motor
	FPLL:		Set for the FP launch lock motor

 OUTPUTS:
	This function returns an array of structures
		pos
		rate
		adv
		status
		coil
		mode
		dir
		ok
		channel

 CALLS: ***
	TMPOINT, gethkn
 MODIFICATION HISTORY:
 	Written by:	S.E. Paswaters, NRL, 1995

	@(#)motor_decode.pro	1.2 08/17/01 LASCO IDL LIBRARY

	17 Aug 2001	RAH	Corrected some compilation errors


MOVE_REDUCE_LOG $SSW/soho/lasco/idl/reduce/move_reduce_log.pro
[Previous] [Next]
 NAME:
	MOVE_REDUCE_LOG

 PURPOSE:
	This procedure moves the log and db files produced by the pipeline 
	processing from the directory pointed to by $REDUCE_LOG into 
	subdirectories by process date.

 CATEGORY:
	REDUCE

 CALLING SEQUENCE:

	MOVE_REDUCE_LOG

 OPTIONAL INPUTS:
	Dte:	String giving the date to be processed in the format YYMMDD.
		The default is to process all files.

 OUTPUTS:
	None

 SIDE EFFECTS:
	Moves files into a subdirectory

 MODIFICATION HISTORY:
 	Written by:	R.A. Howard, NRL, 25 Apr 1996
	2002.02.01, NBR - Add /SH to SPAWN

	@(#)move_reduce_log.pro	1.2 02/01/02 LASCO IDL LIBRARY


MOVIE [1] $SSW/soho/mdi/idl_old/gen/ys_util/movie.pro
[Previous] [Next]
 NAME:		MOVIE
 PURPOSE:	Show a cyclic sequence of images stored in a 3D array.
 CATEGORY:	Image display
 CALLING SEQUENCE:
	Movie, Images [,Rate]
 INPUTS:
	Images = (n,m,nframes) byte array of image data, consisting of
		nframes images, each of n by m.  This array should be
		stored with the top row first, (order = 1) for maximum 
		efficiency.
 OPTIONAL INPUT PARAMETERS:
	Rate = initial rate, in APPROXIMATE frames per second.  If 
		omitted, the inter-frame delay is set to 0.01 second.
 KEYWORD PARAMETERS:
	Order = image ordering.  Order = 0 for images ordered bottom up,
		(the default) or = 1 for images ordered top down.
 OUTPUTS:
	No explicit outputs.
 CALLED BY:
	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]
 COMMON BLOCKS:
	None.
 SIDE EFFECTS:
	Images are displayed in the lower left corner of the currently
		selected window.
 RESTRICTIONS:
	As SunView has no zoom or pan, we have to write each image to
	the display. Restricting the maximum rate, etc.  Experience has
	shown that you can count on a rate of approximately 10 frames / second
	with 192 by 192 images.  This varies according to the type of
	computer, amount of physical memory, and number of frames.

	The amount of available memory also restricts the maximum amount
	of data	that can be displayed in  a loop.
 PROCEDURE:
	Straightforward.
 MODIFICATION HISTORY:
	DMS, Nov, 1988.
	JRL, Oct 1991, Changed !order default to !order=0


MOVIE_MAKER $SSW/soho/eit/idl/anal/movie_maker.pro
[Previous] [Next]
 NAME:
	MOVIE_MAKER

 PURPOSE:
      This procedure will create EIT movies (IDL Save Sets).
      The user interactively selects a series of FITS images,
      scales them, and saves them.

 CATEGORY:
	WIDGET interface

 CALLING SEQUENCE:
       MOVIE_MAKER

 INPUTS:  None. The default is to list files from todays QKL catalog.
          User can select date and/or LZ catalog as well as other
          selection criteria.

 KEYWORD PARAMETERS: None

 OUTPUTS:
	This routine creates an IDL save set in MOVIE_DIR or current
       directory.

 CALLS: ***
	ANYTIM2UTC [1], ANYTIM2UTC [2], CW_BGROUP, CW_FIELD, DEFROI [1], DEFROI [2]
	EIT_CATRD [1], EIT_CATRD [2], EIT_FXPAR, EIT_IMAGE, EIT_MOVIE, EIT_RESCALE
	FAKE_MISSING_BLOCKS, HEADFITS [1], HEADFITS [2], HEADFITS [3], HELPOUT1, KILLHELP1
	LABEL_IMAGE, LOADCT, MINMAX [1], MINMAX [2], MOVMK_EVENT, MYSAVE_MOVIE, PUT
	READFITS [1], READFITS [2], READFITS [3], REVERSE, SCALEIT, SHOWEIT1, STDEV, SXPAR [1]
	SXPAR [2], SXPAR [3], TIME_STAMP, XIN, XLOADCT [1], XLOADCT [2], XLOADCT [3], XMANAGER
	eit_catrd [3], eit_dark, eit_file2path, eit_lzsort, is_fits [1], is_fits [2]
 COMMON BLOCKS:
  common filestuff1,dirspec,flist,index,list7,save_file
  common parms,dateit,dateend,nxit,nyit,waveit,outfit,halfres,sclit,rbin,qres,
         reproducible_top_value
  common parms2,fresit,fmark,use_qkl,use_lz,new_flist,save_index,numfiles
  common params,date_start,date_end,n_x,n_y,wavel,top_val
  common ratio_par,ratioit,save_195,save_171,s195,s171,mk_ratio,$
         title_start,title_end,stamp_time,mk_diff

 SIDE EFFECTS:
	unsure if common block must be re-initialized after each run.

 RESTRICTIONS:
	Serious memory hog, especially if display movies

 PROCEDURE:
       A widget is displayed. The user uses the various text widgets
       to input selection criterion. The user can display or delete
       any of the selected images. The user selects the scaling procedure,
       setting a minimum value and maximum value, the movie is then
       saved to an IDL save set in movie_dir or current directory.

 MODIFICATION HISTORY:
 	Written by:  J. Newmark 	Date.  Apr. 1996
	Ratio movie change:	D.M. fecit	1996 July 12
       Scaling changes J. Newmark              1996 Jul 17
	Changed RESCALE calls to EIT_RESCALE.	D.M. fecit	1996 Sept. 13
       Significant changes:
       Changed date format in title, added hourglass. J. Newmark 1996 Sept 27
       Add flat fielding, allow inclusion of 1024x1024 images in
         sequences of 512x512. J. Newmark 1996 Sept. 27
       Add Histogram Scaling, changed scaling algorithm to account
         for total exptime, added comments. J. Newmark 1996 Sep 30
       v2.0 1996 October 01
       Cleaned up code, combined scaleit, roiit J. Newmark 1996 Oct 2
       Handle Level-Zero Data - Substantial changes to work with
          files which contain 3D data. J Newmark 1996 Oct 7
       Allow input of image size in blocks if lt 32, list number of
          selected files.  J. Newmark 1996 Oct 08
       v3.0 1996 October 08
       Desensitize SAVE MOVIE button until after images are scaled.
          J. Newmark 1996 December 04
       Change scaling 284 images, too faint for alog10. J. Newmark 1996 Dec 08
       USe fake_missing_blocks,/high for ratio movies J. Newmark 1996 Dec 09
       Change rebin from 512x512 to 2 times. J Newmark 1996 10 Dec
       Add Quarter resolution output. J Newmark 1996 Dec 23
       Remove darks, cal lamps from movies J Newmark 1997 Jan 16
       Add inclusion of 4x4 binned with full field J. Newmark 1997 Jan 28
       Changed/fixed scaling for image totals J. Newmark 1997 Jan 30
       Don't use images with many missing blocks in histogram scale.
                  J. Newmark 1997 Apr 14
       Add ability to make CRUDE difference movies. J. Newmark 1997 Apr 21
	Made default for rebin /SAMPLE.		D.M. fecit	1997 May 23
       Save time stamp in STRARR in save set. J. Newmark 1997 OCt. 30


mpeg_wid $SSW/soho/lasco/idl/display/mpeg_wid.pro
[Previous] [Next]
 MPEG_WID
	Widget interface for make_mpeg.

 Usage:
	mpeg_wid[, group=group]

 Keyword:
	group	long	input	The id of the group leader.

 CALLS: ***
	CW_BGROUP, CW_BSELECTOR, CW_FIELD, MPEG_EVENT, XMANAGER, XREGISTERED, make_mpeg
 CALLED BY:
	WIMG_INFO3, wsave2
 History:
	Original: 24/7/96; SJT


Multi_draw [2] $SSW/soho/mdi/idl_old/gen/ys_sxt_widget/multi_draw.pro
[Previous] [Next]
 NAME: Multi_draw

 PURPOSE:
	create multiple draw widgets for display   
	size of draw areas are variable 

 INPUT PARAMETERS (positional):
	XSIZE - vector of draw widget X dimensions  
	YSIZE - [optional] - if present, vector of draw widget Y
		dimenstion - if absent, all widgets are square
		of size = (Xsize x Xsize)
 OPTIONAL INPUT PARAMETERS (keyword):
	Labels - string array containing label names
	Title  - title for top level widget - ignored if embedded

 OUTPUT:
	Function returns structure of type Multi_Draw
	contains widget IDs of created widgets for control


 CALLS: ***
	FMT_TAG [1], FMT_TAG [2], MAKE_STR [1], MAKE_STR [2], XMENU [1], XMENU [2]
 CALLED BY:
	make_views, xspr [1], xspr [2]
 History: slf, 7/91


multi_gauss_fit $SSW/soho/sumer/idl/atest/multi_gauss_fit.pro
[Previous] [Next]
 NAME : multi_gauss_fit
 ARGUMENT :
    INPUT
         x : independent  variable data 
         y : dependent variable data 
         w : weight of the data
           
       Note that x, y, and w may be either 1 D arrays or
            2 D arrays. 
            1 D : n_spectral elements
            2 D : n_spectral x n_spatial elements.              
 
         par : Gaussian parameters (initial guess)
            1 D : n_param elements
            2 D : n_param x n_spatial elements
         
         y(i,k) = par(0,k) + par(1,k)*(x(i,k)-par(4,k))/par(5,k) 
                   + par(2,k)*((x(i,k)-par(4,k))/par(5, k))^2 +
           exp(alog(10)*par(3,k)-0.5*((x(i,k)-par(4,k))/par(5,k))^2) +
           exp(alog(10)*par(6,k)-0.5*((x(i,k)-par(7,k))/par(8,k))^2)+...
                 i=0,1,.., n_spectral-1
                 k=0,1,.., nspatial-1
          
    OUTPUT :
        result   fitted result
        par : 
        sigma_par : probable error of parameters

  KEYWORD
         free_par :  the indice of free parameters 
            default value = the indice of given parameters
         free_expected : the expected values of free parameters
         free_weight : the inverse of the variances of the difference
                           between the expected and the true free parameters.
        itmax     maximum number of iteration 
         sign   :  an array of signs (1 or -1) with  numer of elements
                  equal to the number of Gaussian components
   MODIFICATION HISTORY
       April 1997      Jongchul Chae
       May 1997       J. Chae  :  added keyword  SIGN
 CALLS:


MULTI_INTERP $SSW/soho/lasco/idl/reduce/fuzzy/hcie_zone.pro
[Previous] [Next]
 NAME:
       MULTI_INTERP

 PURPOSE:
       Performs a multiple 1D interpolation on a 2D image, along a set of
	lines given by a map (for ex. parallel lines)

 CALLING SEQUENCE:
       interp_array = multi_interp (array, map, theta)

 INPUTS:
	array		an array to interpolate; interpolation is performed
			on missing values within the array (i.e. null values)
			thanks to the correct values (non-null values)
	map		an array of the same dimensions, showing the location
			of lines where to performs the multiple interpolations
			The value of each pixel in that map is the number of
			the line it belongs to (0, 1, ..., N-1) for N lines
	theta		the angle perpendicular to the parallel lines

 OUTPUTS:
	The interpolated array
 CALLS:
 CALLED BY
	GRAD, HCIE_ZONE [2], MULTI_SMOOTH, hcie_zone [1]


MULTI_SMOOTH $SSW/soho/lasco/idl/reduce/fuzzy/hcie_zone.pro
[Previous] [Next]
 NAME:
       MULTI_SMOOTH

 PURPOSE:
       Performs a multiple 1D smoothing on a 2D image, along a set of
	lines given by a map (for ex. parallel lines)
	Multi-smooth works exactely in the same way than multi-interp

 CALLING SEQUENCE:
       smooth_array = multi_smooth (array, map, theta)

 INPUTS:
	array		an array to smooth
	map		an array of the same dimensions, showing the location
			of lines where to performs the multiple smoothing
	theta		the angle perpendicular to the parallel lines

 OUTPUTS:
	The smoothed array
 CALLS:
 CALLED BY
	GRAD, HCIE_ZONE [2], MULTI_INTERP, hcie_zone [1]


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

 Name        : MVI2DATA_CUBE

 Purpose     : Convert .mvi movie to data cube and header array

 Use         : IDL> MVI2DATA_CUBE, mvifile, images, headers, /SAVE

 Inputs      : mvifile 	;** name of mvi movie file

 Outputs     : images 		;** 3 dimensional bytarr of images (nx,ny,len)
	        headers		;** array of header structures
** {mvihdr, filename:'',detector:'',time_obs:'',date_obs:'',filter:'',polar:'',sector:'',exptime:0.0}


 Keywords    : /SAVE  ;** saves images, headers, and r,g,b color vectors to IDL saveset (idlsave.dat)

 Category    : Image Conversion.

 Written     : Scott Paswaters, NRL May 1998.
 
 Modified    : 

 Version     : 1.0

       @(#)mvi2data_cube.pro 1.1 10/12/96 LASCO IDL LIBRARY
 CALLS:


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

 Name        : MVI2FRAMES

 Purpose     : Convert .mvi movie to GIF, TIFF, or PICT frames.

 Use         : IDL> MVI2FRAMES, mvifile, type, /LOGO, /TIMES, /VIDEO, FITS_HDR=fits_hdr

 Inputs      : mvifile 	;** name of mvi movie file
             : type: 0 = gif
              	      1 = tiff
              	      2 = pict
              	      3 = fits

 Keywords    : /LOGO 		;** add the LASCO logo in lower right corner
               /TIMES 		;** to have the date & time displayed
               /VIDEO 		;** to reduce to video resolution 640x480 or:
               VIDEO=2 	;** to reduce to video resolution 480x480
                FITS_HDR	;** strarr fits hdr of additional keyword/value pairs 
				;** to include with fits files.
               /NAME 		;** default is to name images date_time.ext, set this
				;** keyword to 1 them after the mvi filename001.ext (etc)
				;** or set it to a string to be named string001.ext (etc)

 CALLS: ***
	BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], CONGRID [1], CONGRID [2]
	CONGRID [3], DATATYPE [1], DATATYPE [2], DATATYPE [3], MKHDR [1], MKHDR [2]
	MVIHDR2STRUCT, READ_MVI, STR2UTC [1], STR2UTC [2], STR2UTC [3], STRUCT2FITSHDR
	TIFF_WRITE, UTC2YYMMDD, WRITEFITS [1], WRITEFITS [2], WRITE_GIF, WRITE_PICT
	break_file [4]
 Side effects: Image files are written to current directory.
               Be sure to have the color table loaded before calling.

 Category    : Image Conversion.

 Written     : Scott Paswaters, NRL Dec. 1997.
 
 Modified    : SEP  05 Feb 1997 - Mods for mvi version 1 format.
             : SEP  14 Mar 1997 - Name images date_time.ext

 Version     : 2.0

       @(#)mvi2frames.pro 1.1 10/12/96 LASCO IDL LIBRARY


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

 Name        :

 Purpose     : Convert frames of .mvi movie file to individual GIFs

 Use         : IDL> MVI2GIF, InputMVIFilename, /TIMEANDCAM

 Inputs      : inputdir

 Optional Inputs: None

 Outputs     : GIF files

 Keywords    :	TIMEANDCAM	Adds time and cam to filename instead of frame number

 Comments    :

 CALLS: ***
	BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], MVIHDR2STRUCT, READ_MVI, WRITE_GIF
	break_file [4]
 CALLED BY:
	MAKE_DIFF_MPEG
 Side effects:

 Category    : Image Display.  Animation.

 Modified:
	June 2000 - B. Podlipnik
	OCt  2000, N Rich - Load color table from MVI file
	020207	Jake	Added /TIMEANDCAM keyword
	030715	jake	added PNG keyword
	030715	jake	removed PNG rotate during write

 Version     :

;;; 11/02/01 @(#)mvi2gif.pro	1.3 - NRL/LASCO IDL LIBRARY

 07/15/03 @(#)mvi2gif.pro	1.8 :LASCO IDL LIBRARY


mvi_summary $SSW/soho/lasco/idl/movie/mvi_summary.pro
[Previous] [Next]
PRO MVI_SUMMARY, filename, ALL=all, MVI_ONLY=mvi_only

 Keywords:
  /ALL		Show info for each frame, default is MVI only

 Modified:
  2003.08.28, nbr - Add /MVI_ONLY
  2003.09.23, nbr - Make MVI_ONLY the default, add /ALL

  09/24/03, @(#)mvi_summary.pro	1.2 : NRL LASCO Library
 CALLS:


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

 PURPOSE:
       This function generates a mvi structure for a movie hdr frame.

 CATEGORY:
       LASCO/SECCHI MOVIE

 CALLING SEQUENCE:
       ahdr = MVIHDR2STRUCT(mvi_hdr) 

 INPUTS:
       Mvihdr:    mvi movie header

 OUTPUTS:
       Ahdr   :  LASCO/EIT = {mvihdr, filename:'',detector:'',time_obs:'',date_obs:'', $
                              filter:'',polar:'',sector:'',exptime:0.0}
                 SECCHI    = {sccmvihdr, filename:'',detector:'',time_obs:'',date_obs:'', $
                              filter:'',polar:'',sector:'',exptime:0.0, $
                              xcen:0.0, ycen:0.0, cdelt1:0.0, rsun:0.0}

 KEYWORD PARAMETERS:

 CALLED BY:
	COMBINE_MVI, MAKE_DIFF_MPEG, MVI2DATA_CUBE, MVI2FRAMES, WRUNMOVIE [2], WRUNMOVIEM
	WRUNMOVIEM3, WRUNMOVIEM_RT, mvi2gif, mvi_summary
 MODIFICATION HISTORY:

       Written by:     

 Modified    :  AEE 29 Sep 2006 - Added check for SECCHI (vs LASCO/EIT)
                                  and extended ahdr for SECCHI.
                AEE 24 Oct 2006 - Defined ahdr separately for LASCO and SECCHI headers. 
 10/24/06 @(#)mvihdr2struct.pro	1.2	: NRL LASCO IDL Library


MVIPLAY $SSW/soho/lasco/idl/movie/mviplay.pro
[Previous] [Next]
 Project     : SOHO - LASCO/EIT
                   
 Name        : MVIPLAY
               
 Purpose     : Widget tool to display animation sequence.
               
 Explanation : This tool allows the user to view a series of images as
		an animation sequence.  The user can control the direction,
		speed, and number of frames with widget controls.
		Click any mouse button inside draw window to bring forward/hide
		control widget.
               
 Use         : IDL> MVIPLAY [, mvifile, /DISK, /FITSCREEN, START=start, SKIP=skip, LENGTH=length]

		Without any inputs, program will prompt user to select an existing .mvi file.
    Example  : IDL> MVIPLAY

               Or you could have one argument, the .mvi file you want to load.
    Example  : IDL> MVIPLAY, 'mymovie.mvi'

		Use keyword /DISK to play movie from disk instead of loading into RAM.
		This option is useful for viewing large movies on systems with a limited
		amount of RAM.  The maximum speed of the movie will depend on the transfer
		speed of the hard drive or CD-ROM and will be slower than loading into RAM.
    Example  : IDL> MVIPLAY, 'mymovie.mvi', /DISK
    
		Use keyword /FITSCREEN to redimension image to 640x480 (does not work with /DISK)
    Example  : IDL> MVIPLAY, 'mymovie.mvi', /FITSCREEN
    
               Use the keyword SKIP to skip every n frames (good for large movies).
    Example  : IDL> MVIPLAY, SKIP=1         ;* to skip every other frame

               Use the keyword START to start reading movie at frame n (good for large movies).
    Example  : IDL> MVIPLAY, START=100              ;* frame 100 becomes 1st frame of movie

               Use the keyword LENGTH to specify number of frames to read in (good for large movies).
    Example  : IDL> MVIPLAY, START=100, LENGTH=60   ;* to load frames 100-159
    
               Use the keyword TIMES to display date & time on frames (if not already there).
    Example  : IDL> MVIPLAY, /TIMES 	   ; does not work with /DISK keyword. 

               Use the keyword SPEED to preset playback speed. Range is 1-100. Default is 90.
    Example  : IDL> MVIPLAY, SPEED=80 

 Calls       : ***
	BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], CONGRID [1], CONGRID [2]
	CONGRID [3], CW_BGROUP, READ_MVI, WRUNMOVIE_BGROUP0, WRUNMOVIE_DRAW0
	WRUNMOVIE_EVENT0, XLOADCT [1], XLOADCT [2], XLOADCT [3], XMANAGER, break_file [4]
 Side effects: None.
               
 Category    : Image Display.  Animation.
               
 Written     : Scott Paswaters, NRL Dec. 2 1996.

 Modified    : SEP  10 Jan 1997 - Added SKIP,START,LENGTH,TIMES keywords.
               SEP  05 Feb 1997 - Mods for mvi version 1 format.
               SEP  04 Apr 1997 - Fixed swapflag for .mvi files written on big_endian workstations
               SEP  22 Sep 1997 - Added current frame scrolling widget.
               SEP  27 Jan 1998 - Added /DISK option for playing from disk.
		NBR   5 May 1999 - Change PICKFILE to DIALOG_PICKFILE
		NBR   5 Apr 2000 - Add /SPEED keyword and change default speed
               NBR   1 Oct 2003 - Update READ_MVI
               RAH  23 Sep 2004 - Mods for mvi version 5 (truecolor)

 Version     : 
	09/23/04 @(#)mviplay.pro	1.9   LASCO IDL LIBRARY

 See Also    : MKMOVIE.PRO


MVIPLAY3 $SSW/soho/lasco/idl/movie/mviplay3.pro
[Previous] [Next]
 Project     : SOHO - LASCO/EIT
                   
 Name        : MVIPLAY3
               
 Purpose     : Widget tool to display animation sequence.
               
 Explanation : This tool allows the user to view a series of images as
		an animation sequence.  The user can control the direction,
		speed, and number of frames with widget controls.
		Click any mouse button inside draw window to bring forward/hide
		control widget.
               
 Use         : IDL> MVIPLAY3 [, mvifile, /DISK, /FITSCREEN, START=start, SKIP=skip, LENGTH=length]

		Without any inputs, program will prompt user to select an existing .mvi file.
 CALLED BY:
	BREAK_FILE [2]
    Example  : IDL> MVIPLAY3

               Or you could have one argument, the .mvi file you want to load.
    Example  : IDL> MVIPLAY3, 'mymovie.mvi'

		Use keyword /DISK to play movie from disk instead of loading into RAM.
		This option is useful for viewing large movies on systems with a limited
		amount of RAM.  The maximum speed of the movie will depend on the transfer
		speed of the hard drive or CD-ROM and will be slower than loading into RAM.
    Example  : IDL> MVIPLAY3, 'mymovie.mvi', /DISK
    
		Use keyword /FITSCREEN to redimension image to 640x480 (does not work with /DISK)
    Example  : IDL> MVIPLAY3, 'mymovie.mvi', /FITSCREEN
    
               Use the keyword SKIP to skip every n frames (good for large movies).
    Example  : IDL> MVIPLAY3, SKIP=1         ;* to skip every other frame

               Use the keyword START to start reading movie at frame n (good for large movies).
    Example  : IDL> MVIPLAY3, START=100              ;* frame 100 becomes 1st frame of movie

               Use the keyword LENGTH to specify number of frames to read in (good for large movies).
    Example  : IDL> MVIPLAY3, START=100, LENGTH=60   ;* to load frames 100-159

               Use the keyword TIMES to display date & time on frames (if not already there).
    Example  : IDL> MVIPLAY3, /TIMES 	   ; does not work with /DISK keyword.

               Use the keyword SPEED to preset playback speed. Range is 1-100. Default is 90.
    Example  : IDL> MVIPLAY3, SPEED=80

 Calls       : ***
	BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], CONGRID [1], CONGRID [2]
	CONGRID [3], CW_BGROUP, READ_MVI3, WRUNMOVIE_BGROUP0, WRUNMOVIE_DRAW0
	WRUNMOVIE_EVENT0, XLOADCT [1], XLOADCT [2], XLOADCT [3], XMANAGER, break_file [4]
 Side effects: None.

 Category    : Image Display.  Animation.

 Written     : Scott Paswaters, NRL Dec. 2 1996.

 Modified    : SEP  10 Jan 1997 - Added SKIP,START,LENGTH,TIMES keywords.
               SEP  05 Feb 1997 - Mods for mvi version 1 format.
               SEP  04 Apr 1997 - Fixed swapflag for .mvi files written on big_endian workstations
               SEP  22 Sep 1997 - Added current frame scrolling widget.
               SEP  27 Jan 1998 - Added /DISK option for playing from disk.
		NBR   5 May 1999 - Change PICKFILE to DIALOG_PICKFILE
		NBR   5 Apr 2000 - Add /SPEED keyword and change default speed
		thejake	011109 - 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     : 2.2

 See Also    : MKMOVIE.PRO
	07/09/03 @(#)mviplay3.pro	1.3   LASCO IDL LIBRARY


MYTV $SSW/soho/mdi/idl/cal/mytv.pro
[Previous] [Next]
 NAME:
	MYTV
 PURPOSE:
	Overlay an image and a contour plot. of a second image
 CATEGORY:
	General graphics.
 CALLING SEQUENCE:
	tvcont, A, overl
 INPUTS:
	A = 2 dimensional array to display.
	overl = 2 dimensional array to contour and overlay.
 KEYWORD PARAMETERS:
	/WINDOW_SCALE = set to scale the window size to the image size,
		otherwise the image size is scaled to the window size.
		Ignored when outputting to devices with scalable pixels.
	/ASPECT = set to retain image's aspect ratio.  Assumes square
		pixels.  If /WINDOW_SCALE is set, the aspect ratio is
		retained.
	/INTERP = set to bi-linear interpolate if image is resampled.
	title, set the image title
 OUTPUTS:
	No explicit outputs.
 COMMON BLOCKS:
	none.
 SIDE EFFECTS:
	The currently selected display is affected.
 RESTRICTIONS:
	None that are obvious.
 PROCEDURE:
	If the device has scalable pixels then the image is written over
	the plot window.
 MODIFICATION HISTORY:
	PNM, May, 1993.		Modified further...
	PNM, Feb, 1990.		Modified image_cont to use second image
	DMS, May, 1988.


MYTVCONT $SSW/soho/mdi/idl/cal/mytvcont.pro
[Previous] [Next]
 NAME:
	MYTVCONT
 PURPOSE:
	Overlay an image and a contour plot. of a second image
 CATEGORY:
	General graphics.
 CALLING SEQUENCE:
	MYtvcont, A, overl
 INPUTS:
	A = 2 dimensional array to display.
	overl = 2 dimensional array to contour and overlay.
 KEYWORD PARAMETERS:
	/WINDOW_SCALE = set to scale the window size to the image size,
		otherwise the image size is scaled to the window size.
		Ignored when outputting to devices with scalable pixels.
	/ASPECT = set to retain image's aspect ratio.  Assumes square
		pixels.  If /WINDOW_SCALE is set, the aspect ratio is
		retained.
	/INTERP = set to bi-linear interpolate if image is resampled.
	title, set the image title
	delta, set the distance between contours
	subtitle, set the subtitle
	
 OUTPUTS:
	No explicit outputs.
 COMMON BLOCKS:
	none.
 SIDE EFFECTS:
	The currently selected display is affected.
 RESTRICTIONS:
	None that are obvious.
 PROCEDURE:
	If the device has scalable pixels then the image is written over
	the plot window.
 MODIFICATION HISTORY:
	PNM, May, 1993.		Modified further...
	PNM, Feb, 1990.		Modified image_cont to use second image
	DMS, May, 1988.