Tag Archive
amateur astronomy awk bash b[e] supergiant cartoon conference convert evolved star exoplanet fedora figaro fits fun galaxy iraf large magellanic cloud latex linux lmc machine learning magellanic clouds massive star matplotlib meteor mypaper paper peblo photometry planet pro-am pyraf python red supergiant scisoft skinakas observatory small magellanic cloud smc spectroscopy starlink talk ubuntu university of crete video x-ray yellow hypergiant
Artistic mosaic
If poor astrometric solutions are used to produce a mosaic you end up with a very interesting (at least…) result !
(produced with THELI )
Regarding THELI installation
THELI is package for the automated reduction of astronomical imaging data. After a first installation it was running fine but it was failing to produce the png check plots (used to check if the solution found is reasonable or not). Although the xml file was created it was not enough to check (as the solution for our data was good but not perfect). So, something was missing…
After reinstalling THELI I did noticed the output message at the end, stating that the PLPLOT library should be recompiled with png support. This was done (with the help of the Giannis K from the UoC computer support – plplot-cairo version), but still THELI was not plotting anything. One last attempt was to reinstall THELI, as now the png support of PLPLOT was there beforehand. And you guess right… it was working! So, PLPLOT with png support is a prerequisite for THELI to install properly. If you do it afterwards it has no implication as it does not compile with THELI when installing.
Last action was to download the latest version of SCAMP (preferable the .rpm package) and install it. This is installed as a binary under /usr/bin/ directory but THELI needs a copy under its own directory. So, simply you can make a soft link inside THELI’s directory to /usr/bin/scamp:
...$ ln -s /home/user/pathto/THELI/theli/bin/Linux/ /usr/bin/scamp
and THELI will run smoothly (finally)!!!
THELI and Python – when you don’t think enough…
THELI is package for the automated reduction of astronomical imaging data. One of the prerequisite is Python 2.5 or higher (as THELI uses numerous shell and Python scripts). As I had already installed Scisoft 7.5 (with Python 2.5) I though that everything was ok.
I started using THELI and indeed no problem up to the point of Astrometry+Photometry tab. But there was an error kept coming up about a syntax error in the scampcat.py:
except IOError as (strerror):
print "I/O error: {0}".format(strerror)
result = False
While looking around why is this an error I found out that the syntax “except … as …” was a valid syntax from Python 2.6 and higher. So the first attempt was to correct for the syntax. By removing “as”:
except IOError, err:
print "I/O error: {0}",format(err.errno, err.strerrorerr)
result = False
the script was able to continue, although now the problem was that it couldn’t import the “multiprocessing” module! Indeed the multiprocessing module becomes standard after Python 2.6 and it was not included in Python 2.5 version of Scisoft.
So, what now? Let’s go on and install the module inside Scisoft’s Python (2.5). Probably by downloading the module and running the setup.py or by easy_install or pypi this could work easily, right? Somehow, none of them worked in an easy and clean way (either something missing or not working). Moreover, as I was looking around filesystem’s Python (2.6) I noticed that the multiprocessing module was not installed under the site-packages but under Python directory itself. This puzzled me a little bit more so I went on to see if there is any other approach.
The one I though was to check for the new version of Scisoft (7.7), which included Python 2.7. This version provided that the syntax will work and the module will be there. So I went on to upgrade to the new release and after the successful installation THELI did not complain about these problems any more!
But there was a something that it just came to my mind after finishing the THELI test run. Why hadn’t I change the $PATH (of bash) to include filesystem’s Python 2.6 (under /usr/bin/)? This would, probably, accept the syntax and included the multiprocessing module already! Then I would have avoided the whole fuzz about removing and installing programs and dependencies.
So, it’s better to think a little bit more and try different approaches (ask someone?)! At least the new installation is not in vain as there are some good upgrades (like Matplotlib 1.1) which will be helpful in the future.
Adding full paths – the THELI case
In order to install THELI (GUI version) there is a series of libs and compilers to have already installed prior to THELI (like the fast-fourier transform (fftw), TIFF libraries (libtiff), C and C++ compilers (gcc, g++), Qt3, see the list at the site). Although everything was installed there was still an error in the installation process arising from the possible lack of qmake. The related command in the install.sh script was:
qmake -o Makefile theli.pro
The theli.pro existed, qmake was also present in the computer, so … what was wrong? Finally, Giannis Kapetanakis from the computer support pointed to the use of the full path of qmake. So the previous line should change to:
/usr/lib/qt-3.3/bin/qmake -o Makefile theli.pro
and everything worked properly!
Lesson learned: add the full paths of programs when everything seems to be in place but still they do not work!