Skip to content

Commit 2d350ea

Browse files
authored
Update README.md
1 parent dc3d6c1 commit 2d350ea

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

README.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,17 @@ Our paper exploring the concepts, the improvements, and a case study are [here](
1111

1212
[![DOI](https://zenodo.org/badge/181064496.svg)](https://zenodo.org/badge/latestdoi/181064496)
1313

14+
15+
## Installation ###
16+
17+
Start with cloning the git repo with:
18+
```
19+
git clone https://github.com/MTD-group/cmpuc.git
20+
```
21+
You'll need to append your python path in your .bashrc or .bash_profile file with the path to cmpuc:
22+
```
23+
export PYTHONPATH=$PYTHONPATH:THE/PATH/TO/cmpuc
24+
1425
## Usage ##
1526
The basic idea is to map composition onto an inverted triangular pyramid in a uniform color space (UCS). The wider the pyramid base, the more chemical constrast there is. Likewise, the taller the pyramid, the more concentration contrast there is. In this example (*simple_example.py*), we put the base triangle plane at L = 61.5, and use a feature of the code to rotate and stretch the triange to be as wide as possibe while still fitting in the sRGB color space. From here, we plot some test data, show the base triange in the unform color space, and construct a mixing diagram to aid in reading the color mapping. For comparison, we also do the same with sRGB primaries.
1627
@@ -50,12 +61,16 @@ image = my_map(
5061
auto_tune_L_plane_to_data = auto_tune_L_plane_to_data,
5162
use_deuteranomaly = False)
5263

53-
################## now we can make plot and accessory plots
64+
5465

5566
fig, ax = plt.subplots()
5667
ax.imshow(np.clip(image,0,1), origin = 'lower')
5768
fig.savefig('cmpuc_mapping.png',transparent = True, dpi = 150 )
69+
```
70+
Other than ```data```, the other fields are unnecessary but often helpful. ```test_compositions``` is the aforementioned list of three 2D ndarrays of composition data. This next section will create a helpful mixing triangle and produce a comparison against R-G-B primary mixing for the same data.
5871

72+
```
73+
################## now we can make plot and accessory plots
5974
## when looking at the LAB slice, the colors are computed on a grid,
6075
## you can control how fine that grid is.
6176
fig, ax = plt.subplots()

0 commit comments

Comments
 (0)