coscon.cmb module¶
-
class
coscon.cmb.Maps(names: Union[List[str], Tuple[str, …]], maps: np.ndarray, name: str = '')[source]¶ Bases:
objectA class for multiple healpix maps that wraps some healpy functions
In ring ordering, uK ($mathrm{mu K}$) unit.
-
property
f_sky¶
-
classmethod
from_fits(path: pathlib.Path, memmap: bool = True) → coscon.cmb.Maps[source]¶
-
classmethod
from_planck_2018(nside: int) → coscon.cmb.Maps[source]¶ Use the Planck 2018 best-fit ΛCDM model to simulate a map
Use official release if nside is small enough.
-
classmethod
from_pysm(freq: float, nside: int, preset_strings: List[str] = ['c1']) → coscon.cmb.Maps[source]¶
-
maps: np.ndarray¶
-
property
maps_dict¶
-
property
maps_dict_fullname¶
-
mollview(n_std: Optional[int] = None, fwhm: Optional[float] = None, graticule: bool = True, **kwargs)[source]¶ object wrap of healpy.mollview
- Parameters
n_std – if specified, set the range to be mean ± n_std * std
fwhm – if specified, smooth map to this number of arcmin
-
property
n_maps¶
-
name: str = ''¶
-
names: Union[List[str], Tuple[str, …]]¶
-
property
spectra¶ Use anafast to calculate the spectra results are always 2D-array
-
property
to_spectra¶
-
write(path: pathlib.Path, nest: bool = True, dtype: Optional[Union[numpy.dtype, List[numpy.dtype]]] = None, fits_IDL: bool = True, coord: str = 'G', partial: bool = False, column_names: Optional[Union[str, List[str]]] = None, column_units: Union[str, List[str]] = 'uK', extra_header: list = [], overwrite: bool = False)[source]¶
-
property
-
class
coscon.cmb.PowerSpectra(names: List[str], spectra: numpy.ndarray, l_min: int = 0, l: Optional[numpy.ndarray] = None, scale: str = 'Dl', name: str = '')[source]¶ Bases:
objectA class for power-spectra.
In [microK]^2 unit.
-
compare(*others: coscon.cmb.PowerSpectra, relative: bool = False) → pandas.core.frame.DataFrame[source]¶ Return a tidy DataFrame comparing self and others.
-
compare_plot(*others: PowerSpectra, show: bool = True, relative: bool = False) → List[plotly.graph_objs._figure.Figure][source]¶
-
property
dataframe¶
-
classmethod
from_class(path: Optional[pathlib.Path] = None, url: Optional[str] = None, camb: bool = True, name: str = '') → coscon.cmb.PowerSpectra[source]¶ read from CLASS’ .dat output
- Parameters
camb (bool) – if True, assumed
format = cambis used when
generating the .dat from CLASS
To self: migrated from abx’s convert_theory.py
-
classmethod
from_dataframe(df: pandas.core.frame.DataFrame, scale: str = 'Dl') → coscon.cmb.PowerSpectra[source]¶
-
classmethod
from_planck_2018() → coscon.cmb.PowerSpectra[source]¶ Use the Planck 2018 best-fit ΛCDM model
Officially released by Planck up to l equals 2508. see http://pla.esac.esa.int/pla/#cosmology and its description
-
classmethod
from_planck_2018_extended() → coscon.cmb.PowerSpectra[source]¶ Use the Planck 2018 best fit ΛCDM model with extended l-range up to 4902
This is reproduced using CLASS but with an extended l-range
-
intersect(*others: coscon.cmb.PowerSpectra) → List[pandas.core.frame.DataFrame][source]¶
-
l: Optional[numpy.ndarray] = None¶
-
property
l_array¶
-
property
l_max¶ exclusive l_max
-
l_min: int = 0¶
-
property
n_spectra¶
-
name: str = ''¶
-
names: List[str]¶
-
scale: str = 'Dl'¶
-
spectra: numpy.ndarray¶
-
to_maps(nside: int, pixwin=False) → coscon.cmb.Maps[source]¶ Use synfast to generate random maps
-