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

Nodding2 #395

Merged
merged 53 commits into from
Oct 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
02107e6
add dysh_data (copy from the dysh_data branch)
teuben Sep 17, 2024
6359359
test 10 different nodding examples (nod0..nod9) though some of them h…
teuben Sep 17, 2024
0142c3a
Merge remote-tracking branch 'origin/dysh_data2' into nodding2
teuben Sep 17, 2024
6e17d57
reorder to gettp() getps() getfs() to be consistent with scan.py
teuben Sep 17, 2024
aa28469
add a ps=False option to getnod() to get a BS mode
teuben Sep 19, 2024
c6329ee
add debugging, add the true sdf.getnod()
teuben Sep 19, 2024
0639df6
add a simple NODScan(), though this one still keeps one scanblock per…
teuben Sep 19, 2024
2ef7b8c
implement getnod() for TP based data. this one still keeps a scanbl…
teuben Sep 19, 2024
bb19c4d
make beam1 and beam2 signals positive
teuben Sep 20, 2024
aeb8441
more examples straight from the large files via scan/ifnum/plnum sele…
teuben Sep 20, 2024
b16e9de
examples comparing nod0 in gbtidl and dysh (with some remaining puzzles)
teuben Sep 25, 2024
8fd652b
clarify the example0 comparison
teuben Sep 26, 2024
3c6bf7e
sanitize using dysh_data
teuben Sep 26, 2024
b8c7752
try one more way to find the nod beams
teuben Sep 26, 2024
58cb2c8
replace some print's with logger.XXX
teuben Sep 26, 2024
71d45e0
add a len() function to a Spectrum to get the number of channels
teuben Oct 1, 2024
5dc771b
yuck, __len__ has side-effect @todo
teuben Oct 1, 2024
4009776
fix counter in the rare (?) case when PROCSCAN is missing
teuben Oct 2, 2024
926964a
clean up for a channel-to-channel comparison of getps and getnod for …
teuben Oct 2, 2024
d8544c9
remove PJT's debug verbosities
teuben Oct 2, 2024
40d7802
report nodding beams
teuben Oct 2, 2024
b3f8cf1
draft, without figures still
teuben Oct 2, 2024
890fcc0
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 2, 2024
c5510a2
add option (qac=True) to print a regression type string with mean/rms…
teuben Oct 4, 2024
9eaa908
add a cell showing the issue#342, but also difference between full an…
teuben Oct 4, 2024
72f7882
Merge branch 'nodding2' of https://github.com/GreenbankObservatory/dy…
teuben Oct 4, 2024
48000de
provide the s1..s8 tests for getps()
teuben Oct 4, 2024
c5c4c5d
ensure rows are in original order when written out (issue #342)
teuben Oct 4, 2024
b1a62b6
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 4, 2024
21964dc
ensure rows are in original order when written out (issue #342)
teuben Oct 4, 2024
02a7a18
Merge branch 'nodding2' of https://github.com/GreenbankObservatory/dy…
teuben Oct 4, 2024
b1e59b3
rename NODScan -> NodScan for consistency
teuben Oct 7, 2024
ab27d98
- NODScan is not NodScan
teuben Oct 7, 2024
f95d79d
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 7, 2024
01a4c7b
fix more examples now that the error of multiple feeds in a scan has …
teuben Oct 7, 2024
af9dc3c
Merge branch 'nodding2' of https://github.com/GreenbankObservatory/dy…
teuben Oct 7, 2024
53137e5
fix message that needs to be an exception
teuben Oct 7, 2024
f230e28
fix notebook so it actually runs in CI now
teuben Oct 7, 2024
6dfe4df
update so dysh_data isn't called yet
teuben Oct 7, 2024
26cbbfa
allow getnod(scan=) to have only one of the nodding scans (like getps…
teuben Oct 7, 2024
5ae4b9d
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 7, 2024
25f5aac
less confusing messages when using picks the feeds in getnod()
teuben Oct 7, 2024
1159733
Merge branch 'nodding2' of https://github.com/GreenbankObservatory/dy…
teuben Oct 7, 2024
af07e3d
make it a single top level notebook for CI
teuben Oct 8, 2024
a76f11e
cleaned up, ready for expansion into a figure version
teuben Oct 8, 2024
0c33b19
more verbose in terms of checking for valid feeds during nodding
teuben Oct 8, 2024
e44fa09
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 8, 2024
5488a89
more testing
teuben Oct 8, 2024
ccdab26
Merge branch 'nodding2' of https://github.com/GreenbankObservatory/dy…
teuben Oct 8, 2024
6421c07
minor language tweaks, and now saved with all figures
teuben Oct 9, 2024
502cc49
Merge branch 'main' into nodding2
teuben Oct 9, 2024
00c9f31
use a pythonic mkdir as pre-commit was complaining
teuben Oct 9, 2024
f534aea
Merge branch 'nodding2' of https://github.com/GreenbankObservatory/dy…
teuben Oct 9, 2024
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
873 changes: 873 additions & 0 deletions notebooks/developer/test_nodding.py

Large diffs are not rendered by default.

31 changes: 14 additions & 17 deletions notebooks/developer/test_smoothing.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,27 @@
import numpy as np
import matplotlib.pyplot as plt


from specutils import Spectrum1D
import astropy.units as u
import numpy as np
from astropy.io import fits
from specutils import Spectrum1D
from specutils.manipulation import box_smooth, gaussian_smooth, trapezoid_smooth

import matplotlib.pyplot as plt

from dysh.fits.sdfitsload import SDFITSLoad
from dysh.fits.gbtfitsload import GBTFITSLoad
import dysh.util as util
from dysh.util.selection import Selection
from dysh.util.files import dysh_data


def parr(data, n, w=1):
""" print values of an array +/-w around n
"""
print(data[n-w:n+w+1])


#%% testing simple spectra; but we're not using specutils anymore
#%% testing simple spectra; even though we're not using specutils anymore

spec1 = Spectrum1D(spectral_axis=np.arange(1, 50) * u.nm, flux=np.random.default_rng(12345).random(49)*u.Jy)

Expand All @@ -31,19 +38,10 @@ def parr(data, n, w=1):

#%% testing using a PS

import numpy as np
import numpy.ma as ma
from scipy.stats import norm
import astropy.units as u
from astropy.io import fits
import matplotlib.pyplot as plt
from dysh.fits.sdfitsload import SDFITSLoad
from dysh.fits.gbtfitsload import GBTFITSLoad
import dysh.util as util
from dysh.util.selection import Selection


f1 = util.get_project_testdata() / 'TGBT21A_501_11/TGBT21A_501_11.raw.vegas.fits'
# s1 = SDFITSLoad(f1)
f1 = dysh_data(test="getps")

sdf1 = GBTFITSLoad(f1)
sdf1.info()
Expand Down Expand Up @@ -74,7 +72,7 @@ def parr(data, n, w=1):
example1=\
"""
filein,"TGBT21A_501_11.raw.vegas.fits"
getps,152,ifnum=0,plnum=0,intnum=0
getps,152,ifnum=0,plnum=0,intnum=0
fileout,"TGBT21A_501_11_getps_scan_152_intnum_0_ifnum_0_plnum_0.fits"
keep
"""
Expand All @@ -92,7 +90,6 @@ def parr(data, n, w=1):
d2g = fits.open(util.get_project_testdata() / base1g)[1].data['DATA'][0]
d2s = fits.open(util.get_project_testdata() / base1s)[1].data['DATA'][0]


e2 = d1-d2
e2b = (d1b-d2b)
e2h = (d1h-d2h)
Expand Down
566 changes: 566 additions & 0 deletions notebooks/examples/nodding.ipynb

Large diffs are not rendered by default.

Loading
Loading