Skip to content
Draft
Show file tree
Hide file tree
Changes from all 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
2 changes: 1 addition & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ version: 2
build:
os: ubuntu-24.04
tools:
python: "3.10"
python: "3.11"
jobs:
create_environment:
- asdf plugin add uv
Expand Down
12 changes: 7 additions & 5 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

sys.path.insert(0, os.path.abspath("../../src"))
sys.path.insert(0, os.path.abspath("."))
# Detect a real Read the Docs build before we overwrite the variable below.
ON_RTD = os.environ.get("READTHEDOCS") == "True"
os.environ["READTHEDOCS"] = "True" # Fool dysh to use StaticLabGUI.
print(f"Are we fooling anyone? {os.environ['READTHEDOCS']}")

Expand Down Expand Up @@ -108,7 +110,7 @@
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path .
exclude_patterns = ["examples/output"]
exclude_patterns = ["examples/output", "_build", "**.ipynb_checkpoints"]

# The name of the Pygments (syntax highlighting) style to use.
pygments_style = "sphinx"
Expand Down Expand Up @@ -266,12 +268,12 @@

# Settings for myst_nb notebook rendering

# Cache notebooks to only re-run when cells change.
nb_execution_mode = "cache"
# On Read the Docs, skip execution and render the outputs saved in the
# notebooks (executing all of them exceeds the RTD build timeout).
# Locally, cache notebooks to only re-run when cells change.
nb_execution_mode = "off" if ON_RTD else "cache"
# Use this mode if working on the documentation with sphinx-autobuild.
# nb_execution_mode = "auto"
# Use this to skip executing the notebooks.
# nb_execution_mode = "off"

# Execution timeout.
# -1 should set this to no limit.
Expand Down
39 changes: 39 additions & 0 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ After being installed, the ``dysh`` command will be available through the comman
This will launch an `iPython <https://ipython.readthedocs.io/en/stable/>`_ session with some modules and classes pre-loaded (e.g., `~dysh.fits.gbtfitsload.GBTFITSLoad`), and with logging.
We refer to this interface as the dysh shell.

.. note::

For large SDFITS files (> 1 GB or so), dysh may create temporary files during certain operations to hold flag arrays. By default these files are created in ``/tmp``. To avoid filling up ``/tmp``, you can (and should) change that default by setting ``$DYSH_SCRATCH`` or ``$TMPDIR`` environment variables to point to a directory where temporary files can be written. Note these must be set before you start dysh as the values are cached by Python at startup, so ``os.putenv()`` would not have any effect..

Loading Data
============

Expand Down Expand Up @@ -153,6 +157,41 @@ Plot again, but focus on the line-free regions:

.. image:: files/spectrum_plot_bsub.png


Using Exclude Regions
--------------------------------

When you give an ``exclude`` value to ``baseline``, the default behavior is to store it in the `exclude_regions <dysh.spectra.spectrum.Spectrum.exclude_regions>` property, which is a list of `SpectralRegions <astropy.coordinate.SpectralRegion>`. Subsequent baseline operations on the spectrum can reuse these exclude regions, append to them, or ignore them, depending on the value of the ``exclude_action`` keyword. Options are:

- "replace" : replace the `Spectrum.exclude_regions` list with the input region.
- "append" : append the input region to the `Spectrum.exclude_regions` list.
- None : Use the the input region, but do not change the existing `Spectrum.exclude_regions`


The default is "replace." Below is example usage.

.. code:: Python

s = Spectrum.fake_spectrum(1024)
exclude1 = [(1,100)]
exclude2 = [(924,1024)]

# The input exclude regions are used in the baseline and are stored in the Spectrum.
s.baseline(degree=1,exclude=exclude1)

# The input exclude regions are used and replace the previously stored regions.
s.baseline(degree=1,exclude=exclude2)

# The input exclude regions are appended to the stored regions.
s.baseline(degree=1,exclude=exclude1, exclude_action="append")

# The input exclude regions are used but the stored regions are unaffected.
s.baseline(degree=1,exclude=exclude2, exclude_action=None)

# The input exclude regions are used and replace the previously stored regions.
s.baseline(degree=1,exclude=exclude1, exclude_action="replace")


Polarization Average
====================

Expand Down
Loading
Loading