InterpolatingComponent¶
- class pysm3.InterpolatingComponent(path, input_units, nside, max_nside=None, interpolation_kind='linear', map_dist=None, freqs=None, available_nside=None, pre_applied_beam=None, pre_applied_beam_units=None, verbose=False)[source] [edit on github]¶
Bases:
ModelPySM component interpolating between precomputed maps
In order to save memory, maps are converted to float32, if this is not acceptable, please open an issue on the PySM repository. When you create the model, PySM checks the folder of the templates and stores a list of available frequencies. Once you call
get_emission, maps are read, ud_graded to the target nside and stored for future use. This is useful if you are running many channels with a similar bandpass. If not, you can callcached_maps.clear()to remove the cached maps.It always returns a IQU map to avoid broadcasting issues, even if the inputs are I only.
- Parameters:
- pathstr
Path should contain maps named as the frequency in GHz e.g. 20.fits or 20.5.fits or 00100.fits
- input_unitsstr
Any unit available in PySM3 e.g. “uK_RJ”, “uK_CMB”
- nsideint
HEALPix NSIDE of the output maps
- interpolation_kindstring
Currently only linear is implemented
- map_distpysm.MapDistribution
Required for partial sky or MPI, see the PySM docs
- verbosebool
Control amount of output
Attributes Summary
Methods Summary
get_emission(freqs[, weights, fwhm, ...])Return the emission at a frequency or integrated over a bandpass
get_filenames(path)read_map_by_frequency(freq)read_map_file(freq, filename)Attributes Documentation
- includes_smoothing¶
Methods Documentation
- get_emission(freqs: Annotated[Quantity, Unit('GHz')], weights=None, fwhm: Annotated[Quantity, Unit('arcmin')] | None = None, output_nside: int | None = None, output_car_resol=None, coord=None, lmax: int | None = None, return_healpix=True, return_car=False) Annotated[Quantity, Unit('uK_RJ')][source] [edit on github]¶
Return the emission at a frequency or integrated over a bandpass
- Parameters:
- freqsu.Quantity[u.GHz]
Frequency or frequencies at which to compute the emission
- weightsarray-like
Weights for the bandpass integration
- fwhmu.Quantity[u.arcmin]
Beam FWHM
- output_nsideint
NSIDE of the output map
- coord: tuple of str
coordinate rotation, it uses the healpy convention, “Q” for Equatorial, “G” for Galactic.
- output_car_resolastropy.Quantity
CAR output map resolution, generally in arcmin
- lmaxint
Maximum l of the alm transform
- return_healpixbool
If True, return the map in healpix format
- return_carbool
If True, return the map in CAR format
- Returns:
- mu.Quantity[u.uK_RJ]
Emission at the requested frequency or integrated over the bandpass
- get_filenames(path)[source] [edit on github]¶
- read_map_by_frequency(freq)[source] [edit on github]¶
- read_map_file(freq, filename)[source] [edit on github]¶