Документ взят из кэша поисковой машины. Адрес оригинального документа : http://hea-www.harvard.edu/PINTofALE/doc/PoA.html
Дата изменения: Unknown
Дата индексирования: Sun Apr 10 05:34:45 2016
Кодировка:

Поисковые слова: annular solar eclipse
Package for Interactive Analysis of Line Emission

Package for Interactive Analysis of Line Emission

This page was created by the IDL library routine mk_html_help. For more information on this routine, refer to the IDL Online Help Navigator or type:

     ? mk_html_help

at the IDL command line prompt.

Last modified: Sun Nov 22 21:54:08 2015.


List of Routines


Routine Descriptions

ADDRSP

[Next Routine] [List of Routines]
function	addrsp
	combine two response matrices to make a composite RSP and
	return a structure in the same format as RD_OGIP_RMF()

	steps through each row of an RMF and tacks on the array
	from a 2nd RMF, updating the N_GRP, N_CHAN, F_CHAN elements
	as appropriate.

syntax
	rsp=addrsp(rm1,rm2,ea1=ea1,ea2=ea2,eps=eps,verbose=verbose)

parameters
	rm1	[INPUT; required] response matrix structure as
		read in by RD_OGIP_RMF
	rm2	[INPUT; required] response matrix structure to
		be added to RM1
		* RM1 and RM2 are expected to have the following fields:
	        NNRG,ELO,EHI,NCHAN,EMN,EMX,N_GRP,F_CHAN,N_CHAN,MATRIX,FIRSTCHAN

keywords
	ea1	[INPUT] if set to a scalar or size matches RM1.ELO,
		then multiplies RM1 by EA1 prior to addition
	ea2	[INPUT] as EA1, but for RM2
		* default for EA1 and EA2 is 1.0
	eps	[INPUT] a small number, below which to set everything
		to zero
		* default is 1e-6
	morecol	[INPUT] designed as a buffer so that a matrix won't
		overflow the bounds automatically set.  by default,
		the new matrix is defined at an early stage to be
		max(RM1.N_CHAN)+max(RM2.N_CHAN)+100+MORECOL.
		* note that MORECOL can even be negative.
		* use wisely.
	verbose	[INPUT] controls chatter
	ea3	[JUNK] here just to prevent user error
	ea4	[JUNK] here just to prevent user error
	ea5	[JUNK] here just to prevent user error
	ea6	[JUNK] here just to prevent user error
		* if EA3, EA4, EA5, or EA6 are set, the program will
		  complain and quit.  this is done to avoid the obvious
		  user error of trying to specify EA3=EA3, etc. if
		  adding a third RMF/ARF to a preexisting one.

	_extra	[JUNK] here only to avoid crashing the program

subroutines
	KILROY
	OGIPZIP

history
	vinay kashyap (Nov2001)
	bug correction re max possible matrix elements when NGROUP>>1;
	  added dummy keywords EA3, EA4, EA5, EA6 and extra checks
	  against tricky inputs (VK; Aug02)
	bug correction: wasn't handling N_GRP=1 (VK; Aug04)

(See pro/util/addrsp.pro)


ADJUSTIE

[Previous Routine] [Next Routine] [List of Routines]
procedure	adjustie
	adjust the parameters to account for any ties among them, and
	return the corrected set

syntax
	adjustie,a,ties=ties,vname=vname

parameters
	a	[I/O; required] parameters to be updated

keywords
	ties	[INPUT] string array describing how a parameter is tied to
		other parameters.
		* must be a mathematical expression of the form
		  "a0 = a1/10.", "a2=a3+a4", "a5 = a5 < 0", etc.
	vname	[INPUT; default='a'] in case TIES contains variable names
		such as "p0=p2^2", etc, then set VNAME='p'

		NOTE:  the following keywords are generated in situ the first
		time the function is called.  on subsequent calls they are
		used instead of EXECUTEing TIES in order to improve speed.

		NOTE2: actually, they are not implemented yet.  someday.

	ifit	[I/O] integer array describing which parameters are frozen
		(0's) and which are not (1's).  updated upon exit to include
		information given in TIES
	itie	[I/O] integer array showing which parameters are tied.
	tieto	[I/O] linked list showing which parameters each of the
		ITIE are tied to which parameter
	tieops	[I/O] as TIETO, but containing information on which operator
		is used, e.g., "+", "-", "*", "/", "<", ">", etc.
	_extra	[JUNK] here only to prevent crashing the program

history
	vinay kashyap (Oct98)
	converted to IDL5 (VK; OctMM)

