This page was created by the IDL library routine
make_html_help
. For more information on
this routine, refer to the IDL Online Help Navigator
or type:
? make_html_help
at the IDL command line prompt.
Last modified: Thu Jun 10 14:53:54 2010.
NAME: abslinstrct__define Version 1.1 PURPOSE: Structure for a simple absorption line. CALLING SEQUENCE: tmp = {abslinstrct} INPUTS: RETURNS: OUTPUTS: OPTIONAL KEYWORDS: OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: Written by JXP
(See Spec/Lines//abslinstrct__define.pro)
NAME: airmass Version 1.1 PURPOSE: Calculate the airmass for an obj with a given DEC at an observatory with a given DEC and an offset in RA CALLING SEQUENCE: airmass = airmass(obs_dec, obj_dec, [hour_angle]) INPUTS: obs_dec -- DEC of the observatory obj_dec -- DEC of the object [hour_angle] -- Offset of RA [default: [-2,-1,0,1,2]] RETURNS: OUTPUTS: OPTIONAL KEYWORDS: APER= -- Aperture size (boxcar) /BOXCAR -- Do boxcar extraction /CHK -- YMODEL= -- 2D solution from extract_image OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: print, airmass( 20., 45., [-3, -2, -1, 0]) PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: Written by E. Gawiser
(See Obs//airmass.pro)
NAME: arclinstrct__define Version 1.1 PURPOSE: Arc line structure CALLING SEQUENCE: tmp = {arclinstrct} INPUTS: RETURNS: OUTPUTS: OPTIONAL KEYWORDS: OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: Written by JXP
(See Spec/Arcs//arclinstrct__define.pro)
NAME: cldy_2phas Version 1.0 PURPOSE: Finds the best 2-phase solution for a series of ratio constraints. This is not a well devloped or tested routine. CALLING SEQUENCE: cldy_2phas, grid, ratio, sig, ion1, ion2, restrct, NHILMT=, FEHLMT=, /UONLY INPUTS: grid - CLOUDY grid ratio - Observed ionic ratios sig - Error on the ratios ion1 - Z, i for ion1 (can be an array of Z,i pairs) ion2 - Z, i for ion2 (can be an array of Z,i pairs) RETURNS: OUTPUTS: OPTIONAL KEYWORDS: NHILMT - 2-element array giving NHI min,max FEHLMT - 2-element array giving FeH min,max UONLY - Value of nH to use OPTIONAL OUTPUTS: retstrct - Returns a structure of the output COMMENTS: EXAMPLES: cldy_2phas, grid, [0.3], [0.1], [14,4], [14,2], soltn PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: 08-Aug-2001 Written by JXP
(See Cloudy//cldy_2phas.pro)
NAME: cldy_allfn Version 1.1 PURPOSE: Plots [X/Fe+], [X/H0] vs. Elem for a range of the grid CALLING SEQUENCE: cldy_allfn, grid, obsi, val, ions INPUTS: grid -- CLOUDY grid obsi -- Observed pair of ions val -- Ratio of observed ions ions -- Array of [Z,ion] vectors to plot fN_in -- Fraction of the ratio contributed by entirely ionzed gas RETURNS: OUTPUTS: Creates a Plot OPTIONAL OUTPUTS: OPTIONAL KEYWORDS: NHI FeH nH COMMENTS: EXAMPLES: cldy_allfn, grid, [ [26,3], [26,2] ], -0.5, [[14,2], [13,2]] PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: 04-Dec-2001 Written by JXP
(See Cloudy//cldy_allfn.pro)
NAME: cldy_calcncoll V1.1 PURPOSE: Calculates the column density of a series of ions for CIE given a temperature CALLING SEQUENCE: cldy_calcncoll, temp, ions, colms, NHI=, MTL= INPUTS: temp -- Temperature of the gas (K) ions -- Ions to calculate columns for [[Z,i]] RETURNS: OUTPUTS: OPTIONAL KEYWORDS: NHI - N(HI) value [default = 15] MTL - Metallicity value [default = 0. (solar)] INFIL - Name of fits file containing Cloudy output of collsional ionization calculation (e.g. cloudy_collisions.fits) OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: cldy_calcncoll, 1e5, [[14,2], [8,6]], colms, NHI=14.8 PROCEDURES CALLED: prs_cldycoll printcol REVISION HISTORY: 04-Feb-2004 Written by JXP
(See Cloudy//cldy_calcncoll.pro)
NAME: cldy_calcnl Version 1.1 PURPOSE: Creates a Cloudy input file from a CUBA output file given a redshift CALLING SEQUENCE: cldy_calcnl, fil, z, logU, Jnu, NHVAL=, NHH=, LVAL= INPUTS: fil - CUBA output file z - Redshift logU - Ionization parameter J912 - Intensity at Lyman limit RETURNS: OUTPUTS: NHV= - Value of the volume density LVAL= - Length of the absorber (kpc) OPTIONAL INPUTS: NHH= - NH value of the sightline (required for lval) OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: cldy_calcnl, '/u/xavier/Cloudy/Spec/Data/CUBA/Q1G0/bkgthick.out', 0.5, -1.1, 6e-23, NHVAL=nhval PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: 30-Wed-2004 Written by JXP
(See Cloudy//cldy_calcnl.pro)
NAME: cldy_calctcoll V1.1 PURPOSE: Given a pair of ions and the ratio between those ions, calculate the temperature for gas with temperature T that gives that ratio CALLING SEQUENCE: cldy_calctcoll, ion1, ion2, rtio, tans, INFIL=, /PLOT INPUTS: ion1 -- [Z,i] ion2 -- [Z,i] rtio -- Ratio between ion1 and ion2 tans -- Temperature which gives that ratio RETURNS: OUTPUTS: OPTIONAL KEYWORDS: OFFS - 'Error' in rtio to determine temperature range [default: 1.] PLOT - Create a plot COLL - CIE grid OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: cldy_calctcoll, [7,5], [8,6], -0.9, tans, /plot PROCEDURES CALLED: getabnd prs_cldycoll REVISION HISTORY: 04-Feb-2004 Written by JXP
(See Cloudy//cldy_calctcoll.pro)
NAME: cldy_calcu Version 1.0 PURPOSE: Calculate the ionization parameter 'U' for a given redshift an nH value assuming the Haardt & Madau (1996) spectrum CALLING SEQUENCE: cldy_calcu, hm_fil, z, nH, logU, NRM=nrm INPUTS: hm_fil - Haardt & Madau file of fluxes z - Redshif nH - Hydrogen volume density [linear] RETURNS: OUTPUTS: OPTIONAL OUTPUTS: logU -- The log of the ionization parameter OPTIONAL KEYWORDS: [NRM] - Normalization factor for H&M data [default: 1e-23] COMMENTS: EXAMPLES: cldy_calcu, hm_fil, z, nH, logU, NRM= PROCEDURES/FUNCTIONS CALLED: readcol REVISION HISTORY: 02-Nov-2003 Written by JXP
(See Cloudy//cldy_calcu.pro)
NAME: cldy_cuba Version 1.1 PURPOSE: Creates a Cloudy input file from a CUBA output file given a redshift CALLING SEQUENCE: cldy_cuba, fil, z, outfil, FIXG=fixg INPUTS: fil - CUBA output file z - Redshift RETURNS: OUTPUTS: outfil - Cloudy output file OPTIONAL INPUTS: /FIXG -- I do not remember what this is for! CALCU= -- Calculate the U parameter assuming n_H = 1 cm^-3 OPTIONAL OUTPUTS: STRCT -- Stucture containing the wavelength and flux values COMMENTS: EXAMPLES: cldy_cuba, '/u/xavier/Cloudy/Spec/Data/CUBA/Q1G0/bkgthick.out', 0.35, '/u/xavier/Cloudy/Spec/Output/q1g0_z035.spec' PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: 06-Nov-2003 Written by JXP
(See Cloudy//cldy_cuba.pro)
NAME: cldy_mkmodels V1.1 PURPOSE: Run a sweet of cloudy models CALLING SEQUENCE: cldy_mkmodels, infil, fluxfil, z, OUTDIR=,INDIR=,CLOUDYDIR=,NHI=,METALS=,U=,HDEN= /CLOBBER INPUT: infil: input file with: <Variable name> <desired minimum value> <desired maximum value> <step size> variables which can be input are: NHI, nH, U, metals NOTE: MUST use these specific variable tags fluxfil: cldy_cuba output file defining flux z: redshift NHI, METALS, U, HDEN: specify a single value for these variables to be used in all models run (HDEN is for NH) OUTDIR: output file directory INDIR: input file directory TITLE: cloudy title (default: model) FILENAME: input/output file name lead (default: cloudy) /CLOBBER: clobber previous runs with same FILENAME NHI 16.0 18.0 0.25 metals -1.0 0.0 1.0 U -6.0 0.0 0.25 nH -2.0 0.0 2.0 REVISION HISTORY: 10-Sep-2005 Written by GEP
(See Cloudy//cldy_mkmodels.pro)
NAME: cldy_plot Version 1.1 PURPOSE: GUI for plotting a CLOUDY grid and doing quick analysis CALLING SEQUENCE: cldy_plot, ingrid, /INFIL INPUTS: flux - Flux array (or FITS file) [inflg] - Sigma array (or FITS file) RETURNS: OUTPUTS: OPTIONAL KEYWORDS: INFIL - set to indicate that the 'ingrid' is a file, and should be read in OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: cldy_plot, 'grid.fits', /INFIL cldy_plot, grid PROCEDURES/FUNCTIONS CALLED: XGETX_PLT XGETY_PLT XGETXPIX_PLT XGETYPIX_PLT REVISION HISTORY: -- Built by GEP
(See Cloudy//cldy_plot.pro)
NAME: cldy_plt2phs Version 1.1 PURPOSE: Plots a 2 phase solution (one purely neutral) given a Cloudy grid and related values. The user also inputs a pair of ions and a ratio between them. CALLING SEQUENCE: cldy_plt2phs, grid, NHI, FeH, nH, obsi, val, ions INPUTS: grid - CLOUDY grid NHI - N(HI) value FeH - Metallicity of the gas nH - Hydrogen volume density obsi - Observed pair of ions val - Ratio of observed ions ions - Array of [Z,ion] vectors to plot [YMNX=] - Y limits of the plot RETURNS: OUTPUTS: Creates a Plot OPTIONAL OUTPUTS: COMMENTS: Developed for the analysis in Prochaska et al. 2002 (Q1755) EXAMPLES: cldy_plt2phs, grid, 19.0d, -1.0d, -1.0d, [ [26,3], [26,2] ], -0.5, [[14,2], [14,3]] PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: 15-Nov-2001 Written by JXP
(See Cloudy//cldy_plt2phs.pro)
NAME: cldy_prsgrid V1.1 PURPOSE: parse a set of CLOUDY output files and create a FITS file CALLING SEQUENCE: cldy_prsout, outfil, cldystrct=cldystrct INPUT: indir: Directory containing CLOUDY output files outfil: name of CLOUDY output file OUTPUT: cldystrct: output cloudy strct REVISION HISTORY: 12-Sep-2005 Written by JXP
(See Cloudy//cldy_prsgrid.pro)
NAME: cldy_prsmodels V1.1 PURPOSE: Run a sweet of cloudy models CALLING SEQUENCE: cldy_prsmodels, infil, fluxfil, OUTDIR=,INDIR=,CLOUDYDIR=,NHI=,METALS=,U=,HDEN= INPUT: infil: input file with: <Variable name> <desired minimum value> <desired maximum value> <step size> variables which can be input are: NHI, nH, U, metals NOTE: MUST use these specific variable tags NHI, METALS, U, HDEN: specify a single value for these variables to be used in all models run (HDEN is for NH) OUTDIR: output file directory INDIR: input file directory FILENAME: input/output file name lead (default: cloudy) OUTPUT: supstrc: output cloudy structures REVISION HISTORY: 12-Sep-2005 Written by GEP
(See Cloudy//cldy_prsmodels.pro)
NAME: cldy_prsout V1.1 PURPOSE: parse a single CLOUDY output file CALLING SEQUENCE: cldy_prsout, outfil, cldystrct=cldystrct INPUT: outfil: name of CLOUDY output file OUTPUT: cldystrct: output cloudy strct REVISION HISTORY: 12-Sep-2005 Written by GEP 27-Apr-2006 Modified to work with Cloudy v06.02 syntax
(See Cloudy//cldy_prsout.pro)
NAME: cldy_qck2 Version 1.0 PURPOSE: Calculates a quick 2-phase model given a set of ions and the ratio of these ions (and the error in the ratio) and finally the two elements in the Cloudy grid which are to give the input ratios. CALLING SEQUENCE: cldy_qck2, grid, ratio, sig, ion1, ion2 INPUTS: grid - CLOUDY grid ratio - Observed ionic ratios (array) sig - Error on the ratios ion1 - Z, i for ion1 ion2 - Z, i for ion2 model - Two element array of the Cloudy grid RETURNS: OUTPUTS: OPTIONAL KEYWORDS: NHILMT - 2-element array giving NHI min,max FEHLMT - 2-element array giving FeH min,max OPTIONAL OUTPUTS: CHISQ - chisq COMMENTS: EXAMPLES: cldy_qck2, grid, [0.4], [0.1], [ 14,3 ], [14,2], model PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: 13-Nov-2001 Written by JXP
(See Cloudy//cldy_qck2.pro)
NAME: cldy_starburst Version 1.1 PURPOSE: Creates a Cloudy input file from the Starburst99 template CALLING SEQUENCE: cldy_cuba, fil, age, outfil, FIXG=fixg INPUTS: fil - Filname age - Age of the starburst RETURNS: OUTPUTS: outfil - Cloudy output file OPTIONAL INPUTS: OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: 19-Jun-2006 Written by JXP
(See Cloudy//cldy_starburst.pro)
NAME: cldy_uplot Version 1.0 PURPOSE: Creates a 'Uplot' for given NHI, FeH, nH values after inputting a Cloudy grid and a set of ions. CALLING SEQUENCE: cldy_uplot, grid, NHI, FeH, nH, ions INPUTS: grid - Cloudy grid NHI - HI column densities [Can be an array of values] FeH - Metallicity of the gas [must match grid value] nH - Volume density of the gas [must match grid value] ions - Array of [Z,ion] vectors YMNX= - Y values of the plot INFIL= - Ps file to create (instead of plotting to screen) RETURNS: OUTPUTS: Creates a Plot OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: cldy_Uplot, grid, 19.0d, -1.0d, -1.0d, [[14,2], [14,3]] PROCEDURES/FUNCTIONS CALLED: getcolor x_setclrs getabnd REVISION HISTORY: 15-Nov-2001 Written by JXP 27-Apr-2006 Modified to look more like published plots, KLC
(See Cloudy//cldy_uplot.pro)
NAME: cldy_wrin V1.1 PURPOSE: Create a CLOUDY input file INPUT params: array of parameters in the following order: z, logN_HI, metallicity, logU, logn_H fluxfil: text file of rydberg/flux pairs OPTIONAL v0602a: new syntax for Cloudy v06.02 cie: constant temperature, mmodel collisional ionization equilibrium (exclude ionization parameter and fluxfil) CALLING SEQUENCE: cldy_wrin, params, fluxfil, OUTFIL=outfil REVISION HISTORY: 10-Sep-2005 Written by GEP 13-Apr-2006 added v0602a and cie, KLC
(See Cloudy//cldy_wrin.pro)
NAME: cosm_common PURPOSE: Routine to initialize and set values in the Cosmology common block named 'cosmolgy_cmmn' CALLING SEQUENCE: cosm_common INPUTS: H0 = Hubbles constant in km/s/Mpc Omegavac = Lambda value [Default: 0.7] OmegaDM = Omega for Dark Matter [Default: 0.3] RETURNS: OUTPUTS: OPTIONAL KEYWORDS: /W06MAP -- Applies the WMAP cosmolgy from 2006 /SILENT -- No screen output OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: PROCEDURES CALLED: REVISION HISTORY: 22-Nov-2003 Written by JXP
(See Cosm//cosm_common.pro)
NAME: cosm_dist PURPOSE: Calculate the cosmological comoving distance (Mpc) given a cosmology and redshift CALLING SEQUENCE: dist = cosm_dist(z) INPUTS: z - Redshift [cosomlogy] - By default the cosmology is set prior to calling this using cosm_common. You can have this done by keying RETURNS: dist -- Distance in Mpc OUTPUTS: OPTIONAL KEYWORDS: H0= -- Hubble constant (km/s/Mpc) /INIT -- Initializes the cosmology to the default values /LUM -- Luminosity distance (Mpc) OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: dist = cosm_dist(2., /INIT) PROCEDURES CALLED: x_constants cosm_common cosm_intdist qromb REVISION HISTORY: 22-Nov-2003 Written by JXP
(See Cosm//cosm_dist.pro)
NAME: cosm_hubble PURPOSE: Calculates Hubbles constant at arbitrary redshift CALLING SEQUENCE: INPUTS: z -- Redshift RETURNS: OUTPUTS: OPTIONAL KEYWORDS: /INIT -- Initializes the cosmology to the default values OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: hubb = cosm_hubble(2., /INIT) PROCEDURES CALLED: cosm_common REVISION HISTORY: 22-Nov-2003 Written by JXP
(See Cosm//cosm_hubble.pro)
NAME: cosm_time PURPOSE: Calculates the age of the universe at an arbitrary redshift where the interval is from z=0 to z_i. CALLING SEQUENCE: INPUTS: z_i -- Redshift RETURNS: OUTPUTS: OPTIONAL KEYWORDS: /INIT -- Initializes the cosmology to default values (0.7, 0.3, 75) /W06MAP -- Initializes the cosmology to WMAP06 (0.72, 0.28, 73) H0= -- Hubbles constant (km/s/Mpc) /START -- Calculate the age from z=Infinity to z_i OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: age = cosm_time(1.) PROCEDURES CALLED: cosm_common REVISION HISTORY: 02-Jul-2004 Written by JXP
(See Cosm//cosm_time.pro)
NAME: cosm_xz PURPOSE: Calculate the cosmological distance X from z=0 to z=z CALLING SEQUENCE: INPUTS: z -- Redshift RETURNS: x -- Cosmological pathlength OUTPUTS: OPTIONAL KEYWORDS: H0 -- Hubbles constant (km/s/Mpc) OM -- Omega Dark Matter OV -- Lambda OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: PROCEDURES CALLED: cosm_common cosm_intxz qromb REVISION HISTORY: 11-March-2004 Written by JXP
(See Cosm//cosm_xz.pro)
NAME: cosm_ztime PURPOSE: Calculates the redshift given the age (z=0 corresponds to t=0yr) CALLING SEQUENCE: z = cosm_ztime(t, /init) INPUTS: t -- Time RETURNS: z -- Redshift OUTPUTS: OPTIONAL KEYWORDS: /INIT -- Initializes the cosmology to the default values H0= -- Hubbles constant (km/s/Mpc) OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: z = cosm_ztime(1e10) PROCEDURES CALLED: cosm_common REVISION HISTORY: 14-Dec-2004 Written by JXP
(See Cosm//cosm_ztime.pro)
NAME: CURVEFIT PURPOSE: Non-linear least squares fit to a function of an arbitrary number of parameters. The function may be any non-linear function. If available, partial derivatives can be calculated by the user function, else this routine will estimate partial derivatives with a forward difference approximation. CATEGORY: E2 - Curve and Surface Fitting. CALLING SEQUENCE: Result = CURVEFIT(X, Y, Weights, A, SIGMA, FUNCTION_NAME = name, $ ITMAX=ITMAX, ITER=ITER, TOL=TOL, /NODERIVATIVE) INPUTS: X: A row vector of independent variables. This routine does not manipulate or use values in X, it simply passes X to the user-written function. Y: A row vector containing the dependent variable. Weights: A row vector of weights, the same length as Y. For no weighting, Weights(i) = 1.0. For instrumental (Gaussian) weighting, Weights(i)=1.0/sigma(i)^2 For statistical (Poisson) weighting, Weights(i) = 1.0/y(i), etc. For no weighting, set Weights to an undefined variable. A: A vector, with as many elements as the number of terms, that contains the initial estimate for each parameter. IF A is double- precision, calculations are performed in double precision, otherwise they are performed in single precision. Fitted parameters are returned in A. KEYWORDS: FITA: A vector, with as many elements as A, which contains a zero for each fixed parameter, and a non-zero value for elements of A to fit. If not supplied, all parameters are taken to be non-fixed. FUNCTION_NAME: The name of the function (actually, a procedure) to fit. IF omitted, "FUNCT" is used. The procedure must be written as described under RESTRICTIONS, below. ITMAX: Maximum number of iterations. Default = 20. ITER: The actual number of iterations which were performed TOL: The convergence tolerance. The routine returns when the relative decrease in chi-squared is less than TOL in an interation. Default = 1.e-3. CHI2: The value of chi-squared on exit (obselete) CHISQ: The value of reduced chi-squared on exit NODERIVATIVE: IF this keyword is set THEN the user procedure will not be requested to provide partial derivatives. The partial derivatives will be estimated in CURVEFIT using forward differences. IF analytical derivatives are available they should always be used. DOUBLE = Set this keyword to force the calculation to be done in double-precision arithmetic. STATUS: Set this keyword to a named variable in which to return the status of the computation. Possible values are: STATUS = 0: The computation was successful. STATUS = 1: The computation failed. Chi-square was increasing without bounds. STATUS = 2: The computation failed to converge in ITMAX iterations. YERROR: The standard error between YFIT and Y. OUTPUTS: Returns a vector of calculated values. A: A vector of parameters containing fit. OPTIONAL OUTPUT PARAMETERS: Sigma: A vector of standard deviations for the parameters in A. Note: if Weights is undefined, then you are assuming that your model is correct. In this case, SIGMA is multiplied by SQRT(CHISQ/(N-M)), where N is the number of points in X and M is the number of terms in the fitting function. See section 15.2 of Numerical Recipes in C (2nd ed) for details. COMMON BLOCKS: NONE. SIDE EFFECTS: None. RESTRICTIONS: The function to be fit must be defined and called FUNCT, unless the FUNCTION_NAME keyword is supplied. This function, (actually written as a procedure) must accept values of X (the independent variable), and A (the fitted function's parameter values), and return F (the function's value at X), and PDER (a 2D array of partial derivatives). For an example, see FUNCT in the IDL User's Libaray. A call to FUNCT is entered as: FUNCT, X, A, F, PDER where: X = Variable passed into CURVEFIT. It is the job of the user-written function to interpret this variable. A = Vector of NTERMS function parameters, input. F = Vector of NPOINT values of function, y(i) = funct(x), output. PDER = Array, (NPOINT, NTERMS), of partial derivatives of funct. PDER(I,J) = DErivative of function at ith point with respect to jth parameter. Optional output parameter. PDER should not be calculated IF the parameter is not supplied in call. IF the /NODERIVATIVE keyword is set in the call to CURVEFIT THEN the user routine will never need to calculate PDER. PROCEDURE: Copied from "CURFIT", least squares fit to a non-linear function, pages 237-239, Bevington, Data Reduction and Error Analysis for the Physical Sciences. This is adapted from: Marquardt, "An Algorithm for Least-Squares Estimation of Nonlinear Parameters", J. Soc. Ind. Appl. Math., Vol 11, no. 2, pp. 431-441, June, 1963. "This method is the Gradient-expansion algorithm which combines the best features of the gradient search with the method of linearizing the fitting function." Iterations are performed until the chi square changes by only TOL or until ITMAX iterations have been performed. The initial guess of the parameter values should be as close to the actual values as possible or the solution may not converge. EXAMPLE: Fit a function of the form f(x) = a * exp(b*x) + c to sample pairs contained in x and y. In this example, a=a(0), b=a(1) and c=a(2). The partials are easily computed symbolicaly: df/da = exp(b*x), df/db = a * x * exp(b*x), and df/dc = 1.0 Here is the user-written procedure to return F(x) and the partials, given x: pro gfunct, x, a, f, pder ; Function + partials bx = exp(a(1) * x) f= a(0) * bx + a(2) ;Evaluate the function IF N_PARAMS() ge 4 THEN $ ;Return partials? pder= [[bx], [a(0) * x * bx], [replicate(1.0, N_ELEMENTS(f))]] end x=findgen(10) ;Define indep & dep variables. y=[12.0, 11.0,10.2,9.4,8.7,8.1,7.5,6.9,6.5,6.1] Weights=1.0/y ;Weights a=[10.0,-0.1,2.0] ;Initial guess yfit=curvefit(x,y,Weights,a,sigma,function_name='gfunct') print, 'Function parameters: ', a print, yfit end MODIFICATION HISTORY: Written, DMS, RSI, September, 1982. Does not iterate IF the first guess is good. DMS, Oct, 1990. Added CALL_PROCEDURE to make the function's name a parameter. (Nov 1990) 12/14/92 - modified to reflect the changes in the 1991 edition of Bevington (eq. II-27) (jiy-suggested by CreaSo) Mark Rivers, U of Chicago, Feb. 12, 1995 - Added following keywords: ITMAX, ITER, TOL, CHI2, NODERIVATIVE These make the routine much more generally useful. - Removed Oct. 1990 modification so the routine does one iteration even IF first guess is good. Required to get meaningful output for errors. - Added forward difference derivative calculations required for NODERIVATIVE keyword. - Fixed a bug: PDER was passed to user's procedure on first call, but was not defined. Thus, user's procedure might not calculate it, but the result was THEN used. Steve Penton, RSI, June 1996. - Changed SIGMAA to SIGMA to be consistant with other fitting routines. - Changed CHI2 to CHISQ to be consistant with other fitting routines. - Changed W to Weights to be consistant with other fitting routines. _ Updated docs regarding weighing. Chris Torrence, RSI, Jan,June 2000. - Fixed bug: if A only had 1 term, it was passed to user procedure as an array. Now ensure it is a scalar. - Added more info to error messages. - Added /DOUBLE keyword. CT, RSI, Nov 2001: If Weights is undefined, then assume no weighting, and boost the Sigma error estimates according to NR Sec 15.2 Added YERROR keyword. CT, RSI, May 2003: Added STATUS keyword. Added FITA keyword (courtesy B. LaBonte) CT, RSI, August 2004: Added ON_ERROR, 2
(See FIT//x_curvefit.pro)
NAME: dblsobjstrct__define Version 1.1 PURPOSE: This routine creates a structure to describe the spectrum for an object in a given slit CALLING SEQUENCE: tmp = {dlbsobjstrct} INPUTS: RETURNS: OUTPUTS: OPTIONAL KEYWORDS: OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: Written by JXP
(See Spec/Slits//dblsobjstrct__define.pro)
NAME: distruct__define Version 1.1 PURPOSE: Defines the structure for direct imaging CALLING SEQUENCE: tmp = {distruct} INPUTS: PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: ??-2001 Written by JXP 11-June-2007 Modified by LKP for use with NIRC2
(See IMG/General//distruct__define.pro)
NAME: dlanoestruct__define Version 1.1 PURPOSE: Defines the structure for DLA without creating the element arrays CALLING SEQUENCE: tmp = {dlanoestruct} INPUTS: PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: 1-Oct-2004 Written by JXP
(See DLA//dlanoestruct__define.pro)
NAME: dlastruct__define Version 1.1 PURPOSE: Defines the structure for DLA CALLING SEQUENCE: tmp = {dlastruct} INPUTS: PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: 1-Oct-2004 Written by JXP
(See DLA//dlastruct__define.pro)
NAME: dla_analyse V1.1 PURPOSE: Launches a GUI which enables simple plotting and inspection of individual DLA CALLING SEQUENCE: dla_analyse, [list] INPUTS: [list] -- List of DLA to inspect [default: /u/xavier/DLA/Lists/tot_dla.lst] RETURNS: OUTPUTS: OPTIONAL KEYWORDS: ROOT= Path to the DLA tree OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: dla_analyse, '/u/xavier/DLA/Lists/tot_dla.lst' PROCEDURES CALLED: REVISION HISTORY: 10-Jun-2002 Written by JXP
(See DLA//dla_analyse.pro)
NAME: dla_eplot Version 1.1 PURPOSE: Given an abundance file and NHI value, create a abundance number plot (logarithmic with H = 12) CALLING SEQUENCE: dla_eplot, fil, NHI, ZMTL=, PSFILE=, XR=, YR= INPUTS: fil -- Abundance file, [format: Zatm, Ncolm, Nsig, Flag, Instr] NHI -- NHI value of the DLA RETURNS: OUTPUTS: If PSFILE is set, will create a ps file instead of plotting to the screen OPTIONAL KEYWORDS: ZMTL -- Metallicity of the gas (for overplotting Solar pattern) XR -- X range of the plot [default: min and max of Zatm values] YR -- Y range of the plot [default: [4., 12] ] OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: dla_eplot, fil, 20.8, ZMTL=-1.2 PROCEDURES/FUNCTIONS CALLED: readcol REVISION HISTORY: 17-Feb-2004 Written by JXP
(See DLA//dla_eplot.pro)
NAME: dla_esitosdss Version 1.1 PURPOSE: Turn an ESI spectrum into SDSS 'quality' (i.e. lower resolution) CALLING SEQUENCE: dla_esitosdss, fil, wave, fx, sig, /PLOT INPUTS: fil -- ESI fits file [assumes binning of 1] RETURNS: OUTPUTS: wave -- Wavelength array fx -- Flux array sig -- Error array OPTIONAL KEYWORDS: /PLOT -- Plot the spectrum OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: dla_esitosdss, fil, NHI, Z PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: 09-Dec-2002 Written by JXP
(See DLA//dla_esitosdss.pro)
NAME: dla_fndtran Version 1.1 PURPOSE: Given a DLA structure, calculates the rest EW of weak, rare transitions like OI 1355, BII, etc. CALLING SEQUENCE: dla_fndtran, dla, [fil], OUTFIL=, LMT= INPUTS: dla -- IDL DLA structure [fil] -- List of weak line transitions [default: '/u/xavier/DLA/Abund/weak_lin.dat'] RETURNS: OUTPUTS: OUTFIL= -- Writes the values to OUTFIL [default: 'fort.23'] OPTIONAL KEYWORDS: LMT= -- Minimum EW to print the transition [default: 0.5 mA] OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: dla_fndtran, dla, outfil='weak_lin.dat' PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: 09-Dec-2002 Written by JXP
(See DLA//dla_fndtran.pro)
NAME: dla_guessew Version 1.1 PURPOSE: Calcualtes the EW limits for a series of input transitions for a DLA with given NHI and metallicity Z. CALLING SEQUENCE: dla_guessew, fil, NHI, Z, NPIX=, SNR=, NSIG=, DWV= INPUTS: fil -- File with list of wavlengths NHI -- N(HI) value of the DLA (logarithmic) Z -- Metallcitiy (logarithmic) RETURNS: OUTPUTS: OPTIONAL KEYWORDS: NPIX= -- Number of pixels making up the feature [default: 4] NSIG= -- Number of sigma significant [default: 3.] SNR= -- Signal-to-noise per pixel [default: 10.] DWV= -- Width of pixel in Angstromgs [default: 0.1 Ang] OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: x_guessew, fil, NHI, Z PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: 14-Nov-2002 Written by JXP
(See DLA//dla_guessew.pro)
NAME: dla_indx V1.1 PURPOSE: Returns the index for a DLA given the name and z (if necessary) Defaults to the first entry if multiple. This is a simple and rather uninteresting program. CALLING SEQUENCE: idx = dla_indx(struct, name, [z]) INPUTS: struct - dla structure name - Name of the quasar (string; need not be complete) [z] - redshift (optional) RETURNS: index OUTPUTS: OPTIONAL KEYWORDS: OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: idx = dla_indx(sdla, 'Q0000') PROCEDURES CALLED: REVISION HISTORY: 24-Nov-2001 Written by JXP
(See DLA//dla_indx.pro)
NAME: dla_sdssrich Version 1.0 PURPOSE: Inputs a list of absorption lines, and the quasar emission redshift and then prints all probably DLA (quality > 0.7) CALLING SEQUENCE: dla_sdssrich, zem, obslin INPUTS: zem -- Emission redshift of the quasar obslin -- List of observed lines RETURNS: OUTPUTS: OPTIONAL KEYWORDS: GRAN= -- List of metal-line transitions to key on OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: dla_sdssrich PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: 09-Dec-2002 Written by JXP
(See SDSS/DLA/dla_sdssrich.pro)
NAME: dla_si2star Version 1.1 PURPOSE: Given a normalized QSO spectrum (fits file) and the redshift of the DLA, overplots a SiII* feature at the expected spot based on the observed CII* profile. THe program also plots the CII* profile CALLING SEQUENCE: dla_si2star, fits_fil, zabs, VMNX=, PSFIL=, YMNX=, RTIO= INPUTS: fits_fil -- FITS file containing the QSO data [Assumes HIRES format] zabs -- Absorption redshift RETURNS: OUTPUTS: PSFIL= -- Writes PS file OPTIONAL KEYWORDS: RTIO= -- Ratio of optical depth of SiII* to CII* [deafult: 0.05] VMNX= -- Velcoity region to plot [default: -100 to 100 km/s] YMNX= -- Ymin, ymax of plot [deafult: 0., 1.] OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: dla_si2star, 'Q1331_f.fits', 1.770 PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: 29-May-2003 Written by JXP
(See DLA//dla_si2star.pro)
NAME: dla_writestr V1.2 PURPOSE: Given a DLA structre write the files out with the .dat format CALLING SEQUENCE: dla_writestr, dla INPUTS: dla -- DLA structure RETURNS: OUTPUTS: Series of DLA files OPTIONAL KEYWORDS: OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: dla_writestr, dla PROCEDURES CALLED: REVISION HISTORY: 01-Oct-2004 Written by JXP 2006 Added metallicity and SDSS tags
(See DLA//dla_writestr.pro)
NAME: dla_xalphvsa Version 1.1 PURPOSE: Plots [X/alpha] vs [alpha/H]. Currently, the fig only shows Echelle obs CALLING SEQUENCE: dla_xyvsab, X, XR=, YR=, DLA= INPUTS: X -- Atomic number of element X RETURNS: OUTPUTS: OPTIONAL KEYWORDS: XR= -- x-range YR= -- y-range DLA= -- DLA structure /NOXERR -- Suppress x error bars /NOLIM -- Do not show limits /NOCLOSE -- Do not close the plot MXERR -- Maximum error to plot OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: dla_xalphavsa, 7 PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: 14-Sep-2004 Written by JXP
(See DLA//dla_xalphvsa.pro)
NAME: dla_xyvsab Version 1.1 PURPOSE: Plots [X/Y] vs [A/B]. Currently, the fig only shows Echelle obs CALLING SEQUENCE: dla_xyvsab, [X,Y], [A,B], XR=, YR=, DLA= INPUTS: X -- Atomic number of element X Y -- Atomic number of element Y A -- Atomic number of element A B -- Atomic number of element B RETURNS: OUTPUTS: OPTIONAL KEYWORDS: XR= -- x-range YR= -- y-range DLA= -- DLA structure /NOXERR -- Suppress x error bars /NOLIM -- Do not show limits /NOCLOSE -- Do not close the plot MXERR -- Maximum error to plot OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: dla_xyvsab, [14,26], [14,1] PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: 14-Sep-2004 Written by JXP
(See DLA//dla_xyvsab.pro)
NAME: echfspecstrct__define Version 1.1 PURPOSE: Creates a structure for echelle spectroscopy that will hold the wavelength, flux and error arrays. Also includes the ZANS structure which is useful for using SDSS redshift identification. CALLING SEQUENCE: tmp = {echfspecstrct} INPUTS: RETURNS: OUTPUTS: OPTIONAL KEYWORDS: OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: Written by JXP
(See Spec/Analysis//echfspecstrct__define.pro)
NAME: emissstrct__define Version 1.1 PURPOSE: Structure for a simple emission line. CALLING SEQUENCE: tmp = {emissstrct} INPUTS: RETURNS: OUTPUTS: OPTIONAL KEYWORDS: OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: Written by JXP
(See Spec/Lines//emissstrct__define.pro)
NAME: extract_asymbox2 PURPOSE: Extract the total flux within a boxcar window at many positions. This routine will accept an asymmetric/variable window Traces are expected to run vertically to be consistent with other extract_ routines MODIFIED MODEL WEIGHTING CALLING SEQUENCE: fextract = extract_asymbox( image, left, right, $ [ycen, weight_image=weight_image, f_ivar=f_ivar, model=model]) INPUTS: image - Image left - Lower boundary of boxcar window (given as floating pt pixels) right - Upper boundary of boxcar window (given as floating pt pixels) OPTIONAL KEYWORDS: ycen - Y positions corresponding to "left" (expected as integers) weight_image - Weights to be applied to image before boxcar OUTPUTS: fextract - Extracted flux at positions specified by (left<-->right, ycen) OPTIONAL OUTPUTS: f_ivar - the boxcar summed weights, weights=1 if weight_image is missing model - A model image (of size image) COMMENTS: EXAMPLES: PROCEDURES CALLED: REVISION HISTORY: 24-Mar-1999 Written by David Schlegel, Princeton. 17-Feb-2003 Written with slow IDL routine, S. Burles, MIT 27-Jan-2004 Adopted to do asymmetric/varying boxcar
(See Spec/Extraction//extract_asymbox2.pro)
NAME: extrctstrct__define Version 1.1 PURPOSE: Define the extraction structure CALLING SEQUENCE: tmp = {extrctstrct} INPUTS: RETURNS: OUTPUTS: OPTIONAL KEYWORDS: OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: Written by JXP
(See Spec/General//extrctstrct__define.pro)
NAME: f2dpoly Version 1.1 PURPOSE: Creates basis functions of a 2dpoly for feeding into SVDFIT for 2D surface fitting. Requires an initial call with m=-1 to set up the common block. This code even makes my head spin! CALLING SEQUENCE: fpoly = f2dpoly(s, m, XVAL=, YVAL=, FLG=) INPUTS: s - scalar or vector identifying the index number m - Total order (nx*ny) of the polynomial (-1 to initialize; -2 to deconstruct) RETURNS: fpoly - Basis functions OUTPUTS: OPTIONAL KEYWORDS: XVAL= -- Dummy array used to initialize the common block YVAL= -- Dummy array used to initialize the common block FLG= -- Number of coefficients in the X direction. If FLG=0, then it is assumed that nx=ny=sqrt(m) OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: fpoly = f2dpoly(s, m) PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: 31-Jan-2002 Written by JXP
(See FIT//f2dpoly.pro)
NAME: fill_elmxh Version 1.1 PURPOSE: Given a DLA structure, fills up the X/H info. Simply reads in the info from the .XH files. This program is not likely to be called by any program except parse_dlalst. CALLING SEQUENCE: fill_elmxh, dla INPUTS: dla -- IDL DLA structure RETURNS: OUTPUTS: OPTIONAL KEYWORDS: /NOHIS -- Do not include HI error in analysis OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: 29-May-2003 Written by JXP
(See DLA//fill_elmxh.pro)
NAME: fill_ion V1.1 PURPOSE: Fills up the column densities for all of the ions observed for a given DLA. It parses the .ion files produced by dla_updabd. This program is unlikely to be called by anything except parse_dlalst. CALLING SEQUENCE: fill_ion, sDLA INPUTS: RETURNS: sDLA - IDL DLA structure OUTPUTS: OPTIONAL KEYWORDS: ROOT= Path to DLA tree (e.g. '~/DLA/') OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: fill_ion, sdla PROCEDURES CALLED: REVISION HISTORY: 12-Nov-2001 Written by JXP
(See DLA//fill_ion.pro)
NAME: fit2dstrct__define Version 1.1 PURPOSE: IDL structure for 2D surface fitting CALLING SEQUENCE: tmp = {fit2dstrct} INPUTS: RETURNS: OUTPUTS: OPTIONAL KEYWORDS: OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: tmp = {fit2dstrct} PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: 31-Jan-2002 Written by JXP
(See FIT//fit2dstrct__define.pro)
NAME: fits2asc V1.1 PURPOSE: Converts fits spectrum to ASCII. The wavelength array is read from the header. Particularly useful for VPFIT CALLING SEQUENCE: fits2asc, file, [error], OUTFIL= INPUTS: file - Data Filename [spectrum; data in extension 0] [error] - Error filename RETURNS: OUTPUTS: outfil - ASCII file with wavelength, file, [error] in columns OPTIONAL KEYWORDS: WVMIN -- Minimum wavelength to print out [default: 0.] WVMAX -- Maximum wavelength to print out [default: 1e6] OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: fits2asc, 'Blah.fits' PROCEDURES CALLED: x_fitswave writecol REVISION HISTORY: 27-Aug-2001 Written by JXP
(See General//fits2asc.pro)
NAME: fitstrct__define Version 1.1 PURPOSE: IDL structure for 1D fitting CALLING SEQUENCE: tmp = {fitstrct} INPUTS: RETURNS: OUTPUTS: OPTIONAL KEYWORDS: OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: tmp = {fitstrct} PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: 31-Jan-2002 Written by JXP
(See FIT//fitstrct__define.pro)
NAME: fit_convxptox Version 1.1 PURPOSE: Convert the fitted coefficients of a POLY fit from the normalized values to 'sensible' ones. CALLING SEQUENCE: newcoeff = fit_convxptox( calib, FFIT=, NRM= ) INPUTS: calib -- FIT structure RETURNS: newcoeff -- Unnormalized coefficients OUTPUTS: OPTIONAL KEYWORDS: FFIT= -- Coefficients [default: *calib.ffit] NRM= -- Normalization values [default: calib.nrm] OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: 02-Aug-2002 Written by JXP
(See FIT//fit_convxptox.pro)
NAME: frac_order Version 1.1 PURPOSE: For an input array and the order structure defining the echelle footprint, this routine calculates the position of a give pixel along the slit. CALLING SEQUENCE: frac = frac_order( ordr_str, xstart, ywave, ocen=, ncoeff=) INPUTS: ordr_str -- Order structure which describes the echelle footprint xstart -- x values of the pixels ywave -- Wavelength values of the pixels RETURNS: OUTPUTS: OPTIONAL KEYWORDS: OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: x_slitflat, mike, 1 PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: 31-Jul-2005 Written by SB
(See Spec/Arcs//frac_order.pro)
NAME: fuselinstrct__define V1.1 PURPOSE: Defines the structure for FUSE absorption lines CALLING SEQUENCE: tmp = {fuselinstrct} INPUTS: RETURNS: OUTPUTS: OPTIONAL KEYWORDS: OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: PROCEDURES CALLED: REVISION HISTORY: Nov-2003 Created by JXP
(See FUSE/General/fuselinstrct__define.pro)
NAME: fuse_calcewn V1.1 PURPOSE: Given a FUSE structure file and a set of instrument files (each of which specifies absorption lines), the code measures EW and fills up the FUSE structure. If multiple EW values are measured, then it calculates the weighted mean if the two are consistent or otherwise the average and sets a large uncertainty. CALLING SEQUENCE: fuse_calcewn, strct_fil, instr_list INPUTS: strct_fil -- IDL FUSE file instr_list -- Instrument list containing absorption line lists RETURNS: OUTPUTS: strct_fil -- The EW tags are filled up by this routine OPTIONAL KEYWORDS: MODLIM - modify wavelength limits with wavelength shift ROOTDIR - pre-pend string to instr_list file names SUFFIX - for STIS-like files, suffix to search and replace (default: ['f.fits','e.fits']) OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: fuse_calcewn, struct, fil_instr PROCEDURES CALLED: REVISION HISTORY: 10-Sep-2003 Added metallicity sturcture 2-Feb-2006 added /modlim and /ewgauss options, KLC 3-Apr-2006 added calculation of zsig 24-Jan-2007 removed /ewgauss and modify EW summing when flux<0 or flux>1
(See FUSE/Analysis/fuse_calcewn.pro)
NAME: fuse_calcion V1.1 PURPOSE: For FUSE observations, calculate ionic column densities for all ions in the FUSE structure. The code allows for limits and does a weighted mean for multiple transitions. CALLING SEQUENCE: fuse_calcion, strct_fil, zabs, ion_fil, NHI=, HAND= INPUTS: strct_fil -- FITS file for the FUSE structure zabs -- Absorption redshift of the system RETURNS: OUTPUTS: ion_fil -- Output ion file OPTIONAL KEYWORDS: NHI= -- NHI value and error [required at present!] HAND= -- Input file of ionic column densities used to override the values that would otherwise be derived by this program. OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: fuse_calcion, strct_fil, zabs, 'PKS0405_z495.ion' PROCEDURES CALLED: getabnd getion REVISION HISTORY: 11-Sep-2003 Written by JXP
(See FUSE/Analysis/fuse_calcion.pro)
NAME: fuse_calcxh V1.1 PURPOSE: Calculate X/H values for FUSE observations. It grabs the info from the ion_fil and an input XH_fil and then outputs the XH values into a XH data file. The Input file must contain ionization information (Cloudy file, U values) to do the final calcalculations of X/H. You need to see an example file to get this set correctly. CALLING SEQUENCE: fuse_calcxh, xhfil INPUTS: xhfil -- Input file to run the XH calculations and output RETURNS: OUTPUTS: outfil -- Output file of X/H values OPTIONAL KEYWORDS: OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: fuse_calcxh, 'Input/z0495_XH.inp' PROCEDURES CALLED: fuse_calcxh_parse REVISION HISTORY: 21-Nov-2003 Written by JXP
(See FUSE/Analysis/fuse_calcxh.pro)
NAME: fuse_cog V1.1 PURPOSE: Calculate a COG solution from a FUSE structure file CALLING SEQUENCE: fuse_cog, strct_fil, cog_fil, [Nlmt, blmt], /CHICHK, PLTONLY= NSTP=, BSTP=, PSFILE=, OUTFIL=, /EXACT, ZLBL=,DEBLEND=,UPLIM=,RMS= INPUTS: strct_fil -- FITS file for the FUSE structure cog_fil -- COG input file (lists redshift and transitions to use) [Nlmt] -- Range of column densities to explore (2 element array) [blmt] -- Range of Doppler parameters to explore (2 element array) RETURNS: OUTPUTS: OPTIONAL KEYWORDS: /CHICHK -- Plot Chi^2 image PLTONLY -- 4-element array of N,b values and error for a plot NSTP -- Number of steps to search N space [default: 100L] BSTP -- Number of steps to search b space [default: 100L] /EXACT -- Calculate EW exactly (Spline is generally good enough) ZLBL= -- Label for Plot giving redshift of the absorber (string) UPLIM -- file (like cog_fil) of lines to color upper limits on curve (1: excluded, 2: 2-sig upper limit, 4: blend upper limit DEBLEND -- file with information of EW to remove for specific features because they are blended OR include upper limits RMS -- add RMS to EW error in quadrature LABEL -- indicate line across top (either /label or label='FeII') ASYMERR -- calculate asymmetric errors by measuring the chi^2=1 ellipse OPTIONAL OUTPUTS: OUTFIL -- File with best fit values and error PSFILE -- File for postscript plot COMMENTS: EXAMPLES: fuse_cog, '/u/xavier/FUSE/data/PKS0405-12/Analysis/pks0405_abslin.fits', $ '/u/xavier/FUSE/data/PKS0405-12/Analysis/COG/Input/pks0405_z0918.cog', $ PSFIL='Figures/z0918_cog.ps', PLTONLY=[14.52, 38.2, 0.04, 1.8] PROCEDURES CALLED: REVISION HISTORY: 11-Sep-2003 Written by JXP 30-Nov-2005 modifed so can handle inability to calculate error, KLC 12-Jan-2006 added UPLIM keyword, KLC 8-Mar-2006 added DEBLEND keyword, KLC 13-Sep-2006 added RMS keyword, KLC 22-Sep-2006 added LABEL keyword, KLC 2-Jan-2007 added ASYMERR keyword, KLC and PJ; modify plot labels 8-Jan-2007 corrected and modified UPLIM
(See FUSE/Analysis/fuse_cog.pro)
NAME: fuse_fndneviii Version 1.1 PURPOSE: GUI which plots the metal line systems including NeVIII CALLING SEQUENCE: fuse_fndneviii, yin, lyalist, VMNX=, INFLG=, VMNX=, XSIZE=, YSIZE=, SVSTATE=, INIZ= INPUTS: RETURNS: OUTPUTS: OPTIONAL KEYWORDS: VMNX -- Velocity range for plotting transitions INFLG -- Flag for type of spectrum file (see x_readspec) XSIZE -- Size of gui x-pixels [default: 80% of screen] YSIZE -- Size of gui y-pixels [default: 80% of screen] INIZ -- Initial redshift to start search at [default: 0.] OPTIONAL OUTPUTS: SVSTATE -- Save the state to return to search later COMMENTS: EXAMPLES: fuse_fndneviii, 'file.fits', inflg=4, SVSTATE='save_neviii.idl' PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: 29-Oct-2002 Written by JXP
(See FUSE/Analysis/fuse_fndneviii.pro)
NAME: fuse_fndovi Version 1.1 PURPOSE: GUI which plots the spectra in two strips corresponding to the doublet of OVI. User can indicate the regions where OVI could be detected (visually). CALLING SEQUENCE: fuse_fndovi, datfil, XSIZE=, YSIZE=, /STIS, OUTFIL=, GZFIL= INPUTS: RETURNS: OUTPUTS: OPTIONAL KEYWORDS: XSIZE -- Size of gui x-pixels [default: 80% of screen] YSIZE -- Size of gui y-pixels [default: 80% of screen] /STIS -- STIS data file (as opposed to FUSE) GZFIL -- File containing saved regions OPTIONAL OUTPUTS: SVSTATE -- Save the state to return to search later OUTFIL -- File to contain saved regions [default: 'find_ovi.fits'] COMMENTS: EXAMPLES: fuse_fndovi, 'PKS0405.fits' PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: 09-Feb-2004 Written by JXP
(See FUSE/Analysis/fuse_fndovi.pro)
NAME: fuse_gzneviii Version 1.1 PURPOSE: GUI which plots the spectra in two strips corresponding to the doublet of OVI. User can indicate the regions where OVI could be detected (visually). CALLING SEQUENCE: fuse_gzneviii, datfil, XSIZE=, YSIZE=, OUTFIL=, GZFIL= INPUTS: RETURNS: OUTPUTS: OPTIONAL KEYWORDS: XSIZE -- Size of gui x-pixels [default: 80% of screen] YSIZE -- Size of gui y-pixels [default: 80% of screen] GZFIL -- File containing saved regions OPTIONAL OUTPUTS: SVSTATE -- Save the state to return to search later OUTFIL -- File to contain saved regions [default: 'find_neviii.fits'] COMMENTS: EXAMPLES: fuse_gzneviii, x, maskid, expsr PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: 05-Oct-2003 Written by JXP
(See FUSE/Analysis/fuse_gzneviii.pro)
NAME: fuse_h2lin (V1.1) PURPOSE: Sets up a line list of Molecular Hydrogen CALLING SEQUENCE: h2strct = fuse_h2lin([file]) INPUTS: [file] - H2 line list [default: $XIDL_DIR/FUSE/H2/h2sort.dat] RETURNS: h2strct - Structure of molecular hydrogen OUTPUTS: OPTIONAL KEYWORDS: OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: h2strct = fuse_h2lin() PROCEDURES CALLED: REVISION HISTORY: 09-Feb-2004 Written by JXP
(See FUSE/H2/fuse_h2lin.pro)
NAME: fuse_prsline V1.1 PURPOSE: Create a structure for the absorption lines given a set of files for the absorption lines. CALLING SEQUENCE: fuse_prsline, files, strct, OUTFIL= INPUTS: files -- List of files for absorption lines RETURNS: strct - FUSE absorption line structure OUTPUTS: OUTFIL= -- Writes structure to OUTFIL OPTIONAL KEYWORDS: OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: PROCEDURES CALLED: REVISION HISTORY: Nov-2003 Created by JXP
(See FUSE/General/fuse_prsline.pro)
NAME: fuse_twocog V1.1 PURPOSE: Perform a COG analysis allowing for two components. This program is best used to plot (use PLTONLY) the results of a two component analysis, not to fit for the 2 components. CALLING SEQUENCE: fuse_twocog, strct_fil, cog_fil, N1lmt, b1lmt, N2lmt, b2lmt, delv /CHICHK, PLTONLY=, ZLBL=, NSTP=, BSTP=, PSFILE=, OUTFIL=, /EXACT lowzovi_prsdat, stucture, filename INPUTS: strct_fil -- FITS file for the FUSE structure cog_fil -- COG input file (lists redshift and transitions to use) [N1lmt] -- Range of column densities to explore (2 element array) [b1lmt] -- Range of Doppler parameters to explore (2 element array) [N2lmt] -- Range of column densities to explore (2 element array) [b2lmt] -- Range of Doppler parameters to explore (2 element array) [delv] -- Separation of the 2 components (km/s) RETURNS: OUTPUTS: OPTIONAL KEYWORDS: /CHICHK -- Plot Chi^2 image PLTONLY -- 4-element array of N,b values and error for a plot NSTP -- Number of steps to search N space [default: 5L] BSTP -- Number of steps to search b space [default: 5L] ZLBL= -- Label for Plot giving redshift of the absorber (string) OPTIONAL OUTPUTS: OUTFIL -- File with best fit values and error PSFILE -- File for postscript plot COMMENTS: EXAMPLES: fuse_calccolm, struct, fil_instr PROCEDURES CALLED: REVISION HISTORY: 15-Sep-2003 Written by JXP
(See FUSE/Analysis/fuse_twocog.pro)
NAME: fuse_velplt V1.1 PURPOSE: Velcoity plot of FUSE transitions for a given absorption system CALLING SEQUENCE: fuse_velplt, strct_fil, instr_list, vel_fil, NTOT=, CSIZE=, LSIZE=, PSFILE=, XTINT=, ENCAPSULATED=, MULTI=, OUTLINE=, LABEL=, MSGFIL=, VOIGT= INPUTS: RETURNS: strct_fil -- FITS file for the FUSE abs lin structure instr_list -- List of instrument files vel_fil -- Input file for velocity plot OUTPUTS: OPTIONAL KEYWORDS: NTOT -- Number of plots per page [default: 16] LSIZE -- Label size [default: 1.8] CSIZE -- Numbering character size [default: 1.8] LTHICK -- Line thickness (Default = 1.) XTINT -- xtick interval ENCAPSULATED -- create encapsulated postscript MULTI -- overplot multiple detections OUTLINE -- indicate region used to measure EW with darker line LABEL -- print zabs upper right corner and wobs VOIGT -- [ncolm, dopb] or [ion, ncolm, dopb] structure to overplot Voigt profile VZABS -- redshift to center voigt profiles (default is input z + float) BIN -- bin spectra (simple sum, not S/N-weighted) PLTXTR -- array of wrest, instr to plot extra (doesn't work for multi) PLTERR -- plot error array (changes colors) ROOTDIR - pre-pend string to instr_list file names SUFFIX - for STIS-like files, suffix to search and replace (default: ['f.fits','e.fits']) ; OPTIONAL OUTPUTS: PSFILE -- Postscript filename MSGFIL -- filename to receive messages from MULTI function COMMENTS: EXAMPLES: fuse_calcewn, struct, fil_instr PROCEDURES CALLED: REVISION HISTORY: 12-Sep-2003 Written by JXP 1-Apr-2005 MULTI capability added by KLC 28-Apr-2005 Added zabs in upper right-hand corner of MULTI plots 13-Feb-2006 Added /outline option, KLC 7-Mar-2006 Handle H2 features, KLC 7-Jun-2006 Improve handling of combined instrument flags, add /label 21-Sep-2006 Update /outline,/multi combo 16-Oct-2006 added VOIGT, KLC 8-Dec-2006 added BIN, KLC
(See FUSE/Analysis/fuse_velplt.pro)
NAME: GAUSSFIT PURPOSE: Fit the equation y=f(x) where: F(x) = A0*EXP(-z^2/2) + A3 + A4*x + A5*x^2 and z=(x-A1)/A2 A0 = height of exp, A1 = center of exp, A2 = sigma (the width). A3 = constant term, A4 = linear term, A5 = quadratic term. Terms A3, A4, and A5 are optional. The parameters A0, A1, A2, A3 are estimated and then CURVEFIT is called. CATEGORY: ?? - fitting CALLING SEQUENCE: Result = GAUSSFIT(X, Y [, A]) INPUTS: X: The independent variable. X must be a vector. Y: The dependent variable. Y must have the same number of points as X. KEYWORD INPUTS: CHISQ: Set this keyword to a named variable that will contain the value of the chi-square goodness-of-fit. ESTIMATES = optional starting estimates for the parameters of the equation. Should contain NTERMS (6 if NTERMS is not provided) elements. MEASURE_ERRORS: Set this keyword to a vector containing standard measurement errors for each point Y[i]. This vector must be the same length as X and Y. Note - For Gaussian errors (e.g. instrumental uncertainties), MEASURE_ERRORS should be set to the standard deviations of each point in Y. For Poisson or statistical weighting MEASURE_ERRORS should be set to sqrt(Y). NTERMS = Set NTERMS to 3 to compute the fit: F(x) = A0*EXP(-z^2/2). Set it to 4 to fit: F(x) = A0*EXP(-z^2/2) + A3 Set it to 5 to fit: F(x) = A0*EXP(-z^2/2) + A3 + A4*x SIGMA: Set this keyword to a named variable that will contain the 1-sigma error estimates of the returned parameters. Note: if MEASURE_ERRORS is omitted, then you are assuming that your model is correct. In this case, SIGMA is multiplied by SQRT(CHISQ/(N-M)), where N is the number of points in X and M is the number of terms in the fitting function. See section 15.2 of Numerical Recipes in C (2nd ed) for details. YERROR: The standard error between YFIT and Y. OUTPUTS: The fitted function is returned. OPTIONAL OUTPUT PARAMETERS: A: The coefficients of the fit. A is a three to six element vector as described under PURPOSE. COMMON BLOCKS: None. SIDE EFFECTS: None. RESTRICTIONS: The peak or minimum of the Gaussian must be the largest or smallest point in the Y vector. PROCEDURE: The initial estimates are either calculated by the below procedure or passed in by the caller. Then the function CURVEFIT is called to find the least-square fit of the gaussian to the data. Initial estimate calculation: If NTERMS>=4 then a constant term is subtracted first. If NTERMS>=5 then a linear term is subtracted first. If the (MAX-AVG) of Y is larger than (AVG-MIN) then it is assumed that the line is an emission line, otherwise it is assumed there is an absorbtion line. The estimated center is the MAX or MIN element. The height is (MAX-AVG) or (AVG-MIN) respectively. The width is found by searching out from the extrema until a point is found less than the 1/e value. MODIFICATION HISTORY: DMS, RSI, Dec, 1983. DMS, RSI, Jun, 1995, Added NTERMS keyword. Result is now float if Y is not double. DMS, RSI, Added ESTIMATES keyword. CT, RSI, Feb 2001: Change the way estimates are computed. If NTERMS>3 then a polynomial of degree NTERMS-4 is subtracted before estimating Gaussian coefficients. CT, RSI, Nov 2001: Slight change to above modification: Because a Gaussian and a quadratic can be highly correlated, do not subtract off the quadratic term, only the constant and linear terms. Also added CHISQ, SIGMA and YERROR output keywords. CT, RSI, May 2003: Added MEASURE_ERRORS keyword. CT, RSI, March 2004: If estimate[2] is zero, compute a default value.
(See FIT//x_gaussfit.pro)
NAME: GETCOLOR PURPOSE: The original purpose of this function was to enable the user to specify one of the 16 colors supported by the McIDAS color map by name. Over time, however, the function has become a general purpose function for handling and supporting drawing colors in a device-independent way. In particular, I have been looking for ways to write color handling code that will work transparently on both 8-bit and 24-bit machines. On 24-bit machines, the code should work the same where color decomposition is turned on or off. The program now supports 88 colors. AUTHOR: FANNING SOFTWARE CONSULTING: David Fanning, Ph.D. 1645 Sheely Drive Fort Collins, CO 80526 USA Phone:<PHONE_NUMBER> E-mail<EMAIL_ADDRESS>Coyote's Guide to IDL Programming: http://www.dfanning.com CATEGORY: Graphics, Color Specification. CALLING SEQUENCE: result = GETCOLOR(color, index) OPTIONAL INPUT PARAMETERS: COLOR: A string with the "name" of the color. Valid names are: black magenta cyan yellow green red blue navy pink aqua orchid sky beige charcoal gray white The color YELLOW is returned if the color name can't be resolved. Case is unimportant. If the function is called with just this single input parameter, the return value is either a 1-by-3 array containing the RGB values of that particular color, or a 24-bit integer that can be "decomposed" into that particular color, depending upon the state of the TRUE keyword and upon whether color decomposition is turned on or off. The state of color decomposition can ONLY be determined if the program is being run in IDL 5.2 or higher. INDEX: The color table index where the specified color should be loaded. If this parameter is passed, then the return value of the function is the index number and not the color triple. (If color decomposition is turned on AND the user specifies an index parameter, the color is loaded in the color table at the proper index, but a 24-bit value is returned to the user in IDL 5.2 and higher. This assumes the INDEXED keyword is NOT set.) If no positional parameter is present, then the return value is either a 16-by-3 byte array containing the RGB values of all 16 colors or it is a 16-element long integer array containing color values that can be decomposed into colors. The 16-by-3 array is appropriate for loading color tables with the TVLCT command: Device, Decomposed=0 colors = GetColor() TVLCT, colors, 100 INPUT KEYWORD PARAMETERS: NAMES: If this keyword is set, the return value of the function is a 88-element string array containing the names of the colors. These names would be appropriate, for example, in building a list widget with the names of the colors. If the NAMES keyword is set, the COLOR and INDEX parameters are ignored. listID = Widget_List(baseID, Value=GetColor(/Names), YSize=16) INDEXED: If this keyword is set, the return value is always an index into the color table. In the absence of a color table INDEX parameter, the color is loaded at !P.COLOR < (!D.Table_Size-1). LOAD: If this keyword is set, all 88 colors are automatically loaded starting at the color index specified by the START keyword. Note that setting this keyword means that the return value of the function will be a structure, with each field of the structure corresponding to a color name. The value of each field will be an index number (set by the START keyword) corresponding to the associated color, or a 24-bit long integer value that creates the color on a true-color device. What you have as the field values is determined by the TRUE keyword or whether color decomposition is on or off in the absense of the TRUE keyword. It will either be a 1-by-3 byte array or a long integer value. START: The starting color index number if the LOAD keyword is set. This keyword value is ignored unless the LOAD keyword is also set. The keyword is also ignored if the TRUE keyword is set or if color decomposition in on in IDL 5.2 and higher. The default value for the START keyword is !D.TABLE_SIZE - 89. TRUE: If this keyword is set, the specified color triple is returned as a 24-bit integer equivalent. The lowest 8 bits correspond to the red value; the middle 8 bits to the green value; and the highest 8 bits correspond to the blue value. In IDL 5.2 and higher, if color decomposition is turned on, it is as though this keyword were set. COMMON BLOCKS: None. SIDE EFFECTS: None. RESTRICTIONS: The TRUE keyword causes the START keyword to be ignored. The NAMES keyword causes the COLOR, INDEX, START, and TRUE parameters to be ignored. The COLOR parameter is ignored if the LOAD keyword is used. On systems where it is possible to tell the state of color decomposition (i.e., IDL 5.2 and higher), a 24-bit value (or values) is automatically returned if color decomposition is ON. EXAMPLE: To load a yellow color in color index 100 and plot in yellow, type: yellow = GETCOLOR('yellow', 100) PLOT, data, COLOR=yellow or, PLOT, data, COLOR=GETCOLOR('yellow', 100) To do the same thing on a 24-bit color system with decomposed color on, type: PLOT, data, COLOR=GETCOLOR('yellow', /TRUE) or in IDL 5.2 and higher, DEVICE, Decomposed=1 PLOT, data, COLOR=GETCOLOR('yellow') To load all 88 colors into the current color table, starting at color index 100, type: TVLCT, GETCOLOR(), 100 To add the color names to a list widget: listID = Widget_List(baseID, Value=GetColor(/Names), YSize=16) To load all 88 colors and have the color indices returned in a structure: DEVICE, Decomposed=0 colors = GetColor(/Load, Start=1) HELP, colors, /Structure PLOT, data, COLOR=colors.yellow To get the direct color values as 24-bit integers in color structure fields: DEVICE, Decomposed=1 colors = GetColor(/Load) PLOT, data, COLOR=colors.yellow Note that the START keyword value is ignored if on a 24-bit device, so it is possible to write completely device-independent code by writing code like this: colors = GetColor(/Load) PLOT, data, Color=colors.yellow MODIFICATION HISTORY: Written by: David Fanning, 10 February 96. Fixed a bug in which N_ELEMENTS was spelled wrong. 7 Dec 96. DWF Added the McIDAS colors to the program. 24 Feb 99. DWF Added the INDEX parameter to the program 8 Mar 99. DWF Added the NAMES keyword at insistence of Martin Schultz. 10 Mar 99. DWF Reorderd the colors so black is first and white is last. 7 June 99. DWF Added automatic recognition of DECOMPOSED=1 state. 7 June 99. DWF Added LOAD AND START keywords. 7 June 99. DWF. Replaced GOLD with CHARCOAL color. 28 Oct 99. DWF. Added INDEXED keyword to force indexed color mode. 28 Oct 99. DWF. Fixed problem of "aqua" and "pink" being mixed up. 18 Mar 00. DWF. Changed ON_ERROR from 1 to 2, and improved error handling. 2 Aug 00. DWF. Increased the known colors from 16 to 88. 19 October 2000. DWF. Fixed typos in which "thisColor" was written as "theColor". 10 AUG 2001. DWF.
(See Color//getcolor.pro)
NAME: grbafterglow__define Version 1.1 PURPOSE: Structure for a GRB light curve CALLING SEQUENCE: tmp = {abslinstrct} INPUTS: RETURNS: OUTPUTS: OPTIONAL KEYWORDS: OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: Written by JXP
(See GRB//grbafterglow__define.pro)
NAME: grb_autochrt Version 1.1 PURPOSE: Creates a DSS chart from a BACODINE. [old and not well tested] CALLING SEQUENCE: grb_autochrt, fil INPUTS: fil -- Email containing the coord RETURNS: flux= -- PS file of the finding chart OUTPUTS: OPTIONAL KEYWORDS: OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: grb_fxlum, 'baco_050730' PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: 30-Jul-2005 Written by JXP
(See GRB//grb_autochrt.pro)
NAME: grb_calclum Version 1.1 PURPOSE: Given a grb structure (magnitude at a time t, z, spectral slope) calculates the luminsoity at any time (erg/s/cm^2/Hz) CALLING SEQUENCE: lum_nu = grb_calclum(grb, nu, [t]) INPUTS: grb -- GRB structure nu -- Frequency (GRB frame) [t] -- Time (observer frame). Default = t0 in GRB structure RETURNS: lum_nu= OUTPUTS: OPTIONAL KEYWORDS: H0 -- Set Hubble constant TAVG= -- Time interval to calculate average luminosity across OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: 17-Feb-2006 Written by JXP
(See GRB//grb_calclum.pro)
NAME: grb_calcphot Version 1.1 PURPOSE: Calculate the number of photons emitted in an energy interval dE during a time interval dt. The user inputs a structure which describes the GRB afterglow light curve. CALLING SEQUENCE: total_phot = grb_calcphot( dE, dt, grb_after, Rphot=, nphot=) INPUTS: dE -- Energy interval (GRB frame) [eV] dt -- time interval (observer frame) grb_after -- Afterglow structure RETURNS: total_phot -- Number of photons emitted in the energy and time intervals OUTPUTS: OPTIONAL KEYWORDS: Rphot= -- Radius at which to calculate the column density of photons nphot= -- Column density of photons at pecified distance /SILENT -- Suppress cosmo info OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: 17-Feb-2006 Written by JXP
(See GRB//grb_calcphot.pro)
NAME: grb_fxlum Version 1.1 PURPOSE: Calculate the flux for a Band function. CALLING SEQUENCE: grb_fxlum, fini, tini, freq, RAD=, FLUX=, LUM=, Z=, $ tEarth=, TEXP=, TSTART=, NSTP= INPUTS: E -- Energy (keV) alpha -- Power-law exponent beta -- Power-law exponent RETURNS: flux= -- Array of flux values computed as function of time OUTPUTS: OPTIONAL KEYWORDS: A= -- Radiative expansion [Default: adiabatic] OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: 21-Apr-2008 Written by JXP
(See GRB//grb_bandfunc.pro)
NAME: grb_fxlum Version 1.1 PURPOSE: Calculates GRB flux as a function of time given the flux at one point in time. The solution is based on the paper by Sari, Piran, & Narayan 1998. CALLING SEQUENCE: grb_fxlum, fini, tini, freq, RAD=, FLUX=, LUM=, Z=, $ tEarth=, TEXP=, TSTART=, NSTP= INPUTS: fini -- Flux measured at tini in muJy tini -- Time at Earth when fini was measured (seconds) freq -- Frequency of the radiation RETURNS: flux= -- Array of flux values computed as function of time OUTPUTS: OPTIONAL KEYWORDS: /RAD -- Radiative expansion [Default: adiabatic] z= -- Redshift [default: 1.] tstart= -- Starting time of observation [default: 3600.] tend= -- Starting time of observation [default: 7200.] nstp= -- Number of time steps [default: 1000L] OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: grb_fxlum, 1., 7200., 1e15 PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: 29-Oct-2003 Written by JXP (based on Sari, Piran, Narayan 1998)
(See GRB//grb_fxlum.pro)
NAME: grb_prslcurv Version 1.1 PURPOSE: Parses a data file of GRB light curves and returns a structure which parameterizes it. CALLING SEQUENCE: INPUTS: fil -- Data file of light curves RETURNS: struct -- Structure describing afterglow light curves OUTPUTS: OPTIONAL KEYWORDS: NAM= -- Name of GRB of interest. Leave blank to get an array of structures for the various light curves. OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: 17-Feb-2006 Written by JXP
(See GRB//grb_prslcurv.pro)
NAME: grb_timeion Version 1.0 PURPOSE: Calculates the excitation rate as a function of Luminosity and distance and abundance CALLING SEQUENCE: INPUTS: grb -- Structure for GRB afterglow RETURNS: OUTPUTS: Creates a Plot OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: May-2007 Written by JXP
(See GRB//grb_timeion.pro)
NAME: g_mkvoigt Version 1.0 PURPOSE: create voigt profile flux arrays for output files from vpfit CALLING SEQUENCE: g_mkvoigt, vpfil, fluxfil, TLIST=, FITSFIL=, PSFIL=, /DAT INPUTS: vpfil - output fort.26 vpfil fluxfil - wavelength, flux, sig of qso to be fit DAT - set this flag if the input fluxfil is ASCII OPTIONAL INPUTS: OUTPUTS: FITSFIL - output fits file OPTIONAL OUTPUTS: PSFIL - output postscript plots of fitting regions COMMENTS: this procedure (because of call to x_voigt) is VERY expensive! EXAMPLES: PROCEDURES CALLED: x_voigt REVISION HISTORY: 21-Feb-2005 Created by GEP
(See Spec/Voigt//g_mkvoigt.pro)
NAME: hires_cut_35 Version 1.1 PURPOSE: Zero out the first 35 points of a HIRES spectrum. I cant even recall why I do it. CALLING SEQUENCE: hires_cut_35, fil INPUTS: fil -- Name of HIRES file to edit RETURNS: OUTPUTS: OPTIONAL KEYWORDS: OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: ?? Written by JXP
(See Keck/HIRES//hires_cut_35.pro)
NAME: hires_upd_nam Version 1.1 PURPOSE: Set the FILENAME, SIGFILE, and CONTFILE header key cards CALLING SEQUENCE: hires_upd_nam, fil, filnm, signm, contnm INPUTS: fil -- Name of HIRES file to edit RETURNS: OUTPUTS: OPTIONAL KEYWORDS: OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: ?? Written by JXP
(See Keck/HIRES//hires_upd_nam.pro)
NAME: hires_wav PURPOSE: Create a line list appropriate for the HIRES emulator provided the redshift. CALLING SEQUENCE: hires_wav, z, fil, /LLS INPUTS: z -- Redshift fil -- Output fil RETURNS: OUTPUTS: OPTIONAL KEYWORDS: /LLS -- Create a line list for LLS OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: hires_wav, 2.2, 'q0440-221_wav.dat' PROCEDURES CALLED: REVISION HISTORY: 17-Nov-2003 Written by JXP
(See Keck/HIRES//hires_wav.pro)
NAME: kaststrct__define Version 1.1 PURPOSE: Kast IDL structure CALLING SEQUENCE: tmp = {kaststrct} INPUTS: RETURNS: OUTPUTS: OPTIONAL KEYWORDS: OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: 01-Mar-2003 Written by JXP
(See Lick/Kast/General/kaststrct__define.pro)
NAME: kast_ar Version 1.1 PURPOSE: Reads the Kast IDL structure from fits file into memory. The program grabs the first file in the directory with kast_*fits CALLING SEQUENCE: kast = kast_ar(file) INPUTS: [file] - Filename (default: first file in list ./kast_*fits*) RETURNS: kast - Kast IDL structure OUTPUTS: OPTIONAL KEYWORDS: OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: kast = kast_ar() PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: 01-Mar-2003 Written by JXP
(See Lick/Kast/General/kast_ar.pro)
NAME: kast_calibstd Version 1.1.5 PURPOSE: Creates a sensitivity function from a standard star; sensfunc can be used by kast_flux to flux-calibrate science-object spectra CALLING SEQUENCE: kast_calibstd, kast, indx, outfil, STFIL=, STTYPE= INPUTS: kast -- Kast IDL structure indx -- Index of standard star (not obj_id) REQUIRED KEYWORDS: STFIL= -- Spectrophotometric file for the standard star to be processed -- Units are F_lambda vs wavelength STTYPE= -- Type of standard file - tells the program whether to read it using xmrdfits (STTYPE=fits, vectors are st.wavelength and st.flux) or readcol (STTYPE=ascii, columns are wavelength, f_lambda) RETURNS: OUTPUTS: outfil -- Name of sensitivity function (written with mwrfits, readable with xmrdfits) OPTIONAL KEYWORDS: OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: kast_calibstd, kast, 83, 'Calibs/sensfunc_test', stfil='kastsens_g191g1d46', sttype=fits PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: 03-Mar-2003 Written by JXP 25-Jan-2005 editing by SLM 12-Nov-2005 revert code to use indx correctly, KLC
(See Lick/Kast/Calibs/kast_calibstd.pro)
NAME: kast_combspec Version 1.1 PURPOSE: Coadd kast spectra using x_combspec CALLING SEQUENCE: kast_combspec, kast, setup, side, obj_id, [exp_id] INPUTS: kast -- Kast IDL structure setup -- Setup value side -- Specific camera [blue (1) vs. red (2)] obj_id -- Object value [exp_id] -- Exposure indices RETURNS: OUTPUTS: OPTIONAL KEYWORDS: /CHK -- Show the final combined spectrum OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: kast_combspec, kast, 0, 1, 2 PROCEDURES/FUNCTIONS CALLED: x_combspec kast_wrspec REVISION HISTORY: 28-August-2003 Written by GEP
(See Lick/Kast/Extract/kast_combspec.pro)
NAME: kast_crays Version 1.1 PURPOSE: Detect cosmic rays, set affected pixels to have var = -1 CALLING SEQUENCE: kast_crays, kast, setup, side, obj_id, [exp_id], CHK=chk INPUTS: kast -- Kast IDL structure setup -- Setup value side -- Specific camera [blue (1) vs. red (2)] obj_id -- Object value [exp_id] -- Exposure indices OUTPUTS: OPTIONAL KEYWORDS: /CHK -- Print out info on CRays COMMENTS: EXAMPLES: kast_crays, kast, 0, 1, 2, /chk PROCEDURES/FUCTIONS CALLED: REVISION HISTORY: 01-September-2003 Written by GEP
(See Lick/Kast/Extract/kast_crays.pro)
NAME: kast_editstrct Version 1.1 PURPOSE: Launches a gui to edit the Kast IDL structure CALLING SEQUENCE: kast_editstrct, kast INPUTS: kast -- Kast IDL structure RETURNS: OUTPUTS: OPTIONAL KEYWORDS: OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: kast_editstrct, kast PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: 01-Mar-2003 Written by JXP
(See Lick/Kast/General/kast_editstrct.pro)
NAME: kast_extract Version 1.1 PURPOSE: Extract a 1D spectrum from a Kast 2D image. CALLING SEQUENCE: kast_extract, kast, setup, side, obj_id, [exp], $ APER=, SKYNORD=, /STD, YMODEL=, /BOXCAR INPUTS: kast -- Kast IDL structure setup -- Setup value side -- Specific camera [blue (1) vs. red (2)] obj_id -- Object value [exp] -- Exposure indices RETURNS: OUTPUTS: OPTIONAL KEYWORDS: /BOXCAR -- Extract with a boxcar [default: optimal] APER= -- Aperture (for boxcar primarily) OPTIONAL OUTPUTS: YMODEL= -- Image fit created in optimal extraction COMMENTS: EXAMPLES: PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: 01-Mar-2003 Written by JXP
(See Lick/Kast/Extract/kast_extract.pro)
NAME: kast_flux Version 1.1 PURPOSE: Flux a set of Kast spectra given a sensitivity file. CALLING SEQUENCE: kast_flux, kast, setup, side, obj_id, [exp], /STD, SENSFIL= INPUTS: kast -- Kast IDL structure setup -- Setup value side -- Side of Kast (blue=1, red=2) obj_id -- Object ID value [exp] -- Exposure indices RETURNS: OUTPUTS: OPTIONAL KEYWORDS: /STD -- Flux a standard SENSFIL -- Name of sensitivity file OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: kast_flux, kast, 0, 1, 0 PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: 03-Mar-2003 Written by JXP 12-Nov-2005 added blue g2 (600/4310) default (KLC)
(See Lick/Kast/Calibs/kast_flux.pro)
NAME: kast_fndobj Version 1.0 PURPOSE: Find object on the image and then trace using x_trace. The code can look automatically or the user can look interactively. CALLING SEQUENCE: kast_fndobj, kast, setup, side, obj_id, [exp], $ /CHK, /NOCLOBBER, SCICLM=, /STD, /AUTO, SCIROW= INPUTS: kast -- Kast IDL structure setup -- Setup value side -- Specific camera [blue (1) vs. red (2)] obj_id -- Object value [exp] -- Exposure indices RETURNS: OUTPUTS: OPTIONAL KEYWORDS: SCICLM -- Column to look for object in SCIROW -- Approximate row expected for the object /AUTO -- Look for the object automatically /NOCLOBBER -- Do not overwrite the object structure /STD -- Standard star /CHK -- Plot the image and the trace OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: kast_fndobj, kast PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: 01-Mar-2003 Written by JXP 12-Nov-2005 Added SCICLM defaults for d55, blue G2 (600/4310) and red 600/7500, KLC
(See Lick/Kast/Extract/kast_fndobj.pro)
NAME: kast_mkarc Version 1.0 PURPOSE: Process arc files (flatten, combine) CALLING SEQUENCE: kast_mkarc, kast, setup, /CLOBBER INPUTS: kast -- Kast IDL structure setup -- Setup value RETURNS: OUTPUTS: OPTIONAL KEYWORDS: /CLOBBER -- Clobber any previous processed image OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: kast_mkarc, kast PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: 27-Aug-2002 Written by JXP
(See Lick/Kast/Calibs/kast_mkarc.pro)
NAME: kast_mkflat Version 1.1 PURPOSE: Process flat file CALLING SEQUENCE: kast_mkflat, kast, slit INPUTS: kast -- Kast IDL structure setup -- Setup value RETURNS: OUTPUTS: One normalized flat per slit width OPTIONAL KEYWORDS: /CLOBBER -- Clobber any previous processed image OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: kast_mkflat, kast, 1L PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: 01-Mar-2003 Written by JXP
(See Lick/Kast/Calibs/kast_mkflat.pro)
NAME: kast_pltobj Version 1.1 PURPOSE: Calls x_pltobj after gathering the relevant data CALLING SEQUENCE: kast_pltobj, kast, [setup, side, obj_id, obj_nm], EXPSR=, XSIZE=, $ YSIZE=, /FLUX, /FSPEC, XMAX=, /NOIMG, /NOWV, /COMB INPUTS: kast -- Kast IDL structure [setup] -- Setup value [side] -- Specific camera [blue (1) vs. red (2)] [obj_id] -- Object value RETURNS: OUTPUTS: OPTIONAL KEYWORDS: /NOIMG -- Do not display 2D image of spectrum /COMB -- Show the combined 1D spectra EXPSR -- Index of spectrum /FLUX -- Show the fluxed spectra XMAX -- Max height of spectrum [default: 7e-17] OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: kast_pltobj, kast, /noimg PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: 30-Jul-2002 Written by JXP ?? Major revisions by GEP
(See Lick/Kast/Spec/kast_pltobj.pro)
NAME: kast_proc Version 1.1 PURPOSE: Process an image (flatten) and create variance array. The routine also turns the DN into electrons by scaling by the gain. WARNING! Assumes 1 flat for all images CALLING SEQUENCE: kast_proc, kast, setup, obj_id, side, INDEX=, /CLOBBER INPUTS: kast - Kast IDL structure setup -- Setup value side -- Specific camera [blue (1) vs. red (2)] obj_id -- Object value RETURNS: OUTPUTS: Processed file (Final/f_###.ccd) OPTIONAL KEYWORDS: INDEX - Indices of objects to process FLAT - Flat file /CLOBBER - Overwrite processed image if it exists OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: kast_proc, kast PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: 18-Jul-2002 Written by JXP
(See Lick/Kast/General/kast_proc.pro)
NAME: kast_qckredux Version 1.1 PURPOSE: Perform a quick and dirty (and rather accurate) reduction of a Kast spectrum. Very useful at the telescope. CALLING SEQUENCE: kast_qckredux, img, flat, spec, sig, ARC=, OVR=, $ CLINE=, APER=, SKYFUNC=, SKYNORD=, SKYREG=, /DISPLAY, /NOREJ, TRACE=, /NOSKY=, STRCT=, RN=, GAIN=, VAR=, CRUDE=, TINTER=, /SILENT, WAVE=, /OPTIMAL, /AINTER, OBJLIN=, /DEBUG, /APINTER, YMODEL=, SIGMA=, /CHK= INPUTS: img -- Image to extract from (raw fits file) flat -- Name of flat file (fits) RETURNS: spec -- 1D spectrum sig -- Error of 1D spectrum OUTPUTS: OPTIONAL KEYWORDS: /CRUDE -- Use the routine trace_crude to trace [recommended] CLINE= -- Row to use to identify object [default: half way on image] APER= -- Aperture for boxcar extraction (output or input) TRACE= -- Trace of the object (output or input) /CHKTRC -- Check the trace by eye /DISPLAY -- Display the sky subtracted image with xatv /NOREJ -- Turn off rejection in sky subtraction (not recommended) /AINTER -- Interactively fiddle with the Arc peakup OBJLIN= -- Row near the object trace [default: center of image] /OPTIMAL -- Perform optimal extraction YMODEL -- 2D model of the image created by extract_image RN= -- Readnoise of the image [default: 3.29] ARC= -- Arc image (fits file) /DEBUG -- Debug the program (this one often 'breaks') SIGMA= -- Approximate sigma of the Gaussian profile (for Optimal) OPTIONAL OUTPUTS: WAVE= -- Wavelength array (requires Arc image) COMMENTS: EXAMPLES: kast_qckredux, 'b109.ccd', spec, sig, WAVE=wave, ARC='b102.ccd', FLAT='b100.ccd', /OPTIMAL, /NOSKY PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: 01-Mar-2003 Written by JXP
(See Lick/Kast/Extract/kast_qckredux.pro)
NAME: kast_sensstd Version 1.0 PURPOSE: Process a standard star and create the sensitivity file CALLING SEQUENCE: INPUTS: kast - ESI structure RETURNS: OUTPUTS: Image with rdxstdered light removed OPTIONAL KEYWORDS: DFLAT - Use Dome flats where possible OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: esi_echrdxstd, esi PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: 12-Jan-2008 Written by JXP
(See Lick/Kast/Calibs/kast_sensstd.pro)
NAME: kast_specsetup Version 1.1 PURPOSE: Examines the Kast IDL structure, checks for appropriate Flats and Arcs and then outputs a summary ASCII file. CALLING SEQUENCE: kast_specsetup, kast, OUTFIL= INPUTS: kast -- Kast IDL structure RETURNS: OUTPUTS: OPTIONAL KEYWORDS: OUTFIL= -- Name of ASCII file (default: kast_specsumm.txt') OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: kast_specsetup, kast PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: 01-Mar-2003 Written by JXP
(See Lick/Kast/General/kast_specsetup.pro)
NAME: kast_strct Version 1.1 PURPOSE: Creates and outputs a structure for a series of Kast frames. This structure organizes the data for the night and is used to run most of the programs in the Kast package CALLING SEQUENCE: kast_strct, struct, LIST=, /NOMKDIR, OUTFIL=, /NOEDIT INPUTS: RETURNS: OUTPUTS: struct -- Kast IDL structure OPTIONAL KEYWORDS: LIST= - Image list: e.g. 'gd_files.lst' [Default is 'Raw/kast*.fits'] /NOMKDIR - Do not make default directories /NOEDIT - Do not edit the hand OUTFIL= - Name of fits output file [default: 'kaststrct.fits'] OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: kast_strct, nght1_strct, /MKDIR PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: 01-Mar-2003 Written by JXP
(See Lick/Kast/General/kast_strct.pro)
NAME: kast_wavesol Version 1.1 PURPOSE: Create a wavelength solution for a specific object using an archived solution. The wavelength array in the object structure and writes that structure out. CALLING SEQUENCE: kast_wavesol, kast, setup, side, obj_id, [exp], /STD, /SILENT, /AINTER, /AUTO, CALIB=, CALIBFIL=, NFIN= ,ARC_SAT = INPUTS: kast -- Kast IDL structure setup -- Setup value side -- Specific camera [blue (1) vs. red (2)] obj_id -- Object value [exp] -- Exposure indices RETURNS: OUTPUTS: OPTIONAL KEYWORDS: /AUTO -- Automatically fit the arc NFIN= -- Requires nfin lines to start the fit [default: 5] /SILENT /AINTER -- Peak up on the arc cross-correlation interactively ARC_SAT= -- max counts for arc lines for determining which to use OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: 01-Mar-2003 Written by JXP 12-Nov-2005 Added defaults for Blue G2 (600/4310) and Red 600/7500 and ARC_SAT keyword, KLC
(See Lick/Kast/Calibs/kast_wavesol.pro)
NAME: kast_wrspec Version 1.0 PURPOSE: Writes kastspectrct to a FITS file CALLING SEQUENCE: kast_wrspec, kastspecstrct, outfil, /READ INPUTS: kastspecstrct - Kast Combined Spectrum structure RETURNS: OUTPUTS: outfil - FITS file for the structure OPTIONAL KEYWORDS: /READ -- Reverse the operation (read from the FITS file) OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: kast_wrspec, kastspecstrct, outfil PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: 03-Aug-2003 Written by GEP
(See Lick/Kast/Extract/kast_wrspec.pro)
NAME: kast_wrstrct Version 1.0 PURPOSE: Write the kast structure to a FITS file and write an ASCII summary CALLING SEQUENCE: kast_wrstrct, kast, /ANONLY, OUTFIL=, FITS= INPUTS: kast - An ESI structure RETURNS: OUTPUTS: OPTIONAL KEYWORDS: ANONLY - Only print files with flg_anly NE 0 OPTIONAL OUTPUTS: OUTFIL= - Output file (default: kast.list) FITS= - Name of fits output file COMMENTS: EXAMPLES: kast_wrstrct, kast, FITS='kast_13oct02.fits' PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: 01-Mar-2003 Written by JXP
(See Lick/Kast/General/kast_wrstrct.pro)
NAME: lco_guidestr Version 1.1 PURPOSE: Inputting a photometry structure, parse out a set of stars useful for guide stars for WFCCD masks. CALLING SEQUENCE: lco_guidestr, phot, mmin, mmax INPUTS: phot -- Photometry structure mmin -- Min mag for guide star mmax -- Max mag for guide star RETURNS: OUTPUTS: 'Masks/guidestr.dat' -- Guide star output file OPTIONAL KEYWORDS: OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: ?? Written by JXP
(See lcoovi//lco_guidestr.pro)
NAME: lco_phot Version 1.1 PURPOSE: Turns the photometry output (B,R filters) into a structure CALLING SEQUENCE: lco_phot, phot_fil, phot_str INPUTS: phot_fil -- Photometry ASCII file RETURNS: phot_str -- Photometry structure OUTPUTS: OPTIONAL KEYWORDS: OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: ?? Written by JXP
(See lcoovi//lco_phot.pro)
NAME: lco_targets Version 1.1 PURPOSE: Turns a Sextractor output file into an IDL structure CALLING SEQUENCE: lco_targets, name, galstr INPUTS: name -- Name of Sextractor file RETURNS: galstr -- IDL galaxy structure OUTPUTS: OPTIONAL KEYWORDS: OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: ?? Written by JXP
(See lcoovi//lco_targets.pro)
NAME: lliststrct__define Version 1.1 PURPOSE: Structure for the line lists CALLING SEQUENCE: tmp = {lliststrct} INPUTS: RETURNS: OUTPUTS: OPTIONAL KEYWORDS: OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: Written by JXP
(See Spec/Lines//lliststrct__define.pro)
NAME: lls_stat PURPOSE: Given a LLS struct and gz list, determine the indices of those LLS satisfying the statistical sample. CALLING SEQUENCE: sdss_llsstat INPUTS: RETURNS: OUTPUTS: OPTIONAL KEYWORDS: OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: PROCEDURES CALLED: REVISION HISTORY: Feb-2009 Written by JXP
(See SDSS/LLS/sdss_llsstat.pro)
NAME: lndltstr__define Version 1.1 PURPOSE: Structure to handle Landolt star data CALLING SEQUENCE: tmp = {lndltstr} INPUTS: RETURNS: OUTPUTS: OPTIONAL KEYWORDS: OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: 07-Aug-2001 Written by JXP
(See IMG/Photometry//lndltstr__define.pro)
NAME: lris_calibstd Version 1.1 PURPOSE: CURRENTLY UNDER CONSTRUCTION CALLING SEQUENCE: spec = x_apall(ydat, [head]) INPUTS: ydat - Values [head] - Header RETURNS: OUTPUTS: OPTIONAL KEYWORDS: wave - wavelength array DISPLAY - Display the sky subtracted image with xatv OVR - String array for ov region: '[2050:2100, *]' ERROR - Variance array OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: kast_calibstd, kast, 0, 1, 0 PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: 03-Mar-2003 Written by JXP
(See Keck/LRIS/Flux/lris_calibstd.pro)
NAME: lris_flux Version 1.1 PURPOSE: Flux an LRIS spectrum given a sensitivity function (archived) CALLING SEQUENCE: flux = lris_flux(wave, spec, flux_fil, SIG=, FSIG=) INPUTS: wave -- Wavelength array spec -- LRIS spectrum flux_fil -- Sensitivity function RETURNS: flux -- Fluxed LRIS spectrum OUTPUTS: OPTIONAL KEYWORDS: EXP= -- Exposure time [default: 1.] SIG= -- Error array to flux as well OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: kast_calibstd, kast, 0, 1, 0 PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: 29-Aug-2003 Written by JXP
(See Keck/LRIS/Flux/lris_flux.pro)
NAME: lris_sensstd Version 1.0 PURPOSE: Process a standard star and create the sensitivity file for LRIS CALLING SEQUENCE: INPUTS: std_fil -- A processed standard star using the LowRedux pipeline RETURNS: OUTPUTS: Image with rdxstdered light removed OPTIONAL KEYWORDS: DFLAT - Use Dome flats where possible OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: esi_echrdxstd, esi PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: 12-Jan-2008 Written by JXP
(See Keck/LRIS/CALIBS/lris_sensstd.pro)
NAME: lwdfspecstrct__define Version 1.1 PURPOSE: Creates a structure for Low dispersion spectroscopy that will hold the wavelength, flux and error arrays. Also includes the ZANS structure which is useful for using SDSS redshift identification. CALLING SEQUENCE: tmp = {lwdfspecstrct} INPUTS: RETURNS: OUTPUTS: OPTIONAL KEYWORDS: OPTIONAL OUTPUTS: COMMENTS: Currently a maximum of 5000 pixels EXAMPLES: PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: Written by JXP
(See Spec/Analysis//lwdfspecstrct__define.pro)
NAME: manuakea_sky Version 1.1 PURPOSE: Gives an estimate of the sky brightness for Mauna Kea CALLING SEQUENCE: mag = maunakea_sky( wave, phase ) INPUTS: wave= -- Wavelength array phase= -- Phase of the moon [days] RETURNS: mag= -- Sky brightness in AB mags OUTPUTS: OPTIONAL KEYWORDS: OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: 27-Oct-2005 Written by JXP based on HIRES S2N code
(See Obs//maunakea_sky.pro)
NAME: manuakea_trans Version 1.1 PURPOSE: Extinction of the atmosphere at Mauna Kea CALLING SEQUENCE: extinct = maunakea_trans(wave) INPUTS: wave= -- Wavelengths of interest RETURNS: extinct -- Extinction in mag OUTPUTS: OPTIONAL KEYWORDS: OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: PROCEDURES/FUNCTIONS CALLED: showfits querydss REVISION HISTORY: 27-Oct-2005 Written by JXP based on HIRES S2N code
(See Obs//maunakea_trans.pro)
NAME: mslitstrct__define Version 1.1 PURPOSE: This structure is used to save info about a slit in a mask. In particular, one saves the edges of the slit. CALLING SEQUENCE: tmp = {mslitstrct} INPUTS: RETURNS: OUTPUTS: OPTIONAL KEYWORDS: OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: Written by JXP
(See Spec/Flux//thrustrct__define.pro)
NAME: mslitstrct__define Version 1.1 PURPOSE: This structure is used to save info about a slit in a mask. In particular, one saves the edges of the slit. CALLING SEQUENCE: tmp = {mslitstrct} INPUTS: RETURNS: OUTPUTS: OPTIONAL KEYWORDS: OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: Written by JXP
(See Spec/Slits//mslitstrct__define.pro)
NAME: newabslinstrct__define Version 1.1 PURPOSE: Current structure for absorption lines CALLING SEQUENCE: tmp = {newabslinstrct} INPUTS: RETURNS: OUTPUTS: OPTIONAL KEYWORDS: OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: Written by JXP
(See Spec/Lines//newabslinstrct__define.pro)
NAME: observable Version 1.1 PURPOSE: Calculate the airmass for an obj with a given DEC at an observatory with a given DEC and an offset in RA CALLING SEQUENCE: observable, month, obs_dec, obj_ra, obj_dec, PAR=par, $ POS=pos, L1=l1, L2=l2, KECK=keck, VLT=vlt INPUTS: month -- obs_dec -- DEC of the observatory obj_ra -- RA of the object obj_dec -- DEC of the object RETURNS: OUTPUTS: OPTIONAL KEYWORDS: /KECK -- Calculate for Keck /VLT -- Calculate for VLT OPTIONAL OUTPUTS: COMMENTS: written by E. Gawiser, last modified 05jul03 anyone can use this code, please notify<EMAIL_ADDRESS>regarding any errors found! WARNING: POS=0 is equivalent to not setting it, so use e.g. 0.001 WARNING: "middle of the night" is not local midnight but is much more useful in Chile it's about 00:40 in winter, 01:40 in summer with daylight savings! dec in degrees, RA in hours month is from 1.00 to 12.99, use decimals for days. e.g automnal equinox is roughly 9.67. (No accounting for 28/30/31 days) NOTE: To get Keck Nasmyth platform limits, use /keck. /par will output the amplitude of atmospheric dispersion from L1 to L2 along the parallactic angle (default is 3000,10000A) and if POS is set it will output the component perpendicular to a slit at position angle POS EXAMPLE FOR IMAGING: observable, 1.7, -30., 3.5, -27. models observing the CDF-S (03 30 -27) on January 21 from CTIO The program outputs the RA overhead, length of night, and airmass values. EXAMPLE FOR SPECTROSCOPY: observable, 10.3, 20., 3.5, -27., /par, /keck, l1=3500, l2=6000, pos=0.01 models observing the CDF-S (03 30 -27) on October 9 from Keck with slit(s) at position angle = 0.01 The program outputs the Nasmyth platform limits, RA overhead, length of night, airmass, parallactic angle, total amplitude of ADR from 3500 to 6000A, and amplitude of that ADR perpendicular to POS=0.01 for this field. you can call /vlt instead of /keck to use atmospheric conditions at Paranal (about 50% more ADR) instead of Mauna Kea. Calling neither uses atmospheric conditions at La Silla which cause a bit more ADR than Paranal. Note that parallactic angle is defined as angle towards zenith i.e. from blue to red light of the object, with North=0, East=90, etc. This has been tested versus the skycalc code and works fine anywhere on the sky (doesn't mean much once the object is below the horizon however ;) ).
(See Obs//observable.pro)
NAME: parse_dlalst V1.2 PURPOSE: Given a list of DLA base files, fill up the DLA structure. THis program also defines the DLA structure {sDLA}. CALLING SEQUENCE: parse_DLAlst, dla, [list] INPUTS: [list] -- List of DLA base files. [default: '/u/xavier/DLA/Lists/tot_dla.lst'] RETURNS: OUTPUTS: dla -- IDL DLA structure OPTIONAL KEYWORDS: /ION - Input ionic column densities /NOELM - Supress elemental and ion structures (saves memory) /NORELM - Supress inputting Elemental [X/H] values FILE= -- The input is the dat filename not a list of dat files /NOHIS -- Suppress HI error in [X/H] values /EW -- Fill up the ion arrays with EW values instead of column densities. This reads the .EW files instead of .ion /FINE -- This fills up arrays for fine-structure states (e.g. SiII*). By default CII* is already considered ROOT= Path to the DLA tree OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: parse_dlalst, dla, '/u/xavier/DLA/Lists/tot_dla.lst' parse_dlalst, dla, '/u/xavier/DLA/Data/GRB051111.z154.dat', /FILE, /ION PROCEDURES CALLED: REVISION HISTORY: 31-May-2001 Written by JXP 02-Jan-2003 Added metallicity structure
(See DLA//parse_dlalst.pro)
NAME: parse_phot Version 1.1 PURPOSE: Reads in the BRI ASCII file from DLA photometery to an IDL structure. Not too useful for the common folk. CALLING SEQUENCE: parse_phot, file, nobj, supstrc, FLAG= INPUTS: RETURNS: OUTPUTS: OPTIONAL KEYWORDS: OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY:
(See IDLA//parse_phot.pro)
NAME: parse_sdss Version 1.1 PURPOSE: Given an SDSS spectrum, return flux, wavelength, etc. CALLING SEQUENCE: parse_sdss, fil, flux, wave, conti, SIG=, IVAR=, ZQSO=, $ NPIX=, HEAD=, CFIL=, CDIR= INPUTS: fil -- Name of SDSS file OR [PLATE, FIBER] RETURNS: flux -- Spectral flux array wave -- Wavelength array conti -- Continuum array (requires CFIL) OUTPUTS: OPTIONAL KEYWORDS: CFIL= -- Name of continuum file CDIR= -- Name of directory to continuum files OPTIONAL OUTPUTS: SIG= -- Sigma array IVAR= -- Inverse variance array ZQSO= -- Redshift of the quasar (or galaxy) NPIX= -- Number of pixels in the spectrum HEAD= -- Full header of the SDSS spectrum COMMENTS: EXAMPLES: parse_sdss, fil PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: 05-Sep-2003 Written by JXP
(See SDSS/General/parse_sdss.pro)
NAME: pca_qsotilt Version 1.0 PURPOSE: Attempt to fit in logarithmic flux a low order polynomial to match the CIV region (range) coeffs contains the [npoly,nspec] coefficients based on rlam This fit is done in logarithmic flux vs. logarithmic wavelength CALLING SEQUENCE: pca_qsotilt, rlam, flux, invvar, xmed, ymed, tilt, tiltivar, $ coeff, npoly=, range=, answer=, FLG_TILT= INPUTS: rlam -- Observed Wavelength array (logarithmic) flux -- Flux of quasar invvar -- Inverse variance array xmed -- Rest frame wavelength array [logarithmic; rlam / (1+zem) ] ymed -- 0th channel of the PCA fit (pca[*,0]) RETURNS: tilt -- Normalized fit to QSO (tilt taken out) tiltivar -- Inverse variance of the fit coeff -- Coefficients of the fit to the tilt OUTPUTS: OPTIONAL KEYWORDS: npoly= -- Number of coefficients in POLY fit to tilt range= -- Rest-wavelength range to fit [default: 1270--2000] OPTIONAL OUTPUTS: ANSWER= -- Tilted fit FLG_TILT -- Flag describing the success of the fit (0=bad, 1=good) COMMENTS: EXAMPLES: PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: 09-Sep-2003 Written by JXP (based on qso_tilt by SB)
(See SDSS/PCA/pca_qsotilt.pro)
NAME: printcol Version 1.1 PURPOSE: Prints a series of arrays to the screen in column format. The program will print as many entries as found in v1. CALLING SEQUENCE: printcol, v1, v2, [v3-v8], FORMAT='' INPUTS: v1 - Vector 1 v2 - Vector 2 [v3-v8] - Additional vectors. RETURNS: OUTPUTS: Prints v1, v2 to screen OPTIONAL KEYWORDS: FORMAT - FORTRAN formatting OPTIONAL OUTPUTS: COMMENTS: The program keys off the number of elements in v1 EXAMPLES: printcol, array1, array2 PROCEDURES CALLED: REVISION HISTORY: 17-June-2001 Written by JXP
(See General//printcol.pro)
NAME: prs_cldycoll V1.1 PURPOSE: Parses a standard binary fits file into the CLOUDY struct for collisional ionization. The default file was created by J.C. Howk using Cloudy CALLING SEQUENCE: prs_cldycoll, stucture, [filename] INPUTS: [filename] - Input fits file [default: $XIDL_DIR/Cloudy/cloud_collisons.fits] RETURNS: structure - IDL structure strctcldy OUTPUTS: OPTIONAL KEYWORDS: OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: PROCEDURES CALLED: REVISION HISTORY: 03-Nov-2003 Written by JXP
(See Cloudy//prs_cldycoll.pro)
NAME: prs_cldygrid V1.1 PURPOSE: Parses a standard binary fits file into the CLOUDY struct for Photoionized models CALLING SEQUENCE: prs_cldygrid, stucture, filename INPUTS: filename - Cloudy File ROOT= - Path to Cloudy files [default: /u/xavier/Cloudy/Grid/Output] RETURNS: structure - IDL structure strctcldy containing the Cloudy info OUTPUTS: OPTIONAL KEYWORDS: OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: prs_cldygrid, struct, 'HM01A.fits' PROCEDURES CALLED: xmrdfits REVISION HISTORY: 31-May-2001 Written by JXP
(See Cloudy//prs_cldygrid.pro)
Name: PS_Open Purpose: Set the plotting device to be PostScript, and save the current plotting device (that can thus be restored). Use in conjunction with ps_close. Calling sequence: PS_Open Example: IDL> ps_open,file='test.ps',/por IDL> plot,findgen(10) IDL> ps_close,/nop Keywords: PORTRAIT - Normally, PS_Open defines the plotting area as landscape. If this keyword is set, the plotting area will be portrait. FILENAME = <string> - Normally, PS_Open uses '/tmp/idl-$USER.ps' (on Sparx) for the PostScript file, but the keyword FILENAME can be used to override that value. ($USER is retrieved with a getenv('USER')). SQUARE - if set, defines the plotting area to be square. to also get a square data window, use the position keyword when making the plot. FONT - set !P.font to value of FONT ENCAPSULATED - produces an encapsulated PostScript plot. BPP = <n> - Set the number of bits per pixel; default value is 8, valid values are 8, 4, OR 2. A higher no produces a better resolution but also a bigger PostScript file. COLOR - produces a color PostScript plot. LEDGER - selects ledger format (17x11; usefull mostly for color printer) XSIZE - the x size in inches of the plotting region YSIZE - the y size in inches of the plotting region MAXS -- Maximize the plot on a standard 8.5 x 11 page (JXP) CMYK -- generate colors in CMYK for publication See also: PS_Close History: 23-Aug-93: added bpp=[2,4,8] option, with 8 bpp as default 24-Aug-93: added support for /color, and reduced the page size for QMS color printer 16-Sep-93: added color flag to common block (see also PS_Close) 9-Apr-94: added file name to info message 11-Apr-94: added LEDGER support (see also PS_Close) 28-Apr-94: added SQUARE, and fixed color portrait offset 5-May-94: got /SQUARE to actually work 25-Jun-94: added xsize and ysize keywords 3-Dec-07 added CMYK, KLC
(See General//ps_open.pro)
NAME: qalcharstrct__define Version 1.1 PURPOSE: Defines the QAL structure for SDSS CALLING SEQUENCE: tmp = {qalcharstrct} INPUTS: RETURNS: OUTPUTS: OPTIONAL KEYWORDS: OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: 30-Sep-2002 Written by JXP
(See SDSS/General/qalcharstrct__define.pro)
NAME: qso_template_nu PURPOSE: CALLING SEQUENCE: INPUTS: RETURNS: OUTPUTS: OPTIONAL KEYWORDS: OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: PROCEDURES CALLED: REVISION HISTORY: 2005 Written by Joe Hennawi UCB
(See SDSS/m912/x_qso_template_nu.pro)
NAME: READCOL PURPOSE: Read a free-format ASCII file with columns of data into IDL vectors EXPLANATION: Lines of data not meeting the specified format (e.g. comments) are ignored. Columns may be separated by commas or spaces. Use READFMT to read a fixed-format ASCII file. Use RDFLOAT for much faster I/O (but less flexibility). Use FORPRINT to write columns of data (inverse of READCOL). CALLING SEQUENCE: READCOL, name, v1, [ v2, v3, v4, v5, ... v35 , COMMENT= DELIMITER= ,FORMAT = , /DEBUG , /SILENT , SKIPLINE = , NUMLINE = ] INPUTS: NAME - Name of ASCII data file, scalar string. OPTIONAL INPUT KEYWORDS: FORMAT - scalar string containing a letter specifying an IDL type for each column of data to be read. Allowed letters are A - string data, B - byte, D - double precision, F- floating point, I - integer, L - longword, Z - longword hexadecimal, and X - skip a column. Columns without a specified format are assumed to be floating point. Examples of valid values of FMT are 'A,B,I' ;First column to read as a character string, then 1 column of byte data, 1 column integer data 'L,L,L,L' ;Four columns will be read as longword arrays. ' ' ;All columns are floating point If a FORMAT keyword string is not supplied, then all columns are assumed to be floating point. /SILENT - Normally, READCOL will display each line that it skips over. If SILENT is set and non-zero then these messages will be suppressed. /DEBUG - If this keyword is non-zero, then additional information is printed as READCOL attempts to read and interpret the file. COMMENT - single character specifying comment signal. Any line beginning with this character will be skipped. Default is no comment lines. DELIMITER - single character specifying delimiter used to separate columns. Default is either a comma or a blank. SKIPLINE - Scalar specifying number of lines to skip at the top of file before reading. Default is to start at the first line. NUMLINE - Scalar specifying number of lines in the file to read. Default is to read the entire file OUTPUTS: V1,V2,V3,...V25 - IDL vectors to contain columns of data. Up to 25 columns may be read. The type of the output vectors are as specified by FORMAT. EXAMPLES: Each row in a file position.dat contains a star name and 6 columns of data giving an RA and Dec in sexigesimal format. Read into IDL variables. (NOTE: The star names must not include the delimiter as a part of the name, no spaces or commas as default.) IDL> FMT = 'A,I,I,F,I,I,F' IDL> READCOL,'position.dat',F=FMT,name,hr,min,sec,deg,dmin,dsec The HR,MIN,DEG, and DMIN variables will be integer vectors. Alternatively, all except the first column could be specified as floating point. IDL> READCOL,'position.dat',F='A',name,hr,min,sec,deg,dmin,dsec To read just the variables HR,MIN,SEC IDL> READCOL,'position.dat',F='X,I,I,F',HR,MIN,SEC RESTRICTIONS: This procedure is designed for generality and not for speed. If a large ASCII file is to be read repeatedly, it may be worth writing a specialized reader. Columns to be read as strings must not contain the delimiter character (i.e. commas or spaces by default). Either change the default delimiter with the DELIMITER keyword, or use READFMT to read such files. Numeric values are converted to specified format. For example, the value 0.13 read with an 'I' format will be converted to 0. PROCEDURES CALLED GETTOK(), NUMLINES(), STRNUMBER() MINIMUM IDL VERSION: V5.3 (Uses STRSPLIT) REVISION HISTORY: Written W. Landsman November, 1988 Modified J. Bloch June, 1991 (Fixed problem with over allocation of logical units.) Added SKIPLINE and NUMLINE keywords W. Landsman March 92 Read a maximum of 25 cols. Joan Isensee, Hughes STX Corp., 15-SEP-93. Call NUMLINES() function W. Landsman Feb. 1996 Added DELIMITER keyword W. Landsman Nov. 1999 Fix indexing typos (i for k) that mysteriously appeared W. L. Mar. 2000 Hexadecimal support added. MRG, RITSS, 15 March 2000. Default is comma or space delimiters as advertised W.L. July 2001 Faster algorithm, use STRSPLIT if V5.3 or later W.L. May 2002 Accept null strings separated by delimiter ,e.g. ',,,' Use SCOPE_VARFETCH instead of EXECUTE() for >V6.1 W.L. Jun 2005 Added compile_opt idl2 W. L. July 2005
(See General//x_readcol.pro)
NAME: RESOLVE_ALL PURPOSE: Resolve (by compiling) all procedures and functions. This is useful when preparing .sav files containing all the IDL routines required for an application. CATEGORY: Programming. CALLING SEQUENCE: RESOLVE_ALL INPUTS: None. KEYWORD PARAMETERS: CLASS = if set, a list of object class names. RESOLVE_ALL's rules for finding uncompiled functions and procedures are not able to find object definitions or methods, because those things are not known to IDL until the object classes are actually instantiated and the methods called. However, if CLASS is set, RESOLVE_ALL will ensure that the __DEFINE files for those classes and their superclasses are compiled and execute. If then locates all methods for those classes and their superclasses and makes sure they are also compiled. CONTINUE_ON_ERROR = if set, continue when a routine fails to resolve, otherwise throw an error and stop. QUIET = if set, produce no messages. RESOLVE_EITHER = A scalar or array of routine names to resolve. Use this keyword instead of RESOLVE_FUNCTION or RESOLVE_PROCEDURE if you do not know the type of the routine being resolved. If the routines are already compiled, they are not recompiled. RESOLVE_FUNCTION = a scalar or array of function names to resolve. If the routines are already compiled, they are not recompiled. RESOLVE_PROCEDURE = a scalar or array of procedure names to resolve. If the routines are already compiled, they are not recompiled. SKIP_ROUTINES = an optional string array containing the names of routines to NOT resolve. This is useful when a library file containing the designated routines will be later included. UNRESOLVED = if CONTINUE_ON_ERROR is set, this output parameter will contain the names of the unresolved procedures and functions in a string array. Routines in the SKIP_ROUTINES list are also included in this result. OUTPUTS: No explicit outputs. COMMON BLOCKS: None. SIDE EFFECTS: RESTRICTIONS: Will not resolve procedures or functions that are called via CALL_PROCEDURE, CALL_FUNCTION, or EXECUTE, or object methods. Only explicit calls are resolved. If an unresolved procedure or function is not in the IDL search path, an error occurs, and no additional routines are resolved unless CONTINUE_ON_ERROR is specified. This routine does not support the idea of a function and procedure both having the same name, and does not handle that case. This is generally not a good idea anyway, as it is confusing. PROCEDURE: This routine iteratively determines the names of unresolved calls to user-written or library procedures and functions, and then compiles them. The process stops when there are no unresolved routines. If the CLASS keyword is set, this routine first ensures that all the class definitions are compiled (from the __define.pro) file, and that all methods for those classes and their superclasses are compiled. EXAMPLE: RESOLVE_ALL. MODIFICATION HISTORY: Written by: DMS, RSI, January, 1995. DMS, RSI, April, 1997, Added SKIP_ROUTINES keyword. AB, RSI, April 1998, Added CONTINUE_ON_ERROR keyword. Reorganized the body of the resolving code. DMS, Aug, 1998. Added UNRESOLVED keyword. AB, 13 January 1999, Added RESOLVE_EITHER keyword. Removed the old restriction that only one of the RESOLVE_ keywords are processed in a single call. AB, 6 February 2003, Added CLASS keyword. CT, August 2004: Fix RESOLVE_FUNCTION keyword so it works.
(See General//x_resolve_all.pro)
NAME: sdssdlastrct__define PURPOSE: Structure for SDSS DLA searches CALLING SEQUENCE: INPUTS: RETURNS: OUTPUTS: OPTIONAL KEYWORDS: OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: PROCEDURES CALLED: REVISION HISTORY: 27-Feb-2004 Written by SHF 14-Oct-2004 Modified by JXP
(See SDSS/DLA/sdssdlastrct__define.pro)
NAME: sdssdlastrct__define PURPOSE: Structure for SDSS DLA searches CALLING SEQUENCE: INPUTS: RETURNS: OUTPUTS: OPTIONAL KEYWORDS: OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: PROCEDURES CALLED: REVISION HISTORY: 27-Feb-2004 Written by SHF 14-Oct-2004 Modified by JXP
(See SDSS/LLS/sdssllsstrct__define.pro)
NAME: sdssmgiistrct__define PURPOSE: Structure for MgII search CALLING SEQUENCE: INPUTS: RETURNS: OUTPUTS: OPTIONAL KEYWORDS: OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: PROCEDURES CALLED: REVISION HISTORY: 27-Feb-2004 Written by GEP
(See SDSS/MgII/sdssmgiistrct__define.pro)
NAME: sdss_chkbal Version 1.1 PURPOSE: GUI used to check for (and designate) BAL quasars from SDSS CALLING SEQUENCE: sdss_chkbal, qalfil, IQSO=, XSIZE=, YSIZE=, /RECHK INPUTS: qalfil -- Name of FITS file containing the QAL structure RETURNS: OUTPUTS: qalfil -- With the BAL info modified accordingly OPTIONAL KEYWORDS: IQSO -- Number of the first QSO to start with [default: 0L] /RECHK -- Only plot thos QSOs identified as BAL previously MATCHFIL -- to skip QSOs that have already been checked (see sdss_balupdate.pro) OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: sdss_chkbal, 'DR2_QSO/sdss_DR2_QAL.fits', MATCHFIL='DR2_QSO/matched.fits' PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: 05-Feb-2004 Written by JXP 07-Jun-2004 Revised by SHF
(See SDSS/DLA/sdss_chkpdla.pro)
NAME: sdss_chkbal Version 1.1 PURPOSE: used to select the QSOs that have already been checked for BALs (in 'oldqalfil') and update their values (in 'newqalfil'). The 'matchfil' is then fed to sdss_chkbal and those QSOs are skipped. CALLING SEQUENCE: sdss_balupdate, oldqalfil, newqalfil, matchfil, SDSSPATH=sdsspath INPUTS: oldqalfil -- Name of FITS file containing the previous QAL structure newqalfil -- Name of FITS file containing the current QAL structure RETURNS: OUTPUTS: newqalfil -- With the 'flg_bal' info modified accordingly matchfil -- Name of FITS file containing array of 'newqsofil' indices that matched OPTIONAL KEYWORDS: SDSSPATH -- maybe already set in .cshrc file, but just in case- a path to the data OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: sdss_balupdate, 'DR1_QSO/sdss_DR1_QAL.fits', $ 'DR2_QSO/sdss_DR2_QAL.fits', ['DR2_QSO/matched.fits'] PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: 07-Jun-2004 Written by SHF 23-Nov-2004 Update by JXP
(See SDSS/General/sdss_balupdate.pro)
NAME: sdss_chkbal Version 1.1 PURPOSE: GUI used to check for (and designate) BAL quasars from SDSS CALLING SEQUENCE: sdss_chkbal, qalfil, IQSO=, XSIZE=, YSIZE=, /RECHK INPUTS: qalfil -- Name of FITS file containing the QAL structure RETURNS: OUTPUTS: qalfil -- With the BAL info modified accordingly OPTIONAL KEYWORDS: IQSO -- Number of the first QSO to start with [default: 0L] /RECHK -- Only plot thos QSOs identified as BAL previously MATCHFIL -- to skip QSOs that have already been checked (see sdss_balupdate.pro) OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: sdss_chkbal, 'DR2_QSO/sdss_DR2_QAL.fits', MATCHFIL='DR2_QSO/matched.fits' PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: 05-Feb-2004 Written by JXP 07-Jun-2004 Revised by SHF
(See SDSS/General/sdss_chkbal.pro)
NAME: sdss_chkciv Version 1.0 PURPOSE: Visually check SDSS CIV absorption detected with sdss_fndciv CALLING SEQUENCE: sdss_chkciv, INPUTS: RETURNS: OUTPUTS: OPTIONAL KEYWORDS: XSIZE - Size of gui in screen x-pixels (default = 1000) YSIZE - Size of gui in screen y-pixels (default = 600) OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: sdss_chkciv, x, maskid, expsr PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: 19-Dec-2003 Written by GEP/SHF
(See SDSS/CIV/sdss_chkciv.pro)
NAME: sdss_chkdla Version 1.1 PURPOSE: Launches a GUI that is used to check the DLA candidates (and metal-line systems) identified by the automated algorithm CALLING SEQUENCE: sdss_chkdla, qalfil, dlafil, con_dir, IQSO=, /FNEW, XSIZE=, YSIZE= INPUTS: qalfil -- FITS file containing the QAL structure dlafil -- FITS file containing the SDSS DLA structure (may be old) con_dir -- Path to the directory containting the continuum files RETURNS: OUTPUTS: dlafil -- FITS file containing the SDSS DLA structure OPTIONAL KEYWORDS: /FNEW -- Start with first quasar that hasnt been checked OBJNM= -- XSIZE -- Size of gui in screen x-pixels [default: screen-200] YSIZE -- Size of gui in screen y-pixels [default: screen-200] OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: sdss_chkdla, 'sdss_dr3_QAL.fits', 'dr3_qal_chkd.fits', 'ABSLIN/', /FNEW PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: 05-Oct-2003 Written by JXP
(See SDSS/DLA/sdss_chkdla.pro)
NAME: sdss_chklls Version 1.0 PURPOSE: Visually check SDSS LLS candidates CALLING SEQUENCE: sdss_chklls, x, maskid, expsr, XSIZE=, YSIZE= INPUTS: RETURNS: OUTPUTS: OPTIONAL KEYWORDS: XSIZE - Size of gui in screen x-pixels (default = 1000) YSIZE - Size of gui in screen y-pixels (default = 600) OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: sdss_chklls, x, maskid, expsr PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: 19-Dec-2005 Written by JXP/JMO
(See SDSS/LLS/sdss_chklls.pro)
NAME: sdss_chklya Version 1.1 PURPOSE: GUI used to check for missing DLA CALLING SEQUENCE: sdss_chklya, qalfil, IQSO=, XSIZE=, YSIZE=, /RECHK, ZMIN= INPUTS: qalfil -- Name of FITS file containing the QAL structure RETURNS: OUTPUTS: qalfil -- With the BAL info modified accordingly OPTIONAL KEYWORDS: ZMIN= -- Minimum redshift [default: 2.] IQSO -- Number of the first QSO to start with [default: 0L] /RECHK -- Only plot thos QSOs identified as BAL previously MATCHFIL -- to skip QSOs that have already been checked (see sdss_balupdate.pro) OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: sdss_chklya, '/DR2_QSO/sdss_DR2_QAL.fits', MATCHFIL='DR2_QSO/matched.fits' PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: 05-Feb-2004 Written by JXP 07-Jun-2004 Revised by SHF
(See SDSS/DLA/sdss_chklya.pro)
NAME: sdss_chkmgii Version 1.0 PURPOSE: Visually check SDSS Mg II absorption with a GUI CALLING SEQUENCE: sdss_chkmgii, x, maskid, expsr, XSIZE=, YSIZE= INPUTS: RETURNS: OUTPUTS: OPTIONAL KEYWORDS: XSIZE - Size of gui in screen x-pixels (default = 1000) YSIZE - Size of gui in screen y-pixels (default = 600) OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: sdss_chkmgii, x, maskid, expsr PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: 19-Dec-2003 Written by GEP/SHF
(See SDSS/MgII/sdss_chkmgii.pro)
NAME: sdss_chksiew Version 1.0 PURPOSE: Visually check SDSS CIV absorption detected with sdss_fndciv CALLING SEQUENCE: sdss_chksiew, INPUTS: RETURNS: OUTPUTS: OPTIONAL KEYWORDS: XSIZE - Size of gui in screen x-pixels (default = 1000) YSIZE - Size of gui in screen y-pixels (default = 600) OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: sdss_chksiew, x, maskid, expsr PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: 20-Jun-2007 Written by JXP
(See SDSS/DLA/sdss_chksiew.pro)
NAME: sdss_civsearch Version 1.0 PURPOSE: Given a list of SDSS quasars, search these spectra for CIV absorbers and output a structure of detections and EWs CALLING SEQUENCE: sdss_civsearch, filename, outfil, SDSSSUM=sdsssum, ZMIN=zmin, $ RMAX=rmax,LZ=lz, DATR=datr, INIFIL=inifil INPUTS: filename - File containing a (long) list of SDSS quasar data files (1d spectra, .fit) SDSSSUM= - Summary file of QSO properties [required] INIFIL= - File containing the CIV structure which was created previously. These will not be redone. RETURNS: OUTPUTS: outfil - Name for outputted structure of CIV absorbers OPTIONAL KEYWORDS: ZMIN= -- Minimum redshift of the CIV absorber [default: 1.45] DATR= -- Additional path to the data OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: sdss_civsearch, 'Lists/dr3_abs.lst', 'sdss_DR3_CIV.fits', SDSSSUM='dr3_qso.fits', DATR='DR3_QSO/' sdss_civsearch, '../Lists/dr7_qso.lst', 'sdss_DR7_CIV.fits', SDSSSUM='../dr7_qso.fits', DATR='DR7_QSO/' PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: 07-May-2002 Written by JXP
(See SDSS/CIV/sdss_civsearch.pro)
NAME: sdss_compare Version 1.1 PURPOSE: Given the structure containing DLA info, combine the values to create a final quality value. CALLING SEQUENCE: sdss_compare, strct, FSTRCT= INPUTS: strct -- QALstrct with the relevant info RETURNS: OUTPUTS: OPTIONAL KEYWORDS: OPTIONAL OUTPUTS: FSTRCT= -- Struct containing the combined values [required?] COMMENTS: EXAMPLES: sdss_chkbal, 'sdss_DR1_QAL.fits' PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: 2003 Written by SHF
(See SDSS/General/sdss_compare.pro)
NAME: sdss_comptst Version 1.1 PURPOSE: Monte-carlo routine to check the completeness of our automoated algorithm CALLING SEQUENCE: sdss_comptst, fil, outfil, NTRIAL=, /CHK, /DEBUG INPUTS: fil -- SDSS spectrum (without a DLA present) RETURNS: OUTPUTS: outfil -- FITS file with the qalstrct OPTIONAL KEYWORDS: NTRIAL= -- Number of simulations to run [default: 1000L] /CHK -- Plot the spectrum /DEBUG -- OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: sdss_comptst, '/data5/SDSS/DR1_QSO/spectro/1d/0463/0463-51312-122.fit', 'monte_snr10.fits', NTRIAL=10000L PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: 2003 Written by SHF
(See SDSS/General/sdss_comptst.pro)
NAME: sdss_dla Version 1.1 PURPOSE: Main routine to search for DLA in SDSS spectra (or ESI). This is the key driver of the N(HI) search for DLA. CALLING SEQUENCE: sdss_dla, n2=, ESI=, SDSS=, WIN_REST=, /PFLUX, /SMOOTH, /NORM, SIGV=, STRCT=, ZEM= INPUTS: RETURNS: OUTPUTS: STRCT= -- QAL structure created by this program OPTIONAL KEYWORDS: n2= -- Sigma value above which a pix is bad in the DLA profile [default: 5] SIGV= -- Sigma value to add to flux of all pixels SDSS= -- Name of SDSS file to examine /PFLUX -- Plot the spectrum /SMOOTH -- Smooth the spectrum by 5 pixels /NORM -- The flux is normalized WIN_REST -- Width of DLA window (angstroms) [default: 6] OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: sdss_comptst, '/data5/SDSS/DR1_QSO/spectro/1d/0463/0463-51312-122.fit', 'monte_snr10.fits', NTRIAL=10000L PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: 2003 Written by SHF Aug2006 -- Modified for PDLA
(See SDSS/DLA/sdss_dla.pro)
NAME: sdss_dladx Version 1.1 PURPOSE: Calculate the cosmological path length dX for a given cosmology for the sample of quasars searched for DLA in the SDSS. For now, the code defaults to point at the dX vector calcualted when we did the DR1 search (PH04). This code can also return dz, the redshift path length. CALLING SEQUENCE: dX = sdss_dladx(zmin, zmax, GZFIL=, XZFIL=) INPUTS: zmin -- Min redshift of the bin zmax -- Max redshift of the bin [vprox] -- Proximity velocity (to avoid in calculation) GZSTR= -- Structure summarizing g(z) for the quasars GZFIL= -- Filename of the g(z) file for the quasars XZFIL= -- Filename of the dX calculation as a function of z. RETURNS: dX -- The cosmological pathlength OUTPUTS: OPTIONAL KEYWORDS: BUFF= -- Require DLA occur BUFF km/s to the red of z1 OPTIONAL OUTPUTS: dz= -- Redshift pathlength instead of dX COMMENTS: The program keys off the number of elements in v1 EXAMPLES: writecol, 'arrays.dat', array1, array2 PROCEDURES CALLED: REVISION HISTORY: 15-March-2004 Written by JXP
(See SDSS/DLA/sdss_dladx.pro)
NAME: sdss_dladx Version 1.1 PURPOSE: Calculate the cosmological path length dX for a given cosmology for the sample of quasars searched for DLA in the SDSS. For now, the code defaults to point at the dX vector calcualted when we did the DR1 search (PH04). This code can also return dz, the redshift path length. CALLING SEQUENCE: dX = sdss_dladx(zmin, zmax, GZFIL=, XZFIL=) INPUTS: zmin -- Min redshift of the bin zmax -- Max redshift of the bin [vprox] -- Proximity velocity (to avoid in calculation) GZSTR= -- Structure summarizing g(z) for the quasars GZFIL= -- Filename of the g(z) file for the quasars XZFIL= -- Filename of the dX calculation as a function of z. RETURNS: dX -- The cosmological pathlength OUTPUTS: OPTIONAL KEYWORDS: BUFF= -- Require DLA occur BUFF km/s to the red of z1 OPTIONAL OUTPUTS: dz= -- Redshift pathlength instead of dX COMMENTS: The program keys off the number of elements in v1 EXAMPLES: writecol, 'arrays.dat', array1, array2 PROCEDURES CALLED: REVISION HISTORY: 15-March-2004 Written by JXP
(See SDSS/LLS/sdss_sllsdx.pro)
NAME: sdss_dlastat PURPOSE: Given a DLA struct and gz list, determine the indices of those DLA satisfying the statistical sample. CALLING SEQUENCE: sdss_dlastat INPUTS: dlastr -- Structure of SDSS DLAs gzstr -- Structure containing g(z) info [vprox] -- Proximity velocity (to avoid in calculation) RETURNS: OUTPUTS: OPTIONAL KEYWORDS: /ALL -- Return all DLA and candidates BUFF= -- Require DLA occur BUFF km/s to the red of z1 VMAX= -- Require the DLA occur at less than VMAX km/s of z_em (for PDLA searches) OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: PROCEDURES CALLED: REVISION HISTORY: Nov-2004 Written by JXP
(See SDSS/DLA/sdss_dlastat.pro)
NAME: sdss_dlastrct Version 1.1 PURPOSE: Produces a DLA structure of SDSS DLAs CALLING SEQUENCE: sdss_dlastrct, dla INPUTS: GZSTR= -- Structure summarizing g(z) for the quasars GZFIL= -- Filename of the g(z) file for the quasars RETURNS: dla -- DLA structure OUTPUTS: OPTIONAL KEYWORDS: /ACAND -- Return all absorbers (not just DLA) /ALL -- Return all statistical DLA from all DRs vprox= -- Proximity velocity (to avoid in calculation) BUFF= -- Require DLA occur BUFF km/s to the red of z1 /DR3 -- Return DLA from DR3 (but not DR2 or DR1 unless indicated) /DR5 -- Return DLA from DR4,DR5 (but not early data releases unless indicated) OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: sdss_uniqdla, dr1, dr2, uni PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: 11-Nov-2004 Written by JXP
(See SDSS/DLA/sdss_dlastrct.pro)
NAME: sdss_dla_2 Version 1.1 PURPOSE: Main routine to search for DLA in SDSS spectra (or ESI). This version is used primarily with the Monte-Carlo simulations. CALLING SEQUENCE: sdss_dla_2, flux, wave, sig, i, zabs, n1=, n2=, ESI=, $ SDSS=, WIN_REST=, /PFLUX, /SMOOTH, /NORM, SIGV=, $ STRCT=, ZEM= INPUTS: flux -- QSO flux array wave -- QSO wavelength array sig -- QSO error array i -- INDEX of QALstrct RETURNS: OUTPUTS: outfil -- FITS file with the qalstrct OPTIONAL KEYWORDS: n1= -- Sigma value below which a pix is good [default: code determines] n2= -- Sigma value above which a pix is bad in the DLA profile [default: 5] SIGV= -- Sigma value to add to flux of all pixels SDSS= -- Name of SDSS file to examine /PFLUX -- Plot the spectrum WIN_REST -- Width of DLA window (angstroms) OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: sdss_comptst, '/data5/SDSS/DR1_QSO/spectro/1d/0463/0463-51312-122.fit', 'monte_snr10.fits', NTRIAL=10000L PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: 2003 Written by SHF
(See SDSS/DLA/sdss_dla_2.pro)
NAME: sdss_dr1_goz PURPOSE: g(z) prescription for DR1. OBSOLETE CALLING SEQUENCE: INPUTS: RETURNS: OUTPUTS: OPTIONAL KEYWORDS: OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: PROCEDURES CALLED: REVISION HISTORY: 27-Feb-2004 Written by SHF
(See SDSS/DLA/sdss_dr1_goz.pro)
NAME: sdss_ewciv Version 1.1 PURPOSE: Measures the EW of the CIV lines (rest values) in the SDSS CALLING SEQUENCE: sdss_ewciv, wave, flux, sig, strct, ZABS= INPUTS: wave -- Wavelength array flux -- Flux array (normalized) sig -- Sigma array RETURNS: strct -- MgII structure with MgII EW filled up OUTPUTS: OPTIONAL KEYWORDS: ZABS= -- Absorption redshift (required) OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: PROCEDURES CALLED: REVISION HISTORY: 27-Feb-2004 Written by JXP
(See SDSS/CIV/sdss_ewciv.pro)
NAME: sdss_ewmgii Version 1.1 PURPOSE: Measures the EW of the MgII lines (rest values) in the SDSS CALLING SEQUENCE: sdss_ewmgii, wave, flux, sig, strct, ZABS= INPUTS: wave -- Wavelength array flux -- Flux array (normalized) sig -- Sigma array RETURNS: strct -- MgII structure with MgII EW filled up OUTPUTS: OPTIONAL KEYWORDS: ZABS= -- Absorption redshift (required) /TI2 -- Also measure TiII if it is present /ONLYTI2 -- Only measure TiII if it is present OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: PROCEDURES CALLED: REVISION HISTORY: 27-Feb-2004 Written by JXP
(See SDSS/MgII/sdss_ewmgii.pro)
NAME: sdss_ewna1 Version 1.1 PURPOSE: Measures the EW of the MgII lines (rest values) in the SDSS CALLING SEQUENCE: sdss_ewna1, wave, flux, sig, strct, ZABS= INPUTS: wave -- Wavelength array flux -- Flux array (normalized) sig -- Sigma array RETURNS: strct -- MgII structure with MgII EW filled up OUTPUTS: OPTIONAL KEYWORDS: ZABS= -- Absorption redshift (required) OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: PROCEDURES CALLED: REVISION HISTORY: 27-Feb-2004 Written by JXP
(See SDSS/NaI/sdss_ewna1.pro)
NAME: sdss_filter_nu PURPOSE: CALLING SEQUENCE: INPUTS: RETURNS: OUTPUTS: OPTIONAL KEYWORDS: OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: PROCEDURES CALLED: REVISION HISTORY: 2005 Written by Joe Hennawi UCB
(See SDSS/Photo/sdss_filter_nu.pro)
NAME: sdss_finchk Version 1.1 PURPOSE: GUI used to make a final check of metal-strong candidates CALLING SEQUENCE: sdss_finchk, dlafil, con_dir, MAG=mag, XSIZE=, YSIZE=, OUTFIL=outfil, RA=ra INPUTS: RETURNS: OUTPUTS: OPTIONAL KEYWORDS: MAG= -- Largest magnitude to include in the check RA= -- 2-element array giving constraint on RA OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: sdss_finchk, 'dla_dr1.fits', 'ABSLIN/' PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: 05-Oct-2003 Written by JXP
(See SDSS/DLA/sdss_finchk.pro)
NAME: sdss_fixciv Version 1.0 PURPOSE: Visually check SDSS CIV absorption detected with sdss_fndciv Edit EW and continuum as desired CALLING SEQUENCE: sdss_fixciv, INPUTS: RETURNS: OUTPUTS: OPTIONAL KEYWORDS: XSIZE - Size of gui in screen x-pixels (default = 1000) YSIZE - Size of gui in screen y-pixels (default = 600) OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: sdss_fixciv PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: 1-Dec-2008 Written by JXP
(See SDSS/CIV/sdss_fixciv.pro)
NAME: sdss_fixmgii Version 1.0 PURPOSE: Visually check SDSS CIV absorption detected with sdss_fndciv Edit EW and continuum as desired CALLING SEQUENCE: sdss_fixmgii, INPUTS: RETURNS: OUTPUTS: OPTIONAL KEYWORDS: XSIZE - Size of gui in screen x-pixels (default = 1000) YSIZE - Size of gui in screen y-pixels (default = 600) OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: sdss_fixmgii PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: 1-Dec-2008 Written by JXP
(See SDSS/MgII/sdss_fixmgii.pro)
NAME: sdss_fix_rep Version 1.1 PURPOSE: Remove repeat entries from the 'checked' file of QAL. Defaulted to deal with DR2 using dr2_bd.list CALLING SEQUENCE: sdss_fix_rep, fil=, bdlst=, new=new INPUTS: RETURNS: OUTPUTS: OPTIONAL KEYWORDS: FIL= -- File name of file including duplicates BDLST= -- List of indices which are to be removed NEW= -- Name of new DR2_chkd file [default: 'DR2_chkd.fits'] OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: Apr-2004 Written by SHF
(See SDSS/General/sdss_fix_rep.pro)
NAME: sdss_fndciv Version 1.0 PURPOSE: Brute force algorithm which examines the absorption lines detectedin a SDSS spectrum and searches for matches with CIV CALLING SEQUENCE: sdss_fndciv, abswav INPUTS: abswav - Array of observed wavelengths of detected absorption lines RETURNS: OUTPUTS: OPTIONAL KEYWORDS: OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: 07-May-2002 Written by JXP
(See SDSS/CIV/sdss_fndciv.pro)
NAME: sdss_fndla PURPOSE: Calculates f(N,X) for a set of DLA CALLING SEQUENCE: INPUTS: GZSTR= -- Structure summarizing g(z) for the quasars GZFIL= -- Filename of the g(z) file for the quasars RETURNS: OUTPUTS: OPTIONAL KEYWORDS: /DR3 -- Restrict to DR3 /NODBL -- Do not solve for double power-law CL= -- Confidence limits for error calculations ZBIN= -- redshift interval [default: 2.2 to 5.5] /SALL -- Use all of the DR releases BINS -- NHI bins OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: PROCEDURES CALLED: REVISION HISTORY: 20-Aug-2006 Written by JXP (based on fig_fndla)
(See SDSS/DLA/sdss_fndla.pro)
NAME: sdss_fndlls Version 1.0 PURPOSE: Searches SDSS QSO spectra for LLS absorption. CALLING SEQUENCE: INPUTS: RETURNS: OUTPUTS: OPTIONAL KEYWORDS: OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: 2005 Written by JO
(See SDSS/LLS/sdss_findlls.pro)
NAME: sdss_fndqso Version 1.1 PURPOSE: Return the indices of the QAL structure corresponding to fiber,id CALLING SEQUENCE: indx = sdss_fndqso(qalstr, platfib, /ALL) INPUTS: fibid -- 2 element vector of plate,fiberid RETURNS: indices in qalstr matching indx OUTPUTS: OPTIONAL KEYWORDS: /ALL -- Return all QSO's with the same ra,dec and redshift OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: indx = sdss_fndqso(qalstr, [424,124], /all) PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: 13-Oct-2004 Written by JXP
(See SDSS/General/sdss_fndqso.pro)
NAME: sdss_getqmag Version 1.1 PURPOSE: Return the magnitude of a QSO with plate+fiber CALLING SEQUENCE: mag = sdss_getqmag(qalstr, platfib, /ALL) INPUTS: RETURNS: mag -- Array of u-z magnitudes for SDSS QSO OUTPUTS: OPTIONAL KEYWORDS: QSOFIL= -- File containing the QSO summary FITS table [default: dr5_qso.fits] OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: mag = sdss_getqmag([424,124]) PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: 13-Oct-2004 Written by JXP
(See SDSS/General/sdss_getqmag.pro)
NAME: sdss_goz PURPOSE: Determines the g(z) path for each QSO in the inputted list CALLING SEQUENCE: sdss_goz, qalfil, outfil INPUTS: qalfil -- Filename of QSO structure for g(z) calculation XZFIL= -- Filename of the dX calculation as a function of z. RETURNS: OUTPUTS: OUTFIL= -- Filename for g(z) FITS file OPTIONAL KEYWORDS: ORIG_ZEM= -- Use the original redshifs from SDSS (in this file) SNRLMT= -- SNR limit for DLA search [default: 4] OPTIONAL OUTPUTS: /CHK -- Plot g(z) to the screen COMMENTS: EXAMPLES: PROCEDURES CALLED: REVISION HISTORY: 27-Feb-2004 Written by SHF 14-Oct-2004 Modified by JXP
(See SDSS/DLA/sdss_goz.pro)
NAME: sdss_hizmedian Version 1.0 PURPOSE: Calculates a median QSO spectrum for a set of high z SDSS QSOs CALLING SEQUENCE: sdss_hizmedian, DR3_fits, new_template, szstart=, szend= INPUTS: DR3_fits -- Filename of qso file RETURNS: OUTPUTS: new_template -- Filename of median spectrum (FITS file) OPTIONAL KEYWORDS: DR3PATH -- Path to the DR3 data szstart -- Starting redshift for the stack szend -- Ending redshift for the stack OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: 07-May-2002 Written by JO
(See SDSS/LLS/sdss_hizmedian.pro)
NAME: sdss_hiztemplate Version 1.0 PURPOSE: Calculates a template QSO spectrum for a set of high z SDSS QSOs I am not sure how this is different than sdss_hizmedian, but I suspect this is the better routine. CALLING SEQUENCE: sdss_hizmedian, DR3_fits, new_template, szstart=, szend= INPUTS: DR3_fits -- Filename of qso file RETURNS: OUTPUTS: new_template -- Filename of median spectrum (FITS file) OPTIONAL KEYWORDS: DR3PATH -- Path to the DR3 data szstart -- Starting redshift for the stack szend -- Ending redshift for the stack OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: 07-May-2002 Written by JO
(See SDSS/LLS/sdss_hiztemplate.pro)
NAME: sdss_llsdx Version 1.1 PURPOSE: Calculate the cosmological path length dX for a given cosmology for the sample of quasars searched for LLS in the SDSS. This code can also return dz, the redshift path length. CALLING SEQUENCE: dX = sdss_llsdx(zmin, zmax, GZFIL=, XZFIL=) INPUTS: zmin -- Min redshift of the bin zmax -- Max redshift of the bin [vprox] -- Proximity velocity (to avoid in calculation) GZSTR= -- Structure summarizing g(z) for the quasars GZFIL= -- Filename of the g(z) file for the quasars XZFIL= -- Filename of the dX calculation as a function of z. RETURNS: dX -- The cosmological pathlength OUTPUTS: OPTIONAL KEYWORDS: BUFF= -- Require DLA occur BUFF km/s to the red of z1 OPTIONAL OUTPUTS: dz= -- Redshift pathlength instead of dX COMMENTS: The program keys off the number of elements in v1 EXAMPLES: writecol, 'arrays.dat', array1, array2 PROCEDURES CALLED: REVISION HISTORY: Feb-2009 Written by JXP
(See SDSS/LLS/sdss_llsdx.pro)
NAME: sdss_llsfit Version 1.11 PURPOSE: GUI used to fit DLA profiles interactively. The user determines the continuum at the same time. CALLING SEQUENCE: sdss_llsfit, flux_fil, [err_fil], XSIZE=, YSIZE=, TITLE=, WAVE=, /BLOCK, FWHM=, INIFIT=, INFLG= INPUTS: flux_fil - FITS file (or array) containing flux [err_fil] - FITS error array RETURNS: OUTPUTS: OPTIONAL KEYWORDS: xsize - Draw window xsize (pixels) ysize - Draw window ysize (pixels) wave - wavelength array FWHM= - Resoltuion (FWHM in pixels) [default: 2] INFLG= - Usual flag for reading the FITS file (see x_readspec) INIFIT= - IDL file containing a saved version of the fit OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: sdss_llsfit, 'spec.fits' PROCEDURES/FUNCTIONS CALLED: XGETX_PLT XGETY_PLT XGETXPIX_PLT XGETYPIX_PLT REVISION HISTORY: 17-Oct-2002 Written by JXP
(See SDSS/LLS/sdss_llsfit.pro)
NAME: sdss_llsfn PURPOSE: Given a LLS struct and gz list, calculate f(N) CALLING SEQUENCE: sdss_llsfn INPUTS: RETURNS: OUTPUTS: OPTIONAL KEYWORDS: OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: PROCEDURES CALLED: REVISION HISTORY: Nov-2004 Written by JXP