.\" Automatically generated by Pod::Man 4.14 (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 .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . 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 "2023-06-17" "perl v5.36.0" "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 \s-1PDL\s0 distribution as \s-1FITS\s0 files (see \*(L"$tabledir\*(R" and \*(L"$rampdir\*(R"), 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\*(L"ramp\*(R"\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 \s-1STARLINK GAIA\s0 package, and are provided under the \s-1GNU\s0 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 \s-1COPYING\s0 in the \s-1PDL\s0 distribution. If this file is separated from the \s-1PDL\s0 distribution, the copyright notice should be included in the file.