Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix issue #153 and its integration test #183

Merged
merged 2 commits into from
Jan 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion src/dysh/fits/gbtfitsload.py
Original file line number Diff line number Diff line change
Expand Up @@ -578,6 +578,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 @@ -598,7 +599,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