@@ -486,18 +486,19 @@ class Noise(_Preprocess):
486
486
Can run data selection of a "max_noise" value.
487
487
488
488
When ``fit: True``, the parameter ``wn_est`` can be a float or the name of an
489
- axis manager containing an array named ``white_noise``. If not specified and
490
- white noise is fixed, the white noise is calculated with ``calc_wn()`` and used
491
- for ``wn_est``. The calculated white noise is not stored.
489
+ axis manager containing an array named ``white_noise``. If not specified
490
+ the white noise is calculated with ``calc_wn()`` and used
491
+ for ``wn_est``. The calculated white noise will be stored in the noise fit
492
+ axis manager.
492
493
493
- Example config block::
494
+ Example config block for fitting PSD ::
494
495
495
- - name: "noise
496
+ - name: "noise"
496
497
fit: False
497
498
subscan: False
498
499
calc:
499
- wn_f_low: 5
500
- wn_f_high: 10
500
+ fwhite: (5, 10)
501
+ lowf: 1
501
502
f_max: 25
502
503
mask: True
503
504
wn_est: noise
@@ -507,6 +508,19 @@ class Noise(_Preprocess):
507
508
select:
508
509
max_noise: 2000
509
510
511
+ Example config block for calculating white noise only::
512
+
513
+ - name: "noise"
514
+ fit: False
515
+ subscan: False
516
+ calc:
517
+ low_f: 5
518
+ high_f: 20
519
+ save: True
520
+ select:
521
+ min_noise: 18e-6
522
+ max_noise: 80e-6
523
+
510
524
If ``fit: True`` this operation will run
511
525
:func:`sotodlib.tod_ops.fft_ops.fit_noise_model`, else it will run
512
526
:func:`sotodlib.tod_ops.fft_ops.calc_wn`.
@@ -542,15 +556,14 @@ def calc_and_save(self, aman, proc_aman):
542
556
else :
543
557
calc_wn = True
544
558
if calc_wn or wn_est is None :
545
- wn_f_low = self .calc_cfgs .get ("wn_f_low" , 5 )
546
- wn_f_high = self .calc_cfgs .get ("wn_f_high" , 10 )
559
+ wn_f_low , wn_f_high = self .calc_cfgs .get ('fwhite' , (5 , 10 ))
547
560
self .calc_cfgs ['wn_est' ] = tod_ops .fft_ops .calc_wn (aman , pxx = pxx ,
548
561
freqs = psd .freqs ,
549
562
low_f = wn_f_low ,
550
563
high_f = wn_f_high )
551
-
552
564
if self .calc_cfgs .get ('subscan' ) is None :
553
565
self .calc_cfgs ['subscan' ] = self .subscan
566
+ self .calc_cfgs .pop ('fwhite' , None )
554
567
calc_aman = tod_ops .fft_ops .fit_noise_model (aman , pxx = pxx ,
555
568
f = psd .freqs ,
556
569
merge_fit = True ,
@@ -561,8 +574,8 @@ def calc_and_save(self, aman, proc_aman):
561
574
else :
562
575
calc_aman .wrap ("white_noise" , self .calc_cfgs ['wn_est' ], [(0 ,"dets" ), (1 ,"subscans" )])
563
576
else :
564
- wn_f_low = self .calc_cfgs .get ("wn_f_low " , 5 )
565
- wn_f_high = self .calc_cfgs .get ("wn_f_high " , 10 )
577
+ wn_f_low = self .calc_cfgs .get ("low_f " , 5 )
578
+ wn_f_high = self .calc_cfgs .get ("high_f " , 10 )
566
579
wn = tod_ops .fft_ops .calc_wn (aman , pxx = pxx ,
567
580
freqs = psd .freqs ,
568
581
low_f = wn_f_low ,
0 commit comments