Tuesday, November 30, 2010
Saturday, November 27, 2010
Thursday, November 18, 2010
Wednesday, November 3, 2010
Uncertainty in Flux and Magnitude
I keep forgetting this sort of simple algebra (aging is no fun), so here’s a note.
Define magnitude to be related to flux
as follows:
where is the zero point flux which defines the magnitude scale. Let
be the magnitude uncertainty, which is related to the fractional uncertainty in flux,
. We wish to find how
is related to
. This means
Solving for we get
In summary, we have the following relationships:
When or
, we may expand the log function about 1 and retain only the first order term:
for . In this limit we can write
. Hence
This is why an uncertainty in magnitude, when small, is often an adequate approximation to the fractional uncertainty in flux.
Friday, October 22, 2010
Installing Mendeley on Debian Squeeze (AMD64)
Mendeley does have a Debian package which you can simply apt-get (yay), but it is only available for Lenny, the current stable release. Here I outline the system-wide installation procedure using their tarball.
First, download the tarball from Mendeley to some temporary directory. The file should be named like mendeleydesktop-0.9.8.1-linux-x86_64.tar.bz2.
$ umask 022 $ tar -xvjf mendeleydesktop-0.9.8.1-linux-x86_64.tar.bz2 $ sudo mv mendeleydesktop-0.9.8.1-linux-x86_64 /usr/local/mendeley-0.9.8.1 $ sudo ln -s /usr/local/mendeley-0.9.8.1 /usr/local/mendeley $ cd /usr/local/bin $ sudo ln -s /usr/local/mendeley/bin/mendeleydesktop .
This will install all the files under /usr/local/mendeley. The command mendeleydesktop will be available system wide. However, it may be more convenient to add an entry to your application launcher.
Addendum: For some reason my Mendeley installation has had a problem on launch for a while. It always quit after asking me to “repaire” the database, etc. After looking at the log (which is in ~/.local/share/data/Mendeley Ltd./Mendeley Desktop), I leaned that MendeleyDesktop had a problem dealing with SQL database, which is located somewhere deep under /var (I don’t know for sure). It turned out that my /var partition was full. After doing apt-get clean, things are working fine. So the moral of the story is that I should clean up my system more often...
Python Utility for the UVBLUE Stellar Spectrum Library
Monday, June 14, 2010
Installing STSCI_PYTHON on Debian Squeeze
The version I use is 2.10.
First, install IRAF, tables, and stsdas following this article.
$ sudo aptitude install python-tk python-numpy python-pmw python-urwid $ sudo aptitude install libreadline6-dev python-matplotlib ipython $ wget http://stsdas.stsci.edu/download/stsci_python_2.10/stsci_python_2.10.tar.gz $ tar -xvzf stsci_python_2.10.tar.gz $ cd stsci_python_2.10 $ python setup.py build $ sudo python setup.py install --home=/usr/local/stsci_python-2.10 $ sudo ln -s /usr/local/stsci_python-2.10 /usr/local/stsci_python $ cd stscidocs $ su # export PATH=/usr/local/stsci_python/bin:"$PATH" # export PYTHONPATH=/usr/local/stsci_python/lib/python:"$PYTHONPATH" # python setup.py install --home=/usr/local/stsci_python-2.10
Add the following lines to ~/.bash_profile:
export PATH=/usr/local/stsci_python/bin:"$PATH" export PYTHONPATH=/usr/local/stsci_python/lib/python:"$PYTHONPATH" # These two lines are necessary if IRAF was not installed at /usr/local/bin export iraf=/iraf/iraf # where IRAF is installed export IRAFARCH=linux
That’s it.
Update History
November 27, 2010 – Updated for version 2.10.