MAKE_CHIANTI_SPEC $SSW/packages/chianti/idl/make_chianti_spec.pro
[Previous] [Next]
 PROJECT     :  CHIANTI

       CHIANTI is an Atomic Database Package for Spectroscopic Diagnostics of
       Astrophysical Plasmas. It is a collaborative project involving the Naval
       Research Laboratory (USA), the University of Florence (Italy), the
       University of Cambridge and the Rutherford Appleton Laboratory (UK). 

                   
 NAME        : MAKE_CHIANTI_SPEC
     		          
 PURPOSE     : 
              To create a CHIANTI synthetic spectrum 
               
 CALLING SEQUENCE:

       IDL> make_chianti_spec, TRANSITIONS,  LAMBDA, SPECTRUM,$ 
                    [BIN_SIZE= ,  ,INSTR_FWHM= , PIXEL=PIXEL, BINSIZE = BINSIZE, $
                    WRANGE= , ALL=ALL, continuum=continuum, $
                    ABUND_NAME= , MIN_ABUND=, photons=photons, effarea=effarea


 CALLED BY:
	GOES_TF, GOES_TF_COEFF
	HW_SYNSPEC__DEFINE defines the class HW_SYNSPEC Objects of this [1]
	HW_SYNSPEC__DEFINE defines the class HW_SYNSPEC Objects of this [2]
	SYNTHETIC, ch_ss, make_goes_chianti_response [1]
	make_goes_chianti_response [2], make_goes_chianti_response [3]
	make_goes_chianti_response [4]
 PROCEDURE : 
 		
     From information contained in the structure TRANSITIONS, constructs 
     a synthetic spectrum

     By default, routine assumes thermal widths for lines.

   PROGRAMMING NOTES

     The line profile is constructed using the IDL gaussint routine. 
     For a wavelength pixel centred at l and with width dl, gaussint 
     is used to integrate the Gaussian up to l-dl/2 and up to l+dl/2. 
     The difference between the two is the intensity in this pixel.


    
 INPUTS      : 
		
               TRANSITIONS, the structure created by ch_synthetic.pro.
               
 OPT. INPUTS : 

     LAMBDA   Array of wavelengths (X-values). If not defined as input, it is
              calculated on the basis of BIN_SIZE, and returned as an output. 
              If defined as input, the routine checks that there are at least
              10 points in the wavelength range defined by WRANGE. If there
              are, the corresponding subset of LAMBDA is returned, otherwise
              the routine exits with an error.

     BIN_SIZE      Bin size  in Angstroms of the spectrum to be created. A linear
              spectrum is assumed. In case an effective area file is used, the
              wavelenghts in the file (that might not be linear) are used to
              create the spectrum, and this bin size looses any meaning.

     WRANGE   Allows a subset of the wavelength range to be turned into 
              a spectrum. When using syn_plot, this speeds up the routine 
              a lot if you've elected to zoom in on a region.

     INSTR_FWHM Instrumental FWHM (Angstroms). 
                In case an effective area file is used, The line intensities
                contributing to each bin are summed, and subsequently convolved
                with a gaussian of full-width-half-maximum FWHM if FWHM is not
                set = 0 . Please make sure that the FWHM value (if not set to
                zero) is larger than  the bin size. 

     ABUND_NAME  A CHIANTI abundance file name can be set. 
                It allows the abundance file given in transitions.abund_name
                (if present)   to be over-ridden. Note that it also used for
                the continuum calculation.

     MIN_ABUND: If set, calculates line intensities only from those elements
                  which  have an abundance greater than min_abund. 
                  Can speed up the calculations. For example, from Allen
                  (1973):

                   abundance (H)  = 1.
                   abundance (He) = 0.085
                   abundance (C)  = 3.3e-4
                   abundance (O)  = 6.6e-4
                   abundance (Si) = 3.3e-5
                   abundance (Fe) = 3.9e-5

     FILE_EFFAREA
                   The Effective Area File (TWO COLUMNS - wavelengths in
                   Angstroms and cm^2 values) If defined, then the spectrum is
                   multiplied with these values.  Any input  LAMBDA value is
                   over-written by the wavelenghts in the file (that might not
                   be linear) and  are used to create the spectrum.
		    Note that this option only works well if a sufficient number
		    of bins is given. The line intensities contributing to each
		    bin are summed, and  subsequently convolved with a gaussian
		    of full-width-half-maximum FWHM, if FWHM is not set = 0.
                   Please note that the convolution might not work if a small
                   number of  bins is defined. 

               
 OUTPUTS     : 
		
		LAMBDA  Array of wavelengths (X-values).
              If not defined as input, it is
              calculated on the basis of BIN_SIZE, and returned as an output. 
              If defined as input, the routine checks that there are at least
              10 points in the wavelength range defined by WRANGE. If there
              are, the corresponding subset of LAMBDA is returned, otherwise
              the routine exits with an error.


               SPECTRUM  A structure containing all the information:

                     LAMBDA      The array of X-values
                     SPECTRUM    The array of Y-values
                     UNITS       The units of LAMBDA, SPECTRUM
                     INSTR_FWHM  The Instrumental FWHM
                     BIN_SIZE    Width of the Bins  (fixed) in angstroms
                     ABUND_NAME  The CHIANTI abundance file name             
                     ABUND       The abundance values
                     MIN_ABUND   The minimum abundance value used                 
                     ABUND_REF   The references
                     CONTINUUM   The values of the continuum (if calculated)
                     
                     FILE_EFFAREA The Effective Area File used (optional)
                     EFFAREA       The array of effective area values
                                 (optional - same size of LAMBDA)

                    .LINES      An array of structures, for all the lines used               
                                to calculate the SPECTRUM. 
                                The tags are the same as those created by 
                                CH_SYNTHETIC, plus
                       .PEAK    The peak intensity of the line in the spectrum
                                (approx. value) 
	
 OPT. OUTPUTS:
		
     BINSIZE  If BIN_SIZE  is not  specified, then the spectrum 
              bin-sizes are computed automatically, and the size of the 
              bin returned in BINSIZE.


 KEYWORDS    : 

     PIXEL    The spectrum is given in /pixel units rather /ang
        (DISABLED)
      
     ALL      Add  lines that originally had negative wavelengths  
               
     PHOTONS  If set=1, the output intensities will be in photons instead of 
                  ergs.

     CONTINUUM
              If set, then the  continuum is added to the 
              spectrum.

     VERBOSE  If set, then print out information while the routine is
              running.

     KEV      If set, then the output spectrum is in units 
              erg cm^-2 s^-1 keV^-1.

 CALLS       : ***
	ADD_TAG [1], ADD_TAG [2], AVERAGE, BIGPICKFILE, CH_GET_FILE, CONCAT_DIR [1]
	CONCAT_DIR [2], CONCAT_DIR [3], DELVARX [1], DELVARX [2], DELVARX [3], DELVARX [4]
	FILE_EXIST [2], GAUSS_PUT, GET_ATOMIC_WEIGHT, READ_ABUND, READ_ASCII, READ_IONEQ
	REM_TAG [1], REM_TAG [2], REVERSE, SPLINE, TAG_EXIST [1], TAG_EXIST [2], TWO_PHOTON
	VALID_NUM [1], VALID_NUM [2], VALID_NUM [3], ch_check_str, concat_dir [4]
	delvarx [5], dir_exist [1], dir_exist [2], file_exist [1], file_exist [3]
	freebound, freefree, hastogram, mid2bound, rebinw
 RESTRICTIONS: The input structure has to be of the type created by ch_synthetic.
               The LAMBDA, EFFAREA values must be ordered in wavelength and the
               LAMBDA values must be in Angstroms.
               
 SIDE EFFECTS: None known yet.
               

 EXAMPLES    : 
		
		make_chianti_spec, output_struct,  LAMBDA, SPECTRUM,$
		 bin_size=0.01, instr=0.1 

 CATEGORY    : 
               spectral synthesis.

 PREV. HIST. :

      
 WRITTEN     : 
           Peter Young , CfA, pyoung@cfa.harvard.edu  1-Sept-2000

 MODIFICATION HISTORY:  
 
               Version 1, PRY 1-Sept-2000

               Version 2, Giulio Del Zanna (GDZ)  10-Oct-2000

               put ALL keyword, removed the FWHM obsolete and
               confusing call. Reorganised various minor things.

               Version 3, PRY 19-Oct-2000
                 Corrected the way continuum is treated for an isothermal 
                 spectrum.

               V. 4, 2-Nov-2001 GDZ. Now MIN_ABUND is effective not only in the
               continuum calculation but also in the line spectrum.
               Modified for the use of logt_isothermal

               V.5, GDZ, added EFFAREA keyword: an ascii file with lambdas and
                                              effective areas can be read
                                              in. The line intensities are
                                              calculated in a different way.
                        Also, changed the output.

               V.6, GDZ, 28-Apr-02 redefined completely the OUTPUT structure. 
                    Major revision (added two_photon verbose).

               V.7, GDZ, 3-May-2002
                    fixed  a bug, when negative angpix values occur.
                     
               V.8, GDZ, 22 May 2002,  changed some tags of the output, and
                    added min_abund in the continuum call.

               V.9, GDZ, 30-May-02 replaced fix() with round() 

               V. 10, 15-July-2002 , GDZ 
                    changed the location of Effective area files.

               V.11 14-Aug-02, GDZ 
                    speeded up the routine, by changing the way the PEAK tag is
                    added to the structure. The drawback is that only the
                    'standard v.4 tags' are allowed, and future additions will
                    have to be dealt properly.
  
               v.12 2-Dec-2002, GDZ. 
                   Fixed a bug:  Removed the plotting of the window with the effective areas.

               v.13 26-Apr-2005, Enrico Landi (EL)
                   Fixed a minor bug: if the lines were more than 32768 (2^15), the main
                                loop crashed.

               v.14 22-Jul-2005 GDZ 
                 -fixed a bug. When the routine was run once without
                 defining the lambdas, and then with the lambdas
                 defined (the units were switched to photons)
                 -fixed a bug. When the effective areas were used,
                 all lines were used to create the spectrum.
                 -added hard-wired switch to photons when using
                 effective area files.

                 -added the keV option

                 -now can output a spectrum only with the continuum
                 (i.e. even if no emission lines are present). 

               v.15, 2-Aug-2005, GDZ 
                 Added a check on the input structure. If it was
                 calculated with ch_synthetic and the keyword
                 /no_sum_int, it cannot be used here.

               v.16, 31-Aug-2005, GDZ
                 Fixed a typo (keyowrd_set).

               v.17, 10-Mar-2006, Peter Young
                 The /keV keyword is now passed to the continuum routines,
                 rather than make_chianti_spec performing the conversion
                 itself.

               v.18, 4-May-2006, Peter Young
                 Changed LAMBDA to be a double array in order to correct a
                 problem with line profiles for very small bin sizes.
                 Problem pointed out by Matthew West (Imperial).

 VERSION     :  18, 4-May-2006, Peter Young

 STILL TO DO: 

              -speed up the routine with the use of arrays.
              -add the option to select only a list of ions, also in the
               continuum procedures.
              -Allow the use of user-defined line profiles.
              -Enable PIXEL keyword


MAKE_DIPOLES $SSW/packages/ztools/magnetic/older/make_dipoles.pro
[Previous] [Next]
 NAME:
	MAKE_DIPOLES
 PURPOSE:
	Given a magnetogram (in either image or heliographic coords)
 	create a collection of dipoles that mimics the surface
	field
 USAGE:
	make_dipoles,p,ploc,in=in,ihdr=ihdr,lstep=lstep,lat=lat,lon=lon
 KEYWORD PARAMETERS:
	in	The image to use
	ihdr	The image header
	lstep	The lat/lon stepsize to use
	lat	A range of latitudes
	lon	A range of longitudes
 OUTPUT PARAMTERS:
	p	The dipoles
	ploc	The locations of the dipoles
 AUTHOR:
	Craig DeForest
 CALLS: ***
	ISVALID [1], ISVALID [2], ISVALID [3], NLM [1], NLM [2], V4, V4XFORM, zcheck_hdr
	zheliographinize, zmatch
 HISTORY:
	Written 17-Dec-1997


make_fake_dark $SSW/packages/lparl/idl/ucon/morrison/do_fit_gcross.pro
[Previous] [Next]
NAME:
	make_fake_dark
PURPOSE:
	Calculate a simple fake dark image from the corners of a FD image
 CALLS: ***
	CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], PAUSE [1], concat_dir [4]
	do_fit_gcross, fit_gcross, pause [2], read_mdi
 CALLED BY:
	do_fit_gcross
