Welcome to iraf.net Monday, December 18 2017 @ 05:16 AM GMT
IRAF v2.15 to be Available for iPad
- Monday, August 09 2010 @ 06:19 AM GMT
- Contributed by: fitz
- Views: 6,411
IRAF is now running on the iPad and will be available as part of the main v2.15 release for jailbroken iPad/iPhone/iPod Touch devices running iOS 3.1.2 or earlier. I'll post more details at the time of release, the purpose for this post is to let you know what's coming so you can hold off on iOS updates beyond 3.1.2 which will likely hinder your ability to easily jailbreak your device. If you want IRAF on your iPad, do not update your iOS just yet!! iOS4 (and indeed anything beyonf iOS 3.12) is not yet included in this announcement.
See below for more about what's working (and how well), and what you'll need to have ready to impress your friends, bosses, and to justify that year-end purchase you know you wanna make....
Update 8/14/10: DS9 now running, X11IRAF compiles but does not yet run.Requirements and Installation
The key requirement is that you have a jailbroken iPad. This is now a trivial thing to do, just point your Safari browser to http://jailbreakme.com and follow the instructions. Provided you're using iOS 3.1.2 or earlier, the jailbreak takes just a few minutes and is highly automated.
Once the device is jailbroken, open the Cydia application that was installed and start browsing for new applications. Specifically you will need to install the tcsh (i.e. Tenex C-Shell) to run various iraf commands (use the Search button to find it). Note that development tools and libraries you'll find will not give you a completely working development system, that is a subject of another post.
Lastly, you will need to install some sort of terminal application so you have a working console for the device. I recommend iSSH from the AppStore and explain why below.
With IRAF installed on the iPad, there are basically two ways it can be used:
- As a network machine, e.g. as you would any server on the net
- As a replacement for your laptop/desktop machine
We'll discuss what you can do with each mode below.iPad as a Network Machine
I've found that the first case is really only useful for development, i.e. your kids have run off with the actual device and the only way to get time on it is to log in remotely while they're playing games. This mode is also useful to just explore the machine and configure it as desired.
The jailbreak software will have installed OpenSSH and created a 'root' account (default passwd is 'alpine', change it ASAP). In the case of an iDevice, it looks like just another unix machine with an IP address. So, from an XGterm/XTerm window you can login to the device, start IRAF and even display images to a remote server. For example,
Login to the iPod as 'root' using its IP address: % ssh email@example.com 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 1
The 'ssh' gets you into the device as it would for any machine on the net. If you login from an XGterm or XTerm window on your laptop then you'll be able to use graphics since those are running locally, likewise for image display with a local XImtool/DS9 window. In this case, you're using the iPad only for it's CPU or because the data are stored on the device, but this seems to be of limited value unless you're demonstrating something to a colleague at an IRAF-challenged institution or need the video output from a "real" machine for a presentation.
iPad as a Laptop Replacement
As a laptop/desktop replacement, you shouldn't expect much more processing power from an iPad than you would from a basic Linux Netbook device, i.e. things will run more slowly and the screen real estate isn't what you are used to. Nevertheless, you'll be able to do actual work and in a tight airline seat or for light computing the iPad is a fully functional computer (once properly configured).
IRAF and external packages will install differently because of the use of Cydia repositories, but it will be a much simplified installation. You would use standard unix tools such as 'scp' or 'rsync' to move data between machines, but you could also configure IRAF networking to access your desktop data remotely (although typing the 'node!' prefix gets old, I suggest using @files whenever possible). To really use the iPad as you would your laptop, you need at least a console terminal, and one with graphics support.
The MobileTerminal application normally used on jailbroken iPhones does not yet work for the iPad, and even so all it provides is a basic VT100 emulation. I've found that the iSSH application provides not only a ssh and VNC client, but also a terminal emulator supporting 'xterm' and 'xterm-color' text, complete with arrow-key support not normally found on the iPad keyboard. The feature that really makes this $10 application worth the money is a built-in X11 server, meaning that if you have a xterm client on the machine you can truly run a native X environment on your iPad. The X11 server is available separately, however having a decent terminal application that can be used for remote logins is invaluable.
With iSSH installed from the AppStore, you'll need to configure it to establish a connection to 'localhost' (i.e. 127.0.0.1) so you can ssh into your own device (the remember, the jailbreak will have installed OpenSSH for you already). From there you'll use a custom 'startx' script to open the clients you'll want to run (e.g. a Xterm running IRAF).
The Cydia repositories include a number of X libraries, but not many actual applications. Specifically missing was the 'xterm' binary and any flavor of window manager. To get a usable environment, I also built both of these and will include them in the final release. The result: IRAF runs in and Xterm window, complete with graphics support, and you have access to the full 1024x768 pixels of the device for other windows (see screenshot).
As of this writing, I've managed to get the XGterm/XImtool tasks to compile for the device, but not quite run. This means there is no image display support at the moment but I'm still looking into it. The X performance is also a bit sluggish at times but the iSSH author is planning to improve this as well in the near future.
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 signal handling (e.g. you'll see a 'bus error' logging out of the CL or when typing Ctrl-C to interrupt) to be addressed before the final release.
The touch interface isn't the greatest for fine positioning of a cursor on the plot, use of a Bluetooth mouse might be necessary for some applications. Likewise, the window manager with a touch interface takes some getting used to if you move windows around frequently.
An iPad will typically have a name such as "Joe Smith's iPad", however there are places in the system where this is used as part of a node! resource prefix and the spaces in the host name cause problems. For that reason, the 'cl' startup command will reset the hostname to 'ipad' before starting.
In theory, this port should also work on iPhone/iPod Touch devices running iOS 3.1 or earlier, but I admit this hasn't been tested. The iPhone 4 should be compatible hardware but without access to a jailbroken device it's impossible to say whether it will be binary compatible as well.It works, but how fast is it?
The following table shows the results of a simple benchmarking script on various machines tested. The script uses 2048x2048 FITS files and is meant to simulate typical CCD data processing. All times are reported in seconds.
|Operation||64Gb iPad||16Gb iPod Touch 1G||Macbook Pro (2Gb RAM)||Dual 3Ghz Xeon (Linux)||Sun SS-20||Sun Ultra-1/170|
|Make 5 imgs||46||109||24||4||99||46|
|Proc 3 imgs||56||184||17||3||108||16|
|Combine 3 imgs||16||64||4||1||32||11|
|9x9 Median 1 img||77||174||13||8||65||57|
The iPad performance is much better than iPod (as expected), but not quite as fast as standard laptops. For browsing your data or light processing it is perfectly usable however.Screenshots
IRAF running on the iSSH terminal.
IRAF running in the X11 server of iSSH in an XTerm window.