Skip to content

Commit

Permalink
Added nbin and nchan to obs list and download
Browse files Browse the repository at this point in the history
  • Loading branch information
NickSwainston committed Mar 14, 2024
1 parent d2b8dc9 commit 4d47f90
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion psrdb/tables/observation.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ def __init__(self, client, logger=None):
"beam",
"band",
"duration",
"foldNchan",
"foldNbin",
]

def list(
Expand Down Expand Up @@ -222,7 +224,7 @@ def download(

# Loop over the pulsar_fold_results and dump them as a file
with open(output_name, "w") as f:
f.write("Obs ID,Pulsar Jname,UTC Start,Project Short Name,Beam #,Observing Band,Duration (s),Calibration Location\n")
f.write("Obs ID,Pulsar Jname,UTC Start,Project Short Name,Beam #,Observing Band,Duration (s),Nchan,Nbin,Calibration Location\n")
for observations_dict in observations_dicts:
data_line = [
str(decode_id(observations_dict["id"])),
Expand All @@ -232,6 +234,8 @@ def download(
str(observations_dict["beam"]),
str(observations_dict["band"]),
str(observations_dict["duration"]),
str(observations_dict["foldNchan"]),
str(observations_dict["foldNbin"]),
str(observations_dict["calibration"]["location"]),
]
f.write(f"{','.join(data_line)}\n")
Expand Down

0 comments on commit 4d47f90

Please sign in to comment.