Software:IRAF

From HandWiki
Revision as of 16:08, 9 February 2024 by Rjetedi (talk | contribs) (linkage)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Short description: Software collection for astronomical data reduction and data analysis
IRAF
Original author(s)National Optical Astronomy Observatory
Developer(s)IRAF community volunteers
Initial release1984; 40 years ago (1984)
TypeAstronomical Analysis

IRAF (Image Reduction and Analysis Facility) is a collection of software written at the National Optical Astronomy Observatory (NOAO) geared towards the reduction of astronomical images and spectra in pixel array form. This is primarily data taken from imaging array detectors such as CCDs. It is available for all major operating systems for mainframes and desktop computers. IRAF was designed cross-platform, supporting VMS and UNIX-like operating systems. Use on Microsoft Windows was made possible by Cygwin in earlier versions, and can be today done with the Windows Subsystem for Linux. Today, it is primarily used on macOS and Linux.

IRAF commands (known as tasks) are organized into package structures. Additional packages may be added to IRAF. Packages may contain other packages. There are many packages available by NOAO and external developers often focusing on a particular branch of research or facility.

Functionality available in IRAF includes the calibration of the fluxes and positions of astronomical objects within an image, compensation for sensitivity variations between detector pixels, combination of multiple images or measurement of the redshifts of absorption or emission lines in a spectrum.

While IRAF is still very popular among astronomers, institutional development and maintenance was stopped. IRAF is now maintained as community software.[1][2]

History

The IRAF project started in fall 1981 at Kitt Peak National Observatory. In 1982, a preliminary design and the first version of the Command Language (CL) were completed. The IRAF Group was founded. Designer of the IRAF system and chief programmer was Doug Tody. In 1983, Space Telescope Science Institute selected IRAF as the environment for their SDAS data analysis system and ported the system to VMS. The first internal IRAF release was in 1984. After a limited distribution of a few outside sites the first public release was 1987.[3]

In the middle of the 1990s, the "Open IRAF" project was started to address the problems that were seen at that time. This included language bindings, a way to use IRAF components without the full IRAF environment, new data types and dynamically loadable user code.[4] This project was never completed.

At the end of the 1990s, the IRAF development slowed down considerably, as the system was considered mature. The user support was transferred to a Web forum in 2005 and new development of the core system was officially decreased to a very low level.[5] However, voluntary work of the IRAF developers continued and they distributed some unofficial intermediary versions.

From 2006 to 2009, a first effort was made to port IRAF to 64 bit at the Institute of Space and Astronautical Science Japan.[6] While this effort did not evolve into a new official IRAF version, it contributed significant portions to the 64-bit port by NOAO.

NOAO resumed development efforts in 2007,[7] porting the system to 64 bit and adding Virtual Observatory capabilities to it. This phase ended in 2013 with the release of version 2.16.1.

In 2017, the source code was transferred to GitHub. In an effort to package the IRAF software for Debian, it was cleaned up from the remaining non-free source code and is maintained solely by the community since then. After a few pre-releases, version 2.17 was released in early 2022.

IRAF major versions[8]
Version Release date Remarks
2.1 1984 first internal release
2.2 February 1986 limited public release
2.3 August 14, 1986 support for STSDAS
2.4 October 19, 1986
2.5 July 8, 1987 first public release
2.6 February 24, 1988
2.7 December 4, 1988
2.8 June 30, 1989
2.9 April 10, 1990
2.10 July 7, 1992
2.11 August 27, 1997
2.12 January 25, 2002
2.13 2006 unofficial releases by NOAO volunteers
2.14 December 1, 2007
2.15 November 22, 2010
2.16 March 22, 2012 last major release by NOAO
2.17 January 4, 2022 first community release

Licensing

The licensing status of IRAF generally follows the MIT license scheme. Older versions contained some non-free software. In particular, the NCAR graphics code restricted re-distribution of IRAF before it was removed in version 2.16.[9] Also, old versions used code taken from the Numerical Recipes book under a different license. This code was removed or replaced with Open Source in versions after 2.16.1.[10] This allowed the distribution of IRAF packages in mainstream Linux distributions like Debian[11] or Ubuntu.

System design

