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.
26
27 Unlike the initial release of the package, the data tables are now
28 stored within the PDL distribution as FITS files (see "$tabledir" and
29 "$rampdir"), rather than in the module itself. Changes to these
30 directories will be picked up on the next call to one of the package
31 functions.
32
34 lut_names()
35 Return, as a list, the names of the available colour tables.
36
37 @tables = lut_names();
38
39 lut_ramps()
40 Return, as a list, the names of the available intensity ramps.
41
42 @ramps = lut_ramps();
43
44 lut_data()
45 Load in the requested colour table and intensity ramp.
46
47 my ( $l, $r, $g, $b ) = lut_data( $table, [ $reverse, [ $ramp ] ] );
48
49 Returns the levels and r, g, b components of the colour table $table.
50 If $reverse is 1 (defaults to 0 if not supplied), then the r, g, and b
51 components are reversed before being returned. If not supplied, $ramp
52 defaults to "ramp" (this is a linear intensity ramp).
53
54 The returned values are ndarrays containing values in the range 0 to 1
55 inclusive, and are floats.
56
58 $tabledir
59 The directory in which the colour tables (in rgb format) are stored.
60
61 $rampdir
62 The directory in which the intensity ramps are stored.
63
64 $suffix
65 The suffix for the data files in $tabledir and $rampdir.
66
68 The colour tables were taken from the STARLINK GAIA package, and are
69 provided under the GNU copyleft. See http://star-www.rl.ac.uk/ and
70 http://star-www.dur.ac.uk/~pdraper/ for more details.
71
73 Doug Burke (djburke@cpan.org), with thanks to Peter Draper/STARLINK for
74 providing the colour-table data, and Christian Soeller and Karl
75 Glazebrook for their help.
76
77 All rights reserved. There is no warranty. You are allowed to
78 redistribute this software / documentation under certain conditions.
79 For details, see the file COPYING in the PDL distribution. If this file
80 is separated from the PDL distribution, the copyright notice should be
81 included in the file.
82
83
84
85perl v5.36.0 2023-01-20 LUT(3)