Metadata-Version: 2.4
Name: ddfacet-kernels
Version: 0.1.1
Summary: Package generating DDFacet W Kernels
Author-email: Simon Perkins <simon.perkins@gmail.com>
License-File: LICENSE
Requires-Python: >=3.8
Requires-Dist: numpy>=1.24.4
Provides-Extra: dev
Requires-Dist: pre-commit>=3.5.0; extra == 'dev'
Requires-Dist: ruff>=0.11.13; extra == 'dev'
Requires-Dist: tbump>=6.11.0; extra == 'dev'
Provides-Extra: numba
Requires-Dist: numba>=0.58.1; extra == 'numba'
Provides-Extra: tests
Requires-Dist: pytest>=8.3.5; extra == 'tests'
Description-Content-Type: text/x-rst

=====================================
DDFacet W Projection Gridding Kernels
=====================================

This repository reproduces DDFacet's W Projection Gridding Kernels
to machine precision with only NumPy as a dependency.

License
-------

Copyright (C) 2025 South African Radio Astronomy Observatory,
Rhodes University, l'Observatoire de Paris

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU 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 General Public License for more details.

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

Installation
------------

.. code-block:: bash

  $ pip install ddfacet-kernels

Usage
-----


.. code-block:: python

  from ddfacet_kernels import wplanes

  wterm_data = wplanes(
    nwplanes=7,
    cell_size=0.2  # arc-seconds
    support=15,
    maxw=30000.,
    npix=1025,
    oversampling=11,
    lmshift=(1e-5, 2e-5),
    frequencies=np.linspace(.856e9, 2*.856e9, 4096)
  )

Testing
-------

The test suite depends on test data produced from the DDFacet code base
by the :code:`gen-test-data/gen_test_data.py` script.
With the file ``test-data.pickle.xz`` generated by this script,
it is possible to run the entire test suite as follows:

.. code-block:: bash

  $ virtualenv -p 3.10 venv
  $ source venv/bin/activate
  (venv) $ pip install -e .[tests]
  (venv) $ py.test -s -vvv --ddf-test-data test-data.pickle.xz

The rest of the test suite will run without the ``--ddf-test-data`` argument.
See the github actions workflow to see how to generate the test data.

Acknowledgements
----------------

Cyril Tasse and Sunrise Wang contributed valuable
discussion and explanation on the Fourier Theory
required to document this code base.
