Skip to content

Releases: Cassini-UVIS/pyuvis

v0.9.1 — Bug fixes + tutorial repair

06 May 09:03

Choose a tag to compare

0.9.1 — Bug fixes + tutorial repair

Fixes

  • PDSReader now handles OBJECT = SPECTRUM PDS3 labels (29 such files
    exist in the UVIS archive — single-integration interplanetary H/He scans
    like EUV2004_018_10_08). SPECTRUM data is surfaced as a degenerate
    (binned_bands, 1, 1) 3-D array so callers can keep treating
    PDSReader.data as 3-D regardless of object type.
  • PDSReader accepts str paths again (previously crashed with
    AttributeError: 'str' object has no attribute 'with_suffix').
  • Unsupported PDS object types (e.g. TIME_SERIES) now raise a clear
    ValueError naming the supported types and pointing to issue #10.
  • pyuvis.calib.greg.get_star_obs() now loads its bundled stars_list.txt
    via importlib.resources instead of a hardcoded Linux path; the file
    ships inside the package (src/pyuvis/calib/stars_list.txt).

Documentation

  • Repaired the Quarto tutorial notebooks under docs/tutorials/ after the
    v0.9.0 nbdev-strip removed their imports. Each tutorial now has an
    explicit Setup cell with the imports it needs; data-fetch demo cells
    are marked #| eval: false so the docs site renders cleanly without
    PDS data on the runner.
  • Dropped 08_stats.ipynb from the sidebar (single orphan cell with no
    recoverable content; file kept on disk for later revival).

Tests

  • Added tests/test_pdsreader.py covering the QUBE and SPECTRUM code
    paths plus the unsupported-type error path. Network tests are gated
    behind @pytest.mark.network and skipped by default; opt in with
    pytest -m network.

v0.9.0 — Modernization (breaking)

27 Apr 16:23

Choose a tag to compare

0.9.0 — Modernization release (BREAKING)

⚠️ Breaking API changes. This release reorganizes pyuvis from an
nbdev-driven project into a standard Python src-layout package, and
migrates the planetarypy dependency to the 0.53 API. Downstream code
that imports from pyuvis will need updates — see the migration notes
below before upgrading.

Project layout

  • Dropped nbdev as the development tool. Source of truth is now hand-edited
    .py modules under src/pyuvis/, not notebooks. Notebooks are kept as
    Quarto-rendered tutorials under docs/tutorials/ and are not used to
    generate package source.
  • Adopted hatchling for packaging; replaced setup.py + settings.ini
    with a static pyproject.toml.
  • Documentation moved from Jekyll/fastpages to a Quarto website published
    to GitHub Pages at https://cassini-uvis.github.io/pyuvis/. API
    reference is now generated by quartodoc.
  • New .github/workflows/docs.yml builds and deploys the docs on each
    push to master.

planetarypy 0.53 migration (BREAKING)

Old New
from planetarypy.uvis import get_data_path, get_label_path, get_user_guide from planetarypy.catalog import fetch_product (returns DownloadedProduct)
from planetarypy.pds.apps import find_indexes, get_index from planetarypy.pds import get_index (find_indexes removed; never used internally)
get_index("cassini.uvis", "index") (two args) get_index("cassini.uvis.index") (single dotted key)
from planetarypy.utils import nasa_datetime_to_iso, iso_to_nasa_date, nasa_date_to_datetime from planetarypy.datetime_format_converters import fromdoyformat + stdlib date.strftime("%Y-%j")

UVPDS still accepts skip_download=... as a keyword argument for
backward compatibility with older tutorial code, but the value is now
ignored — planetarypy handles caching itself, and cache hits are pure
local stat calls.

Removed

  • pyuvis.downloads module deleted. The COUVIS_0xxx volume URL pattern
    it hardcoded is now owned by planetarypy's index registry.
  • All from nbverbose.showdoc import show_doc imports removed
    (leftover nbdev2 utility, never called).

Renamed (BREAKING)

  • CatalogFilter.nasadateCatalogFilter.doydate
  • pyuvis.calib.steffl.steffl_spica_nasa_datessteffl_spica_doy_dates

Fixed

  • steffl_spica_dates had a malformed entry "2001-04-3"; fixed to
    zero-padded "2001-04-03".
  • UVPDS.__init__ now asserts exactly one .DAT file in the resolved
    product rather than silently picking the first match.

Migration tips

# old
from pyuvis.pds import CatalogFilter
cat = CatalogFilter("2002-198")
cat.nasadate                    # -> "2002-198"

# new
from pyuvis.pds import CatalogFilter
cat = CatalogFilter("2002-198")
cat.doydate                     # -> "2002-198"

For the legacy planetarypy datetime helpers, the simplest replacements
are stdlib:

# old: utils.iso_to_nasa_date("2001-04-03")
import datetime as dt
dt.date.fromisoformat("2001-04-03").strftime("%Y-%j")  # "2001-093"

# old: utils.nasa_date_to_datetime("2010-198")
from planetarypy.datetime_format_converters import fromdoyformat
fromdoyformat("2010-198").date()

Support double occultations netcdf files

08 Feb 20:02

Choose a tag to compare

Double occultations would have different dimension names than usual.
The code now figures out the original dataset dimension names for proper initialization before renaming to the human readable versions "pixels", "wavelengths" and "times".

Pre-release of UVIS tools

12 Jul 18:20

Choose a tag to compare

Pre-release

Most of the data reading works for me but the S/W needs to have more eyes on it, so I create this release for a wider dissemination.