Skip to content

Commit

Permalink
no except
Browse files Browse the repository at this point in the history
  • Loading branch information
jurjen93 committed Feb 1, 2024
1 parent 2c3930b commit d7de93c
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions source_selection/phasediff_output.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,24 +249,24 @@ def main():
writer = csv.writer(f)
writer.writerow(["source", "spd_score", "best_solint", 'RA', 'DEC'])
for h5 in h5s:
try:
S = GetSolint(h5, optimal_score, ref_solint)
if args.all_stations:
H = tables.open_file(h5)
stations = [make_utf8(s) for s in list(H.root.sol000.antenna[:]['name'])]
H.close()
else:
stations = [station]
for station in stations:
std = S.get_phasediff_score(station=station)
solint = S.best_solint
H = tables.open_file(h5)
dir = rad_to_degree(H.root.sol000.source[:]['dir'])
writer.writerow([h5 + station, std, solint, dir[0], dir[1]])
S.plot_C("T=" + str(round(solint, 2)) + " min", saveas=h5 + station + '.png')
H.close()
except:
pass
# try:
S = GetSolint(h5, optimal_score, ref_solint)
if args.all_stations:
H = tables.open_file(h5)
stations = [make_utf8(s) for s in list(H.root.sol000.antenna[:]['name'])]
H.close()
else:
stations = [station]
for station in stations:
std = S.get_phasediff_score(station=station)
solint = S.best_solint
H = tables.open_file(h5)
dir = rad_to_degree(H.root.sol000.source[:]['dir'])
writer.writerow([h5 + station, std, solint, dir[0], dir[1]])
S.plot_C("T=" + str(round(solint, 2)) + " min", saveas=h5 + station + '.png')
H.close()
# except:
# pass

f.close()

Expand Down

0 comments on commit d7de93c

Please sign in to comment.