Four basic components make up the run-time IRAF system:[12]

  • The Applications Packages are a structured collection of portable tasks for scientific data reduction and analysis, but also for system utilities.
  • The Command Language (CL) is the default interactive user interface and is also used as scripting language for tasks in the application packages.
  • The Virtual Operation System (VOS) provides a portable interface for the application tasks. It is modeled after the Unix system functions, but with an API for the IRAF specific Subset Preprocessor language (SPP).
  • The Host System Interface (HSI) is the kernel providing an interface between the host system and the functions of the VOS. It also provides tools necessary for bootstrapping the system from source. The SPP compiler is also part of the HSI.

Only the HSI is system dependent. All other components are portable by the use of the functions provided by the HSI. This way, porting to a new system requires only changes in this component. However, the initial design was implicitly based on the universal use of 32-bit data types and therefore the port to 64 bit required major efforts not only in the HSI but in all components of the system.

Application packages

Application Packages are recursively structured in subpackages and tasks. They can be divided into two classes: general system and basic dataprocessing utilities, and packages specific to astronomical data reduction and analysis. The tasks are dominatly written in SPP and CL.

System packages

The system packages are located in the base package of IRAF and provide tools for the CL, useful operating system utilities, and basic scientific utilities, f.e. for image processing:

dataio
Data format conversion (FITS, IRAF image format etc.)
images
General bitmap image processing and display
lists
List processing
plot
Vector graphics plotting utilities
softools
Software development and system maintenance tools
system
System utilities
utilities
Miscellaneous utilities, including nttools to handle tables.

Optical astronomy packages

The noao packages are used for the analysis of optical astronomy data. Most of these tasks are general, but the imred package also contains data reduction tasks for specific instruments. Some of the important packages are:

imred
Image reductions package, containing both general tasks for astronomical data reduction and for specific KPNO instruments
artdata
Artificial data generation package. May generate artificial catalogs, 2D and 2D spectra, create images from artificial stars, galaxies, noise and cosmic rays etc. for testing purposes.
astrometry
Astrometry package to obtain astrometric coordinates for objects in stellar fields
digiphot
Digital stellar photometry package
IRAF splot from the onedspec package at work.
onedspec
One dimensional spectral data reduction and analysis package. One important task in this package is splot, a graphical tool for the analysis of spectra.
twodspec
Two dimensional spectral reduction and analysis package, the same operations for two-dimensional spectra (longslit, multispec)
surfphot
Galaxy isophotal analysis package
astcat
Astronomical catalog and surveys access package

External packages

One strength of IRAF was the existence of various external packages, which resolved specific problems or implemented specialized data reduction pipelines. Among the packages are

fitsutil
Utilities for single and multiple extension FITS files
sptable
IRAF package for tabular spectra
ctio
Tools for the Cerro Tololo Inter-American Observatory
stsdas
Software system from Space Telescope Science Institute for calibrating and analyzing data from the Hubble Space Telescope (the original tables package from STSci is included as utilities.nttables in the system packages).
stecf
IRAF tasks developed at the Space Telescope European Coordinating Facility
rvsao
Radial Velocity Package by Smithsonian Astrophysical Observatory
wcstools
Image World Coordinate System Utilities by Jessica Mink
aXe
Spectral Extraction and Visualization software
gemini
Data reduction pipeline for the Gemini Observatory

Many of these packages are however not maintained anymore.[13] Porting to 64 bit also required significant effort and not all external packages were ported and therefore only usable in a 32-bit environment.

User-defined tasks

IRAF allows users to write their own tasks in two main ways. One is by writing non-compiled procedure (Command Language, CL) scripts. The second is through compiled subset pre-processor (SPP) programs. Tutorial documents exist for both methods.[14]

IRAF specific languages

Command language

The Command Language (CL), serves as a command and runtime supportive interface between the user at his computer terminal and the application programs he is executing. The user types his commands to the CL and it does whatever task and file manipulations are necessary to carry out the commands. In later versions, the original CL was extended to ECL, which has an editable command line as its main advantage. A version that enabled direct access to the Virtual Observatory (VOCL) was developed too.

The CL primarily serves as a shell and organizes the work with the system and the applications. There are three types of tasks the CL can execute: native tasks, which are part of compiled IRAF executables, scripts (CL tasks which are tasks written in CL), and foreign tasks, external programs or scripts that are executed by the CL. For each task, a parameter file may exist. It contains a description of each of the parameters used by the task that should be known and managed by the CL.[15]

Here is a simple Hello World script in CL:

{
print(' Hello, world !! ')
}

