Astro::FITS::Header - A FITS header
$header = new Astro::FITS::Header( Cards => \@array );
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.
$Id: Header.pm,v 1.8 2001/03/28 00:26:31 allan Exp $
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.
Returns a FITS::Header:Item object referenced by index.
$item = $header->item($index);
Returns keyword referenced by index.
$keyword = $header->keyword($index);
Returns an array of Header::Items for the requested keyword
@items = $header->itembyname($keyword);
Returns an array of indices for the requested keyword
@index = $header->index($keyword);
Returns an array of values for the requested keyword
@value = $header->value($keyword);
Returns an array of comments for the requested keyword
@comment = $header->comment($keyword);
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 FITS header card at index $index with card $item
$card = $header->replace($index, $item);
returns the replaced card.
Removes a FITS header card object at position $index
$card = $header->remove($index);
returns the removed card.
Replace FITS header cards with keyword $keyword with card $item
$card = $header->replacebyname($keyword, $item);
Removes a FITS header card object by name
$card = $header->removebyname($keyword);
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.
Return the object contents as an array of FITS cards.
@array = $header->cards;
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 (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.
Alasdair Allan <aa@astro.ex.ac.uk>, Tim Jenness <t.jenness@jach.hawaii.edu>
To install Astro::FITS::Header, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Astro::FITS::Header
CPAN shell
perl -MCPAN -e shell install Astro::FITS::Header
For more information on module installation, please visit the detailed CPAN module installation guide.