Skip to content

Commit 9b193ea

Browse files
committed
More descriptive changelog
1 parent 3cca659 commit 9b193ea

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

CHANGES.rst

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,21 @@ Breaking Changes
1010
^^^^^^^^^^^^^^^^
1111

1212
- Cube cutout filenames now use a hyphen between dimensions (e.g., ``10-x-10`` instead of ``10x10``). They also include unit suffixes when
13-
users request sizes as an `astropy.units.Quantity` object (e.g., ``5arcmin-x-4arcmin`` or ``30arcsec-x-20arcsec``). This change may break
14-
code that parses filenames or relies on old glob patterns. [#167]
13+
users request sizes as an ``astropy.units.Quantity`` object (e.g., ``5arcmin-x-4arcmin`` or ``30arcsec-x-20arcsec``). RA/Dec formatting within
14+
filenames now uses 7 decimal places (``{:.7f}``) for consistency across classes. These changes may break code that parses filenames or relies on
15+
old glob patterns. [#167]
1516

1617
Migration:
1718

1819
- Update glob patterns from ``*_<ra>_<dec>_<ny>x<nx>_astrocut.fits`` to ``*_<ra>_<dec>_*-x-*_astrocut.fits``.
19-
- If parsing filenames, adjust regex accordingly (e.g., replace ``(?P<ny>\d+)x(?P<nx>\d+)`` with
20-
``(?P<ny>\d+(?:\.\d+)?)(?P<ny_unit>arcsec|arcmin|deg|pixel|pix)?-x-(?P<nx>\d+(?:\.\d+)?)(?P<nx_unit>arcsec|arcmin|deg|pixel|pix)?``).
21-
- Prefer reading dimensions from file metadata (e.g., FITS headers) when possible to avoid filename coupling.
20+
- If parsing filenames, switch to flexible regex patterns:
21+
- RA/Dec: ``_(?P<ra>[-+]?\\d+(?:\\.\\d+)?)_(?P<dec>[-+]?\\d+(?:\\.\\d+)?)_``
22+
- Dimensions (with optional units): ``(?P<ny>\\d+(?:\\.\\d+)?)(?P<ny_unit>arcsec|arcmin|deg|pixel|pix)?-x-(?P<nx>\\d+(?:\\.\\d+)?)(?P<nx_unit>arcsec|arcmin|deg|pixel|pix)?``
23+
- Prefer reading RA/Dec, dimensions, and scales from file metadata (FITS headers/WCS) instead of relying on filenames.
24+
- Example transition:
25+
- Old: ``..._83.406310_-62.489771_64x64_astrocut.fits``
26+
- New (no unit - pixels assumed): ``..._83.4063100_-62.4897710_64-x-64_astrocut.fits``
27+
- New (with units): ``..._83.4063100_-62.4897710_5arcmin-x-4arcmin_astrocut.fits``
2228

2329

2430
1.1.0 (2025-09-15)

0 commit comments

Comments
 (0)