Saturday, December 27, 2008

LaTeX: replace double quotes with tex quotes

People often make the mistake of putting " in place of `` in LaTeX documents. To repair this, the only easy solution is something like:
s/\(\s\)"/\1``/g
in VIM or sed.

I've seen alternate solutions posted but they're all too complicated. One recommendation was to switch to XeTeX, which sounds like overkill, and others all stated that a complicated perl script is required. The latter is technically true, but why isn't such a thing readily available?

Any other ideas?

Sunday, December 21, 2008

Thursday, December 11, 2008

skill set

is it a marketable skill that I can bring down almost any computer system I'm given access too entirely unintentionally?

Friday, December 5, 2008

post rate

my post rate is too low I need to up it so that my front page doesn't show the same posts any more

Wednesday, December 3, 2008

scary

I think this is my worst nightmare:
http://antwrp.gsfc.nasa.gov/apod/ap081203.html

LA. Not the smiley.

Monday, November 24, 2008

.inputrc

New unix stuff!

This is, again, stuff I'd searched for forever but never found the right collection of terms. This is what bash readline is REALLY all about.

if you make an inputrc file, you can get awesome readline capabilities (similar to ipython). This post at lifehacker showed me how to do it. This site has a more complete description of how to use readline/inputrc.

Even better: VI command line editing .

There's also something called magic space but I don't know what purpose it serves all the time... it will replace 'magic' characters like !* and !& and !! with whatever command they represent if you hit space immediately after typing them (explained better here).

Wow. Awesome.

Thursday, November 20, 2008

MOVIES!

Making movies is surprisingly difficult. No matter what language you use, apparently true movie files can only be made by stringing together images, i.e. there is no native movie-producing feature. Gnuplot can do some simple animations but to do anything sophisticated you need to start delving into variables, and for that I switch to a real language.

So, I returned to python. As usual, it took no more than a few hours of coding and learning to come up with something. But it bothers me that it took that long: I still think python is most deficient in its failure to create a default column-text reader like 'readcol' in IDL. I can't complain that much, though: I wrote my own in about 5 minutes.

Anyway, the key is to use the .set_xdata and .set_ydata functions of a plot to update a canvas. I still don't have nearly as high a plotting speed as I'd like, but it works alright if I don't display to screen. Probably a different backend would be more effective but I don't like to mess with backends.

I use savefig(filename,dpi=50) to reduce the image quality so that it's easier for the animator to handle.

ImageMagick's convert can be used to stitch any kind of image into a movie given that you've installed an mpeg2 encoder (fink gave me mpeg2vidcodec ). The command is very simple:

convert -size 300x300 *.png movie.mpg


I had to use a smaller image size because a series of 1000x12kb files somehow chomped ~6-8 GB of RAM and swap space.

Monday, November 17, 2008

Screen cont'd

Guide to screen

Particularly useful features:

Scrollback:

