.. _ureka: Installing UVOTPY with the Ureka distribution ********************************************** Recently, in a collaboration, the Space Science Institute in Baltimore Python developers have teamed up with the Gemini Python developers and have produced a wonderfully easy way to get loads of Python software up and running for astronomical data analysis. The packaged software is called `Ureka: `_ The installation is targeted for Mac OSX and Linux, is easy, and comprehensive. The installation was tested on a Debian Sqeeze4 system. An install script is provided, which I ran in /usr/local, but most users probably just want to run in their $HOME directory. It takes some time and placed also a hidden directory in $HOME. I followed the instructions after reading the whole user documentation in http://ssb.stsci.edu/ureka/1.0beta6/docs/index.html When running the ur_test command, there were two libraries missing, libtinfo.so.5 and libtiff.so.3. In this case these were not available for install by the package manager, but by making symbolic links to later packages of the same I got that covered as follows:: ln -sf /usr/lib/libtiff.so.4 /usr/lib/libtiff.so.3 ln -sf /usr/lib/libncurses.so.5 /usr/lib/libtinfo.so.5 Apparently, there was an accidental change in the API in libtiff.so.3 versions, so the version was bumped up, while libtinfo is included in libncurses. There remains the possibility that there are some incompatibilities but I have not noticed any yet. It may be that you will need additional libraries, since I have already installed much extra using the Synaptic package manager for the astronomical analysis and software development I do. You may prefer to use "apt-get", but basically, most of the uncommon libraries are already in the Ureka installation. One question in my mind was whether this would work with the HEADAS software in the same environment. It is not uncommon to find that tow such large packages use the same libary but a different enough version that the calls don't work for one or the other. As in the earlier installation with stsci-python, I first activate the ureka configuration, then the headas one. Environment setup for the csh ------------------------------ An example of the "csh" script I use is below. If you use "bash" you have to adjust it in a similar order.:: # Debian Squeeze # Linux version 2.6.32-5-686 (Debian 2.6.32-48squeeze1) (dannf@debian.org) # (gcc version 4.3.5 (Debian 4.3.5-4) ) #1 SMP Mon Feb 25 01:04:36 UTC 2013 setenv SCIENCESOFT /usr/local/sciencesoft # # HEASARC SWIFT software # setenv HEADAS $SCIENCESOFT/heasoft-6.13/i686-pc-linux-gnu alias heainit "source $HEADAS/headas-init.csh" # # HEASARC Swift CALDB # setenv CALDB $SCIENCESOFT/CALDB setenv CALDBCONFIG $CALDB/software/tools/caldb.config #$CALDB/software/tools/alias_config.fits source $CALDB/software/tools/caldbinit.csh # # UVOTPY environment # setenv UVOTPY $HOME/lib/python/uvotpy # # catalog server for scat (WCSTOOLS) # setenv UB1_PATH http://tdc-www.harvard.edu/cgi-bin/scat # # setup Ureka python # alias ur_setup 'eval `/home/kuin/.ureka/ur_setup -csh \!*`' alias ur_forget 'eval `/home/kuin/.ureka/ur_forget -csh \!*`' # # add headas/bin and uvotpy scripts to path # setenv PATH $HOME/bin:$HEADAS/bin:/bin:{$PATH} # # activate ureka, headas # ur_setup heainit # # add my python modules to the python path # setenv PYTHONPATH $HOME/lib/python/uvotpy As you can see, I have installed the uvotpy package in my home directory, and installed it there as follows.:: > cd $HOME; tar xzvf uvotpy-1.0.tar.gz > cd uvotpy-1.0 > python setup.py install --home=/home/kuin/ > setenv UVOTPY $HOME/lib/python/uvotpy > setenv PATH {$PATH}:{$HOME}/bin Example --------- This works for an interactive session.:: $ ur_setup $ ipython --pylab In [1] import uvotgetspec In [2] from astropy import coordinates In [3] pos = coordinates.ICRSCoordinates.from_name('WR52') In [4] cd /mnt/data3/grism/wavecal1/no_lent/WR52/00056950007/uvot/image In [5] obsid = '00056950007' In [6] uvotgetspec.getSpec(pos.ra.degrees,pos.dec.degrees,obsid,1,) Done.