HISTORY:
	Written 15-Nov-94 by I. Zayer
CALLING SEQUENCE:
	dark=make_fake_dark(seq_filnam)
INPUT:
	seq_filnam: file name of the datafile (string)
OUTPUT:
	dark: 2-D array of same dimensions as 1st image in seq_filnam
	      which mimics a dark frame (with gradient calculated from
	      the corners of the above image assumed to be a FD frame)


make_grid_sphere $SSW/packages/ztools/images/make_grid_sphere.pro
[Previous] [Next]
 NAME: make_grid_sphere.pro

 PURPOSE: 
 	To generate a grid-covered sphere image to compare with 
	solar images

 USAGE:
	a = make_grid_sphere(date,tohdr=tohdr)

 INPUT PARAMETERS:
	DATE - The date on which to do the reprojection

 KEYWORD INPUT PARAMTERS:
	SOHO - If set, project from SOHO perspective
	EARTH - If set, project from Earth perspective (default)
	SIZE - If set, generate an output image that is this big
	REV - if set, make black-on-white instead of white-on-black
	TITLE - if set, put titles on the output plane
	LABEL - if set, label the major grid intersections
	
	MAJOR - Number of degrees per major latitude/longitude step (default 5)
	MINOR - Number of degrees per minor latitude/longitude step (default 1)

	OVERSAMPLE - Factor by which the image should be oversamped for
		antialiasing (default is 2)

	diameter - If set, override scaling coefficients and set solar diameter
		to this number of pixels.
	B0 - If set, override date specification and set the B angle to this
		value
	PROTRACTOR - If set, draw a protractor around perimeter of the disk.

 HISTORY - Written in early 1999, C. DeForest
 	    Added "protractor" and some documentation, 26-Apr-99, C. DeForest
	    Added in autoscaling, 12-Aug-99, CED
 CALLS:


