@@ -89,24 +89,23 @@ def simulate_data(job, otherargs, runargs, data):
89
89
def reduce_data (job , otherargs , runargs , data ):
90
90
log = toast .utils .Logger .get ()
91
91
92
- wrk .simple_jumpcorrect (job , otherargs , runargs , data )
93
- wrk .simple_deglitch (job , otherargs , runargs , data )
92
+ wrk .preprocess (job , otherargs , runargs , data )
94
93
95
- wrk .flag_diff_noise_outliers (job , otherargs , runargs , data )
96
- wrk .flag_noise_outliers (job , otherargs , runargs , data )
97
- wrk .deconvolve_detector_timeconstant (job , otherargs , runargs , data )
98
94
wrk .raw_statistics (job , otherargs , runargs , data )
99
95
100
- wrk .filter_hwpss (job , otherargs , runargs , data )
101
- wrk .filter_common_mode (job , otherargs , runargs , data )
96
+ wrk .diff_noise_estimation (job , otherargs , runargs , data )
97
+ wrk .noise_estimation (job , otherargs , runargs , data )
98
+
99
+ data = wrk .demodulate (job , otherargs , runargs , data )
100
+
102
101
wrk .filter_ground (job , otherargs , runargs , data )
102
+ wrk .filter_common_mode (job , otherargs , runargs , data )
103
103
wrk .filter_poly1d (job , otherargs , runargs , data )
104
104
wrk .filter_poly2d (job , otherargs , runargs , data )
105
+
105
106
wrk .diff_noise_estimation (job , otherargs , runargs , data )
106
107
wrk .noise_estimation (job , otherargs , runargs , data )
107
108
108
- data = wrk .demodulate (job , otherargs , runargs , data )
109
-
110
109
wrk .processing_mask (job , otherargs , runargs , data )
111
110
wrk .flag_sso (job , otherargs , runargs , data )
112
111
wrk .hn_map (job , otherargs , runargs , data )
@@ -193,6 +192,19 @@ def main():
193
192
action = "store_true" ,
194
193
help = "Zero out detector data loaded from disk" ,
195
194
)
195
+ parser .add_argument (
196
+ "--preprocess_copy" ,
197
+ required = False ,
198
+ default = False ,
199
+ action = "store_true" ,
200
+ help = "Perform preprocessing on a copy of the data." ,
201
+ )
202
+ parser .add_argument (
203
+ "--log_config" ,
204
+ required = False ,
205
+ default = None ,
206
+ help = "Dump out config log to this yaml file" ,
207
+ )
196
208
197
209
# The operators and templates we want to configure from the command line
198
210
# or a parameter file.
@@ -201,6 +213,7 @@ def main():
201
213
templates = list ()
202
214
203
215
wrk .setup_load_or_simulate_observing (parser , operators )
216
+ wrk .setup_preprocess (parser , operators )
204
217
205
218
wrk .setup_simulate_atmosphere_signal (operators )
206
219
wrk .setup_simulate_sky_map_signal (operators )
@@ -220,15 +233,8 @@ def main():
220
233
wrk .setup_simulate_readout_effects (operators )
221
234
wrk .setup_save_data_hdf5 (operators )
222
235
223
- wrk .setup_simple_jumpcorrect (operators )
224
- wrk .setup_simple_deglitch (operators )
225
-
226
- wrk .setup_flag_diff_noise_outliers (operators )
227
- wrk .setup_flag_noise_outliers (operators )
228
- wrk .setup_deconvolve_detector_timeconstant (operators )
229
236
wrk .setup_raw_statistics (operators )
230
237
231
- wrk .setup_filter_hwpss (operators )
232
238
wrk .setup_filter_common_mode (operators )
233
239
wrk .setup_filter_ground (operators )
234
240
wrk .setup_filter_poly1d (operators )
@@ -260,8 +266,13 @@ def main():
260
266
os .makedirs (otherargs .out_dir , exist_ok = True )
261
267
262
268
# Log the config that was actually used at runtime.
263
- outlog = os .path .join (otherargs .out_dir , "config_log.toml" )
264
- toast .config .dump_toml (outlog , config , comm = comm )
269
+ if otherargs .log_config is not None :
270
+ # User wants to specify the location of the yaml config log
271
+ toast .config .dump_yaml (otherargs .log_config , config , comm = comm )
272
+ else :
273
+ # Log a toml file in the output directory
274
+ outlog = os .path .join (otherargs .out_dir , "config_log.toml" )
275
+ toast .config .dump_toml (outlog , config , comm = comm )
265
276
266
277
# If this is a dry run, exit
267
278
if otherargs .dry_run :
0 commit comments