(See pro/fitting/adjustie.pro)


ALALOESS

[Previous Routine] [Next Routine] [List of Routines]
function	alaloess
	computes a loess/lowess type smoothed function for the
	given set of input points by fitting polynomials over
	the neighborhood of each point and using the local value
	of the polynomial fit as the smoothed curve

	another one in a hoary line of PINTofALE smoothing routines,
	joining SMOOTHIE, NOISMOOTH, VARSMOOTH, VOORSMOOTH, REGROUP,
	SPLAC, CONV_RMF, SCRMF, UNKINK, LINEREM, HAARLINE, etc.

syntax
	yl=alaloess(yy,xx,hwidth=hwidth,ysig=ysig,ndeg=ndeg,$
	yerr=yerr,verbose=vv)

parameters
	yy	[INPUT; required] the points that need to be smoothed
	xx	[INPUT] the abscissae for which YY are defined
		* if size eq size of YY or +1, taken to be the midpoints
		  or the grid
		* if insensible, taken to be array indices, LINDGEN(N(YY))

keywords
	hwidth	[INPUT] half range over which local polynomial fits are
		to be performed
		* if XX are array indices, HWIDTH is forced to be >0
		* if XX is a predefined grid, the default value is the
		  minimum of delta(XX)
	ysig	[INPUT] error on YY
		* if size matches that of YY, then maps 1-to-1
		* if scalar, taken to be
		    <0 : absolute error
		    >0 and <1 : fractional error
		    >1 : percentage error
		    =0 : ignored in call to POLY_FIT()
		  on YY
		* otherwise, assumed to be sqrt(abs(YY)+0.75)+1
	ndeg	[INPUT] degree of the polynomial to be fit
		* default is 3
	yerr	[OUTPUT] 1-sigma error at the smooth location from
		each fit.
		* WARNING: this is to be taken only as an illustrative
		  number and not used for anything quantitative, because
		  the errors in adjacent bins are not independent
	verbose	[INPUT] controls chatter
	_extra	[JUNK] here only to prevent crashing the program

example
	.run alaloess	;(requires PEASECOLR)

these are all the smoothing tools in PINTofALE
	ALALOESS() makes a loess curve
	CLTSMOOTH() removes -ves from background subtracted spectra or light curves
	CONV_RMF convolves with specified RMF
	HAARTRAN() smoothes by filtering on Haar wavelet coefficients
	LINEREM() removes lines from spectrum by iterative S/N filtering
	NOISMOOTH() does boxcar accumulation a la Ebeling's asmooth
	REGROUP() accumulates from one end
	SCRMF does fast convolution using optimized RMF
	SMOOTHIE does peak-descent accumulation to build up S/N
	SPLAC computes a segmented piecewise linear approximations
	UNKINK() removes sharp kinks from a curve
	VARSMOOTH() does local smoothing at specified scales
	VOORSMOOTH() does fast local smoothing at specified scales

history
	vinay kashyap (MarMMX)
	some bug fixes, and hardening to poly_fit failures -- where it fails
	  now simply keep old value (VK; MayMMX)
	updated to be more robust to NaNs (VK; AprMMV)

(See pro/util/alaloess.pro)


APEDANCE

[Previous Routine] [Next Routine] [List of Routines]
procedure	apedance
	remove or correct the abundance dependance of APED emissivities

	APED emissivities as stored on disk include both ion balance
	(Mazzotta et al.) and abundances (Anders & Grevesse).  This
	can be inconvenient in some PINTofALE tasks since other line
	emissivity databases in PINTofALE do not include either factor.
	It is not possible to remove the effects of the included ion
	balance, but removing the abundance dependance is simply a
	matter of dividing the emissivity of each line by the abundance
	appropriate to the element producing that line.

syntax
	apedance,line,Z,abund=abund,apabref=apabref,verbose=verbose

parameters
	line	[I/O] APED line emissivities
		* emissivity structure out of RD_LINE()
		* if 2D array, assumed to be an array of size (T,Wvl)
	Z	[INPUT] atomic numbers
		* required if LINE is an array and not a structure
		* must match size of 2nd dimension in LINE

keywords
	abund	[INPUT] if given, updates LINE by multiplying by
		the ratio of ABUND/(Anders & Grevesse)
		* the default is to just divide by Anders & Grevesse
		  abundances, effectively removing the abundance
		  dependance from the emissivities
	apabref	[INPUT] if set to a reference other than Anders & Grevesse,
		it is assumed that the input LINE emissivities need to be
		corrected according to the specified abundances.
		* WARNING: do not set this unless you know exactly
		 what you are doing
	verbose	[INPUT] controls chatter
	_extra	[JUNK] here only to avoid crashing the program

