How cmbscipol/megatop works
Megatop is a configurable, map-based CMB polarization analysis pipeline. Users run distinct command-line stages: prepare masks and simulated or observed maps, preprocess maps and estimate noise, separate astrophysical components, compute angular power spectra, then infer cosmological parameters such as the tensor-to-scalar ratio. Separate plotting commands inspect stage outputs. The graph preserves these documented capabilities, but source excerpts are partial, so links between most stages are not asserted as direct calls; each stage is independently exposed as a command.
Main entry points: mocker.py Map simulations · preprocesser.py Map preprocessing · config.py Configuration · data_manager.py Data manager
Components 24
Inputs and masks
- Configuration
src/megatop/config.py - Data manager
src/megatop/data_manager.py - Mask handling
src/megatop/pipeline/mask_handler.py
Map products
- Map simulations
src/megatop/pipeline/mocker.py - Map geometry
src/megatop/landscapes.py - Map preprocessing
src/megatop/pipeline/preprocesser.py - Noise preprocessing
src/megatop/pipeline/noise_preprocesser.py - Pixel noise covariance
src/megatop/pipeline/pixel_noisecov_estimater.py
Spectra and inference
- Noise spectra
src/megatop/pipeline/noise_spectra_estimater.py - Spectral binning
src/megatop/pipeline/binner_maker.py - Component separation
src/megatop/pipeline/parametric_separater.py - Map to spectra
src/megatop/pipeline/map_to_cler.py - Transfer functions
src/megatop/pipeline/TF_computation_interface.py - Tensor ratio inference
src/megatop/pipeline/cl2r_estimater.py
Plots and reports
- Simulation plots
src/megatop/plot/mock_plotter.py - Preprocessing plots
src/megatop/plot/preproc_plotter.py - Noise spectra plots
src/megatop/plot/noise_spectra_plotter.py - Separation plots
src/megatop/plot/comp_sep_plotter.py - Map spectra plots
src/megatop/plot/map2cl_plotter.py - Inference plots
src/megatop/plot/r_stats_plotter.py - MCMC plots
src/megatop/plot/mcmc_plotter.py
Other components
- Pipeline user
- Frequency maps
- Pipeline data products
Connections 34
- Pipeline user → Configuration: provides settings
- Pipeline user → Mask handling: runs stage
- Pipeline user → Map simulations: runs stage
- Pipeline user → Map preprocessing: runs stage
- Pipeline user → Noise preprocessing: runs stage
- Pipeline user → Pixel noise covariance: runs stage
- Pipeline user → Noise spectra: runs stage
- Pipeline user → Spectral binning: runs stage
- Pipeline user → Component separation: runs stage
- Pipeline user → Map to spectra: runs stage
- Pipeline user → Transfer functions: runs stage
- Pipeline user → Tensor ratio inference: runs stage
- Configuration → Data manager: configures paths
- Data manager → Pipeline data products: creates directories
- Frequency maps → Map preprocessing: map input
- Mask handling → Pipeline data products: writes products
- Map simulations → Map geometry: uses geometry
- Map simulations → Pipeline data products: writes maps
- Map preprocessing → Pipeline data products: writes maps
- Noise preprocessing → Pipeline data products: writes products
- Pixel noise covariance → Pipeline data products: writes covariance
- Noise spectra → Pipeline data products: writes spectra
- Spectral binning → Pipeline data products: writes bins
- Component separation → Pipeline data products: writes results
- Map to spectra → Pipeline data products: writes spectra
- Transfer functions → Pipeline data products: writes functions
- Tensor ratio inference → Pipeline data products: writes chains
- Simulation plots → Pipeline data products: reads products
- Preprocessing plots → Pipeline data products: reads products
- Noise spectra plots → Pipeline data products: reads spectra
- Separation plots → Pipeline data products: reads results
- Map spectra plots → Pipeline data products: reads spectra
- Inference plots → Pipeline data products: reads statistics
- MCMC plots → Pipeline data products: reads chains