Installation

Dependencies

numpy, matplotlib, astropy, cartopy, geopy, h5py, pysofa

Installation

Before installing cavsiopy some of the dependencies need special installation instructions:

cartopy

  • If you are installing cartopy via pip (on Ubuntu/Debian) first libgeos-dev has to be on your system:

$ sudo apt -y install libgeos-dev
$ pip install -r requirements.txt
$ conda install -c conda-forge cartopy

pysofa

pysofa is the Python wrapper for the Standards of Fundamental Astronomy (SOFA) written by Brian Kloppenborg. cavsiopy depends on pysofa for determining the ICRF to ITRF rotation matrix.

Here we follow <https://kloppenborg.net/blog/building-sofa-for-pysofa/> for pysofa installation.

$ sudo apt-get install python python-all-dev build-essential cmake
cmake_minimum_required(VERSION 2.6)
project(sofa_c C)

# Set a few variables
set(LIBS ${LIBS} m)

# Extract all of the source files
file(GLOB_RECURSE C_SOURCE . src/"\\*".c)

# Build a shared library
add_library(sofa_c SHARED ${C_SOURCE})

# Now define the installation options
install(TARGETS sofa_c LIBRARY DESTINATION lib)

Save and close the file.

Execute the following comments:

$ cmake .

$ make

$ make install

$ sudo ldconfig
  • you may need some more tweaking for the installation of pysofa. Possible solutions are listed below:

  1. ModuleNotFoundError: No module named ‘pysofa_ctypes’

copy the contents of pysofa_ctypes to __init__.py

  1. if __sofa_version < (2010, 12, 01):

    ^

SyntaxError: leading zeros in decimal integer literals are not permitted; use an 0o prefix for octal integers

find and replace all 2010, 12, 01 with 2010, 12, 1 in __init__.py

Other packages and requirements

pip install --no-deps astropy

pip install geopy

pip install -r requirements.txt

** Now, we are good to go! **

pip install cavsiopy

Credits: C. Eyiguler, Warren Holley, Andrew D. Howarth, Donald W. Danskin, Kuldeep Pandey, Carley Martin

Contributing: Glenn C. Hussey, Robert Gillies, Andrew W. Yau

License: GNU LESSER GENERAL PUBLIC LICENSE Version 3, 29 June 2007