Metadata-Version: 2.4
Name: starlink-pyast
Version: 4.3.0
Summary: A Python wrapper for the Starlink AST library
Author-email: "David S. Berry" <d.berry@eaobservatory.org>, Tim Jenness <tjenness@lsst.org>
License-Expression: LGPL-3.0-or-later
Project-URL: Homepage, https://www.starlink.ac.uk/ast
Project-URL: Source, https://github.com/Starlink/starlink-pyast
Classifier: Intended Audience :: Science/Research
Classifier: Programming Language :: C
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering :: Astronomy
Requires-Python: >=3.11.0
Description-Content-Type: text/markdown
Requires-Dist: numpy
Provides-Extra: atl
Requires-Dist: astropy; extra == "atl"
Provides-Extra: grf
Requires-Dist: matplotlib; extra == "grf"

PyAST is a Python extension that provides an interface to the Starlink
AST library. It requires Python v2.7 or later. It can be obtained from
<http://pypi.python.org/pypi/starlink-pyast/>. To install, do:

    $ pip install starlink-pyast

or when building locally:

    $ pip install .
    $ python -m build
    $ python setup.py install --prefix=<installation directory>

To test it, do:

    $ python src/starlink/ast/test/test.py

User docs are available at http://starlink.github.io/starlink-pyast/pyast.html


## History

### 4.3.0

* Update to AST release 9.6.0.
  This release hardens AST against corrupt and malicious input and fixes a large number of long-standing faults.
  The full list of changes is in `ast/ast.news`.
  Changes in behavior include:
  * A MOC written as a string by `Moc.getmocstring` or a MocChan now separates its cells with spaces rather than commas.
    Either form can be read.
  * A `CDELT` value of zero in a FITS header is replaced by a millionth of the `CRVAL` value of the same axis, rather than by 1.0.
  * Conversions from FK5 to FK4 at a Besselian epoch other than B1950 now apply the fictitious FK4 proper motion.
    Positions near a celestial pole can change by up to 28 milli-arcseconds at B1980.
  * Projection fixes from wcslib have been applied to WcsMap, which changes the last bit of many projected values.
  * A `Format` attribute value must be a `printf` format for a single floating point or integer value.
  * The ERFA library included in AST has been updated to version 2.0.1 and PAL to version 0.9.10.
* A YamlChan can read and write the ASDF/GWCS `fitswcs_imaging` transform.
  This requires a build that includes YAML support.
* A libyaml installed by Homebrew is now found when building from source.
  Setting the `PYAST_NO_YAML` environment variable builds without YAML support.
* The matplotlib Grf backend measures each text string once and caches the result,
  so `Plot.grid` spends far less time in `TxExt` when a plot is redrawn while zooming.
* Text extents follow a change of figure dpi instead of using the renderer the Grf
  object first saw.
* Exceptions raised while reading from a Channel or FitsChan source are now propagated to the caller.
* Exceptions raised by a Channel or FitsChan sink are now propagated to the caller, and writing stops at the first failure.
* Fixed the construction of a FitsChan or Channel from a sequence, which converted each item with `repr()` internally.
  Lines containing backslashes or tabs were corrupted, and items that were not plain strings (such as astropy cards) were read as their `repr()` text.
  Items are now passed to AST as their string value.
* Channel and FitsChan sources can supply lines as ASCII bytes as well as strings.
* A FitsChan can be created from a sequence of astropy Card objects (e.g. header.cards).
  An item of the sequence that holds several concatenated 80-character cards is read as those cards.
* Reading an attribute now raises an exception if AST reports an error.
  Previously a value was returned and the error surfaced later in unrelated code, usually as a `SystemError`.
* Fixed a reference leak when reading integer, floating point, string and colour attributes.
* `str()`, `repr()`, `hasattribute()`, `keys()` and integer indexing of a FitsChan now raise any exception raised by its source.
* `FitsChan.findfits` now returns an empty string as the card when no card is found.
  Previously the card text was undefined.
* `Channel.warnings()` and `FitsChan.gettables()` now return `None` when there are no warnings or tables, rather than raising `SystemError`.

### 4.2.0

Update to AST release 9.5.0.

### 4.1.0

Update to AST release 9.4.0.

### 4.0.1

* Remove GPL license file from AST subdirectory that was included by mistake.
  The package has always used LGPL and this change removes some confusion.

### 4.0.0

* Update AST to version 9.3.0.
* New minimum version of Python 3.11.
* Support Python 3.14 and numpy 2.0.
* Add support for SplineMap mapping.
* Fixed handling of `options` parameters in constructors (they were always ignored previously).
* Many internal cleanups associated with no longer having to support legacy versions.
* Improved detection of YAML library in a Conda environment.
* Now support standard build tooling and metadata via `pyproject.toml`.

### 3.15.4

* Upgrade AST internals to version 9.2.5.

## Licence

   This program is free software: you can redistribute it and/or
   modify it under the terms of the GNU Lesser General Public
   License as published by the Free Software Foundation, either
   version 3 of the License, or (at your option) any later
   version.

   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU Lesser General Public License for more details.

   You should have received a copy of the GNU Lesser General
   License along with this program.  If not, see
   <http://www.gnu.org/licenses/>.
