Giter VIP home page Giter VIP logo

nfft3.jl's Introduction

NFFT - Nonequispaced FFT

Overview

NFFT is a software library, written in C, for computing non-equispaced fast Fourier transforms and related variations. It implements the following transforms:

  1. Non-equispaced fast Fourier transform (NFFT)

    • forward transform (NFFT), i.e. frequency to time/space domain
    • adjoint transform (adjoint NFFT), i.e. time/space to frequency domain
  2. Generalisations

    • to arbitrary nodes in time and frequency domain (NNFFT)
    • to real-valued data, i.e. (co)sine transforms, (NFCT, NFST)
    • to the sphere S^2 (NFSFT)
    • to the rotation group (NFSOFT)
    • to the hyperbolic cross (NSFFT)
  3. Generalised inverse transformations based on iterative methods, e.g. CGNR/CGNE

Some examples for application of these transforms are provided:

  1. Medical imaging

    • magnetic resonance imaging (mri)
    • computerised tomography (radon)
  2. Summation schemes

    • fast summation (fastsum)
    • fast Gauss transform (FGT)
    • singular kernels
    • zonal kernels
  3. polar FFT, discrete Radon transform, ridgelet transform

Detailed API documentation in HTML format can be found in doc/html/index.html, if you are working from a release tarball. When working from a source repository, the documentation can be generated with Doxygen (which requires the doxygen-latex and perl packages):

make doc

Building

The NFFT depends on the FFTW library, which is available for many Linux distros, Homebrew on macOS and MSYS2 on Windows. If you compile the FFTW yourself, it should be configured with the flag --enable-shared (and --enable-threads for the multi-threaded version). Building the NFFT requires make and a C compiler such as gcc.

When working from a source repository, you need to run libtoolize and autoreconf first. A bash script to do this is provided. This step requries the tools autoconf, automake and libtool.

./bootstrap.sh

The rest of the build process is standard.

./configure --enable-all --enable-openmp [add options as necessary, see below]

Alternatively, you might run the configure script for Matlab.

./configure --enable-all --enable-openmp --with-matlab=/path/to/matlab

Here are some useful optional flags for ./configure:

  • --enable-all specifies that all modules should be compiled,
  • --enable-openmp enables the multicore support and
  • --enable-julia specifies that the julia interface will be compiled.
  • --with-matlab=/path/to/matlab specifies the path of a Matlab installation, and
  • --with-octave=/path/to/octave does the same for GNU Octave.
  • For a list of all available options, run ./configure --help.

Build the software.

make

Optionally, unit tests may be run. Some of the unit tests require an installation of cunit.

make check

Optionally, install NFFT on your system.

make install

Citing

The current general paper, the one that we recommend if you wish to cite NFFT, is Keiner, J., Kunis, S., and Potts, D. ''Using NFFT 3 - a software library for various nonequispaced fast Fourier transforms'' ACM Trans. Math. Software 36, Article 19, 1-30, 2009. BibTeX entry:

@article{KeKuPo09,
 author = {Jens Keiner and Stefan Kunis and Daniel Potts},
 title = {Using {NFFT3} - a Software Library for Various Nonequispaced Fast {Fourier} Transforms},
 journal = {{ACM} Trans. Math. Software},
 year = {2009},
 volume = {36},
 pages = {Article 19, 1--30},
 doi = {10.1145/1555386.1555388}}

Feedback

Your comments are welcome! This is the third version of the library and may not be as robust or well documented as it should be. Please keep track of bugs or missing/confusing instructions and report them in our issue tracker or directly to Daniel Potts. The postal address is

  Prof. Dr. Daniel Potts
  TU Chemnitz, Fakultaet fuer Mathematik
  Reichenhainer Str. 39
  09107 Chemnitz
  GERMANY

Alternatively, you might contact Stefan Kunis or Jens Keiner.

If you find NFFT useful, we would be delighted to hear about what application you are using NFFT for!

Legal Information & Credits

Copyright (c) 2002, 2017 Jens Keiner, Stefan Kunis, Daniel Potts

