File tree Expand file tree Collapse file tree 2 files changed +18
-0
lines changed
Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -627,6 +627,14 @@ def downsample_counts(self) -> None:
627627 nside of the input pset counts variable (e.g. 128) to the nside of the pset.
628628 """
629629 pset_data = self .data
630+ # TODO remove this check once we reprocess all psets
631+ # going forward, all psets should have counts_pixel_index as a coordinate.
632+ if "counts_pixel_index" not in pset_data .dims :
633+ logger .info (
634+ "No counts_pixel_index found in the dataset. Skipping counts "
635+ "downsampling."
636+ )
637+ return
630638 counts_n_pix = pset_data .sizes ["counts_pixel_index" ]
631639 pset_n_pix = hp .nside2npix (self .nside )
632640 if counts_n_pix != pset_n_pix :
Original file line number Diff line number Diff line change @@ -98,6 +98,16 @@ def test_instantiate(self):
9898 "energy_bin_geometric_mean" ,
9999 )
100100
101+ # TODO remove this test when the TODO in the ultra downsample_counts function is
102+ # removed.
103+ def test_old_pset (self ):
104+ pset = self .l1c_pset_products [0 ]
105+ pset = pset .drop_dims ("counts_pixel_index" )
106+ pset = ena_maps .UltraPointingSet (
107+ pset ,
108+ spice_reference_frame = geometry .SpiceFrame .IMAP_DPS ,
109+ )
110+
101111 @pytest .mark .usefixtures ("_setup_ultra_l1c_pset_products" )
102112 def test_init_cdf (
103113 self ,
You can’t perform that action at this time.
0 commit comments