@@ -222,10 +222,13 @@ def run(name, config):
222222 details , img_gal = main (args )
223223
224224 table_data = pd .DataFrame (details ).T
225+ uc_rejections = (table_data ["K-S test stat" ] < args .alpha ).sum ()
226+
225227 _hdrs = [
226228 "h0" ,
227229 "K-S test stat" ,
228230 "K-S test p-val" ,
231+ "K-S test p-val cor" ,
229232 "T test stat" ,
230233 "T test p-val" ,
231234 "mean test case" ,
@@ -268,6 +271,7 @@ def run(name, config):
268271 if len (rejects ) < critical
269272 else "statistically different"
270273 ],
274+ "Un-corrected rejections" : [uc_rejections ],
271275 }
272276 ),
273277 )
@@ -327,6 +331,7 @@ def summarize_result(results_page):
327331 summary ["Rejecting" ] = elem .data ["Rejecting" ][0 ]
328332 summary ["Critical value" ] = elem .data ["Critical value" ][0 ]
329333 summary ["Ensembles" ] = elem .data ["Ensembles" ][0 ]
334+ summary ["Uncorrected Rejections" ] = elem .data ["Un-corrected rejections" ][0 ]
330335 break
331336
332337 return {"" : summary }
@@ -397,17 +402,16 @@ def compute_details(annual_avgs, common_vars, args):
397402 # Create a null hypothesis rejection column for un-corrected p-values
398403 detail_df ["h0_uc" ] = detail_df ["K-S test p-val" ] < args .alpha
399404
400- (detail_df ["h0_c" ], detail_df ["pval_c " ]) = smm .fdrcorrection (
401- detail_df ["K-S test p-val" ], alpha = args .alpha , method = "n " , is_sorted = False
405+ (detail_df ["h0_c" ], detail_df ["K-S test p-val cor " ]) = smm .fdrcorrection (
406+ detail_df ["K-S test p-val" ], alpha = args .alpha , method = "p " , is_sorted = False
402407 )
403-
404408 if args .uncorrected :
405409 _testkey = "h0_uc"
406410 else :
407411 _testkey = "h0_c"
408412
409413 for var in common_vars :
410- details [var ]["K-S test p-val" ] = detail_df .loc [var , "pval_c " ]
414+ details [var ]["K-S test p-val cor " ] = detail_df .loc [var , "K-S test p-val cor " ]
411415
412416 if details [var ]["T test stat" ] is None :
413417 details [var ]["h0" ] = "-"
0 commit comments