Data Module
Data Loading and Management Module
This module provides data classes and functions to download and manage data files for the COBI package.
The module handles loading of: - Binary masks (SAT, LAT, CO, GAL, PS) - Bandpass profiles - CAMB initialization files - Pre-computed power spectra - Time-dependent isotropic spectra
All data files are automatically downloaded from the GitHub release repository if not present locally.
Classes
- Data
Main data class that handles file downloading, caching, and loading for various file formats (FITS, pickle, INI).
Data Objects
- SAT_MASKData
Binary mask for SAT observations
- LAT_MASKData
Binary mask for LAT observations
- CO_MASKData
Binary mask for CO emission regions
- GAL_MASKData
Binary mask for Galactic plane (parameterized by galcut)
- PS_MASKData
Binary mask for polarized point sources
- BP_PROFILEData
Bandpass profile data
- CAMB_INIData
CAMB initialization file for CMB spectrum calculation
- SPECTRAData
Pre-computed CMB power spectra
- ISO_TD_SPECTRAData
Time-dependent isotropic birefringence spectra
Example
from cobi.data import LAT_MASK
# Set directory where data will be cached LAT_MASK.directory = ‘/path/to/cache’
# Load the mask (downloads if not present) mask = LAT_MASK.data
- class Data(filename: str, _directory: str | None = None, _galcut: int | None = 0)[source]
Bases:
object
Data Class
Pre-defined Data Objects
- SAT_MASK
Optional[str] = None, _galcut: Optional[int] = 0)
- LAT_MASK
Optional[str] = None, _galcut: Optional[int] = 0)
- CO_MASK
Optional[str] = None, _galcut: Optional[int] = 0)
- GAL_MASK
Optional[str] = None, _galcut: Optional[int] = 0)
- PS_MASK
Optional[str] = None, _galcut: Optional[int] = 0)
- BP_PROFILE
Optional[str] = None, _galcut: Optional[int] = 0)
- CAMB_INI
Optional[str] = None, _galcut: Optional[int] = 0)
- SPECTRA
Optional[str] = None, _galcut: Optional[int] = 0)