CL scripts have usually the suffix .cl, which may cause conflicts with Common Lisp code files.

Subset preprocessor language

The subset preprocessor language (SPP) implements a subset of the IRAF preprocessor language that was planned in the early days of IRAF. The SPP language is based on the Ratfor language. The lexical form, operators, and control flow constructs are identical to those provided by Ratfor. The major differences are the data types, the form of a procedure, the addition of inline strings and character constants, the use of square brackets for arrays, and the task statement. The i/o facilities provided are quite different.[16]

The xc program, provided with IRAF, translates SPP programs into Fortran 66, and from there with f2c into C code.

The preprocessor is complemented with mkpkg, a make like build automation tool, generic, a tool to translate generic types into type dependent source code, and xyacc, a modified yacc to produce SPP output.

Here is a simple Hello World program in SPP:

task    hello                   # CL callable task
procedure hello()               # common procedure
begin
        call printf ("hello, world\n")
end

SPP programs have usually the suffix .x, those which need to be preprocessed with the generic tool have .gx.

Supplementary software

A full IRAF working environment usually requires two other applications: an extended xterm window with a graphics windows (called xgterm and distributed in a separate x11iraf package) and an image display program referred to as an "image server". The two most popular image servers are SAOImageDS9 (by SAO) and ximtool (NOAO, also distributed in the x11iraf package).[17]

As an alternative of xgterm and the Command Language, the Python package PyRAF can be used. PyRAF is able to translate CL scripts into Python scripts. It also provides a graphics window (based on Tk or on Matplotlib). As command shell, either the Python or IPython command shell can be used, or a special mode resembling much of the look and feel of the CL command shell.[18]

See also

References

  1. "Data reduction / Software | NOIRLab Science". https://www.noirlab.edu/science/data-services/software. 
  2. "IRAF 2.17" (in en-US). https://iraf-community.github.io/. 
  3. Fitzpatrick, Mike (September 2012). "IRAF: Lessons for Project Longevity". ASP Conference Series 461: 595. https://articles.adsabs.harvard.edu/full/2012ASPC..461..595F. 
  4. Heck, Andre, ed (2000) (in en). Information handling in astronomy. Springer Science+Business Media. pp. 83–85. ISBN 978-94-010-5871-1. 
  5. Boroson, Todd (September 2005). "Data Products and Software at NOAO — Some Changes Coming". NOAO-NSO Newsletter (83): pp. 10–12. https://noirlab.edu/public/products/noao-newsletters/noaonewsletter083/. 
  6. Yamauchi, Chisato (August 2008). "Porting the IRAF to x86_64 OS". ASP Conference Series 394: 666–669. http://aspbooks.org/custom/publications/paper/394-0666.html. 
  7. Fitzpatrick, Mike; Smith, Chris (December 2007). "IRAF V2.14 and Ximtool Releases". NOAO-NSO Newsletter (92): pp. 21–22. https://noirlab.edu/public/products/noao-newsletters/noaonewsletter092/. 
  8. "IRAF Release Notes" (in en-US). https://iraf.readthedocs.io/en/latest/releases/index.html. 
  9. "IRAF V2.16 Release Notes" (in en-US). https://iraf.readthedocs.io/en/latest/releases/v216revs.html. 
  10. "License problems in IRAF" (in en-US). https://iraf-community.github.io/iraf-v216/license-problems.html. 
  11. "Debian -- Details of package iraf in bullseye". https://packages.debian.org/stable/iraf. 
  12. Tody, Doug (January 1986). "The IRAF Data Reduction and Analysis System". Proc. SPIE Instrumentation in Astronomy VI: 627–733. https://iraf-community.github.io/doc/iraf.pdf. 
  13. "External packages" (in en-US). https://iraf-community.github.io/external.html. 
  14. "IRAF documentation — IRAF 2.17 documentation". https://iraf.readthedocs.io/en/latest/. 
  15. "CL Programmer’s Manual — IRAF 2.17 documentation". https://iraf.readthedocs.io/en/latest/clman.html. 
  16. "SPP Reference Manual — IRAF 2.17 documentation". https://iraf.readthedocs.io/en/latest/spp.html. 
  17. "X11IRAF – Graphical tools to work with IRAF" (in en-US). https://iraf-community.github.io/x11iraf.html. 
  18. "The PyRAF Tutorial — PyRAF 2.2 documentation". https://pyraf.readthedocs.io/en/latest/. 

External links