Skip to content

Commit

Permalink
Merge pull request #212 from GreenBankObservatory/211_wrong_number_of…
Browse files Browse the repository at this point in the history
…_integrations

Fix bug reporting wrong number of integrations
  • Loading branch information
astrofle authored Mar 14, 2024
2 parents 0cd3e8f + b23eacc commit 3327e4b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/dysh/fits/gbtfitsload.py
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,12 @@ def summary(self, scans=None, verbose=False, show_index=True): # selected=False
nIF = uf["IFNUM"].nunique()
nPol = uf["PLNUM"].nunique()
nfeed = uf["FEED"].nunique()
nint = len(set(uf["DATE-OBS"])) # see gbtidl io/line_index__define.pro
# For counting integrations, take care of out-of-sync samplers by just
# looking at the first instance of FEED, PLNUM, and IFNUM.
uf_int = self.select("FEED", uf["FEED"].iloc[0], uf)
uf_int = self.select("PLNUM", uf_int["PLNUM"].iloc[0], uf_int)
uf_int = self.select("IFNUM", uf_int["IFNUM"].iloc[0], uf_int)
nint = len(set(uf_int["DATE-OBS"])) # see gbtidl io/line_index__define.pro
obj = list(set(uf["OBJECT"]))[0] # We assume they are all the same!
proc = list(set(uf["PROC"]))[0] # We assume they are all the same!
# print(f"Uniq data for scan {s}: {nint} {nIF} {nPol} {nfeed} {obj} {proc}")
Expand Down Expand Up @@ -588,6 +593,7 @@ def subbeamnod(self, scan, bintable=None, **kwargs):
kwargs_opts.update(kwargs)
ifnum = kwargs_opts["ifnum"]
fdnum = kwargs_opts["fdnum"]
plnum = kwargs_opts["plnum"]
docal = kwargs_opts["calibrate"]
w = kwargs_opts["weights"]
method = kwargs_opts["method"]
Expand Down

0 comments on commit 3327e4b

Please sign in to comment.