|||
(一) Download kapteyn-master.zip (refer to: https://github.com/kapteyn-astro/kapteyn)
(二) Installing (refer to: https://www.astro.rug.nl/software/kapteyn/intro.html)
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
Install into your Python system (you usually need root permission for this):
python setup.py install
我的安装过程只用了1,2两步。
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.
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.
Archiver|手机版|科学网 ( 京ICP备07017567号-12 )
GMT+8, 2024-4-25 17:12
Powered by ScienceNet.cn
Copyright © 2007- 中国科学报社