warning
	no checks are made to verify that the emissivities have
	have already had the abundances taken out, or that the
	abundances are corrected according to some other baseline.
	USE CAREFULLY!

history
	vinay kashyap (Apr2004)

(See pro/apedance.pro)


ARITHTOGRAM

[Previous Routine] [Next Routine] [List of Routines]
function	arithtogram
	return the result of an arithmetical operation on the
	frequency distributions of two lists

syntax
	hx=arithtogram(x1,x2,xout,operator,/plus,/minus,/divide,$
	w1=w1,w2=w2,nbin=nbin,xmin=xmin,xmax=xmax,/nonorm)

parameters
	x1	[INPUT; required] list of numbers whose frequency
		distribution must be multiplied with that of X2
	x2	[INPUT; required] list of numbers whose frequency
		distribution must be multiplied with that of X1
		* it is assumed that X1 and X2 both have the same units
		  because otherwise this kind of multiplication makes
		  no sense
	xout	[OUTPUT; required] the list of numbers at which the
		output is tabulated
		* by default, this is the sorted unique set of [X1,X2]
		* if NBIN is set, generates a logarithmic or linear
		  grid of that size
	oper	[INPUT] must be one of '+', '-', '/', '*':
		the arithmetical operation to carry out on the
		frequency distributions of X1 and X2, i.e.,
			result = X1 OPER X2
		* if not given, assumed to be '*', unless one of
		  keywords PLUS, MINUS, or DIVIDE are set 

keywords
	plus	[INPUT] if set, OPER is assumed to be '+'
	minus	[INPUT] if set, OPER is assumed to be '-'
	divide	[INPUT] if set, OPER is assumed to be '/'
		* DIVIDE takes precedence over MINUS takes precedence
		  over PLUS
	w1	[INPUT] optional weight to be applied to histogram(X1)
	w2	[INPUT] optional weight to be applied to histogram(X2)
		* if not given, W1 and W2 are assumed to be 1
	nbin	[INPUT] number of bins in the output
		* if not set, will be the sorted unique set of [X1,X2]
		* if -ve, will produce logarithmic gridding
	xmin	[INPUT] minimum value in the output grid
		* by default, uses min(X1)>min(X2)
	xmax	[INPUT] maximum value in the output grid
		* by default, uses max(X1)<max(X2)
	nonorm	[INPUT] if set, does not make a correction for the
		width of the bins in XOUT.
	_extra	[JUNK] here only to prevent crashing the program

description
	this program does not create histograms as intermediate products
	but rather produces an operation at the best available data
	resolution.  this is of great use in Monte Carlo calculations
	or in creating probability distributions in MCMC.  the algorithm
	is straightforward: build up a cdf for each list, and interpolate
	onto a common grid, and multiply, divide, add, or subtract the
	d(cdf)'s, suitably normalized for the bin widths and number of
	elements.

example
	x1=randomn(seed,10000L) & x2=randomn(seed,10000L)+2.
	xmin=-2. & xmax=3. & nbin=101L
	hh=arithtogram(x1,x2,xout,'*',xmin=xmin,xmax=xmax,nbin=nbin,/nonorm)
	hp=arithtogram(x1,x2,xout,'+',xmin=xmin,xmax=xmax,nbin=nbin,/nonorm)
	hd=arithtogram(x1,x2,xout,'/',xmin=xmin,xmax=xmax,nbin=nbin,/nonorm)
	hm=arithtogram(x1,x2,xout,'-',xmin=xmin,xmax=xmax,nbin=nbin,/nonorm)
	h1=histogram(x1,min=xmin,max=xmax,binsize=median(xout[1:*]-xout))
	h2=histogram(x2,min=xmin,max=xmax,binsize=median(xout[1:*]-xout))
	plot,xout,hh,psym=10 & oplot,xout,h1,col=2 & oplot,xout,h2,col=3
		oplot,xout,h1*h2,psym=10,col=4
	plot,xout,hp,psym=10 & oplot,xout,h1,col=2 & oplot,xout,h2,col=3
		oplot,xout,h1+h2,psym=10,col=4
	plot,xout,hd,psym=10 & oplot,xout,h1,col=2 & oplot,xout,h2,col=3
		oplot,xout,float(h1)/float(h2),psym=10,col=4
	plot,xout,hm,psym=10 & oplot,xout,h1,col=2 & oplot,xout,h2,col=3
		oplot,xout,h1-h2,psym=10,col=4

