zsh2270365028的个人博客分享 http://blog.sciencenet.cn/u/zsh2270365028


[转载]python install kapteyn packages

已有 347 次阅读 2019-6-21 10:50 |个人分类:Python|系统分类:科研笔记|文章来源:转载

(一) Download kapteyn-master.zip (refer to: https://github.com/kapteyn-astro/kapteyn)

(二) Installing (refer to: https://www.astro.rug.nl/software/kapteyn/intro.html)

  1. First unpack the downloaded .tar.gz or .zip file and go to the resulting directory. Then one of the following options can be chosen:

    将解压缩的kapteyn-master copy 到python中放packages的地方:~/anaconda3/lib/python3.7/site_packages/kapteyn_master

  2. Install into your Python system (you usually need root permission for this):

    python setup.py install


  3. If you prefer not to modify your Python installation, you can create a directory under which to install the module e.g., mydir. Then install as follows:

    python setup.py install --install-lib mydir

    To use the package you then need to include mydir in your PYTHONPATH.

  4. If you want to use this package only for GIPSY, you can install it as follows:

    python setup.py install --install-lib $gip_exe

    The GIPSY installation procedure normally does this automatically, so usually this will not be necessary

(三)关于kapteyn packages

The following modules are included:

  • wcs, a binary module which handles spatial and spectral coordinates and provides WCS projections and transformations between different sky systems. Spectral translations (e.g., between frequencies and velocities) are supported and also mixed coordinates.

  • celestial, containing NumPy-based functions for creating matrices for transformation between different celestial systems. Also a number of other utility functions are included.

  • wcsgrat, for calculating parameters for WCS graticules. It does not require a plot package.

  • maputils. Provides methods for reading FITS files. It can extract 2-dim image data from data sets with three or more axes. A class is added which prepares FITS data to plot itself as an image with Matplotlib.

  • positions, enabling a user/programmer to specify positions in either pixel- or world coordinates.

  • rulers, defining a class for drawing rulers.

  • shapes, defining a class for interactively drawing shapes that define an area in an image. For each area a number of properties of the data is calculated. This module can duplicate a shape in different images using transformations to world coordinates. This enables one for instance to compare flux in two images with different WCS systems.

  • mplutil, utilities for use with matplotlib. Classes AxesCallback, providing a more powerful mechanism for handling events from LocationEvent and derived classes than matplotlib provides itself; TimeCallback for handling timer events and VariableColormap which implements a matplotlib Colormap subclass with special methods that allow the colormap to be modified.

  • kmpfit, providing a class and a function for non-linear least-squares fitting, using the Levenberg-Marquardt technique. It is based on the implementation in C of Craig Markwardt’s MPFIT.

  • tabarray, providing a class for the efficient reading, writing and manipulating simple table-like structures in text files.




该博文允许注册用户评论 请点击登录 评论 (0 个评论)


Archiver|手机版|科学网 ( 京ICP备14006957 )

GMT+8, 2019-8-20 04:29

Powered by ScienceNet.cn

Copyright © 2007- 中国科学报社