The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Astro::FITS::Header - A FITS header

SYNOPSIS

  $header = new Astro::FITS::Header( Cards => \@array );

DESCRIPTION

Stores information about a FITS header block in an object. Takes an hash with an array reference as an arguement. The array should contain a list of FITS header cards as input.

REVISION

$Id: Header.pm,v 1.8 2001/03/28 00:26:31 allan Exp $

METHODS

Constructor

new

Create a new instance from an array of FITS header cards.

  $item = new Astro::FITS::Header( Cards => \@header );

returns a reference to a Header object.

Accessor Methods

item

Returns a FITS::Header:Item object referenced by index.

   $item = $header->item($index);
keyword

Returns keyword referenced by index.

   $keyword = $header->keyword($index);
itembyname

Returns an array of Header::Items for the requested keyword

   @items = $header->itembyname($keyword);
index

Returns an array of indices for the requested keyword

   @index = $header->index($keyword);
value

Returns an array of values for the requested keyword

   @value = $header->value($keyword);
comment

Returns an array of comments for the requested keyword

   @comment = $header->comment($keyword);
insert

Inserts a FITS header card object at position $index

   $header->insert($index, $item);

the object $item is not copied, multiple inserts of the same object mean that future modifications to the one instance of the inserted object will modify all inserted copies.

replace

Replace FITS header card at index $index with card $item

   $card = $header->replace($index, $item);

returns the replaced card.

remove

Removes a FITS header card object at position $index

   $card = $header->remove($index);

returns the removed card.

replacebyname

Replace FITS header cards with keyword $keyword with card $item

   $card = $header->replacebyname($keyword, $item);  

returns the replaced card.

removebyname

Removes a FITS header card object by name

  $card = $header->removebyname($keyword);

returns the removed card.

splice

Implements a standard splice operation for FITS headers

   @cards = $header->splice($offset [,$length [, @list]]);
   $last_card = $header->splice($offset [,$length [, @list]]);

Removes the FITS header cards from the header designated by $offset and $length, and replaces them with @list (if specified) which must be an array of FITS::Header::Item objects. Returns the cards removed. If offset is negative, counts from the end of the FITS header.

cards

Return the object contents as an array of FITS cards.

  @array = $header->cards;

General Methods

configure

Configures the object, takes an array of FITS header cards as input.

  $header->configure( Cards => \@array );

Does nothing if the array is not supplied.

COPYRIGHT

Copyright (C) 2001 Particle Physics and Astronomy Research Council. All Rights Reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

AUTHORS

Alasdair Allan <aa@astro.ex.ac.uk>, Tim Jenness <t.jenness@jach.hawaii.edu>