history
	vinay kashyap (Jun2005)

(See pro/util/arithtogram.pro)


ARRAYEQ

[Previous Routine] [Next Routine] [List of Routines]
function	arrayeq
	checks whether two input arrays are equal, and returns
	1: if they are identical
	0: if at least one element differs past tolerance
	-1: if sizes differ, but one array is a simple subset of the other

syntax
	AeqB=arrayeq(A,B,tol=tol)

parameters
	A	[INPUT; required] first array
	B	[INPUT; required] second array
		* arrays must be of some >numerical< type

keywords
	tol	[INPUT; default: 1e-4] tolerance within which two numbers
		are said to be identical
	_extra	[JUNK] here only to avoid crashing the program

history
	vinay kashyap (Nov98)
	converted to IDL5 notation (VK; OctMM)

(See pro/util/arrayeq.pro)


B11001001

[Previous Routine] [Next Routine] [List of Routines]
function	b11001001
	returns the 0s and 1s of a byte variable

syntax
	d=b11001001(b,/str,/otto)

parameters
	b	[INPUT; required] scalar or array of bytes

keywords
	str	[INPUT] if set, returns the 0s and 1s in a string
		* overrides OTTO
	otto	[INPUT] if set, returns an 8xN(B) byte array as output

history
	vinay kashyap (Jul97)

(See pro/util/b11001001.pro)


BAMABS

[Previous Routine] [Next Routine] [List of Routines]
function	bamabs
	return photoelectric absorption cross-sections in energy range
	30 eV - 10 keV using the polynomial fit coefficients determined
	by Monika Balucinska-Church and Dan McCammon (Balucinska-Church,
	M.\ and McCammon, D.\ 1992, ApJ 400, 699).  This is an update
	to Morrison & McCammon 1983.

syntax
	sigabs=bamabs(w,abund=abund,/ikeV,/Fano,verbose=v)

parameters
	w	[INPUT; required] photon energy values at which to compute
		the absorption
		* default units are [Ang], unless IKEV is set, when they are
		  assumed to be [keV]

keywords
	abund	[INPUT] abundances relative to H=1
		* default is to use Anders & Grevesse 1982
	ikeV	[INPUT] if set, assumes that W are in units of keV
	Fano	[INPUT] if set, the 4 strongest auto-ionizing resonances
		of He I are included; numbers come from Oza (1986, Phys
		Rev A, 33, 824), and Fernley et al. (1987, J.Phys B 20, 6457).
	noHeH	[INPUT] if set to any number other than 1 or 2, excludes
		H and He from the cross-sections
		* if set to 1, only excludes H
		* if set to 2, only excludes He
	verbose	[INPUT] controls chatter
	_extra	[JUNK] here only to avoid crashing the program

subroutines
	GETABUND
	INICON

restrictions
	works only in energy range 30 eV - 10 keV
	be warned that the edges are idealized and thus unrealistic
	  for high resolution spectra because they do not include
	  any resonance structure

