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.
Dying Dock
My dock keeps dying. Repeatedly. Over and over. Only solution so far: ps -vax | grep -E "Dock|PID"kill -HUP PIDkill -s SIGCHLD PID And similarly for problems with Chrome + /usr/sbin/mDNSResponder. They tend to go bad together.... no clues yet from the system logs. Ironically, the crash reporter seems to fail the most often...
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.
Failure to compile 64 bit gtk on mac os
Attempted to install gtk+-2.17.2 on my mac. Had to install: glib-2.21.2 which would not let me compile with multiple architectures, and pkgconfig-0.9.0, which won't configure because: configure: configuring in glib-1.2.8configure: running /bin/sh './configure' --prefix=/usr/local CC= CFLAGS= LDFLAGS= --cache-file=/dev/null --srcdir=.configure: warning: CC=: invalid host typeconfigure: warning: CFLAGS=: invalid host typeconfigure: error: can only configure for one host and one target at a timeconfigure: error: /bin/sh './configure' failed for glib-1.2.8 which is bs because I don't have any compiler flags set.
So, gtk+ seems hopeless. UPDATE: 0.9.0 is not the latest version, 0.23.0 is. Dumb version numbering.
GTK is absurd to install. You need:
- pkg-config
- glib
- cairo
- pixman
- pango (MUST be installed AFTER cairo)
- atk
- libtiff
- libjpg
- jpeg2000 - but I just passed a flag to not do this because it didn't install right. --without-libjasper
- fontconfig I mean, really? at this point it's just ridiculous....
and finally, it died with this: checking Pango flags... configure: error:
- ::
- *** Pango not found. Pango built with Cairo support is required *** to build GTK+. See http://www.pango.org for Pango information.
which meant that I had to reinstall Pango because I had installed it before Cairo.
I believe this is where the term dependency hell comes from.
Also, I don't think any of these are x86-64 compatible.
Then I'm STILL not done. PyGTK dies with an import error on dsextras, which a painful google search traces to pygobject. pygobject makes and installs fine.... but then I find out it installed to /usr/local/lib/python2.6/site-packages/gtk-2.0/, which is obviously not on my python path since I installed a framework.
So: ./configure --prefix=/Library/Frameworks/Python.framework/Versions/2.6/ in both pygobject and pygtk.
Oh, guess what? Need pycairo too. What happens there? What you'd guess:
ld warning: in /Developer/SDKs/MacOSX10.5.sdk/usr/local/lib/libcairo.dylib, file is not of required architecture
so when I configure pygtk:
- The following modules will be built:
- atk
- pango
- The following modules will NOT be built:
- pangocairo
- gtk
- gtk.glade
- gtk.unixprint
Damn. That blows.
python-64 -c "import gtk" ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/gtk-2.0/glib/\_glib.so, 2): no suitable image found. Did find: /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/gtk-2.0/glib/\_glib.so: mach-o, but wrong architecture
FAIL.
finally got matplotlib to install...
the key is reading the readme, not just the make.osx file.
These commands Just Work: make -f make.osx PYVERSION=2.6 PREFIX=/Users/adam/repos/mpl_dependencies/ fetch deps mpl_install_stdmake -f make.osx PYVERSION=2.7 PREFIX=/Users/adam/repos/mpl_dependencies/ fetch deps mpl_install_std
while, e.g., this one: make -f make.osx PYVERSION=2.6 PREFIX=/Users/adam/repos/mpl_dependencies/ fetch deps mpl_install didn't. I guess because that one doesn't actually install anything.
find and xargs
pretty useful info on find and xargs, e.g. find /scratch/adam_work/ -name 'mmm*sav' | xargs rm
Hosting on my mac
I'm hosting my website off my mac; it should be accessible to the outside world now: eta.colorado.edu. A few things went into this....
- Don't install the fink version. The two versions clash and depending on how you access your computer you could end up looking at entirely different directories (e.g. localhost and eta.colorado.edu referred to different sites for a while)
- The configuration file is /private/etc/apache2/httpd.conf
- I needed to change DirectoryIndex to index.htm (from index.html)
- uncommmented "LoadModule php5_module libexec/apache2/libphp5.so"
- had to allow override so that .htaccess files would work.
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
IDL array indexing
array_indices(array, location) instead of that x mod n_e(), y / n_e() crap
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 = 0red = [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