Code Monkey home page Code Monkey logo

auromat's Introduction

AUROra MApping Toolkit

Linux Build Status Code Health

Installation under Linux

The following assumes Ubuntu, but should be similar for other distributions.

Before installing auromat, some system libraries have to be installed.

sudo apt-get install libraw-dev liblensfun-dev libgeos-dev

If you want to use THEMIS data or export in CDF format you have to install NASA's CDF library:

wget http://cdaweb.gsfc.nasa.gov/pub/software/cdf/dist/cdf35_0_2/linux/cdf35_0-dist-cdf.tar.gz
tar xf cdf35_0-dist-cdf.tar.gz
cd cdf35_0-dist
make OS=linux ENV=gnu all
sudo make INSTALLDIR=/usr/local/cdf install
cd ..

Also, for using the CDF library in Python we need the spacepy library. As this is not yet released on PyPI, you have to install it manually using:

    sudo apt-get install libhdf5-serial-dev
pip install --user numpy python-dateutil
pip install --user git+http://git.code.sf.net/p/spacepy/code

If you want to export in netCDF format:

sudo apt-get install libnetcdf-dev libhdf5-serial-dev

If you want to draw any kind of geographic maps, install the basemap library with:

pip install --user --allow-external basemap --allow-unverified basemap basemap

Now, install auromat with:

pip install --user auromat[cdf,netcdf]

Support for CDF or netCDF can be left out using auromat[cdf] or auromat[netcdf], respectively.

The command-line tools are installed in ~/.local/bin. For convenience you should add this folder to your PATH if that is not the case already:

export PATH=$HOME/.local/bin:$PATH

Installation under Mac OS X

First, install Homebrew if you don't have it yet:

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew update

Then, install Python 3 with Homebrew:

brew install python3

If you want to use THEMIS data or export in CDF format you have to install NASA's CDF library:

curl -O http://cdaweb.gsfc.nasa.gov/pub/software/cdf/dist/cdf35_0_2/linux/cdf35_0-dist-cdf.tar.gz
tar xf cdf35_0-dist-cdf.tar.gz
cd cdf35_0-dist
make OS=macosx ENV=gnu all
sudo make INSTALLDIR=/Applications/cdf install
cd ..

Also, for using the CDF library in Python we need the spacepy library. As this is not yet released on PyPI, you have to install it manually using:

pip3 install numpy python-dateutil
pip3 install git+http://git.code.sf.net/p/spacepy/code

If you want to export in netCDF format:

brew tap homebrew/science
brew install netcdf hdf5

If you want to draw any kind of geographic maps, install the basemap library with:

brew install geos
pip3 install --allow-external basemap --allow-unverified basemap basemap

Now, install auromat with:

sudo pip3 install auromat[cdf,netcdf]

Support for CDF or netCDF can be left out using auromat[cdf] or auromat[netcdf], respectively.

Installation under Windows

If you need to use THEMIS data or export in CDF format, then you need to use Python 2.7 for 32 bit. The Python library that is used for handling CDF files (SpacePy) is currently only available for Python 2.6 and 2.7 for 32 bit.

For Python 3.3 and lower, you have to install the package manager pip, see http://pip.readthedocs.org/en/latest/installing.html for instructions.

Some required Python packages (as of late 2014) don't offer Windows binary wheels on PyPI yet. Therefore, you have to install them manually:

Please install numpy, scipy, numexpr, scikit-image, astropy, and pyephem from http://www.lfd.uci.edu/~gohlke/pythonlibs/.

If you want to draw any kind of geographic maps, please install the basemap library from: http://www.lfd.uci.edu/~gohlke/pythonlibs/#basemap

If you want to use THEMIS data or export in CDF format you have to install NASA's CDF library (32 bit version), see http://cdf.gsfc.nasa.gov for details. Also, for using the CDF library in Python you need the SpacePy library. You can download an installer from http://sourceforge.net/projects/spacepy/files/spacepy

If you want to export in netCDF format please install the netCDF4 library from: http://www.lfd.uci.edu/~gohlke/pythonlibs/#netcdf4

Now, install auromat with:

pip install --user auromat[cdf,netcdf]

Support for CDF or netCDF can be left out using auromat[cdf] or auromat[netcdf], respectively.

Advanced functionality

The following software can be installed if you want to georeference images yourself and not use the available data providers. Note that the complete workflow is not as straight-forward for certain data sources, e.g. to correctly georeference ISS images you have to consider inaccurate camera timestamps and possibly create missing lens distortion profiles.

If you want to determine astrometric solutions yourself using the auromat.solving package, you need to install astrometry.net, see http://astrometry.net/use.html. Make sure the bin/ folder is in your PATH so that auromat can find it.

