diff --git a/deepcmbsim/camb_power_spectrum.py b/deepcmbsim/camb_power_spectrum.py index f3a8f5e..892e565 100644 --- a/deepcmbsim/camb_power_spectrum.py +++ b/deepcmbsim/camb_power_spectrum.py @@ -146,6 +146,14 @@ def get_cls(self, save_to_dict=None, user_params=True): else: raise ValueError('somethings wrong.') + # see if lmin is specified - if so, discard the ells < lmin + if self.UserParams['lmin'] != 0: + ell_inds = np.where(outdict['l'] >= self.UserParams['lmin'])[0] + if bool(self.UserParams["verbose"]): + print(f'## discarding {len(outdict["l"]) - len(ell_inds)} ells given lmin specification.') + for key in outdict.keys(): + outdict[key] = outdict[key][ell_inds] + if bool(self.UserParams["verbose"]): time_end = dt.now() print('from', dt.strftime(time_start, '%H:%M:%S.%f %P'), 'to', dt.strftime(time_end, '%H:%M:%S.%f %P'), diff --git a/deepcmbsim/settings/user_config.yaml b/deepcmbsim/settings/user_config.yaml index 9fe9ecc..9c345ef 100644 --- a/deepcmbsim/settings/user_config.yaml +++ b/deepcmbsim/settings/user_config.yaml @@ -15,6 +15,10 @@ extra_l: 300 max_l_use: 10000 # max_l_use will differ from max_l and max_l_tensor by "extra_l" because # according to the CAMB documentation errors affect the last "100 or so" multipoles # --- +# decide on lmin: CAMB will still be called with lmin=0 but +# you may specifiy lmin for the output spectra +lmin: 0 +# --- # decide on what to output; either 'all' or a subset list of # ['clTT', 'clEE', 'clBB', 'clTE', 'clPP', 'clPT', 'clPE'] cls_to_output: 'all' \ No newline at end of file