MAKE_ION_LIST $SSW/packages/chianti/idl/other/low_level/make_ion_list.pro
[Previous] [Next]
 Project     : SOHO - CDS     
                   
 Name        : MAKE_ION_LIST
               
 Purpose     : Reads masters ions list and interprets.
               
 Explanation : Reads the CHIANTI master ion list and returns the list of 
               available elements and ions in suitable arrays.
               
 Use         : IDL> make_ion_list, elements, ions
    
 Inputs      : None
               
 Opt. Inputs : None
               
 Outputs     : elements - string array of all elements available
               ions     - 2-d string array of roman ionization stages
                          available for each element. (N,M) where N is
                          number of elements and M is large enough to 
                          contain all ionization stages (Null if not used)
               
 Opt. Outputs: None
               
 Keywords    : None

 Calls       : ***
	CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], REM_DUP [1], REM_DUP [2]
	REM_DUP [3], STR2ARR [1], STR2ARR [2], concat_dir [4], convertname
 CALLED BY:
	CHIANTI_NE, CHIANTI_TE
 Common      : None
               
 Restrictions: None
               
 Side effects: None
               
 Category    : Spectrum
               
 Prev. Hist. : None

 Written     : C D Pike, RAL, 19-Jan-96
               
 Modified    : V.2 Increased array sizes.   CDP, 25-Jun-96
               V.3. Further increase of the array sizes, and  removed the 'd'
               directories from the masterlist, to be compatible with CHIANTI
                removed call to concat_dir    Giulio Del Zanna 16-Oct-2000. 
               V.4 21-May-2002, GDZ: 
                  generalize directory concatenation to work for Unix, Windows
                  and VMS.
 
 Version     : Version 4 21-May-2002


