| Procedure | Location | Procedure Type | Description |
|---|---|---|---|
| assign_map | forcolormap | Subroutine | Assign a colormap from a given "map" array |
| bezier | forcolormap_utils | Function | Create a colormap from continuous Bezier interpolation of control colors |
| blend | forcolormap | Subroutine | Blend this colormap with another one: blend = (1-alpha)self + alphaother |
| check | forcolormap | Subroutine | Check the validity of the colormap and fix it if necessary |
| colorbar_ansi | forcolormap | Subroutine | Preview the colormap in a truecolor ANSI terminal. Optional width controls how many color blocks are printed. |
| compute_RGB | forcolormap | Subroutine | Compute the RGB values for a z real value |
| create | forcolormap | Subroutine | Create a custom colormap from a "map" array. |
| create_bezier | forcolormap | Subroutine | Create a custom colormap using Bezier interpolation: |
| create_lagrange | forcolormap | Subroutine | Create a custom colormap using Lagrange interpolation: |
| cubehelix_colormap | forcolormap_cm_miscellaneous | Subroutine | Based on the public domain FORTRAN 77 subroutine published by D.A. Green: Green, D. A., 2011, Bulletin of the Astronomical Society of India, Vol.39, p.289 For more information on the parameters of cubehelix, see his page: https://www.mrao.cam.ac.uk/~dag/CUBEHELIX/ |
| delete_if_exists | check | Subroutine | Delete a file if it exists (best-effort cleanup for tests). |
| exists_file | check | Function | Return |
| export_paraview_preset | forcolormap | Subroutine | Export the colormap as a Paraview preset file (.json) |
| extract | forcolormap | Subroutine | Extracts colors from the colormap based on specified number of levels (extractedLevels). |
| factorial | forcolormap_utils | Function | Factorial function used for Bezier interpolation |
| finalize | forcolormap | Subroutine | Finalize the colormap, deallocating the map array and resetting status. |
| find_index | forcolormap_info | Function | Return the index of a colormap by its name. Returns 0 if not found. |
| fire_colormap | forcolormap_cm_miscellaneous | Subroutine | Creates a colormap with fire tones, similar to the black_body colormap |
| get_author | forcolormap_info | Function | Return the author of a colormap by its index. |
| get_colorbar | forcolormap_info | Function | Return the colorbar type of a colormap by its index. |
| get_family | forcolormap_info | Function | Return the family of a colormap by its index. |
| get_gradient | forcolormap_info | Function | Return the gradient type of a colormap by its index. |
| get_levels | forcolormap | Function | Returns the number of levels in the colormap |
| get_levels | forcolormap_info | Function | Return the number of levels for a given index. |
| get_license | forcolormap_info | Function | Return the license of a colormap by its index. |
| get_name | forcolormap | Function | Returns the name of the colormap |
| get_name | forcolormap_info | Function | Return the colormap name for a given index. |
| get_ncolormaps | forcolormap_info | Function | Return the total number of available colormaps. |
| get_package | forcolormap_info | Function | Return the package name of a colormap by its index. |
| get_palette | forcolormap_info | Function | Return the palette type of a colormap by its index. |
| get_RGB | forcolormap | Subroutine | Compute the RGB values directly from an integer level number |
| get_url | forcolormap_info | Function | Return the URL of a colormap by its index. |
| get_zmax | forcolormap | Function | Returns the maximal value of the z range |
| get_zmin | forcolormap | Function | Returns the minimal value of the z range |
| inv_rainbow_colormap | forcolormap_cm_miscellaneous | Subroutine | Creates a rainbow like colormap, from red to dark blue |
| lagrange | forcolormap_utils | Function | Create colormap from Lagrange interpolation of control colors |
| lagrange_poly | forcolormap_utils | Function | Interpolates a Lagrange polynomial defined by n equidistant points between 0 and 1 |
| load | forcolormap | Subroutine | Load a .txt colormap with RGB integers separated by spaces on each line. Remark: if no path is indicated in filename, the .txt must be present at the root of the fpm project of the user. |
| forcolormap | Subroutine | Useful for testing and debugging: |
|
| print_status | forcolormap | Subroutine | Print error and fix messages for unvalid colormaps |
| rainbow_colormap | forcolormap_cm_miscellaneous | Subroutine | Creates a rainbow like colormap, from dark blue to red |
| report_test | check | Subroutine | Print a single test result.
Increments the global test counter |
| reverse | forcolormap | Subroutine | Reverse the colormap |
| scale | forcolormap_utils | Interface | Interface to the scale_real_real() and scale_real_int() functions. |
| scale_real_int | forcolormap_utils | Function | Scale the input real array to the integer RGB range [a, b] |
| scale_real_real | forcolormap_utils | Function | Normalize the input real array to the range [0, 1] |
| set | forcolormap | Subroutine | Choose a colormap and set its parameters |
| shift | forcolormap | Subroutine | Apply a circular shift to the colormap (left is +, right is -) |
| test_001 | check | Subroutine | Validate the published constant |
| test_002 | check | Subroutine | Sanity-check |
| test_003 | check | Subroutine | Verify factorial base case: 0! = 1. |
| test_004 | check | Subroutine | Verify factorial base case: 1! = 1. |
| test_005 | check | Subroutine | Check a known reference value: 5! = 120. |
| test_006 | check | Subroutine | Check a known reference value: 10! = 3628800. |
| test_007 | check | Subroutine | Confirm the recurrence relation n! = n·(n-1)! for a representative n. |
| test_008 | check | Subroutine | Ensure factorial is nondecreasing for small n (0..8). |
| test_009 | check | Subroutine | Lagrange basis should form a partition of unity: sum_i B_i(t) = 1. |
| test_010 | check | Subroutine | At each node t_i, the Lagrange basis should satisfy B_j(t_i)=δ_ij. |
| test_011 | check | Subroutine | Endpoints t=0 and t=1 must select the first and last node, respectively. |
| test_012 | check | Subroutine | Symmetry check: for n=3, t=0.5 should select the middle basis function. |
| test_013 | check | Subroutine | For n=2, Lagrange interpolation reduces to linear weights [1-t, t] on [0,1]. |
| test_014 | check | Subroutine | Partition-of-unity should hold across several representative t values. |
| test_015 | check | Subroutine | Real scaling should map the input minimum to |
| test_016 | check | Subroutine | For constant input, scale() should return the upper bound |
| test_017 | check | Subroutine | Monotone input should remain monotone after affine rescaling. |
| test_018 | check | Subroutine | Reversed bounds (a>b) should still map min->a and max->b. |
| test_019 | check | Subroutine | Integer scaling should map endpoints correctly for the RGB range [0,255]. |
| test_020 | check | Subroutine | Integer scaling should respect a nontrivial target range [10,20]. |
| test_021 | check | Subroutine | Reversed integer bounds [20,10] should still map endpoints and keep values inside the range. |
| test_022 | check | Subroutine | Lagrange colormap generator should default to 256 levels and 3 RGB channels. |
| test_023 | check | Subroutine | Lagrange colormap generator should honor an explicit |
| test_024 | check | Subroutine | Lagrange colormap must preserve the first/last control colors as endpoints. |
| test_025 | check | Subroutine | Lagrange colormap output must be clamped to valid 8-bit RGB [0,255]. |
| test_026 | check | Subroutine | If all control colors are identical, the generated map should be constant. |
| test_027 | check | Subroutine | Bézier colormap generator should default to 256 levels and 3 RGB channels. |
| test_028 | check | Subroutine | Bézier colormap generator should honor an explicit |
| test_029 | check | Subroutine | Bézier colormap must preserve the first/last control colors as endpoints. |
| test_030 | check | Subroutine | Bézier colormap output must be clamped to valid 8-bit RGB [0,255]. |
| test_031 | check | Subroutine | If all control colors are identical, the generated Bézier map should be constant. |
| test_032 | check | Subroutine | With two control colors (order 1), Bézier and Lagrange interpolation are identical. |
| test_033 | check | Subroutine | Both Bézier and Lagrange colormaps must preserve endpoints for 3 control colors. |
| test_034 | check | Subroutine | cmap_info should report the expected number of bundled colormaps. |
| test_035 | check | Subroutine | get_name(i) should return a non-empty string for representative indices. |
| test_036 | check | Subroutine | get_levels(i) should be positive for representative indices. |
| test_037 | check | Subroutine | get_name(i) should not exceed the published maximum |
| test_038 | check | Subroutine | set() should select a known built-in map and preserve levels and bounds. |
| test_039 | check | Subroutine | If zmin>zmax, set() should swap the bounds into ascending order. |
| test_040 | check | Subroutine | Unknown colormap names should fall back to the default ("grayC"). |
| test_041 | check | Subroutine | create() should accept a custom map and allow RGB lookup at the bounds. |
| test_042 | check | Subroutine | compute_RGB() should clamp z below/above the bounds to the first/last color. |
| test_043 | check | Subroutine | reverse() should flip the map and annotate the name with the "_reverse" suffix. |
| test_044 | check | Subroutine | shift(+1) should match the intrinsic circular shift |
| test_045 | check | Subroutine | extract() should reduce levels while preserving the original endpoint colors. |
| test_046 | check | Subroutine | create_lagrange() must preserve the first and last control colors as endpoints. |
| test_047 | check | Subroutine | create_bezier() must preserve the first and last control colors as endpoints. |
| test_048 | check | Subroutine | finalize() should be safe and leave the object reusable. |
| test_049 | check | Subroutine | shift(-1) should match the intrinsic circular shift |
| test_050 | check | Subroutine | Ensure cmap_info includes known entries and their expected level counts. |
| test_051 | check | Subroutine | Create a small discrete colormap and validate basic getters. |
| test_052 | check | Subroutine | get_RGB(i) must match the stored discrete table at every level. |
| test_053 | check | Subroutine | compute_RGB() should pick the expected discrete index for representative z values. |
| test_054 | check | Subroutine | A sequence of shifts should match an equivalent sequence of |
| test_055 | check | Subroutine | reverse("discrete") should make the new first color equal the old last color. |
| test_056 | check | Subroutine | set(acton) followed by extract(10) should yield exactly 10 levels. |
| test_057 | check | Subroutine | An invalid colormap name should be corrected to the default ("grayC"). |
| test_058 | check | Subroutine | set() should swap bounds when called with zmin>zmax. |
| test_059 | check | Subroutine | Built-ins with fixed level counts should override an incompatible user request. |
| test_060 | check | Subroutine | create() should swap bounds when called with zmin>zmax, even after finalize(). |
| test_061 | check | Subroutine | extract() should ignore invalid requests (here: requesting more levels than available). |
| test_062 | check | Subroutine | extract() should ignore invalid requests (here: non-positive level count). |
| test_063 | check | Subroutine | set(reverse=.true.) should reverse the built-in map and swap endpoints. |
| test_064 | check | Subroutine | reverse(name="...") should set the name explicitly (no automatic suffixing). |
| test_065 | check | Subroutine | Reversing twice should restore the original map (reverse is an involution). |
| test_066 | check | Subroutine | shift(0) should leave the map unchanged. |
| test_067 | check | Subroutine | Large shifts should wrap modulo the number of levels (circular behavior). |
| test_068 | check | Subroutine | extract(2) should reduce the map to exactly the original first and last colors. |
| test_069 | check | Subroutine | extract(...,name,zmin,zmax,reverse) should update metadata and reverse endpoints as requested. |
| test_070 | check | Subroutine | create(...,reverse=.true.) should reverse a custom map via the optional argument. |
| test_071 | check | Subroutine | create_lagrange(...,reverse=.true.) should swap the endpoint colors. |
| test_072 | check | Subroutine | create_bezier(...,reverse=.true.) should swap the endpoint colors. |
| test_073 | check | Subroutine | load() should read an RGB text file; reverse=.true. should swap the loaded endpoints. |
| test_074 | check | Subroutine | Some built-ins (e.g., "rainbow") force a fixed level count regardless of user input. |
| test_075 | check | Subroutine | For a 3-level map and z=0.5, compute_RGB() should select the middle level. |
| test_076 | check | Subroutine | If no explicit name is provided, extract(levels) should annotate the name with the level count. |
| test_077 | check | Subroutine | Smoke test: print() should be callable after a normal set() without crashing. |
| test_078 | check | Subroutine | colorbar() should produce an output image file (existence is the main check here). |
| test_079 | check | Subroutine | colormap(1D) should write an output image file (existence check only). |
| test_080 | check | Subroutine | colormap(2D) should write an output image file (exercises the 2D branch). |
| test_081 | check | Subroutine | create_lagrange(levels<=0) should trigger validation and fall back to a safe default (256). |
| test_082 | check | Subroutine | If cmap_info contains any entry with levels=-1, cover the check_name (levels==-1) branch. |
| test_083 | check | Subroutine | set(reverse=.false.) must not reverse and must not append the "_reverse" suffix. |
| test_084 | check | Subroutine | create*/(reverse=.false.) must preserve endpoints and must not add the "_reverse" suffix. |
| test_085 | check | Subroutine | Smoke test: set() should succeed for every name reported by cmap_info. |
| test_086 | check | Subroutine | Ensure cmap_info does not contain duplicate colormap names. |
| test_087 | check | Subroutine | write(verbose=3) should write exactly N non-empty name lines (one per colormap). |
| test_088 | check | Subroutine | write(verbose=3,name=...) should filter output to exactly one matching name line. |
| test_089 | check | Subroutine | write(...,append=.true.) should append to an existing file (doubling line count for verbose=3). |
| write | forcolormap_info | Subroutine | Filter colormaps and write metadata. |
| write_ppm_colorbar | forcolormap | Subroutine | Writes the colorbar of the colormap in a PPM file |
| write_ppm_colormap_1d | forcolormap | Subroutine | render a colormap defined by a 1D function into a PPM file |
| write_ppm_colormap_2d | forcolormap | Subroutine | render a colormap defined by a 2D function into a PPM file |
| zebra_colormap | forcolormap_cm_miscellaneous | Subroutine | Creates a zebra-like colormap, alterning white and black stripes |
| zfun | demo_reverse | Function | A sample test function to generate colormap images. |
| zfun | demo | Function | A sample test function to generate colormap images. |
| zfun | example1 | Function | A sample test function to generate colormap images. |
| zfun_1d | check | Function | Simple 1D scalar field for image-writing smoke tests: z(x)=x. |
| zfun_2d | check | Function | Simple 2D scalar field for image-writing smoke tests: z(x,y)=0.5x+0.5y. |