Skip to content
Draft
Show file tree
Hide file tree
Changes from 48 commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
c470768
fix: enable halting a script to bring up a plotter
astrofle Feb 19, 2026
563fdf8
add regions attribute to spectrum
etsmit Mar 4, 2026
5637404
Merge pull request #1034 from GreenBankObservatory/blocking-plots-evan
astrofle Mar 14, 2026
dc71665
Merge branch 'main' into blocking-plots
astrofle Mar 14, 2026
46b4245
fix: enable halting a script to bring up a plotter
astrofle Feb 19, 2026
e6b1aea
add regions attribute to spectrum
etsmit Mar 4, 2026
4661529
fix: enable halting a script to bring up a plotter
astrofle Feb 19, 2026
2a131c0
Merge branch 'blocking-plots' of https://github.com/GreenBankObservat…
teuben Mar 17, 2026
2dd8f3b
vectorize INTNUM construction in GBTFITSLoad
danjsiegel Mar 18, 2026
4fd6f73
Merge pull request #1018 from GreenBankObservatory/blocking-plots
astrofle Mar 19, 2026
a9ee2cb
dysh & gbtidl examples (#1058)
astrofle Mar 19, 2026
13aea47
Merge pull request #1060 from danjsiegel/perf/vectorize-intnum-
astrofle Mar 19, 2026
e60add9
fix left side of scanplots
etsmit Mar 20, 2026
2587f52
fix: avoid empty channel selections in baseline
astrofle Mar 23, 2026
b162b2c
Merge pull request #1064 from GreenBankObservatory/708-scanplot-adjust
etsmit Mar 24, 2026
93cac24
fix: issue-1017 issue using include regions
astrofle Mar 23, 2026
5d87a88
Merge pull request #1068 from GreenBankObservatory/1017-baseline-issu…
astrofle Mar 24, 2026
0d7468a
Enable example data cache in CI (#1061)
tchamberlin Mar 25, 2026
9a7dbce
fix:crval4_to_pol
etsmit Mar 25, 2026
4fb5ac5
Merge pull request #1075 from GreenBankObservatory/1072-crval4-to-pol
etsmit Mar 26, 2026
d97bd35
Add system info for bug reports
astrofle Mar 25, 2026
52b90c4
docs: remove icon from sdmath
astrofle Mar 26, 2026
577f988
Change the repr of ScanBase to include scan info
astrofle Mar 26, 2026
b85d045
Merge pull request #1071 from GreenBankObservatory/issue-470
astrofle Mar 26, 2026
703bd5c
fix: add MJD-OBS to Spectrum.meta when only DATE-OBS is present (#490…
mpound Mar 26, 2026
509e09b
Sort summary by DATE-OBS
astrofle Mar 23, 2026
4f9fc6c
Add ColDef for ROW
astrofle Mar 27, 2026
fa088fc
Merge pull request #1077 from GreenBankObservatory/scanbase-repr
astrofle Mar 27, 2026
129eee7
feat: add scan_info() and partial-match warnings (#745, #748) (#1078)
mpound Mar 30, 2026
8107f3d
make default lower frequency boundary at 200 MHz
mpound Mar 30, 2026
6369eb8
update tables to lower limit of 200 MHz
mpound Mar 30, 2026
d30a5c4
Revert "make default lower frequency boundary at 200 MHz"
mpound Mar 30, 2026
1a12098
Revert "update tables to lower limit of 200 MHz"
mpound Mar 30, 2026
e523270
Merge pull request #1069 from GreenBankObservatory/1066-sort-summary-…
astrofle Apr 2, 2026
5486ae3
fix issue #1093
astrofle Apr 2, 2026
4a61e80
Fix issue #1082
astrofle Apr 2, 2026
7509809
1083 extend line catalogs to lower frequencies (#1085)
mpound Apr 2, 2026
6bb97ba
Merge pull request #1095 from GreenBankObservatory/1093-history-gets-…
astrofle Apr 3, 2026
88a7fa6
Fix issue #901
astrofle Apr 3, 2026
55009ee
Merge pull request #1096 from GreenBankObservatory/1082-scanplotset_c…
astrofle Apr 7, 2026
96203fb
Fix issue #1091 (#1104)
mpound Apr 20, 2026
bc7f0f7
[pre-commit.ci] pre-commit autoupdate (#1099)
pre-commit-ci[bot] Apr 20, 2026
c11751d
Fix for issue #979
astrofle Apr 20, 2026
b1f456a
Fix LazyFlagArray memmap temp file cleanup (#1089) (#1103)
mpound Apr 20, 2026
a3b81af
Merge pull request #1106 from GreenBankObservatory/979-selection-does…
astrofle Apr 20, 2026
5200d23
[pre-commit.ci] pre-commit autoupdate (#1105)
pre-commit-ci[bot] Apr 27, 2026
47deef8
change some info logging to debug (#1112)
mpound May 1, 2026
d5922d6
Merge branch 'main' into release-1.1
mpound May 1, 2026
2dd4fae
Fix log decorators dropping kwargs and stripping string quotes (#1108…
mpound May 14, 2026
ee4c67a
1100 defining regions for basleine fitting doesnt work (#1110)
mpound May 14, 2026
83218b5
fix incorrect link
mpound May 14, 2026
d822150
change python version to force complete rebuild on RTD
mpound May 14, 2026
a013d4a
Fix Splatalogue CI failures (#1062) (#1122)
mpound Jun 19, 2026
109fb26
Speedup RTD option B (#1123)
astrofle Jun 19, 2026
fc139ea
1117 getspec fails (#1121)
mpound Jun 19, 2026
3b6524b
474 spectrum header (#1074)
etsmit Jun 22, 2026
c0954b2
Fixes plotter zoom issue when changing units
astrofle Jun 19, 2026
a963475
Fix for issue #1067
astrofle Jun 23, 2026
f51405b
Merge pull request #1128 from GreenBankObservatory/zoom-issue
astrofle Jun 23, 2026
27f4413
Ensure lazy flag temporary files are cleaned up as we go. (#1130)
mpound Jun 23, 2026
89de832
Merge pull request #1133 from GreenBankObservatory/issue-1067-smoothi…
astrofle Jun 23, 2026
00561dd
Exclude _build from Sphinx source discovery (#830) (#1131)
mpound Jun 23, 2026
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
5 changes: 4 additions & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ What is the bug? What did you expect to happen vs. what actually happened?
Include a minimal example that reproduces your issue. This should probably be a brief snippet of Python code along with a traceback. Please format [using triple backticks](https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax#quoting-code).

**Environment**
- Dysh version
Please provide the outputs of ``dysh.system_info()`` here (only available after dysh 1.1.0).
To get the outputs use: ``dysh -s``.
If using dysh<=1.1.0 provide:
- dysh version
- Python version
- OS
14 changes: 11 additions & 3 deletions .github/workflows/ci-latest-deps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ env:
FORCE_COLOR: '1'
MPLBACKEND: Agg
QT_QPA_PLATFORM: offscreen
DYSH_DATA: ${{ github.workspace }}/.dysh_cache
jobs:
tests:
runs-on: ${{ matrix.os }}
Expand All @@ -27,9 +28,11 @@ jobs:
- os: windows-latest
python-version: '3.13'
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
with:
fetch-depth: 1
- name: Install uv and set the python version
uses: astral-sh/setup-uv@v5
uses: astral-sh/setup-uv@v7
with:
version: 0.9.17
python-version: ${{ matrix.python-version }}
Expand All @@ -38,6 +41,11 @@ jobs:
run: uv sync -U --all-extras --dev
- name: Log resolved dependency versions
run: uv pip list
- name: Cache example data
uses: actions/cache@v5
with:
path: ${{ github.workspace }}/.dysh_cache
key: dysh-example-data-v1
- name: Test with pytest
run: |
uv run pytest --numprocesses auto -m "not gbo_only" --timeout=0
Expand All @@ -49,7 +57,7 @@ jobs:
issues: write
steps:
- name: Create or update failure issue
uses: actions/github-script@v7
uses: actions/github-script@v8
with:
script: |
const title = 'CI (Latest Deps) is failing';
Expand Down
35 changes: 26 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ env:
FORCE_COLOR: '1' # Make tools pretty.
MPLBACKEND: Agg # hard-force headless backend (tkagg bad!)
QT_QPA_PLATFORM: offscreen # No real display. Renders to memory. Not sure if Qt ever gets pulled in though
DYSH_DATA: ${{ github.workspace }}/.dysh_cache
jobs:
tests:
runs-on: ${{ matrix.os }}
Expand All @@ -26,15 +27,22 @@ jobs:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ['3.10', '3.11', '3.12', '3.13', '3.14']
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
with:
fetch-depth: 1
- name: Install uv and set the python version
uses: astral-sh/setup-uv@v5
uses: astral-sh/setup-uv@v7
with:
version: 0.9.17 # Update this occasionally to stay up to date!
python-version: ${{ matrix.python-version }}
enable-cache: true
- name: Install the project
run: uv sync --all-extras --dev
- name: Cache example data
uses: actions/cache@v5
with:
path: ${{ github.workspace }}/.dysh_cache
key: dysh-example-data-v1
- name: Test with pytest
env:
COVERAGE_FILE: coverage.${{ matrix.os }}.${{ matrix.python-version }}
Expand All @@ -45,7 +53,7 @@ jobs:
- name: Upload coverage data
# Upload only ubuntu results, since we are only running the coverage step on ubuntu
if: matrix.os == 'ubuntu-latest'
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: coverage.${{ matrix.os }}.${{ matrix.python-version }}
path: coverage.ubuntu-latest*
Expand All @@ -54,9 +62,11 @@ jobs:
runs-on: ubuntu-latest
continue-on-error: true
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
with:
fetch-depth: 1
- name: Install uv and set the python version
uses: astral-sh/setup-uv@v5
uses: astral-sh/setup-uv@v7
with:
version: 0.9.17
python-version: '3.13'
Expand All @@ -65,22 +75,29 @@ jobs:
run: uv sync -U --all-extras --dev
- name: Log resolved dependency versions
run: uv pip list
- name: Cache example data
uses: actions/cache@v5
with:
path: ${{ github.workspace }}/.dysh_cache
key: dysh-example-data-v1
- name: Test with pytest
run: |
uv run pytest --numprocesses auto -m "not gbo_only" --timeout=0
coverage:
needs: tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
with:
fetch-depth: 1
- name: Install uv and set the python version
uses: astral-sh/setup-uv@v5
uses: astral-sh/setup-uv@v7
with:
version: 0.9.17 # Update this occasionally to stay up to date!
enable-cache: true
- name: Install the project
run: uv sync --all-extras --dev
- uses: actions/download-artifact@v4
- uses: actions/download-artifact@v8
with:
pattern: coverage.*
path: coverage-data
Expand All @@ -96,7 +113,7 @@ jobs:
# Report again and fail if under 100%.
# coverage report --fail-under=100
- name: Upload HTML report
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: html-report
path: htmlcov
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ jobs:
# See: https://github.com/pypa/gh-action-pypi-publish#trusted-publishing
id-token: write
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
- name: Install uv and set the python version
uses: astral-sh/setup-uv@v5
uses: astral-sh/setup-uv@v7
with:
version: 0.8.19 # Update this occasionally to stay up to date!
python-version: '3.10'
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ repos:
hooks:
- id: yamlfmt
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.15.9
rev: v0.15.12
hooks:
- id: ruff-format
- id: ruff-check
Expand Down
125 changes: 124 additions & 1 deletion docs/source/reference/dysh-for-gbtidl-users.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@ Rough equivalents

In the tables below, it is assumed you have executed the following commands in Python:

`from dysh.fits.gbtfitsload import GBTFITSLoad`
``from dysh.fits import GBTFITSLoad, GBTOnline, GBTOffline``

If you are running from the dysh shell, then the above commands are already available.



Expand Down Expand Up @@ -60,3 +61,125 @@ Spectrum Operations
:header-rows: 1
:class: longtable
:widths: 10 15 10


Side-by-side Examples
=====================

The following are examples in GBTIDL and dysh that produce equivalent results.
The dysh examples assume they are being run from the dysh shell, so that the modules imported on startup are available (e.g., ``from astropy import units as u``).

OTF Mapping
-----------

This example is based on the observations under TGBT17A_506_11, the same observations used for the :doc:`on-the-fly data reduction section of the users guide </users_guide/on_the_fly>`.

.. tab:: dysh

.. code-block:: python

sdfits = GBTFITSLoad("TGBT17A_506_11.raw.vegas")
scan_block = sdfits.getsigref(scan=list(range(14,27)), ref=27, fdnum=0, ifnum=0, plnum=0)
scan_block.write("dysh.fits")

.. tab:: GBTIDL

.. code-block:: idl

filein,"TGBT17A_506_11.raw.vegas"
fileout,"gbtidl.fits"
for s=14,26,1 do begin &$
getsigref,s,27,/avgref,/keepints &$
keep &$
endfor

Extragalactic 21 cm Observations using Position Switching
---------------------------------------------------------

This example was borrowed from `GBTdocs position switched tutorial <https://gbtdocs.readthedocs.io/en/latest/tutorials/hi_psw_tutorial.html#data-reduction-scripted>`_.
A more thorough dysh example using the same data can be found in :doc:`example reduction of an HI survey </users_guide/hi_survey>`.
The GBTIDL version of this example can only be run with a display.

.. tab:: dysh

.. code-block:: python

sdfits = GBTFITSLoad("/home/astro-util/HIsurvey/Session02")

tp0 = sdfits.gettp(scan=299, ifnum=0, plnum=0, fdnum=0).timeaverage()
tsys0 = tp0.meta["TSYS"]
tp1 = sdfits.gettp(scan=299, ifnum=0, plnum=1, fdnum=0).timeaverage()
tsys1 = tp1.meta["TSYS"]

sigref0a = sdfits.getsigref(scan=[296], ref=295, ifnum=0, fdnum=0, plnum=0, t_sys=tsys0, units="flux", zenith_opacity=0.08).timeaverage()
sigref0b = sdfits.getsigref(scan=[298], ref=297, ifnum=0, fdnum=0, plnum=0, t_sys=tsys0, units="flux", zenith_opacity=0.08).timeaverage()
sigref0 = sigref0a.average(sigref0b)
sigref1a = sdfits.getsigref(scan=[296], ref=295, ifnum=0, fdnum=0, plnum=1, t_sys=tsys1, units="flux", zenith_opacity=0.08).timeaverage()
sigref1b = sdfits.getsigref(scan=[298], ref=297, ifnum=0, fdnum=0, plnum=1, t_sys=tsys1, units="flux", zenith_opacity=0.08).timeaverage()
sigref1 = sigref1a.average(sigref1b)
sigref = sigref0.average(sigref1)

sigref_smo = sigref.smooth(kernel="gauss", width=100, decimate=0)

region = [[1.402*u.GHz, 1.4045*u.GHz],
[1.40506*u.GHz, 1.4054*u.GHz],
[1.4072*u.GHz, 1.4115*u.GHz]]

sigref_smo.baseline(1, model="poly", include=region, remove=True)

kms = u.km/u.s
stats_b = sigref_smo[2000*kms:2500*kms].stats()
stats_r = sigref_smo[3500*kms:4000*kms].stats()

rms = (stats_b["rms"] + stats_r["rms"])/2.

cog = sigref_smo.cog(bchan=100, echan=200)


.. tab:: GBTIDL

.. code-block:: idl

dirin,'/home/astro-util/HIsurvey/Session02'

freeze ; keep from plotting on the screen, to speed up the processing

gettp, 299, plnum=0, /quiet
tsys0 = !g.s.tsys
gettp, 299, plnum=1, /quiet
tsys1 = !g.s.tsys

for i=295,297,2 do begin &$
for p=0,1 do begin &$
if (p eq 0) then tsys=tsys0[0] else tsys=tsys1[0] &$
getsigref, i+1, i, plnum=p, tsys=tsys, unit='Jy', /quiet &$
accum &$
endfor &$
endfor
ave

gsmooth, 100, /decimate

setxunit, 'GHz'
setx, 1.401, 1.412

show

region = [1.402, 1.4045, 1.40506, 1.4054, 1.4072, 1.4115]
reg1 = xtochan(region)
Nregion, reg1
nfit, 1
bshape
baseline

velo
show
stats, 2000, 2500, ret=mystats
rms1 = mystats.rms
stats, 3500, 4000, ret=mystats
rms2 = mystats.rms

rms = (rms1 + rms2) / 2

gmeasure, 1, 0.5, brange=2815, erange=3142, rms=rms
gmeasure, 1, 0.2, brange=2815, erange=3142, rms=rms
14 changes: 7 additions & 7 deletions docs/source/reference/files/Calibration.csv
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
GBTIDL,dysh,explanation
select,"sdf.select( [col1]=[val1], [col2]=[val2] )","Select subsets of the GBTFITSLoad object `sdf` based on the constraints on `col1` and `col2` given by `val1` and `val2`"
flag,"sdf.flag( [col1]=[val1], [col2]=[val2] )", "Create flagging rules of the GBTFITSLoad object `sdf` based on the constraints on `col1` and `col2` given by `val1` and `val2`. See flagging examples given in the Recipes."
"gettp, [scan_num]",sdfits.gettp( scan=[scan_num] ),"Returns a Scan Block. Get a total power scan, with the option in dysh to optionally calibrate it."
"getps, [scan_num]",sdfits.getps( scan=[scan_num] ),Returns a Scan Block. Retrieve and calibrate position-switched data.
"getfs, [scan_num]",sdfits.getfs( scan=[scan_num] ),Returns a Scan Block. Retrieve and calibrate frequency-switched data.
"getnod, [scan_num]",sdfits.getnod( scan=[scan_num] ),Returns a Scan Block.
show,spec.plot(),Plot the spectrum `spec`. Calibration routines in GBTIDL do this automatically.
select,"sdf.select( [col1]=[val1], [col2]=[val2] )","Select subsets of the `~dysh.fits.gbtfitsload.GBTFITSLoad` object ``sdf`` based on the constraints on ``col1`` and ``col2`` given by ``val1`` and ``val2``"
flag,"sdf.flag( [col1]=[val1], [col2]=[val2] )", "Create flagging rules of the `~dysh.fits.gbtfitsload.GBTFITSLoad` object ``sdf`` based on the constraints on ``col1`` and ``col2`` given by ``val1`` and ``val2``. See flagging examples given in the Recipes."
"gettp, [scan_num]",sdfits.gettp( scan=[scan_num] ),"Get a total power scan. Returns a `~dysh.spectra.scan.ScanBlock`."
"getps, [scan_num]",sdfits.getps( scan=[scan_num] ),"Retrieve and calibrate position-switched data. Returns a `~dysh.spectra.scan.ScanBlock`."
"getfs, [scan_num]",sdfits.getfs( scan=[scan_num] ),"Retrieve and calibrate frequency-switched data. Returns a `~dysh.spectra.scan.ScanBlock`."
"getnod, [scan_num]",sdfits.getnod( scan=[scan_num] ),"Retrieve and calibrate nodding data. Returns a `~dysh.spectra.scan.ScanBlock`."
show,spec.plot(),"Plot the spectrum ``spec``. Calibration routines in GBTIDL do this automatically."
12 changes: 6 additions & 6 deletions docs/source/reference/files/FileIO.csv
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
GBTIDL,dysh,Notes
online,sdf = GBTOnline(); sdf = GBTOnline([projID]) ,Monitor the currently online project or a specific project `projID`. Load the SDFITS into `sdf`.
offline,sdf = GBTOffline([projID]),Load data from project/session `projID` into `sdf`.
online,sdf = GBTOnline(); sdf = GBTOnline([projID]) ,Monitor the currently online project or a specific project ``projID``. Load the SDFITS into ``sdf``.
offline,sdf = GBTOffline([projID]),Load data from project/session ``projID`` into ``sdf``.
"filein, [SDFITS file]",sdfits = GBTFITSLoad( [SDFITSfile] ),This will directly load a SDFITS file into python.
"dirin, [SDFITS dir]",sdfits = GBTFITSLoad( [SDFITS dir] ),"This will load each SDFITS file in a directory into python, in the case it is a project directory where each file is a different VEGAS bank. (A, B, C, etc.). The implementation is identical to the single SDFITS file load."
fileout,,"There is no direct translation; in dysh, simply specify a filename with the Spectrum.write or ScanBlock.write functions"
keep,"spec.write( [SDFITSfile], format=[fmt] )","Write the spectrum `spec` to the output `SDFITS file` specified, using the format `fmt`"
fileout,,"There is no direct translation; in dysh, simply specify a filename with the ``Spectrum.write`` or ``ScanBlock.write`` functions."
keep,"spec.write( [SDFITSfile], format=[fmt] )","Write the spectrum ``spec`` to the output ``SDFITSfile`` specified, using the format ``fmt``."
summary,sdfits.summary(),"In dysh, you can also input a list of scan numbers you would like to see, or modify which SDFITS columns are printed."
list,sdfits.summary( verbose=True ),"Using the ""verbose=True"" option returns similar results to GBTIDL's ""list""."
"header, scan_info",spec.meta,"Return meta information about the spectrum `spec`. In GBTIDL, this returns a text printout. In dysh, this returns a dictionary with all SDFITS keywords and values."
list,sdfits.summary( verbose=True ),"Using the ``verbose=True`` option returns similar results to GBTIDL's ``list``. It is possible to provide a scan number as ``scan=x``."
"header, scan_info",spec.meta,"Return meta information about the spectrum ``spec``. In GBTIDL, this returns a text printout. In dysh, this returns a dictionary with all SDFITS keywords and values."
26 changes: 12 additions & 14 deletions docs/source/reference/files/Spectrum_ops.csv
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
GBTIDL,dysh,Notes
"baseline, bshape, bsubtract, nfit","spec.baseline( [deg], exclude=[ex_reg],remove=True/False )",Compute and optionally remove a baseline with degree `deg` and exclusion regions `ex_reg`
"gsmooth, [int]","spec.smooth( ""gauss"", [int] )","Convolve spec with a Gaussian kernel. Default behavior is to decimate, which isn't true in GBTIDL"
hanning,"spec.smooth( ""hann"" )","Convolve `spec` with a Hanning window. Default behavior is to decimate, which isn't true in GBTIDL"
"boxcar, [int]","spec.smooth( ""box"", [int] )","Convolve `spec` with a boxcar window. This matches the GBTIDL results only when integer `int` is an odd number. Default behavior is to decimate, which isn't true in GBTIDL"
add/subtract/divide/scale,"spec + other, spec - other, spec/other, spec*other",Perform element-wise math between spectrum `spec` and other vector/scalar `other`.
"bias, [bias]",spec + bias,Add scalar `bias` to spectrum `spec`. The units of `bias` must match those of `spec.flux`.
accum,average_spectra(list of spectra),
ave,scanblock.timeaverage(); scan.timeaverage(),Average a set of scans inside Scan Block `scanblock` or Scan `scan`.
stats,spec.stats(),Print statistics of spectrum `spec`.
"fshift, vshift, xshift",spec.find_shift(other),Find the shift between `spec` and `other`.
gshift,"spec.shift(shift)
spec.align_to(other)","Shift `spec` by `shift`.
Find the shift between `spec` and `other` and apply. Equivalent to `spec.shift(spec.find_shift(other))`."
"write_ascii, filename","spec.write(filename, format=""ascii.basic"")",Write the contents of spec to a text file in ascii format with minimum header information.
"baseline, bshape, bsubtract, nfit","spec.baseline( [deg], exclude=[ex_reg],remove=True/False )","Compute and optionally remove a baseline with degree ``deg`` and exclusion regions ``ex_reg``."
"gsmooth, [int]","spec.smooth( ""gauss"", [int] )","Convolve spec with a Gaussian kernel. Default behavior is to decimate, which isn't true in GBTIDL."
hanning,"spec.smooth( ""hann"" )","Convolve ``spec`` with a Hanning window. Default behavior is to decimate, which isn't true in GBTIDL."
"boxcar, [int]","spec.smooth( ""box"", [int] )","Convolve ``spec`` with a boxcar window. This matches the GBTIDL results only when integer `int` is an odd number. Default behavior is to decimate, which isn't true in GBTIDL"
add/subtract/divide/scale,"spec + other, spec - other, spec/other, spec*other",Perform element-wise math between spectrum ``spec`` and other vector/scalar ``other``.
"bias, [bias]",spec + bias,Add scalar ``bias`` to spectrum ``spec``.
accum,average_spectra(list of spectra),"``average_spectra`` has to be imported first (``from dysh.spectra import average_spectrum``). Alternatively, ``spec.average(list of other spectra)`` will average ``spec`` with the spectra in the list."
ave,"scanblock.timeaverage(); scan.timeaverage()","Average a set of scans inside `~dysh.spectra.scan.ScanBlock` ``scanblock`` or `~dysh.spectra.scan.ScanBase` ``scan``."
stats,spec.stats(),Print statistics of spectrum ``spec``.
"fshift, vshift, xshift",spec.find_shift(other),Find the shift between ``spec`` and ``other``.
gshift,"spec.shift(shift); spec.align_to(other)","Shift ``spec`` by ``shift``;Find the shift between ``spec`` and ``other`` and apply. Equivalent to ``spec.shift(spec.find_shift(other))``."
"write_ascii, filename","spec.write(filename, format=""ascii.basic"")",Write the contents of ``spec`` to a text file in ascii format with minimum header information.
2 changes: 1 addition & 1 deletion docs/source/reference/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ Reference Guides
:shadow: md
:margin: 2 2 0 0

:octicon:`file;3em;green` **SDMATH**
**SDMATH**

Single Dish math

Expand Down
5 changes: 5 additions & 0 deletions docs/source/reference/modules/dysh.util.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,8 @@ Utility classes and functions
:members:
:undoc-members:
:show-inheritance:

.. automodule:: dysh.util.system_info
:members:
:undoc-members:
:show-inheritance:
Loading