From 83f673ceb5a85cae104388657bc2165def79837c Mon Sep 17 00:00:00 2001 From: sgiardie Date: Tue, 6 Jun 2023 10:47:46 +0100 Subject: [PATCH] addressing comments --- soliket/BandPass.yaml | 10 +++++++--- soliket/bandpass.py | 10 ++++------ soliket/foreground.py | 4 +++- soliket/mflike/TheoryForge_MFLike.yaml | 24 ++++++++++++------------ 4 files changed, 26 insertions(+), 22 deletions(-) diff --git a/soliket/BandPass.yaml b/soliket/BandPass.yaml index b139130a..541cd2bd 100644 --- a/soliket/BandPass.yaml +++ b/soliket/BandPass.yaml @@ -1,5 +1,9 @@ data_folder: MFLike/v0.8 +# Three options for passband construction (top_hat_band, external_bandpass, +# read_from_sacc). Fill the corresponding dictionary to select one of the +# options. The other dictionaries have to be left empty. Default is +# read_from_sacc. # Parameters to build a top-hat band: # - nsteps sets the number of frequencies used in the band integration @@ -38,10 +42,10 @@ read_from_sacc: True params: bandint_shift_LAT_93: value: 0 - latex: \Delta_{\rm band}^{93} + latex: \Delta_{\rm LAT}^{93} bandint_shift_LAT_145: value: 0 - latex: \Delta_{\rm band}^{145} + latex: \Delta_{\rm LAT}^{145} bandint_shift_LAT_225: value: 0 - latex: \Delta_{\rm band}^{225} + latex: \Delta_{\rm LAT}^{225} diff --git a/soliket/bandpass.py b/soliket/bandpass.py index 69861049..e3e6371b 100644 --- a/soliket/bandpass.py +++ b/soliket/bandpass.py @@ -112,7 +112,7 @@ def _cmb2bb(nu): :param nu: frequency array - :return: the array :math:`\frac{\partial B_{\nu}}{\partial T}` + :return: the array :math:`\frac{\partial B_{\nu}}{\partial T}`. See note above. """ # NB: numerical factors not included x = nu * h_Planck * 1e9 / k_Boltzmann / T_CMB @@ -159,9 +159,9 @@ def initialize(self): if (not self.read_from_sacc and not self.use_top_hat_band and not self.bandint_external_bandpass): raise LoggedError( - self.log, "fill the dictionaries for either reding" \ - "the passband from sacc file (mflike default) or an"\ - "external passband or building a top-hat one!" + self.log, "fill the dictionaries in the yaml file for" \ + "either reading the passband from sacc file (mflike default)" \ + "or an external passband or building a top-hat one!" ) @@ -183,8 +183,6 @@ def must_provide(self, **requirements): self.bands = requirements["bandint_freqs"]["bands"] self.exp_ch = [k.replace("_s0", "") for k in self.bands.keys() if "_s0" in k] - # self.eff_freqs = [np.array(self.bands[k]['nu']) - # for k in self.bands.keys()] def calculate(self, state, want_derived=False, **params_values_dict): r""" diff --git a/soliket/foreground.py b/soliket/foreground.py index d04f284b..8ac86796 100644 --- a/soliket/foreground.py +++ b/soliket/foreground.py @@ -190,7 +190,9 @@ def _get_foreground_model(self, if hasattr(eff_freqs, '__len__'): bandint_freqs = np.asarray(eff_freqs) else: - self.log.info("no frequency list provided to compute the passbands") + raise LoggedError( + self.log, "no frequency list provided to compute the passbands" + ) model = {} diff --git a/soliket/mflike/TheoryForge_MFLike.yaml b/soliket/mflike/TheoryForge_MFLike.yaml index 5736345b..94d87709 100644 --- a/soliket/mflike/TheoryForge_MFLike.yaml +++ b/soliket/mflike/TheoryForge_MFLike.yaml @@ -21,40 +21,40 @@ params: # Systematics cal_LAT_93: value: 1 - latex: \mathrm{Cal}^{93} + latex: \mathrm{Cal}_{\rm LAT}^{93} cal_LAT_145: value: 1 - latex: \mathrm{Cal}^{145} + latex: \mathrm{Cal}_{\rm LAT}^{145} cal_LAT_225: value: 1 - latex: \mathrm{Cal}^{225} + latex: \mathrm{Cal}_{\rm LAT}^{225} calT_LAT_93: value: 1 - latex: \mathrm{Cal}_{\rm T}^{93} + latex: \mathrm{Cal}_{\rm LAT, T}^{93} calE_LAT_93: value: 1 - latex: \mathrm{Cal}_{\rm E}^{93} + latex: \mathrm{Cal}_{\rm LAT, E}^{93} calT_LAT_145: value: 1 - latex: \mathrm{Cal}_{\rm T}^{145} + latex: \mathrm{Cal}_{\rm LAT, T}^{145} calE_LAT_145: value: 1 - latex: \mathrm{Cal}_{\rm E}^{145} + latex: \mathrm{Cal}_{\rm LAT, E}^{145} calT_LAT_225: value: 1 - latex: \mathrm{Cal}_{\rm T}^{225} + latex: \mathrm{Cal}_{\rm LAT, T}^{225} calE_LAT_225: value: 1 - latex: \mathrm{Cal}_{\rm E}^{225} + latex: \mathrm{Cal}_{\rm LAT, E}^{225} calG_all: value: 1 latex: \mathrm{Cal}_{\rm G}^{\rm All} alpha_LAT_93: value: 0 #deg - latex: \alpha^{93} + latex: \alpha_{\rm LAT}^{93} alpha_LAT_145: value: 0 #deg - latex: \alpha^{145} + latex: \alpha_{\rm LAT}^{145} alpha_LAT_225: value: 0 #deg - latex: \alpha^{225} + latex: \alpha_{\rm LAT}^{225}