glenco / SLsimLib

Library for Gravitational Lensing Simulations
MIT License
2 stars 1 forks source link

Magnifications having all the same sign #114

Closed FabienNugier closed 3 years ago

FabienNugier commented 7 years ago

It seems that between commit dee2f3a and c3b3639 of my branch fn/EventualFixingLoSandSub there is an error that entered into SLsimLib and makes the magnifications of my 4 images having the same sign and non realistic values. I don't know where it comes from. We got a problem like that a long time ago that I had fixed (I forgot how), but going threw the commits I don't really see something that would ring a bell. I am using the lens from the parameter file in order to work in the same conditions as before and the problem is still there.

rbmetcalf commented 7 years ago

Maybe this is related to the setting of Dist as in #112 ?

FabienNugier commented 7 years ago

Indeed ! Thank you Ben !

I don't know why but it seems that using replaceMainHalos instead of insertMainHalos into the routine that I use to compute the different images magnifications solves the problem ! Maybe the presence of this extra parameter-file halo with no Dist settled perturbs the calculation. It is strange that there was no alert from Dist == -1 in that case. Probably imposing Dist to be settled when we define a main halo in the parameter file would be a good security against that.