history
	vinay kashyap (OctMM; based on TOTLXS.FOR and XSCTNS.FOR of
	  Balucinska-Church & McCammon, obtained from ADC catalog VI/62A,
	  ftp://adc.gsfc.nasa.gov/pub/adc/archives/catalogs/6/6062A/ )
	bug corrections (Brian Kern, 5Dec2001): Ne cross-section was
	  missing "^3"; Fano calc had EPSj[j] (VK; Dec2001)
	force calculations only in valid energy range; added keyword
	  NOHEH (VK; Jun03)
	bug correction: "exclude=0" means "include" (VK; Jul03)
	bug correction: lambda selection for He (Andy Ptak; VK Jun05)
	edge lambda correction: O, N, C changed acc. to numbers in
	  Atomic Data Booklet (2nd Edition), Thompson, A., et al., 2001,
	  LBL/PUB-490 Rev. 2 (Jeremy Drake; VK Sep2006)

(See pro/bamabs.pro)


BEHR_HUG

[Previous Routine] [Next Routine] [List of Routines]
function	BEHR_hug
	IDL wrapper to Bayesian Estimate of Hardness Ratios (BEHR)
	returns a structure containing the relevant outputs neatly
	summarized into fields for IDL consumption

	references:

	"Bayesian Estimation of Hardness Ratios: Modeling and Computations",
	  Park, T., Kashyap, V.L., Siemiginowska, A., van Dyk, D., Zezas, A.,
	  Heinke, C., and Wargelin, B., 2006, ApJ, 652, 610

	"BEHR: Bayesian Estimation of Hardness Ratios", Park, T., Kashyap, V.,
	  Zezas, A., Siemiginowska, A., van Dyk, D., Connors, A., and Heinke, C.,
	  2005, at Six Years of Science with Chandra Symposium, Nov 2-5, 2005, #5.6

	"Computing Hardness Ratios with Poissonian Errors",
	  van Dyk, D.A., Park, T., Kashyap, V.L., \& Zezas, A.,
	  2004, AAS-HEAD #8, 16.27
	  http://www.aas.org/publications/baas/v36n3/head2004/137.htm

syntax
	behr=behr_hug(softsrc,hardsrc,softbkg,hardbkg,softarea,hardarea,$
	softeff=softeff,hardeff=hardeff,softidx=softidx,hardidx=hardidx,$
	softscl=softscl,hardscl=hardscl,softtbl=softtbl,hardtbl=hardtbl,/post,$
	level=level,algo=algo,details=details,nsim=nsim,nburnin=nburnin,$
	/hpd,nbins=nbins,outputf=outputf,outputR=outputR,outputHR=outputHR,$
	outputC=outputC,outputMC=outputMC,outputPr=outputPr,BEHRdir=BEHRdir,$
	verbose=verbose)

parameters
	softsrc	[INPUT; required] counts in source region in soft (S) band
	hardsrc	[INPUT; required] counts in source region in hard (H) band
	softbkg	[INPUT; required] counts in background region in S band
	hardbkg	[INPUT; required] counts in background region in H band
	softarea[INPUT; required] background scaling factor in S band
	hardarea[INPUT; required] background scaling factor in H band
		* (background region area)/(source region area)
		* can also include differences in exposure time into
		  the ratio, in the same manner as geometric area

keywords
	softeff	[INPUT] effective area in soft (S) band
		* if not set, then set equal to HARDEFF if given, or
		  1 otherwise
	hardeff	[INPUT] effective area in hard (H) band
		* if not set, then set equal to SOFTEFF if given, or
		  1 otherwise
		* can also be the effective area relative to some
		  special point on the detector (e.g., aimpoint)
		  or even some specific detector (e.g., ACIS-I v/s ACIS-S)
	softidx	[INPUT] index of prior on S (range = 0+)
		* if not set, then set equal to HARDIDX if given, or
		  0.5 otherwise
	hardidx	[INPUT] index of prior on H (range = 0+)
		* if not set, then set equal to SOFTIDX if given, or
		  0.5 otherwise
		* similar to AGAMMA of PPD_SRC()
	softscl	[INPUT] scaling index of prior on S
		* if not set, then set to HARDSCL if given, or
		  0 otherwise
	hardscl	[INPUT] scaling index of prior on H
		* if not set, then set to SOFTSCL if given, or
		  0 otherwise
		* similar to BGAMMA of PPD_SRC()
	softtbl	[INPUT] filename containing a tabulated prior for S
	hardtbl	[INPUT] filename containing a tabulated prior for H
		* the table prior must be an ascii file with the following format:
		  line 1: number of entries, say NLIN
		  line 2: labels for the columns, ignored
		  lines 3..NLIN+2: two whitespace separated columns of numbers,
	            with each row containing the source intensity and the posterior
	            density, in that order
		* the default filenames are "./tblprior_{soft|hard}.txt"
		* the default filenames are used iff SOFTTBL and HARDTBL are set
		  but do not appear to exist
		* WARNING: if regex is used in the filename specification, only the
		  first file from the list will be used.  furthermore, if specified,
		  the table priors are applied to _all_ SOFTSRC and HARDSRC
	post	[INPUT] if set, suggests the values of (SOFTIDX,SOFTSCL)
		and (HARDIDX,HARDSCL) going forward, i.e., what you should
		set the priors to in your next calculation for the same
		source
	level	[INPUT] percentage confidence level at which to report error
		(default = 68)
	details	[INPUT] compute various ratios (true/false)?
		(default = true)
	algo	[INPUT] calculation method, GIBBS (default) or QUAD
		* if set to AUTO or AUTO=N, then uses GIBBS for any
		  case where {SOFT|HARD}SRC > N, and QUAD below that
		  unless one of {SOFT|HARD}SRC > 99, in which case
		  GIBBS is set automatically
		  - if N is not set, assumed to be 15
		  - N can be set to any integer less than 100
	nsim	[INPUT] number of draws if algo=gibbs (default=10000)
	nburnin	[INPUT] number of burn