1LUT(3) User Contributed Perl Documentation LUT(3)
2
3
4
6 PDL::Graphics::LUT - provides access to a number of look-up tables
7
9 use PDL::Graphics::PGPLOT;
10 use PDL::Graphics::LUT;
11
12 # what tables are available
13 my @tables = lut_names();
14
15 # get the reversed colour table 'smooth',
16 # with the gamma intensity ramp
17 my ( $l, $r, $g, $b ) = lut_data( 'smooth', 1, 'gamma' );
18
19 # use the table idl5 in ctab
20 ctab( lut_data('idl5') );
21
23 PDL::Graphics::LUT contains a number of colour look-up tables (in rgb
24 format) and intensity ramps, and provides routines to access this data.
25 The format of the data is suitable for use by "ctab" in PDL::Graph‐
26 ics::PGPLOT.
27
28 Unlike the initial release of the package, the data tables are now
29 stored within the PDL distribution as FITS files (see $tabledir and
30 $rampdir), rather than in the module itself. Changes to these directo‐
31 ries will be picked up on the next call to one of the package func‐
32 tions.
33
35 lut_names()
36
37 Return, as a list, the names of the available colour tables.
38
39 @tables = lut_names();
40
41 lut_ramps()
42
43 Return, as a list, the names of the available intensity ramps.
44
45 @ramps = lut_ramps();
46
47 lut_data()
48
49 Load in the requested colour table and intensity ramp.
50
51 ( $l, $r, $g, $b ) = lut_data( $table, [ $reverse, [ $ramp ] ] );
52
53 Returns the levels and r, g, b components of the colour table $table.
54 If $reverse is 1 (defaults to 0 if not supplied), then the r, g, and b
55 components are reversed before being returned. If not supplied, $ramp
56 defaults to "ramp" (this is a linear intensity ramp).
57
58 The returned values are piddles containing values in the range 0 to 1
59 inclusive, and are floats.
60
62 $tabledir
63
64 The directory in which the colour tables (in rgb format) are stored.
65
66 $rampdir
67
68 The directory in which the intensity ramps are stored.
69
70 $suffix
71
72 The suffix for the data files in $tabledir and $rampdir.
73
75 The colour tables were taken from the STARLINK GAIA package, and are
76 provided under the GNU copyleft. See http://star-www.rl.ac.uk/ and
77 http://star-www.dur.ac.uk/~pdraper/ for more details.
78
80 Doug Burke (djburke@cpan.org), with thanks to Peter Draper/STARLINK for
81 providing the colour-table data, and Christian Soeller and Karl Glaze‐
82 brook for their help.
83
84 All rights reserved. There is no warranty. You are allowed to redis‐
85 tribute this software / documentation under certain conditions. For
86 details, see the file COPYING in the PDL distribution. If this file is
87 separated from the PDL distribution, the copyright notice should be
88 included in the file.
89
90
91
92perl v5.8.8 2003-11-17 LUT(3)