Frequency spectrum¶
- cosmoglobe.plot.spectrum.get_foregrounds(pol, extend)[source]¶
This function grabs a dictionary of the default component values used for the spectrum plotting style. Override this by passing the component_option dictionary to spec
- cosmoglobe.plot.spectrum.rotate_label(x, y, pos, xrange, yrange, aspect_ratio)[source]¶
This function takes a line and calculates position and rotation for a label on top of it. Takes into account logspace etc.
- cosmoglobe.plot.spectrum.spec(model, pol=False, sky_fractions=(25, 85), xlim=(0.25, 4000), figsize=None, fraction=1, labelsize=11, comp_labelsize=9, band_labelsize=8, extend=True, darkmode=False, ame_polfrac=0.006, haslam=True, chipass=True, spass=True, cbass=True, quijote=False, wmap=True, planck=True, dirbe=True, litebird=False, custom_bands=None, include_co=True, add_error=True, fsky_pos=500, component_options=None, text_offset=2)[source]¶
- Generates RMS intensity plot for components in model.
model = cosmoglobe.model_from_chain(chain, nside=64, components=[“synch”, “ff”, “ame”, “dust”, “radio”]) spec(model)
- Parameters
model (cosmoglobe Model object) – Object containing all sky components to be visualized
pol (bool, optional) – Plot polarization instead of intensity default = None (temperature)
sky_fractions (touple, optional) – Min and max sky fractions for thickness of lines default: (25,85)
xlim (touple, optional) – The limits of the x axis default: (0.25, 4000)
figsize (touple, optional) – size of figure. This is automatically set by extend. default : None
fraction (float, optional) – Sets the figsize to be a fraction of a latex document default : None
labelsize (float,) – Fontsize of ticklabels and axislabels default : 11
comp_labelsize (float,) – Fontsize of component labels default : 9
band_labelsize (float,) – Fontsize of frequency band labels default : 8
extend (bool, optional) – Increases the xlimit and includes an additional subplot on top default: True
darkmode (bool, optional) – Set True to turn all frame elements white for black background viewing. default: False
ame_polfrac (float, optional) – Set the polarization fraction of AME with a scale factor. default: 0.006
haslam (bool, optional) – Toggle this observation column default: True
chipass (bool, optional) – Toggle this observation column default: True
spass (bool, optional) – Toggle this observation column default: True
cbass (bool, optional) – Toggle this observation column default: True
quijote (bool, optional) – Toggle this observation column default: False
wmap (bool, optional) – Toggle this observation column default: True
planck (bool, optional) – Toggle this observation column default: True
dirbe (bool, optional) – Toggle this observation column default: True
litebird (bool, optional) – Toggle this observation column default: False
custom_bands (bool, optional) – TODO: NOT IMPLEMENTED, toggle specific bands default: None
include_co (bool, optional) – Turn off CO lines default: True
add_error (bool, optional) – Toggle added uncertainty to low S/N part of spectrum. default: True
fsky_pos (float, optional) – Frequency position of f_sky labels default : 900
component_options (dict, optional) – Allows for overriding dictionary that sets all the properties of components. Such as {“dust”:{“position”:30, “label”: “Thing”, “linestyle”: “:”}} default : None
text_offset (float, optional) – Text offset from lines default : 5