make_radius_map $SSW/packages/ztools/util/make_radius_map.pro
[Previous] [Next]
 make_radius_map
 Given a fit header, returns a map of pixel radius in solar-radii.
 CALLS:
 CALLED BY
	MAKE_SYNOP


MAKE_SYNOP $SSW/packages/ztools/images/make_synop.pro
[Previous] [Next]
 NAME:
	MAKE_SYNOP
 PURPOSE
	To convert a bunch of individual images into a single synoptic
	chart.
 USAGE
	mreadfits,files,hdrs,cube
	make_synop, in=cube,ihdr=hdrs,out=chart,ohdr=chdr,t0=time

 INPUTS
	None (all are keywords)

 INPUT KEYWORD PARAMETERS:
	IN,IHDR	The input image cube and header list -- a collection of
		individual l.o.s. magnetograms.
	T0	The time to which central meridian should be rotated
	LON,LAT	If specified, longitude/latitude range to be mapped 
		(default is full disk)
	LSTEP	If specified, lat/lon resolution (default is 1 degree).
		If this is a 2-vector, then the latitude step is first
		followed by the longitude step.
	SINE	Boolean flag indicating that a sine-latitude, rather than 
		latitude, plot is desired.  The scale is constant at the
		equator and squished at the pole to preserve magnetic
		flux.  (Overall squish, of course, is a factor of 2/!pi.)
	RIGID	Boolean flag indicating that rigid-body rotation is to be
		used (equator is used, or the latitude specified by RLAT).
	RLAT	Latitude used for RIGID, above.
	CARRINGTON Boolean flag indicating that the Carrington rotation rate
		is to be used.
	HOWARD	Boolean flag indicating to differentially rotate with the 
		rate given by Howard, Harvey, and Forgach (default is 
		to differentially rotate using the Allen et al rate).

 OUTPUT KEYWORD PARAMETERS:
	OUT,OHDR The output image and header list.
	
 METHOD
	Use zheliographinize to make individual maps of the input images.
	Also weight the input images according to distance from disk center,
	with closeness to disk center preferable.
	Then use the weightings to assemble a final synoptic chart that's
	a kind of weighted average of all the data thrown in.

	We weight with 1-r^4, which is just sin^4 theta (if theta is 
	the great circle displacement angle from disk center).  This is 
	probaby as good as anything for most things: We already multiply 
       times cosecant^2 theta (to make up for radial projection angle),
	so this gives a properly rapid falloff in significance.

 HISTORY
	Written 16-Feb-1999, CED
 CALLS:


