Skip to content

Commit

Permalink
Remove nufft classes.
Browse files Browse the repository at this point in the history
Have been moved to pyxu_nufft/ repo.
  • Loading branch information
SepandKashani committed Apr 22, 2024
1 parent fe181d8 commit 49ed3dc
Show file tree
Hide file tree
Showing 21 changed files with 4 additions and 5,010 deletions.
49 changes: 0 additions & 49 deletions dev/todo.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,6 @@ pyxu.math.backtracking_linesearch()
Known to be algorithmically inefficient for DASK inputs.
Call pxw.warn_dask_perf()

pyxu.math.cluster
[grid,bisect]_cluster() don't depend on KDTree() anymore, hence can be refactored to work with CUPY arrays too.

CuPy v14 will add support for KDTree [https://github.com/cupy/cupy/pull/7671]
This module can hence be made NP/CP-compatible in 2024.H2.

pyxu.opt.adam
Refactor to ND API. (2023.12.29: not started yet.)
Update test_adam.py
Expand Down Expand Up @@ -116,30 +110,13 @@ pyxu.operator.blocks

Composite op completely replaces blocks.py and will be part of abc/.

pyxu.operator.UniformSpread
Passing Operator sub-classes as `kernel` parameter does not work well with dask.distributed.
pickle errors.
Using a generic function works though.
We can side-step this at the moment, but it would be good to be able to pass arbitrary objects as `kernels`.

pyxu.operator.linop.kron
Refactor to ND API. (2024.01.01: not started yet.)
Update test_kron.py

pyxu.operator.linop.fft.czt
There are known closed forms for gram()/cogram(), hence pinv(): implement them.

pyxu.operator.linop.fft.nufft
Move old FINUFFT-based NUFFT implementations to an extension module.

Pyxu-core built-in NUFFTs currently limited to NUMPY/DASK due to UniformSpread's NUMPY/DASK limitation.
Since _build_cl_info() no longer depends on kd-trees, adding CUPY support to type-1/2 is simple once UniformSpread becomes CUPY-compliant.
[It is advised to change (window_ratio, max_cluster_size) for GPU workloads though.]

Type-3: CuPy backend currently disabled.
At the implementation level, the code is GPU-compatible. The issue is just _partition_domain() and _init_metadata() which need updates to output CuPy arrays in some places.


Known Issues: Cause Unknown (Investigate)
TestTan::test_transparent_call
TestTanh::test_math_diff_lipschitz
Expand Down Expand Up @@ -180,34 +157,8 @@ Known Issues: Cause Known (& Fixable?)
TestExplicitLinXX::test_chunk_fenchel_prox
TestExplicitLinXX::test_chunk_grad
TestExplicitLinXX::test_chunk_pinv
[OK] DASK-case: Fixture[_op_array] cannot instantiate due to chunk-size mismatch.
Can be fixed but complicated, so we accept the failure (for now)
We know from manual tests that asarray() is correct for all backends.
TestUniformSpread::test_backend_asarray
TestUniformSpread::test_prec_asarray
TestUniformSpread::test_value_asarray
TestNUFFT1::test_backend_asarray [NUFFT1 errors are due to UniformSpread]
TestNUFFT1::test_prec_asarray
TestNUFFT1::test_value_asarray
[OK] DASK-case: Fixture[_op_asarray, width=DOUBLE] does not denote the true ground-truth due to DASK-based FFT()
error accumulation. Not really a problem because errors are in 1e-7 range, but did not look into how to fix
them yet.
TestFFT::test_value_asarray
TestCZT::test_value_asarray
TestFFS::test_value_asarray
[OK] DASK-case: fails because generated test data does not match chunking structure of (`op._x`, `op._v`).
These tests were not designed with chunk-size restrictions in mind. Can probably make then chunk-aware,
but not a priority at the moment.
We note that these tests work on NUMPY inputs, so the operators are correct.
TestNUFFT1::test_math_adjoint
TestNUFFT1::test_math_gram
TestNUFFT1::test_math_lipschitz
TestNUFFT1::test_math2_lipschitz
TestNUFFT1::test_math3_lipschitz
TestNUFFT1::test_value1D_svdvals
TestNUFFT3::test_math_adjoint
TestNUFFT3::test_math_gram
TestNUFFT3::test_math_lipschitz
TestNUFFT3::test_math2_lipschitz
TestNUFFT3::test_math3_lipschitz
TestNUFFT3::test_value1D_svdvals
14 changes: 0 additions & 14 deletions doc/api/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -264,8 +264,6 @@ Transforms

~pyxu.operator.FFT
~pyxu.operator.CZT
~pyxu.operator.NUFFT1
~pyxu.operator.NUFFT2

Stencils & Convolutions
+++++++++++++++++++++++
Expand All @@ -278,7 +276,6 @@ Stencils & Convolutions
~pyxu.operator.FFTCorrelate
~pyxu.operator.Stencil
~pyxu.operator._Stencil
~pyxu.operator.UniformSpread

Filters
+++++++
Expand Down Expand Up @@ -371,17 +368,6 @@ Element-wise Operators
~pyxu.operator.Tan
~pyxu.operator.Tanh

Pulses
++++++

.. autosummary::

~pyxu.operator.Box
~pyxu.operator.Dirac
~pyxu.operator.FSSPulse
~pyxu.operator.KaiserBessel
~pyxu.operator.Triangle

pyxu.opt.solver
---------------

Expand Down
8 changes: 0 additions & 8 deletions doc/api/operator/linop.rst
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,6 @@ Transforms
:members: apply, adjoint
:special-members: __init__

.. autoclass:: pyxu.operator.NUFFT1
:no-members:
:members: apply, adjoint, config

.. autofunction:: pyxu.operator.NUFFT2

Stencils & Convolutions
-----------------------

Expand All @@ -73,8 +67,6 @@ Stencils & Convolutions

.. autoclass:: pyxu.operator.FFTConvolve

.. autoclass:: pyxu.operator.UniformSpread

Filters
-------

Expand Down
18 changes: 0 additions & 18 deletions doc/api/operator/map.rst
Original file line number Diff line number Diff line change
Expand Up @@ -78,21 +78,3 @@ Misc

.. autoclass:: pyxu.operator.BroadcastAxes
:exclude-members: apply, adjoint

Pulses
------

.. autoclass:: pyxu.operator.FSSPulse
:exclude-members: argscale

.. autoclass:: pyxu.operator.Dirac
:exclude-members: apply, applyF, support, supportF

.. autoclass:: pyxu.operator.Box
:exclude-members: apply, applyF, support

.. autoclass:: pyxu.operator.Triangle
:exclude-members: apply, applyF, support

.. autoclass:: pyxu.operator.KaiserBessel
:exclude-members: apply, applyF, support, supportF
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ dependencies = [
"dask[array,diagnostics,distributed] >= 2023.12, < 2024.3",
"numba >= 0.59, < 1",
"numpy >= 1.24, < 2",
"opt-einsum >= 3.3.0, < 4",
"packaging >= 23.1",
"scipy >= 1.11, < 2",
"zarr >= 2.16, < 2.18",
Expand Down
Loading

0 comments on commit 49ed3dc

Please sign in to comment.