Following discussion #81 , this PR proposes to extend the ability to get window for (Log)TopHatWindow the same as BandpowerWindow.
When filling data viaadd_ell_cl function, the (Log)TopHatWindow object is associated to a window_ind tag which indexes its position related to data index.
When retrieving the windows viaget_bandpower_windows (it may be worth renaming this function into get_windows since it is not anymore dedicated to only BandpowerWindow), then the full binning array is computed given the selected indices (here again, in the same way as BandpowerWindow).
The important thing to think about is that (Log)TopHatWindow object is now storing the whole bin edges and not a pair of min/max value. Nevertheless, it should be backward compatible since min/max scalar values can also be represented by one entry array.
We may understand this feature is not required or desired and that it exists other way to extract the windows (using get_tag functions for instance, see #81 discussion) but the important point is that it allows to treat BandpowerWindow and (Log)TopHatWindow objects the same way without assuming or accessing the type of window.
Following discussion #81 , this PR proposes to extend the ability to get window for
(Log)TopHatWindow
the same asBandpowerWindow
.When filling data via
add_ell_cl
function, the(Log)TopHatWindow
object is associated to awindow_ind
tag which indexes its position related to data index.When retrieving the windows via
get_bandpower_windows
(it may be worth renaming this function intoget_windows
since it is not anymore dedicated to onlyBandpowerWindow
), then the full binning array is computed given the selected indices (here again, in the same way asBandpowerWindow
).The important thing to think about is that
(Log)TopHatWindow
object is now storing the whole bin edges and not a pair of min/max value. Nevertheless, it should be backward compatible since min/max scalar values can also be represented by one entry array.We may understand this feature is not required or desired and that it exists other way to extract the windows (using
get_tag
functions for instance, see #81 discussion) but the important point is that it allows to treatBandpowerWindow
and(Log)TopHatWindow
objects the same way without assuming or accessing the type of window.This will close #81