Cygrid: A fast Cython-powered convolution-based gridding module for Python

Context. Data gridding is a common task in astronomy and many other science disciplines. It refers to the resampling of irregularly sampled data to a regular grid. Aims. We present cygrid, a library module for the general purpose programming language Python. Cygrid can be used to resample data to an...

Full description

Saved in:
Bibliographic Details
Published inAstronomy and astrophysics (Berlin) Vol. 591; p. A12
Main Authors Winkel, B., Lenz, D., Flöer, L.
Format Journal Article
LanguageEnglish
Published EDP Sciences 01.07.2016
Subjects
Online AccessGet full text
ISSN0004-6361
1432-0746
1432-0746
DOI10.1051/0004-6361/201628475

Cover

More Information
Summary:Context. Data gridding is a common task in astronomy and many other science disciplines. It refers to the resampling of irregularly sampled data to a regular grid. Aims. We present cygrid, a library module for the general purpose programming language Python. Cygrid can be used to resample data to any collection of target coordinates, although its typical application involves FITS maps or data cubes. The FITS world coordinate system standard is supported. Methods. The regridding algorithm is based on the convolution of the original samples with a kernel of arbitrary shape. We introduce a lookup table scheme that allows us to parallelize the gridding and combine it with the HEALPix tessellation of the sphere for fast neighbor searches. Results. We show that for n input data points, cygrids runtime scales between O(n) and O(nlog n) and analyze the performance gain that is achieved using multiple CPU cores. We also compare the gridding speed with other techniques, such as nearest-neighbor, and linear and cubic spline interpolation. Conclusions. Cygrid is a very fast and versatile gridding library that significantly outperforms other third-party Python modules, such as the linear and cubic spline interpolation provided by SciPy.
Bibliography:e-mail: bwinkel@mpifr.de
https://github.com/bwinkel/cygrid
publisher-ID:aa28475-16
ark:/67375/80W-3L1LJWLM-N
istex:CDA97D5B8DE4DC6C79C914A942540695CCFDB2CA
dkey:10.1051/0004-6361/201628475
bibcode:2016A%26A...591A..12W
ObjectType-Article-1
SourceType-Scholarly Journals-1
ObjectType-Feature-2
content type line 23
ISSN:0004-6361
1432-0746
1432-0746
DOI:10.1051/0004-6361/201628475