Skip to content

Commit

Permalink
Added some comments
Browse files Browse the repository at this point in the history
  • Loading branch information
b-thorne authored and zonca committed Dec 23, 2019
1 parent 819903e commit 4a260be
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pysm/models/dust.py
Original file line number Diff line number Diff line change
Expand Up @@ -632,7 +632,6 @@ def evaluate_mbb_scaling(self, freq: u.GHz):
RJ_factor = (freq / self.__freq_break) ** 1.54
#calculate the HD17 model at the break frequency.
scaling_i_at_cutoff, scaling_p_at_cutoff = self.evaluate_hd17_model_scaling(self.__freq_break)
# rescale the HD17 model at the break frequency using MBB for freqs < 10 GHz.
return scaling_i_at_cutoff * RJ_factor.value, scaling_p_at_cutoff * RJ_factor.value

@u.quantity_input
Expand Down Expand Up @@ -679,6 +678,9 @@ def get_emission(self, freqs: u.GHz, weights=None) -> u.uK_RJ:
for i, (freq, _) in enumerate(zip(freqs, weights)):
# apply the break frequency
if freq < self.__freq_break:
# TODO: this will calculate the HD17 scaling at the break
# frequency each time a frequency below 10 GHz is requested.
# Could store this to save recalculating it each time.
scaling_i, scaling_p = self.evaluate_mbb_scaling(freq)
else:
scaling_i, scaling_p = self.evaluate_hd17_model_scaling(freq)
Expand Down

0 comments on commit 4a260be

Please sign in to comment.