FMM.pipeline module
- class FMM.pipeline.PipelineEnd2End(comm)[source]
Bases:
object
FMM Pipeline.
Wrapper for End-2-End pipeline. It added class one after the others by running method.run().
Methods
main
- class FMM.pipeline.PipelineFrequencyMapMaking(comm, file, params)[source]
Bases:
object
Instance to reconstruct frequency maps using QUBIC abilities.
- Parameters:
- comm
MPI communicator
- filestr
used to create the forlder for data saving
- paramsdict
dictionary containing all the simulation parameters
Methods
get_H
()Acquisition operator
Average frequency
Components FGbuster
QUBIC resolutions.
get_dict
([key])QUBIC dictionary.
Input maps.
PCG Preconditioner.
Random value
Sky configuration.
get_tod
([noise])Simulated TOD.
pcg
(d, x0, seenpix)Preconditioned Conjugate Gradiant algorithm.
run
()Run the FMM Pipeline.
- get_averaged_nus()[source]
Average frequency
Method to average QUBIC frequencies according to the number of reconstructed frequency maps.
- Returns:
nus_ave – array containing the averaged QUBIC frequencies.
- Return type:
array_like
- get_components_fgb()[source]
Components FGbuster
Method to build a dictionary containing all the wanted components to generate sky maps. Based on FGBuster.
- Returns:
dict_comps – Dictionary containing the component instances.
- Return type:
dict
- get_convolution()[source]
QUBIC resolutions.
Method to define expected QUBIC angular resolutions (radians) as function of frequencies.
- Returns:
fwhm_in (array_like) – Intrinsic resolutions, used to build the simulated TOD.
fwhm_out (array_like) – Output resolutions. If we don’t apply convolutions during reconstruction, array of zeros.
fwhm_rec (array_like) – Reconstructed resolutions. Egal the output resolutions if we apply convolutions during reconstructions, evaluate through analytic formula otherwise.
- get_dict(key='in')[source]
QUBIC dictionary.
Method to modify the qubic dictionary.
- Parameters:
key (str, optional) – Can be “in” or “out”. It is used to build respectively the instances to generate the TODs or to reconstruct the sky maps, by default “in”.
- Returns:
dict_qubic – Modified QUBIC dictionary.
- Return type:
dict
- get_input_map()[source]
Input maps.
Function to get the input maps from PySM3.
- Returns:
maps_in – Input maps \((N_{rec}, 12 \times N^{2}_{side}, N_{stk})\).
- Return type:
array_like
- get_preconditioner()[source]
PCG Preconditioner.
Computed using the formula: To be added.
- Returns:
M – Preconditioner for PCG algorithm.
- Return type:
DiagonalOperator
- get_random_value()[source]
Random value
Method to build a random seed.
- Returns:
seed – Random seed.
- Return type:
int
- get_sky_config()[source]
Sky configuration.
Method that read ‘params.yml’ file and create dictionary containing sky emission model.
- Returns:
dict_sky – Sky config dictionary.
- Return type:
dict
Notes
Note that the key denote the emission and the value denote the sky model using PySM convention. For CMB, seed denote the realization.
Example
d = {‘cmb’:seed, ‘dust’:’d0’, ‘synchrotron’:’s0’}
- get_tod(noise=False)[source]
Simulated TOD.
Method that compute observed TODs with \(\vec{TOD} = H \cdot \vec{s} + \vec{n}\), with H the QUBIC operator, \(\vec{s}\) the sky signal and \(\vec{n}\) the instrumental noise`.
- Parameters:
noise (bool, optional) – True if you want to simulate noise in your data, False otherwise, by default False.
- Returns:
TOD – Simulated TOD \((N_{rec}, 12 \times N^{2}_{side}, N_{stk})\).
- Return type:
array_like
- pcg(d, x0, seenpix)[source]
Preconditioned Conjugate Gradiant algorithm.
Solve the map-making equation iteratively : \((H^T . N^{-1} . H) . x = H^T . N^{-1} . d\).
The PCG used for the minimization is intrinsequely parallelized (e.g see PyOperators).
- Parameters:
d (array_like) – Array containing the TODs generated previously \((N_{rec}, 12 \times N^{2}_{side}, N_{stk})\).
x0 (array_like) – Starting point of the PCG algorithm \((N_{rec}, 12 \times N^{2}_{side}, N_{stk})\).
seenpix (array_like) – Boolean array to define the pixels seen by QUBIC \((N_{rec}, 12 \times N^{2}_{side}, N_{stk})\).
- Returns:
solution – Reconstructed maps \((N_{rec}, 12 \times N^{2}_{side}, N_{stk})\).
- Return type:
array_like