MATRIX_SOLVER $SSW/packages/chianti/idl/low_level/matrix_solver.pro
[Previous] [Next]
 NAME:

    MATRIX_SOLVER()

 PROJECT

    CHIANTI

 EXPLANATION

    Takes the matrices for the various atomic processes employed in
    CHIANTI and returns the level populations.

 INPUTS

    XNE    Electron density (cm^-3). Scalar.

    AA     2-D array of transition probabilities.

    QQ     2-D array of electron excitation rates.

    PPR    2-D array of proton rates

    AAX    2-D array of photoexcitation/stimulated emission rates.

 OPTIONAL INPUT

    FRAC_CUTOFF The fraction of non-zero elements in the C matrix below
                which the sparse matrix solver is used. The default value
                is zero (i.e., don't use sparse matrix solver).

 OPTIONAL OUTPUT

    C      The 2D matrix containing all rate coefficients.

 OUTPUT

    A 1-D array of level populations, scaled so that the sum of the 
    populations is 1.

 HISTORY

    Ver.1, 1-Jul-2005, Peter Young

    Ver.2, 10-Mar-2006, Peter Young
        commented out warning message about status as the level populations
        are still accurate to < 0.001% when this occurs and so it's not
        neccessary to warn users.
 CALLED BY
	POP_SOLVER


MAX_TEMP $SSW/packages/chianti/idl/other/max_temp.pro
[Previous] [Next]

 PROJECT:  CHIANTI

       CHIANTI is an Atomic Database Package for Spectroscopic Diagnostics of
       Astrophysical Plasmas. It is a collaborative project involving the Naval
       Research Laboratory (USA), the University of Florence (Italy), the
       University of Cambridge and the Rutherford Appleton Laboratory (UK). 

 Name        : MAX_TEMP
               
 Purpose     : Calculates temperature at max ionisation ratio for an ion

 Explanation : 
               
 Use         : IDL> print,max_temp(ion)
    
 Inputs      :  ion - the specific ion in the form eg 'Fe_XII' or 'Fe XII'
               
 Opt. Inputs :  None
               
 Outputs     :  Function returns log of max temperature
               
 Opt. Outputs:  None
               
 Keywords    :  ALL - if set produces a plot of all temperatures

 Calls       : ***
	Bell, CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], OPLOT_STRING, PICKFILE
	READ_IONEQ, STR2ARR [1], STR2ARR [2], TRIM, concat_dir [4]
 Common      :
               
 Restrictions:  None
               
 Side effects:  None
               
 Category    :  Spectral
               
 Prev. Hist. :  None

 Written     :  C D Pike, RAL, 9-Jun-97
               
 Modified    :  V.2 Update element list.  CDP, 18-Jun-99 
                V.3 modified definition of XUVTOP, and allowed selection of
                ionization eq. file. Giulio Del Zanna (DAMTP) 10-Oct-2000

                V.4, Giulio Del Zanna (GDZ)
                   generalized directory concatenation to work for
                   Unix, Windows  and VMS. 

 VERSION     :   4, 21-May-2002, GDZ 


mdi_struct [2] $SSW/packages/ztools/soho/mdi_struct.pro
[Previous] [Next]

 MDI_STRUCT

 Return a structure containing a minimal subset of
 MDI FITS keywords

 Craig DeForest, 28-Apr-1997
 CALLED BY
	mdialign, rd_mdi [1], rd_mdi [2]


