NAME: x_golden Version 1.1 PURPOSE: Uses the NR routine 'golden' to find the x-value where the function has a minimum CALLING SEQUENCE: min = x_golden(func,a,b,c TOL=) INPUTS: func - String name of the IDL function a,c - Values bracketing the minimum b - Best guess at minimum RETURNS: min - x-value of function minimum OUTPUTS: OPTIONAL KEYWORDS: TOL - Fractional Tolerance OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: num = x_golden('func', 0.0, 1.0) PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: 25-Jan-2002 Written by JXP
(See General//x_golden.pro)
NAME: x_guilist Version 1.1 PURPOSE: Launches a cw_field, waits for the user to make a choice and then returns the index and value of the choice. Routine will block any other GUI. CALLING SEQUENCE: value = x_guilist(list, title) INPUTS: list - String array title - Title RETURNS: value - String OUTPUTS: OPTIONAL KEYWORDS: OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: value = x_guilist( ['a', 'b', 'c'], INDX=indx ) PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: 04-Jan-2002 Written by JXP
(See General//x_guilist.pro)
NAME: x_guinum Version 1.0 PURPOSE: Launches a cw_field and grabs a number from the user CALLING SEQUENCE: num = x_guinum(flg) INPUTS: flg = Return (0: float, 1: double, 2: Long) RETURNS: num - Number OUTPUTS: OPTIONAL KEYWORDS: TITLE= -- Title for the GUI [default: 'Num'] OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: num = x_guinum( 0 ) PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: 20-Dec-2001 Written by JXP
(See General//x_guinum.pro)
NAME: x_guistring Version 1.0 PURPOSE: Launches a cw_field and grabs a string from the user CALLING SEQUENCE: value = x_guistring(title) INPUTS: title - Title RETURNS: value - String OUTPUTS: OPTIONAL KEYWORDS: OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: string = x_guistring( 'Enter filename: ') PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: 04-Jan-2002 Written by JXP
(See General//x_guistring.pro)
NAME: x_haalt Version 1.0 PURPOSE: Returns hour angle at which object at dec is at altitude alt */ CALLING SEQUENCE: INPUTS: dec - deg lat - Latitude on Earth [deg] alt - Altitude relative to the horizon RETURNS: HA of the object OUTPUTS: OPTIONAL KEYWORDS: OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: PROCEDURES/FUNCTIONS CALLED: x_haalt REVISION HISTORY: Based on code in skycalendar v5 written by John Thorstensen Dartmouth College 10-Dec-2009 Written by JXP
(See Obs//x_haalt.pro)
NAME: x_helpwidg Version 1.1 PURPOSE: Creates a widget to display a help list which is simply an array of strings that describe a GUI [or anything]. CALLING SEQUENCE: x_helpwidg, help INPUTS: help - String array of help statements RETURNS: OUTPUTS: OPTIONAL KEYWORDS: xsize - Draw window xsize (pixels) ysize - Draw window ysize (pixels) OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: x_helpwidg, ['Help', 'h: Show this'] PROCEDURES/FUNCTIONS CALLED: ; REVISION HISTORY: 28-Nov-2001 Written by JXP
(See General//x_helpwidg.pro)
NAME: x_hstflux Version 1.1 PURPOSE: Given a spectrum and a flux calib solution, calibrate CALLING SEQUENCE: fx_fnu = x_fluxcalib(wv, fx, fitstr, [var, newvar], /FLAMBDA, DLMB=, TRUCONV=) INPUTS: wv - Wavelength array fx - Stellar flux (e- per pixel) fitstr - Calibration fitting function (assumes alog10 for flux) [var] - Variance array RETURNS: fx_fnu - Flux in fnu (or flambda) OUTPUTS: OPTIONAL KEYWORDS: /FLAMBDA - Return flambda instead of fnu DLMB -- Delta lambda (or km/s if negative) of wavelength array OPTIONAL OUTPUTS: newsig -- Fluxed variance array COMMENTS: EXAMPLES: fx_fnu = x_fluxcalib(wv, fx, fitstr) PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: 15-Apr-2002 Written by JXP
(See Spec/Flux//x_hstflux.pro)
NAME: x_identify Version 1.1 PURPOSE: GUI used to create a wavelength solution to an arc line spectrum. Similar to IRAFs identify CALLING SEQUENCE: x_identify, spec, calib, XSIZE=, YSIZE=, LINELIST=, $ DISP=, LINEROOT=, INCALIB=, /DEBUG, MSK=, OUTLIN=, /REDBLUE=, WAVE=, FLUX=, INLIN= INPUTS: spec - 1D flux spectrum (array) RETURNS: calib - FIT Structure describing the wavelength solution OUTPUTS: OPTIONAL KEYWORDS: LINELIST - Reference list (user can set interactively) LINEROOT - Path to a set of line lists [default: /Spec/Arcs/Lists] DISP - Guess at dispersion (A or km/s per pix [pos/neg value]) /FLUX - Assumes wide slit and therefore wide arc lines XSIZE,YSIZE -- Size of GUI in pixels /REDBLUE - Spectrum runs from red to blue (not blue to red) INCALIB - A input fit structure that can be used to identify lines. MSPEC - An input arc that can be used to shift and stretch arc MFITSTR - A structure that goes along with mspec which is the fit for that arc. Note that incalib will be set with this as the fit. OPTIONAL OUTPUTS: WAVE= -- Wavelength array for the arc line spectrum MSK= -- ?? OUTLIN= -- Lines structure which shows the lines used in the fit COMMENTS: EXAMPLES: x_identify, arc, calib PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: 08-Dec-2001 Written by JXP 19-Dec-2001 Added fitting 01-Feb-2003 Added input 01-Nov-2006 JFH added incalib option
(See Spec/Arcs//x_identify.pro)
NAME: x_imarith Version 1.1 PURPOSE: Performs arithmetic on two fits images (akin to IRAF) CALLING SEQUENCE: x_imarith, img1, oper, img2, outimg, FITS= INPUTS: img1 -- Image 1 img2 -- Image 2 oper -- String math operation (+,*,/,-) RETURNS: OUTPUTS: fimg -- Output image OPTIONAL KEYWORDS: OPTIONAL OUTPUTS: /FITS - fimg is a fits file (string) COMMENTS: EXAMPLES: x_imarith, 'f1.fits', '+', 'f2.fits', fimg x_imarith, 'f1.fits', '+', 'f2.fits', 's12.fits', /FITS PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: 03-Aug-2001 Written by JXP 29-Dec-2001 Modified
(See IMG/General//x_imarith.pro)
NAME: x_intphotcal Version 1.2 PURPOSE: Allows the user to interactively perform a photometric solution. At its fullest, the code will calculate a zeropoint, an airmass term and a color term. The routine launches a GUI which allows the deletion of specific stars. CALLING SEQUENCE: x_intphotcal, obs, landolt, outfil, XSIZE=, YSIZE=, /NCLR, MIN_NOBS=, MIN_MOBS=, SETAM= INPUTS: obs - Standard star observations (stdstruct) landolt - Landolt info (lndltstr) RETURNS: OUTPUTS: OUTFIL -- ASCII file summary of the photometric solution. OPTIONAL KEYWORDS: XSIZE = size of gui YSIZE = size of gui MIN_NOBS= Min n value for Landolt star MIN_MOBS= Min m value for Landolt star /NCLR = Solve without color terms SETAM = Value taken for AM term (Note: You cannot choose a value of 0. exactly!) OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: x_intphotcal, obs, landolt, outfil PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: 08-Aug-2001 Written by JXP 07-Jan-2002 Revised by JXP 14-Oct-2002 Revised by JXP [setup no AM, no CLR terms]
(See IMG/Photometry//x_intphotcal.pro)
NAME: x_invertarc Version 1.1 PURPOSE: Converts an Arc image in the flat frame to the original Uses a C program, is a memory hog CALLING SEQUENCE: newarc = x_invertarc( arcimg, map ) INPUTS: arcimg - Arc image in the flat frame (data or fits file) map - Map image (data or fits file) RETURNS: newarc - Arc image in the Original frame OUTPUTS: OPTIONAL KEYWORDS: /DBL - Use double precision OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: newarc = x_invertarc( arcimg, map, /DBL) PROCEDURES/FUNCTIONS CALLED: C code: invert_arc REVISION HISTORY: 18-Feb-2002 Written by JXP
(See Spec/Arcs//x_invertarc.pro)
NAME: x_keckhelio Version 1.1 PURPOSE: Compute correction term to add to velocities to convert to heliocentric. This code also does the VLT and MMT. Note, it is the *NEGATIVE* of the the number that one applies to a wavelength solution. CALLING SEQUENCE: vcorr = x_keckhelio( ra, dec, [epoch], jd=, tai=, $ longitude=, latitude=, altitude= ) INPUTS: ra - Right ascension [degrees] dec - Declination [degrees] [epoch] - Epoch of observation for RA, DEC; default to 2000. RETURNS: vcorr - Velocity correction term, in km/s, to add to measured radial velocity to convert it to the heliocentric frame. OPTIONAL KEYWORDS: jd - Decimal Julian date. Note this should probably be type DOUBLE. tai - Number of seconds since Nov 17 1858; either JD or TAI must be specified. Note this should probably either be type DOUBLE or LONG64. longitude - Longitude of observatory; default to<PHONE_NUMBER>0) deg for APO latitute - Latitude of observatory; default to 32.780361 deg for APO altitude - Altitude of observatory; default to 4000 m for Keck OBS= - Observatory (default: 'keck') OUTPUTS: OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: helio_shift = -1. * x_keckhelio(RA, DEC, 2000.0) BUGS: PROCEDURES CALLED: baryvel ct2lst REVISION HISTORY: 09-May-2000 Written by S. Burles & D. Schlegel 30-Aug-2002 Revised by JXP for Keck 22-Dec-2007 Revised to use observatory function by JFH.
(See Spec/General//x_keckhelio.pro)
NAME: x_lndltcat Version 1.1 PURPOSE: Creates a fits file of the Landolt table. Probably needs to be run only once unless a typo is corrected. CALLING SEQUENCE: x_lndltcat, fil, fitsfil INPUTS: fil - Name of the landolt file RETURNS: OUTPUTS: fitsfil - Name of fits file to create OPTIONAL KEYWORDS: OPTIONAL OUTPUTS: STRCT - Structre of the landolt file COMMENTS: EXAMPLES: x_lndltcat, '/u/xavier/idl/xidl/IMG/Photometry/Lists/nlandolt.dat', 'Landolt.fits' PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: 08-Aug-2001 Written by JXP
(See IMG/Photometry//x_lndltcat.pro)
NAME: x_lndltclr Version 1.1 PURPOSE: Returns the Landolt color of a star CALLING SEQUENCE: clr = x_lndltclr(color, lndltstr) INPUTS: color - String name of the color (e.g. 'BV') lndlstr - Structure of the landolt star RETURNS: clr - Color of the Landolt star OUTPUTS: OPTIONAL KEYWORDS: OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: clr = x_lndltclr('BR', landolt) PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: 08-Aug-2001 Written by JXP
(See IMG/Photometry//x_lndltclr.pro)
NAME: x_lndltmag Version 1.1 PURPOSE: Returns the Landolt magnitude for a given filter CALLING SEQUENCE: mag = x_lndltmag(filter, lndltstr, SIGMAG=) INPUTS: filter - String name of the filter lndlstr - Structure of the landolt star RETURNS: mag - magnitude OUTPUTS: OPTIONAL KEYWORDS: OPTIONAL OUTPUTS: SIGMAG = Error in the magnitude COMMENTS: EXAMPLES: mag = x_lndltmag('R', landolt, SIGMAG=sig) PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: 08-Aug-2001 Written by JXP
(See IMG/Photometry//x_lndltmag.pro)
NAME: x_magtolum Version 1.1 PURPOSE: Convert AB mag to flux CALLING SEQUENCE: INPUTS: inmag -- Magnitude H0 -- Hubble constant RETURNS: OUTPUTS: OPTIONAL KEYWORDS: OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: 30-Aug-2005 Written by JXP
(See Obs//x_magtolum.pro)
NAME: x_maxspln Version 1.1 PURPOSE: Finds the maximum in a set of data using a spline. The program simply splines the data and then finds the max. CALLING SEQUENCE: maxsp = x_maxspln( xval, yval, EDGES=, EDGVAL=, SPMX=) INPUTS: xval - x pos yval - y pos (values to be maximized) RETURNS: maxsp - Maximum of the values OUTPUTS: OPTIONAL KEYWORDS: OPTIONAL OUTPUTS: EDGES -- x-value Edges of peak corresponding to 0.333 EDGVAL -- y-value Edges of peak corresponding to 0.333 SPMX -- Maximum in the spline COMMENTS: EXAMPLES: maxsp = x_maxspln(x, y) PROCEDURES/FUNCTIONS CALLED: x_golden REVISION HISTORY: 29-Jan-2002 Written by JXP
(See FIT//x_maxspln.pro)
NAME: x_medsigclip PURPOSE: Median multiple images with sigma-rejection. Akin to avsigclip but does median analysis instead of averaging. This is my favorite combine routine. CALLING SEQUENCE: result = x_medsigclip( array, [ dimension, siglo=, sighi=, maxiter=, $ inmask=, ] ) INPUTS: array - N-dimensional array OPTIONAL INPUTS: dimension - The dimension over which to collapse the data. If ommitted, assume that the last dimension is the one to collapse. siglo - Low Sigma for rejection; default to 3.0. sighi - High Sigma for rejection; default to 3.0. maxiter - Maximum number of sigma rejection iterations. One iteration does no sigma rejection; default to 10 iterations. inmask - Input mask, setting =0 for good elements gain - Gain; Crucial for calculating sigma; default to 1.0 rn - Readnoise; Crucial for calculating sigma; default to 7.0 OUTPUTS: result - The output array. outmask - Output mask, setting =0 for good elements, =1 for bad. Any pixels masked in INMASK are also masked in OUTMASK. OPTIONAL OUTPUTS: COMMENTS: The DIMENSION input is analogous to that used by the IDL built-in function TOTAL. EXAMPLES: Create a data cube of 10 random-valued 100x200 images. At each pixel in the image, compute the median of the 10 values, but rejecting 3-sigma outliers: > array = randomu(123,100,200,10) > med = x_medsigclip(array, siglo=3., sighi=4.) If all points are masked in any given vector or array, a mean and dispersion are computed for all the points. Is this the behaviour we want? If you want to replace those values with zeros instead, look at OUTMASK: > array = randomu(123,100,200) > inmask = bytarr(100,200) > inmask[*,8] = 1 ; mask all of row #8 > ave = x_avsigclip(array, 1, inmask=inmask, outmask=outmask) > ibad = where( total(1-outmask, 1) EQ 0) > if (ibad[0] NE -1) then ave[ibad] = 0 ; zero-out bad rows BUGS: PROCEDURES CALLED: Dynamic link to arravsigclip.c REVISION HISTORY: 07-Jul-1999 Based on djs_avsigclip; Written by David Schlegel, Princeton. 28-Jul-2001 Modfied by JXP (Added lo/hi sigrej, does median)
(See IMG/Reduction//x_medsigclip.pro)
NAME: x_mkabslin PURPOSE: Creates a FITS file from the standard line lists. Used for voigt stuff. CALLING SEQUENCE: x_mkabslin INPUTS: wave - ionic transition RETURNS: f - oscillator strength OUTPUTS: OPTIONAL KEYWORDS: OPTIONAL OUTPUTS: nam - Name of transition COMMENTS: EXAMPLES: x_mkabslin, 1215.6701, fval, name PROCEDURES CALLED: REVISION HISTORY: 16-Oct-2002 Written by JXP
(See Spec/Lines//x_mkabslin.pro)
NAME: x_mkaimg Version 1.1 PURPOSE: Given the 2D solution for the slope of the lines as a function of position this code creates a wavelength image (i.e. assigns a unique wavelength to each pixel in each order). The xoffset is input in order to properly determine the edges of each order. A simple spline interpolation is used to determine the values. Note, you should have shifted the order structure as necessary prior to calling this routine. CALLING SEQUENCE: x_mkaimg, arc_fil, ordr_str, arc2d_fil, fil_fittrc, $ out_fil, /CHK, /CLOBBER, BAD_ANLY= INPUTS: arc_fil -- Name of arc file ordr_str -- Order strucure describing the echelle footprint arc2d_fil -- Name of 2D wavelength solution fil_fittrc -- Name of FITS file containing the 2D fit to the tilted arc lines RETURNS: OUTPUTS: 2D wavelength image with name like 'Arcs/Arc_mb0439I.fits' OPTIONAL KEYWORDS: /CLOBBER - Overwrite previous image /CHK - Display the final image OPTIONAL OUTPUTS: BAD_ANLY= - Set to 1 if the code finds double valued solutions. COMMENTS: EXAMPLES: PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: 15-May-2003 Written by SB
(See Spec/Arcs//x_mkaimg.pro)
NAME: x_mode Version 1.1 PURPOSE: Calcualtes the mode after one inputs an array (default: nearest integer) CALLING SEQUENCE: INPUTS: arr -- Array of values RETURNS: mode OUTPUTS: OPTIONAL KEYWORDS: OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: mode = x_mode(array) PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: 25-Aug-2004 Written by JXP
(See General//x_mode.pro)
NAME: x_msklayout Version 1.1 PURPOSE: Allows the user to interactively place slitmasks on a field of targets and write out their positions and PA values CALLING SEQUENCE: x_msklayout, targ, instr INPUTS: img - Image(s) for Masking instr - Name of instrument (LRIS, DEIMOS) RETURNS: OUTPUTS: mask - Creates a fits table of pixel values to mask OPTIONAL KEYWORDS: SECTRG -- 2nd set of targets to plot (in alternate point style) ASTAR -- File containing the positions of Alignment stars PVOBJ -- File of objects previously observed OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: x_msklayout, img, 'SITe1', 'LCO-40' PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: 04-Jan-2004 Written by JXP
(See Obs//x_msklayout.pro)
NAME: x_normflat Version 1.0 PURPOSE: Normalizes a multi-slit flat given the slit structure CALLING SEQUENCE: nrmflat = x_normflat( flat, slitstr, [var, nrmvar] ) INPUTS: flat - Flat image or fits file slistr - Slit structure [var] - Variance array RETURNS: nrmflat - Normalized flat nrmvar - Normalized variance OUTPUTS: OPTIONAL KEYWORDS: YMED - Number of pixel offset from yedg to take median of YNRM - Number of pixels outside yedg to normalize OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: nrmflat = x_normflat( flat, slitstr ) PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: 11-Feb-2002 Written by JXP 15-Feb-2002 Revised to allow normalization of original 27-Mar-2004 Revised by MRB to not analyze flg_anly==0 slits
(See Spec/Slits//x_normflat.pro)
NAME: x_normspec Version 1.0 PURPOSE: Normalizes a multi-slit image given a normalized flat CALLING SEQUENCE: nrmspec = x_normspec( img, flat, [var, nrmvar]) INPUTS: flat - Flat image or fits file slistr - Slit structure RETURNS: nrmspec - Normalized flat OUTPUTS: OPTIONAL KEYWORDS: OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: nrmspec = x_normspec( img, flat) PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: 20-Feb-2002 Written by JXP
(See Spec/Slits//x_normspec.pro)
NAME: x_nrmspec Version 1.1 PURPOSE: Applies the continuum to unnormalized data CALLING SEQUENCE: x_nrmspec, fluxfil, contfil, outfil, EFIL=, OUTE= INPUTS: fluxfil -- Name of fluxed spectrum (or non-normalized) contfil -- Name of file containing the continuum outfil -- Name of output file to contain normalized spectrum RETURNS: OUTPUTS: OPTIONAL KEYWORDS: INFLG= -- Keyword for x_readspec for reading the spectrum [default: 0] EFIL= -- Filename of sigma array OUTE= -- Filename for normalized sigma array OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: Fall-2005 Written by JXP
(See Spec/Analysis//x_nrmspec.pro)
NAME: x_objnumid Version 1.1 PURPOSE: Turns an integer into a letter for Obj identification CALLING SEQUENCE: idval = x_objnumid( num ) INPUTS: num - An integer RETURNS: idval -- A letter (0='a', 1='b', etc.) OUTPUTS: OPTIONAL KEYWORDS: OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: idval = x_objnumid( 1 ) PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: 03-Mar-2002 Written by JXP
(See Spec/Slits//x_objnumid.pro)
NAME: x_obsinit Version 1.1 PURPOSE: Initialize observing structures for an observatory CALLING SEQUENCE: INPUTS: RETURNS: OUTPUTS: OPTIONAL KEYWORDS: /MAUNAKEA -- Use values for MK OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: PROCEDURES/FUNCTIONS CALLED: showfits querydss REVISION HISTORY: 27-Oct-2005 Written by JXP
(See Obs//x_obsinit.pro)
NAME: x_oplotcirc PURPOSE: Overplot a circle on a current plot given center and radius CALLING SEQUENCE: x_oplotcirc, rad, x0=, y0=, NPT=, _EXTRA= INPUTS: rad -- Radius of the circle (plot units) RETURNS: OUTPUTS: OPTIONAL KEYWORDS: x0 -- x-center of the circle [default: 0.] y0 -- y-center of the circle [default: 0.] NPT -- Number of points to discretize the circle [default: 1000L] OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: x_oplotcirc, 2., x0=3., y0=4. PROCEDURES CALLED: REVISION HISTORY: 22-Nov-2003 Written by JXP
(See General//x_oplotcirc.pro)
NAME: x_ordrectify Version 1.1 PURPOSE: Return an image of a single order, which is rectified, has a width of 2*long(min(rhedg-lhedg)/2) + 1 and conserves counts in each row. lhedg maps to the first column, rhedg to last column and center of order to central column CALLING SEQUENCE: rect_image = x_ordrectify(arc_img, lhedg, rhedg, /NOCORRECT) INPUTS: img - Raw image lhedg - Left hand edge of the order rhedg - Right hand edge of the order RETURNS: rect_img - Rectified 2D image OUTPUTS: OPTIONAL KEYWORDS: /NOCORRECT - ?? HALFW - Half width of the order (default: Minimum half width) OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: rect_image = x_ordrectify(arc_img, lhedg, rhedg, /NOCORRECT) PROCEDURES/FUNCTIONS CALLED: x_ordrectify REVISION HISTORY: ??--2004 Written by SB
(See Spec/Rectify//x_ordrectify.pro)
NAME: x_origslit Version 1.0 PURPOSE: Given the slitstr and the map, find slit positions in the original image. The values are filled into the slit structure. CALLING SEQUENCE: x_origslit, slitstr, map, /INVERSE INPUTS: slitstr - Slit structure map - y-distortion map (fits is ok) RETURNS: OUTPUTS: Updates slitstr for original positions OPTIONAL KEYWORDS: /INVERSE -- The map is the inverse! OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: x_origslit, slitstr, map PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: 14-Feb-2002 Written by JXP
(See Spec/Slits//x_origslit.pro)
NAME: x_padstr PURPOSE: Pads an input string to a input length CALLING SEQUENCE: padstr = x_padstr(instr, len, /TRIM) INPUTS: instr -- Input string len -- Desired length of string [PAD_CHAR] -- Input charcater for padding RETURNS: padstr -- Padded string. Default is the back OUTPUTS: OPTIONAL KEYWORDS: /TRIM -- First trim the string of extraneous blank spaces /REVERSE -- Pad from the front OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: pad = x_padstr('Blah', 15L) PROCEDURES CALLED: REVISION HISTORY: 11-Nov-2004 Written by JXP
(See General//x_padstr.pro)
NAME: x_photcal Version 1.1 PURPOSE: Derives a photometric solution for standard stars CALLING SEQUENCE: x_photcal, obs, landolt, ans, sig, MINSIG=, SETAM=, NCORR=, CHISQ= INPUTS: obs - Standard star observations (stdstruct) landolt - Landolt info (lndltstr) RETURNS: ans - Fit sig - Error on the fit parameters OUTPUTS: OPTIONAL KEYWORDS: MINSIG - Minimum error for obs+landolt (default = 0.01) MAXSIG - Maximum error to include in analysis (default = 0.1) SETAM - Value to assume for the airmass term /NOCLR - No color term (e.g. only one filter solution) MIN_NOBS - Minimum number of n epochs to include (default = 4) MIN_MOBS - Minimum number of m epochs to include (default = 2) OPTIONAL OUTPUTS: NCORR - Normalized correlation matrix CHISQ - Chisq of the calibrated fit COMMENTS: EXAMPLES: x_photcal, obs, landolt, ans, sig PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: 08-Aug-2001 Written by JXP
(See IMG/Photometry//x_photcal.pro)
NAME: x_photsol1 Version 1.1 PURPOSE: Performs the linear algebra on a set of obs with 1 free parameters, i.e., Airmass fixed and NO color term CALLING SEQUENCE: x_photsol1, mo0, mT, sig, airmass, setam, coeffs, sigma_coeff, COLOR= INPUTS: mo0 - Observed magnitudes mT - True magnitudes sig - Combined Error airmass - Airmass values SETAM - Value to set air mass coefficient to [Assumed positive!] RETURNS: coeffs - Fit sigma_coeffs - Error on the fit OUTPUTS: OPTIONAL KEYWORDS: color - Color values OPTIONAL OUTPUTS: CHISQ - chisq COMMENTS: EXAMPLES: x_photsol1, blah PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: 09-Aug-2001 Written by JXP
(See IMG/Photometry//x_photsol1.pro)
NAME: x_photsol2 Version 1.1 PURPOSE: Performs the linear algebra on a set of obs with 2 free parameters, i.e., either Airmass fixed or NO color term CALLING SEQUENCE: x_photsol2, mo0, mT, sig, airmass, coeffs, sigma_coeff, SETAM=, COLOR=, CHISQ= INPUTS: mo0 - Observed magnitudes mT - True magnitudes sig - Combined Error airmass - Airmass values RETURNS: coeffs - Fit sigma_coeffs - Error on the fit OUTPUTS: OPTIONAL KEYWORDS: SETAM - Value to set air mass coefficient to [Assumed positive!] color - Color values OPTIONAL OUTPUTS: CHISQ - chisq COMMENTS: EXAMPLES: x_photsol2, blah PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: 08-Aug-2001 Written by JXP
(See IMG/Photometry//x_photsol2.pro)
NAME: x_photsol3 Version 1.1 PURPOSE: Performs the linear algebra on a set of obs. Fits for three free parameters: zero point, airmass term, color term CALLING SEQUENCE: x_photsol3, mo0, mT, sig, airmass, color, coeffs, sigma, CHISQ=, NCORR= INPUTS: mo0 - Observed magnitudes mT - True magnitudes sig - Combined Error airmass - Airmass values color - Color values RETURNS: coeffs - Fit sigma_coeffs - Error on the fit OUTPUTS: OPTIONAL KEYWORDS: OPTIONAL OUTPUTS: NCORR - Normalized correlation matrix CHISQ - chisq COMMENTS: EXAMPLES: x_photsol3, blah PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: 08-Aug-2001 Written by JXP
(See IMG/Photometry//x_photsol3.pro)
NAME: x_pixminmax Version 1.1 PURPOSE: Find pixels in the wavelength array corresponding to the redshift and rest wavelength. CALLING SEQUENCE: x_pixminmax, wave, wrest, zabs, [vmin, vmax], PIXMIN=, PIXMAX=, VELO= INPUTS: wave -- Wavlength array wrest -- Rest wavelength of transition zabs -- Absorption redshift [vmin,vmax] -- Velocity minimum and maximum RETURNS: OUTPUTS: OPTIONAL KEYWORDS: OPTIONAL OUTPUTS: PIXMIN= -- Pixel value corresponding to VMIN PIXMAX= -- Pixel value corresponding to VMAX VELO= -- Velocity array COMMENTS: EXAMPLES: x_pixminmax, wave, 1808.0126d, 1.5, -100., 50., PIXMIN=pixmn PROCEDURES CALLED: REVISION HISTORY: 10-Jun-2002 Written by JXP
(See General//x_pixminmax.pro)
NAME: x_pltarc Version 1.1 PURPOSE: CALLING SEQUENCE: x_templarc, spec, lines, guessfit, /FFT, MSK=, MXSHFT=, $ MOCK_FFT=, SHFT=, ALL_PK=, PKWDTH=, $ /THIN, FORDR=, PKSIG=, SKIPLIN=, $ MXOFF=, /LOG INPUTS: spec - Input arc image or spectrum lines - Arc line structure guessfit - FIT to archived arc RETURNS: OUTPUTS: lines - Sets flg_plt to 1 those lines which are ID'd OPTIONAL KEYWORDS: OPTIONAL OUTPUTS: ALL_PK= -- Pix values of the arc line peaks COMMENTS: EXAMPLES: x_templarc, spec, lines, guessfit, SHFT=shft PROCEDURES/FUNCTIONS CALLED: x_fndpeaks REVISION HISTORY: 26-Aug-2002 Written by JXP
(See Spec/Arcs//x_pltarc.pro)
NAME: x_pltobj Version 1.1 PURPOSE: Sophisticated GUI for plotting 1D and 2D spectra together. CALLING SEQUENCE: x_pltobj, wave, fx, sig, infx, inwv, [imgwv], YSIZE= XSIZE=, PMNX=, YSIZE=, OBJNM=, ZIN=, XMAX=, LLIST= INPUTS: wave -- 1D Wavelength array fx -- 1D flux array sig -- 1D sigma array infx -- 2D flux image inwv -- 2D wavelength image [imgwv] -- 1D wavelength array giving approximate wave of the 2D image RETURNS: OUTPUTS: OPTIONAL KEYWORDS: XSIZE= -- Size of gui in screen x-pixels [default = ssz-300] YSIZE= -- Size of gui in screen y-pixels [default = ssz-400] PMNX= -- Plot range of the 1D spectrum ZIN= -- Input redshift for the object LLIST= -- Line list to use upon initialization (1: QAL, 2: GAL, 3: QSO) OBJNM= -- Title for the plot XMAX= -- Maximum x value for the 1D plot OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: x_pltobj, x, maskid, expsr PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: 19-Apr-2002 Written by JXP
(See Spec/Analysis//x_pltobj.pro)
NAME: x_pltvpfit V1.2 PURPOSE: Given a ISM structre write the files out CALLING SEQUENCE: flux = x_pltvpfit(wrest, wv, vpfils, FWHM=) INPUTS: wrest -- Rest wavelength [Ang] wv -- Wavelength array vpfils -- Structure with VPFIT info RETURNS: OUTPUTS: Ion structure. Column densities have linear values OPTIONAL KEYWORDS: FWHM= -- FWHM in pixels of the spectral resolution OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: PROCEDURES CALLED: REVISION HISTORY: 05-Apr-2007 Written by JXP
(See Spec/Lines//x_pltvpfit.pro)
NAME: x_prspeaks Version 1.1 PURPOSE: Launches a GUI to enable the user to fiddle with peaks by hand CALLING SEQUENCE: x_prspeaks, [xdat], ydat, XSIZE=, YSIZE=, TITLE=, XTWO=, YTWO=, PSYM_Y2=, /BLOCK INPUTS: [xdat] - x values (optional) ydat - Values RETURNS: OUTPUTS: OPTIONAL KEYWORDS: xsize - Draw window xsize (pixels) ysize - Draw window ysize (pixels) TITLE YTWO PSYM_y2 BLOCK OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: x_prspeaks, y PROCEDURES/FUNCTIONS CALLED: XGETX_PLT XGETY_PLT XGETXPIX_PLT XGETYPIX_PLT REVISION HISTORY: 17-Nov-2001 Written by JXP (modified from x1dfit) 24-Nov-2001 Added ytwo
(See Spec/Arcs//x_prspeaks.pro)
NAME: x_psclose Version 1.1 PURPOSE: Call ps_close and reset a number of default values. Point window at X-windows. CALLING SEQUENCE: INPUTS: RETURNS: OUTPUTS: OPTIONAL KEYWORDS: OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: PROCEDURES/FUNCTIONS CALLED: ps_close set_plot REVISION HISTORY: 09-Feb-2004 Written by JXP
(See General//x_psclose.pro)
NAME: x_psopen Version 1.1 PURPOSE: Calls ps_open and sets a number of default plotting values. CALLING SEQUENCE: x_psopen, fil, /MAXS, /PORTRAIT INPUTS: img - Fits file or data RETURNS: dat - Data in fits file or the input data OUTPUTS: OPTIONAL KEYWORDS: FSCALE - Data is float OPTIONAL OUTPUTS: HEAD - Header COMMENTS: EXAMPLES: PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: 09-Feb-2004 Written by JXP
(See General//x_psopen.pro)
NAME: x_radec PURPOSE: Turns RA, DEC in XX:XX:XX.X -DD:DD:DD.D format to decimal deg or VICE VERSA CALLING SEQUENCE: x_radec, ra, dec, rad, decd, /ARCS, /FLIP INPUTS: ra, dec - RA and DEC in in RR:RR:RR.R -DD:DD:DD.D format Colons are required as separators rad, decd - RA and DEC in decimal degrees (double) RETURNS: OUTPUTS: ra, dec - RA and DEC in in RR:RR:RR.R -DD:DD:DD.D format Colons are required as separators rad, decd - RA and DEC in decimal degrees (double) OPTIONAL KEYWORDS: ARCS - Outputs in arcseconds /FLIP - Gives RA and DEC from decimal RA,DEC /LONG -- Passes back a longer form (string only) OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: x_radec, '21:12:23.1', '-13:13:22.2', rad, decd PROCEDURES CALLED: REVISION HISTORY: 04-Aug-2001 Written by JXP 20-Nov-2003 Added + sign for /flip
(See General//x_radec.pro)
NAME: x_readimg Version 1.1 PURPOSE: Convert input to data whether it is a fits file or an image array CALLING SEQUENCE: dat = x_readimg(img) INPUTS: img - Fits file or data RETURNS: dat - Data in fits file or the input data OUTPUTS: OPTIONAL KEYWORDS: /FSCALE - Data is float /DSCALE - Data is double OPTIONAL OUTPUTS: HEAD= - Header COMMENTS: EXAMPLES: dat = x_readimg('spec.fits') PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: 07-Dec-2001 Written by JXP
(See General//x_readimg.pro)
NAME: x_readmhdufits.pro PURPOSE: Given a multi-HDU FITS file, this routine will assemble the various components into a single array based on the header keywords describing the layout. CALLING SEQUENCE: array = readmhdufits(filename) INPUTS: filename = name of the multi-HDU FITS file to read OPTIONAL INPUT KEYWORD PARAMETERS: NOTRIM - if set, do not trim pre- and post-scan columns NOBIAS - if set, do not perform overscan subtraction LINEBIAS - if set, remove overscan line by line [default = use scalar value] GAINDATA - if set to a structure with gain for each amp, make gain correction VERBOSE - if set, give feedback OPTIONAL OUTPUT KEYWORD PARAMETERS: HEADER - retrieve the header from the primary HDU and return it as a string array OUTPUTS: This function will return a 2-D floating-point array representing the assembled image. REQUIREMENTS: - Requires the IDL Astronomy User's Library routines (http://idlastro.gsfc.nasa.gov/) EXAMPLES: 1) Read in a FITS file, with trimming and bias removal, returning the data as "array" and the header as "header": array = readmhdufits( 'lred0001.fits', header=header) 2) Read in a FITS file, without trimming or bias removal, returning the data as "array" and the header as "header": array = readmhdufits( 'lred0001.fits', /notrim, /nobias, header=header) 3) Perform gain correction and use line-by-line bias determination: gain = [1.,2.,3.,4] ; for vidInp1,2,3,4 gaindata = build_gaindata(gain) array = readmhdufits( 'lred0001.fits', /linebias, gaindata=gaindata) PROCEDURE: - Uses the fits keyword in the header extentions DETSEC = '[4096:3073,1:4096]' / NOAO mosaic detector section for ds9 to piece the mosiac together. AUTHOR: Marc Kassis, W. M. Keck Obseravtory MODIFICATION HISTORY: 2009-May-27 MKassis v0.0 Original version 2009-Jun-02 GWirth v0.1 - added secparse routine - now returns type FLOAT array - added optional baseline removal 2009-Jun-16 GDW v0.2 - fix problem with NOTRIM mode - use MRDFITS instead of FITSREAD 2009-Jun-19 GDW v0.3 - adapt for binned data - write lris_read_amp function 2009-Jun-19 GDW v0.5 - fix bug with PRELINE 2009-Jun-24 JMS v0.6 - fix bug with BZERO 2009-Jul-02 GDW v0.7 - add LINEBIAS option - add GAINDATA option
(See Keck/LRIS/General/x_readmhdufits.pro)
NAME: x_rebin2dspec Version 1.1 PURPOSE: Rebin a single data set to a new wavlength scale Simple adding (no weighting by S/N) CALLING SEQUENCE: x_rebin2dspec, wv, fx, nwwv, nwfx, VAR=, NWVAR=, GDPIX=, /SILENT, /REDBLUE, /CR, /REBINC INPUTS: wv -- Wavelength array fx -- Flux array newwv -- New wavelength array to rebin to RETURNS: OUTPUTS: newfx -- New flux array OPTIONAL KEYWORDS: VAR= -- Data is float /REBINC -- Rebin using a C program /REDBLUE -- Data runs from red to blue OPTIONAL OUTPUTS: NEWVAR= - New variance array /CR - VAR = -1 flag CR and eliminate the pix COMMENTS: EXAMPLES: x_rebin2dspec, gdpix, orig_wv, orig_fx, newwv, newfx PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: 12-Apr-2002 Written by JXP 24-Aug-2002 Added C program
(See Spec/General//x_rebin2dspec.pro)
NAME: x_rectify Version 1.1 PURPOSE: Takes the y-distortion map and rectifies an image CALLING SEQUENCE: rect = x_rectify(img, map, /TRANSP, /SILENT, /DBL, /FIDL) INPUTS: img - Input image map - y-distortion map RETURNS: rect - Rectified image OUTPUTS: OPTIONAL KEYWORDS: /FIDL -- Do this using IDL as opposed to a fast C program /TRANSP -- Transpose the image first /DBL -- Return the rectified image in double precision OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: rect = x_rectify(flat, map) PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: 29-Jan-2002 Written by JXP 13-Aug-2002 Added transpose option (JXP)
(See Spec/Rectify//x_rectify.pro)
NAME: x_register Version 1.1 PURPOSE: Given a set of offsets between images, this routine will create final images that are registered. CALLING SEQUENCE: x_register, img, offsets, GOODREG=, OUTPTH= INPUTS: img -- String array of image names (assumes _sig extensions for sig files) offsets -- Integer offsets between images RETURNS: OUTPUTS: OPTIONAL KEYWORDS: goodreg -- Region of each image (4 int array) defining good data Formatted (x0,x1,y0,y1) OUTPTH -- Output path for the images OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: x_regsiter, img, off, GOODREG=good PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: 02-Aug-2001 Written by JXP
(See IMG/Reduction//x_register.pro)
NAME: x_relvel Version 1.1 PURPOSE: Calculate redshifts [default] or velocties using special rel All velocities are km/s and positive means lower redshift CALLING SEQUENCE: [z2 or v] = x_relvel( z1, [v or z2], /REVERSE) INPUTS: z1 -- Redshift of 'rest' RETURNS: v or z2 -- z2 is default given a velocity (km/s) OUTPUTS: OPTIONAL KEYWORDS: OPTIONAL OUTPUTS: AMIN -- Mpc per arcmin at z COMMENTS: EXAMPLES: print, x_relvel(3., 3000.) [Answer = 2.9601706] PROCEDURES CALLED: REVISION HISTORY: 10-Aug-2006 Written by JXP
(See Cosm//x_relvel.pro)
NAME: x_setaper Version 1.1 PURPOSE: Determine an aperture for an object automatically CALLING SEQUENCE: x_setaper, spec, center, [frac], RADIUS=, /SKYSUB INPUTS: spec - Spectrum (fits file ok) center - center of aperture (guess, actual center not essential) frac - Fraction of profile to extract [default: 0.05 off each side] RETURNS: aperture - Aperture: float(2) array around center OUTPUTS: OPTIONAL KEYWORDS: RADIUS= -- Region of object profile to consider /SKYSUB -- Calculate a median sky at outer regions of slit and subtract off OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: x_setaper, 'spec.fits', 200. PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: 01-Apr-2001 Written by JXP 02-May-2002 Revised sky level
(See Spec/Extraction//x_setaper.pro)
NAME: x_setapergui Version 1.1 PURPOSE: Sets objects and apertures interactively using a GUI CALLING SEQUENCE: x_setapergui, img, XSIZE=, YSIZE=, CLINE=, PEAKFRAC=, OBJSTR= INPUTS: img - 1D or 2D image RETURNS: OUTPUTS: OPTIONAL KEYWORDS: xsize - Draw window xsize (pixels) ysize - Draw window ysize (pixels) CLINE - Center line for 2D image to 'extract' 1D [default: sz[1]/2] PEAKFRAC= - Fraction of peak OPTIONAL OUTPUTS: OBJSTR= -- Object structure with the aperture filled in. This will include multiple objects if they are identified. COMMENTS: EXAMPLES: x_setapergui, 'spec.fits' PROCEDURES/FUNCTIONS CALLED: XGETX_PLT XGETY_PLT XGETXPIX_PLT XGETYPIX_PLT GETCOLOR (Coyote) DJS_MEDIAN REVISION HISTORY: 17-Nov-2001 Written by JXP
(See Spec/Extraction//x_setapergui.pro)
NAME: x_setbwclr PURPOSE: Creates an array of B&W shades useful for converting index numbers into 'color' CALLING SEQUENCE: xcolors = x_setclrs() INPUTS: [nclr] - Optional input setting the array size (Default is 12) RETURNS: xcolors - String Array of B&W shades OUTPUTS: OPTIONAL KEYWORDS: OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: xcolors = x_setbwclr() PROCEDURES CALLED: getcolor (Coyote package) REVISION HISTORY: 25-Nov-2001 Written by JXP
(See Color//x_setbwclr.pro)
NAME: x_setclrs PURPOSE: Creates an array of colors useful for converting index numbers into color CALLING SEQUENCE: xcolors = x_setclrs() INPUTS: [nclr] - Optional input setting the array size (Default is 12) RETURNS: xcolors - String Array of colors OUTPUTS: OPTIONAL KEYWORDS: /WHITE - Assumes a black background OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: xcolors = x_setclrs() PROCEDURES CALLED: getcolor (Coyote package) REVISION HISTORY: 25-Nov-2001 Written by JXP
(See Color//x_setclrs.pro)
NAME: x_setddate Version 1.1 PURPOSE: Converts a string date into decimal date CALLING SEQUENCE: ddate = x_setddate(date) INPUTS: date - String name of the date Allowed formats: DDmmmYY (e.g. 22Oct99) DD-MM-YY (e.g. 20-12-99) YYYY-MM-DD (e.g. 1999-12-20) RETURNS: ddate - Decimal date OUTPUTS: OPTIONAL KEYWORDS: OPTIONAL OUTPUTS: COMMENTS: If Year is < 50, then the year 2000 is presumed EXAMPLES: ddate = x_setddate('29Oct00') PROCEDURES CALLED: REVISION HISTORY: 07-Aug-2001 Written by JXP
(See General//x_setddate.pro)
NAME: x_setfitstrct Version 1.1 PURPOSE: Initizlies a 1D FIT structure. CALLING SEQUENCE: fitstr = x_setfitstrct(NITER=, MINPT=, MAXREJ=, FUNC=, NORD=, HSIG=, lSIG=, FLGREJ=) INPUTS: RETURNS: OUTPUTS: OPTIONAL KEYWORDS: NITER -- Number of iterations for FIT [default: 1L] MINPT -- Number of points to keep in FIT [default: 1L] MAXREJ -- Max Number of points to reject [default: 100L] FUNC -- Max Number of points to reject [default: 'POLY'] NORD -- Order of the fit [default: 3L] HSIG -- Upper sigma for rejection [default: 3.] LSIG -- Lower sigma for rejection [default: 3.] /FLGREJ -- Turn on rejection [default: NONE] OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: fitstr= x_setfitstrct(/FLGREJ) PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: 17-Jul-2002 Written by JXP
(See FIT//x_setfitstrct.pro)
NAME: x_setjdate Version 1.1 PURPOSE: Converts a string date into Julian date CALLING SEQUENCE: jdate = x_setjdate(date, [UTTIME]) INPUTS: date - String name of the date Allowed formats: DDmmmYY (e.g. 22Oct99) DD-MM-YY (e.g. 20-12-99) YYYY-MM-DD (e.g. 1999-12-20) DDMMMYYYY (e.g. 20JAN2004) [UTTIME] -- To create JD with hr, min, sec (e.g. 12:11:29) RETURNS: jdate - Decimal date OUTPUTS: OPTIONAL KEYWORDS: OPTIONAL OUTPUTS: COMMENTS: If Year is < 50, then the year 2000 is presumed EXAMPLES: jdate = x_setjdate('29Oct00') PROCEDURES CALLED: julday (IDL package) REVISION HISTORY: 31-Aug-2002 Written by JXP
(See General//x_setjdate.pro)
NAME: x_setline PURPOSE: Given an atomic wavelength, return the fvalue and name in the absorption line structure. CALLING SEQUENCE: linstr = x_setline(wave, LINFIL=) INPUTS: wave - rest wavelength RETURNS: linstr - Abslinstrct of the relevant line OUTPUTS: OPTIONAL KEYWORDS: LINFIL= -- FITS file containing a set of ABSLINSTRCT entries /OVERRIDE -- Bust through the stop sign for lines not in the database /CLOSE -- Return the closest line (not exact) OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: linstr = x_setline( 1215.6701 ) PROCEDURES CALLED: REVISION HISTORY: 17-Oct-2002 Written by JXP
(See Spec/Lines//x_setline.pro)
NAME: x_setllst Version 1.1 PURPOSE: Returns a line list sturcture gven a file and a flag CALLING SEQUENCE: llist = x_setllst(file, fmt) INPUTS: file - Line list filename fmt - Format of line file 0='lin.dat', 1=Gal or QSO line list RETURNS: llist - Structure of linelists OUTPUTS: OPTIONAL KEYWORDS: OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: llist = x_setllst('/u/xavier/bin/junk/lin.dat', 0) PROCEDURES CALLED: REVISION HISTORY: 17-Sat-2001 Written by JXP
(See Spec/Lines//x_setllst.pro)
NAME: x_setobjgui Version 1.1 PURPOSE: Interactive display of slit mask and slit positions and object traces to allow verificaiton of the identificaitons and traces. Largely based on ATV CATEGORY: Image display. CALLING SEQUENCE: x_setobjgui img, slitstr, objstr, [,min = min_value] [,max=max_value] [,/linear] [,/log] [,/histeq] [,/block] [,/align] [,/stretch] [,header = header] REQUIRED INPUTS: img -- FITS file slitstr -- Slit structure objstr -- Object sturcture OPTIONAL INPUTS: array_name: a 2-D data array to display OR fits_file: a fits file name, enclosed in single quotes KEYWORDS: min: minimum data value to be mapped to the color table max: maximum data value to be mapped to the color table linear: use linear stretch log: use log stretch histeq: use histogram equalization block: block IDL command line until ATV terminates align: align image with previously displayed image stretch: keep same min and max as previous image header: FITS image header (string array) for use with data array OUTPUTS: None. COMMON BLOCKS: x_setobjgui_state: contains variables describing the display state x_setobjgui_images: contains the internal copies of the display image x_setobjgui_color: contains colormap vectors x_setobjgui_pdata: contains plot and text annotation information RESTRICTIONS: Requires IDL version 5.1 or greater. Requires Craig Markwardt's cmps_form.pro routine. Requires the GSFC IDL astronomy user's library routines. Some features may not work under all operating systems. SIDE EFFECTS: Modifies the color table. EXAMPLE: To start x_setobjgui running, just enter the command 'x_setobjgui' at the idl prompt, either with or without an array name or fits file name as an input. Only one x_setobjgui window will be created at a time, so if one already exists and another image is passed to x_setobjgui from the idl command line, the new image will be displayed in the pre-existing x_setobjgui window. MODIFICATION HISTORY: Written by Aaron J. Barth, with contributions by Douglas Finkbeiner, Michael Liu, David Schlegel, and Wesley Colley. First released 17 December 1998. This version is 1.3, last modified 28 November 2000. For the most current version, revision history, instructions, list of known bugs, and further information, go to: http://cfa-www.harvard.edu/~abarth/x_setobjgui/x_setobjgui.html Revised by JXP Aug-2001
(See Spec/Slits//x_setobjgui.pro)
NAME: x_setslits PURPOSE: Finds slit edges on the 'flattened' flat in the presence of rotation CALLING SEQUENCE: slackers_setslits, flatimg, slitstr INPUTS: flat - Flat image or fits file slitstr - Slit structure COMMENTS: This piece of code allows for a slight rotation (-2 to 2 deg) of the mask, which can cause overlapping slits and other annoying things. REVISION HISTORY: 14-Feb-2002 Written by JXPj 6-Apr-2004 Revised by MRB
(See Spec/Slits//x_setslits.pro)
NAME: x_setwave Version 1.1 PURPOSE: Sets a wavelength array given a header from a FITS file CALLING SEQUENCE: wave = x_setwave(head, ntot) INPUTS: head - Header ntot - number of pixels RETURNS: wave - Wavelength array OUTPUTS: OPTIONAL KEYWORDS: OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: wave = x_setwave(head, 1000L) PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: 17-Nov-2001 Written by JXP
(See Spec/General//x_setwave.pro)
NAME: x_slctline Version 1.1 PURPOSE: Launches a GUI and allows the user to select a line. The code then returns the rest wavelength of that line. CALLING SEQUENCE: line = x_slctline, lines, /ISM, NLIN=, ILIN=, XOFFSET=, YOFFSET=, /GAL, PDMENU= INPUTS: lines - Line list structure RETURNS: line - Wavelength (double) OUTPUTS: line = unit number of line OPTIONAL KEYWORDS: /ISM - ISM style /GAL - Use the Galaxy style YOFFSET= - Placement of the GUI [default: 200] XOFFSET= - Placement of the GUI [default: 200] PDMENU= - String array formatted for cw_pdmenu NLIN= - Grab only the first NLIN lines (only for non-ISM or GAL) OPTIONAL OUTPUTS: ILIN= - Index of the selected line in the line list structure COMMENTS: EXAMPLES: line = x_slctline( lines ) PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: 17-Nov-2001 Written by JXP 29-Nov-2001 Significantly revised 08-Dec-2001 Allows ism or name+wave
(See Spec/Lines//x_slctline.pro)
NAME: x_slittoobj Version 1.0 PURPOSE: Simple program to move some tags from the slit structure into the object structure CALLING SEQUENCE: x_slittoobj, objstr, nobj, slitstr, clm INPUTS: objstr - Object sturcture nobj - Index of the object slitstr - Slit structure clm - Column where the object was identified RETURNS: OUTPUTS: Updates slitstr for original positions OPTIONAL KEYWORDS: OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: x_slittoobj, objstr, nobj, slitstr PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: 03-Mar-2002 Written by JXP
(See Spec/Slits//x_slittoobj.pro)
NAME: x_specbin Version 1.1 PURPOSE: Bins up 1D spectra in integer pixels. The routine returns a structure of flux and wavelength and variance that has been rebinned. CALLING SEQUENCE: bin = x_specbin(fx, nbin, VAR=, WAV=) INPUTS: fx - Flux nbin - Number of pixels to bin on RETURNS: bin - Structure of data OUTPUTS: OPTIONAL KEYWORDS: VAR= -- Input variance array WAV= -- Input wavelength array OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: bin = x_specbin(fx, 3) PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: 04-Mar-2002 Written by JXP
(See Spec/Analysis//x_specbin.pro)
NAME: x_speccoadd Version 1.1 PURPOSE: Routine written to coadd spectra. I highly recommend using x_combspec instead. The routine here is old and not recently tested! CALLING SEQUENCE: dat = x_speccoadd(spec) INPUTS: spec - Fits file or data RETURNS: dat - Data in fits file or the input data OUTPUTS: OPTIONAL KEYWORDS: FSCALE - Data is float DSCALE - Data is float OPTIONAL OUTPUTS: HEAD - Header COMMENTS: EXAMPLES: dat = x_speccoadd('spec.fits') PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: 27-Feb-2002 Written by JXP
(See Spec/Analysis//x_speccoadd.pro)
NAME: x_specpan Version 1.1 PURPOSE: Moves about a spectrum to left or right in a GUI. The state structure must have TAGS: xymnx and wave CALLING SEQUENCE: x_specpan, state, /LEFT, /NOY INPUTS: state -- GUI state structure with TAGS: xymnx, wave RETURNS: OUTPUTS: OPTIONAL KEYWORDS: /LEFT -- Pan left (default is right) /NOY -- Do not rescale in y (default is to rescale) OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: x_specpan, state, /LEFT PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: 17-Nov-2001 Written by JXP
(See Spec/Display//x_specpan.pro)
NAME: x_specplot Version 1.1 PURPOSE: GUI for plotting a spectrum and doing quick analysis CALLING SEQUENCE: x_specplot, flux, [ysin], XSIZE=, YSIZE=, TITLE=, WAVE=, LLIST=, /QAL, /GAL, ZIN=, /BLOCK, /NRM, /LLS, /QSO, /LBG INPUTS: flux - Flux array (or FITS file) [ysin] - Sigma array (or FITS file) RETURNS: OUTPUTS: OPTIONAL KEYWORDS: xsize - Draw window xsize (pixels) ysize - Draw window ysize (pixels) wave= - wavelength array dunit= - Extension in the FITS file INFLG= - Specifies the type of input files (or arrays) /LLS - Use Lyman limit line list /QSO - Use Quasar line list /GAL - Use galaxy line list /QAL - Use quasar absorption line list /LBG - use the Lyman Break Galaxy line list (Shapley et al '03) XRANGE= - Opening plot x-axis (and default) YRANGE= - Opening plot y-axis (and default) /GUI - Choose from a list of FITS files (current directory) OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: x_specplot, 'spec.fits' PROCEDURES/FUNCTIONS CALLED: XGETX_PLT XGETY_PLT XGETXPIX_PLT XGETYPIX_PLT REVISION HISTORY: 17-Nov-2001 Written by JXP 19-Dec-2001 Added Error array, Colm 21-May-2008 Added XRANGE option, KLC 16-Oct-2008 Enable flux, ysin to be arrays, KLC ; 29-Apr-2010 Added Shapley et al (2003) LBG composite, fixed 'g', ; updated Help table, KLC
(See Spec/General//x_specplot.pro)
NAME: x_specrebin Version 1.1 PURPOSE: Rebin a single data set to a new wavlength scale Simple linear interpolation. CALLING SEQUENCE: x_specrebin, wv, fx, nwwv, nwfx, VAR=, NWVAR=, /SILENT, /REDBLUE INPUTS: wv -- Original wavelength array fx -- Orignal flux array newwv -- New (desired) wavelength array RETURNS: nwfx -- New flux array OUTPUTS: OPTIONAL KEYWORDS: VAR= -- Original variance array /REDBLUE -- Data runs from red to blue (not blue to red) /SILENT SMOOTH= -- Number of pixels to smooth over OPTIONAL OUTPUTS: NWVAR= -- New variance array COMMENTS: EXAMPLES: x_specrebin, gdpix, orig_wv, orig_fx, newwv, newfx PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: 12-Apr-2002 Written by JXP
(See Spec/Analysis//x_specrebin.pro)
NAME: x_speczoom Version 1.1 PURPOSE: Zooms in or out on a spectrum in a GUI CALLING SEQUENCE: x_speczoom, state, flg INPUTS: state - GUI state structure (needs TAG xymnx) flg - 0-In, 1-Out RETURNS: OUTPUTS: OPTIONAL KEYWORDS: OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: x_speczoom, state, flg PROCEDURES/FUNCTIONS CALLED: xgetx_plt REVISION HISTORY: 17-Nov-2001 Written by JXP
(See Spec/Display//x_speczoom.pro)
NAME: x_speczoomreg Version 1.1 PURPOSE: Sets region to zoom in on in a GUI CALLING SEQUENCE: x_speczoom, state INPUTS: state -- GUI state (requires TAGS xymnx tmpxy, flg_zoom) RETURNS: OUTPUTS: OPTIONAL KEYWORDS: OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: x_speczoom, state PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: 17-Nov-2001 Written by JXP
(See Spec/Display//x_speczoomreg.pro)
NAME: x_splncogmax Version 1.0 PURPOSE: Create a table of COG values and fit a spline to it. The routine then writes the output to a FITS file for future usage. CALLING SEQUENCE: x_splncogmax, tmax, tval, tabul, NSTP=, OUTFIL=, TMIN=, STRCT= INPUTS: tmax -- Maximum optical depth to consider RETURNS: tval -- Array of optical depth values tabul -- Array of COG values (reduced EW) OUTPUTS: STRCT= -- Structure containing tval, tabul, and the SPLINE OUTFIL= -- FITS file where the spline is written (as a structure) OPTIONAL KEYWORDS: TMIN= -- Minimum optical depth to consider [default: 1e-4] NSTP= -- Number of points to evaluate at between TMIN and tmax [default: 1000L] OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: 15-Sep-2003 Written by JXP
(See Spec/Analysis//x_splncogmax.pro)
NAME: x_splot Version 1.1 PURPOSE: Plots any array interactively CALLING SEQUENCE: x_splot, [xdat], ydat, XSIZE=, YSIZE=, TITLE=, XTWO=, YTWO=, PSYM2=, /BLOCK, PSYM1=, YMNX=, XTHR=, YTHR=, PSYM3= INPUTS: [xdat] - x values (optional) ydat - Values RETURNS: OUTPUTS: OPTIONAL KEYWORDS: xsize - Draw window xsize (pixels) ysize - Draw window ysize (pixels) TITLE YTWO -- 2nd array to plot [If without XTWO, must have same dimension as xdat] XTWO -- 2nd array of x values to plot [requires YTWO] PSYM2 -- Plot symbol for array 2 [default: 10] YTHR -- 3nd array to plot [If without XTWO, must have same dimension as xdat] XTHR -- 3nd array of x values to plot [requires YTHR] PSYM3 -- Plot symbol for array 3 [default: 10] /BLOCK OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: x_splot, y PROCEDURES/FUNCTIONS CALLED: XGETX_PLT XGETY_PLT XGETXPIX_PLT XGETYPIX_PLT REVISION HISTORY: 17-Nov-2001 Written by JXP (modified from x1dfit) 24-Nov-2001 Added ytwo 9-Aug-2007 Added xmnx keyword JFH
(See General//x_splot.pro)
NAME: x_starid Version 1.1 PURPOSE: Allows the user to interactively identify standard stars in a field using lists and the like. This is a rather quick way of doing the calibrations. CALLING SEQUENCE: x_starid, img, date, ccd, tel, LST_PATH=, OBJ=, XSIZE=, YSIZE= INPUTS: img - Image(s) for Masking date - EPOCH of the obs (decimal years) ccd - Name of the CCD (Tek5, SITe1, LRISR, SITe3) tel - Name of telescope RETURNS: OUTPUTS: OPTIONAL KEYWORDS: OBJ - Object names XSIZE - Size of gui in screen x-pixels (default = 800) YSIZE - Size of gui in screen y-pixels (default = 800) OUT_PATH - Output name for id files (default: 'Photo/') LST_PATH - Path name for Lists [default: $XIDL_DIR/IMG/Photometry/Lists/] INORIENT - Number in range [-4,4] to change orientation of standards plotted on image. OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: x_starid, img, 2004.2, 'SITe1', 'LCO-40' PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: 03-Aug-2001 Written by JXP 04-Jan-2002 Updated and revised by JXP
(See IMG/Photometry//x_starid.pro)
NAME: x_statarray Version 1.1 PURPOSE: This set of routines takes a series of flats observed through the diffuser and creates a normalized Flat used to correct pixel-to-pixel response variations. A principal challenge with MIKE in its current state (April 2004) is that it is difficult to get sufficient counts on the blue side. mike_mkmflat :: The main routine simply does some basic accounting, organizes bias subtraction and performs I/O. mike_mkflat_work :: Accepts the name(s) of a series of OV subtracted milky flats. It then: 1. Opens the file and creates an inverse variance array 2. Takes out the low order variation in the image (lo_interp) 3. Performs a series of medians along the columns rejecting bad pixels (replace by local mean). 4. If multiple images were input, they are stacked with rejection and the final image is returned CALLING SEQUENCE: mike_mkmflat, mike, setup, [side] INPUTS: mike - MIKE structure setup - Setup identifier [side] - Blue (1), Red (2), or both [1,2L] (Default: [1,2L]) RETURNS: OUTPUTS: One normalized flat per setup per side with names like 'Flats/Flat_B_01_M.fits.gz' OPTIONAL KEYWORDS: /CLOBBER - Overwrite Output MilkyFlat /OVCLOB - Overwrite OV files if they exist for the flats /SVOV - Save the OV files created during this step /USEBIAS - Use bias frame in OV subtraction OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: 9-May-2005 Adapted by JXP from existing programs by SB
(See IMG/Reduction//x_statarray.pro)
NAME: x_stdcalibfil Version 1.1 PURPOSE: Given an ra and dec, returns calib file and standard star name CALLING SEQUENCE: x_stdcalibfil, ra, dec, calibfil, std_name INPUTS: ra - RA in : format (12:11:23.3) dec - DEC in : format (+13:32:21.2) RETURNS: calibfil -- Name of calib file in $XIDL_DIR/Spec/calibs/standards OUTPUTS: OPTIONAL KEYWORDS: OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: 12-Jan-2008 Written by JXP
(See Spec/Flux//x_stdcalibfil.pro)
NAME: x_stdmag Version 1.1 PURPOSE: Does aperture photometry on the objects in the std_* list files CALLING SEQUENCE: xdimg_stdmag, struct, SKYR= INPUTS: img -- Image strfil -- Star list file outfil -- Output file RETURNS: OUTPUTS: OPTIONAL KEYWORDS: SKYR = 2 float array describing sky annulus in arcsec (default=15,30) ARCPIX= Arcseconds per pixel SATUR= Saturation level OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: x_stdmag, 'Final/f_ccd003.fits', 'Photometry/star.list', 'outfil' PROCEDURES/FUNCTIONS CALLED: X_APER X_CCDINF REVISION HISTORY: 03-Apr-2003 Written by JXP
(See IMG/Photometry//x_stdmag.pro)
NAME: x_stsltgui Version 1.0 PURPOSE: Allows the user to interactively (GUI) identify edges of inidividual slits in the undistorted image CALLING SEQUENCE: x_stsltgui, img, slitstr, XSIZE=, YSIZE= INPUTS: img - Undistorted image slitstr - Slit structure RETURNS: OUTPUTS: OPTIONAL KEYWORDS: XSIZE - Size of gui in screen x-pixels (default = 700) YSIZE - Size of gui in screen y-pixels (default = 700) OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: x_stsltgui, img, slitstr PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: 07-Feb-2002 Written by JXP
(See Spec/Slits//x_stsltgui.pro)
NAME: x_suboscan Version 1.1 PURPOSE: Called by x_mkbias and x_subbias. This routine does the overscan subtraction using the col and row sections at the right and top, respectively. The code averages the overscan region (with clipping), identifies bad rows (SVBAD), and then uses SAVGOL to create a smoothed representation of the overscan. This is then subtracted from the columns in the image. Finally, the bias row (written at the top of the image) is subtracted from each row after a SAVGOL processing. CALLING SEQUENCE: x_suboscan, raw, head, ovimg, rbin, cbin, [imtype], /NOBIASROW, /DEBUG, SVBAD= INPUTS: raw -- 2D image head -- Header for the image (only used to update the card) fincol -- Last column of data section imtype= -- Image type:: 'ZRO' (only used for debugging) RETURNS: OUTPUTS: ovimg -- Bias subtracted image OPTIONAL KEYWORDS: BIASROW - if set, bias row is used. SKIPOV - If set, skip overscan subtraction (bias only) DEBUG -- Turn debug mode on OPTIONAL OUTPUTS: SVBAD -- Rows with anomolous behavior, most likely related to a transient occurance within the CCD electronics. COMMENTS: REVISION HISTORY: 18-July-2003 RAB 16-Feb-2004 JXP -- added kludge for bad rows
(See IMG/Reduction//x_suboscan.pro)
NAME: x_sunradec Version 1.0 PURPOSE: CALLING SEQUENCE: INPUTS: RETURNS: OUTPUTS: OPTIONAL KEYWORDS: OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: PROCEDURES/FUNCTIONS CALLED: x_calclst REVISION HISTORY: Based on code in skycalendar v5 written by John Thorstensen Dartmouth College 10-Dec-2009 Written by JXP
(See Obs//x_sunradec.pro)
NAME: x_templarc Version 1.1 PURPOSE: Given an archived Arc spectrum and solution and a new arc spectrum, find the pixel offset and auto-id the arc lines in new arc spectrum. One must turn /FFT on to calculate the shift. CALLING SEQUENCE: x_templarc, spec, lines, guessfit, /FFT, MSK=, MXSHFT=, $ MOCK_FFT=, SHFT=, ALL_PK=, PKWDTH=, $ /THIN, FORDR=, PKSIG=, SKIPLIN=, $ MXOFF=, /LOG INPUTS: spec - Input arc image or spectrum lines - Arc line structure guessfit - FIT to archived arc RETURNS: OUTPUTS: lines - Sets flg_plt to 1 those lines which are ID'd OPTIONAL KEYWORDS: /FFT -- Calculate the most likely offset between the archived arc and the new one using the FFT procedure MOCKFFT -- Archived FFT [default: create one from the line list] MXOFF= -- Maximum offset between ID line and a line in the linelist [default: 3 pixels] SHFT= -- Shift between archived and new arc (Input and/or Output) PKSIG= -- Sigma significant of arc lines (as found by x_fndpeak) [default: 7.] MSK= -- Mask of the lines MXSHFT= -- Maximum shift between archived and new solution /THIN -- Allow for very narrow arc lines /LOG -- Do the algorithm with logarithmic wavelengths FORDR -- Order for the fit for the continuum of the arc /SKIPLIN -- Do not bother to identify good lines for subsequent fitting (algorithm has only calucated the shift) OPTIONAL OUTPUTS: ALL_PK= -- Pix values of the arc line peaks COMMENTS: EXAMPLES: x_templarc, spec, lines, guessfit, SHFT=shft PROCEDURES/FUNCTIONS CALLED: x_fndpeaks REVISION HISTORY: 26-Aug-2002 Written by JXP
(See Spec/Arcs//x_templarc.pro)
NAME: x_tiffset Version 1.1 PURPOSE: Sets (or unsets) plotting variables for nice looking screen plots to then be used in laptop presentations. CALLING SEQUENCE: x_tiffset, /UNSET INPUTS: RETURNS: OUTPUTS: OPTIONAL KEYWORDS: /UNSET -- Unset the plotting values OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: 02-Jun-2004 Written by JXP
(See General//x_tiffset.pro)
NAME: x_trace Version 1.2 PURPOSE: Trace a spectrum. Ok for quick reductions CALLING SEQUENCE: fit = x_trace(img, aper, cline, PHSIG=, PLSIG=, TFFIT=, NTRC=, PFUNC=, PNORD=, PHSIG=, PLSIG=, NOINTER=, YBUFF=, /PINTER) INPUTS: img - 2D spectral image aper - Aperture defining the object cline - Column to begin trace at RETURNS: FIT - Trace at each column OUTPUTS: OPTIONAL KEYWORDS: NTRC - Number of columns to median for the trace TFITSTR - Structure for the fitting the trace PFUNC- Profile fitting function PNORD- Profile fitting order PHSIG PLSIG INTER - Interactive fitting for trace OPTIONAL OUTPUTS: TFFIT - Output fit info for the trace COMMENTS: EXAMPLES: x_trace, 'spec.fits' PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: 19-Nov-2001 Written by JXP 02-Feb-2002 JXP -- Added trace_crude option via CRUDE
(See Spec/Extraction//x_trace.pro)
NAME: x_tracearc Version 1.1 PURPOSE: Given an arc image (or a slit from a multi-slit or one order from an echelle), arc lines and trace them across the image. The program returns a trace structure which can be used to create a wavelength image. See x_echtrcarc for an Echelle version. CALLING SEQUENCE: tracestr = x_tracearc( img, [ymnx], YSTRT=, /ROT, GAIN=, RN=, NSIG=, RADIUS=, MIN_XERR=, /SILENT, NORD=, VAR= ) INPUTS: img - Input arc image [ymnx] - Used to define edges of a slit or an order [default: image edges] RETURNS: tracestr - Trace structure describing the traces and fits to the traces of the arc lines OUTPUTS: OPTIONAL KEYWORDS: VAR= - Variance image of the Arc GAIN= - Set this if you want the program to create the VAR image RN= - Read noise (set this if you want the program to create the VAR image) [default: 6] RADIUS= - Radius input parameter to trace_crude [default: 1.5] NSIG= - Number of sigma significance for arc linews [default: 5.] YSTRT - COLUMN/ROW to start at /ROT - Rotate the iamge by 90deg in those cases where the Arc lines run side-to-side (trace_crude requries this) MIN_XERR= -- Minimum xerr for fitting [default: 0.01] NORD= - Order for fit to arc line curvature [default: 2L] YSTRT= - Offset to account for sub images OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: trcstr = x_tracearc( img ) PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: 28-Jan-2002 Written by JXP
(See Spec/Arcs//x_tracearc.pro)
NAME: x_traceflat Version 1.1 PURPOSE: Traces the y-distortion of a flat of a number of slits CALLING SEQUENCE: x_traceflat, img, tracestrct, VAR=, GAIN=, RN=, SAW=, $ ystrt=, /NOTRANS INPUTS: img - Input image RETURNS: trcstr -- A trace structure describing the curvature of individual slits or orders OUTPUTS: OPTIONAL KEYWORDS: YSTRT -- COLUMN/ROW to start at /NOTRANS -- Do not transpose original image VAR= -- Variance image input GAIN,RN= -- Values to create a VAR array OPTIONAL OUTPUTS: SAW= -- The sawtooth image COMMENTS: EXAMPLES: x_traceflat, img, map PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: 28-Jan-2002 Written by JXP
(See Spec/Rectify//x_traceflat.pro)
NAME: x_traceslit Version 1.0 PURPOSE: This is a failed attempt at a tracing program. Do not use! CALLING SEQUENCE: x_traceslit, img, pos, top, bottom FFIT=, /INTER) INPUTS: img - Input image pos - [x,y] position on the CCD (default=1/3 max + min) RETURNS: OUTPUTS: top - Trace of the top of the slit bottom - Trace of the bottom of the slit OPTIONAL KEYWORDS: GAIN - Gain of the CCD OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: x_traceslit, img, [252.3, 235.5], top, bottom PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: 16-Jan-2002 Written by JXP
(See Spec/Rectify//x_traceslit.pro)
NAME: x_tstoff Version 1.1 PURPOSE: Does a quick check on the offset between a flat and object frame. Uses FFT correlation CALLING SEQUENCE: x_tstoff, flat_in, obj_in, offset, CLINE= INPUTS: flat_in - Flat image (array or string) obj_in - Flat image (array or string) RETURNS: offset - Vertical pixel offset OUTPUTS: OPTIONAL KEYWORDS: ELINE - End line of data (routine takes 1/3, 1/2, 2/3) OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: x_tstoff, flat, obj, offset PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: 25-Jan-2002 Written by JXP
(See Spec/Rectify//x_tstoff.pro)
NAME: x_tweakarc Version 1.1 PURPOSE: Allow the user to interactively (with a GUI) fiddle with the 1D wavelength solution of a arc-line spectrum. This is designed for Echelle observations only. CALLING SEQUENCE: x_tweakarc, twkfil, ordrs, templfil, _EXTRA=extra, $ LINLIST=linlist, QAFIL=qafil, OSTR_FIL=ostr_fil INPUTS: twkfil -- File containing the 1D arc-line fits ordrs -- Orders to tweak [physical order numbers] [templfil] -- name of archived wavelength solution to use as at template RETURNS: OUTPUTS: IDL fit file (one per order) (e.g. Arcs/ArcECH_##fit.idl) OPTIONAL KEYWORDS: LINLIST= -- Name of spectral line list OSTR_FIL= -- Name of file containing the order structure. Required for QA OPTIONAL OUTPUTS: QAFIL= -- Name of file to write QA info COMMENTS: EXAMPLES: PROCEDURES/FUNCTIONS CALLED: x_fitarc REVISION HISTORY: Summer-2005 Created by JXP
(See Spec/Arcs//x_tweakarc.pro)
NAME: x_uniqstr Version 1.1 PURPOSE: Obsolote: Superseded by UNIQ CALLING SEQUENCE: uniq = x_uniqstr(strings, COUNT=count) INPUTS: strings - Array of strings RETURNS: uniq - Array of unique members OUTPUTS: OPTIONAL KEYWORDS: sort - Sort the output OPTIONAL OUTPUTS: COUNT - number of unique strings COMMENTS: EXAMPLES: uniq = x_uniqstr( lbls, count=count) PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: 17-Nov-2001 Written by JXP
(See General//x_uniqstr.pro)
NAME: x_velplt Version 1.1 PURPOSE: GUI used to display velocity profiles for absorption line system. The user can control a number of options for the plot, output ps files and PG plot input files, etc. CALLING SEQUENCE: x_velplt, flux_fil, zin, VMNX=vmnx, INFLG=inflg, $ TITLE=title, NPLT=nplt, NRM=nrm, XSIZE=xsize, YSIZE=ysize, $ SIG_FIL=, /ESIDLA, SVSTATE=, /LLS INPUTS: flux_fil -- Input FITS file for the flux (header includes wavelength info) zin -- Redshift of absorption lines RETURNS: OUTPUTS: OPTIONAL KEYWORDS: VMNX= -- Velocity range to plot [default [-300, 300]] NPLT= -- Number of plots to show [default: 15L] TITLE= -- Title to give GUI XSIZE - Size of gui in screen x-pixels [default = 700] YSIZE - Size of gui in screen y-pixels [default = ssz -200] /LLS -- Use LLS line list /SUBLLS -- Use smaller LLS line list /ESIDLA -- Use ESI DLA line list /CII - subset of the ESIDLA line list for measuring CII SIG_FIL= -- Sigma file INFLG= -- Flag for flux_fil data (see x_readspec) SVSTATE= -- Input IDL file that saved the state of the GUI previously WAVE -- wavelength array (flux_fil should be array) OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: x_velplt, wfccd, maskid, expsr PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: 29-Oct-2002 Written by JXP 13-Jan-2006 Add wave keyword and enable passing of arrays, KLC
(See Spec/Analysis//x_velplt.pro)
NAME: x_voigt Version 1.1 PURPOSE: Calculate a single voigt profile, given wavelength, absorber, and an array of lines. This can be a very expensive routine to run. CALLING SEQUENCE: tau = x_voigt(wave, lines, FWHM=) INPUTS: wave - Array of wavelengths to realize voigt profile lines - line(s) structure to compute voigt profile. If mutliple, the entire list will be looped through. RETURNS: Normalized flux array with Voigt profile super-posed OPTIONAL INPUTS: FWHM - Resolution of instrument in PIXELS of input array OUTPUTS: tau - Optical depth at each wavelength OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: PROCEDURES CALLED: x_gsmooth REVISION HISTORY: 25-May-2000 Created by S. Burles, FNAL/IAP 2003 Modified by JXP to give 'exact' answer 21-Jun-2007 Modified by KLC to opt out of 'exact' answer with /nosmooth
(See Spec/Voigt//x_voigt.pro)
NAME: x_wavecal Version 1.1 PURPOSE: Wavelength calibrate a given input Arc img (or spectrum). This routine simply extracts the Arc spectrum (if necessary) and then calls x_identify CALLING SEQUENCE: wave = x_wavecal( arc, [extrct], LINELIST=, /DEBUG, $ /REDBLUE, DISP=, CALIB=, FLUX=) INPUTS: img/spec - 2D image or 1D spectrum [extrct] - Extraction structure (required for an input 2D image) RETURNS: OUTPUTS: OPTIONAL KEYWORDS: LINELIST - Reference list (user can set interactively) DISP - Guess at dispersion (A or km/s per pix [pos/neg value]) /FLUX - Assumes wide slit and therefore wide arc lines /REDBLUE - Spectrum runs from red to blue (not blue to red) /DEBUG /ROT - Transpose the Arc image (code requires orders parallel to rows) OPTIONAL OUTPUTS: CALIB= - Structure defining the fit SPEC= - 1D extracted spectrum COMMENTS: EXAMPLES: wave = x_wavecal(spec) PROCEDURES/FUNCTIONS CALLED: x_readimg x_identify REVISION HISTORY: 07-Dec-2001 Written by JXP
(See Spec/Arcs//x_wavecal.pro)
NAME: x_wrechfspec Version 1.0 PURPOSE: Reads and writes the echfspec structure CALLING SEQUENCE: x_wrechfspec, echfspec, outfil, /READ INPUTS: echfspec -- IDL structure outfil -- Name of FITS file RETURNS: OUTPUTS: OPTIONAL KEYWORDS: /READ -- Read instead of write the structure OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: x_wrechfspec, echfspec, 'Extract/2015+657_ech.fits' PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: 03-Sep-2002 Written by JXP
(See Spec/Analysis//x_wrechfspec.pro)
NAME: x_wrlwdfspec Version 1.0 PURPOSE: Reads and writes the lwdfspec structure CALLING SEQUENCE: x_wrlwdfspec, lwdfspec, outfil, /READ INPUTS: lwdfspec -- IDL structure outfil -- Name of FITS file RETURNS: OUTPUTS: OPTIONAL KEYWORDS: /READ -- Read instead of write the structure OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: x_wrlwdfspec, lwdfspec, 'Extract/2015+657_lwd.fits' PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: 02-Aug-2002 Written by JXP
(See Spec/Analysis//x_wrlwdfspec.pro)
NAME: x_xy2traceset PURPOSE: Convert from an array of x,y positions to a trace set CALLING SEQUENCE: xy2traceset, xpos, ypos, tset, [ invvar=, func=func, ncoeff=ncoeff, $ xmin=xmin, xmax=xmax, maxiter=maxiter, inputfunc=inputfunc, $ inmask=inmask, outmask=outmask, yfit=yfit, inputans=inputans, $ _EXTRA=EXTRA ] INPUTS: xpos - X positions corresponding to YPOS as an [nx,Ntrace] array ypos - Y centers as an [nx,ntrace] array OPTIONAL KEYWORDS: invvar - Inverse variance for weighted fits. func - Function for trace set; options are: 'poly' 'legendre' 'chebyshev' 'chebyshev_split' Default to 'legendre' ncoeff - Number of coefficients in fit; default to 3 xmin - Explicitly set XMIN for trace set rather than using minimum in XPOS xmax - Explicitly set XMAX for trace set rather than using maximum in XPOS maxiter - Maximum number of rejection iterations; set to 0 for no rejection; default to 10. inmask - Mask set to 1 for good points and 0 for rejected points; same dimensions as XPOS, YPOS. Points rejected by INMASK are always rejected from the fits (the rejection is "sticky"), and will also be marked as rejected in OUTMASK. inputans - ??? inputfunc - An array which matches the size of ypos, which is multiplied to the normal function before SVD decomposition silent - Set to suppress print and splog outputs EXTRA - Keywords passed to either the function FUNC, or DJS_REJECT(). Note that keywords like MAXREJ relate to each individual trace. OUTPUTS: tset - Structure containing trace set OPTIONAL OUTPUTS: outmask - Mask set to 1 for good points and 0 for rejected points; same dimensions as XPOS, YPOS. yfit - Fit values at each XPOS. COMMENTS: The fits are done to one trace at a time, where each trace is treated completely independently. Note that both MAXDEV and MAXSIG can be set for applying both rejection schemes at once. Additional keywords can be passed to the fitting functions with _EXTRA. By not setting any of these rejection keywords, no rejection is performed. EXAMPLES: BUGS: PROCEDURES CALLED: djs_reject() fchebyshev() fchebyshev_split() flegendre() fpoly() func_fit() REVISION HISTORY: 19-May-1999 Written by David Schlegel, Princeton. 04-Aug-1999 Added chebyshev option (DJS). 02-Sep-2000 Modify to use rejection schemes in DJS_REJECT() (DJS). 07-Dec-2000 Added /silent keyword (DPF) 10-Jul-2001 Add polynomial option 10-Apr-2005 Modified by SB 2006 Stolen by JXP
(See FIT//x_xy2traceset.pro)
NAME: x_ydtortgui Version 1.1 PURPOSE: Allows the user to interactively examine the trace to slit edges used to trace the y-distortion. CALLING SEQUENCE: x_ydtortgui, img, tracestrct, [newmnx], XSIZE=, YSIZE= INPUTS: img - Traced Image trace - x,y positions of traces fltarr(N,M,2) flgs - Flags describing the traces RETURNS: OUTPUTS: newmnx - The new min and max values OPTIONAL KEYWORDS: XSIZE - Size of gui in screen x-pixels (Default = 1000) YSIZE - Size of gui in screen y-pixels (Default = 500) OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: x_ydtortgui, img, tracestrct PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: 05-Feb-2002 Written by JXP
(See Spec/Rectify//x_ydtortgui.pro)
NAME: x_zfind PURPOSE: Find possible redshift matches for a set of spectra using a set of eigen-templates. This is just a version I grabbed and slightly modified from the SDSS distribution. The main modification was to allow for more free paramters in fitting the continuum of the galaxies due to poor fluxing with the WFCCD. CALLING SEQUENCE: result = x_zfind( objflux, objivar, hdr=hdr, $ [ starflux=, starloglam0=, stardloglam=, $ eigenfile=, eigendir=, columns=, npoly=, $ zmin=, zmax=, zguess=, pwidth=, nfind=, width=, _EXTRA= ] INPUTS: objflux - Object fluxes [NPIXOBJ,NOBJ] objivar - Object inverse variances [NPIXOBJ,NOBJ] REQUIRED KEYWORDS: hdr - FITS header for objects, used to construct the wavelengths from the following keywords: COEFF0, COEFF1. OPTIONAL KEYWORDS: starflux - Eigenspectra [NPIXSTAR,NSTAR]. starloglam0- Zero-point of log-10(Angstrom) wavelength mapping of STARFLUX. stardloglam- Wavelength spacing for STARFLUX in log-10(Angstroms) eigenfile - Input FITS file with an [NPIXSTAR,NSTAR] image with either templates or eigenspectra. If a wildcard appears in the file name, then the file that appears last in a sort is used. The header keywords COEFF0, COEFF1 are used to specify the wavelength mapping in log-10 Angstroms. This must be set if STARFLUX,STARLOGLAM0 are not set. eigendir - Directory for EIGENFILE; default to $IDLSPEC2D/templates. columns - Column numbers of the eigenspectra image to use in the PCA fit; default to all columns. npoly - Number of polynomial terms to append to eigenspectra; default to none. zmin - Minimum redshift to consider; default to no lower bound. zmax - Maximum redshift to consider; default to no upper bound. zguess - Initial guess for redshift; search for a solution about this value. If specified with PWIDTH, then ZMIN and ZMAX are ignoreed. pwidth - Search width in pixels about the intial guess redshift ZGUESS. If specified with ZGUESS, then ZMIN and ZMAX are ignored. nfind - Keyword for ZCOMPUTE(). width - Keyword for ZCOMPUTE(). _EXTRA - Keywords for ZCOMPUTE(), such as PSPACE, DOPLOT, DEBUG. OUTPUTS: result - Structure with redshift-fit information. Structure elements are left blank if fewer than NFIND peaks are found. OPTIONAL OUTPUTS: COMMENTS: One can specify a search domain for the redshift with ZMIN and ZMAX, or with ZGUESS and PWIDTH. If none of those parameters are set, then all possible redshifts that overlap the object and star (template) are tested. EXAMPLES: BUGS: PROCEDURES CALLED: concat_dir() djs_filepath() fileandpath() readfits() splog sxpar() zcompute() INTERNAL SUPPORT ROUTINES: x_sp1d_struct() REVISION HISTORY: 28-Jun-2000 Written by D. Schlegel, Princeton
(See Spec/Analysis//x_zfind.pro)
NAME: z_arcpairs Version 1.1 PURPOSE: To identify the wavelength solution given arc lines and a list CALLING SEQUENCE: good = z_arcpairs(peaks, l, disp0, [dr1, NCOEFF=, INC=, TAN_BLAZE=]) INPUTS: peaks : arc line positions in pixel space l : possible arc line wavelengths disp0 : guess at central dispersion per pixel, needs to be within dr of the correct dispersion RETURNS: good : An index list of the best meatched wavelengths based on the number of unique hits OUTPUTS: OPTIONAL KEYWORDS: dr1 : range of dispersion to search, 10% is default [0.9,1.1] tan_blaze For high dispersion gratings, the tangent of the blaze angle, usually referred to a R. (like the R=2 grating in HIRES) OPTIONAL OUTPUTS: COMMENTS: EXAMPLES: PROCEDURES/FUNCTIONS CALLED: REVISION HISTORY: May-2005 Written by SB
(See Spec/Arcs//z_arcpairs.pro)


--- layout: post date: 2011-02-02 time: "09:00:00" authors: ["Greg Wilson"] title: Three Months, Two Spikes, One Conclusion tags: ["Opinion"] ---
Here are the traffic stats for the last three months at software-carpentry.org:
| November 2010 |
| December 2010 |
| January 2011 |
It's hard to make out what's happening because of the big spike in December, and the less prominent (but still significant) spike in November, so here's a summary:
So what were the spikes? The first, in November, came when we posted our Python lectures. The second, in December, was Tommy Guy's episode on how to build a simple recommendation engine, which in turn was based on an example from Toby Segaran's excellent book Programming Collective Intelligence. That was more popular than anything else we've ever put on the site, which is both encouraging (if we build it, you will come) and disheartening (I have no idea what else to build that will be that popular).


{% extends 'layout.html' %} {% block pageTitle %} NHS.UK prototype kit {% endblock %} {% block beforeContent %} {% endblock %} {% block content %} James Anthony Gould has been added to the system. Add a new case Primary information {% include "alpha/includes/_person.html" %} Create case and continue Adding multiple cases at once? Add another case {% endblock %}


TRAVEL-EASE - meclizine hydrochloride tablet
Geri-Care Pharmaceutical Corp
Disclaimer: Most OTC drugs are not reviewed and approved by FDA, however they may be marketed if they comply with applicable regulations and policies. FDA has not evaluated whether this product complies.
For the prevention and treatment of these symptoms associated with motion sickness • nausea • vomiting • dizziness
Do not use in children under 12 years of age unless directed by a doctor.
Ask a doctor before use if you have
• breathing problems, such as emphysema or chronic bronchitis
• glaucoma
• difficulty urinating due to an enlarged prostate gland
Ask a doctor or pharmacist before use if you are taking sedatives or tranquilizers.
When using this product
• drowsiness may occur
• avoid alcoholic beverages
• alcohol, sedatives and tranquilizers may increase drowsiness
• use caution when driving a motor vehicle or operating machinery
If pregnant or breast-feeding,ask a health professional before use.
• to prevent motion sickness, take the first dose one hour before starting activity
• not for frequent or prolonged use except on the advice of a doctor
• do not exceed recommended dose
| Adults and children 12 years if age and older |
Take 1-2 tablets once daily, or as directed by a doctor. Do not exceed 2 tablets in 24 hours. |
• TAMPER EVIDENT:Do not use if imprinted seal under cap is broken or missing.
• store at room temperature 15˚-30˚C (59˚-86˚F)
• protect from humidity
|
TRAVEL-EASE
meclizine hcl tablet | ||||||||||||||||||||||
| ||||||||||||||||||||||
| ||||||||||||||||||||||
| ||||||||||||||||||||||
| ||||||||||||||||||||||
| ||||||||||||||||||||||
|
| Labeler - Geri-Care Pharmaceutical Corp (611196254) |
| Registrant - Geri-Care Pharmaceutical Corp (611196254) |


|
Lab3
|
Routines for setting up the flexible timer module (FTM) on the TWR-K70F120M. More...
#include "types.h"
Go to the source code of this file.
Data Structures | |
| struct | TTimer |
Functions | |
| BOOL | Timer_Init () |
| Sets up the FTM before first use. More... | |
| BOOL | Timer_Set (const TTimer *const aTimer) |
| Sets up a timer channel. More... | |
| BOOL | Timer_Start (const TTimer *const aTimer) |
| Starts a timer if set up for output compare. More... | |
| void | __attribute__ ((interrupt)) FTM0_ISR(void) |
| Interrupt service routine for the FTM. More... | |
Routines for setting up the flexible timer module (FTM) on the TWR-K70F120M.
This contains the functions for operating the flexible timer module (FTM).
| void __attribute__ | ( | (interrupt) | ) |
Interrupt service routine for the FTM.
If a timer channel was set up as output compare, then the user call-back function will be called.
| BOOL Timer_Init | ( | ) |
Sets up the FTM before first use.
Enables the FTM as a free running 16-bit counter.
Sets up a timer channel.
| aTimer | is a structure containing the parameters to be used in setting up the timer channel. channelNb is the channel number of the FTM to use. initialCount is the compare value for an output compare event. timerFunction is used to set the timer up as either an input capture or an output compare. ioType is a union that depends on the setting of the channel as input capture or output compare: outputAction is the action to take on a successful output compare. inputDetection is the type of input capture detection. userFunction is a pointer to a user callback function. userArguments is a pointer to the user arguments to use with the user callback function. |


We first select the top 100 liquid securities and ETFs with prices greater than $5 based on Dollar Volume for our universe. Research from "Common Factors" suggests that the U.S. equity, commodity, and index markets are all affected by seasonality patterns. Therefore, we can include any assets in our universe. Note that while this strategy does not require fundamental data for implementation, other strategies in the library do. In those cases we would need to remove ETFs from the universe because we don’t have fundamental data for ETFs.
# Sort the securities with prices > 5 in DollarVolume decendingly selected = sorted([x for x in coarse if x.Price > 5], key=lambda x: x.DollarVolume, reverse=True) # Get securities after coarse selection symbols = [x.Symbol for x in selected[:self.num_coarse]]
"Common Factors" indicates that taking long and short positions based on historical same-calendar month returns earns an average monthly return of 1.88%. Our implementation also selects securities to long and short based on their same-calendar month returns. For each security in the universe, we calculate the monthly return for the same-calendar month of the previous year and choose the symbols as follows:
# Get historical close data for coarse-selected symbols of the same calendar month start = self.Time.replace(day = 1, year = self.Time.year-1) end = Expiry.EndOfMonth(start) - timedelta(1) history = self.History(symbols, start, end, Resolution.Daily).close.unstack(level=0) # Get the same calendar month returns for the symbols MonthlyReturn = {ticker: prices.iloc[-1]/prices.iloc[0] for ticker, prices in history.iteritems()} # Sorted the values of monthly return sortedReturn = sorted(MonthlyReturn.items(), key=lambda x:x[1], reverse=True) # Get the symbols to long / short self.longSymbols = [x[0] for x in sortedReturn[:self.num_long]] self.shortSymbols = [x[0] for x in sortedReturn[-self.num_short:]] # Note that self.longSymbols/self.shortSymbols contains strings instead of symbols return [x for x in symbols if str(x) in self.longSymbols + self.shortSymbols]
At the end of each month, we rebalance our portfolio, liquidate the securities that are not part of the new month’s universe, and repeat step 1 and 2. Keep in mind we use equal weights for the long and short positions of securities in our portfolio.
''' Rebalance every month based on same-calendar month returns effect ''' # Before next rebalance, do nothing if self.Time < self.nextRebalance: return count = len(self.longSymbols + self.shortSymbols) # Open long positions for symbol in self.longSymbols: self.SetHoldings(symbol, 1/count) # Open short positions for symbol in self.shortSymbols: self.SetHoldings(symbol, -1/count) # Rebalance at the end of every month self.nextRebalance = Expiry.EndOfMonth(self.Time) - timedelta(1)


--- layout: page title: About header-img: "img/about-bg.png" ---
Young professional trying to make the world a happier place one code at a time. <3


How to create firewall rules
Overview
vCloud Director provides a fully featured layer 3 firewall to control transit from inside to outside security boundaries, and within the various VDC networks you create.
When you specify networks or IP addresses, you can use:
An individual IP address
IP ranges separated by a dash (
-
)A CIDR, for example,
<IP_ADDRESS>/24
The keywords
internal
,external
orany
The steps for creating firewall rules vary depending on what type of edge gateway you're working with:
Note
We recommend that you convert your edge to an advanced gateway to access the latest vCloud Director functionality. For more information, see How to convert your edge to an advanced gateway.
Note
NAT rules only work if the firewall is enabled. For security reasons, you should ensure that the firewall is always enabled.
Creating firewall rules for an advanced gateway
To create a firewall rule on an advanced gateway:
In vCloud Director, access the edge gateway settings.
For more detailed instructions, see How to access edge gateway settings
Select the Firewall tab.
Click the + button to add a new row to the firewall rules table.
For the New Rule, specify a Name.
In the Source and Destination fields, specify the source and destination addresses for the firewall rule.
To specify an IP address or range, click IP and enter the appropriate Value. When you're done, click Keep.
To specify a group of VMs or IPs, click + and select the desired objects. When you're done, click Keep.
If you're likely to reuse a group of the same source or destination IP addresses in multiple rules, select the Grouping Objects tab and click + to create an IP set. You can then select this IP set in the Select objects dialog box.
In the Service field, click + and, in the Add Service dialog box, specify the Protocol, Source Port and Destination Port for the rule. When you're done, click Keep.
Select whether the rule is an Accept or Deny rule.
Click Save changes.
Creating firewall rules for a standard edge
Note
You can only manage advanced gateways in the new vCloud Director 9.1 tenant portal. If you're working with a standard edge gateway, you must first switch to the vCloud Director web console to manage the edge. For more information, see How to switch to the vCloud Director web console from the tenant portal.
To create a firewall rule on a standard edge:
In vCloud Director, click the Administration tab.
For more detailed instructions, see the Getting Started Guide for UKCloud for VMware
Double-click the virtual data centre (VDC) that you want to work with, or right-click the VDC and select Open.
Select the Edge Gateways tab.
Right-click the edge gateway and select Edge Gateway Services.
Select the Firewall tab.
Click Add.
Give the rule a name and assign a source IP address and source port type. This can be any port or a specific port number.
Add a destination IP address and port, then choose which protocol to assign to the rule.
Select whether to make the rule an Allow or Deny rule, and whether to log the network traffic for this particular rule. (Log viewing is currently not available owing to the multi-tenant nature of the environment. We are working to make this feature available in the future.)
Note
With firewall rules, you are allowing packets through from the external network to the public IP address which is subsequently NAT-ed. A common mistake is to create firewall rules from
external
to an internal Org Network IP address or range.When you're finished, click OK.
Example
A common use case for a firewall rule is to allow SSH through from the internet. The following example uses allocated public IP addresses.
When your VDC is provisioned in the:
Assured OFFICIAL platform, you're assigned five public IP addresses
Elevated OFFICIAL platform, you're assigned three PSN-P IP addresses
In the examples below, the source is any
(any IP address within the VDC). The source port is also any
. The destination is a public IP address and the destination port is 443
for HTTPS.
Advanced gateway
Standard edge
Next steps
In this article you've learned how to create firewall rules. For other edge gateway configuration tasks, see:
Feedback
If you find an issue with this article, click Improve this Doc to suggest a change. If you have an idea for how we could improve any of our services, visit UKCloud Ideas. Alternatively, you can contact us at products@ukcloud.com.


Settling rental dues
Your property-related legal queries answered by S.C. RAGHURAM, Partner, RANK Associates, a Chennai-based law firm
My son (settled in Bengaluru) let out his duplex house on the first floor of our premises for rent (₹21,000 per month), advising the tenant to credit the rent to his SB account.
He recently advised me that the tenant has not paid rent for the past 16 months and the total outstanding amount is ₹3 lakh.
The tenant left the house in August 2018 saying he is going to Conoor for a few days, but he hasn’t returned since. Whenever contacted, he claims to settle dues at the end of that month.
How do I go about settling the dues and getting control of the house?
Ravindranath P.P.
Chennai
You have to immediately file necessary legal proceedings for recovery of arrears of rents and for redelivery of possession. If there is an inordinate delay on your part in taking necessary legal action, the laws of limitation may affect your claim.
My daughter and son-in-law jointly bought a piece of land near Padappai in 2006 and registered it at the sub-registrar’s office. It was found subsequently that the survey number in the document was wrong.
The concerned VAO and the surveyor confirmed the error. The seller agreed to rectify the documents but more than 12 years have passed and nothing has been done. We then asked the seller to return the money which the party instantly agreed to do. Is it advisable for us to return the original documents to the party after getting the agreed money? How do we go about terminating the deal to ensure we don’t face any problems in the future?
MR Babu
Chennai
A deed of reconveyance can be executed and registered by both of you under which you can reconvey the property to your original seller. The same will be treated as a sale deed for stamp duty and registration purposes and this cost has to be borne by your seller. On receipt of the agreed consideration, you can return the original sale deed to the seller, at the time of registration of the deed of reconveyance.


Login |
Signup
WELCOME TO THE ONLINE JUDGE
Enter Your Credentials
Username/Email
Password
Login
Forgot your password?
Don't have an account?
Signup
.


I'm a rising fourth-year student pursuing majors in Physics and Mathematics at Georgia Tech. I use they/them and he/him pronouns, and am currently in the process of becoming comfortable with and discovering my gender and sexuality.
My hobbies include:
- Playing music (guitar and drums)
- Building socialism (as a member of DSA)
- Learning new things (currently web development and developmental psychology/emotional support, I guess)
- Leading the GT radio station, WREK Atlanta (I'm on the executive board and run a speciality show)
Curious about democratic socialism? So was I, so I read this to get introduced:
The Democratic Socialists of America (DSA) is the largest socialist organization in the United States. We believe that working people should run both the economy and society democratically to meet human needs, not to make profits for a few... We are a political and activist organization... [whose] members use a variety of tactics, from legislative to direction action, to fight for reforms that empower working people.


{% extends "base.html" %} {% block content %}
We are accepting proposals for talks, workshops(tutorials), sprints, and demos.
PyConZim is wholly organized by volunteers. We therefore need sponsors to help us cover the costs of:
If you are interested and wish to get more information, then please contact us via<EMAIL_ADDRESS>PyCon Zimbabwe is organized by volunteers and python enthusiasts from the python programming community in Zimbabwe
The first PyconZim was held from 24-25 November 2016,at the Zesa National Traing Centre. It brought delegates and speakers from the USA, South Africa, Namibia and Zimbabwe.The second edition of PyConZim is also also expected to bring speakers from Africa and the rest of the world
The two day conference will bring together students, professionals, experts and enthusiasts who wish to share their knowledge and passion about Python and related technologies. Its purpose is to increase the visibility of developers, organizations, and companies within the community. The conference is suited for all skill levels, from early beginners to expert developers. There will also be a `Django Girls Harare Workshop


Thank you for submitting your loan application
Please note that it takes up to 24hours to approve your application. We will notify you with the official decision using the form of contact you provided.


phone
123 456 789
address
92 NEW ALLAY, KS
email
<EMAIL_ADDRESS>delivery time
~ 25 minutes
open
9AM - 9PM


Thank you
for your time that you spend to check & test
that mini-creation of
skino0
Dont forget to follow me on social media
by using icons in the right corner!
Wish you have a nice day😎


sm_regression.Rmd
The sm_regression()
function performs kernel weighted regression. After the the model is specified (data = cancertx, method = "coxph", formula = Surv(time) ~ age
), an ancillary variable is specified (weighting_var = "marker"
) and the model is estimated weighted on this variable.
The following examples focus on time-to-event endpoints. The example data set is simulated from a Cox regression model.
\[ h(t) = h_0(t)e^{\textbf{X}\beta} \]
with \(h_0(t) = 1\) and \(\textbf{X}\beta = 0.02 * age - 0.2 * marker\). The independent variables age and marker are independent from one another. The example data set containts the following columns:
time Years from cancer treatment to death
age Age at treatment
marker Marker level at treatment
survt1 True 1 year survival probability
library(sjosmooth)
library(dplyr)
# loading data from sjosmooth github page
load(url("https://github.com/ddsjoberg/sjosmooth/blob/master/examples/cancertx.rda?raw=true"))
cancertx %>% select(time, age, marker, survt1) %>% head() %>% knitr::kable()
| time | age | marker | survt1 |
|---|---|---|---|
| 4.396865 | 12.79050 | 10.052925 | 0.8411829 |
| 1.761713 | 32.70496 | 8.164047 | 0.6867428 |
| 4.401422 | 23.16842 | 8.725925 | 0.7576508 |
| 1.027328 | 30.00945 | 12.923154 | 0.8715716 |
| 1.979813 | 31.51574 | 9.909102 | 0.7719386 |
| 2.009533 | 38.03416 | 7.372298 | 0.6127544 |
The simualted data contains 10,000 observations.
Kernel smoothing can be computationally intense on large data sets. The following code was run to get the example object sm_regression_ex1
and the results saved to GitHub.
library(survival)
library(sjosmooth)
sm_regression_ex1 =
sm_regression(
data = cancertx,
method = "coxph",
formula = Surv(time) ~ age,
weighting_var = "marker",
newdata = dplyr::data_frame(marker = seq(5, 15, 0.5))
)
The data in the cancertx
data frame was simulated from a Cox regression model with linear predictor.
\[ \textbf{X}\beta = 0.02 * age - 0.2 * marker \]
In the model age and marker level are independent, and therefore, the univariate model the slope coefficient for age remains \(\beta_{age} = 0.02\)
The beta coefficient is the same across all marker levels. In the figure below, the solid black line is the estimates beta coefficient (with 95% CI), and the dashed line is the true value.
library(ggplot2)
library(survival)
# loading example results from sjosmooth github page
load(url("https://github.com/ddsjoberg/sjosmooth/blob/master/examples/sm_regression_ex1.rda?raw=true"))
# plotting regression model coefficient by marker level
plot_data =
sm_regression_ex1 %>%
mutate(
age.coef = purrr::map_dbl(model_obj, ~coef(.x)),
age.ci = purrr::map(model_obj, ~confint(.x) %>% as_data_frame())
) %>%
select(newdata, age.coef, age.ci) %>%
tidyr::unnest(age.ci, newdata)
ggplot(plot_data, aes(x = marker, y = age.coef)) +
geom_line() +
geom_ribbon(aes(ymin = `2.5 %`, ymax = `97.5 %`), alpha = 0.3) +
geom_hline(aes(yintercept = 0.02), linetype = "dashed") +
scale_y_continuous(limits = c(0, 0.04)) +
labs(
y = "slope for age regressed on time to death"
)


HOW TO APPLY
Application can be made on-line by entering all the particulars including marks along with on-line payment through the Net banking/Credit card/Debit card.
Application can also be downloaded, duly filled and submitted along with demand draft in favor of "The Principal, PSG College of Technology" payable at Coimbatore. The duly filled in application along with demand draft (Cost is mentioned in the applications) can be submitted in person or shall be sent through post to “The Principal, PSG College of Technology, Post Box No. 1611, Peelamedu, Coimbatore - 641 004, Tamil Nadu, INDIA" and should reach on or before the last dates.
Based on merit the students will be intimated & called for Counselling / Online Test /Interview cum Admission.
Click on the download button to download the application.
Click on "Apply Online" for online submission.
-
-
B.Sc. Computer Systems and Design
-
M.Sc. Applied Mathematics
-
M.Sc. Software Systems
M.Sc. Theoretical Computer Science
M.Sc. Data Science
-
M.Sc. Fashion Design & Merchandising
Filled Application should reach on or before
the dates mentioned below.
-
Three Year UG Programmes B.Sc. (AS / CSD)
Five Year Integrated M.Sc FD&M
-
Five Year Integrated PG Programmes M.Sc. (SS / TCS / DS)
-
Two Year PG Programme M.Sc Applied Mathematics
-
B.Sc Applied Science
-
A pass in the Higher Secondary examination of the (10+2) curriculum prescribed by the appropriate authority of the Government of Tamil Nadu or any other exam recognised as equivalent with Mathematics, Physics and Chemistry as the subjects of study.
-
B.Sc Computer System and Design
-
A pass in the Higher Secondary examination of the (10+2) curriculum prescribed by the appropriate authority of the Government of Tamil Nadu or any other exam recognised as equivalent with Mathematics, Physics and Chemistry as the subjects of study. Candidates shortlisted through online test will be admitted by counselling.
-
M.Sc SS/TCS/DS
-
An excellent academic record in Higher Secondary examination of the (10+2) curriculum prescribed by the appropriate authority of the Government of Tamil Nadu or any other exam recognised as equivalent with Mathematics and Physics as two of the subjects of study. Shortlisted candidates will be called for an online test at PSG TECH Campus and those who clear the online test have to attend an interview. Candidates with SPARK/Research attitude are admitted to the programmes. A call for Test / Interview does not however confer any right of admission.
-
M.Sc Fashion Design & Merchandising
-
A pass in the Higher Secondary examination of the (10+2) curriculum (ANY GROUP) prescribed by the appropriate authority of the Government of Tamil Nadu or any other exam recognised as equivalent.
-
M.Sc Applied Mathematics
-
A pass in B.Sc (Mathematics / Mathematics with Computer Applications) and B.Sc(Applied Science) or an examination of any other University or authority recognized by Anna University equivalent thereto. Candidates, who have appeared for the final degree examination in April/May academic year 2017-18, are also eligible to apply (However, such candidates if selected for admission will have to produce the final examination mark sheet and the proof of having passed the degree at the time of admission) The shortlisted candidates have to attend an interview which will be held at PSG TECH Campus for admission.


{% include post_header.html param=page %}
{{ content }}
{% include ccc.html %}
{% include page_pagination.html%}
{% include comments.html %}