litebird / litebird_sim

Simulation tools for LiteBIRD
GNU General Public License v3.0
18 stars 13 forks source link

Solve typing error in destriper #272

Closed nraffuzz closed 10 months ago

nraffuzz commented 10 months ago

This PR solves the issue #270.

nraffuzz commented 10 months ago

Since weights should be an array (field initialized by get_map_making_weights), also obs.net_ukrts should be an array. In order to handle this I added:

if isinstance(obs.net_ukrts, (float, int)):
    obs.net_ukrts = obs.net_ukrts * np.ones(obs.n_detectors)

inside get_map_making_weights.

I think this PR could be closed.

ziotom78 commented 10 months ago

Looks ok to me. Feel free to update the CHANGELOG and merge this PR!