mdialign $SSW/packages/ztools/soho/mdialign.pro
[Previous] [Next]

 MDIALIGN - Stick alignment tags in an MDI fits image, if they're
 not already there (or if we force 'em in).  You provide the fits
 header (with DPC) and some ancillary information; MDIALIGN fixes it up
 in-place.

 If no alignment information is specified in the invokation, we
 assume a default set (currently only for full-disk, full-field
 images), or give up

 CALLS: ***
	FUG, ISVALID [1], ISVALID [2], ISVALID [3], dpcstr [1], dpcstr [2], fitshead2struct
	mdi_struct [1], mdi_struct [2], mdi_struct [3], safetag, zcheck_hdr, ztype
 CALLED BY:
	fixinate_mdi
 HISTORY: 
	Written 10/27/96 Craig DeForest
	Modified 13-Mar-98 for CRPIXn-from-(1,1) use.

 INVOKATION
	hdr = mdialign(hdr,[extract=<extract-coords>],[center=<solarcenter>])

 INPUTS
	hdr: fits header in which to insert alignment tags

 KEYWORDS

       extract: A 2-vector specifying the lower left corner (in CCD pixels)
  of the extract region over which the image was taken

	center:  A 2-vector specifying the location of Sun center (in 
  CCD pixels) at the time the image was taken.

	dpc:     If specified, this MDI data product code (in integer
  or string form) overrides the (nonexistent?) one in the input header.

	pedantic: If specified, prevents actually inserting the alignment
  tags if anything fishy is going on...

 NOTES

 The image parameters are calculated from SOI-MDI technical mail 
 message #1562, by Ted Tarbell, which states that 
	* HR Disk Center is (494.8,307.3) in HR pixel coordinates
		(west is positive X, north is positive Y)
	* The HR pixels are 0.6054 arcseconds in size

	* FD Disk Center is centered at (511.5, 511.5)
	* The FD pixels are 1.9779 arcseconds in size


mid2bound $SSW/packages/chianti/idl/low_level/mid2bound.pro
[Previous] [Next]
FUNCTION:	mid2bound
	given mid-bin values, make an intelligent determination of
	the bin boundaries and return said boundaries
	(actually, it's not all that intelligent.  uses spline interpolation)

	given input array of N elements, returns array of N+1 elements.

parameters
	m	[INPUT; required] the mid-bin values from which to
		expand out

keywords
	eps	[INPUT] a small number, default is 1e-6
	verbose	[INPUT] controls chatter
	_extra	[JUNK] here only to prevent crashing the program

history
	vinay kashyap (OctMM)
 CALLED BY
	MAKE_CHIANTI_SPEC


mk_refbar [2] $SSW/packages/lparl/idl/ucon/morrison/mk_refbar.pro
[Previous] [Next]
NAME:
	mk_refbar
PURPOSE:
	To display a reference color bar (to go along side an image)
SAMPLE CALLING SEQUENCE:
	mk_refbar, x0, y0, imin, imax
	mk_refbar, x0, y0, imin, imax, /horiz, fmt=fmt, nlab=lab, /log
	mk_refbar, x0, y0, imin, imax, xsiz=xsiz, ysiz=ysiz
INPUT:
	x0	- The lower left X corner for the color bar
	y0	- The lower left Y corner for the color bar
	imin	- The minimum data value displayed (color=0)
	imax	- The maximum data value displayed (color=!d.table_size-1)
 CALLS: ***
	HIST_EQUAL, tv2 [1], tv2 [2], xyouts2 [1], xyouts2 [2]
 CALLED BY:
	disp_gen [1], disp_gen [2], fig_summary, img_summary [1], img_summary [2]
OPTIONAL KEYWORD INPUT:
	horiz	- If set, make the color bar horizontal
	nlab	- The number of labels (default=16)
	fmt	- The format statement for the label values
	xsiz	- The X size of the color bar (def = 24)
	ysiz	- The Y size of the color bar (def = 256)
	size	- The font size for the labels
	hist	- If set, then the image was displayed with histogram
		  equalization
	average - If set, then display a message about the average
	deviation-If set, then display a message about the deviation
	delta	- If set, then display a message about the range
	log_scale-If set, then the data was log scaled before display
HISTORY:
	Written Feb-94 by M.Morrison
	 5-Apr-94 (MDM) - Added "log_scale" and "log_offset" options
	 3-May-94 (MDM) - Slight changes (make bar go to a value of 255, 
			  not !d.n_colors)
	 2-Apr-96 (MDM) - Added /horizontal option
			- Added /qdebug 
	22-Apr-96 (MDM) - Replaced to scale to !d.n_colors (this time N-1)
	11-Nov-96 (MDM) - Changed !d.n_colors to !d.table_size
			- Added some header info


mkawbin $SSW/packages/lparl/idl/ucon/mathur/mkawbin.pro
[Previous] [Next]
pro wrt_ld_cmd, lun, segment, offset, buf

 Creates a control file to load data contained in "buf".
     Parameters:
        lun     - logical unit on which the output file is open
        segment - DEP Load Address Segment
        offset  - DEP Load Address Offset
        buf     - An array containing data to be loaded


Model_components [1] $SSW/packages/spex/idl/original_spex/model_components.pro
[Previous] [Next]
 PROJECT:
	SDAC
 NAME:
	Model_components

 PURPOSE:
	This procedure provides information to the routines under SPEX
	on the standard model functions available.

 CATEGORY:
	SPEX

 CALLING SEQUENCE:
	norm_par = MODEL_COMPONENTS(F_model [,Number_param, Param_ranges, $
					      Free, Apar])

 CALLED BY: Spex_spec_plot in Spex directory

 CALLS TO:
	none
 INPUTS:
       f_model - string with model name, e.g. 'f_vth_bpow'

 OPTIONAL KEYWORD INPUTS:
	EXIST- If set/unset and function defined, return 1/0.

 OUTPUTS:
       result, norm_par, the index of the normalizing parameters of all
			  the independent components of f_model

 OPTIONAL OUTPUTS:
	number_param - number of adjustable parameters in the model
	param_ranges - (number_param,2) - default lo and hi parameter bounds
	free         - default free/fix, 1 or 0
	apar         - default fitting parameters
 COMMON BLOCKS
	model_components

 CALLS: ***
	FCHECK, F_USE_WIDGET, LINE_COMPLEX, NUCLEAR_TABLE_LOAD, option_changer [1]
	option_changer [2], printx [1], printx [2]
 CALLED BY:
	RUN_CURVEFIT [1], RUN_CURVEFIT [2], SPEX_COMMONS [2], SPEX_COMMONS [4]
	SPEX_PLOT_SAVED [1], SPEX_PLOT_SAVED [2], SPEX_PROC [1], SPEX_PROC [2]
	fcount_rate [1], fcount_rate [2], spec_plot [1], spec_plot [2], spec_plot [3]
	spec_plot [4], spex_spec_plot [1], spex_spec_plot [2], spex_spec_plot [3]
	spex_spec_plot [4]
 RESTRICTIONS:
	if model is not predefined, then 0 is returned.
	All defined models must take energy arguments defined on hi
	and low edges, 2XN.
	They may actually only use the mean energy, but they must accept 2XN.

 PROCEDURE:
	scans a predetermined list to match with model name

 MODIFICATION HISTORY:
	ras, 8-aug-94
	ras, 8-mar-95, added f_multi_spec
	ras, 1-nov-95, added f_3pow- triple power-law
	Version 4, richard.schwartz@gsfc.nasa.gov, 13-aug-1997, added f_con_lin
	Version 5, richard.schwartz@gsfc.nasa.gov, 11-sep-1997,
	revised f_con_lin
	Version 6, richard.schwartz@gsfc.nasa.gov, 28-jan-1998,
       added comments on energy
	arguments to all defined functions and keyword, NOREGISTER.
	Version 7, richard.schwartz@gsfc.nasa.gov, 11-jan-2001, allow
	any number of Gaussians in f_bpow_nline.  f_bpow_nline also modified.
	Added f_pow
       Paul Bilodeau, 23-July-2002, added support for f_vth_thick and
         f_bpow_thick functions.
       Paul Bilodeau, 21-aug-2002, added support for f_bpos_nline.
       Paul Bilodeau, 30-sep-2002, changed defaults for f_nuclear and
         f_bpos_nline to reflect change in definition of parameters.
       Paul Bilodeau, 04-nov-2002, changed f_nuclear code to support
         variable 2.223 MeV line centroid and width.
       Paul Bilodeau, 20-nov-2002, added support for f_vth_thin and f_vth_ion.
       Paul Bilodeau, 10-jan-2003, changed lower limits on 3rd and
         5th (counting from 0) parameters in f_vth_thin and f_vth_thick
         from 1.0 to 1.1.
		Richard.schwartz@gsfc.nasa.gov, 26-jun-2003, added F_VTHC_BPOW_NLINE
		Linhui Sui, 21-Sep-2003, added support for f_mth_pow_bpow and f_mth_exp_bpow
	Pascal Saint-Hilaire, 2003/10/22, updated the widget part, used when a new model's number of variables
		are asked for.
	7-mar-2006, raised default line number to 20 from 8
	30-mar-2006, ras, added the possibility of more tables in f_nuclear, see NTB below
		NTB is the total number of template tables, up from a previous 1.


Model_components [2] $SSW/packages/spex/pre2002/idl/model_components.pro
[Previous] [Next]
 PROJECT:
	SDAC
 NAME:
	Model_components

 PURPOSE:
	This procedure provides information to the routines under SPEX
	on the standard model functions available.

 CATEGORY:
	SPEX

 CALLING SEQUENCE:
	norm_par = MODEL_COMPONENTS(F_model [,Number_param, Param_ranges, $
					      Free, Apar])

 CALLED BY: Spex_spec_plot in Spex directory

 CALLS TO:
	none
 INPUTS:
       f_model - string with model name, e.g. 'f_vth_bpow'

 OPTIONAL KEYWORD INPUTS:
	EXIST- If set/unset and function defined, return 1/0.

 OUTPUTS:
       result, norm_par, the index of the normalizing parameters of all
			  the independent components of f_model

 OPTIONAL OUTPUTS:
	number_param - number of adjustable parameters in the model
	param_ranges - (number_param,2) - default lo and hi parameter bounds
	free         - default free/fix, 1 or 0
	apar         - default fitting parameters
 COMMON BLOCKS
	model_components

 CALLS: ***
	FCHECK, F_USE_WIDGET, LINE_COMPLEX, NUCLEAR_TABLE_LOAD, option_changer [1]
	option_changer [2], printx [1], printx [2]
 CALLED BY:
	RUN_CURVEFIT [1], RUN_CURVEFIT [2], SPEX_COMMONS [2], SPEX_COMMONS [4]
	SPEX_PLOT_SAVED [1], SPEX_PLOT_SAVED [2], SPEX_PROC [1], SPEX_PROC [2]
	fcount_rate [1], fcount_rate [2], spec_plot [1], spec_plot [2], spec_plot [3]
	spec_plot [4], spex_spec_plot [1], spex_spec_plot [2], spex_spec_plot [3]
	spex_spec_plot [4]
 RESTRICTIONS:
	if model is not predefined, then 0 is returned.
	All defined models must take energy arguments defined on hi
	and low edges, 2XN.
	They may actually only use the mean energy, but they must accept 2XN.

 PROCEDURE:
	scans a predetermined list to match with model name

 MODIFICATION HISTORY:
	ras, 8-aug-94
	ras, 8-mar-95, added f_multi_spec
	ras, 1-nov-95, added f_3pow- triple power-law
	Version 4, richard.schwartz@gsfc.nasa.gov, 13-aug-1997, added f_con_lin
	Version 5, richard.schwartz@gsfc.nasa.gov, 11-sep-1997,
	revised f_con_lin
	Version 6, richard.schwartz@gsfc.nasa.gov, 28-jan-1998,
       added comments on energy
	arguments to all defined functions and keyword, NOREGISTER.
	Version 7, richard.schwartz@gsfc.nasa.gov, 11-jan-2001, allow
	any number of Gaussians in f_bpow_nline.  f_bpow_nline also modified.
	Added f_pow
       Paul Bilodeau, 23-July-2002, added support for f_vth_thick and
         f_bpow_thick functions.
       Paul Bilodeau, 21-aug-2002, added support for f_bpos_nline.
       Paul Bilodeau, 30-sep-2002, changed defaults for f_nuclear and
         f_bpos_nline to reflect change in definition of parameters.
       Paul Bilodeau, 04-nov-2002, changed f_nuclear code to support
         variable 2.223 MeV line centroid and width.
       Paul Bilodeau, 20-nov-2002, added support for f_vth_thin and f_vth_ion.
       Paul Bilodeau, 10-jan-2003, changed lower limits on 3rd and
         5th (counting from 0) parameters in f_vth_thin and f_vth_thick
         from 1.0 to 1.1.
		Richard.schwartz@gsfc.nasa.gov, 26-jun-2003, added F_VTHC_BPOW_NLINE
		Linhui Sui, 21-Sep-2003, added support for f_mth_pow_bpow and f_mth_exp_bpow
	Pascal Saint-Hilaire, 2003/10/22, updated the widget part, used when a new model's number of variables
		are asked for. 
  


Modify_Merge_list [1] $SSW/packages/spex/idl/original_spex/modify_merge_list.pro
[Previous] [Next]
 NAME:
	Modify_Merge_list

 PURPOSE:
	GUI interface to modify merge_list structure.

 CATEGORY:
	SPEX, Widgets

 CALLING SEQUENCE:
	MODIFY_MERGE_LIST, Merge_list

 INPUTS:
	Merge_list: SPEX Merge_list structure with database info.

 OPTIONAL INPUTS:
	
 KEYWORD PARAMETERS:

 OUTPUTS:
	Returns the modified Merge_list structure

 CALLS: ***
	ARR2STR [1], Arr2Str [2], CHECKVAR [1], CW_PDMENU, DATATYPE [1], DATATYPE [2]
	DATATYPE [3], EXIST, GET_IJ, MODIFY_MERGE_LIST_MAIN_EVENT
	MODIFY_MERGE_LIST_PDMENU_EVENT, STR2ARR [1], STR2ARR [2], XALIVE, XMANAGER
	XMATRIX, checkvar [2]
 CALLED BY:
	spex_merge_control [1], spex_merge_control [2]
 COMMON BLOCKS:

 SIDE EFFECTS:

 RESTRICTIONS:

 PROCEDURE:


 MODIFICATION HISTORY:
 	Written by:	ras, 17-oct-1995


Modify_Merge_list [2] $SSW/packages/spex/pre2002/idl/modify_merge_list.pro
[Previous] [Next]
 NAME:
	Modify_Merge_list

 PURPOSE:
	GUI interface to modify merge_list structure.

 CATEGORY:
	SPEX, Widgets

 CALLING SEQUENCE:
	MODIFY_MERGE_LIST, Merge_list

 INPUTS:
	Merge_list: SPEX Merge_list structure with database info.

 OPTIONAL INPUTS:
	
 KEYWORD PARAMETERS:

 OUTPUTS:
	Returns the modified Merge_list structure

 CALLS: ***
	ARR2STR [1], Arr2Str [2], CHECKVAR [1], CW_PDMENU, DATATYPE [1], DATATYPE [2]
	DATATYPE [3], EXIST, GET_IJ, MODIFY_MERGE_LIST_MAIN_EVENT
	MODIFY_MERGE_LIST_PDMENU_EVENT, STR2ARR [1], STR2ARR [2], XALIVE, XMANAGER
	XMATRIX, checkvar [2]
 CALLED BY:
	spex_merge_control [1], spex_merge_control [2]
 COMMON BLOCKS:

 SIDE EFFECTS:

 RESTRICTIONS:

 PROCEDURE:


 MODIFICATION HISTORY:
 	Written by:	ras, 17-oct-1995


MREADGIF $SSW/packages/ztools/util/mreadgif.pro
[Previous] [Next]
 NAME:
	MREADGIF
 PURPOSE
	To read in a lot of gif images at once, by analogy
	to Freeland's MREADFITS.
 USAGE
	Just like read_gif, except you can specify a list of
	files to read in.
 METHOD
	We assume you don't want to read in a whole bunch of unlike
	gifs, so we use the quick-and-dirty assumption that all the
	gifs are the same size as the first one.  We also assume they
	all use the same color table (if any).
	The first gif gets read, then an array is allocated and the remainder
	are stuffed into it with read_gif.  The only reason that this isn't
	completely trivial is the stoopid way IDL handles parameter passing:
	you can't say read_gif,f(i),out(*,*,i) because out(*,*,i) gets passed
	by VALUE then and not by REFERENCE.  
 AUTHOR
	Craig DeForest 1-Dec-1998
 CALLS: