glenco / SLsimLib

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

problem with LensHaloParticles::makeSIE() #129

Closed rbmetcalf closed 5 years ago

rbmetcalf commented 7 years ago

from @gdespali

The routine to create the particle file from a SIE seems to work fine for the particle distribution. I just wanted to let you know that at the moment when I run Jen-Wei’s code with it inside the output particle files has just 3 columns with the coordinates and so since the mass column isn’t there then it can’t be red directly as a particle file because then the lens creation crashes. I added the mass value by hand as a fourth column and then everything is fine, I just wanted to let you know in case you didn’t notice!

rbmetcalf commented 7 years ago

There is a constructor flag for LensHaloParticles that solves this problem and allows for 3 column input files. It would be nice if the constructor would detect the mismatch between the flag and the format and give a proper error.

ntessore commented 7 years ago

If the routine can detect the format, the flag might be auto-detected as well.