glenco / SLsimLib

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

New way of filling light cone with halos #137

Closed rbmetcalf closed 7 years ago

rbmetcalf commented 7 years ago

It would be good if Lens could be filled with a realisation of halos without using a parameters file. A method would be added to Lens that does this after construction.

ntessore commented 7 years ago

I think a neat solution to this would be to change the code to not differentiate between "main" halo planes and "field" halo planes during construction. Populating with field halos after construction would then become the same as adding a bunch of halos normally.

rbmetcalf commented 7 years ago

Well the difference between "field" and "main" halos is that the field halos are put into a tree deflections folder on each plane. If you add them as if they are main halos they will not be in a tree. Maybe you could add a list of halos and they would be made into "field" halos, but then you would want separate functions to make these halos with the correct redshift, mass and concentration distributions.

I admit the "field" - "main" separation is a bit clunky, but it would be largely hidden from the user.

ntessore commented 7 years ago

If we could quickly insert/remove halos into/from the tree, would it still be necessary to make this distinction?

It would be sweet if the "field halo generator" becomes a function that simply fills up the lens with algorithmically generated halos, instead of a completely separate process done on construction.