CFITSIO User's Reference Guide

Total Page:16

File Type:pdf, Size:1020Kb

CFITSIO User's Reference Guide CFITSIO User’s Reference Guide An Interface to FITS Format Files for C Programmers Version 3.3 HEASARC Code 662 Goddard Space Flight Center Greenbelt, MD 20771 USA February 2013 ii Contents 1 Introduction 1 1.1 ABriefOverview .................................. ... 1 1.2 Sources of FITS Software and Information . ........... 1 1.3 Acknowledgments................................. ..... 2 1.4 LegalStuff ....................................... 4 2 Creating the CFITSIO Library 5 2.1 BuildingtheLibrary .............................. ...... 5 2.1.1 UnixSystems................................... 5 2.1.2 VMS......................................... 7 2.1.3 WindowsPCs.................................... 7 2.1.4 MacintoshPCs .................................. 7 2.2 TestingtheLibrary............................... ...... 8 2.3 LinkingProgramswithCFITSIO . ....... 9 2.4 Using CFITSIO in Multi-threaded Environments . ............ 9 2.5 GettingStartedwithCFITSIO . ....... 10 2.6 ExampleProgram .................................. 10 3 A FITS Primer 13 4 Programming Guidelines 15 4.1 CFITSIODefinitions............................... ..... 15 4.2 Current Header Data Unit (CHDU) . ...... 17 4.3 Function Names and Variable Datatypes . .......... 18 4.4 Support for Unsigned Integers and Signed Bytes . ............ 20 4.5 Dealing with Character Strings . ......... 22 iii iv CONTENTS 4.6 ImplicitDataTypeConversion . ........ 23 4.7 DataScaling ..................................... 23 4.8 SupportforIEEESpecialValues . ........ 24 4.9 Error Status Values and the Error Message Stack . ............ 24 4.10 Variable-Length Arrays in Binary Tables . ............. 25 4.11 Multiple Access to the Same FITS File . .......... 26 4.12 When the Final Size of the FITS HDU is Unknown . ......... 27 4.13 CFITSIOSizeLimitations . ........ 27 5 Basic CFITSIO Interface Routines 29 5.1 CFITSIOErrorStatusRoutines . ....... 29 5.2 FITSFileAccessRoutines. ....... 30 5.3 HDUAccessRoutines ............................... 33 5.4 Header Keyword Read/Write Routines . ......... 35 5.4.1 KeywordReadingRoutines . 35 5.4.2 KeywordWritingRoutines . 38 5.5 Primary Array or IMAGE Extension I/O Routines . .......... 40 5.6 ImageCompression................................ ..... 44 5.7 ASCIIandBinaryTableRoutines . ....... 48 5.7.1 CreateNewTable ................................ 49 5.7.2 ColumnInformationRoutines. ...... 49 5.7.3 RoutinestoEditRowsorColumns . ..... 52 5.7.4 Read and Write Column Data Routines . ..... 54 5.7.5 Row Selection and Calculator Routines . ........ 56 5.7.6 Column Binning or Histogramming Routines . ........ 57 5.8 UtilityRoutines................................. ...... 60 5.8.1 FileChecksumRoutines . 60 5.8.2 Date and Time Utility Routines . ..... 61 5.8.3 General Utility Routines . ...... 62 6 The CFITSIO Iterator Function 73 6.1 TheIteratorWorkFunction . ....... 74 6.2 TheIteratorDriverFunction . ........ 76 6.3 Guidelines for Using the Iterator Function . ............. 77 CONTENTS v 6.4 Complete List of Iterator Routines . .......... 78 7 World Coordinate System Routines 81 7.1 Self-contained WCS Routines . ........ 82 8 Hierarchical Grouping Routines 85 8.1 GroupingTableRoutines . ...... 86 8.2 GroupMemberRoutines. .. .. .. .. .. .. .. .. ..... 88 9 Specialized CFITSIO Interface Routines 91 9.1 FITSFileAccessRoutines. ....... 91 9.2 HDUAccessRoutines ............................... 95 9.3 Specialized Header Keyword Routines . .......... 97 9.3.1 Header Information Routines . ...... 97 9.3.2 Read and Write the Required Keywords . ...... 97 9.3.3 WriteKeywordRoutines. 99 9.3.4 InsertKeywordRoutines . 101 9.3.5 ReadKeywordRoutines . 102 9.3.6 ModifyKeywordRoutines. 104 9.3.7 UpdateKeywordRoutines. 105 9.4 Define Data Scaling and Undefined Pixel Parameters . ............106 9.5 Specialized FITS Primary Array or IMAGE Extension I/O Routines . 107 9.6 Specialized FITS ASCII and Binary Table Routines . ............110 9.6.1 GeneralColumnRoutines . 110 9.6.2 Low-Level Table Access Routines . .......112 9.6.3 WriteColumnDataRoutines . 112 9.6.4 ReadColumnDataRoutines . 113 10 Extended File Name Syntax 117 10.1Overview ....................................... 117 10.2Filetype ....................................... 120 10.2.1 NotesaboutHTTPproxyservers. 120 10.2.2 Notes about the stream filetype driver . .........121 10.2.3 Notes about the gsiftp filetype . .......122 vi CONTENTS 10.2.4 Notesabouttherootfiletype . 122 10.2.5 Notes about the shmem filetype: . 124 10.3BaseFilename ................................... 124 10.4 Output File Name when Opening an Existing File . ...........126 10.5 Template File Name when Creating a New File . ..........128 10.6 Image Tile-Compression Specification . ............128 10.7 HDU Location Specification . ........128 10.8ImageSection................................... 130 10.9 ImageTransformFilters . ........131 10.10Column and Keyword Filtering Specification . .............132 10.11Row Filtering Specification . ..........135 10.11.1GeneralSyntax. .. .. .. .. .. .. .. .. 135 10.11.2BitMasks.................................... 138 10.11.3VectorColumns ............................... 139 10.11.4 Good Time Interval Filtering . ........140 10.11.5 Spatial Region Filtering . ........141 10.11.6ExampleRowFilters. 143 10.12 Binning or Histogramming Specification . .............144 11 Template Files 149 11.1 Detailed Template Line Format . .........149 11.2 Auto-indexingofKeywords . ........150 11.3 Template Parser Directives . .........151 11.4 FormalTemplateSyntax. .......151 11.5Errors ......................................... 152 11.6Examples ....................................... 152 12 Local FITS Conventions 155 12.1 64-BitLongIntegers .. .. .. .. .. .. .. .. .......155 12.2 LongStringKeywordValues. ........155 12.3 Arrays of Fixed-Length Strings in Binary Tables . ..............157 12.4 KeywordUnitsStrings. .......157 12.5 HIERARCH Convention for Extended Keyword Names . ..........158 12.6 Tile-CompressedImageFormat . .........158 CONTENTS vii 13 Optimizing Programs 161 13.1 HowCFITSIOManagesDataI/O . 161 13.2 Optimization Strategies . .........162 A Index of Routines 167 B Parameter Definitions 173 C CFITSIO Error Status Codes 179 viii CONTENTS Chapter 1 Introduction 1.1 A Brief Overview CFITSIO is a machine-independent library of routines for reading and writing data files in the FITS (Flexible Image Transport System) data format. It can also read IRAF format image files and raw binary data arrays by converting them on the fly into a virtual FITS format file. This library is written in ANSI C and provides a powerful yet simple interface for accessing FITS files which will run on most commonly used computers and workstations. CFITSIO supports all the features described in the official definition of the FITS format and can read and write all the currently defined types of extensions, including ASCII tables (TABLE), Binary tables (BINTABLE) and IMAGE extensions. The CFITSIO routines insulate the programmer from having to deal with the complicated formatting details in the FITS file, however, it is assumed that users have a general knowledge about the structure and usage of FITS files. CFITSIO also contains a set of Fortran callable wrapper routines which allow Fortran programs to call the CFITSIO routines. See the companion “FITSIO User’s Guide” for the definition of the Fortran subroutine calling sequences. These wrappers replace the older Fortran FITSIO library which is no longer supported. The CFITSIO package was initially developed by the HEASARC (High Energy Astrophysics Science Archive Research Center) at the NASA Goddard Space Flight Center to convert various existing and newly acquired astronomical data sets into FITS format and to further analyze data already in FITS format. New features continue to be added to CFITSIO in large part due to contributions of ideas or actual code from users of the package. The Integral Science Data Center in Switzerland, and the XMM/ESTEC project in The Netherlands made especially significant contributions that resulted in many of the new features that appeared in v2.0 of CFITSIO. 1.2 Sources of FITS Software and Information The latest version of the CFITSIO source code, documentation, and example programs are available on the Web or via anonymous ftp from: 1 2 CHAPTER 1. INTRODUCTION http://heasarc.gsfc.nasa.gov/fitsio ftp://legacy.gsfc.nasa.gov/software/fitsio/c Any questions, bug reports, or suggested enhancements related to the CFITSIO package should be sent to the primary author: Dr. William Pence Telephone: (301) 286-4599 HEASARC, Code 662 E-mail: [email protected] NASA/Goddard Space Flight Center Greenbelt, MD 20771, USA This User’s Guide assumes that readers already have a general understanding of the definition and structure of FITS format files. Further information about FITS formats is available from the FITS Support Office at http://fits.gsfc.nasa.gov. In particular, the ’FITS Standard’ gives the authoritative definition of the FITS data format. Other documents available at that Web site provide additional historical background and practical advice on using FITS files. The HEASARC also provides a very sophisticated FITS file analysis program called ‘Fv’ which can be used to display and edit the contents of any FITS file as well as construct new FITS files from scratch. Fv is freely available for most Unix platforms, Mac PCs, and Windows PCs. CFITSIO users may also be interested in the FTOOLS package of programs that can be used to manipulate and analyze FITS format files. Fv and FTOOLS are available from
Recommended publications
  • The Starlink Build System SSN/78.1 —Abstract I
    SSN/78.1 Starlink Project Starlink System Note 78.1 Norman Gray, Peter W Draper, Mark B Taylor, Steven E Rankin 11 April 2005 Copyright 2004-5, Council for the Central Laboratory of the Research Councils Copyright 2007, Particle Physics and Astronomy Research Council Copyright 2007, Science and Technology Facilities Council The Starlink Build System SSN/78.1 —Abstract i Abstract This document provides an introduction to the Starlink build system. It describes how to use the Starlink versions of the GNU autotools (autoconf, automake and libtool), how to build the software set from a checkout, how to add and configure new components, and acts as a reference manual for the Starlink-specific autoconf macros and Starlink automake features. It does not describe the management of the CVS repository in detail, nor any other source maintainance patterns. It should be read in conjunction with the detailed build instructions in the README file at the top of the source tree (which takes precedence over any instructions in this document, though there should be no major disagreements), and with sun248, which additionally includes platform-specific notes. Copyright 2004-5, Council for the Central Laboratory of the Research Councils Copyright 2007, Particle Physics and Astronomy Research Council Copyright 2007, Science and Technology Facilities Council ii SSN/78.1—Contents Contents 1 Introduction 1 1.1 Quick entry-points . 2 2 Tools 3 2.1 Overview of the Autotools . 3 2.1.1 Autoconf . 5 2.1.2 Automake . 9 2.1.3 Libtool . 13 2.1.4 Autoreconf: why you don’t need to know about aclocal .
    [Show full text]
  • A Cpu-Gpu Framework for Astronomical Data Reduction and Analysis
    UNIVERSIDAD DE CHILE FACULTAD DE CIENCIAS F´ISICAS Y MATEMATICAS´ DEPARTAMENTO DE CIENCIAS DE LA COMPUTACION´ FADRA: A CPU-GPU FRAMEWORK FOR ASTRONOMICAL DATA REDUCTION AND ANALYSIS TESIS PARA OPTAR AL GRADO DE MAG´ISTER EN CIENCIAS, MENCION´ COMPUTACION´ FRANCISCA ANDREA CONCHA RAM´IREZ PROFESOR GU´IA: MAR´IA CECILIA RIVARA ZU´NIGA~ PROFESOR CO-GU´IA: PATRICIO ROJO RUBKE MIEMBROS DE LA COMISION:´ ALEXANDRE BERGEL JOHAN FABRY GONZALO ACUNA~ LEIVA Este trabajo ha sido parcialmente financiado por Proyecto FONDECYT 1120299 SANTIAGO DE CHILE 2016 Resumen Esta tesis establece las bases de FADRA: Framework for Astronomical Data Reduction and Analysis. El framework FADRA fue dise~nadopara ser eficiente, simple de usar, modular, expandible, y open source. Hoy en d´ıa,la astronom´ıaes inseparable de la computaci´on,pero algunos de los software m´asusados en la actualidad fueron desarrollados tres d´ecadasatr´asy no est´andise~nadospara enfrentar los actuales paradigmas de big data. El mundo del software astron´omicodebe evolucionar no solo hacia pr´acticasque comprendan y adopten la era del big data, sino tambi´enque est´enenfocadas en el trabajo colaborativo de la comunidad. El trabajo desarollado consisti´oen el dise~no e implementaci´onde los algoritmos b´asicos para el an´alisisde datos astron´omicos, dando inicio al desarrollo del framework. Esto con- sider´ola implementaci´onde estructuras de datos eficientes al trabajar con un gran n´umero de im´agenes,la implementaci´onde algoritmos para el proceso de calibraci´ono reducci´onde im´agenesastron´omicas,y el dise~noy desarrollo de algoritmos para el c´alculode fotometr´ıay la obtenci´onde curvas de luz.
    [Show full text]
  • ORAC-DR: Overview and General Introduction 4.1-0 SUN/230.6 —Abstract Ii
    SUN/230.6 Starlink Project Starlink User Note 230.6 Frossie Economou, Tim Jenness, Malcolm Currie, Andy Adamson, Alasdair Allan, Brad Cavanagh Joint Astronomy Centre, Hilo, Hawaii June 2004 Copyright c 1997-2004 Particle Physics and Astronomy Research Council ORAC-DR: Overview and General Introduction 4.1-0 SUN/230.6 —Abstract ii Abstract ORAC-DR is a general purpose automatic data reduction pipeline environment. It currently supports data reduction for the United Kingdom Infrared Telescope (UKIRT) instruments UFTI, IRCAM, UIST and CGS4, for the James Clerk Maxwell Telescope (JCMT) instrument SCUBA, for the William Herschel Telescope (WHT) instrument INGRID, for the European Southern Observatory (ESO) instrument ISAAC and for the Anglo-Australian Telescope (AAT) instrument IRIS-2. This document describes the general pipeline environment. For specific information on how to reduce the data for a particular instrument, please consult the appropriate ORAC-DR instrument guide. Copyright c 1997-2004 Particle Physics and Astronomy Research Council iii SUN/230.6—Contents Contents 1 Introduction to ORAC-DR 1 2 ORAC-DR 2 3 Setting up to run oracdr 4 4 ORAC-DR Components 5 5 Xoracdr 6 6 oracdr 12 7 oracdr_monitor 18 8 ORAC-DR 20 9 Release Notes 21 A The ORAC-DR Data Loops 22 B The ORAC-DR Display System 23 C The ORAC-DR Calibration Selection 28 D Shell Variables 30 E oracdisp 32 F oracdr_nuke 33 1 SUN/230.6 —Introduction to ORAC-DR 1 Introduction to ORAC-DR An ORAC-DR HowTo. Description This document gives a general introduction to the pipeline, what it does and what it will not do.
    [Show full text]
  • ORAC-DR: a Generic Data Reduction Pipeline Infrastructure✩
    Astronomy and Computing 9 (2015) 40–48 Contents lists available at ScienceDirect Astronomy and Computing journal homepage: www.elsevier.com/locate/ascom Full length article ORAC-DR: A generic data reduction pipeline infrastructureI Tim Jenness ∗, Frossie Economou 1 Joint Astronomy Centre, 660 N. A`ohok¯ u¯ Place, Hilo, HI 96720, USA article info a b s t r a c t Article history: ORAC-DR is a general purpose data reduction pipeline system designed to be instrument and observatory Received 5 September 2014 agnostic. The pipeline works with instruments as varied as infrared integral field units, imaging arrays Accepted 27 October 2014 and spectrographs, and sub-millimeter heterodyne arrays and continuum cameras. This paper describes Available online 1 November 2014 the architecture of the pipeline system and the implementation of the core infrastructure. We finish by discussing the lessons learned since the initial deployment of the pipeline system in the late 1990s. Keywords: ' 2014 The Authors. Published by Elsevier B.V. Data reduction pipelines This is an open access article under the CC BY license Techniques: miscellaneous Methods: data analysis (http://creativecommons.org/licenses/by/3.0/). 1. Introduction The Observatory Reduction and Acquisition Control Data Re- duction pipeline (orac-dr; Cavanagh et al., 2008; Economou et al., In the early 1990s each instrument delivered to the United King- 1999; ascl:1310.001) was the resulting system. In the sections that dom Infrared Telescope (UKIRT) and the James Clerk Maxwell Tele- follow we present an overview of the architectural design and scope (JCMT) came with its own distinct data reduction system that then describe the pipeline implementation.
    [Show full text]
  • The Significant Properties of Software: a Study
    The Significant Properties of Software: A Study Brian Matthews, Brian McIlwrath, David Giaretta, Esther Conway STFC Rutherford Appleton Laboratory Chilton OX11 0QX UK December 2008 Significant Properties of Software Revision History: Version Date Authors Sections Affected / Comments 0.1 18/02/2008 BMM Outline 0.5 05/03/2008 BMM First Draft 0.6 09/03/2008 DG DG added section on OAIS/CASPAR 0.7 11/03/2008 BMM Added section on StarLink + revisions. 0.8 23/03/2008 BMcI, EC, BMM Expanded use cases 1.0 28/03/2008 BMM, BMcI First Complete release version 1.1 23/12/2008 BMM Final Revision 2 Significant Properties of Software Executive Summary ...................................................................................................... 5 Recommendations ..................................................................................................................... 6 1 Background to the Study ....................................................................................... 9 1.1 Introduction ................................................................................................................... 9 1.2 Significant Properties .................................................................................................. 10 2 Scope of Study .................................................................................................... 12 2.1 Definition of Software ................................................................................................ 12 2.2 Diversity of Software .................................................................................................
    [Show full text]
  • Book of Abstracts 2009 European Week of Astronomy and Space
    rs uvvwxyuzyws { yz|z|} rsz}~suzywsu}u~w vz~wsw 456789@A C 99D 7EFGH67A7I P @AQ R8@S9 RST9AS9 UVWUX `abcdUVVe fATg96GTHP7Eh96HE76QGiT69pf q rAS76876@HTAs tFR u Fv wxxy @AQ 4FR 4u Fv wxxy UVVe abbc d dbdc e f gc hi` ij ad bch dgcadabdddc c d ac k lgbc bcgb dmg agd g` kg bdcd dW dd k bg c ngddbaadgc gabmob nb boglWad g kdcoddog kedgcW pd gc bcogbpd kb obpcggc dd kfq` UVVe c iba ! " #$%& $' ())01023 Book of Abstracts – Table of Contents Welcome to the European Week of Astronomy & Space Science ...................................................... iii How space, and a few stars, came to Hatfield ............................................................................... v Plenary I: UK Solar Physics (UKSP) and Magnetosphere, Ionosphere and Solar Terrestrial (MIST) ....... 1 Plenary II: European Organisation for Astronomical Research in the Southern Hemisphere (ESO) ....... 2 Plenary III: European Space Agency (ESA) .................................................................................. 3 Plenary IV: Square Kilometre Array (SKA), High-Energy Astrophysics, Asteroseismology ................... 4 Symposia (1) The next era in radio astronomy: the pathway to SKA .............................................................. 5 (2) The standard cosmological models - successes and challenges .................................................. 17 (3) Understanding substellar populations and atmospheres: from brown dwarfs to exo-planets .......... 28 (4) The life cycle of dust ...........................................................................................................
    [Show full text]
  • SLALIB — Positional Astronomy Library Programmer's Manual
    CCLRC / Rutherford Appleton Laboratory SUN/67.63 Particle Physics & Astronomy Research Council Starlink Project Starlink User Note 67.63 P. T. Wallace 21 October 2003 SLALIB — Positional Astronomy Library 2.4-13 Programmer’s Manual Abstract SLALIB is a library used by writers of positional-astronomy applications. Most of the 187 routines are concerned with astronomical position and time, but a number have wider trigono- metrical, numerical or general applications. ii Contents 1 INTRODUCTION 1 1.1 Purpose . 1 1.2 Example Application . 1 1.3 Scope . 2 1.4 Objectives . 3 1.5 Fortran Version . 4 1.6 CVersion ........................................ 4 1.7 Future Versions . 4 1.8 New Functions . 5 1.9 Acknowledgements . 5 2 LINKING 5 3 SUBPROGRAM SPECIFICATIONS 6 4 EXPLANATION AND EXAMPLES 169 4.1 Spherical Trigonometry . 169 4.2 Vectors and Matrices . 172 4.3 Celestial Coordinate Systems . 174 4.4 Precession and Nutation . 177 4.5 Mean Places . 179 4.6 Epoch . 179 4.7 Proper Motion . 180 4.8 Parallax and Radial Velocity . 180 4.9 Aberration . 181 4.10 Different Sorts of Mean Place . 182 4.11 Mean Place Transformations . 183 4.12 Mean Place to Apparent Place . 185 4.13 Apparent Place to Observed Place . 186 4.14 The Hipparcos Catalogue and the ICRS . 189 4.15 Timescales . 189 4.16 Calendars . 193 4.17 Geocentric Coordinates . 193 4.18 Ephemerides . 194 4.19 Radial Velocity and Light-Time Corrections . 203 4.20 Focal-Plane Astrometry . 204 4.21 Numerical Methods . 205 5 SUMMARY OF CALLS 208 SUN/67.63 1 1 INTRODUCTION 1.1 Purpose SLALIB1 is a library of routines intended to make accurate and reliable positional-astronomy applications easier to write.
    [Show full text]
  • Arxiv:1410.7513V1 [Astro-Ph.IM] 28 Oct 2014
    Learning from 25 years of the extensible N-Dimensional Data Format Tim Jennessa,∗, David S. Berryb, Malcolm J. Currieb, Peter W. Draperc, Frossie Economoud, Norman Graye, Brian McIlwrathf, Keith Shortridgeg, Mark B. Taylorh, Patrick T. Wallacef, Rodney F. Warren-Smithf aDepartment of Astronomy, Cornell University, Ithaca, NY 14853, USA bJoint Astronomy Centre, 660 N. A‘oh¯ok¯uPlace, Hilo, HI 96720, USA cDepartment of Physics, Institute for Computational Cosmology, University of Durham, South Road, Durham DH1 3LE, UK dLSST Project Office, 933 N. Cherry Ave, Tucson, AZ 85721, USA eSUPA School of Physics & Astronomy, University of Glasgow, Glasgow G12 8QQ, UK fRAL Space, STFC Rutherford Appleton Laboratory, Harwell Oxford, Didcot, Oxfordshire OX11 0QX, UK gAustralian Astronomical Observatory, 105 Delhi Rd, North Ryde, NSW 2113, Australia hH. H. Wills Physics Laboratory, Bristol University, Tyndall Avenue, Bristol, UK Abstract The extensible N-Dimensional Data Format (NDF) was designed and developed in the late 1980s to provide a data model suitable for use in a variety of astronomy data processing applications supported by the UK Starlink Project. Starlink applications were used extensively, primarily in the UK astronomical community, and form the basis of a number of advanced data reduction pipelines today. This paper provides an overview of the historical drivers for the development of NDF and the lessons learned from using a defined hierarchical data model for many years in data reduction software, data pipelines and in data acquisition systems. Keywords: data formats, data models, Starlink, History of computing 1. Introduction In this paper the term “data model” refers to the organization, naming and semantics of components in a hierarchy.
    [Show full text]
  • Starlinksoftware Collection
    SUN/1.24 Starlink Project Starlink User Note 1.24 ed. S. E. Rankin 5 August 2003 STARLINK Software Collection SUN/1.24 —Abstract ii Abstract The Starlink Software Collection is a set of software which is managed and distributed by the Starlink Project. Some of the software was written by members of the Project, but some of it comes from outside the Project. This note describes the functions of the individual items in the Collection and provides an overview of the software so that readers can identify the items they need. The software is classified into four main divisions: • Packages – are large collections of programs for people who want to analyse, convert, and display data. They are subdivided into eleven classes to help you find what you want. • Utilities – are small programs devoted to a specific purpose. For example, they help you prepare for observations, write documents, and write programs. • Subroutine Libraries – are for programmers writing astronomical software. They provide facilities such as astronomical calculations, data management and graphics. • Infrastructure – are items which are mainly of interest to people writing programs within the Starlink Software Environment. They are included for completeness. Each item is described in sufficient detail for you to decide whether or not to investigate it further. If you want to find out more about an item, follow the document references given opposite the item name. If you are using the hypertext version of this document, the most up-to-date document references can be found by following the link from the software item name. iii SUN/1.24—Contents Contents 1 Introduction 1 2 Changes since the last issue 2 2.1 New packages .
    [Show full text]
  • FITSIO User's Guide
    FITSIO User’s Guide A Subroutine Interface to FITS Format Files for Fortran Programmers Version 3.0 HEASARC Code 662 Goddard Space Flight Center Greenbelt, MD 20771 USA April 2009 ii Contents 1 Introduction 1 2 Creating FITSIO/CFITSIO 3 2.1 BuildingtheLibrary .............................. ...... 3 2.2 TestingtheLibrary............................... ...... 6 2.3 LinkingProgramswithFITSIO . ....... 7 2.4 GettingStartedwithFITSIO . ....... 8 2.5 ExampleProgram .................................. ... 8 2.6 LegalStuff ....................................... 9 2.7 Acknowledgments................................. ..... 10 3 A FITS Primer 13 4 FITSIO Conventions and Guidelines 15 4.1 CFITSIOSizeLimitations. ....... 15 4.2 Multiple Access to the Same FITS File . ......... 16 4.3 Current Header Data Unit (CHDU) . ...... 16 4.4 SubroutineNames ................................. 16 4.5 Subroutine Families and Datatypes . .......... 17 4.6 ImplicitDataTypeConversion . ........ 17 4.7 DataScaling ..................................... 18 4.8 Error Status Values and the Error Message Stack . ............ 18 4.9 Variable-Length Array Facility in Binary Tables . ............... 19 4.10 SupportforIEEESpecialValues . ......... 20 4.11 When the Final Size of the FITS HDU is Unknown . ......... 21 4.12 Local FITS Conventions supported by FITSIO . ........... 21 iii iv CONTENTS 4.12.1 Support for Long String Keyword Values. ......... 21 4.12.2 Arrays of Fixed-Length Strings in Binary Tables . ............ 22 4.12.3 KeywordUnitsStrings. ..... 23 4.12.4 HIERARCH Convention for Extended Keyword Names . ........ 23 4.13 Optimizing Code for Maximum Processing Speed . ............ 24 4.13.1 Background Information: How CFITSIO Manages Data I/O ......... 25 5 Basic Interface Routines 29 5.1 FITSIOErrorStatusRoutines . ....... 29 5.2 FileI/ORoutines................................. ..... 30 5.3 KeywordI/ORoutines.............................. ..... 32 5.4 DataI/ORoutines ................................. 33 6 Advanced Interface Subroutines 35 6.1 FITSFileOpenandCloseSubroutines: .
    [Show full text]
  • Learning from 25 Years of the Extensible N-Dimensional Data Format
    Elsevier Editorial System(tm) for Astronomy and Computing Manuscript Draft Manuscript Number: ASCOM-D-14-00017 Title: Learning from 25 years of the extensible N-Dimensional Data Format Article Type: Full Length Article Section/Category: Data management, archives, and virtual observatory Keywords: data formats Starlink Corresponding Author: Dr. Tim Jenness, Corresponding Author's Institution: Cornell University First Author: Tim Jenness Order of Authors: Tim Jenness; David S Berry; Malcolm J Currie; Peter W Draper; Frossie Economou; Norman Gray; Brian McIlwrath; Keith Shortridge; Mark B Taylor; Patrick T Wallace; Rodney F Warren-Smith Abstract: The extensible N-Dimensional Data Format (NDF) was designed and developed in the late 1980s to provide a data model suitable for use in a variety of astronomy data processing applications supported by the UK Starlink Project. Starlink applications were used extensively, primarily in the UK astronomical community, and form the basis of a number of advanced data reduction pipelines today. This paper provides an overview of the historical drivers for the development of NDF and the lessons learned from using a defined hierarchical data model for many years in data reduction software, data pipelines and in data acquisition systems. Manuscript Click here to view linked References Learning from 25 years of the extensible N-Dimensional Data Format Tim Jennessa,∗, David S. Berryb, Malcolm J. Currieb, Peter W. Draperc, Frossie Economoud, Norman Graye, Brian McIlwrathf, Keith Shortridgeg, Mark B. Taylorh,
    [Show full text]
  • Paper Writing
    Data Management at the UKIRT and JCMT Tim Jennessa and Frossie Economoua aJoint Astronomy Centre, 660 N. A‘ohok¯ u¯ Place, Hilo, HI, 96720, U.S.A. ABSTRACT For more than a decade the Joint Astronomy Centre has been developing software tools to simplify observing and make it possible to use the telescopes in many different operational modes. In order to support remote operations the data handling systems need to be in place to allow observation preparation, flexible queue scheduling, data quality pipelines and science archives all to be connected in a data-driven environment. We discuss the history of these developments at UKIRT and JCMT and how the decision to combine software development at both telescopes led each to get features that they could not have justified if they were treated independently. Keywords: JCMT, UKIRT, eSTAR, Data Handling, Pipelines 1. INTRODUCTION The Joint Astronomy Centre runs two distinctly different telescopes. The James Clerk Maxwell Telescope (JCMT) is the world’s largest sub-millimetre telescope with a 15-m primary mirror. The United Kingdom Infrared Telescope (UKIRT) is a 3.8-m infrared telescope. Both are sited on Mauna Kea in Hawaii and both telescopes have been operating for many years (UKIRT since 1979 and JCMT since 1987) and developed many legacy systems. In the late 1990s the software groups were merged and code re-use and shared support became an important driver for the future. 2. DATA PIPELINES In the mid-1990s data reduction software was written directly for the instrument with no intent to re-use when the instru- ment was retired.
    [Show full text]