Documentation for /Users/drupke/Dropbox/git/ifsfit/

Generated by IDLdoc

common/

ifsf_fitspec.pro


top ifsf_fitspec

IFSFIT

result = ifsf_fitspec(lambda, flux, err, zstar, linelist, linelistz, ncomp, initdat [, maskwidths=hash(lines,maxncomp)] [, peakinit=hash(lines,maxncomp)] [, quiet=byte] [, siginit_gas=hash(lines,maxncomp)] [, tweakcntfit=dblarr(3,nregions)])

This function is the core routine to fit the continuum and emission lines of a spectrum.

The function requires an initialization structure with one required and a bunch of optional tags, specified in INITTAGS.txt.

Return value

A structure that contains the fit and much else ...

Parameters

lambda in required type=dblarr(npix)

Spectrum, observed-frame wavelengths.

flux in required type=dblarr(npix)

Spectrum, fluxes.

err in required type=dblarr(npix)

Spectrum, flux errors.

zstar in required type=structure

Initial guess for stellar redshift

linelist in required type=hash(lines)

Emission line rest frame wavelengths.

linelistz in required type=hash(lines,ncomp)

Emission line observed frame wavelengths.

ncomp in required type=hash(lines)

Number of components fit to each line.

initdat in required type=structure

Structure of initialization parameters, with tags specified in INITTAGS.txt.

Keywords

maskwidths in optional type=hash(lines,maxncomp)

Widths, in km/s, of regions to mask from continuum fit. If not set, routine defaults to +/- 500 km/s. Can also be set in INITDAT. Routine prioritizes the keyword definition.

peakinit in optional type=hash(lines,maxncomp)

Initial guesses for peak emission-line flux densities. If not set, routine guesses from spectrum. Can also be set in INITDAT. Routine prioritizes the keyword definition.

quiet in optional type=byte

Use to prevent detailed output to screen. Default is to print detailed output.

siginit_gas in optional type=hash(lines,maxncomp)

Initial guess for emission line widths for fitting.

tweakcntfit in optional type=dblarr(3,nregions)

Parameters for tweaking continuum fit with localized polynomials. For each of nregions regions, array contains lower limit, upper limit, and polynomial degree.

Author information

Author:

David S. N. Rupke:

Rhodes College Department of Physics 2000 N. Parkway Memphis, TN 38104 drupke@gmail.com

Copyright:

Copyright (C) 2013, 2014 David S. N. Rupke

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License or any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

History:

ChangeHistory:

2009, DSNR, copied base code from Harus Jabran Zahid 2009may, DSNR, tweaked for LRIS data 2009jun/jul, DSNR, rewritten 2010jan28, DSNR, fitting now done in observed frame, not rest frame 2010mar18, DSNR, added ct_coeff output to continuum fit 2013sep, DSNR, complete re-write 2013nov13, DSNR, renamed, added license and copyright 2013nov25, DSNR, changed structure tags of output spectra for clarity 2013dec09, DSNR, removed stellar z and sig optimization; added PPXF option 2013dec10, DSNR, removed docs of initdat tags, since it's repeated in INITTAGS.txt; removed linelabel parameter, since it's in initdat; changed 'initstr' parameter to 'initdat', for consistency with IFSF; testing and bug fixes 2013dec11, DSNR, added MASK_HALFWIDTH variable; changed value from 500 to 1000 km/s 2013dec12, DSNR, added SIGINIT_GAS_DEFAULT variable 2013dec17, DSNR, started propagation of hashes through code and implementation of new calling sequence rubric 2014jan13, DSNR, propagated use of hashes 2014jan16, DSNR, updated treatment of redshifts; bugfixes 2014jan17, DSNR, bugfixes; implemented SIGINIT_GAS, TWEAKCNTFIT keywords 2014feb17, DSNR, removed code that added "treated" templates prior to running a generic continuum fitting routine (rebinning, adding polynomials, etc.); i.e., generic continuum fitting routine is now completely generic

File attributes

Modification date: Mon Feb 17 14:08:14 2014
Lines: 435
Docformat: rst rst