If you want to automatically mask the starfield of an image using the auromat.solving.masking module, please install on Ubuntu:

sudo apt-get install libopencv-imgproc-dev python-opencv

on Mac OS X, please follow http://jjyap.wordpress.com/2014/05/24/installing-opencv-2-4-9-on-mac-osx-with-python-support/

on Windows, install from http://www.lfd.uci.edu/~gohlke/pythonlibs/#opencv

If you want to correct lens distortion in an image with the lensfun database using EXIF data extracted from the image, please install on Ubuntu:

sudo apt-get install libimage-exiftool-perl

on Mac OS X:

brew install exiftool

on Windows, extract the zip archive from http://www.sno.phy.queensu.ca/~phil/exiftool/ into a folder and put it in your PATH so that auromat can find exiftool.

auromat's People

Contributors

letmaik avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

auromat's Issues

spacepy fortran compile problem (f2py) on python 3

From travis ci log:

Reading fortran codes...
Traceback (most recent call last):
  File "/home/travis/virtualenv/python3.4.2/bin/f2py", line 26, in <module>
    main()
  File "/home/travis/virtualenv/python3.4.2/lib/python3.4/site-packages/numpy/f2py/f2py2e.py", line 650, in main
    run_main(sys.argv[1:])
  File "/home/travis/virtualenv/python3.4.2/lib/python3.4/site-packages/numpy/f2py/f2py2e.py", line 408, in run_main
    postlist = callcrackfortran(files, options)
  File "/home/travis/virtualenv/python3.4.2/lib/python3.4/site-packages/numpy/f2py/f2py2e.py", line 329, in callcrackfortran
    postlist = crackfortran.crackfortran(files)
  File "/home/travis/virtualenv/python3.4.2/lib/python3.4/site-packages/numpy/f2py/crackfortran.py", line 3219, in crackfortran
    readfortrancode(files, crackline)
  File "/home/travis/virtualenv/python3.4.2/lib/python3.4/site-packages/numpy/f2py/crackfortran.py", line 365, in readfortrancode
    l = fin.readline()
  File "/opt/python/3.4.2/lib/python3.4/fileinput.py", line 363, in readline
    self._buffer = self._file.readlines(self._bufsize)
  File "/home/travis/virtualenv/python3.4.2/lib/python3.4/codecs.py", line 313, in decode
    (result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb0 in position 2242: invalid start byte
Traceback (most recent call last):
  File "setup.py", line 831, in <module>
    setup(**setup_kwargs)
  File "/home/travis/miniconda2/envs/test/lib/python3.4/site-packages/numpy/distutils/core.py", line 169, in setup
    return old_setup(**new_attr)
  File "/home/travis/miniconda2/envs/test/lib/python3.4/distutils/core.py", line 148, in setup
    dist.run_commands()
  File "/home/travis/miniconda2/envs/test/lib/python3.4/distutils/dist.py", line 955, in run_commands
    self.run_command(cmd)
  File "/home/travis/miniconda2/envs/test/lib/python3.4/distutils/dist.py", line 974, in run_command
    cmd_obj.run()
  File "/home/travis/miniconda2/envs/test/lib/python3.4/site-packages/numpy/distutils/command/install.py", line 60, in run
    r = old_install.run(self)
  File "/home/travis/miniconda2/envs/test/lib/python3.4/distutils/command/install.py", line 539, in run
    self.run_command('build')
  File "/home/travis/miniconda2/envs/test/lib/python3.4/distutils/cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "/home/travis/miniconda2/envs/test/lib/python3.4/distutils/dist.py", line 974, in run_command
    cmd_obj.run()
  File "setup.py", line 639, in run
    self.compile_irbempy()
  File "setup.py", line 413, in compile_irbempy
    subprocess.check_call(cmd)
  File "/home/travis/miniconda2/envs/test/lib/python3.4/subprocess.py", line 561, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['f2py', '--overwrite-signature', '-m', 'irbempylib', '-h', 'irbempylib.pyf', 'source/onera_desp_lib.f', 'source/CoordTrans.f', 'source/AE8_AP8.f', 'source/find_foot.f', 'source/drift_bounce_orbit.f', 'only:', 'make_lstar1', 'make_lstar_shell_splitting1', 'find_foot_point1', 'coord_trans1', 'find_magequator1', 'find_mirror_point1', 'get_field1', 'get_ae8_ap8_flux', 'fly_in_nasa_aeap1', 'trace_field_line2_1', 'trace_field_line_towards_earth1', 'trace_drift_bounce_orbit', ':']' returned non-zero exit status 1

The command "cd spacepy && python setup.py install && cd .." failed and exited with 1 during 

Not sure why this happens now, it worked in the past. Maybe there was a change in spacepy (since this is installed directly from git master).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.