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
IRAF’s identify error – center not found
During the last few days I have struggled a bit with the wavelength calibration of some long-slit spectra. When using the identify task of IRAF I found that I could select (“m”ark) only some of the lines, without any clear indication why the rest were not recognized (some were indeed stronger but others were equal or weaker). The actual error that kept popping out was “Center not found: check cursor position”. Although I went on to investigate all parameters (even the aidpars !) the one thing that solved the problem was finally to increase a bit the full-width of the features to be identified (fwidth), from the default value of 4.0 to 10 pixels. Apparently some of the lines seems too wide to be determined as real features by the task.
“Too many unprocessed floats” in LaTeX
! LaTeX Error: Too many unprocessed floats.
This error in LaTeX means that it is unable to handle more than a specific number of figures and tables (yes, there is a limit! no more than roughly 30).
Unless you want to replot and combine figures an easy solution is to add the package ‘morefloats’:
\usepackage{morefloats}
(ref: UK TeX FAQ)
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.