This software was written by Jens Keiner, Stefan Kunis and Daniel Potts. It was developed at the Mathematical Institute, University of Luebeck, and at the Faculty of Mathematics, Chemnitz University of Technology.

NFFT3 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 2 of the License, or (at your option) any later version. If not stated otherwise, this applies to all files contained in this package and its sub-directories.

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, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

Directory structure

File/Folder Purpose
3rdparty (dir) Third-party source code
aclocal.m4 Macros for configure script
applications (dir) Application programs (see 4) above)
AUTHORS Information about the authors of NFFT
bootstrap.sh Bootstrap shell script that call Autoconf and friends
ChangeLog A short version history
config (dir) Used by configure script
configure Configure script (created by calling ./bootstrap.sh)
configure.ac Autoconf configure script template
CONVENTIONS Internal coding conventions
COPYING Information about redistributing NFFT
doc (dir) User and developer documentation
examples (dir) Simple examples for using NFFT routines
include (dir) Header files
INSTALL Installation instructions
julia (dir) Julia interface for nfft
kernel (dir) Source code for core library routines
Makefile.am Automake Makefile template
Makefile.in Makefile template generated from Makefile.am, processed by configure script
matlab (dir) Matlab MEX interfaces for nfft, nfsft, nfsoft, nfft
NEWS New and noteworthy
README This file
README.md This file
tests (dir) CUnit tests

nfft3.jl's People

Contributors

mischmi96 avatar passscoed avatar tomriem avatar tvolkmer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

tknopp

nfft3.jl's Issues

TagBot trigger issue

This issue is used to trigger TagBot; feel free to unsubscribe.

If you haven't already, you should update your TagBot.yml to include issue comment triggers.
Please see this post on Discourse for instructions and more details.

If you'd like for me to do this for you, comment TagBot fix on this issue.
I'll open a PR within a few hours, please be patient!

write README

The README file needs content with references to the original NFFT3.

Issue on Apple Silicon with native Julia Build

Hi,

I did not expect this to work but still report the error. On the native arm build of Julia we get the error below. Does the C library already compile on arm64e?

(jl_tAyv3V) pkg> add NFFT3
    Updating registry at `~/.julia/registries/General.toml`
   Resolving package versions...
    Updating `/private/var/folders/x7/crh034116fl_xp9hzmnqjtxr0000gn/T/jl_tAyv3V/Project.toml`
  [53104703] + NFFT3 v1.1.0
    Updating `/private/var/folders/x7/crh034116fl_xp9hzmnqjtxr0000gn/T/jl_tAyv3V/Manifest.toml`
  [53104703] + NFFT3 v1.1.0
Precompiling project...
  โœ— NFFT3
  0 dependencies successfully precompiled in 1 seconds
  1 dependency errored. To see a full report either run `import Pkg; Pkg.precompile()` or load the package

julia> using NFFT3
[ Info: Precompiling NFFT3 [53104703-03e8-40a5-ab01-812303a44cae]
ERROR: LoadError: could not load library "/Users/knopp/.julia/packages/NFFT3/1hIEY/src/libnfftjulia.dylib"
dlopen(/Users/knopp/.julia/packages/NFFT3/1hIEY/src/libnfftjulia.dylib, 0x0001): tried: '/Users/knopp/.julia/packages/NFFT3/1hIEY/src/libnfftjulia.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e')), '/usr/local/lib/libnfftjulia.dylib' (no such file), '/usr/lib/libnfftjulia.dylib' (no such file)
Stacktrace:

Set number of threads

Hi,

I am working at some benchmarks between NFFT.jl and NFFT3 and would like make a comparison with multi-threading turned off. Is this doable with NFFT3.jl ? It seem by default the number of threads is set to 4. Is there a simple way to change this? Ideally without compiling any stuff since I want to make NFFT3 a test dependency and run the tests with CI.

Thanks

Tobi

Issue on Apple Silicon

Hi, I just tried NFFT3 on Apple Silicon and it seems to be not working. When I run the test suite on a fresh install I get the error message below. My Julia ist still the x86 one running in Rosetta2, i.e. it should actually work. I tried also FINUFFT, which runs in the same setting and had no issues.

