Open/Close The Hidden Shelf Menu


The IRAF Button

Now you can push a button and run IRAF. This program is an AppleScript Studio project of mine, conceived over the Fourth of July weekend, though many weird errors prevented me from getting it to work until I upgraded to the December 2002 developer tools. I figure this will be immensely useful for newcomers, who always wonder how to launch IRAF in the first place. Here is a screenshot…

Screen Shot

AppleScript Studio requires MacOS X 10.1.2 or later I believe. I tested this program on two machines both running Jaguar, so your mileage may vary. The latest works with Panther best. It launches the IRAF cl in its own new xgterm, btw.

I need to get some feedback on this program to know if there are any users of it in the real world. Just because I think it’s cool is not the best reason to spend time working on it. At least, not with any urgency. Email marcos@macsingularity.org if you use it, like it, and/or would like to see it improved! Since no one ever emails me about the button despite the 200ish downloads, perhaps you’ll be more comfortable leaving a comment below… you can do that too.

Download The IRAF Button 0.98 (Universal Binary, runs native on Intel and PowerPC based Macs)

  • 268 Downloads of The IRAF Button 0.97. Still going strong.
  • 287 Downloads of The IRAF Button 0.96. Not too shabby for such a niche program.

To Do List

Support the ecl

Maintain preferences file to remember settings.

Add a “Run everything on launch” option to make running IRAF a single double-click.

Version History

  • 0.98 Universal Binary. Updates to the non-applescript portions, targets, Xcode stuff mainly.
  • 0.97 Tiger update. It should now launch Apple’s X11 from either location in Applications or Application/Utilities. I now tell X11.app directly “launch” so it should work fine. Launching XDarwin (who is still using Xdarwin I don’t know) is at this point untested, but I think I got it to work too.
  • 0.96 Added menu items to refresh the the button window (in File menu, command-R) and to bring back the Main Window if it gets closed (the stupid program should quit if you close the window but that still does not seem to be working.)
  • 0.95 Corrected egregious errors that led to a crash on startup (applescript type 1 error) if parts of IRAF or X11IRAF were not installed properly. Provided that IRAF would launch even if the cl is in /usr/bin or /usr/local/bin.
  • 0.91 Added an icon that looks more like a skittle than a button, but oh well.
  • 0.9 Panther release. Added tests for various files, executables. Changed X11.app location.
  • 0.5 Initial Release

13 Responses to “The IRAF Button”

  1. 1

    Jn Thaler Says

    I’m a new iraf user, and this button is most useful for novices like me. It would be helpful (since I tend to forget): * Chect whether iraf is already running. * Ditto for ds9. One can easily end up with multiple processes.

    Thanks, Jon

  2. 2

    Marcos Says

    Well, certainly I might be able to add a way to check for this at least. A lot of people like to run more than one IRAF, though usually not more than one ds9. I’ll see about incorporating some sort of indicator as to what’s already running. Thanks!

  3. 3

    Glenn Says

    I have found on my Intel Mac (IRAF 2.13 BETA 2) that the IRAF button doesn’t change to the ~/iraf directory before launching iraf.

  4. 4

    Glenn Says

    (In fact, it launches IRAF in my Documents directory, of all things. I can’t explain it.)

  5. 5

    Marcos Says

    Hmm, so the text in the IRAF path field says what? Your documents folder? You’re using the latest version, I assume.

  6. 6

    Glenn Says

    Never mind, Dumbass Man! (TM) had a “cd Documents” in his .tcshrc file that screwed things up. It only was supposed to do that for interactive logins, but of course IRAf is an interactive login. I had to make it NOT do that for xgterms. Sigh.

  7. 7

    Bill Says

    I am having two problems with the iraf button on a multi-use machine.

    First if one user is running the iraf button and leaves their desktop running but another user logs in to a second desktop to run iraf then I get an error message that reflects that display :0.0 is not reachable (the second user of course would be :1.0) so it doesnt look like the iraf button is properly making use of the DISPLAY environment variable.

    Second if one user has run the iraf button and has closed up their iraf session, shutdown X11 and then logged out. A new user who logs in and runs the iraf button will get X11 to startup, iraf to startup however ds9 never displays and no errors are displayed. It takes a reboot of the machine for the iraf button to launch ds9 properly. Launching ds9 manually (from the applications menu or from an xterm) does work however. It appears a mystery process is blocking the display of ds9 at launch.

    We are running MacOSX version 10.4.10 on a 2 x 2.66 Dual Core Intel Duo Xenon machine. Iraf was installed the old fashion way (not with your tools) and we are running the latest.

    Any help would be appreciated.

  8. 8

    Marcos Says

    Yeah, the IRAF button was never intended or tested for multi user machines. It definitely does not make “proper use” of the DISPLAY variable, I’ll tell you that right now.

    So, how exactly are two people logging into the Mac environment of the same machine at the same time? I didn’t think that was possible… or someone ssh’ing in or something similar?

  9. 9

    me Says

    Click on the light switch, then Accounts at the beginning of the last row. Click on the lock and enter your password. Click on “Login Options” at the bottom of the list of user names. Click “enable fast user switching”.

    From now on, you will see your name at the upper right of the screen. Click on your name to switch to another user. You’ll have to enter the other user’s password, then you get a goofy animated display, followed by a desktop for that user. You can change back and forth among users arbitrarily.

  10. 10

    Marcos Says

    Ah, so you’re using fast user switching but not logging out the previous user. (In this sense, really only user is doing anything at any one time, but they’re both logged in.) I suppose you choose to not log out user 1 so that they can keep all their windows and such open.

    Well, I can look into changing the IRAF button but … it clearly wasn’t designed with this sort of simultaneous use of X11 in mind. Other apps also don’t work with fast user switching ,like I believe iTunes. For now, until I can try to deal with DISPLAY and such you’ll have to quit X11 before the second user logs in … or just get by launching IRAF and ds9 the old fashioned way.

  11. 11

    Nick Devereux Says

    Marcos,

    I’m still having a small problem with the IRAF button, it does not launch ds9.

    I get an error message;

    csh:PATH=/usr/local/bin/ds9: Command not found

    The thing is ds9 is currently on my desktop, and I can not find the directory that the IRAF button is looking in.

    How do I change the path as that would seem to be easier?

    Please let me know

    (Running IRAF2.13 Beta2 on a G4)

    Thanks

    Nick

  12. 12

    Marcos Says

    If you have the Darwin version of ds9, then just cd to your desktop, make a /usr/local/bin/ directory, (with sudo) and then move ds9 into /usr/local/bin. I think it might look for ds9 in /usr/bin too, but I’m not sure.

    You can always use “show package contents” on the IRAF button and then find the appropritae .csh file to edit it and change the path.

    The “MacOS X” version of ds9 is some .app wrapper for the darwin version and will just run when you double-click it.

  13. 13

    Stefan Says

    I am not sure if I am stupid or what … but where in Earth can I download the IRAF Button on this web site?? I can’t find it. Thanks!

Leave a Response


Close
E-mail It