# [×ªÔØ]python install kapteyn packages

ÒÑÓÐ 347 ´ÎÔÄ¶Á 2019-6-21 10:50 |¸öÈË·ÖÀà:Python|ÏµÍ³·ÖÀà:¿ÆÑÐ±Ê¼Ç|ÎÄÕÂÀ´Ô´:×ªÔØ

(¶þ) 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

ÎÒµÄ°²×°¹ý³ÌÖ»ÓÃÁË1£¬2Á½²½¡£

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

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.

http://blog.sciencenet.cn/blog-587102-1186124.html

ÉÏÒ»Æª£º[×ªÔØ]numpyÊý×éÆ´½Ó·½·¨½éÉÜ
ÏÂÒ»Æª£º[×ªÔØ]pycharm´úÂëÕûÌå×óÒÆºÍÓÒÒÆËõ½ø¿ì½Ý¼ü

Êý¾Ý¼ÓÔØÖÐ...