PDL::IO::NDF man page on Peanut

Man page or keyword search:  
man Server   7435 pages
apropos Keyword Search (all sections)
Output format
Peanut logo
[printable version]

NDF(3)		      User Contributed Perl Documentation		NDF(3)

NAME
       PDL::IO::NDF - PDL Module for reading and writing Starlink
       N-dimensional data structures as PDLs.

SYNOPSIS
	use PDL::IO::NDF;

	$a = PDL->rndf($file);

	$a = rndf('test_image');
	$a = rndf('test_image', 1);

	$a->wndf($file);
	wndf($a, 'out_image');

	propndfx($a, 'template', 'out_image');

DESCRIPTION
       This module adds the ability to read and write Starlink N-dimensional
       data files as N-dimensional PDLs.

       You must have the Starlink NDF library installed to use it.  The
       library is distributed under the GPL and is available from
       "http://www.starlink.ac.uk".

FUNCTIONS
       rndf()

       Reads a piddle from a NDF format data file.

	$pdl = rndf('file.sdf');
	$pdl = rndf('file.sdf',1);

       The '.sdf' suffix is optional. The optional second argument turns off
       automatic quality masking and returns a quality array as well.

       BUG? "rndf('bob.sdf',1)" calls ndf_sqmf(1,...), which means that the
       quality array is turned into bad pixels - ie the opposite of above. Or
       am I confused?

       Header information and NDF Extensions are stored in the piddle as a
       hash which can be retreived with the "$pdl->gethdr" command.  Array
       extensions are stored in the header as follows:

	$a - the base DATA_ARRAY

       If "$hdr = $a->gethdr";

       then:

	%{$hdr}	       contains all the FITS headers plus:
	$$hdr{Error}   contains the Error/Variance PDL
	$$hdr{Quality} The quality byte array (if reqeusted)
	@{$$hdr{Axis}} Is an array of piddles containing the information
		       for axis 0, 1, etc.
	$$hdr{NDF_EXT} Contains all the NDF extensions
	$$hdr{Hist}    Contains the history information
	$$hdr{NDF_EXT}{_TYPES}
		       Data types for non-PDL NDF extensions so that
		       wndf can reconstruct a NDF.

       All extension information is stored in the header hash array.
       Extension structures are preserved in hashes, so that the PROJ_PARS
       component of the IRAS.ASTROMETRY extension is stored in
       $$hdr{NDF_EXT}{IRAS}{ASTROMETRY}{'PROJ_PARS'}. All array structures are
       stored as arrays in the Hdr: numeric arrays are stored as PDLs, logical
       and character arrays are stored as plain Perl arrays. FITS arrays are a
       special case and are expanded as scalars into the header.

       PDL does not have a signed byte datatype, so any '_BYTE' data is read
       into a "byte" (unsigned) piddle and a warning is printed to "STDOUT".

       wndf()

       Writes a piddle to a NDF format file:

	  $pdl->wndf($file);
	  wndf($pdl,$file);

       wndf can be used for writing PDLs to NDF files.	The '.sdf' suffix is
       optional. All the extensions created by rndf are supported by wndf.
       This means that error, axis and quality arrays will be written if they
       exist. Extensions are also reconstructed by using their name (ie
       FIGARO.TEST would be expanded as a FIGARO extension and a TEST
       component). Hdr keywords Label, Title and Units are treated as special
       cases and are written to the label, title and units fields of the NDF.

       Header information is written to corresponding NDF extensions.  NDF
       extensions can also be created in the {NDF} hash by using a key
       containing '.', ie {NDF}{'IRAS.DATA'} would write the information to an
       IRAS.DATA extension in the NDF. rndf stores this as
       $$hdr{NDF}{IRAS}{DATA} and the two systems are interchangeable.

       rndf stores type information in {NDF}{'_TYPES'} and below so that wndf
       can reconstruct the data type of non-PDL extensions. If no entry exists
       in _TYPES, wndf chooses between characters, integer and double on a
       best guess basis.  Any perl arrays are written as CHAR array extensions
       (on the assumption that numeric arrays will exist as PDLs).

       propndfx()

       Routine to write a PDL to an NDF by copying the extension information
       from an existing NDF and writing DATA,VARIANCE, QUALITY and AXIS info
       from a PDL (if they exist).

       Extensions, labels and history are propogated from the old NDF.	No new
       extension information is written.

       This command has been superseded by wndf().

NOTES
       The perl NDF module must be available. This is available from the
       author or from Starlink (http://www.starlink.rl.ac.uk).

       If an NDF is read which contains AST World Coordinate information (a
       .WCS component) this information is currently ignored. Currently WCS
       information can only be written and stored using standard FITS headers.
       See http://rlspc5.bnsc.rl.ac.uk/star/docs/sun211.htx/sun211.html#xref_
       for more information on AST.

AUTHOR
       This module was written by Tim Jenness <t.jenness@jach.hawaii.edu>.
       Copyright (C) Tim Jenness 1997-2000. All Rights Reserved.

SEE ALSO
       PDL::FAQ for general information on the Perl Data language, NDF for
       information on the NDF module.

perl v5.10.0			  2008-08-29				NDF(3)
[top]

List of man pages available for Peanut

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net