.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "LUT 3pm" .TH LUT 3pm 2024-04-25 "perl v5.38.2" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME PDL::Graphics::LUT \- provides access to a number of look\-up tables .SH SYNOPSIS .IX Header "SYNOPSIS" .Vb 2 \& use PDL::Graphics::PGPLOT; \& use PDL::Graphics::LUT; \& \& # what tables are available \& my @tables = lut_names(); \& \& # get the reversed colour table \*(Aqsmooth\*(Aq, \& # with the gamma intensity ramp \& my ( $l, $r, $g, $b ) = lut_data( \*(Aqsmooth\*(Aq, 1, \*(Aqgamma\*(Aq ); \& \& # use the table idl5 in ctab \& ctab( lut_data(\*(Aqidl5\*(Aq) ); .Ve .SH DESCRIPTION .IX Header "DESCRIPTION" PDL::Graphics::LUT contains a number of colour look-up tables (in rgb format) and intensity ramps, and provides routines to access this data. The format of the data is suitable for use by ctab. .PP Unlike the initial release of the package, the data tables are now stored within the PDL distribution as FITS files (see "$tabledir" and "$rampdir"), rather than in the module itself. Changes to these directories will be picked up on the next call to one of the package functions. .SH FUNCTIONS .IX Header "FUNCTIONS" .SS \fBlut_names()\fP .IX Subsection "lut_names()" Return, as a list, the names of the available colour tables. .PP .Vb 1 \& @tables = lut_names(); .Ve .SS \fBlut_ramps()\fP .IX Subsection "lut_ramps()" Return, as a list, the names of the available intensity ramps. .PP .Vb 1 \& @ramps = lut_ramps(); .Ve .SS \fBlut_data()\fP .IX Subsection "lut_data()" Load in the requested colour table and intensity ramp. .PP .Vb 1 \& my ( $l, $r, $g, $b ) = lut_data( $table, [ $reverse, [ $ramp ] ] ); .Ve .PP Returns the levels and r, g, b components of the colour table \&\f(CW$table\fR. If \f(CW$reverse\fR is 1 (defaults to \fB0\fR if not supplied), then the r, g, and b components are reversed before being returned. If not supplied, \f(CW$ramp\fR defaults to \fB"ramp"\fR (this is a linear intensity ramp). .PP The returned values are ndarrays containing values in the range 0 to 1 inclusive, and are floats. .SH VARIABLES .IX Header "VARIABLES" .ie n .SS $tabledir .el .SS \f(CW$tabledir\fP .IX Subsection "$tabledir" The directory in which the colour tables (in rgb format) are stored. .ie n .SS $rampdir .el .SS \f(CW$rampdir\fP .IX Subsection "$rampdir" The directory in which the intensity ramps are stored. .ie n .SS $suffix .el .SS \f(CW$suffix\fP .IX Subsection "$suffix" The suffix for the data files in \f(CW$tabledir\fR and \&\f(CW$rampdir\fR. .SH "FURTHER INFORMATION" .IX Header "FURTHER INFORMATION" The colour tables were taken from the STARLINK GAIA package, and are provided under the GNU copyleft. See http://star\-www.rl.ac.uk/ and http://star\-www.dur.ac.uk/~pdraper/ for more details. .SH AUTHOR .IX Header "AUTHOR" Doug Burke (djburke@cpan.org), with thanks to Peter Draper/STARLINK for providing the colour-table data, and Christian Soeller and Karl Glazebrook for their help. .PP All rights reserved. There is no warranty. You are allowed to redistribute this software / documentation under certain conditions. For details, see the file COPYING in the PDL distribution. If this file is separated from the PDL distribution, the copyright notice should be included in the file.