[AstroPy] Astropy model fitting

banyal banyal at iiap.res.in
Sun Apr 2 02:53:13 EDT 2017



-------- Original Message --------
Subject: Astropy model fitting
Date: 2017-04-02 12:19
 From: banyal <banyal at iiap.res.in>
To: Astronomical Python mailing list <astropy at scipy.org>

Hi,
I have a very general question related to model fitting in Astropy.  I 
want to use astropy.modeling to fit observational data to a compound 
model of type f*g, where * is a convolution operator,  f is high 
resolution stellar spectra (template) and g is instrument response (a 
gaussian form, with amplitude, mean and stddev as fitting parameters). 
The  objective is to use nonlinear LSF to extract the fitting​ 
parameters of a gaussian function which best describe the instrument 
response. Essentially, the model has an integral form (f*g) that must 
fit the data in least square sense. After going through the 
astropy.modeling documentation, it seems the construction of a compound 
model in astropy is so far limited to combining  individual models with 
elementary arithmetic operations (convolution not included). Is there a 
way around this?? Or to put it another way, can I define a custom 
function of (f*g) and still use Astropy.modeling to do the least square 
fitting?? Many thanks will appreciate any thought on this.

With best wishes
Ravi




More information about the AstroPy mailing list