readded try-except
This commit is contained in:
parent
1f0b6ba5ef
commit
31be71c5ae
|
@ -336,27 +336,27 @@ for pulsar_dir in pulsar_dir_list:
|
||||||
results = []
|
results = []
|
||||||
|
|
||||||
for filepath in h5_files:
|
for filepath in h5_files:
|
||||||
#try:
|
try:
|
||||||
fluxes_mjy, flux_stds, widths_t, peak_mjds, time_peaks, time_pulse, dm = compute_snr_from_h5(filepath,
|
fluxes_mjy, flux_stds, widths_t, peak_mjds, time_peaks, time_pulse, dm = compute_snr_from_h5(filepath,
|
||||||
detrend_ft=True,
|
detrend_ft=True,
|
||||||
mad_filter=True,
|
mad_filter=True,
|
||||||
save=True,
|
save=True,
|
||||||
show=False,
|
show=False,
|
||||||
save_path=save_path)
|
save_path=save_path)
|
||||||
|
|
||||||
for i in range(0,(len(fluxes_mjy))):
|
for i in range(0,(len(fluxes_mjy))):
|
||||||
results.append({
|
results.append({
|
||||||
"mjd": peak_mjds[i],
|
"mjd": peak_mjds[i],
|
||||||
"flux_std": flux_stds[i],
|
"flux_std": flux_stds[i],
|
||||||
"flux_mJy": fluxes_mjy[i],
|
"flux_mJy": fluxes_mjy[i],
|
||||||
"width_s": widths_t[i],
|
"width_s": widths_t[i],
|
||||||
"Pulse time (ms)": time_peaks[i],
|
"Pulse time (ms)": time_peaks[i],
|
||||||
"tcand": time_pulse,
|
"tcand": time_pulse,
|
||||||
"dm": dm,
|
"dm": dm,
|
||||||
"filename": os.path.basename(filepath)
|
"filename": os.path.basename(filepath)
|
||||||
})
|
})
|
||||||
#except Exception as e:
|
except Exception as e:
|
||||||
#print(f"Error processing {filepath}: {e}")
|
print(f"Error processing {filepath}: {e}")
|
||||||
|
|
||||||
df = pd.DataFrame(results)
|
df = pd.DataFrame(results)
|
||||||
#%%
|
#%%
|
||||||
|
|
Loading…
Reference in a new issue