From fc3ecf7568a6863e9f5aa6e45a2f299bde1919cb Mon Sep 17 00:00:00 2001 From: Josh Dillon Date: Wed, 19 Jun 2024 13:18:57 -0700 Subject: [PATCH] figure out proper time slice based on flags in both polarizations --- notebooks/single_baseline_postprocessing_and_pspec.ipynb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/notebooks/single_baseline_postprocessing_and_pspec.ipynb b/notebooks/single_baseline_postprocessing_and_pspec.ipynb index 1f754c3..867d0f5 100644 --- a/notebooks/single_baseline_postprocessing_and_pspec.ipynb +++ b/notebooks/single_baseline_postprocessing_and_pspec.ipynb @@ -451,9 +451,9 @@ "print(f'Below FM Frequency Slice: {low_band}')\n", "print(f'Above FM Frequency Slice: {high_band}')\n", "\n", - "# figure out the range of unflagged times\n", - "tslice = slice(true_stretches(~np.all(flags[bl], axis=1))[0].start, true_stretches(~np.all(flags[bl], axis=1))[-1].stop)\n", - "\n", + "# figure out the range of unflagged times for both polarizations\n", + "ORed_flags = np.all(flags[ANTPAIR + ('ee',)], axis=1) | np.all(flags[ANTPAIR + ('nn',)], axis=1)\n", + "tslice = slice(true_stretches(~ORed_flags)[0].start, true_stretches(~ORed_flags)[-1].stop)\n", "print(f'Time Slice Excluded Edge Flags: {tslice}')" ] },