Welcome to iraf.net Sunday, May 28 2017 @ 08:45 AM GMT
IRAF Ported to the iPhone/iPod Touch
- Friday, January 25 2008 @ 06:15 AM GMT
- Contributed by: fitz
- Views: 6,687
The port itself was straightforward, the only hard part was building a cross-compiler to produce binaries for the ARM processor. Of course there's no native graphics or image display, but you can login to the device remotely and use an Xterm termiinal or XImtool/DS9 for the image display on your laptop. but is it really useful for anything other than impressing your friends? Only time will tell.
The system installs using the AppTapp installer on a jailbroken device, and is ready to run immediately. See below for additional requirements and information, including benchmarks and screenshots.
For IRAF to run on your iPod/iPhone, it must be "jailbroken". There are a number of ways to do this, see the Useful Links section below.
Assuming you're iPod is jailbroken and already has the AppTapp installer available, we suggest you also install the following:
- Community Sources repository (under the Sources category)
- Term-VT100 for logging in directly on the iPod
- BSD Subsystem (common unix tools)
- OpenSSH (server and client)
- Erica's Ported Utils (various cmdline tools)
- Erica's Utilities (various cmdline tools)
You'll find the most of these packages in the 'System' category of the Installer application. The Term-VT100 is only required to run the CL directly using the iPod keyboard, otherwise installing OpenSSH will allow you to login and run it remotely. You should have at least 100Mb of free space on your /private/var partition (i.e. not a completely full system) for core IRAF, more if you plan to install external packages and data.Installation
With the other packages installed, all you need to do to install IRAF is:
- Fire up the Installer application
- Go to 'Sources' (bottom right icon), then hit 'Edit', then 'Add' and
add the repository at
- When you go back to the package menu you should be a new category called IRAF Software. Installing IRAF or various external packages is done simply by selecting the package in the Installer. (Note, you may need to restart the Installer app to see the new category).
What you have at this point is a complete IRAF v2.14 runtime system (i.e. stripped of source) completely installed in hardwired paths.
Once the system is installed you can get back to reducing your HST data. If you bring up the Term-VT100 application you can type 'cl' and work directly on the iPod (without graphics or image display of course), however unless you're just showing off to friends a better solution is to SSH into the device from a laptop/desktop system.
The jailbreak software will likely have installed SSH and created a 'root' account (default passwd is 'alpine'). In the case of an iPod Touch, the device is just another machine with an IP address. So, from an XTerm window you can login to the iPod, start IRAF and even display images to a remote server. For example,
Login to the iPod as root based on its IP: % ssh firstname.lastname@example.org Define an IMTDEV using the native zsh: # export IMTDEV=inet:5137:tucana.tuc.noao.edu # cl Or, start a C-shell and define IMTDEV for remote display: # csh # setenv IMTDEV inet:5137:tucana.tuc.noao.edu # cl In IRAF, reset the terminal type and plot/display: cl> stty xterm cl> implot dev$pix cl> display dev$pix 1The 'ssh' gets you into the device. The IMTDEV tells IRAF to display to a remote XImtool/DS9 running on machine tucana. The installation comes with a login.cl that defaults to a terminal type compatible with the TERM-VT100 application, so resetting the terminal to 'xterm' is necessary for graphics from a remote login.
What works, what doesn't?
For the most part, tasks all work as they would on any other platform. However, there are still some problems with tty handling and signal catching (e.g. you'll see a 'bus error' logging out of the CL or when typing Ctrl-C to interrupt). The tty issues currently keep XGterm graphics from working, however XTerm graphics work as expected.
The Term-VT100 app issues a Ctrl-h for the backspace key and so the 'cl' startup command resets the backspace. If you're logging in remotely you may see the familiar problems with backspace chars.
An iPod for instance will typically have a name such as "John Smith's iPod", however there are places in the system where this is used as part of a node! resource prefix and the spaces cause a problem. For that reason, the 'cl' startup command will reset the hostname to 'ipod' before starting.
Lastly, the ECL could be built but isn't part of the distribution initially. It will be added as part of a future updateIt works, but how fast is it?
The following table shows the results of a simple benchmarking script on various machines test. The script uses 2048x2048 FITS files and is meant to simulate typical CCD data processing. All times are reported in seconds.
|Operation||16Gb iPod Touch||Macbook Pro (2Gb RAM)||Dual 3Ghz Xeon (Linux)||Sun SS-20||Sun Ultra-1/170|
|Make 5 imgs||109||24||4||99||46|
|Proc 5 imgs||184||17||3||108||16|
|Combine 3 imgs||64||4||1||32||11|
|9x9 Median 1 img||174||13||8||65||57|
Even though the device is entirely Flash based, the I/O throughput is only about 1.7Mb/s (something like 1/20th the throughput of hard disks found on real computers).Screenshots
The initial CL login screen, and IMHEAD and LPAR output
Screenshots of various installer screens
Jailbreaking software and AppTapp Installer
Installer.app Source List
Another Jailbreak Tutorial