From 1f0b6ba5efd1b791022d64ac450c943cac932131 Mon Sep 17 00:00:00 2001 From: Abyss Halley Date: Fri, 22 Aug 2025 13:16:34 -0400 Subject: [PATCH] added directory creation --- singlepulse.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/singlepulse.py b/singlepulse.py index 9ff9b5f..2c90002 100644 --- a/singlepulse.py +++ b/singlepulse.py @@ -327,6 +327,8 @@ def compute_snr_from_h5(h5_file, detrend_ft=True, mad_filter=True, save=False, s #%% for pulsar_dir in pulsar_dir_list: save_path = os.path.join(pulsar_dir, "calib-pngs", "") + if not os.path.exists(save_path): + os.makedirs(save_path) h5_dir = os.path.join(pulsar_dir,"cands","") print(h5_dir) h5_files = sorted(glob.glob(f"{h5_dir}*.h5"))