[AstroPy] Modelling with weights

Zé Vinícius jvmirca at gmail.com
Fri Sep 8 11:57:27 EDT 2017


Hi Tom,

Yes, you are right, the "standard" chi ** 2 minimization is obtained by
setting weights = 1 / std.

However, note that if weights is uniformly constant, i.e., weights[i] = c,
for all i, c different than 0,
then its value doesn't matter as far as optimization is concerned.

Best,
Zé

On Fri, Sep 8, 2017 at 2:54 AM, Thomas Marsh <t.r.marsh at warwick.ac.uk>
wrote:

> Hello,
>
>
> I am interested in using astropy.modeling. Am I right in thinking that in
> the case of least squares, the usual inverse variance weights for chi**2
> minimisation would be obtained by setting weights = 1/(standard deviation)
> rather than 1/(variance)? (I deduced this from the code for LevMarLSQFitter
> and my understanding of scipy.optimize.leastsq)
>
>
> Cheers,
>
>
> Tom
>
> _______________________________________________
> AstroPy mailing list
> AstroPy at python.org
> https://mail.python.org/mailman/listinfo/astropy
>
>


-- 
github: @mirca <http://www.github.com/mirca>
twitter: @mircaze <http://www.twitter.com/mircaze>
webpage: mirca.github.io
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/astropy/attachments/20170908/c4e1b668/attachment.html>


More information about the AstroPy mailing list