-
Notifications
You must be signed in to change notification settings - Fork 8
Description
In the context of Simons Observatory, we would like to use the TopHatWindow
to only store the bin edges. So far, we have been using with success the BandpowerWindow
and we store them with the following idiom
sacc_obj.add_ell_cl(..., window=bp_window)
We can't do that with the TopHatWindow
and we are getting errors due to this line
Line 1203 in 767686a
if isinstance(window, BandpowerWindow): |
BandpowerWindow
. I guess we are wrong in the way to use/store the TopHatWindow
. It may be related to the fact that it is not clear what is exactly the content and attributes of the TopHatWindow
class. The docstring says the min/max
class attributes should be int/float
scalars but the unit test Line 510 in 767686a
def test_tophat_window(): |
numpy
arrays. In my mind, the min/max
attributes should be the bin edges and then numpy
arrays.
If we overpass the
Line 1203 in 767686a
if isinstance(window, BandpowerWindow): |
get_bandpower_windows
function due this line Line 973 in 767686a
if not isinstance(ws, BandpowerWindow): |
If we treat the TopHatWindow
the same way as BandpowerWindow
, I can propose a PR with little modification (mainly I write a get_section
method for TopHatWindow
to extract a subset of bin edges given the selected indices) but I would like to hear from sacc
experts or TopHatWindow
users how to properly use this window.
Also related to #72