Skip to content

Commit

Permalink
update v1.7.0
Browse files Browse the repository at this point in the history
Added docs, tm30-20, sped up cie_interp, ...
  • Loading branch information
ksmet1977 committed Aug 31, 2021
1 parent 976e1e0 commit ec1134e
Show file tree
Hide file tree
Showing 40 changed files with 1,267 additions and 337 deletions.
Binary file modified LuxPy_Documentation.pdf
Binary file not shown.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ For some online spectral calculations (ANSI/IES TM30, CIE 13.3-1995 Ra, CIE 224:
* calculation of CIEOP06 (cfr. CIE TC1-97) color matching functions and cone-fundamentals
* display characterization
* reading and visualizing IES and LDT photometric files (vizualizations: 2D polar plots, 3D plots, single-bounce physical-based rendering)
* spectral mismatch (f1', correction factors) and measurement uncertainty (under development)
* ...

As of May 2019, LuxPy now also has a toolbox **spectro** for **spectral measurements** with **JETI** and **OceanOptics** spectrometers:
Expand Down
4 changes: 2 additions & 2 deletions conda/luxpy/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{% set name = "luxpy" %}
{% set version = "1.6.13" %}
{% set version = "1.7.0" %}

package:
name: "{{ name|lower }}"
version: "{{ version }}"

source:
url: "https://pypi.io/packages/source/{{ name[0] }}/{{ name }}/{{ name }}-{{ version }}.tar.gz"
sha256: 118b3289e9cc29913ea87042affb1bf1616fa9a4e8b9487d24fdf5539c8b5f21
sha256: d21157fdaf5076b5b2678822e2f71833b823971bcadb145aae1207f22de4faaf

build:
number: 0
Expand Down
Binary file modified docs/LuxPy_Documentation-v1.7.0.pdf
Binary file not shown.
5 changes: 3 additions & 2 deletions docs/build/html/_modules/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,6 @@ <h1>All modules for which code is available</h1>
<li><a href="luxpy/spectrum/SPD.html">luxpy.spectrum.SPD</a></li>
<li><a href="luxpy/spectrum/basics/illuminants.html">luxpy.spectrum.basics.illuminants</a></li>
<li><a href="luxpy/spectrum/basics/spectral.html">luxpy.spectrum.basics.spectral</a></li>
<li><a href="luxpy/spectrum/detector_spectral_mismatch.html">luxpy.spectrum.detector_spectral_mismatch</a></li>
<li><a href="luxpy/spectrum/spdx_ietm2714.html">luxpy.spectrum.spdx_ietm2714</a></li>
<li><a href="luxpy/toolboxes/dispcal/displaycalibration.html">luxpy.toolboxes.dispcal.displaycalibration</a></li>
<li><a href="luxpy/toolboxes/hypspcim/hyperspectral_img_simulator.html">luxpy.toolboxes.hypspcim.hyperspectral_img_simulator</a></li>
Expand All @@ -215,8 +214,10 @@ <h1>All modules for which code is available</h1>
<li><a href="luxpy/toolboxes/photbiochem/circadian_CS_CLa_lrc.html">luxpy.toolboxes.photbiochem.circadian_CS_CLa_lrc</a></li>
<li><a href="luxpy/toolboxes/rgb2spec.html">luxpy.toolboxes.rgb2spec</a></li>
<ul><li><a href="luxpy/toolboxes/rgb2spec/smits_mitsuba.html">luxpy.toolboxes.rgb2spec.smits_mitsuba</a></li>
</ul><li><a href="luxpy/toolboxes/spdbuild/spdbuilder.html">luxpy.toolboxes.spdbuild.spdbuilder</a></li>
</ul><li><a href="luxpy/toolboxes/sherbrooke_spectral_indices/sherbrooke_spectral_indices_2013.html">luxpy.toolboxes.sherbrooke_spectral_indices.sherbrooke_spectral_indices_2013</a></li>
<li><a href="luxpy/toolboxes/spdbuild/spdbuilder.html">luxpy.toolboxes.spdbuild.spdbuilder</a></li>
<li><a href="luxpy/toolboxes/spdbuild/spdoptimizer2020.html">luxpy.toolboxes.spdbuild.spdoptimizer2020</a></li>
<li><a href="luxpy/toolboxes/spectral_mismatch_and_uncertainty/detector_spectral_mismatch.html">luxpy.toolboxes.spectral_mismatch_and_uncertainty.detector_spectral_mismatch</a></li>
<li><a href="luxpy/toolboxes/spectro/spectro.html">luxpy.toolboxes.spectro.spectro</a></li>
<li><a href="luxpy/utils/folder_tree.html">luxpy.utils.folder_tree</a></li>
<li><a href="luxpy/utils/utilities.html">luxpy.utils.utilities</a></li>
Expand Down
18 changes: 10 additions & 8 deletions docs/build/html/_modules/luxpy/color/cri/iestm30/graphics.html
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ <h1>Source code for luxpy.color.cri.iestm30.graphics</h1><div class="highlight">
<span class="k">return</span> <span class="n">cmap</span>

<div class="viewcode-block" id="plot_tm30_cvg"><a class="viewcode-back" href="../../../../../color.html#luxpy.color.cri.plot_tm30_cvg">[docs]</a><span class="k">def</span> <span class="nf">plot_tm30_cvg</span><span class="p">(</span><span class="n">spd</span><span class="p">,</span> <span class="n">cri_type</span> <span class="o">=</span> <span class="s1">&#39;ies-tm30&#39;</span><span class="p">,</span>
<span class="n">gamut_line_color</span> <span class="o">=</span> <span class="s1">&#39;r&#39;</span><span class="p">,</span>
<span class="n">gamut_line_color</span> <span class="o">=</span> <span class="kc">None</span><span class="p">,</span>
<span class="n">gamut_line_style</span> <span class="o">=</span> <span class="s1">&#39;-&#39;</span><span class="p">,</span>
<span class="n">gamut_line_marker</span> <span class="o">=</span> <span class="s1">&#39;o&#39;</span><span class="p">,</span>
<span class="n">gamut_line_label</span> <span class="o">=</span> <span class="kc">None</span><span class="p">,</span>
Expand Down Expand Up @@ -423,8 +423,9 @@ <h1>Source code for luxpy.color.cri.iestm30.graphics</h1><div class="highlight">
<span class="sd"> | &#39;r&#39;, optional</span>
<span class="sd"> | Plotting line style for the line connecting the </span>
<span class="sd"> | average test chromaticity in the hue bins.</span>
<span class="sd"> | None defaults to red (240,80,70)/255 (IES-TM30-20 recommended).</span>
<span class="sd"> :gamut_line_style:</span>
<span class="sd"> | &#39;r&#39;, optional</span>
<span class="sd"> | &#39;-&#39;, optional</span>
<span class="sd"> | Plotting color for the line connecting the </span>
<span class="sd"> | average test chromaticity in the hue bins.</span>
<span class="sd"> :gamut_line_marker:</span>
Expand Down Expand Up @@ -475,6 +476,8 @@ <h1>Source code for luxpy.color.cri.iestm30.graphics</h1><div class="highlight">
<span class="n">jabt</span> <span class="o">=</span> <span class="n">hdata</span><span class="p">[</span><span class="s1">&#39;jabtn_hj_closed&#39;</span><span class="p">][:,</span><span class="mi">0</span><span class="p">,:]</span>
<span class="n">jabr</span> <span class="o">=</span> <span class="n">hdata</span><span class="p">[</span><span class="s1">&#39;jabrn_hj_closed&#39;</span><span class="p">][:,</span><span class="mi">0</span><span class="p">,:]</span>

<span class="k">if</span> <span class="n">gamut_line_color</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span> <span class="n">gamut_line_color</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">((</span><span class="mi">240</span><span class="p">,</span><span class="mi">80</span><span class="p">,</span><span class="mi">70</span><span class="p">))</span><span class="o">/</span><span class="mi">255</span> <span class="c1"># recommended color in ANSI/IES-TM30-20</span>

<span class="c1"># Plot color vector graphic</span>
<span class="n">_</span><span class="p">,</span> <span class="n">axh</span><span class="p">,</span> <span class="n">_</span> <span class="o">=</span> <span class="n">plot_ColorVectorGraphic</span><span class="p">(</span><span class="n">jabt</span> <span class="o">=</span> <span class="n">jabt</span><span class="p">,</span> <span class="n">jabr</span> <span class="o">=</span> <span class="n">jabr</span><span class="p">,</span>
<span class="n">hbins</span> <span class="o">=</span> <span class="n">hdata</span><span class="p">[</span><span class="s1">&#39;nhbins&#39;</span><span class="p">],</span>
Expand Down Expand Up @@ -1594,7 +1597,7 @@ <h1>Source code for luxpy.color.cri.iestm30.graphics</h1><div class="highlight">
<span class="n">scale_vf_chroma_to_sample_chroma</span> <span class="o">=</span> <span class="n">scale_vf_chroma_to_sample_chroma</span><span class="p">)</span>

<span class="c1"># Unpack data dictionary:</span>
<span class="p">(</span><span class="n">DEa</span><span class="p">,</span> <span class="n">DEi</span><span class="p">,</span> <span class="n">Rcshj</span><span class="p">,</span> <span class="n">Rf</span><span class="p">,</span>
<span class="p">(</span><span class="n">AnnexE_priority</span><span class="p">,</span> <span class="n">DEa</span><span class="p">,</span> <span class="n">DEi</span><span class="p">,</span> <span class="n">Rcshj</span><span class="p">,</span> <span class="n">Rf</span><span class="p">,</span>
<span class="n">Rfhj</span><span class="p">,</span> <span class="n">Rfi</span><span class="p">,</span> <span class="n">Rg</span><span class="p">,</span> <span class="n">Rhshj</span><span class="p">,</span>
<span class="n">Sr</span><span class="p">,</span> <span class="n">St</span><span class="p">,</span> <span class="n">cct</span><span class="p">,</span> <span class="n">cri_type</span><span class="p">,</span>
<span class="n">duv</span><span class="p">,</span> <span class="n">hue_bin_data</span><span class="p">,</span> <span class="n">vf</span><span class="p">,</span>
Expand Down Expand Up @@ -1627,15 +1630,14 @@ <h1>Source code for luxpy.color.cri.iestm30.graphics</h1><div class="highlight">


<span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="n">cct</span><span class="o">.</span><span class="n">shape</span><span class="p">[</span><span class="mi">0</span><span class="p">]):</span>


<span class="n">fig</span> <span class="o">=</span> <span class="n">plt</span><span class="o">.</span><span class="n">figure</span><span class="p">(</span><span class="n">figsize</span><span class="o">=</span><span class="p">(</span><span class="mi">10</span><span class="p">,</span> <span class="mi">6</span><span class="p">),</span> <span class="n">dpi</span><span class="o">=</span><span class="mi">144</span><span class="p">)</span>

<span class="c1"># Plot CVG:</span>
<span class="n">ax_CVG</span> <span class="o">=</span> <span class="n">create_subplot</span><span class="p">(</span><span class="n">layout</span><span class="p">,</span><span class="mi">1</span><span class="p">,</span> <span class="n">polar</span> <span class="o">=</span> <span class="kc">True</span><span class="p">,</span> <span class="n">frameon</span> <span class="o">=</span> <span class="kc">False</span><span class="p">)</span>
<span class="k">if</span> <span class="n">plot_test_sample_coord</span> <span class="o">==</span> <span class="kc">False</span><span class="p">:</span>
<span class="n">jabti</span> <span class="o">=</span> <span class="kc">None</span>
<span class="n">jabri</span> <span class="o">=</span> <span class="kc">None</span>
<span class="n">jabti_i</span> <span class="o">=</span> <span class="kc">None</span>
<span class="n">jabri_i</span> <span class="o">=</span> <span class="kc">None</span>
<span class="k">else</span><span class="p">:</span>
<span class="n">jabti_i</span> <span class="o">=</span> <span class="n">jabti</span><span class="p">[</span><span class="o">...</span><span class="p">,</span><span class="n">i</span><span class="p">:</span><span class="n">i</span><span class="o">+</span><span class="mi">1</span><span class="p">,:]</span>
<span class="n">jabri_i</span> <span class="o">=</span> <span class="n">jabri</span><span class="p">[</span><span class="o">...</span><span class="p">,</span><span class="n">i</span><span class="p">:</span><span class="n">i</span><span class="o">+</span><span class="mi">1</span><span class="p">,:]</span>
Expand All @@ -1651,8 +1653,8 @@ <h1>Source code for luxpy.color.cri.iestm30.graphics</h1><div class="highlight">
<span class="n">scalef</span> <span class="o">=</span> <span class="n">scalef</span><span class="p">,</span>
<span class="n">force_CVG_layout</span> <span class="o">=</span> <span class="n">force_CVG_layout</span><span class="p">,</span>
<span class="n">bin_labels</span> <span class="o">=</span> <span class="s1">&#39;#&#39;</span><span class="p">,</span>
<span class="n">jabti</span> <span class="o">=</span> <span class="n">jabti</span><span class="p">,</span>
<span class="n">jabri</span> <span class="o">=</span> <span class="n">jabri</span><span class="p">,</span>
<span class="n">jabti</span> <span class="o">=</span> <span class="n">jabti_i</span><span class="p">,</span>
<span class="n">jabri</span> <span class="o">=</span> <span class="n">jabri_i</span><span class="p">,</span>
<span class="n">hbinnr</span> <span class="o">=</span> <span class="n">hbinnr</span><span class="p">)</span>

<span class="c1"># Plot VF:</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,8 @@ <h1>Source code for luxpy.color.cri.iestm30.metrics</h1><div class="highlight"><

<span class="c1"># Get normalized and sliced hue-bin _hj data for plotting:</span>
<span class="n">rg_pars</span> <span class="o">=</span> <span class="n">cri_type</span><span class="p">[</span><span class="s1">&#39;rg_pars&#39;</span><span class="p">]</span>
<span class="n">nhbins</span><span class="p">,</span> <span class="n">normalize_gamut</span><span class="p">,</span> <span class="n">normalized_chroma_ref</span><span class="p">,</span> <span class="n">start_hue</span> <span class="o">=</span> <span class="p">[</span><span class="n">rg_pars</span><span class="p">[</span><span class="n">x</span><span class="p">]</span> <span class="k">for</span> <span class="n">x</span> <span class="ow">in</span> <span class="nb">sorted</span><span class="p">(</span><span class="n">rg_pars</span><span class="o">.</span><span class="n">keys</span><span class="p">())]</span>
<span class="k">if</span> <span class="s1">&#39;use_bin_avg_DEi&#39;</span> <span class="ow">not</span> <span class="ow">in</span> <span class="n">rg_pars</span><span class="p">:</span> <span class="n">rg_pars</span><span class="p">[</span><span class="s1">&#39;use_bin_avg_DEi&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="kc">True</span>
<span class="n">nhbins</span><span class="p">,</span> <span class="n">normalize_gamut</span><span class="p">,</span> <span class="n">normalized_chroma_ref</span><span class="p">,</span> <span class="n">start_hue</span><span class="p">,</span> <span class="n">use_bin_avg_DEi</span> <span class="o">=</span> <span class="p">[</span><span class="n">rg_pars</span><span class="p">[</span><span class="n">x</span><span class="p">]</span> <span class="k">for</span> <span class="n">x</span> <span class="ow">in</span> <span class="nb">sorted</span><span class="p">(</span><span class="n">rg_pars</span><span class="o">.</span><span class="n">keys</span><span class="p">())]</span>

<span class="c1"># Get chroma of samples: </span>
<span class="k">if</span> <span class="n">scale_vf_chroma_to_sample_chroma</span> <span class="o">==</span> <span class="kc">True</span><span class="p">:</span>
Expand Down
Loading

0 comments on commit ec1134e

Please sign in to comment.