litebird / litebird_sim

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

TOAST interface not working with components different from obs.tod #241

Closed marcobortolami closed 1 year ago

marcobortolami commented 1 year ago

It seems that the TOAST interface is not working if we use TOD components different from obs.tod, while it works using obs.tod. I mean that if we call the destriper like in the code below using the two problematic lines it fails, while removing the two problematic lines it works.

(obs_multitod,) = sim.create_observations(detectors=dets,
                                          n_blocks_det=1,
                                          n_blocks_time=size,
                                          split_list_over_processes=False)
### problem from here ###

obs_multitod.tod_cmb_fg = np.zeros_like(obs_multitod.tod)
obs_multitod.tod        = np.array([], dtype='float32') #not used, to save memory

### problem to here ###

[...]

params_madam = lbs.DestriperParameters(nside=nside,
                                       coordinate_system=lbs.coordinates.CoordinateSystem.Galactic,
                                       nnz=3,
                                       baseline_length_s=60,
                                       iter_max=100,
                                       return_hit_map=False,
                                       return_baselines_map=False,
                                       return_binned_map=True,
                                       return_destriped_map=True,
                                       return_npp=False,
                                       return_invnpp=False,
                                       return_rcond=False)

result = lbs.destripe(sim, params_madam)

This line is causing the problem.

ziotom78 commented 1 year ago

I just merged #242, guess this can be closed?

marcobortolami commented 1 year ago

Yes, thanks!