diff --git a/tests/fixtures/thresholds.mvcm.snpp.v0.0.1.yaml b/tests/fixtures/thresholds.mvcm.snpp.v0.0.1.yaml index 801c795c7c763f2ac975b601d9c636892b8099a8..99cc058820454e00b280e11c51a5e159d636eaa6 100644 --- a/tests/fixtures/thresholds.mvcm.snpp.v0.0.1.yaml +++ b/tests/fixtures/thresholds.mvcm.snpp.v0.0.1.yaml @@ -9,7 +9,6 @@ Land_Day: cmult: 0.3 adj: 1.25 perform: True - dl_ref3_tpw : -10.00 11-4um_Oceanic_Stratus_Test: thr: [-16.0, -14.0, -12.0, 1.0, 1.0] perform: True @@ -19,10 +18,11 @@ Land_Day: perform: True 1.38um_High_Cloud_Test: thr: [0.0375, 0.0250, 0.0125, 1.0, 1.0] + tpw: -10.00 perform: True - dlvrat : [1.80, 1.85, 1.90, 1.0, 1.0] -# dl11_12lcmult : 0.3 -# dl11_12hcadj : 1.25 + dlvrat: [1.80, 1.85, 1.90, 1.0, 1.0] + # dl11_12lcmult : 0.3 + # dl11_12hcadj : 1.25 CO2_High_Clouds_Test: [222.0, 224.0, 226.0, 1.0, 1.0] Water_Vapor_High_Clouds_Test: [215.0, 220.0, 225.0, 1.0, 1.0] @@ -31,15 +31,15 @@ Land_Night: coeffs: [3.0, 1.0] cmult: 0.0 adj: 0 - bt1: 270.0 # WILL FIND A BETTER NAME AT SOME POINT, MAYBE + bt1: 270.0 # WILL FIND A BETTER NAME AT SOME POINT, MAYBE lat: 30.0 perform: True 4-12um_BTD_Thin_Cirrus_Test: thr: [15.0, 10.0, 5.00, 1.0, 1.0] perform: True 7.3-11um_BTD_Mid_Level_Cloud_Test: - thr: [-8.0, -10.0, -11.0, 1.0, 1.0] # nl7_11s - 11-4um_BT_Difference_Test: + thr: [-8.0, -10.0, -11.0, 1.0, 1.0] # nl7_11s + 11-4um_BT_Difference_Test_Land: thr_low: [0.0, -0.5, -1.0, 1.0] thr_mid: [-0.5, 6.0, 0.5, 1.0] thr_hi: [6.5, 6.0, 5.5, 1.0] @@ -47,14 +47,15 @@ Land_Night: int_adj: 0 ndvi: 0.25 ndvi_australia: 0.4 - bt_diff_bounds : [1.0, -1.0] + bt_diff_bounds: [1.0, -1.0] perform: True Surface_Temperature_Test: desert_thr: 20.0 regular_thr: 12.0 channel_diff_11-12um_thr: [-0.2, 1.0] channel_diff_11-4um_thr: [-0.5, 1.0] - perform: True + perform: + True # Surface_Temperature_Test_df1: [-0.2, 1.0] # Surface_Temperature_Test_df2: [-0.5, 1.0] # Surface_Temperature_Test_difference: [-0.2, 1.0, -0.5, 1.0] # <- this merges the previous two arrays @@ -62,12 +63,14 @@ Land_Night: # Surface_Temperature_Test_2: 12.0 # | merge these three coefficients # Surface_Temperature_Test_pfm: 1.0 # __| # Surface_Temperature_Test: [20.0, 12.0, 1.0] # <- First attempt to merge the three values above - nlbt1 : 270.0 - nl_lat : 30.0 + nlbt1: 270.0 + nl_lat: + 30.0 # nl_ndvi : 0.25 # nl_ndvi_Aust : 0.40 # nl_intadj : 0.0 - nl_btd1 : -2.0 + nl_btd1: + -2.0 # nl11_4coef : [-0.3476, 0.5307, -0.1930] CO2_High_Clouds_Test: [222.0, 224.0, 226.0, 1.0, 1.0] Water_Vapor_High_Clouds_Test: [215.0, 220.0, 225.0, 1.0, 1.0] @@ -78,7 +81,6 @@ Land_Day_Coast: cmult: 0.3 adj: 1.25 perform: True - dl_ref3_tpw_t2 : -10.00 11-4um_Oceanic_Stratus_Test: thr: [-16.0, -14.0, -12.0, 1.0, 1.0] perform: True @@ -89,23 +91,29 @@ Land_Day_Coast: adj: 0.94 perform: True 1.38um_High_Cloud_Test: - thr: [0.0375, 0.0250, 0.0125, 1.0, 1.0] + thr: [0.0375, 0.0250, 0.0125, 1.0, 1.0] + tpw: -10.00 perform: True # dl11_12lcmult_t2 : 0.3 # dl11_12hcadj_t2 : 1.25 Land_Day_Desert: -# lds11_12hi : [3.5, 1.0] + # lds11_12hi : [3.5, 1.0] 11-12um_Cirrus_Test: coeffs: [3.5, 1.0] cmult: 0.3 adj: 1.25 perform: True 11-4um_Oceanic_Stratus_Test: - thr: [-28.0, -26.0, -24.0, -2.0, 0.0, 2.0, 1.0, 1.0] # this replaces lds11_4hi and lds11_4lo. The values - perform: True # are sorted left to right so that they follow the - # scheme: Lo-Mid-Hi--Hi-Mid-Lo This is the opposite - # of Ocean_Day + thr: + [2.0, 0.0, -2.0, -24.0, -26.0, -28.0, 1.0, 1.0] # I need to double check, but this seems to be + # the correct set of thresholds, not the ones below!! + # thr: [-28.0, -26.0, -24.0, -2.0, 0.0, 2.0, 1.0, 1.0] # this replaces lds11_4hi and lds11_4lo. The values + perform: + True # are sorted left to right so that they follow the + # scheme: Lo-Mid-Hi--Hi-Mid-Lo This is the opposite + # of Ocean_Day + bt_cutoff: 320 # lds11_4hi : [2.0, 0.0, -2.0, 1.00, 1.0] # lds11_4lo : [-28.0, -26.0, -24.0, 1.00] CO2_High_Clouds_Test: [222.0, 224.0, 226.0, 1.0, 1.0] @@ -113,31 +121,33 @@ Land_Day_Desert: Visible_Reflectance_Test: thr: [0.326, 0.288, 0.250, 1.00, 1.0] adj: 0.94 - ndvi_thr: 0.25 # this used to be lds_ndvi + ndvi_thr: 0.25 # this used to be lds_ndvi perform: True 1.38um_High_Cloud_Test: thr: [0.0375, 0.0250, 0.0125, 1.0, 1.0] + tpw: -10.00 perform: True GEMI_Test: gemi0: [0.085, 0.095, 0.115, 1.00, 1.0] gemi1: [0.145, 0.170, 0.220, 1.00] gemi2: [0.310, 0.335, 0.360, 1.00] perform: True - lds_ref3_tpw : -10.00 - ldsbt1 : 320.0 + ldsbt1: 320.0 # lds11_12lcmult : 0.3 # lds11_12hcadj : 1.25 Land_Day_Desert_Coast: -# lds11_12hi_c : [3.5, 1.0] + # lds11_12hi_c : [3.5, 1.0] 11-12um_Cirrus_Test: coeffs: [3.5, 1.0] cmult: 0.3 adj: 1.25 perform: True 11-4um_Oceanic_Stratus_Test: - thr: [-23.0, -21.0, -19.0, -2.0, 0.0, 2.0, 1.0, 1.0] + # thr: [-23.0, -21.0, -19.0, -2.0, 0.0, 2.0, 1.0, 1.0] + thr: [2.0, 0.0, -2.0, -19.0, -21.0, -23.0, 1.0, 1.0] perform: True + bt_cutoff: 320 CO2_High_Clouds_Test: [222.0, 224.0, 226.0, 1.0, 1.0] Water_Vapor_High_Clouds_Test: [215.0, 220.0, 225.0, 1.0, 1.0] Visible_Reflectance_Test: @@ -147,9 +157,9 @@ Land_Day_Desert_Coast: perform: True 1.38um_High_Cloud_Test: thr: [0.0375, 0.0250, 0.0125, 1.0, 1.0] + tpw: -10.00 perform: True - lds_ref3_tpw_c : -10.00 - ldsbt1_c : 320.0 + ldsbt1_c: 320.0 # lds11_12lcmult_c : 0.3 # lds11_12hcadj_c : 1.25 @@ -162,7 +172,7 @@ Ocean_Day: coeffs: [1.8860, 0.9380, 0.1280, 1.094] perform: True 8.6-11um_Test: - thr: [-0.50, -1.00, -1.50, 1.0, 1.0] + thr: [-0.50, -1.00, -1.50, 1.0, 1.0] perform: True 11-12um_Cirrus_Test: coeffs: [3.0, 1.0] @@ -182,16 +192,26 @@ Ocean_Day: locut_coeff: 0.0100 Vis/NIR_Ratio_Test: thr: [0.837, 0.889, 0.934, 1.001, 1.154, 1.205, 1.0, 1.0] # This replace dovrathi and dovratlo - perform: True # The values are sorted left to right - # so that they follow the scheme: - # Hi-Mid-Lo--Lo-Mid-Hi - # Last two values are power and switch - # to turn the test on/off + perform: + True # The values are sorted left to right + # so that they follow the scheme: + # Hi-Mid-Lo--Lo-Mid-Hi + # Last two values are power and switch + # to turn the test on/off 1.6_2.1um_NIR_Reflectance_Test: - thr: [0.0, 0.0, 0.0, 1.0, 1.0] # This is a placeholder to force consistency with NIR_Reflectance_Test. - # In both cases the only value used is thr[3] AFAIK - coeffs: [1.01339303876915, -0.00277128813739, 0.00027804834484, -0.00001549681141, 0.00000016623006, 0.00000000000000] - bias: 0.98 # this corresponds to do_b6bias_adj + thr: + [0.0, 0.0, 0.0, 1.0, 1.0] # This is a placeholder to force consistency with NIR_Reflectance_Test. + # In both cases the only value used is thr[3] AFAIK + coeffs: + [ + 1.01339303876915, + -0.00277128813739, + 0.00027804834484, + -0.00001549681141, + 0.00000016623006, + 0.00000000000000, + ] + bias: 0.98 # this corresponds to do_b6bias_adj adj: 0.0125 locut_coeff: 0.0100 midpt_coeff: 0.0070 @@ -201,12 +221,13 @@ Ocean_Day: # vnir_ratio_hi : [1.001, 1.154, 1.205, 1.0, 1.0] # vnir_ratio_lo : [0.934, 0.889, 0.837, 1.0] 1.38um_High_Cloud_Test: - coeffs: [-0.2419, 0.0455, -0.0024, 0.000059029, -0.00000069964, 0.000000003204] + coeffs: + [-0.2419, 0.0455, -0.0024, 0.000059029, -0.00000069964, 0.000000003204] adj: 0.0010 szafac: 4.0 perform: True - do_b6bias_adj : 0.98 - do_b7bias_adj : 0.97 + do_b6bias_adj: 0.98 + do_b7bias_adj: 0.97 Ocean_Night: 11um_Test: @@ -234,13 +255,13 @@ Ocean_Night: thr: [3.0, 6.0, 7.0, 1.0, 1.0] variability: 0.40 perform: True - 11-4um_BT_Difference_Test: + 11-4um_BT_Difference_Test_Ocean: coeffs: [-0.7093, 0.1128, -0.1567] - corr: 0.0 # no_intadj - locut_coeff: [-4.0, 4.0] # no11_4load - midpt_coeff: [-2.5, 2.5] # no11_4mdad - hicut_coeff: [-1.5, 1.5] # no11_4hiad - perform: True # no11_4_pfm + corr: 0.0 # no_intadj + locut_coeff: [-4.0, 4.0] # no11_4load + midpt_coeff: [-2.5, 2.5] # no11_4mdad + hicut_coeff: [-1.5, 1.5] # no11_4hiad + perform: True # no11_4_pfm CO2_High_Clouds_Test: [222.0, 224.0, 226.0, 1.0, 1.0] Water_Vapor_High_Clouds_Test: [215.0, 220.0, 225.0, 1.0, 1.0] @@ -250,17 +271,17 @@ Polar_Day_Land: cmult: 0.3 adj: 0.3 perform: True - pdl_ref3_tpw : -10.00 11-4um_Oceanic_Stratus_Test: thr: [-16.0, -14.0, -12.0, 1.0, 1.0] perform: True - pdlh20 : [215.0, 220.0, 225.0, 1.0, 1.0] + pdlh20: [215.0, 220.0, 225.0, 1.0, 1.0] Visible_Reflectance_Test: thr: [0.207, 0.169, 0.132, 1.0, 1.0] adj: 0.94 perform: True 1.38um_High_Cloud_Test: thr: [0.0375, 0.0250, 0.0125, 1.0, 1.0] + tpw: -10.00 perform: True Polar_Night_Land: @@ -268,16 +289,17 @@ Polar_Night_Land: 11-12um_Cirrus_Test: coeffs: [3.0, 1.0] cmult: 0 - adj: 0 # I NEED TO WORK ON THIS + adj: 0 # I NEED TO WORK ON THIS bt1: 270.0 perform: True - pnlbt2 : 270.0 + pnlbt2: 270.0 Surface_Temperature_Test: desert_thr: 20.0 regular_thr: 12.0 channel_diff_11-12um_thr: [0, 1.0] channel_diff_11-4um_thr: [-0.5, 1.0] - perform: True + perform: + True # Surface_Temperature_Test_df1: [0.0, 1.0] # Surface_Temperature_Test_df2: [-0.5, 1.0] # Surface_Temperature_Test_difference: [-0.2, 1.0, -0.5, 1.0] # <- this merges the previous two arrays @@ -285,28 +307,28 @@ Polar_Night_Land: # Surface_Temperature_Test_2: 12.0 # | merge these three coefficients # Surface_Temperature_Test_pfm: 1.0 # __| # Surface_Temperature_Test: [20.0, 12.0, 1.0] # <- First attempt to merge the three values above - 11-4um_BT_Difference_Test: + 11-4um_BT_Difference_Test_Land: low: [2.00, 1.70, 1.40, 1.0] mid1: [1.70, 0.70, 0.3, 1.0] mid2: [0.00, 0.00, 0.00, 0.0] mid3: [0.00, 0.00, 0.00, 0.0] - high: [1.00, 0.70, 0.40, 1.0] - bt11_bounds: [235, 0, 0, 265] + high: [1.00, 0.70, 0.40, 1.0] + bt11_bounds: [235, 0.0, 0.0, 265] perform: True 7.3-11um_BTD_Mid_Level_Cloud_Test: - low: [-1.00, 0.00, 1.00, 1.0, 1.0] # pn_7_11l - mid1: [0.00, -4.50, -1.00, 1.0] # pn_7_11m1 - mid2: [-4.50, -10.50, -1.00, 1.0] # pn_7_11m2 - mid3: [-10.50, -20.0, -1.00, 1.0] # pn_7_11m3 - high: [-21.0, -20.0, -19.0,1.0] # pn_7_11h - bt11_bounds: [220.0, 245.0, 255.0, 265.0] # bt11_bnds2 + low: [-1.00, 0.00, 1.00, 1.0, 1.0] # pn_7_11l + mid1: [0.00, -4.50, -1.00, 1.0] # pn_7_11m1 + mid2: [-4.50, -10.50, -1.00, 1.0] # pn_7_11m2 + mid3: [-10.50, -20.0, -1.00, 1.0] # pn_7_11m3 + high: [-21.0, -20.0, -19.0, 1.0] # pn_7_11h + bt11_bounds: [220.0, 245.0, 255.0, 265.0] # bt11_bnds2 4-12um_BTD_Thin_Cirrus_Test: low: [2.00, 1.70, 1.40, 1.0] mid1: [1.70, 0.70, 0.300, 1.0] mid2: [0.00, 0.00, 0.00, 0.0] mid3: [0.00, 0.00, 0.00, 0.0] - high: [1.00, 0.70, 0.40, 1.0] - bt11_bounds: [235.0, 000.0, 000.0, 265.0] + high: [1.00, 0.70, 0.40, 1.0] + bt11_bounds: [235.0, 0.0, 0.0, 265.0] perform: True # pnl_11_4_pfm : 1.0 # pnl_7_11_pfm : 1.0 @@ -315,10 +337,9 @@ Polar_Night_Land: Polar_Day_Coast: 11-12um_Cirrus_Test: coeffs: [3.0, 1.0] - cmult: 0 # I NEED TO WORK ON THIS - adj: 0 # I NEED TO WORK ON THIS + cmult: 0 # I NEED TO WORK ON THIS + adj: 0 # I NEED TO WORK ON THIS perform: True - pdl_ref3_tpw_t2 : -10.00 11-4um_Oceanic_Stratus_Test: thr: [-16.0, -14.0, -12.0, 1.0, 1.0] perform: True @@ -329,66 +350,69 @@ Polar_Day_Coast: perform: True 1.38um_High_Cloud_Test: thr: [0.0375, 0.0250, 0.0125, 1.0, 1.0] + tpw: -10.00 perform: True Polar_Day_Desert: 11-12um_Cirrus_Test: coeffs: [3.5, 1.0] - cmult: 0 # I NEED TO WORK ON THIS - adj: 0 # I NEED TO WORK ON THIS + cmult: 0 # I NEED TO WORK ON THIS + adj: 0 # I NEED TO WORK ON THIS perform: True 11-4um_Oceanic_Stratus_Test: - thr: [-22.0, -20.0, -18.0, -2.0, 0.0, 2.0, 1.0, 1.0] - perform: True + # thr: [-22.0, -20.0, -18.0, -2.0, 0.0, 2.0, 1.0, 1.0] + thr: [2.0, 0.0, -2.0, -18.0, -20.0, -22.0, 1.0, 1.0] + perform: True # I disable this test while I figure out if I need + bt_cutoff: 320.0 # the bt_cutoff parameter Water_Vapor_High_Clouds_Test: [215.0, 220.0, 225.0, 1.0, 1.0] Visible_Reflectance_Test: thr: [0.326, 0.288, 0.250, 1.00, 1.0] adj: 0.94 perform: True 1.38um_High_Cloud_Test: - thr: [0.0375, 0.0250, 0.0125, 1.00, 1.0] + thr: [0.0375, 0.0250, 0.0125, 1.00, 1.0] + tpw: -10.00 perform: True GEMI_Test: gemi0: [0.085, 0.110, 0.135, 1.00, 1.0] gemi1: [0.170, 0.220, 0.270, 1.00] gemi2: [0.310, 0.335, 0.360, 1.00] perform: True - pds_ref3_tpw : -10.00 - pdsbt1 : 320.0 Polar_Day_Desert_Coast: 11-12um_Cirrus_Test: coeffs: [3.5, 1.0] - cmult: 0 # I NEED TO WORK ON THIS - adj: 0 # I NEED TO WORK ON THIS + cmult: 0 # I NEED TO WORK ON THIS + adj: 0 # I NEED TO WORK ON THIS perform: True 11-4um_Oceanic_Stratus_Test: - thr: [-23.0, -21.0, -19.0, -2.0, 0.0, 2.0, 1.0, 1.0] - perform: True + # thr: [-23.0, -21.0, -19.0, -2.0, 0.0, 2.0, 1.0, 1.0] + thr: [2.0, 0.0, -2.0, -19.0, -21.0, -23.0, 1.0, 1.0] + perform: True # see Polar_Day_Desert + bt_cutoff: 320.0 Water_Vapor_High_Clouds_Test: [215.0, 220.0, 225.0, 1.0, 1.0] Visible_Reflectance_Test: thr: [0.326, 0.288, 0.250, 1.00, 1.0] adj: 0.94 perform: True 1.38um_High_Cloud_Test: - thr: [0.0375, 0.0250, 0.0125, 1.00, 1.0] + thr: [0.0375, 0.0250, 0.0125, 1.00, 1.0] + tpw: -10.00 perform: True - pds_ref3_tpw_c : -10.00 - pdsbt1_c : 320.0 Polar_Day_Snow: 11-12um_Cirrus_Test: coeffs: [3.0, 1.0] - cmult: 0 # I NEED TO WORK ON THIS - adj: 0 # I NEED TO WORK ON THIS + cmult: 0 # I NEED TO WORK ON THIS + adj: 0 # I NEED TO WORK ON THIS perform: True - dps_ref3_tpw : 0.75 - dpsbt1 : 230.0 + dpsbt1: 230.0 Water_Vapor_High_Clouds_Test: [215.0, 220.0, 225.0, 1.0, 1.0] 1.38um_High_Cloud_Test: thr: [0.060, 0.0525, 0.045, 1.0, 1.0] + tpw: 0.75 perform: True - 11-4um_BT_Difference_Test: + 11-4um_BT_Difference_Test_Land: low: [20.0, 18.0, 16.0, 1.0] mid1: [18.0, 16.0, 2.0, 1.0] mid2: [0.0, 0.0, 0.0, 0.0] @@ -396,37 +420,37 @@ Polar_Day_Snow: high: [18.0, 16.0, 14.0, 1.0] bt_11_bounds: [230.0, 0.0, 0.0, 245.0] perform: True - dps11_12adj : 0.8 + dps11_12adj: 0.8 Polar_Night_Snow: 11-12um_Cirrus_Test: coeffs: [3.0, 1.0] cmult: 0 - adj: 0 # I NEED TO WORK ON THIS + adj: 0 # I NEED TO WORK ON THIS bt1: 270.0 perform: True 4-12um_BTD_Thin_Cirrus_Test: - low: [4.50, 4.00, 3.50, 1.0] # pn_4_12l - mid1: [4.00, 2.00, 0.500, 1.0] # pn_4_12m1 - mid2: [0.00, 0.00, 0.00, 0.0] # pn_4_12m2 - mid3: [0.00, 0.00, 0.00, 0.0] # pn_4_12m3 - high: [2.50, 2.00, 1.50, 1.0] # pn_4_12h - bt11_bounds: [235.0, 0.0, 0.0, 265.0] # bt_11_bounds + low: [4.50, 4.00, 3.50, 1.0] # pn_4_12l + mid1: [4.00, 2.00, 0.500, 1.0] # pn_4_12m1 + mid2: [0.00, 0.00, 0.00, 0.0] # pn_4_12m2 + mid3: [0.00, 0.00, 0.00, 0.0] # pn_4_12m3 + high: [2.50, 2.00, 1.50, 1.0] # pn_4_12h + bt11_bounds: [235.0, 0.0, 0.0, 265.0] # bt_11_bounds perform: True 7.3-11um_BTD_Mid_Level_Cloud_Test: - low: [-1.00, 0.00, 1.00, 1.0, 1.0] # pn_7_11l - mid1: [0.00, -4.50, -1.00, 1.0] # pn_7_11m1 - mid2: [-4.50, -10.50, -1.00, 1.0] # pn_7_11m2 - mid3: [-10.50, -20.0, -1.00, 1.0] # pn_7_11m3 - high: [-21.0, -20.0, -19.0,1.0] # pn_7_11h - low_ice: [0.00, 1.00, 2.00, 1.0] # pn_7_11lw - mid1_ice: [1.00, -7.00, -1.00, 1.0] # pn_7_11m1w - mid2_ice: [-7.00, -16.50, -1.00, 1.0] # pn_7_11m2w - mid3_ice: [-16.50, -20.0, -1.00, 1.0] # pn_7_11m3w - high_ice: [-21.0 -20.0, -19.0, 1.0] # pn_7_11hw - bt11_bounds: [220.0, 245.0, 255.0, 265.0] # bt11_bnds2 + low: [-1.00, 0.00, 1.00, 1.0, 1.0] # pn_7_11l + mid1: [0.00, -4.50, -1.00, 1.0] # pn_7_11m1 + mid2: [-4.50, -10.50, -1.00, 1.0] # pn_7_11m2 + mid3: [-10.50, -20.0, -1.00, 1.0] # pn_7_11m3 + high: [-21.0, -20.0, -19.0, 1.0] # pn_7_11h + low_ice: [0.00, 1.00, 2.00, 1.0] # pn_7_11lw + mid1_ice: [1.00, -7.00, -1.00, 1.0] # pn_7_11m1w + mid2_ice: [-7.00, -16.50, -1.00, 1.0] # pn_7_11m2w + mid3_ice: [-16.50, -20.0, -1.00, 1.0] # pn_7_11m3w + high_ice: [-21.0 -20.0, -19.0, 1.0] # pn_7_11hw + bt11_bounds: [220.0, 245.0, 255.0, 265.0] # bt11_bnds2 Water_Vapor_High_Clouds_Test: [215.0, 220.0, 225.0, 1.0, 1.0] - 11-4um_BT_Difference_Test: + 11-4um_BT_Difference_Test_Land: top: low: [2.00, 1.70, 1.40, 1.0] mid1: [1.70, 0.30, 0.300, 1.0] @@ -439,11 +463,11 @@ Polar_Night_Snow: mid2: [0.00, 0.00, 0.00, 0.0] mid3: [0.00, 0.00, 0.00, 0.0] high: [-3.00, -2.50, -2.00, 1.0] - bt_thr: 230.0 # pnbt3 - tpw_thr: 0.2 # pntpw + bt_thr: 230.0 # pnbt3 + tpw_thr: 0.2 # pntpw perform: True - pn11_12adj : 0.8 - pnbt2 : 270.0 + pn11_12adj: 0.8 + pnbt2: 270.0 Polar_Day_Ocean: 11um_Test: @@ -474,21 +498,30 @@ Polar_Day_Ocean: perform: True 1.6_2.1um_NIR_Reflectance_Test: thr: [0.0, 0.0, 0.0, 1.0, 1.0] - coeffs: [1.01339303876915, -0.00277128813739, 0.00027804834484, -0.00001549681141, 0.00000016623006, 0.00000000000000] + coeffs: + [ + 1.01339303876915, + -0.00277128813739, + 0.00027804834484, + -0.00001549681141, + 0.00000016623006, + 0.00000000000000, + ] bias: 0.98 adj: 0.0125 locut_coeff: 0.0100 midpt_coeff: 0.0070 perform: True 11-4um_Oceanic_Stratus_Test: - thr: [-11.0, -9.0, -7.0, 1.0, 1.0] + thr: [-11.0, -9.0, -7.0, 1.0, 1.0] perform: True Water_Vapor_High_Clouds_Test: [215.0, 220.0, 225.0, 1.0, 1.0] - pdo_b26pfm : 1.0 - pdo_b2bias_adj : 0.96 - pdo_b7bias_adj : 0.97 + pdo_b26pfm: 1.0 + pdo_b2bias_adj: 0.96 + pdo_b7bias_adj: 0.97 1.38um_High_Cloud_Test: - coeffs: [-0.2419, 0.0455, -0.0024, 0.000059029, -0.00000069964, 0.000000003204] + coeffs: + [-0.2419, 0.0455, -0.0024, 0.000059029, -0.00000069964, 0.000000003204] adj: 0.0010 szafac: 4.0 perform: True @@ -509,7 +542,7 @@ Polar_Night_Ocean: cmult: 0.3 adj: 1.0 perform: True - pnobt1 : 280.0 + pnobt1: 280.0 11-4um_Oceanic_Stratus_Test: thr: [1.25, 1.0, 0.25, 1.0, 1.0] perform: True @@ -520,29 +553,28 @@ Polar_Night_Ocean: thr: [3.0, 6.0, 7.0, 1.0, 1.0] variability: 040 perform: True - 11-4um_BT_Difference_Test: + 11-4um_BT_Difference_Test_Ocean: coeffs: [-0.7093, 0.1128, -0.1567] - corr: 0.0 # pno_intadj - locut_coeff: [-4.0, 4.0] # pno11_4load - midpt_coeff: [-2.5, 2.5] # pno11_4mdad - hicut_coeff: [-1.5, 1.5] # pno11_4hiad - perform: True # pno11_4_pfm + corr: 0.0 # pno_intadj + locut_coeff: [-4.0, 4.0] # pno11_4load + midpt_coeff: [-2.5, 2.5] # pno11_4mdad + hicut_coeff: [-1.5, 1.5] # pno11_4hiad + perform: True # pno11_4_pfm Water_Vapor_High_Clouds_Test: [215.0, 220.0, 225.0, 1.0, 1.0] - Day_Snow: 11-12um_Cirrus_Test: coeffs: [3.0, 1.0] cmult: 0.3 - adj: 0 # I NEED TO WORK ON THIS + adj: 0 # I NEED TO WORK ON THIS perform: True - ds_ref3_tpw : 0.75 CO2_High_Clouds_Test: [222.0, 224.0, 226.0, 1.0, 1.0] Water_Vapor_High_Clouds_Test: [215.0, 220.0, 225.0, 1.0, 1.0] 1.38um_High_Cloud_Test: thr: [0.060, 0.0525, 0.045, 1.0, 1.0] + tpw: 0.75 perform: True - 11-4um_BT_Difference_Test: + 11-4um_BT_Difference_Test_Land: low: [20.0, 18.0, 16.0, 1.0] mid1: [18.0, 16.0, 2.0, 1.0] mid2: [0.0, 0.0, 0.0, 0.0] @@ -550,22 +582,22 @@ Day_Snow: high: [18.0, 16.0, 14.0, 1.0] bt_11_bounds: [230.0, 0.0, 0.0, 245.0] perform: True - ds11_12adj : 0.8 - ds11_12lcmult : 0.3 - ds11_12hcmult : 0.3 + ds11_12adj: 0.8 + ds11_12lcmult: 0.3 + ds11_12hcmult: 0.3 Night_Snow: 11-12um_Cirrus_Test: coeffs: [3.0, 1.0] cmult: 0 - adj: 0 # I NEED TO WORK ON THIS + adj: 0 # I NEED TO WORK ON THIS bt1: 270.0 perform: True - nsbt2 : 270.0 + nsbt2: 270.0 4-12um_BTD_Thin_Cirrus_Test: - thr: [4.50, 4.00, 3.50, 1.0, 1.0] + thr: [4.50, 4.00, 3.50, 1.0, 1.0] perform: True - 11-4um_BT_Difference_Test: + 11-4um_BT_Difference_Test_Land: thr: [0.70, 0.60, 0.50, 1.0, 1.0] bottom: low: [20.0, 18.0, 16.0, 1.0] @@ -578,129 +610,299 @@ Night_Snow: tpw_thr: 0.2 perform: True 7.3-11um_BTD_Mid_Level_Cloud_Test: - low: [-1.00, 0.00, 1.00, 1.0, 1.0] # pn_7_11l - mid1: [0.00, -4.50, -1.00, 1.0] # pn_7_11m1 - mid2: [-4.50, -10.50, -1.00, 1.0] # pn_7_11m2 - mid3: [-10.50, -20.0, -1.00, 1.0] # pn_7_11m3 - high: [-21.0, -20.0, -19.0,1.0] # pn_7_11h - low_ice: [0.00, 1.00, 2.00, 1.0] # pn_7_11lw - mid1_ice: [1.00, -7.00, -1.00, 1.0] # pn_7_11m1w - mid2_ice: [-7.00, -16.50, -1.00, 1.0] # pn_7_11m2w - mid3_ice: [-16.50, -20.0, -1.00, 1.0] # pn_7_11m3w - high_ice: [-21.0 -20.0, -19.0, 1.0] # pn_7_11hw - bt11_bounds: [220.0, 245.0, 255.0, 265.0] # bt11_bnds2 + low: [-1.00, 0.00, 1.00, 1.0, 1.0] # pn_7_11l + mid1: [0.00, -4.50, -1.00, 1.0] # pn_7_11m1 + mid2: [-4.50, -10.50, -1.00, 1.0] # pn_7_11m2 + mid3: [-10.50, -20.0, -1.00, 1.0] # pn_7_11m3 + high: [-21.0, -20.0, -19.0, 1.0] # pn_7_11h + low_ice: [0.00, 1.00, 2.00, 1.0] # pn_7_11lw + mid1_ice: [1.00, -7.00, -1.00, 1.0] # pn_7_11m1w + mid2_ice: [-7.00, -16.50, -1.00, 1.0] # pn_7_11m2w + mid3_ice: [-16.50, -20.0, -1.00, 1.0] # pn_7_11m3w + high_ice: [-21.0 -20.0, -19.0, 1.0] # pn_7_11hw + bt11_bounds: [220.0, 245.0, 255.0, 265.0] # bt11_bnds2 perform: False CO2_High_Clouds_Test: [222.0, 224.0, 226.0, 1.0, 1.0] Water_Vapor_High_Clouds_Test: [215.0, 220.0, 225.0, 1.0, 1.0] - ns11_12adj : 0.8 + ns11_12adj: 0.8 Antarctic_Day: Water_Vapor_High_Clouds_Test: [215.0, 220.0, 225.0, 1.0, 1.0] - ant4_11l : [26.0 23.0, 20.0, 1.0] - ant4_11h : [18.0, 15.0, 12.0, 1.0] - ant4_11m1 : [23.0, 15.0, 3.0 1.0] - ant4_11m2 : [0.0, 0.0, 0.0, 0.0] - ant4_11m3 : [0.0, 0.0, 0.0, 0.0] - bt_11_bnds4 : [240.0, 0.0, 0.0, 255.0] - antbt1 : 230.0 - ant4_11_pfm : 1.0 + ant4_11l: [26.0 23.0, 20.0, 1.0] + ant4_11h: [18.0, 15.0, 12.0, 1.0] + ant4_11m1: [23.0, 15.0, 3.0 1.0] + ant4_11m2: [0.0, 0.0, 0.0, 0.0] + ant4_11m3: [0.0, 0.0, 0.0, 0.0] + bt_11_bnds4: [240.0, 0.0, 0.0, 255.0] + antbt1: 230.0 + ant4_11_pfm: 1.0 Daytime_Ocean_Spatial_Variability: - dovar11 : 0.40 - dovar86 : 0.0020 + var_11um: 0.40 + var_0_86um: 0.0020 Sun_Glint: + btdiff_37_11um: 13.0 + m09: 0.568 + m02: 0.001 + band2_0deg: [.1296, .1152, .1008, 1.0] # snglnt0_b2 + band2_10deg: [.1152, .0624, .0144, 1.0] # snglnt10_b2 + band2_20deg: [.0624, .0432, .0144, 1.0] # snglnt20_b2 + band7_0deg: [.1176, .1078, .0980, 1.0] # snglnt0_b7 + band7_10deg: [.1078, .0686, .0098, 1.0] # snglnt10_b7 + band7_20deg: [.0686, .0196, .0098, 1.0] # snglnt20_b7 + bounds: [0.0, 10.0, 25.0, 40.0] # snglnt_bounds + snglnt: + [0.97, 1.02, 1.07, 1.12, 1.17, 1.28, 1.0, 1.0] # This replaces snglntv, snglntvch snglntvcl + # The values are sorted left to right such that + # Hi-Mid-Lo--Lo-Mid-Hi + # I also added the two 1.0 at the end to + # maintain consistency with the other + # thresholds for conf_test_dble # snglntv : [1.02, 1.17] # snglntvch : [0.97, 1.28] # snglntvcl : [1.07, 1.12] - snglnt : [0.97, 1.02, 1.07, 1.12, 1.17, 1.28, 1.0, 1.0] # This replaces snglntv, snglntvch snglntvcl - # The values are sorted left to right such that - # Hi-Mid-Lo--Lo-Mid-Hi - # I also added the two 1.0 at the end to - # maintain consistency with the other - # thresholds for conf_test_dble - sg_tbdfl : 13.0 - sngm09 : 0.568 - sngm02vm : 0.001 - band2_0deg : [.1296, .1152, .1008, 1.0] # snglnt0_b2 - band2_10deg : [.1152, .0624, .0144, 1.0] # snglnt10_b2 - band2_20deg : [.0624, .0432, .0144, 1.0] # snglnt20_b2 - band7_0deg : [.1176, .1078, .0980, 1.0] # snglnt0_b7 - band7_10deg : [.1078, .0686, .0098, 1.0] # snglnt10_b7 - band7_20deg : [.0686, .0196, .0098, 1.0] # snglnt20_b7 - bounds : [0.0, 10.0, 25.0, 40.0] # snglnt_bounds Land_Restoral: - ldsr5_4_thr : 1.96 - ldr5_4_thr : 2.94 - ld20m22 : 11.0 - ld22m31 : 15.0 - ldsbt11 : [295.0, 300.0, 305.0] - ldsbt11bd : [290.0, 295.0, 305.0] - lnbt11 : [287.5, 292.5, 297.5] + m05m04_ratio_desert: 1.96 # ldsr5_4_thr + m05m04_ratio: 2.94 # ldr5_4_thr + m20m22diff: 11.0 # ld20m22 + m22m31diff: 15.0 # ld22m31 + bt11: [295.0, 300.0, 305.0] # ldsbt11 + bt11_desert: [290.0, 295.0, 305.0] # ldsbt11bd + bt11_land_night: [287.5, 292.5, 297.5] # lnbt11 Night_Snow_Inversion: - pn65_11 : [10.0, 1.0] - pn13_11 : [3.0, 1.0] - pn7_11 : [5.0, 1.0] - n65_11 : [10.0, 1.0] + pn65_11: [10.0, 1.0] + pn13_11: [3.0, 1.0] + pn7_11: [5.0, 1.0] + n65_11: [10.0, 1.0] Snow_Mask: - sm_bt11 : 280.0 - sm_ndsi : 0.31 - Grnlnd_ndsi : 0.66 - sm_ref2 : 0.1056 - sm85_11 : 0.0 - sm85_11hel : 1.5 - sm37_11 : 11.0 - sm37_11hel : 16.0 - sm_mnir : 0.196 - sm_lsfcdif : 20.0 - sm_wsfcdif : 20.0 - sm_bt1 : 273.0 - prd_ndvi_const : -0.2015 + sm_bt11: 280.0 + sm_ndsi: 0.31 + Grnlnd_ndsi: 0.66 + sm_ref2: 0.1056 + sm85_11: 0.0 + sm85_11hel: 1.5 + sm37_11: 11.0 + sm37_11hel: 16.0 + sm_mnir: 0.196 + sm_lsfcdif: 20.0 + sm_wsfcdif: 20.0 + sm_bt1: 273.0 + prd_ndvi_const: -0.2015 Coastal_NDVI_Thresholds: - coast_ndvi : [-0.18, 0.40] + coast_ndvi: [-0.18, 0.40] # Ocean NDVI and shallow (turbid) water test thresholds. Ocean_NDVI_and_Shallow_Water: - swc_ndvi : [-0.35, 0.40] - swc_124std : 0.0023 + ndvi_boundaries: [-0.35, 0.40] + std_124: 0.0023 Thin_Cirrus_Tests: - tci_ref3_tpw : 0.75 - dltci : [0.0250, 0.0125] - dstci : [0.0350, 0.0300] + tci_ref3_tpw: 0.75 + dltci: [0.0250, 0.0125] + dstci: [0.0350, 0.0300] # Power cosine(VZA) is raised to in VZA-correction codes VZA_correction: - vzcpow : [0.75, 0.75, 0.25] + vzcpow: [0.75, 0.75, 0.25] # Thresholds used in calculating 0.66 and 0.413 um cloud test thresholds Misc: - des_ndvi : 0.25 - fill_ndvi : [32.000, 0.00] # replaces fill_ndvi1 and fill_ndvi2 - ndvi_bnd1 : 0.05 - ndvi_bnd2 : 0.95 - adj_fac_desert : 0.10 - adj_fac_land : 0.00 + des_ndvi: 0.25 + fill_ndvi: [32.000, 0.00] # replaces fill_ndvi1 and fill_ndvi2 + ndvi_bnd1: 0.05 + ndvi_bnd2: 0.95 + adj_fac_desert: 0.10 + adj_fac_land: 0.00 # Coefficients for band 1 land thresholds Coeffs_Band1_land_thresh: - - [32.00000000, 0.00000000, 0.00000000, 0.00000000, 42.00000000, 0.00000000, 0.00000000, 0.00000000, 52.00000000, 0.00000000, 0.00000000, 0.00000000] - - [24.00000000, 0.00000000, 0.00000000, 0.00000000, 28.00000000, 0.00000000, 0.00000000, 0.00000000, 32.00000000, 0.00000000, 0.00000000, 0.00000000] - - [99.13076923, -2.00907925, 0.01492075, -0.00003531, 122.19090909, -2.32652292, 0.01659848, -0.00003681, 142.66293706, -2.57860528, 0.01773252, -0.00003685] - - [85.07902098, -1.59413364, 0.01123310, -0.00002556, 144.56573427, -2.81054779, 0.01967366, -0.00004324, 204.35454545, -4.03411810, 0.02816667, -0.00006103] - - [85.03846154, -1.50831391, 0.01006760, -0.00002199, 165.15314685, -3.24716783, 0.02255594, -0.00004965, 242.06363636, -4.90912587, 0.03445455, -0.00007587] - - [81.00979021, -1.37731935, 0.00881294, -0.00001859, 220.36783217, -4.44111888, 0.03087762, -0.00006888, 359.72587413, -7.50491841, 0.05294231, -0.00011917] - - [76.94055944, -1.35441725, 0.00896096, -0.00001952, 172.36783217, -3.33144911, 0.02242308, -0.00004810, 267.90909091, -5.31620047, 0.03597727, -0.00007698] - - [85.83006993, -1.55480575, 0.01025932, -0.00002216, 160.73706294, -3.07291375, 0.02041900, -0.00004330, 237.37622378, -4.63444833, 0.03091317, -0.00006525] - - [105.02447552, -1.98017094, 0.01319522, -0.00002877, 135.50699301, -2.59097902, 0.01749301, -0.00003811, 165.33006993, -3.18872183, 0.02171387, -0.00004734] - - [105.02447552, -1.98017094, 0.01319522, -0.00002877, 135.50699301, -2.59097902, 0.01749301, -0.00003811, 165.33006993, -3.18872183, 0.02171387, -0.00004734] + - [ + 32.00000000, + 0.00000000, + 0.00000000, + 0.00000000, + 42.00000000, + 0.00000000, + 0.00000000, + 0.00000000, + 52.00000000, + 0.00000000, + 0.00000000, + 0.00000000, + ] + - [ + 24.00000000, + 0.00000000, + 0.00000000, + 0.00000000, + 28.00000000, + 0.00000000, + 0.00000000, + 0.00000000, + 32.00000000, + 0.00000000, + 0.00000000, + 0.00000000, + ] + - [ + 99.13076923, + -2.00907925, + 0.01492075, + -0.00003531, + 122.19090909, + -2.32652292, + 0.01659848, + -0.00003681, + 142.66293706, + -2.57860528, + 0.01773252, + -0.00003685, + ] + - [ + 85.07902098, + -1.59413364, + 0.01123310, + -0.00002556, + 144.56573427, + -2.81054779, + 0.01967366, + -0.00004324, + 204.35454545, + -4.03411810, + 0.02816667, + -0.00006103, + ] + - [ + 85.03846154, + -1.50831391, + 0.01006760, + -0.00002199, + 165.15314685, + -3.24716783, + 0.02255594, + -0.00004965, + 242.06363636, + -4.90912587, + 0.03445455, + -0.00007587, + ] + - [ + 81.00979021, + -1.37731935, + 0.00881294, + -0.00001859, + 220.36783217, + -4.44111888, + 0.03087762, + -0.00006888, + 359.72587413, + -7.50491841, + 0.05294231, + -0.00011917, + ] + - [ + 76.94055944, + -1.35441725, + 0.00896096, + -0.00001952, + 172.36783217, + -3.33144911, + 0.02242308, + -0.00004810, + 267.90909091, + -5.31620047, + 0.03597727, + -0.00007698, + ] + - [ + 85.83006993, + -1.55480575, + 0.01025932, + -0.00002216, + 160.73706294, + -3.07291375, + 0.02041900, + -0.00004330, + 237.37622378, + -4.63444833, + 0.03091317, + -0.00006525, + ] + - [ + 105.02447552, + -1.98017094, + 0.01319522, + -0.00002877, + 135.50699301, + -2.59097902, + 0.01749301, + -0.00003811, + 165.33006993, + -3.18872183, + 0.02171387, + -0.00004734, + ] + - [ + 105.02447552, + -1.98017094, + 0.01319522, + -0.00002877, + 135.50699301, + -2.59097902, + 0.01749301, + -0.00003811, + 165.33006993, + -3.18872183, + 0.02171387, + -0.00004734, + ] # Coefficients for band 8 land thresholds Coeffs_Band8_land_thresh: - - [282.74916084, -5.42869658, 0.03660781, -0.00008092, 344.87048951, -6.80660839, 0.04770163, -0.00010991, 407.83734266, -8.20392385, 0.05894114, -0.00013926] - - [229.50727273, -4.31606061, 0.02868182, -0.00006212, 316.38517483, -6.41910256, 0.04603089, -0.00010787, 403.78188811, -8.52743395, 0.06335781, -0.00015340] - - [239.32391608, -4.49928127, 0.02977214, -0.00006436, 270.31741259, -5.33625680, 0.03757168, -0.00008609, 301.76013986, -6.18557498, 0.04546562, -0.00010806] + - [ + 282.74916084, + -5.42869658, + 0.03660781, + -0.00008092, + 344.87048951, + -6.80660839, + 0.04770163, + -0.00010991, + 407.83734266, + -8.20392385, + 0.05894114, + -0.00013926, + ] + - [ + 229.50727273, + -4.31606061, + 0.02868182, + -0.00006212, + 316.38517483, + -6.41910256, + 0.04603089, + -0.00010787, + 403.78188811, + -8.52743395, + 0.06335781, + -0.00015340, + ] + - [ + 239.32391608, + -4.49928127, + 0.02977214, + -0.00006436, + 270.31741259, + -5.33625680, + 0.03757168, + -0.00008609, + 301.76013986, + -6.18557498, + 0.04546562, + -0.00010806, + ] diff --git a/tests/test_spectral_tests.py b/tests/test_spectral_tests.py index cd5b52715dee08ef6c3cec96a9f703556b16c338..b14ba2da320c9db48a8132d5465abff1f1d7207a 100644 --- a/tests/test_spectral_tests.py +++ b/tests/test_spectral_tests.py @@ -83,7 +83,7 @@ def test_data(files): @pytest.fixture(scope="class") -def ref_confidence(files): +def reference(files): """Load reference data.""" return xr.open_dataset(files.ref_file) @@ -109,91 +109,177 @@ class Test11umTest: cmin, bits = scene_type.test_11um("M15", cmin, bits) return {"cmin": cmin, "bits": bits} - def test_qa_bit(self, run_11um_test, ref_confidence): + def test_qa_bit(self, run_11um_test, reference): """Test qa bit value.""" - assert np.allclose(run_11um_test["bits"]["qa"], ref_confidence.qa_bit.values) + assert np.allclose(run_11um_test["bits"]["qa"], reference.qa_bit_11um.values) - def test_test_bit(self, run_11um_test, ref_confidence): + def test_test_bit(self, run_11um_test, reference): """Test test bit value.""" - assert np.allclose(run_11um_test["bits"]["test"], ref_confidence.test_bit.values) + assert np.allclose(run_11um_test["bits"]["test"], reference.test_bit_11um.values) - def test_confidence(self, run_11um_test, ref_confidence): + def test_confidence(self, run_11um_test, reference): """Test confidence value.""" - assert np.allclose(run_11um_test["cmin"], ref_confidence.confidence.values) + assert np.allclose(run_11um_test["cmin"], reference.confidence_11um.values) -def test_surface_temperature_test(data, thresholds, ref_confidence): +# WARNING: THIS TEST IS NOT RUNNING BECAUSE THE FUNCTION BEING TESTED IS NOT IMPLEMENTED +class NoTestSurfaceTemperatureTest: """Test surface_temperature_test function.""" - cmin = np.ones(data.latitude.shape) - for scene_name in ["Land_Night", "Polar_Night_Land"]: - SceneType = tst.CloudTests(data=data, scene_name=scene_name, thresholds=thresholds) + @pytest.fixture(scope="class") + def run_surface_temperature_test(self, test_data, thresholds): + """Run the surface_temperature_test function.""" + cmin = np.ones(test_data.latitude.shape) + bits = { + "qa": np.zeros(test_data.latitude.shape), + "test": np.zeros(test_data.latitude.shape), + } + scene_name = test_data.scene_name + if scene_name not in ["Land_Night", "Polar_Night_Land"]: + assert True - cmin, bit = SceneType.surface_temperature_test("M15", data, cmin) + scene_type = tst.CloudTests(data=test_data, scene_name=scene_name, thresholds=thresholds) + + cmin, bits = scene_type.test_surface_temperature("M15", cmin, bits) + return {"cmin": cmin, "bits": bits} + + def test_qa_bit(self, run_surface_temperature_test, reference): + """Test qa bit value.""" + assert np.allclose(run_surface_temperature_test["bits"]["qa"], reference.qa_bit.values) + + def test_test_bit(self, run_surface_temperature_test, reference): + """Test test bit value.""" + assert np.allclose(run_surface_temperature_test["bits"]["test"], reference.test_bit.values) - assert np.allclose(cmin, ref_confidence.surface_temperature_confidence.values) + def test_confidence(self, run_surface_temperature_test, reference): + """Test confidence value.""" + assert np.allclose(run_surface_temperature_test["cmin"], reference.confidence.values) -def test_sst_test(data, thresholds, ref_confidence): +class TestSeaSurfTemperatureTest: """Test sst_test function.""" - cmin = np.ones(data.latitude.shape) - for scene_name in [ - "Ocean_Day", - "Ocean_Night", - "Polar_Day_Ocean", - "Polar_Night_Ocean", - ]: - SceneType = tst.CloudTests(data=data, scene_name=scene_name, thresholds=thresholds) - - cmin, bit = SceneType.sst_test("M15", "M16", cmin) - - assert np.allclose(cmin, ref_confidence.sst_confidence.values) - - -def test_bt_diff_86_11um(data, thresholds, ref_confidence): - """Tet bt_diff_86_11um function.""" - cmin = np.ones(data.latitude.shape) - for scene_name in [ - "Ocean_Day", - "Ocean_Night", - "Polar_Day_Ocean", - "Polar_Night_Ocean", - ]: - SceneType = tst.CloudTests(data=data, scene_name=scene_name, thresholds=thresholds) - - cmin, bit = SceneType.bt_diff_86_11um("M14-M15", cmin) - - assert np.allclose(cmin, ref_confidence.diff86_11um_confidence.values) - - -def test_11_12um_diff(data, thresholds, ref_confidence): - """Test 11_12um_diff function.""" - cmin = np.ones(data.latitude.shape) - for scene_name in [ - "Land_Day", - "Land_Day_Coast", - "Land_Day_Desert", - "Land_Day_Desert_Coast", - "Ocean_Day", - "Ocean_Night", - "Polar_Day_Ocean", - "Polar_Night_Ocean", - "Polar_Day_Land", - "Polar_Day_Coast", - "Polar_Day_Desert", - "Polar_Day_Desert_Coast", - "Polar_Day_Snow", - "Land_Night", - "Polar_Night_Land", - "Polar_Night_Snow", - "Day_Snow", - "Night_Snow", - ]: - SceneType = tst.CloudTests(data=data, scene_name=scene_name, thresholds=thresholds) - - cmin, bit = SceneType.test_11_12um_diff("M15-M16", cmin) - - assert np.allclose(cmin, ref_confidence.diff11_12um_confidence.values) + + @pytest.fixture(scope="class") + def run_sst_test(self, test_data, thresholds): + """Run the sst_test function.""" + cmin = np.ones(test_data.latitude.shape) + bits = { + "qa": np.zeros(test_data.latitude.shape), + "test": np.zeros(test_data.latitude.shape), + } + scene_name = test_data.scene_name + if scene_name not in ["Ocean_Day", "Ocean_Night", "Polar_Day_Ocean", "Polar_Night_Ocean"]: + assert True + + scene_type = tst.CloudTests(data=test_data, scene_name=scene_name, thresholds=thresholds) + + cmin, bits = scene_type.sst_test("M15", "M16", cmin, bits) + return {"cmin": cmin, "bits": bits} + + def test_qa_bit(self, run_sst_test, reference): + """Test qa bit value.""" + assert np.allclose(run_sst_test["bits"]["qa"], reference.qa_bit_sst.values) + + def test_test_bit(self, run_sst_test, reference): + """Test test bit value.""" + assert np.allclose(run_sst_test["bits"]["test"], reference.test_bit_sst.values) + + def test_confidence(self, run_sst_test, reference): + """Test confidence value.""" + assert np.allclose(run_sst_test["cmin"], reference.confidence_sst.values) + + +class Test86Minus11umBTTest: + """Test bt_diff_86_11um function.""" + + @pytest.fixture(scope="class") + def run_86_11um_diff_test(self, test_data, thresholds): + """Run the bt_diff_86_11um function.""" + cmin = np.ones(test_data.latitude.shape) + bits = { + "qa": np.zeros(test_data.latitude.shape), + "test": np.zeros(test_data.latitude.shape), + } + scene_name = test_data.scene_name + if scene_name not in ["Ocean_Day", "Ocean_Night", "Polar_Day_Ocean", "Polar_Night_Ocean"]: + assert True + + scene_type = tst.CloudTests(data=test_data, scene_name=scene_name, thresholds=thresholds) + + cmin, bits = scene_type.bt_diff_86_11um("M14-M15", cmin, bits) + return {"cmin": cmin, "bits": bits} + + def test_qa_bit(self, run_86_11um_diff_test, reference): + """Test qa bit value.""" + assert np.allclose( + run_86_11um_diff_test["bits"]["qa"], reference.qa_bit_86_11um_diff.values + ) + + def test_test_bit(self, run_86_11um_diff_test, reference): + """Test test bit value.""" + assert np.allclose( + run_86_11um_diff_test["bits"]["test"], reference.test_bit_86_11um_diff.values + ) + + def test_confidence(self, run_86_11um_diff_test, reference): + """Test confidence value.""" + assert np.allclose(run_86_11um_diff_test["cmin"], reference.confidence_86_11um_diff.values) + + +class Test11Minus12umBTTest: + """Test bt_diff_11_12um function.""" + + @pytest.fixture(scope="class") + def run_11_12um_diff_test(self, test_data, thresholds): + """Run the bt_diff_11_12um function.""" + cmin = np.ones(test_data.latitude.shape) + bits = { + "qa": np.zeros(test_data.latitude.shape), + "test": np.zeros(test_data.latitude.shape), + } + scene_name = test_data.scene_name + if scene_name not in [ + "Land_Day", + "Land_Day_Coast", + "Land_Day_Desert", + "Land_Day_Desert_Coast", + "Ocean_Day", + "Ocean_Night", + "Polar_Day_Ocean", + "Polar_Night_Ocean", + "Polar_Day_Land", + "Polar_Day_Coast", + "Polar_Day_Desert", + "Polar_Day_Desert_Coast", + "Polar_Day_Snow", + "Land_Night", + "Polar_Night_Land", + "Polar_Night_Snow", + "Day_Snow", + "Night_Snow", + ]: + assert True + + scene_type = tst.CloudTests(data=test_data, scene_name=scene_name, thresholds=thresholds) + + cmin, bits = scene_type.test_11_12um_diff("M15-M16", cmin, bits) + return {"cmin": cmin, "bits": bits} + + def test_qa_bit(self, run_11_12um_diff_test, reference): + """Test qa bit value.""" + assert np.allclose( + run_11_12um_diff_test["bits"]["qa"], reference.qa_bit_11_12um_diff.values + ) + + def test_test_bit(self, run_11_12um_diff_test, reference): + """Test test bit value.""" + assert np.allclose( + run_11_12um_diff_test["bits"]["test"], reference.test_bit_11_12um_diff.values + ) + + def test_confidence(self, run_11_12um_diff_test, reference): + """Test confidence value.""" + assert np.allclose(run_11_12um_diff_test["cmin"], reference.confidence_11_12um_diff.values) def test_bt_difference_11_4um_test_ocean(): @@ -206,139 +292,389 @@ def test_bt_difference_11_4um_test_land(): pass -def test_variability_11um_test(data, thresholds, ref_confidence): +class Test11umVariabilityTest: """Test variability_11um_test function.""" - cmin = np.ones(data.latitude.shape) - for scene_name in ["Polar_Day_Ocean", "Polar_Night_Ocean"]: - SceneType = tst.CloudTests(data=data, scene_name=scene_name, thresholds=thresholds) - cmin, bit = SceneType.variability_11um_test("M15", cmin) + @pytest.fixture(scope="class") + def run_variability_11um_test(self, test_data, thresholds): + """Run the variability_11um_test function.""" + cmin = np.ones(test_data.latitude.shape) + bits = { + "qa": np.zeros(test_data.latitude.shape), + "test": np.zeros(test_data.latitude.shape), + } + scene_name = test_data.scene_name + if scene_name not in ["Polar_Day_Ocean", "Polar_Night_Ocean"]: + assert True - assert np.allclose(cmin, ref_confidence.var11um_confidence.values) + scene_type = tst.CloudTests(data=test_data, scene_name=scene_name, thresholds=thresholds) + cmin, bits = scene_type.variability_11um_test("M15", cmin, bits) + return {"cmin": cmin, "bits": bits} -def test_oceanic_stratus_11_4um_test(data, thresholds, ref_confidence): - """Test oceanic_stratus_11_4um_test function.""" - cmin = np.ones(data.latitude.shape) - for scene_name in [ - "Land_Day", - "Land_Day_Coast", - "Land_Day_Desert", - "Land_Day_Desert_Coast", - "Ocean_Day", - "Ocean_Night", - "Polar_Day_Land", - "Polar_Day_Coast", - "Polar_Day_Desert", - "Polar_Day_Desert_Coast", - "Polar_Day_Ocean", - "Polar_Night_Ocean", - ]: - SceneType = tst.CloudTests(data=data, scene_name=scene_name, thresholds=thresholds) + def test_qa_bit(self, run_variability_11um_test, reference): + """Test qa bit value.""" + assert np.allclose( + run_variability_11um_test["bits"]["qa"], reference.qa_bit_variability_11um.values + ) - cmin, bit = SceneType.oceanic_stratus_11_4um_test("M15-M12", cmin) + def test_test_bit(self, run_variability_11um_test, reference): + """Test test bit value.""" + assert np.allclose( + run_variability_11um_test["bits"]["test"], reference.test_bit_variability_11um.values + ) + + def test_confidence(self, run_variability_11um_test, reference): + """Test confidence value.""" + assert np.allclose( + run_variability_11um_test["cmin"], reference.confidence_variability_11um.values + ) - assert np.allclose(cmin, ref_confidence.oceanic_stratus_11_4um_confidence.values) +class TestOceanicStratus11Minus4umTest: + """Test bt_diff_11_4um function.""" -def test_nir_reflectance_test(data, thresholds, ref_confidence): + @pytest.fixture(scope="class") + def run_oceanic_stratus_11_4um_test(self, test_data, thresholds): + """Run the bt_diff_11_4um function.""" + cmin = np.ones(test_data.latitude.shape) + bits = { + "qa": np.zeros(test_data.latitude.shape), + "test": np.zeros(test_data.latitude.shape), + } + scene_name = test_data.scene_name + if scene_name not in [ + "Land_Day", + "Land_Day_Coast", + "Land_Day_Desert", + "Land_Day_Desert_Coast", + "Ocean_Day", + "Ocean_Night", + "Polar_Day_Land", + "Polar_Day_Coast", + "Polar_Day_Desert", + "Polar_Day_Desert_Coast", + "Polar_Day_Ocean", + "Polar_Night_Ocean", + ]: + assert True + + scene_type = tst.CloudTests(data=test_data, scene_name=scene_name, thresholds=thresholds) + + cmin, bits = scene_type.oceanic_stratus_11_4um_test("M15-M12", cmin, bits) + return {"cmin": cmin, "bits": bits} + + def test_qa_bit(self, run_oceanic_stratus_11_4um_test, reference): + """Test qa bit value.""" + assert np.allclose( + run_oceanic_stratus_11_4um_test["bits"]["qa"], + reference.qa_bit_oceanic_stratus_11_4um.values, + ) + + def test_test_bit(self, run_oceanic_stratus_11_4um_test, reference): + """Test test bit value.""" + assert np.allclose( + run_oceanic_stratus_11_4um_test["bits"]["test"], + reference.test_bit_oceanic_stratus_11_4um.values, + ) + + def test_confidence(self, run_oceanic_stratus_11_4um_test, reference): + """Test confidence value.""" + assert np.allclose( + run_oceanic_stratus_11_4um_test["cmin"], + reference.confidence_oceanic_stratus_11_4um.values, + ) + + +class TestNIRReflectanceTest: """Test nir_reflectance_test function.""" - cmin = np.ones(data.latitude.shape) - for scene_name in ["Ocean_Day", "Polar_Day_Ocean"]: - SceneType = tst.CloudTests(data=data, scene_name=scene_name, thresholds=thresholds) - cmin, bit = SceneType.nir_reflectance_test("M07", cmin) + @pytest.fixture(scope="class") + def run_nir_reflectance_test(self, test_data, thresholds): + """Run the nir_reflectance_test function.""" + cmin = np.ones(test_data.latitude.shape) + bits = { + "qa": np.zeros(test_data.latitude.shape), + "test": np.zeros(test_data.latitude.shape), + } + scene_name = test_data.scene_name + if scene_name not in ["Ocean_Day", "Polar_Day_Ocean"]: + assert True + + scene_type = tst.CloudTests(data=test_data, scene_name=scene_name, thresholds=thresholds) + + cmin, bits = scene_type.nir_reflectance_test("M07", cmin, bits) + return {"cmin": cmin, "bits": bits} - assert np.allclose(cmin, ref_confidence.NIR_reflectance_confidence.values) + def test_qa_bit(self, run_nir_reflectance_test, reference): + """Test qa bit value.""" + assert np.allclose( + run_nir_reflectance_test["bits"]["qa"], reference.qa_bit_nir_reflectance.values + ) + def test_test_bit(self, run_nir_reflectance_test, reference): + """Test test bit value.""" + assert np.allclose( + run_nir_reflectance_test["bits"]["test"], reference.test_bit_nir_reflectance.values + ) -def test_vis_nir_ratio_test(data, thresholds, ref_confidence): + def test_confidence(self, run_nir_reflectance_test, reference): + """Test confidence value.""" + assert np.allclose( + run_nir_reflectance_test["cmin"], reference.confidence_nir_reflectance.values + ) + + +class TestVisNirRatioTest: """Test vis_nir_ratio_test function.""" - cmin = np.ones(data.latitude.shape) - for scene_name in ["Ocean_Day", "Polar_Day_Ocean"]: - SceneType = tst.CloudTests(data=data, scene_name=scene_name, thresholds=thresholds) - cmin, bit = SceneType.vis_nir_ratio_test("M07-M05ratio", cmin) + @pytest.fixture(scope="class") + def run_vis_nir_ratio_test(self, test_data, thresholds): + """Run the vis_nir_ratio_test function.""" + cmin = np.ones(test_data.latitude.shape) + bits = { + "qa": np.zeros(test_data.latitude.shape), + "test": np.zeros(test_data.latitude.shape), + } + scene_name = test_data.scene_name + if scene_name not in ["Ocean_Day", "Polar_Day_Ocean"]: + assert True + + scene_type = tst.CloudTests(data=test_data, scene_name=scene_name, thresholds=thresholds) - assert np.allclose(cmin, ref_confidence.Vis_NIR_ratio_confidence.values) + cmin, bits = scene_type.vis_nir_ratio_test("M07-M05ratio", cmin, bits) + return {"cmin": cmin, "bits": bits} + def test_qa_bit(self, run_vis_nir_ratio_test, reference): + """Test qa bit value.""" + assert np.allclose( + run_vis_nir_ratio_test["bits"]["qa"], reference.qa_bit_vis_nir_ratio.values + ) -def test_16_21um_reflectance_test(data, thresholds, ref_confidence): + def test_test_bit(self, run_vis_nir_ratio_test, reference): + """Test test bit value.""" + assert np.allclose( + run_vis_nir_ratio_test["bits"]["test"], reference.test_bit_vis_nir_ratio.values + ) + + def test_confidence(self, run_vis_nir_ratio_test, reference): + """Test confidence value.""" + assert np.allclose( + run_vis_nir_ratio_test["cmin"], reference.confidence_vis_nir_ratio.values + ) + + +class Test16Minus21umReflectanceTest: """Test 16_21um_reflectance_test function.""" - cmin = np.ones(data.latitude.shape) - for scene_name in ["Ocean_Day", "Polar_Day_Ocean"]: - SceneType = tst.CloudTests(data=data, scene_name=scene_name, thresholds=thresholds) - cmin, bit = SceneType.test_16_21um_reflectance("M10", cmin) + @pytest.fixture(scope="class") + def run_16_21um_reflectance_test(self, test_data, thresholds): + """Run the 16_21um_reflectance_test function.""" + cmin = np.ones(test_data.latitude.shape) + bits = { + "qa": np.zeros(test_data.latitude.shape), + "test": np.zeros(test_data.latitude.shape), + } + scene_name = test_data.scene_name + if scene_name not in ["Ocean_Day", "Polar_Day_Ocean"]: + assert True + + scene_type = tst.CloudTests(data=test_data, scene_name=scene_name, thresholds=thresholds) - assert np.allclose(cmin, ref_confidence.refl_16_21um_confidence.values) + cmin, bits = scene_type.test_16_21um_reflectance("M10", cmin, bits) + return {"cmin": cmin, "bits": bits} + + def test_qa_bit(self, run_16_21um_reflectance_test, reference): + """Test qa bit value.""" + assert np.allclose( + run_16_21um_reflectance_test["bits"]["qa"], reference.qa_bit_16_21um_reflectance.values + ) + + def test_test_bit(self, run_16_21um_reflectance_test, reference): + """Test test bit value.""" + assert np.allclose( + run_16_21um_reflectance_test["bits"]["test"], + reference.test_bit_16_21um_reflectance.values, + ) + + def test_confidence(self, run_16_21um_reflectance_test, reference): + """Test confidence value.""" + assert np.allclose( + run_16_21um_reflectance_test["cmin"], reference.confidence_16_21um_reflectance.values + ) -def test_visible_reflectance_test(data, thresholds, ref_confidence): +class TestVisibleReflectanceTest: """Test visible_reflectance_test function.""" - cmin = np.ones(data.latitude.shape) - for scene_name in [ - "Land_Day", - "Land_Day_Coast", - "Land_Day_Desert", - "Land_Day_Desert_Coast", - "Polar_Day_Land", - "Polar_Day_Coast", - "Polar_Day_Desert", - "Polar_Day_Desert_Coast", - ]: - SceneType = tst.CloudTests(data=data, scene_name=scene_name, thresholds=thresholds) - cmin, bit = SceneType.visible_reflectance_test("M128", cmin) + @pytest.fixture(scope="class") + def run_visible_reflectance_test(self, test_data, thresholds): + """Run the visible_reflectance_test function.""" + cmin = np.ones(test_data.latitude.shape) + bits = { + "qa": np.zeros(test_data.latitude.shape), + "test": np.zeros(test_data.latitude.shape), + } + scene_name = test_data.scene_name + if scene_name not in [ + "Land_Day", + "Land_Day_Coast", + "Land_Day_Desert", + "Land_Day_Desert_Coast", + "Polar_Day_Land", + "Polar_Day_Coast", + "Polar_Day_Desert", + "Polar_Day_Desert_Coast", + ]: + assert True - assert np.allclose(cmin, ref_confidence.vis_reflectance_confidence.values) + scene_type = tst.CloudTests(data=test_data, scene_name=scene_name, thresholds=thresholds) + cmin, bits = scene_type.visible_reflectance_test("M128", cmin, bits) + return {"cmin": cmin, "bits": bits} -def test_GEMI_test(data, thresholds, ref_confidence): - """Test GEMI_test function.""" - cmin = np.ones(data.latitude.shape) - for scene_name in ["Land_Day_Desert", "Polar_Day_Desert"]: - SceneType = tst.CloudTests(data=data, scene_name=scene_name, thresholds=thresholds) + def test_qa_bit(self, run_visible_reflectance_test, reference): + """Test qa bit value.""" + assert np.allclose( + run_visible_reflectance_test["bits"]["qa"], reference.qa_bit_vis_refl.values + ) - cmin, bit = SceneType.gemi_test("GEMI", cmin) + def test_test_bit(self, run_visible_reflectance_test, reference): + """Test test bit value.""" + assert np.allclose( + run_visible_reflectance_test["bits"]["test"], reference.test_bit_vis_refl.values + ) + + def test_confidence(self, run_visible_reflectance_test, reference): + """Test confidence value.""" + assert np.allclose( + run_visible_reflectance_test["cmin"], reference.confidence_vis_refl.values + ) - assert np.allclose(cmin, ref_confidence.gemi_confidence.values) +class TestGEMI: + """Test GEMI function.""" -def test_1_38um_high_clouds_test(data, thresholds, ref_confidence): + @pytest.fixture(scope="class") + def run_gemi(self, test_data, thresholds): + """Run the GEMI function.""" + cmin = np.ones(test_data.latitude.shape) + bits = { + "qa": np.zeros(test_data.latitude.shape), + "test": np.zeros(test_data.latitude.shape), + } + scene_name = test_data.scene_name + if scene_name not in ["Land_Day_Desert", "Polar_Day_Desert"]: + assert True + + scene_type = tst.CloudTests(data=test_data, scene_name=scene_name, thresholds=thresholds) + + cmin, bits = scene_type.gemi_test("GEMI", cmin, bits) + return {"cmin": cmin, "bits": bits} + + def test_qa_bit(self, run_gemi, reference): + """Test qa bit value.""" + assert np.allclose(run_gemi["bits"]["qa"], reference.qa_bit_gemi.values) + + def test_test_bit(self, run_gemi, reference): + """Test test bit value.""" + assert np.allclose(run_gemi["bits"]["test"], reference.test_bit_gemi.values) + + def test_confidence(self, run_gemi, reference): + """Test confidence value.""" + assert np.allclose(run_gemi["cmin"], reference.confidence_gemi.values) + + +class Test138umHighCloudsTest: """Test 1_38um_high_clouds_test function.""" - cmin = np.ones(data.latitude.shape) - for scene_name in [ - "Land_Day", - "Land_Day_Coast", - "Land_Day_Desert", - "Land_Day_Desert_Coast", - "Polar_Day_Land", - "Polar_Day_Coast", - "Polar_Day_Desert", - "Polar_Day_Desert_Coast", - "Day_Snow", - "Ocean_Day", - "Polar_Day_Ocean", - ]: - SceneType = tst.CloudTests(data=data, scene_name=scene_name, thresholds=thresholds) - - cmin, bit = SceneType.test_1_38um_high_clouds("M09", cmin) - - assert np.allclose(cmin, ref_confidence.hi_clouds_confidence.values) - - -def test_4_12um_thin_cirrus_btd(data, thresholds, ref_confidence): - """Test 4_12um_thin_cirrus_btd function.""" - cmin = np.ones(data.latitude.shape) - for scene_name in [ - "Land_Night", - "Polar_Night_Land", - "Polar_Night_Snow", - "Night_Snow", - ]: - SceneType = tst.CloudTests(data=data, scene_name=scene_name, thresholds=thresholds) - - cmin, bit = SceneType.thin_cirrus_4_12um_BTD_test("M13-M16", cmin) - - assert np.allclose(cmin, ref_confidence.thin_cirrus_confidence.values) + + @pytest.fixture(scope="class") + def run_138um_high_clouds_test(self, test_data, thresholds): + """Run the 1_38um_high_clouds_test function.""" + cmin = np.ones(test_data.latitude.shape) + bits = { + "qa": np.zeros(test_data.latitude.shape), + "test": np.zeros(test_data.latitude.shape), + } + scene_name = test_data.scene_name + if scene_name not in [ + "Land_Day", + "Land_Day_Coast", + "Land_Day_Desert", + "Land_Day_Desert_Coast", + "Polar_Day_Land", + "Polar_Day_Coast", + "Polar_Day_Desert", + "Polar_Day_Desert_Coast", + "Day_Snow", + "Ocean_Day", + "Polar_Day_Ocean", + ]: + assert True + + scene_type = tst.CloudTests(data=test_data, scene_name=scene_name, thresholds=thresholds) + + cmin, bits = scene_type.test_1_38um_high_clouds("M09", cmin, bits) + return {"cmin": cmin, "bits": bits} + + def test_qa_bit(self, run_138um_high_clouds_test, reference): + """Test qa bit value.""" + assert np.allclose( + run_138um_high_clouds_test["bits"]["qa"], reference.qa_bit_high_clouds.values + ) + + def test_test_bit(self, run_138um_high_clouds_test, reference): + """Test test bit value.""" + assert np.allclose( + run_138um_high_clouds_test["bits"]["test"], reference.test_bit_high_clouds.values + ) + + def test_confidence(self, run_138um_high_clouds_test, reference): + """Test confidence value.""" + assert np.allclose( + run_138um_high_clouds_test["cmin"], reference.confidence_high_clouds.values + ) + + +class TestThinCirrusTest: + """Test thin_cirrus_4_12um_BTD_test function.""" + + @pytest.fixture(scope="class") + def run_4_12um_thin_cirrus_btd(self, test_data, thresholds): + """Run the thin_cirrus_4_12um_BTD_test function.""" + cmin = np.ones(test_data.latitude.shape) + bits = { + "qa": np.zeros(test_data.latitude.shape), + "test": np.zeros(test_data.latitude.shape), + } + scene_name = test_data.scene_name + if scene_name not in [ + "Land_Night", + "Polar_Night_Land", + "Polar_Night_Snow", + "Night_Snow", + ]: + assert True + + scene_type = tst.CloudTests(data=test_data, scene_name=scene_name, thresholds=thresholds) + + cmin, bits = scene_type.thin_cirrus_4_12um_BTD_test("M13-M16", cmin, bits) + return {"cmin": cmin, "bits": bits} + + def test_qa_bit(self, run_4_12um_thin_cirrus_btd, reference): + """Test qa bit value.""" + assert np.allclose( + run_4_12um_thin_cirrus_btd["bits"]["qa"], reference.qa_bit_thin_cirrus.values + ) + + def test_test_bit(self, run_4_12um_thin_cirrus_btd, reference): + """Test test bit value.""" + assert np.allclose( + run_4_12um_thin_cirrus_btd["bits"]["test"], reference.test_bit_thin_cirrus.values + ) + + def test_confidence(self, run_4_12um_thin_cirrus_btd, reference): + """Test confidence value.""" + assert np.allclose( + run_4_12um_thin_cirrus_btd["cmin"], reference.confidence_thin_cirrus.values + )