Closed ziotom78 closed 1 year ago
This PR should be complete. The new API lets the user to allocate several TODs at once:
sim.create_observations(
detectors=[det1, det2, det3],
tods=[
lbs.TodDescription(
name="tod", description="TOD", dtype=np.float64,
),
lbs.TodDescription(
name="noise", description="1/f+white noise", dtype=np.float32
),
],
)
for cur_obs in sim.observations:
print("Shape of 'tod': ", cur_obs.tod.shape)
print("Shape of 'noise': ", cur_obs.noise.shape)
These TODs are reported by Simulation.describe_mpi_distribution
and can be referred to when saving/loading HDF5 files.
This PR implements a high-level API to allocate multiple TODs during a call to
Simulation.create_observations
: the new parametertods
lets the caller to specify how many TOD matrices must be allocated, theirdtype
, and a short description. This information is used when TODs are saved to HDF5 files and is restored properly when those files are read.Simulation
objects