signal (4): Illegal instruction: 4
in expression starting at /Users/knopp/.julia/packages/NFFT3/1hIEY/test/NFFT.jl:8
init_help at /Users/knopp/.julia/packages/NFFT3/1hIEY/src/libnfftjulia.dylib (unknown line)
nfft_init at /Users/knopp/.julia/packages/NFFT3/1hIEY/src/NFFT.jl:198
setproperty! at /Users/knopp/.julia/packages/NFFT3/1hIEY/src/NFFT.jl:223
unknown function (ip: 0x10bcd4361)
jl_apply_generic at /Applications/Julia-1.7.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.7.dylib (unknown line)
do_call at /Applications/Julia-1.7.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.7.dylib (unknown line)
eval_body at /Applications/Julia-1.7.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.7.dylib (unknown line)
jl_interpret_toplevel_thunk at /Applications/Julia-1.7.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.7.dylib (unknown line)
jl_toplevel_eval_flex at /Applications/Julia-1.7.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.7.dylib (unknown line)
jl_toplevel_eval_flex at /Applications/Julia-1.7.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.7.dylib (unknown line)
jl_toplevel_eval_in at /Applications/Julia-1.7.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.7.dylib (unknown line)
eval at ./boot.jl:373 [inlined]
include_string at ./loading.jl:1196
jl_apply_generic at /Applications/Julia-1.7.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.7.dylib (unknown line)
_include at ./loading.jl:1253
include at ./client.jl:451
jl_apply_generic at /Applications/Julia-1.7.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.7.dylib (unknown line)
do_call at /Applications/Julia-1.7.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.7.dylib (unknown line)
eval_body at /Applications/Julia-1.7.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.7.dylib (unknown line)
jl_interpret_toplevel_thunk at /Applications/Julia-1.7.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.7.dylib (unknown line)
jl_toplevel_eval_flex at /Applications/Julia-1.7.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.7.dylib (unknown line)
jl_toplevel_eval_flex at /Applications/Julia-1.7.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.7.dylib (unknown line)
jl_toplevel_eval_in at /Applications/Julia-1.7.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.7.dylib (unknown line)
eval at ./boot.jl:373 [inlined]
include_string at ./loading.jl:1196
jl_apply_generic at /Applications/Julia-1.7.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.7.dylib (unknown line)
_include at ./loading.jl:1253
include at ./client.jl:451
jl_apply_generic at /Applications/Julia-1.7.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.7.dylib (unknown line)
do_call at /Applications/Julia-1.7.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.7.dylib (unknown line)
eval_body at /Applications/Julia-1.7.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.7.dylib (unknown line)
jl_interpret_toplevel_thunk at /Applications/Julia-1.7.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.7.dylib (unknown line)
jl_toplevel_eval_flex at /Applications/Julia-1.7.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.7.dylib (unknown line)
jl_toplevel_eval_flex at /Applications/Julia-1.7.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.7.dylib (unknown line)
jl_toplevel_eval_in at /Applications/Julia-1.7.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.7.dylib (unknown line)
eval at ./boot.jl:373 [inlined]
exec_options at ./client.jl:268
_start at ./client.jl:495
jl_sysimg_fvars_base at /Applications/Julia-1.7.app/Contents/Resources/julia/lib/julia/sys.dylib (unknown line)
jl_apply_generic at /Applications/Julia-1.7.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.7.dylib (unknown line)
true_main at /Applications/Julia-1.7.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.7.dylib (unknown line)
jl_repl_entrypoint at /Applications/Julia-1.7.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.7.dylib (unknown line)
Allocations: 2469808 (Pool: 2469016; Big: 792); GC: 3
ERROR: Package NFFT3 errored during testing (received signal: 4)

Plan

Hello Sir,

I am new to Julia and NFFT so please do not mind if it is a silly question. I am trying to perform a one-dimensional NFFT using NFFT3 in Julia. The issue is I am not able to build Plan for the transformation. Can you help me with the function? I really appreciate any help you can provide.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.