1
1
from __future__ import print_function
2
+
2
3
import inspect
3
4
4
5
import rubin_sim .maf .metrics as metrics
@@ -211,12 +212,8 @@ def extended_metrics(colname, replace_colname=None):
211
212
extendedMetrics = standard_metrics (colname , replace_colname = None )
212
213
extendedMetrics += [
213
214
metrics .RmsMetric (colname ),
214
- metrics .NoutliersNsigmaMetric (
215
- colname , metric_name = "N(+3Sigma) " + colname , n_sigma = 3
216
- ),
217
- metrics .NoutliersNsigmaMetric (
218
- colname , metric_name = "N(-3Sigma) " + colname , n_sigma = - 3
219
- ),
215
+ metrics .NoutliersNsigmaMetric (colname , metric_name = "N(+3Sigma) " + colname , n_sigma = 3 ),
216
+ metrics .NoutliersNsigmaMetric (colname , metric_name = "N(-3Sigma) " + colname , n_sigma = - 3 ),
220
217
metrics .PercentileMetric (colname , percentile = 25 ),
221
218
metrics .PercentileMetric (colname , percentile = 75 ),
222
219
metrics .CountMetric (colname ),
@@ -282,12 +279,8 @@ def summary_completeness_at_time(times, h_val, h_index=0.33):
282
279
List of moving object MoCompletenessAtTime metrics (cumulative and differential)
283
280
"""
284
281
summaryMetrics = [
285
- metrics .MoCompletenessAtTimeMetric (
286
- times = times , hval = h_val , hindex = h_index , cumulative = False
287
- ),
288
- metrics .MoCompletenessAtTimeMetric (
289
- times = times , hval = h_val , hindex = h_index , cumulative = True
290
- ),
282
+ metrics .MoCompletenessAtTimeMetric (times = times , hval = h_val , hindex = h_index , cumulative = False ),
283
+ metrics .MoCompletenessAtTimeMetric (times = times , hval = h_val , hindex = h_index , cumulative = True ),
291
284
]
292
285
return summaryMetrics
293
286
@@ -308,12 +301,8 @@ def summary_completeness_over_h(requiredChances=1, Hindex=0.33):
308
301
List of moving object MoCompleteness metrics (cumulative and differential)
309
302
"""
310
303
summaryMetrics = [
311
- metrics .MoCompletenessMetric (
312
- threshold = requiredChances , cumulative = False , hindex = Hindex
313
- ),
314
- metrics .MoCompletenessMetric (
315
- threshold = requiredChances , cumulative = True , hindex = Hindex
316
- ),
304
+ metrics .MoCompletenessMetric (threshold = requiredChances , cumulative = False , hindex = Hindex ),
305
+ metrics .MoCompletenessMetric (threshold = requiredChances , cumulative = True , hindex = Hindex ),
317
306
]
318
307
return summaryMetrics
319
308
@@ -357,12 +346,8 @@ def microlensing_summary(metric_type, npts_required=10, Fisher_sigmatE_tE_cutoff
357
346
),
358
347
metrics .CountMetric (metric_name = "Total lightcurves in footprint" ),
359
348
metrics .CountMetric (metric_name = "Total lightcurves on sky" , mask_val = 0 ),
360
- metrics .MeanMetric (
361
- metric_name = "Mean number of points per lightcurves in footprint"
362
- ),
363
- metrics .MeanMetric (
364
- mask_val = 0 , metric_name = "Mean number of points per lightcurves in total"
365
- ),
349
+ metrics .MeanMetric (metric_name = "Mean number of points per lightcurves in footprint" ),
350
+ metrics .MeanMetric (mask_val = 0 , metric_name = "Mean number of points per lightcurves in total" ),
366
351
]
367
352
elif metric_type == "Fisher" :
368
353
microlensingSummary = [
@@ -373,8 +358,6 @@ def microlensing_summary(metric_type, npts_required=10, Fisher_sigmatE_tE_cutoff
373
358
metrics .CountMetric (metric_name = "Total lightcurves in footprint" ),
374
359
metrics .CountMetric (metric_name = "Total lightcurves on sky" , mask_val = 0 ),
375
360
metrics .RealMeanMetric (metric_name = "Mean sigma_tE/tE in footprint (mean)" ),
376
- metrics .RealMeanMetric (
377
- mask_val = 0 , metric_name = "Mean sigma_tE/tE of total (mean)"
378
- ),
361
+ metrics .RealMeanMetric (mask_val = 0 , metric_name = "Mean sigma_tE/tE of total (mean)" ),
379
362
]
380
363
return microlensingSummary
0 commit comments