on the chi2 values shown in the optimization phase

44 views
Skip to first unread message

Xin Wang (Albert)

unread,
Sep 14, 2016, 10:51:38 PM9/14/16
to lenstool
Dear all,

I'm a novice of using Lenstool, so please forgive me if I ask silly questions.

When I run optimization with Lenstool, it says the following:

OPTIMISATION:
Bayesys Rate : 0.050000
Number of contraints : 40
Number of free parameters : 25
Sampling :   1.000000     592/1001        39.2901      -176.6928[CTRL-C to interrupt]

log(Evidence)          = -176.692651
Information = -Entropy = 144.521554
Calls to chi2() function = 12979908

*********************************************************
Chi2:24.792 p:24.792 s:0.000 l:0.000

I'm wondering if the chi2 values (marked by boldface) are the total chi2 or the reduced chi2? Do the parameters written in "best.par" correspond to this minimum value of "24.792"? 

Thanks!
Xin

Johan Richard

unread,
Sep 15, 2016, 12:03:37 AM9/15/16
to lens...@googlegroups.com
Dear Xin,


> On 15 Sep 2016, at 04:51, Xin Wang (Albert) <albert...@gmail.com> wrote:

> I'm wondering if the chi2 values (marked by boldface) are the total chi2 or the reduced chi2? Do the parameters written in "best.par"
> correspond to this minimum value of "24.792"?


The chi2 values marked is always the total chi2. The parameters in the best.par correspond to this minimum value
24.792. You can see a decomposition of the chi2 for all systems in the output file chires.dat which is important to
understand where comes this value.

Best,

Johan

--
--
_____________________________________________________________________
LENSTOOL: http://projets.lam.fr/projects/lenstool/wiki
To post to this group, send email to lens...@googlegroups.com
To unsubscribe from this group, send email to lenstool-u...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/lenstool?
---
You received this message because you are subscribed to the Google Groups "lenstool" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lenstool+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
--
_____________________________________________________________________
LENSTOOL: http://projets.lam.fr/projects/lenstool/wiki
To post to this group, send email to lens...@googlegroups.com
To unsubscribe from this group, send email to lenstool-unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/lenstool?
---
You received this message because you are subscribed to the Google Groups "lenstool" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lenstool+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Xin Wang

unread,
Sep 15, 2016, 12:31:58 AM9/15/16
to lens...@googlegroups.com
Dear Johan,

Thank you so much for your quick reply! Looking at the chires.dat file, I think the values under columns named “rmss/i” stand for rms in source/image plane. Could you please let me know what the column “nwarn” represents? Is it some sort of warning that should make me alerted, or I can just simply ignore it?

Thank you very much again!

Best regards,
Xin Wang
--------------------------------------
Department of Physics and Astronomy
University of California, Los Angeles
CA 90095-1547, USA

Johan Richard

unread,
Sep 15, 2016, 12:44:19 AM9/15/16
to lenstool


On Thursday, September 15, 2016 at 6:31:58 AM UTC+2, Xin Wang (Albert) wrote:
Dear Johan,

Thank you so much for your quick reply! Looking at the chires.dat file, I think the values under columns named “rmss/i” stand for rms in source/image plane. Could you please let me know what the column “nwarn” represents? Is it some sort of warning that should make me alerted, or I can just simply ignore it?


Lenstool computes a barycenter in the source plane then back in the image plane, but for certain lensing configurations it happens that the barycenter is not found at
the precision requested, which results in a warning. Most of the time it will not happen and nwarn=0, when it is not zero it just means the actual rms could be a bit different
for that image, but in some rare cases it could lead to a bigger problem: in general it is linked with a very large rms for that system is that the case for you ?

Johan

Xin Wang

unread,
Sep 15, 2016, 12:49:16 AM9/15/16
to lens...@googlegroups.com
Indeed, only 1 system has nwarn=1 (others 0) and also large chi2. (However the rmss/i associated with that system are not large at all.) So I guess a first criterion for good models is that all numbers in “nwarn” column are 0 as well as reduced chi2 close to 1. Is that correct?


Best regards,
Xin Wang
--------------------------------------
Department of Physics and Astronomy
University of California, Los Angeles
CA 90095-1547, USA

Johan Richard

unread,
Sep 15, 2016, 1:45:33 AM9/15/16
to lens...@googlegroups.com
You can safely use the chi2 as a good criterion, and look at the warnings mostly in cases where you have large chi2 as something bad may have happened and the warnings can give you a hint.

To unsubscribe from this group, send email to lenstool-unsubscribe@googlegroups.com

For more options, visit this group at http://groups.google.com/group/lenstool?
---
You received this message because you are subscribed to the Google Groups "lenstool" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lenstool+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
--
_____________________________________________________________________
LENSTOOL: http://projets.lam.fr/projects/lenstool/wiki
To post to this group, send email to lens...@googlegroups.com
To unsubscribe from this group, send email to lenstool-unsubscribe@googlegroups.com

For more options, visit this group at http://groups.google.com/group/lenstool?
---
You received this message because you are subscribed to the Google Groups "lenstool" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lenstool+unsubscribe@googlegroups.com.

Xin Wang

unread,
Sep 15, 2016, 10:10:53 AM9/15/16
to lens...@googlegroups.com
Got it! Thank you so much Johan!

Best regards,
Xin Wang
--------------------------------------
Department of Physics and Astronomy
University of California, Los Angeles
CA 90095-1547, USA

Reply all
Reply to author
Forward
0 new messages