• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

ziotom78/Healpix.jl: Healpix library written in Julia

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

ziotom78/Healpix.jl

开源软件地址:

https://github.com/ziotom78/Healpix.jl

开源编程语言:

Julia 99.8%

开源软件介绍:

Healpix

Stable Dev Build Status Codecov ascl:2109.028

Healpix.jl is a set of Julia functions that implement the HEALPix algorithms to pixelate a 2-sphere. The HEALPix pixelisation has a number of features that make it efficient for the following tasks:

  • All pixels have the same area (equal-area pixelisation);
  • It is efficient to compute the Fourier decomposition in spherical harmonics of a discretized signal on the sphere (using the RING ordering scheme);
  • It is efficient to find neighbour pixels (using the NESTED ordering scheme);
  • The base pixelisation divides the 2-sphere in 12 pixels, but each of these pixels can be divided into four sub-pixels, and the process can be continued; in principle, the size of a pixel can be reduced to arbitrarily small values.

HEALPix is widely used in cosmology to store maps of the CMB temperature and polarization anisotropies, which is the field studied by the authors of this package.

Supported platforms

The purpose of Healpix.jl, is to implement a Julia-only library, instead of providing bindings to the original implementation of the C/C++/Fortran/Python Healpix library. This means that, unlike the original implementation, Healpix.jl is fully supported on Windows systems, among with Linux and Mac OS X.

Installation

From the Julia REPL, run

import Pkg
Pkg.add("Healpix.jl")

Usage examples

Here are some code snippets that show how to use Healpix.jl. It is interesting to have a look at test/runtests.jl as well.

Refer to the documentation for more examples.

Dealing with resolutions

The resolution of a HEALPix map is uniquely determined by the NSIDE parameter. Healpix.jl precalculates a number of values from NSIDE to save time during computations; such values are saved in a Healpix.Resolution object:

import Healpix
res = Healpix.Resolution(256)
print("The pixel index is $(Healpix.ang2pixNest(res, 0.1, 0.2))\n")

Reading a map from a FITS file

This snippet loads a map named planck_70GHz.fits into an array of 64-bit floating-point numbers:

import Healpix

m = Healpix.readMapFromFITS("planck_70GHz.fits", 1, Float64)
print("average: $(mean(m.pixels))\n")

How to contribute

See the document CONTRIBUTING.md.

Citing Healpix.jl

If you have used Healpix.jl in your research and want to acknowledge the library in your academic publications, you can reference its ASCL entry through the code ascl:2109.028:

Tomasi M., Li Z. 2021 Healpix.jl: Julia-only port of the HEALPix library, 0.30, Astrophysics Source Code Library ascl:2109.028

Be sure to append ascl:2109.028 to the end of the citation, so that ADS and other bibliographic databases can create a reference to this package.

Here is a BibTeX entry ready to be used, generated by ADS:

@MISC{2021ascl.soft09028T,
       author = {{Tomasi}, Maurizio and {Li}, Zack},
        title = "{Healpix.jl: Julia-only port of the HEALPix library}",
     keywords = {Software},
      version = {3.0},     
         year = 2021,
        month = sep,
          eid = {ascl:2109.028},
        pages = {ascl:2109.028},
archivePrefix = {ascl},
       eprint = {2109.028},
       adsurl = {https://ui.adsabs.harvard.edu/abs/2021ascl.soft09028T},
      adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}

Please update the version number (version = {…}) accordingly.

See the ASCL guidelines for more information.

License

Healpix.jl is released under the GPL license. Versions before 2.3.0 were released under a MIT license, but this was considered incompatible with the way the code has been written (#15).




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
danluu/julia-cookbook: julialang cookbook发布时间:2022-07-09
下一篇:
Statfactory/JuML.jl: Machine Learning in Julia发布时间:2022-07-09
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap