From d09045a559108e030a8a95cb672219cba36e0146 Mon Sep 17 00:00:00 2001 From: Liam Gray Date: Wed, 3 Jul 2024 11:59:45 -0700 Subject: [PATCH] feat(quarterstack): use maxpost dps estimator and make high-pass filter dps --- ch_pipeline/processing/quarterstack.py | 62 ++++++++++++++++++++------ 1 file changed, 48 insertions(+), 14 deletions(-) diff --git a/ch_pipeline/processing/quarterstack.py b/ch_pipeline/processing/quarterstack.py index 0b6cc877..441531b3 100644 --- a/ch_pipeline/processing/quarterstack.py +++ b/ch_pipeline/processing/quarterstack.py @@ -167,9 +167,15 @@ params: tag: {tag} + # Apply a gradient rebin correction + - type: draco.analysis.sidereal.RebinGradientCorrection + requires: sstack + in: sstack + out: sstack_grad_fix + # Precision truncate the sidereal stack data - type: draco.core.io.Truncate - in: sstack + in: sstack_grad_fix out: sstack_trunc params: dataset: @@ -190,20 +196,16 @@ params: output_name: "sstack.zarr.zip" - # Block until the stack file is written out + # Block until the stack file is written out. Otherwise, + # masking steps can end up getting applied before saving. - type: draco.core.misc.WaitUntil requires: sstack_zip_handle - in: sstack + in: sstack_grad_fix out: sstack2 - # Apply a gradient rebin correction - - type: draco.analysis.sidereal.RebinGradientFix - in: sstack2 - out: sstack_fix - - type: draco.analysis.ringmapmaker.RingMapMaker requires: manager - in: sstack_fix + in: sstack2 out: ringmap params: single_beam: true @@ -239,7 +241,7 @@ # Mask out the bright sources so we can see the high delay structure more easily - type: ch_pipeline.analysis.flagging.MaskSource - in: sstack_fix + in: sstack2 out: sstack_flag_src params: source: ["CAS_A", "CYG_A", "TAU_A", "VIR_A"] @@ -259,17 +261,49 @@ in: [sstack_flag_src, factmask] out: sstack_factmask - # Estimate the delay spectrum - - type: draco.analysis.delay.DelaySpectrumEstimator + # Estimate the delay power spectrum + - type: draco.analysis.delay.DelayPowerSpectrumStokesIEstimator requires: manager in: sstack_factmask params: + freq_frac: 0.01 + time_frac: 0.01 + remove_mean: true freq_zero: 800.0 + nfreq: {nfreq_delay} + nsamp: 100 + maxpost: true + maxpost_tol: 1.0e-4 complex_timedomain: true + save: true + output_name: "delayspectrum.h5" + + # Apply delay filter to stream + - type: draco.analysis.delay.DelayFilter + requires: manager + in: sstack_factmask + out: sstack_dfilter + params: + delay_cut: 0.1 + za_cut: 1.0 + window: true + + # Estimate the high-pass filtered delay power spectrum + - type: draco.analysis.delay.DelayPowerSpectrumStokesIEstimator + requires: manager + in: sstack_dfilter + params: + freq_frac: 0.01 + time_frac: 0.01 + remove_mean: true + freq_zero: 800.0 nfreq: {nfreq_delay} - nsamp: 40 + nsamp: 100 + maxpost: true + maxpost_tol: 1.0e-4 + complex_timedomain: true save: true - output_name: "dspec.h5" + output_name: "delayspectrum.h5" # Wait for the Zipping to finish - type: draco.core.io.WaitZarrZip