Old Biboroku

Tuesday, November 30, 2010

SExtractor on Debian Squeeze (AMD64)

Moved.

 

FFTW on Debian Squeeze (AMD64)

Moved.

 

ATLAS on Debian Squeeze (AMD64)

Moved.

 

Saturday, November 27, 2010

Installing IRAF version 2.15 on Debian Squeeze

Moved.

 

Thursday, November 18, 2010

Installing MacTeX on OS X Snow Leopard

Moved.

 

Wednesday, November 3, 2010

Uncertainty in Flux and Magnitude

Filed under: Astro,Research — nomo17k @ 13:52
Tags: , ,

I keep forgetting this sort of simple algebra (aging is no fun), so here’s a note.

Define magnitude m to be related to flux f as follows:

m = -2.5 \log{\frac{f}{f_0}} \ ,

where f_0 is the zero point flux which defines the magnitude scale.  Let \Delta m be the magnitude uncertainty, which is related to the fractional uncertainty in flux, \Delta f / f.  We wish to find how m \pm \Delta m is related to \left(1 \mp \Delta f / f \right) f.  This means

\begin{array}{rcl} \pm \Delta m &=& -2.5 \log{\left[\left(1 \mp \frac{\Delta f}{f}\right)\frac{f}{f_0}\right]} + 2.5 \log{\frac{f}{f_0}} \\ &=& -2.5 \log{\left(1 \mp \frac{\Delta f}{f}\right)} \end{array} \ .

Solving for \Delta f / f we get

\pm \frac{\Delta f}{f} = 1 - 10^{\mp 0.4 \Delta m}  \ .

In summary, we have the following relationships:

\boxed{ \pm \Delta m = -2.5 \log{\left(1 \mp \frac{\Delta f}{f}\right)} \;\;\; \text{or} \;\;\; \pm \frac{\Delta f}{f} = 1 - 10^{\mp 0.4 \Delta m}  \ . }

When \Delta m \ll 1 or \Delta f / f \ll 1, we may expand the log function about 1 and retain only the first order term:

\begin{array}{rcl} \log{x} &=& \frac{x - 1}{\ln{10}} - \frac{(x - 1)^2}{\ln{10^2}} + \frac{(x - 1)^3}{\ln{10^3}} - ... \\ &\approx& \frac{x - 1}{\ln{10}} \end{array}

for x \simeq 1. In this limit we can write \Delta m \approx (2.5 / \ln{10}) \Delta f / f \approx 1.085736 \Delta f / f. Hence

\boxed{ \Delta m \approx 1.085736 \frac{\Delta f}{f} \;\;\; \text{for} \;\;\; \Delta m \;\text{or}\; \Delta f / f \ll 1  \ .}

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)

Filed under: Debian,Linux,Squeeze — nomo17k @ 21:49
Tags: , , , , , ,

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

Filed under: Research — nomo17k @ 17:46
Tags: , ,

I have a need to use spectra from UVBLUE, but they only supply IDL programs (who needs these any more?) to deal with the data.  I want to use the spectra in Python, so I ported their program.  Download it from here.

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.

Monday, March 22, 2010

Installing SExtractor on Mac OS X Snow Leopard

Moved.

 

Next Page »

Theme: Rubric. Blog at WordPress.com.

Follow

Get every new post delivered to your Inbox.