Skip to content

Commit

Permalink
fix issue #153 and its integration test
Browse files Browse the repository at this point in the history
  • Loading branch information
mpound committed Jan 8, 2024
1 parent 54e2c5e commit 1c8636d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
8 changes: 7 additions & 1 deletion src/dysh/fits/gbtfitsload.py
Original file line number Diff line number Diff line change
Expand Up @@ -772,6 +772,7 @@ def subbeamnod(self, scan, bintable=None, **kwargs):
kwargs_opts = {
"ifnum": 0,
"fdnum": 0,
"plnum": 1,
"timeaverage": True,
"weights": "tsys", # or None or ndarray
"calibrate": True,
Expand All @@ -792,7 +793,12 @@ def subbeamnod(self, scan, bintable=None, **kwargs):
if len(rx) > 1:
raise TypeError("More than one receiver for the selected scan.")
elif rx[0] == "Rcvr26_40": # and df["DATE-OBS"][-1] < xxxx
# Switch the polarizations to match the beams.
# Switch the polarizations to match the beams,
# for this receiver only because it has had its feeds
# mislabelled since $DATE.
# For the rest of the receivers the method should use
# the same polarization for the selected feeds.
# See also issue #160
if fdnum == 0:
plnum = 1
elif fdnum == 1:
Expand Down
4 changes: 3 additions & 1 deletion src/dysh/spectra/tests/test_scan.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,9 @@ def test_compare_with_GBTIDL(self, data_dir):
# Generate the dysh result.
# snodka-style. Need test for method='cycle'
sdf = gbtfitsload.GBTFITSLoad(sdf_file)
sbn = sdf.subbeamnod(43, sig=None, cal=None, ifnum=0, fdnum=1, calibrate=True, weights="tsys", method="scan")
sbn = sdf.subbeamnod(
43, sig=None, cal=None, ifnum=0, fdnum=1, plnum=0, calibrate=True, weights="tsys", method="scan"
)

# Load the GBTIDL result.
hdu = fits.open(gbtidl_file)
Expand Down

0 comments on commit 1c8636d

Please sign in to comment.