lib.survey_selection.base.ProjectionConversion¶
- class lib.survey_selection.base.ProjectionConversion(x, projsin, projsout=None)¶
Bases:
lib.survey_selection.base.BaseRegularMatrixClass that handles conversion between different projection bases.
- projmatrix¶
Array of shape
(len(self.projsout),len(self.projsin))to convert input array from one basis to another (e.g. multipoles to wedges).- Type
array
Initialize
ProjectionConversion.- Parameters
x (array) – x-coordinates, same for each input and output projections.
projsin (list, ProjectionNameCollection) – Input projections.
projsout (list, ProjectionNameCollection, default=None) – Output projections. Defaults to
projsin.
Methods
Apply transform to input array.
Return shallow copy of
self.deepcopyInstantiate and initalize class with state dictionary.
is_mpi_broadcastis_mpi_gatheredis_mpi_rootis_mpi_scatteredLoad class in numpy binary format from disk.
If different formats are possible, this method should between them based on file name extension.
log_criticallog_debuglog_errorlog_infolog_warningPropose output projection names given proposed input projection names
projsin.Save class to disk.
If different formats are possible, this method should between them based on file name extension.
Attributes
basisloggerReturn 2D array of shape
(len(self.projsout)*len(self.x),len(self.projsin)*len(self.x))corresponding toprojmatrix.MPI attributes
mpicommmpirootmpistateregularinregularoutInput x-coordinates.
Output x-coordinates.
- compute(array)¶
Apply transform to input array.
- copy()¶
Return shallow copy of
self.
- classmethod from_state(state, mpiroot=0, mpicomm=None)¶
Instantiate and initalize class with state dictionary.
- classmethod load(filename, mpiroot=0, mpicomm=None)¶
Load class in numpy binary format from disk. If the loaded state contains
__class__and that exists incls._registry, return instance ofcls._registry[__class__](instead ofcls).
- load_auto(*args, **kwargs)¶
If different formats are possible, this method should between them based on file name extension.
- property matrix¶
Return 2D array of shape
(len(self.projsout)*len(self.x),len(self.projsin)*len(self.x))corresponding toprojmatrix.
- property mpiattrs¶
MPI attributes
- classmethod propose_out(projsin, baseout)¶
Propose output projection names given proposed input projection names
projsin.- Parameters
projsin (list, ProjectionNameCollection) – Input projections.
baseout (ProjectionBasis) – Projection basis for output.
- Returns
toret – Proposed projection names.
- Return type
- save(filename)¶
Save class to disk.
- save_auto(*args, **kwargs)¶
If different formats are possible, this method should between them based on file name extension.
- property xin¶
Input x-coordinates.
- property xout¶
Output x-coordinates.