ctrl-a [
[scroll keys]


Switch to a numbered screen (doesn't work for me so far):

ctrl-a [number]

Sunday, November 16, 2008

Ultimate today

We went 2-1 in the tournament, losing the final in a windy game on universe point, 15-14. We won the first game 13-5 or 13-6, and the second by a similarly wide margin. I think I scored 15-20 points on the day and threw an additional few. 2-3 drops and 3-4 throwaways to balance that out. Pretty good on the whole for what was probably my last ultimate of the season.

Of course, that made me very exhausted for the review session this evening. Oh well, I think it worked out. I need to remember to come up with (and post!) a clear explanation of why you can use that silly little triangle to come up with the translation between angle on the sky and image size.

Thursday, November 13, 2008

BASH discoveries, readline questions

1. shopt -p
Maybe my hostname completion worked and then stopped working because the bash option hostcomplete was not set. Duh! Why? I don't know. Anyway, shopt -s hostcomplete solves the problem.

nocaseglob is also pretty cool (case insensitive tab completion)

2. it's really hard to search for readline stuff on google. Can anyone explain to me how BASH readline works? I would REALLY like to make bash readline work like ipython, in which you can start typing a command and hit the 'up' key to search through the history for anything beginning with the stuff you've typed up to that point. But I can't even find documentation for the ipython readline! Any hints, anyone?

3. my desktop at work blocks ssh connections. I can ssh into some computers and then into it, but not directly into it.

...as usual, I made a list where not-a-list would have sufficed, and I had to add the last thing because a 2-item list is dumb.

Wednesday, November 12, 2008

Why do astronomers have such a strong presence on the web?

I'm not making this a complete post, just a few examples of blogs and websites I'm aware of. But we do have a strong presence on the web - astronomers have an unusually high google ranking etc. Is it just because 'we' were here first ('we' excludes me, I'm just jumping on the bandwagon and getting a free ride)?

Examples:
Pamela Gay
Dr Lisa

Science writers who write on astronomy:
Dave Mosher

Tuesday, October 28, 2008

Python magic / advanced numpy indexing

Yeah, indexing python arrays should really be easy.

Stefan van der Walt's page


In [85]: bi = (f.bolo_indices[np.newaxis,:] + zeros([7751,1])).astype('int')

In [86]: whc = (whscan[:,np.newaxis] + zeros([1,107])).astype('int')

In [87]: array2d[whc,bi] = temp2d

Python: one-line arrays

Ahhh, refreshing:

whscan = asarray([arange(scanlen)+i for i in scans_info[:,0]]).ravel()


Not like IDL, which takes at least 4 lines b/c of the variable declaration. There's probably a better way to do that too.

Port vs Fink

Port failed to install:

adam-macbook ~$ sudo port install py25-matplotlib
---> Building py25-hashlib with target build
---> Staging py25-hashlib into destroot
---> Installing py25-hashlib 2.5.2_0
---> Activating py25-hashlib 2.5.2_0
---> Cleaning py25-hashlib
---> Fetching py25-zlib
---> Verifying checksum(s) for py25-zlib
---> Extracting py25-zlib
---> Configuring py25-zlib
---> Building py25-zlib with target build
---> Staging py25-zlib into destroot
---> Installing py25-zlib 2.5.2_0
---> Activating py25-zlib 2.5.2_0
---> Cleaning py25-zlib
---> Fetching py25-setuptools
---> Attempting to fetch setuptools-0.6c8.tar.gz from http://cheeseshop.python.org/packages/source/s/setuptools/
---> Verifying checksum(s) for py25-setuptools
---> Extracting py25-setuptools
---> Applying patches to py25-setuptools
---> Configuring py25-setuptools
---> Building py25-setuptools with target build
---> Staging py25-setuptools into destroot
---> Installing py25-setuptools 0.6c8_2
---> Activating py25-setuptools 0.6c8_2
---> Cleaning py25-setuptools
---> Fetching py25-tz
---> Attempting to fetch pytz-2007k.tar.bz2 from http://cheeseshop.python.org/packages/source/p/pytz/
---> Verifying checksum(s) for py25-tz
---> Extracting py25-tz
---> Configuring py25-tz
---> Building py25-tz with target build
---> Staging py25-tz into destroot
---> Installing py25-tz 2007k_0
---> Activating py25-tz 2007k_0
---> Cleaning py25-tz
---> Fetching py25-dateutil
---> Attempting to fetch python-dateutil-1.4.1.tar.gz from http://labix.org/download/python-dateutil
---> Verifying checksum(s) for py25-dateutil
---> Extracting py25-dateutil
---> Configuring py25-dateutil
---> Building py25-dateutil with target build
---> Staging py25-dateutil into destroot
---> Installing py25-dateutil 1.4.1_0
---> Activating py25-dateutil 1.4.1_0
---> Cleaning py25-dateutil
---> Fetching fftw-3
---> Attempting to fetch fftw-3.1.3.tar.gz from http://www.fftw.org/
---> Verifying checksum(s) for fftw-3
---> Extracting fftw-3
---> Configuring fftw-3
---> Building fftw-3 with target all
---> Staging fftw-3 into destroot
---> Installing fftw-3 3.1.3_0
---> Activating fftw-3 3.1.3_0
---> Cleaning fftw-3
---> Fetching py25-nose
---> Attempting to fetch nose-0.10.4.tar.gz from http://somethingaboutorange.com/mrl/projects/nose/
---> Verifying checksum(s) for py25-nose
---> Extracting py25-nose
---> Configuring py25-nose
---> Building py25-nose with target build
---> Staging py25-nose into destroot
---> Installing py25-nose 0.10.4_0
---> Activating py25-nose 0.10.4_0
---> Cleaning py25-nose
---> Fetching py25-numpy
---> Attempting to fetch numpy-1.2.0.tar.gz from http://downloads.sourceforge.net/numpy
---> Verifying checksum(s) for py25-numpy
---> Extracting py25-numpy
---> Applying patches to py25-numpy
---> Configuring py25-numpy
---> Building py25-numpy with target build
Error: Target org.macports.build returned: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_python_py25-numpy/work/numpy-1.2.0" && /opt/local/bin/python2.5 setup.py build " returned error 1
Command output: setup_package()
File "setup.py", line 89, in setup_package
configuration=configuration )
File "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_python_py25-numpy/work/numpy-1.2.0/numpy/distutils/core.py", line 184, in setup
return old_setup(**new_attr)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/distutils/core.py", line 151, in setup
dist.run_commands()
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/distutils/dist.py", line 974, in run_commands
self.run_command(cmd)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/distutils/dist.py", line 994, in run_command
cmd_obj.run()
File "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_python_py25-numpy/work/numpy-1.2.0/numpy/distutils/command/build.py", line 37, in run
old_build.run(self)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/distutils/command/build.py", line 112, in run
self.run_command(cmd_name)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/distutils/cmd.py", line 333, in run_command
self.distribution.run_command(command)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/distutils/dist.py", line 994, in run_command
cmd_obj.run()
File "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_python_py25-numpy/work/numpy-1.2.0/numpy/distutils/command/build_src.py", line 130, in run
self.build_sources()
File "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_python_py25-numpy/work/numpy-1.2.0/numpy/distutils/command/build_src.py", line 147, in build_sources
self.build_extension_sources(ext)
File "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_python_py25-numpy/work/numpy-1.2.0/numpy/distutils/command/build_src.py", line 250, in build_extension_sources
sources = self.generate_sources(sources, ext)
File "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_python_py25-numpy/work/numpy-1.2.0/numpy/distutils/command/build_src.py", line 307, in generate_sources
source = func(extension, build_dir)
File "numpy/core/setup.py", line 87, in generate_config_h
raise SystemError,"Failed to test configuration. "\
SystemError: Failed to test configuration. See previous error messages for more information.

Error: The following dependencies failed to build: py25-numpy py25-tkinter tcl tk
Error: Status 1 encountered during processing.


I don't want to deal with it so I'm just using Fink.

Sunday, October 26, 2008

Reinstalling a system

Python died tonight when I foolishly tried to update numpy or matplotlib. One was not compatible with the other in upgraded form, and the update for matplotlib wouldn't install because of GTK issues that were totally opaque.

So, I reinstalled EVERYTHING - fink AND macports - from scratch. If I don't get things running by morning I'm going to have to do a restore, which is ugly as death.

Things I need to do post-install:

sudo port install python_select
sudo python_select python25


test ipython
test matplotlib
test numpy

Python: setting matplotlib defaults

Setting matplotlib defaults is a lot more difficult than it should be.


matplotlib.defaultParams['image.origin']='lower'
matplotlib.defaultParams['image.interpolation']='nearest'

Monday, October 20, 2008

Observing 10/20

I don't have a better place to post this one, so here it is:
http://sites.google.com/site/iras05358/figure-discussion/figures/iras05358_triple_17.29.png?attredirects=0


My automated fitter (Gaussfitting Cube Collapser) has come a long way. I now adaptively choose to fit 1, 2, or 3 Gaussian components to output to a data cube.

The purpose of that code is primarily to find a two-dimensional way to display information about the 3D structure, specifically about the presence/absence of outflows. Outflows will inevitably be confused with multiple velocity components, but they are also likely to be convolved with them.

Sunday, October 19, 2008

Screen, nohup, ssh, scp

I learned a lot about the above in the past day, but I didn't keep track of the links.

First, screen is very useful: it allows you to run any task, detach the screen, and let it run in the background. You can resume it later.

Example:

screen
ipython run_fitter.py
<ctrl-a> d
screen -r


Second, it's a huge pain to type a password every time I use scp and ssh. The solution is to make a key on your computer and put it in the authorized_keys file.


ssh-keygen -t rsa
scp ~/.ssh/id_rsa ginsbura@milkyway.colorado.edu:.
ssh ginsbura@milkyway.colorado.edu
cat id_rsa >> ~/.ssh/authorized_keys
ssh -v ginsbura@milkyway.colorado.edu


Use ssh -v to figure out why it fails if it still asks you for a password. In one case, this happened because the computer I was using expected the id to be in ~/.ssh/identity instead of ~/.ssh/id_rsa. There may also be permissions issues (i.e. you want restrictive permissions on your ssh keys).

With the latter, you can still use nohup, which is helpful if you want to pipe your output to a log file.

Friday, October 17, 2008

Listing variables (e.g IDL help) in Python

Again, IDL has the simple 'help' command to tell you all variables in your namespace. Python has the same thing, but the namespace tends to be cluttered with imported functions. The commands who, who_ls, and whos are meant for interactive use. They are a hell of a lot more useful than var, locals, globals, and dir.

examples:

whos float
whos ndarray
who module
float_vars = %who_ls float
grep('x',float_vars)


I'm afraid I don't know how to make the last two lines into a one-liner, as would be desirable.

SAVE / RESTORE in Python

Save/Restore is probably the single best feature of IDL that, sadly, is very poorly replicated in Python. For 1 or 2 dimensional variables, you can use Pylab's save/load, but I never use such piddling tiny arrays. For higher dimensional objects, either using FITS files (a pain because of header definitions) or pickling ought to work.

e.g.:

import numpy
import pickle
x=ones([10,10,10,10],dtype='float64')
pickle.dump(x,open('x.pysav','w'))
X = pickle.load(open('x.pysav','r'))

Wednesday, October 15, 2008

Last month's observations in L111

Mapped sources:
SH 2-156 [no high resolution observations; covered by 1.2m CO 1-0 survey]
SH 2-157 Yancy CS 5-4 , CO, 13CO 1-0, CS 2-1 , HCN & SCUBA too....
IRAS 23151 (two pointings)

Unmapped:
BFS 18 = IRAS 23042+6000 = IRCO 859
Wu et al mapped this in CO 2-1 and detected no outflows. They used the NRAO 12m with a heterodyne array with very high Tsys ~700-1100K.

Sunday, October 12, 2008

How do I print a multi-page postscript?

I want to print a multi-page postscript duplexed and, if possible, two per page. pstopng, pstopdf, and the variants failed me horribly by making postscripts that don't fit the bounding box at all. Any ideas?

So far the best I've come up with is switching gnuplot's output to pdf, which is a workaround rather than a solution, but is useful nonetheless:
set terminal pdf enhanced dashed

Mathematica & Series expansions

Mathematica does something stupid and incomprehensible (to me) with their series expansions. For no clear reason, it makes the O[x]n uneditable, and adds a bunch of formatting things that prevent you from copying & pasting the expression and then solving for a variable. Argh. While this is repairable using the "show expression" tool (Shift-Apple-E), it's a pain and "show expression" is not meant to be human readable.

Saturday, October 11, 2008

Tuesday, October 7, 2008

gardening

I realized I don't have a gardening category and I should.

I have eaten 2 garden tomatoes. There have been a total of 3 that ripened. There is a fourth on the vine. There are ~40-50 big green ones being big and green.

I ate basil in my pasta sauce yesterday. I need to buy some pine nuts. But I'm not pining for nuts.

Next year, start growing in March!

sage casjobs

annoying feature of sage casjobs: no spaces are allowed, no matter what, even if quoted. so when importing must remove all spaces. gurrh.

mathematica

//. and /. use 'rules' of the form {x->y} for substitutions

how do you make the layout of a page look nice? How do you change line spacing?

Saturday, September 27, 2008

Observing run summary

3 nights of worse than grade 4 weather (tau ~.4, i.e. the atmosphere is nearly opaque) have given me a few interesting results.

1. Non-detections of CS 5-4 in a few bright BGPS cores. My best guess is that the pointing was off, though, because I definitely got down to a noise level around 50mK.
2. Lots of CO 2-1 mapping, 13CO/C18O too. That means I can now use this plot: http://dustem.astro.umd.edu/pdrt/co3221web.html to try to measure the incident flux.
3. I can't do homework at the summit. Maybe it's just that I can't do stellar structures homework, but I really am not processing this stuff well. Damn.
4. Running at altitude uphill is really, really hard. All the running I've been doing the past N months has not even come close to preparing me. Need to correct that...
5. "I am inappropriate." I probably violate a bunch of those rules... the important ones...
6. gotta get back to the mountains. Really. Seriously. OMFG.
7. ARGH those papers need writing! Lots of it!

For the next observing run, need the following:
1. Pre-prepared A3 rasters
2. Larger selection of summit music
3. Better sleep schedule preparation
4. More caffeinated drinks per night
5. Cloud cannons.

Thursday, September 25, 2008

running at altitude

wow dude. I suck at that.

I swear there were some other things I had to write down but I can't remember them now.

precipitable water vapor precipitates and that can be good

pwv

precipitable water vapor, precipitable water vapor, go away, come again some other observer's day
little HARPy wants to receive
so clear up before I leave

stupid bumping-head old man.

Wednesday, September 24, 2008

Marc Pound's toolbox

This is neat:

Line Ratio as a function of density, incident flux from Marc Pound
. Sadly, straight CO 3-2 intensity isn't included.

python stuff

to get imshow defaults to be nearest neighbor, need to edit ~/.matplotlib/matplotlibrc. Still don't know how to change default command-line output format.

Do not install 10.5.5

Well, I didn't obey that excellent advice from Charles. I installed the 10.5.5 update. Now DS9 - in my opinion, one of the heartiest and most reliable programs I've dealt with in the astronomy world - won't work because TCL is broken. I doubt TUI or most of the other things I use will work either. That's a tragedy of significant proportions - I NEED ds9 to make my observing files! I can only pray that an update of TCL using port will work... if not I'm basically screwed.

Saturday, September 13, 2008

figure*

to make figures/deluxetables span the page in LaTeX:
\begin{figure*}
...
\end{figure*}

PHP and CGI working in the same directory

While it's not possible to get CGI and PHP to work within the same file, you can get .html and .htm files to use cgi/php scripts alternately in the same directory with the following .htaccess file:


RemoveHandler .html
AddType text/html .htm
AddHandler application/x-httpd-php .php .html
AddHandler server-parsed .htm .html


If anyone can prove the previous statement false, please do! I spent hours googling and hacking to try to get php and cgi to work within the same file.

Also, the way the above file is parsed makes no sense to me. It is inverted from how I would have thought it should work.

Thursday, September 11, 2008

Wednesday, September 10, 2008

no-coffee day make me useless

I had a few productive hours after my run, then things kinda went downhill.... in the morning, I wrote two guides and then taught someone else to use that stuff and then I tried to write up my lecture for tomorrow and totally failed. I didn't accomplish anything after about 1 pm. Lesson to me: don't ride no-coffee days at work.

Tuesday, September 9, 2008

Unhealthy outlier

162.7 lbs - only a 2-sigma outlier from my weight this past month, but definitely unhealthily low. Probably says something about whether I should have played disc tonight. Or something else.

CGI errors on Origins

First step:
tail -f /usr/local/apache/logs/casa/casa_error_log


Then, make sure .htaccess has the right lines.

AddType text/html .htm
AddHandler application/x-httpd-php .php .htm
AddHandler server-parsed .htm .html
AddHandler cgi-script .cgi .pl

Sunday, September 7, 2008

Baking again

Since I totally ran out of food last night (ate my last frozen pizza), I decided it's time to try my hand at cooking things again. That will start with making a bunch of dough, possibly shaping it, and freezing some, fridging some, etc. Homemade pizza is way better.

Need to get pine nuts. 'n stuff.

Friday, September 5, 2008

Hi Kyle!

How's google reader treating you today? I hope that's what you're using.

When you come back to observe at 11:30, can you bring extra beer?

Thursday, September 4, 2008

Non-greedy vim

To make .* in VIM be non-greedy (i.e. match just <a href=x> out of "<a href=x> </a>"), use:
.\{-}

List

I have something of a list going of 'hottest girls who won't talk to me'. I think I'll award prizes.

1st prize - the hoppiest beer I can find
2nd prize - baking chocolate
3rd prize - extra dark, extra fine-ground coffee
4th prize - angosteen bitters

Wednesday, September 3, 2008

Using AWK to fixed-format print in VIM

24,42!awk '{printf("\%30s\%20f\%15g\%15g\%15g\%15g\%15g\%15g\%15g\%5i\n" , $1,$2,$3,$4,$5,$6,$7,$8,$9,$10)}'


It's important that the %'s must be escaped, otherwise they print the current filename.

IDL colors

To get IDL colors to 'work right' (i.e. a colortable has 255 colors etc), put this in a startup file:

device, true_color = 24, retain = 2, decompose = 0
red = [0,1,1,0,0,1]
green = [0,1,0,1,0,1]
blue = [0,1,0,0,1,0]
if not strcmp(getenv('DISPLAY'),'') then $
tvlct, 255*red, 255*green, 255*blue

Monday, September 1, 2008

1 year of data




Weight in pounds as a function of time, starting 8/12/07, with nearly uniform sampling immediately before bed each night.

Sunday, August 31, 2008

fermentation

ideas + beer. Same process. They catalyze each other.

Saturday, August 30, 2008

Danger Zone

The Danger Zone: Where the Buffalo Roam.

Saturday, August 23, 2008

Merging postscripts

This is essential and really difficult to find answers to, but this guy gave it:
http://ludo.qix.it/archive/2005/08/merge-postscript-files.html

The keywords I would have liked to see:
"merge postscripts into multi-page document"
or "combine postscript multiple page"

e.g.
gs -sDEVICE=pswrite -sOutputFile=output.ps -dNOPAUSE -dBATCH file1.ps file2.ps file3.ps

or

gs -sDEVICE=pswrite -sOutputFile=05358spectra.ps -dNOPAUSE -dEPSFitPage -dBATCH `ls 05358_*.eps`

(the added option is to make sure the .eps isn't cropped)

NSF eligibility

Am I eligible for the NSF GRFP? Sam says yes, I thought no, but re-reading.... umm... isn't this yes?


Applicants must have completed no more than twelve (12) months of full-time graduate
study or its equivalent as of August 31, 2008. Full time graduate study is as defined by the
universities attended.


No more than 12 months means 12 months is OK?

What was I thinking!?

Friday, August 22, 2008

Back to site editing

I'm editing class web pages, php, cgi, etc. again. I don't think I ever really understood how to do this, but I'd like to know how to use PHP to fold text. That would be sweet.

I found it by googling this time.

This is really the right way to do things:
http://help.blogger.com/bin/answer.py?hl=en&answer=42214

Of course, it's pretty disappointing that it doesn't work with the non-classic template for blogger.

Thursday, August 21, 2008

Extracting figures from papers

I want to automatically extract figures from papers, but of course most papers come in .pdf, not .ps form...

This site has a great tool for extracting figures from .ps papers:
http://www-hermes.desy.de/notes/extras/postscript.html

If anyone can tell me how to do the same thing for .pdfs (automatically extract figures from pdfs) I'd appreciate it.

Update 12/13/08: One solution is listed at http://ubuntuforums.org/showthread.php?t=884002: use pdfimages, part of the xpdf package.

Sunday, August 10, 2008

Movie Review: Dark Knight

Definitely the best movie in the past... 3 years? IMAX didn't add much to the experience though.

A little bit more: most people I've talked to about it (ummm... 2 grad students and 1 blog?) thought the movie was overhyped and didn't live up to the hype. I liked it a lot, and I never saw a single preview. Lesson? Don't see previews.

Saturday, August 9, 2008

Blogroll

Since you're now subscribing (I'm assuming, at the moment and for the next... say... year, Kyle's the only one who will see this), here's a list of other blogs to check out:
http://sketchbrewing.blogspot.com/
http://thedrog.blogspot.com/

I'd send you to some other ones too, but they're not complete. I have vague ambitions to write a genuine science blog for the international year of astronomy and public outreach.... but I don't really know if that will go anywhere.

Movie Review: Hancock

Saw Hancock on Tuesday. Basically, as hinted at by friends, didn't live up to expectations. The funny quit early, and they tried to insert some 'dark superhero movie' into it in the second half. From the ads, and the presence of Jason Bateman & his character, this was inappropriate. Not a great movie, stick to the Dark Knight.

More beer tastes

Stone Vertical Epic 8: described as an overhopped Belgian, and I think they hit the mark exactly. It was pleasant and drinkable, with a strong hop flavor but weak hop bitterness. 8.6% ABV

Fort Collins brewery double chocolate stout: a reasonable dessert beer. Not nearly as dry as Stone's Oatmeal Chocolate, but not as sweet as Young's double chocolate. Chocolate undertones stayed undertones, which is not what I expect from a double chocolate stout. 8.1% ABV

Avery / Liquor Mart 40th anniversary: Just a hoppy ale, nothing special. Had a stronger hop aftertaste than most, not up to Avery's standard. No ABV label.

Steamworks Kolsch: Very light kolsch. I think it may have had a crisp flavor to it, but it was the last in line and unremarkable enough that my comments on it are untrustworthy. 4.86% ABV.

Also, talked to Bobby again, he recommends St Bernard as a good Belgian. That's on the list.

Wednesday, August 6, 2008

Applescripting out that VIM error

I have a frequent problem where my VIM window is too large for my macbook screen but it fits on my external monitor, so when I unplug the external the VIM file bar gets stuck behind the Mac OS menu bar. It's a huge pain to fix this normally, but I wrote/stole an applescript to fix the problem:

try
tell application "Vim"
activate
end tell
tell application "System Events"
tell process "Vim"
set size of the first window to {1000, 200}
set position of the first window to {50, 50}
end tell
end tell
end try

Sunday, August 3, 2008

Review: Fruition restaurant

I ate at Fruition restaurant last night with the family. They serve haute cuisine. I had the beef coulotte. It was pretty tasty, but overall a bit too creamy for my taste. The wine had a hint of cherry flavor to it. The dinner was pretty good, but overall a little disappointing for the price. The French press coffee was a bit much as I would have preferred a small cup of cappuccino. I wouldn't object to going back when they switch to a new seasonal menu, but I'm not going out of my way.

Saturday, August 2, 2008

Photos featured in an article

My photos, article by Jeff Marlow:

http://www.atmagazine.co.uk/content/view/853/94/

Friday, August 1, 2008

Movie Review: The Namesake

The Namesake was pretty damned boring. The rich white girl might have been flaky and a touch rich-bitchy, but she was attractive, she loved him, and she did nothing wrong except perhaps out of ignorance. Coming of age stories like this one are dumb and take away my respect for ultraconservative, traditional cultures.

The one thing I can really say for the movie, though, is that it had awesome music. Federico Aubele's Postales showed up at one point, and there was another techno/ambient style song I couldn't pin down.

Thursday, July 31, 2008

Postscript to PDF conversion

ls *.ps | sed 's/\(.*\).ps/ps2pdf \1.ps \1.pdf/' | bash

because it's impossible to view multiple postscripts in a single window.... how annoying.

Corollary:
ls *.pdf | sed 's/\(.*\).pdf/pdf2jpeg \1.pdf \1.jpg/' | bash

Wednesday, July 30, 2008

Boulder Obovoid

Obovoid is another imperial stout - "empirical stout" - and is milder than some of the others I've had lately, but still a touch bitter. Nice but not worth repeating much.

IDL array indexing

array_indices(array, location)

instead of that x mod n_e(), y / n_e() crap

Not a webcomic

but close enough:
Gore-Al sends son into space

IDL string conversion

Just a reminder to me:
to convert an IDL number to a string, use string!
s = string(x,format='(F10.5)')

Also, Julian Date conversion

my genes

I have a few funky genes goin on:
Photonic Sneeze Reflex
Smell asparagus pee

Tuesday, July 29, 2008

find and xargs

pretty useful info on find and xargs, e.g. find /scratch/adam_work/ -name 'mmm*sav' | xargs rm

SETI

I read a paper on ArXiv today about SETI, and talked to Jeremy Darling about water masers. This got me thinking: the best way to signal your presence to the universe as an intelligent civilization is to take advantage of natural amplification. So, say, you go find a big cloud of water molecules in the right state to start masing, and blast them with some of the right frequency radio emission: you get a strongly enhanced isotropic emitter. Maybe SETI should look for those, then search for nearby coherent sources....


EDIT: Isotropic? No.

Monday, July 28, 2008

Hebrew Jewbilation 11

Wow... 11 malts and 11 hops, and it tastes like at least 3 different types of beer. There was an ale start and a porter finish to the first few sips, but later ones had a fuller, maltier flavor at the top of the mouth. It has some Irish Stout smoothness too. There's some residual porter-esque bitterness. A lot of depth and complexity that keeps going. Whew.

Sunday, July 27, 2008

Delirium Nocturne

Delirium Tremens is a tasty beer itself, I think. I'm drinking Delirium Nocturne right now. It has a cool (opaque!) bottle, plus a pink elephant on the label. At 8.5% it's pretty strong, but very drinkable with no taste of alcohol. It's definitely my favorite Belgian brown now. It still has that wheat-soy-sauce taste to it, but very weakly. It poured with ridiculous head - I could not control it. Overall, great beer, worth the ridiculous price I paid for it, whatever that was.

Saturday, July 26, 2008

More tastings

Deschutes Black Butte XX - good for a porter, reasonably drinkable, but still a porter
Rogue Chocolate Stout - a bit bitterer than I want in a chocolate stout
Victory 12 - pretty good, tasted a bit like a trippel

Sketch Wheat - much more drinkable than last time; "weirdness" gone

Thursday, July 24, 2008

Guinness and Dogfish Head

First, the Guinness: I'm drinking a Guinness Extra Stout right now. I'm a big fan of the normal Guinness Stout, but the extra stout is bitter - bridging on skunky. I don't like it. It has a sour edge.

Last night, tried the Dogfish Head Midas Touch. It's interesting - lots of flavors, topped by grape juice. It's a champagne-meade-beer. OK, but not spectacular. Pretty drinkable.

Dogfish Head Santo Palo tonight. It's a brown ale that looks more like a stout. I think it needs to mellow - it has an astringent alcohol flavor, but depth once you get further in. It was a lot better when it poured with some head than not. A little chocolate at the end, not much though.

Also tried the Avery "Ale to the Chief" Presidential Pale Ale. A little like an IPA, but really a hoppy pale ale. Not bad, not my favorite.

Those Dogfish beers are too expensive. I ought to stick to Avery and homebrews....

Tuesday, July 22, 2008

Outreach this past weekend

I did the thing at Vail, Starry Nights, and it went well.

Monday, July 21, 2008

Parallactic Angle

So it turns out parallactic angle and field rotation are essentially the same thing. While working on the data pipeline for the Bolocam Galactic Plane Survey, I've needed to deal with this. The parallactic angle is dependent on the alt/az, and therefore the time, of the observation. So using an RA/Dec in J2000 coordinates to get alt/az isn't going to work, because my observations weren't in 2000.0.... my best hope is that the PA in the NCDF files is actually the correct parallactic angle.

YARGH!

Stone 12th Anniversary Bitter Chocolate Stout

Tried this 9.2% bomber last night, and even drinking it over the course of an hour and a half I could feel my nose not feeling afterwards.

The pour was probably the most exciting part of this beer. It came out an extremely dark, rich, thick motor-oil looking thing with nearly no head. The flavor, though, is of a very bitter and very dry imperial stout. I didn't get much of the chocolate tone, because I only taste chocolate when it is sweetened - bakers chocolate doesn't taste like chocolate to me. I think this beer would have been better if kept a little bit sweeter, much unlike the other Imperial stouts I've tried lately.

Sunday, July 20, 2008

how much time per year is spent traveling?

I need to figure that out at some point

Friday, July 18, 2008

Observing this weekend

whoops, never made this post. Turns out I got rained out - 3 inches of rain on my night. Sad, no DIS time for P Cyg.

Lunar Occultation Hi-Res measurements

The folks at the VLT have come up with a means of achieving extremely high resolution from the ground: Observe when the moon occults a source and how long the occultation takes. Sweet.

This was applied in the galactic center first, of course:
Observations of binaries in GC
Additional observations in GC

ds9 commands to test distortion mapping

trying to figure out whether I'm screwing something up in the distortion map phase... the -scale limits command here is new and useful


ds9 testfields_*pix5*_map0.fits -cmap sls -scale limits 0 .005 -zoom 4 -match frames wcs -match scales -match colorbars &
ds9 testfields_*pix15*_map0.fits -cmap sls -scale limits 0 .003 -zoom 4 -match frames wcs -match scales -match colorbars &
ds9 testfields_*pix10*_map0.fits -cmap sls -scale limits 0 .004 -zoom 4 -match frames wcs -match scales -match colorbars &

Russell Owen, DS9

As I might have expected, Russell Owen from the University of Washington - the man responsible for the Telescope User Interface, TUI, on the Apache Point Observatory telescope - has written up a help page for XPA access points on ds9. He knows his stuff... I think I need to aspire to that.

World Wide Stout

Last night, had ~4oz of Dogfish Head's World Wide Stout. It was the Nov 2007 batch and was WAY too sweet. Just like the Stone Russian Imperial Stout, it was almost undrinkably sweet, so I recapped it and am going to "cellar" it (at 78 degrees, yikes) for a few months. The Stone brew turned out a lot better on the second try, I hope the Dogfish Head does too.

I also had a bottle of Young's Double Chocolate Stout. Oddly, they don't have it on their website. It has a strong chocolate flavor at the start, but it fades quickly into a generic, strongly carbonated stout - it's nothing special after the first taste.

Thursday, July 17, 2008

Mac terminal stuff

xterm-color has some annoying features when SSHing to other compys, including 'top' not functioning properly. The error I receive:
top: no termcap entry for a `xterm-color' terminal

The solution:
From MacOSXhints, in bash just add export TERM="vt100" to your .profile file.

Awk sexagesimal to decimal conversion

In VIM I often need to convert columns of RA/Dec from Sexagesimal into Decimal format.

%!awk '{ra = ($2+$3/60+$4/3600)*15; dec = $6+$7/60+$8/3600; print $1,"ra=",ra,", dec= ",$5,dec}'


The far more irritating inverse operation:

%!awk '{h=($2/15); h=h-(h\%1); m=($2-h*15)/15*60; m=m-(m\%1); s=($2-h*15-m*15/60)/15*3600; d=-($3-$3\%1); am=(-$3-d)*60; am=am-(am\%1); as=(-$3-d-am/60)*3600; printf "\%s \%02i:\%02i:\%02.2f
, -\%02i:\%02i:\%02.2f \%s \%s \%s\n" , $1,h,m,s,d,am,as,$4,$5,$6}'

Wednesday, July 16, 2008

Outreach Observing

Some notes for this Friday...

the ISS will rise at about 10:55 on Friday, July 18th, and 9:43 on Saturday, July 19th.

Jupiter will be in the sky, but Venus and Mercury will not. Jupiter will rise in the Southeast


Denver, CO 2008/07/16 10:15 pm Sunrise/set: 05:46 am / 08:26 pm
Predicted passes for: ISS daylight-saving time enabled

Local Duration
Date Time (min) Approach Max. elevation Departure
------------------------------------------------------------------------
2008/07/17 02:57 am <1 10° above N 10° above N 10° above NNE
2008/07/17 04:30 am 5 12° above NNW 31° above NE 10° above E
2008/07/17 10:30 pm <1 13° above WSW 15° above WSW 15° above WSW
2008/07/18 03:19 am 4 10° above NNW 16° above NNE 10° above ENE
2008/07/18 04:54 am 5 15° above NW 78° above W 10° above SE
2008/07/18 09:19 pm 5 13° above SSW 29° above SE 11° above ENE
2008/07/18 10:55 pm 4 17° above WNW 25° above NNW 10° above NNE
2008/07/19 03:42 am 5 13° above NNW 32° above NNE 12° above E
2008/07/19 05:18 am 4 16° above W 22° above SW 11° above S
2008/07/19 09:43 pm 5 19° above WSW 71° above N 10° above NE

google accident

I'm still trying to figure out why google doesn't link to my page for the term died in a google accident, but we'll see if this page ever changes that. I link to XKCD #369 from that page with that phrase.

meta

Why a blog? I've been strongly opposed to blogs for the longest time (after all, Desert Strike coined the word BLOG as an acronym for building), so why use one now?

1. link power - more links to my own pages if done correctly
2. google owns the blogger
2.a. google made it really easy
3. it's easier to add content here than to my real 'web page' which is already too content-heavy. Still, my web page is more useful for displaying code, my cv, etc.
4. needed a place to post beer reviews / brewing related content that doesn't fit on a normal web page unless I made a blog there
5. easiest way to take notes that I can't just accidentally delete...

and now that I've made this post,
6. because I like metahumour

DS9 - crosshairs on command line

ds9 pmm*_map0.fits -zscale -match scales -zoom 4 -match frames wcs -crosshair 17:33:02.7 -13:04:49.5 wcs fk5 -lock crosshairs wcs &
ds9 pmp*_map0.fits -zscale -match scales -zoom 4 -match frames wcs -crosshair 17:33:02.7 -13:04:49.5 wcs fk5 -lock crosshairs wcs &
ds9 mpp*_map0.fits -zscale -match scales -zoom 4 -match frames wcs -crosshair 17:33:02.7 -13:04:49.5 wcs fk5 -lock crosshairs wcs &
ds9 mpm*_map0.fits -zscale -match scales -zoom 4 -match frames wcs -crosshair 17:33:02.7 -13:04:49.5 wcs fk5 -lock crosshairs wcs &

DS9's crosshairs are extremely useful for checking on WCS coordinate matching, especially when they can be set precisely using the command line. I don't know how to set the coordinates exactly interactively... that may come later.

Tuesday, July 15, 2008

Mountain Sun

Went to the Mountain Sun, had the Thunderhead Stout and Stone's Levitation IPA.

The Thunderhead Stout is one of my favorites. It's rich, slightly sweet, full bodied. I can't identify any particular flavors, but it's delicious.

Stone's Levitation IPA is dark brown for an IPA. It's hoppy and pretty tasty, but nowhere near as good as the Dogfish Head IPAs.

SSH

Learned something knew about ssh... keys are stored in ~/.ssh/known_hosts. If a remote key changes, you may be denied access if your saved key is wrong.

The System

Cat and Girl is a webcomic probably best described as being subversive.

Today's comic reveals that my role is to perpetuate a system. It's always nice to analyze your workplace and world on a deeper level. I am perpetuating evil, but the alternatives are scary.

Also, just to make sure there's a tie back to beer, Goats has a litany for beer.

Explosion

Our "Workie Ticket", which was doing its primary in the carboy, popped its top. It made a mess but should still be healthy... the yeast was going extremely strong at the way-too-hot 78 degrees it's sitting at this morning. It already has a fruity aroma, though, so it's likely that all of our brews are going to be extremely fruity. Bleh.

Our Honey Brown , which was excellent at the start, has gotten a bit too dry and alcoholic. The first few sips have a strong flavor of alcohol to them. However, once you get into the beer, it gains a little bit of depth and isn't too bad... probably the alcohol talking. I think most of the bottles are probably overcarbonated at this point, but we only have a few left. Overall point: Honey beers need to be drunk within about a week of bottling for peak deliciousness; apparently honey dries out very strongly.

Monday, July 14, 2008

Pumphouse Brewery Review

Went to the pumphouse brewery last night and 'tasted' 4 beers.

First, for a brewpub, it's pretty weird to serve tastes in single-sip servings, but that's what they did. They didn't charge, so I didn't object, but it was difficult to get a strong sense for what the beers were meant to be.

Beers:
Cherry Saison: light colored, mild cherry flavor, no sweetness or depth to match the cherry flavor
Ginger saison: strong ginger flavor, no depth or interesting beer flavor. Like a dry but strong ginger ale
Saison: just... average
Copper: Weak flavored reddish beer

Tuesday, July 8, 2008

Buffalo the Destroyer!

Buffalo the Destroyer!

Adam Ginsburg

I'm not going to explain this nickname any more than I explained my other nickname, Keflavich