coscon.toast_extras module

class coscon.toast_extras.OpCrosstalk(crosstalk_names: np.ndarray[S], crosstalk_data: np.ndarray[np.float64], crosstalk_write_tod_input_path: Optional[Path] = None, crosstalk_write_tod_output_path: Optional[Path] = None, name: str = 'crosstalk')[source]

Bases: toast.op.Operator

Operator that apply crosstalk matrix to detector ToDs.

property crosstalk_names_str

names in list of str

crosstalk_write_tod_input_path = None
crosstalk_write_tod_output_path = None
exec(data: toast.dist.Data, signal_name: str, debug: bool = True)[source]

Perform operations on a Data object.

Parameters

data (toast.Data) – The distributed data.

Returns

None

exec_mpi(data: toast.dist.Data, signal_name: str, debug: bool = True)[source]
exec_serial(data: toast.dist.Data, signal_name: str, debug: bool = True)[source]
get_tod_mpi(tod: toast.tod.TOD, signal_name: str) → Optional[np.ndarray[np.float64]][source]

Obtain the TOD as a contiguous array.

This is very inefficient as it is for debug only!

get_tod_serial(tod: toast.tod.TOD, signal_name: str) → np.ndarray[np.float64][source]
property is_serial
name = 'crosstalk'
classmethod read(args: argparse.Namespace, name: str = 'crosstalk')coscon.toast_extras.OpCrosstalk[source]
static read_mpi(path: Path, comm: toast.mpi.Comm, procs: int, rank: int) → Tuple[np.ndarray[S], np.ndarray[np.float64]][source]
static read_serial(path: Path) → Tuple[np.ndarray[S], np.ndarray[np.float64]][source]
save_tod_mpi(path: Path, tod: toast.tod.TOD, signal_name: str, compress_level: int = 1)[source]
save_tod_serial(path: Path, tod: toast.tod.TOD, signal_name: str)[source]
coscon.toast_extras.add_crosstalk_args(parser: argparse.ArgumentParser)[source]
coscon.toast_extras.fma(out, ws, *arrays)[source]

Simple FMA, compiled to avoid Python memory implications.

Parameters

out – must be zero array in the same shape of each array in arrays

cache is False to avoid IO on HPC.

If not compiled, a lot of Python objects will be created, and as the Python garbage collector is inefficient, it would have larger memory footprints.