The kmo_fit_profile recipe¶
-
kmo_fit_profile
¶
Synopsis¶
Fit spectral line profiles as well as spatial profiles with a simple function - for example to measure resolution or find the centre of a source
Description¶
This recipe creates either spectral or spatial profiles of sources using dif- ferent functions to fit. Spectral profiles can be created for F1I frames (if WCS is defined in the input frame, the output parameters are in respect to the defined WCS).
Spatial profiles can be created for F2I frames (any WCS information is ignored here).
If the frames contain no noise information, constant noise is assumed for the fitting procedure.
Input files¶
DO KMOS
category Type Explanation Required #Frames
-------- ----- ----------- -------- -------
<none or any> F1I or Frame with or Y 1
F2I without noise
Output files¶
DO KMOS
category Type Explanation
-------- ----- -----------
FIT_PROFILE F1I Fitted profile (without noise frame)
or (3 Extensions)
F2I
Constructor¶
-
cpl.
Recipe
("kmo_fit_profile") Create an object for the recipe kmo_fit_profile.
import cpl
kmo_fit_profile = cpl.Recipe("kmo_fit_profile")
Parameters¶
-
kmo_fit_profile.param.
method
¶ Either fit “gauss”, “moffat” or “lorentz” for 1D data.Either fit “gauss” or “moffat” for 2D data. (str; default: ‘gauss’) [default=”gauss”].
-
kmo_fit_profile.param.
range
¶ The spectral or spatial range to combine. Default is the whole range. e.g. F1I: “0.5,2.1” (microns), e.g. F2I: “1,7;3,10” (pixels: x1,x2;y1,y2), pixels are counted from 1. (str; default: ‘’) [default=”“].
The following code snippet shows the default settings for the available parameters.
import cpl
kmo_fit_profile = cpl.Recipe("kmo_fit_profile")
kmo_fit_profile.param.method = "gauss"
kmo_fit_profile.param.range = ""
You may also set or overwrite some or all parameters by the recipe parameter param, as shown in the following example:
import cpl
kmo_fit_profile = cpl.Recipe("kmo_fit_profile")
[...]
res = kmo_fit_profile( ..., param = {"method":"gauss", "range":""})
See also
cpl.Recipe for more information about the recipe object.
Bug reports¶
Please report any problems to Alex Agudo Berbel. Alternatively, you may send a report to the ESO User Support Department.
Copyright¶
This file is part of the CRIRES Instrument Pipeline Copyright (C) 2002,2003 European Southern Observatory
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 2 of the License, or (at your option) 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, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Code author: Alex Agudo Berbel <usd-help@eso.org>