added debug text
This commit is contained in:
parent
e67ee6a16a
commit
636c73310e
|
@ -26,7 +26,7 @@ import astropy.units as u
|
|||
|
||||
#AH: Modifying this to support multiple directories
|
||||
main_dir = os.path.join("ldata","trunk")
|
||||
pulsar_dir_list = [os.path.join(main_dir, name, "") for name in
|
||||
pulsar_dir_list = [os.path.join(main_dir, name) for name in
|
||||
["data_2025-04-24_07-36-04", "data_2025-04-29_07-50-16", "data_2025-04-30_07-53-07", "data_2025-04-30_08-18-17", "data_2025-05-01_07-47-34"]]
|
||||
#AH: old variable: pulsar_dir
|
||||
pulsar_period = 1.34789947290 * 1000 #period of the pulsar. AH: in ms
|
||||
|
@ -328,11 +328,12 @@ def compute_snr_from_h5(h5_file, detrend_ft=True, mad_filter=True, save=False, s
|
|||
for i, pulsar_dir in enumerate(pulsar_dir_list):
|
||||
save_path = save_path_list[i] #AH: link directory and save path in a bit of a messy way oops
|
||||
h5_dir = os.path.join(pulsar_dir,"cands","")
|
||||
h5_files = sorted(glob.glob(f"{pulsar_dir}*.h5"))
|
||||
h5_files = sorted(glob.glob(f"{h5_dir}*.h5"))
|
||||
|
||||
results = []
|
||||
|
||||
for filepath in h5_files:
|
||||
print(filepath)
|
||||
try:
|
||||
fluxes_mjy, flux_stds, widths_t, peak_mjds, time_peaks, time_pulse, dm = compute_snr_from_h5(filepath,
|
||||
detrend_ft=True,
|
||||
|
|
Loading…
Reference in a new issue