(I'm going to try to gradually shift my blogging to this one...) I wrote a bash wrapper for Tom Robitaille's montage wrapper to allow fits wildcards. #!/bin/bashorigdir=`pwd`#echo $# $*if [ $# -gt 0 ]then for ii in $* do if [ ${ii%=*} == 'header' ] then /usr/local/bin/montage/mGetHdr ${ii#*=} mosaic.hdr elif [ ${ii%=*} == 'outfile' ] then outfile=${ii#*=} elif [ `echo $ii | grep =` ] then params="$params,${ii%=*}='${ii#*=}'" elif [ `echo $ii | grep ".fits"` ] then files=( ${files[@]} $ii ) fi donefiecho ${files[@]} ${#files} if [ ${#files} -gt 0 ] then mkdir tmp cp ${files[@]} tmp/ cp mosaic.hdr tmp/ cd tmp/fiif [ -f mosaic.hdr ] then echo "mosaic.hdr exists, continuing" dir=`pwd` echo python -c "import montage; montage.wrappers.mosaic('$dir','$dir/mosaic',header='$dir/mosaic.hdr'$params)" python -c "import montage; montage.wrappers.mosaic('$dir','$dir/mosaic',header='$dir/mosaic.hdr'$params)" cd $origdir if [ -d tmp ] then if [ $outfile ] then mv tmp/mosaic/mosaic.fits $outfile else mv tmp/mosaic mosaic fi rm -r tmp fielse echo "mosaic.hdr does not exist. Quitting." cd $origdirfi
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.
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
MOSAIC data reduction
MOSAIC reduction is very difficult. http://www.noao.edu/noao/noaodeep/ReductionOpt/frames.html has the official instructions. Important things: Have the latest version of MSCRED and MSCDB installed. Both will give cryptic errors or "cannot open file" errors (because the files don't exist) otherwise. mscredsetinstrument kpno CCDMosaThin1msccmatch obj09*.fits coords="!mscgetcat $I $C" search=60 rsearch=1 nfit=30 accept=yes interactive=no fit=no
Most important astronomical publications
I'm interested to hear input on this. Some I know of: Cardelli, Clayton, Mathis 1989 - determined interstellar extinction law Kurucz 1993 - possibly a book? Stellar atmosphere calculations
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.
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.
my scipy install...
As far as I was able to reconstruct, my scipy install looked like this when it went well: mkdir scipy-bincp ../scipy-svn/site.cfg .export PATH=/Users/adam/repos/scipy.git/scipy-bin:$PATHln -s /usr/bin/g++-4.0 scipy-bin/g++-4.0ln -s /usr/bin/g++-4.0 scipy-bin/c++export CC=/usr/bin/gcc-4.0 ln -s /usr/bin/gcc-4.0 scipy-bin/ln -s /usr/bin/gcc-4.0 scipy-bin/gccln -s /usr/local/bin/gfortran-4.0 scipy-bin/gfortran-4.0ln -s /usr/local/bin/gfortran-4.0 scipy-bin/gfortranln -s /usr/local/bin/g95 scipy-bin/g95ln -s /usr/local/bin/i686-apple-darwin8-gfortran-4.2 scipy-bin/python2.7 setup.py buildpython2.7 setup.py install However, site.cfg included pointers to AMD and UMFPACK that were installed via the incredibly complicated series of steps listed here: http://blog.hyperjeff.net/?p=160 AG
My starred reader articles
Just posting up a few papers I found interesting. Peng Wang and Tom Abel's paper on outflow feedback in clusters A somewhat less interesting follow-up to the previous HARP mapping of the Serpens cloud core Neal Evans' review of low mass star formation observations the MNRAS paper on supermassive stars in the LMC Identification of molecular clouds from the FCRAO OGS
NaN-friendly convolution
NaN-friendly convolution is important for, e.g., masked data sets in which you want to interpolate across the masked region.
Astropy has gained this functionality with pull request 155: https://github.com/astropy/astropy/pull/155 but this is a "direct" convolution parallel to IDL's 'convol' routine.
My FFT-based version now works in N dimensions and is a little cleaner: http://code.google.com/p/agpy/source/browse/trunk/AG_fft_tools/convolve_nd.py
I'm still working on writing unit tests, and I'm really not sure what the "correct" behavior at the edges is for the different cases... right now, it seems counterintuitive to me, but the code is doing what I expect it to.
Also, Boxcar kernels always result in shifts for me... they're never supposed to. This is a bug.
Currently, other links to these codes: http://stackoverflow.com/questions/1100100/fft-based-2d-convolution-and-correlation-in-python/8454010#8454010