SYNOPSIS

  use Astro::FITS::Header::NDF;

  $hdr = new Astro::FITS::Header::NDF( Cards => \@cards );
  $hdr = new Astro::FITS::Header::NDF( Items => \@items );
  $hdr = new Astro::FITS::Header::NDF( ndfID => $indf );
  $hdr = new Astro::FITS::Header::NDF( File => $file );

  $hdr->writehdr( $indf );
  $hdr->writehdr( File => $file );

DESCRIPTION

This module makes use of the Starlink \s-1NDF\s0 module to read and write to an \s-1NDF\s0 \s-1FITS\s0 extension or to a \*(C`.HEADER\*(C' block in an \s-1HDS\s0 container file. If the file is found to be an \s-1HDS\s0 container containing multiple NDFs at the top level, either the .HEADER \s-1NDF\s0 or the first \s-1NDF\s0 containing a \s-1FITS\s0 header is deemed to be the primary header, and all other headers a subsidiary headers indexed by the name of the \s-1NDF\s0 in the container.

It stores information about a \s-1FITS\s0 header block in an object. Takes an hash as an argument, with either an array reference pointing to an array of \s-1FITS\s0 header cards, array of \*(C`Astro::FITS::Header::Item\*(C' objects, or a filename, or (alternatively) an \s-1NDF\s0 identifier.

Currently, subheader support is readonly.

METHODS

configure

Reads a \s-1FITS\s0 header from an \s-1NDF\s0. $hdr->configure( Cards => \@cards ); $hdr->configure( ndfID => $indf ); $hdr->configure( File => $filename ); Accepts an \s-1NDF\s0 identifier or a filename. If both \*(C`ndfID\*(C' and \*(C`File\*(C' keys exist, \*(C`ndfID\*(C' key takes priority. If the file is actually an \s-1HDS\s0 container, an attempt will be made to read a \*(L".HEADER\*(R" \s-1NDF\s0 inside that container (this is the standard layout of \s-1UKIRT\s0 (and some \s-1JCMT\s0) data files). If an extension is specified explicitly (that is not \*(L".sdf\*(R") that path is treated as an explicit path to an \s-1NDF\s0. If an explicit path is specified no attempt is made to locate other NDFs in the \s-1HDS\s0 container. If the \s-1NDF\s0 can be opened successfully but there is no .MORE.FITS extension, an empty header is returned rather than throwing an error.

writehdr

Write a \s-1FITS\s0 header to an \s-1NDF\s0. $hdr->writehdr( ndfID => $indf ); $hdr->writehdr( File => $file ); Accepts an \s-1NDF\s0 identifier or a filename. If both \*(C`ndfID\*(C' and \*(C`File\*(C' keys exist, \*(C`ndfID\*(C' key takes priority. Throws an exception (croaks) on error.

NOTES

This module requires the Starlink \s-1NDF\s0 module.

RELATED TO Astro::FITS::Header::NDF…

\s-1NDF\s0, Astro::FITS::Header, Astro::FITS::Header::Item Astro::FITS::Header::CFITSIO

AUTHORS

Tim Jenness <[email protected]>, Alasdair Allan <[email protected]>, Brad Cavanagh <[email protected]>

COPYRIGHT

Copyright (C) 2008-2009 Science & Technology Facilities Council. Copyright (C) 2001-2005 Particle Physics and Astronomy Research Council. All Rights Reserved.

This program is free software; you can redistribute it and/or modify it under the terms of the \s-1GNU\s0 General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,but \s-1WITHOUT\s0 \s-1ANY\s0 \s-1WARRANTY\s0; without even the implied warranty of \s-1MERCHANTABILITY\s0 or \s-1FITNESS\s0 \s-1FOR\s0 A \s-1PARTICULAR\s0 \s-1PURPOSE\s0. See the \s-1GNU\s0 General Public License for more details.

You should have received a copy of the \s-1GNU\s0 General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place,Suite 330, Boston, \s-1MA\s0 02111-1307, \s-1USA\s0