Closed changgoo closed 1 year ago
I found that dist option in make_photons is stored in the parameter dict without unit specifier at
dist
make_photons
parameter
https://github.com/jzuhone/pyxsim/blob/f7324bede1ac7980464b79829f552780570278f6/pyxsim/photon_list.py#L358
Then, it is restored in _project_photon by assuming that it is in Mpc and multiplied by 1.e3
_project_photon
Mpc
1.e3
https://github.com/jzuhone/pyxsim/blob/f7324bede1ac7980464b79829f552780570278f6/pyxsim/photon_list.py#L574
This makes the behavior of the dist option incorrect.
@changgoo can you test this patch? https://github.com/jzuhone/pyxsim/commit/9854d3009ae141048b006319d191e7de2a68d5c5
Fixed in version 4.2.2.
I found that
dist
option inmake_photons
is stored in theparameter
dict without unit specifier athttps://github.com/jzuhone/pyxsim/blob/f7324bede1ac7980464b79829f552780570278f6/pyxsim/photon_list.py#L358
Then, it is restored in
_project_photon
by assuming that it is inMpc
and multiplied by1.e3
https://github.com/jzuhone/pyxsim/blob/f7324bede1ac7980464b79829f552780570278f6/pyxsim/photon_list.py#L574
This makes the behavior of the
dist
option incorrect.