[AstroPy] Fitting model with arbitrary number of parameters

Graham Kanarek gray at astro.columbia.edu
Fri May 30 10:17:14 EDT 2014


Hi all,

I'm hoping I can find some help here. For my program, I need to fit a composite model made up of the sum of an arbitrary number of 1D Gaussians. Since fitting CompositeModels isn't yet implemented, I'd hoped to use a custom_model_1d as a workaround. However, I'm having a lot of trouble declaring the custom model with an arbitrary number of parameters; I tried using a list for each Gaussian1D parameter, but changing the length of the lists caused an error as well. So, I'm wondering if anyone has had success fitting a model with an arbitrary number of parameters...

Thanks in advance!
--Gray Kanarek


More information about the AstroPy mailing list