Archive for October, 2007

SAOImage ds9 version 5.0 released

Astronomical Software, IRAF, MacOS X, SciSoft OSX, X11 1 Comment »
On October 15, the folks behind SAOImage released SAOImage DS9 version 5.0. The big change I noticed is they now have a completely MacOS X native (read “Aqua”) version of ds9 (but only if you use the application package version of ds9, the command line versions remain X11)! I downloaded the following three versions: The new features lists page tells us that this release includes:
  • MacOSX Aqua Support: DS9 has been ported to MacOSX Aqua and is an universal application which no longer requires X11.
  • Compressed FITS Support: DS9 supports compressed FITS images using RICE compression.
  • Mask Support: DS9 supports overlay masks. A mask is defined as a valid FITS image, in which a non zero value indicates that the selected mask color is to be displayed instead of the data value color.
  • SkyView Support: DS9 provides support for HEASARC’s image cutout service, SkyView. This site provides image cutout service for a number of image surveys, including SDSS.
  • Multi-Language Support: DS9 provides multi-language support. By default, the language used for menus and dialog boxes is based on the value of the operating system locale variable. The user may override the default value by selecting the desired language in the preferences or by the -language command line option.
  • Preferences: Preferences are automatically saved when a user changes an option. Selecting the saving preferences menu item is no longer needed.
More detailed release notes are available here. I was able to get this version of ds9 integrated with SciSoft OSX by doing the following:
  1. Decompress the command line version of ds9 via the terminal using tar xzvf ds9.darwinppc.5.0.tar.gz (PPC version) or tar xzvf ds9.darwinintel.5.0.tar.gz (Intel version). When the decompression is done, all you have is an executable called ds9.
  2. Next, from the terminal, go to the /scisoft/bin directory (on PPC) or /scisoft/i386/bin/ directory (on Intel) and rename the old ds9 executable to something like ds9_old (using something like mv ds9 ds9_old).
  3. Copy your newly decompressed ds9 executable into the SciSoft OSX binary directory. I should note the command line version of ds9 still requires X11.

HINT: Another (probably better) solution, to g77 flakeiness in IRAF on Mac Intel

Astronomical Software, IRAF, MacOS X Annoyances No Comments »

The IRAF.net forums had a post from someone having issues getting the IRAF package rvsao to compile properly on MacOS X on Intel-based Macs. I’ve commented about this before and had discussions with Doug Mink, the fellow behind rvsao as I have battled to compile it. It’s not actually that tricky, you just have to be careful. The key issue is that the most commonly used g77 compiler on Intel-based Macs is probably g77 version 3.4 as downloaded from the High Performance Computing for Mac OS X site. This version of g77 is a bit more picky about logical statements. Specifically, when you try to compile rvsao within IRAF using mkpkg, you get the following error (as noted by Phil Massey in the IRAF.net Forums earlier today):

I’m trying to install the external package rvsao on my Intel mac. However, when I go to do the mkpkg there is a program “writetemp.f” that won’t compile:

In subroutine `tmpwrf':
writetemp.f:139:
if (.not.(debug .eq. .true.)) goto 130
1 2 3
Use .EQV./.NEQV. instead of .EQ./.NE. at (2) for LOGICAL operands at (1) and (3

I was having exactly these sorts of errors with not only rvsao, but several of the SAO IRAF packages this summer and after banging my head on this a bit, I found a solution that worked for me. It turns out g77 needed to be told to use less restrictive logicals via a “-fugly-logint” flag during the compile. So my solution was to write a perl script that was saves as /usr/local/bin/f77, such that when f77 was called (by these IRAF mkpkg calls) it would issue a g77 call with this flag set on the compile. So I posted about this on that IRAF.net forum thread started by Phil Massey.

I got a response from Mike Fitz where he points out that you can set up the XC compiler used by IRAF to always use these flags via environmental variables:

If you use ‘g77′ all the time and need this flag it can be set for all compilations either in the user environment (e.g. your .cshrc file) using:

Code:
setenv XC_F77 g77
setenv XC_FFLAGS “-fugly-logint”

or for problematic packages you can edit the ‘mkpkg.inc’ file for the package (normally in the pkg$lib directory but in the case of RVSAO it’s in the main rvsao$dir) to add “-/fugly-int” to the ‘XFLAGS’ definition. The ‘/’ tells the XC compiler to pass the flag thru to the underlying compiler unchanged, but note this sometimes causes problems or warning if say g77 knows the flag but gcc doesn’t (i.e. the XFLAGS are passed to all sources being compiled, you’ll need the XC_FFLAGS trick to pass only to fortran code).

Texmaker is my latest LaTeX power tool

Astronomical Software, LaTeX, MacOS X, MacPorts No Comments »

There are a wide variety of LaTeX front-ends out there. I recently discovered Texmaker and I like it a lot. It’s not quite Mac native, so the interface takes a little getting used to, but has a nice syntax-coloring editor, some latex-specific menu items for inserting symbols and math, and it is free. You can download it here, but I would recommend installing aspell (for spell checking) via macports instead of using fink. Â

ChkTeX on Mac OS X

Astronomical Software, LaTeX, MacOS X, MacPorts, Programming No Comments »

I haven’t played with this personally yet, but since I will be working on a paper for publication shortly, it looks like this might come in very handy. A Dr. Figueroa-Centeno in the Department of Mathematics in Hawai`i has posted instructions for getting the LaTeX syntax checker, ChkTeX, running under MacOS X. It doesn’t look terribly difficult. He includes instructions and a script for BBEdit integration, which makes me a happier BBEdit user. To quote from the ChkTeX website:

[ChkTeX] has been written in frustration because some constructs in LaTeX are sometimes non-intuitive, and easy to forget. It is not a replacement for the built-in checker in LaTeX; however it catches some typographic errors LaTeX oversees. In other words, it is Lint for LaTeX.

Looks promising for me. I use Splint when C programming (I installed splint via MacPorts using the command line sudo port install splint), so the idea of a Lint for LaTeX is appealing. I’ll be visiting Dr. Figueroa-Centeno’s website on ChkTeX on Mac OS X for full details on installing it, once I get a break from teaching.