From 7aad988b4a7c533861652d92800870752f996cac Mon Sep 17 00:00:00 2001
From: Phoebe Pearce
Date: Mon, 23 Sep 2024 14:24:43 +0200
Subject: [PATCH] v2.0.0 major updates
- **Speed improvements for all ray-tracing calculations**, by using numba jit (just-in-time) compilation of heavily-used
functions, and more efficient lookup of TMM values for integrated ray-tracing/TMM calculations.
- **New analytical method for ray-tracing**, which is much faster than full ray-tracing and can be used with full
accuracy for surfaces where the number of ray interactions is known exactly in advance (e.g. upright pyramids with
opening angles between 45 and 54 degrees). Note that the calculation of absorption profiles in interface layers
is not yet implemented for this method (though this is on the roadmap, as there is no fundamental reason this
cannot be done). Absorption in bulk layers is calculated as usual if the analytical method is used. This option
can be toggled on per surface in an rt_structure object.
- Refactored rt code into three separate files: rt_common (for function used for both ARRM and rt_structure calculations), rt_structure and rt_matrix.
- **Phong scattering**: a new option for the ray-tracer, which allows additional non-specular scattering. The continuum
between perfectly specular and Lambertian scattering can be controlled with the Phong exponent.
- **Rigorous treatment of polarization in ray-tracing** (no changes to treatment of polarization in TMM and RCWA calculations).
- Option to set a maximum number of bulk passes for the ray-tracer using the maximum_passes option
- More detailed output from ray-tracing calculations, and re-organization of returns.
- Move to uv for install in GitHub actions instead of pip (faster)
- Schedule weekly test run on GitHub actions
- fix issues with examples in documentation
- new examples for new functionality
- lens_hyperhemisphere_rt parallelised over angles
- faster matrix multiplication for ARRM using einsum (thanks to Johnson Wong @arsonwong)
- default number of lookuptable angles changed from 300 to 200
- remove ability to set options.wavelengths (plural) instead of options.wavelength (next major version release deprecation)
- fix issue in TMM with zero thickness incoherent layers
- move to state (options.option) rather than dictionary (options["option"]) notation in multiple files
- new process_pol function to process strings or list into (s, p) format
- new tests for new functionality
---
.github/workflows/testing.yml | 51 +-
docs/Analytic/analytic.rst | 4 +
docs/Examples/HIT_emissivity.ipynb | 409 ++-
.../Examples/compare_models_3Jsolarcell.ipynb | 1376 +++++++++-
.../compare_models_3Jsolarcell_profile.ipynb | 119 +-
docs/Examples/create_rt_texture.ipynb | 81 +-
docs/Examples/data/AM0.csv | 920 +++++++
docs/Examples/data/Ag_UNSW_k.txt | 1701 ++++++++++++
docs/Examples/data/Ag_UNSW_n.txt | 1701 ++++++++++++
docs/Examples/data/C60_Ren_k.txt | 78 +
docs/Examples/data/C60_Ren_n.txt | 88 +
docs/Examples/data/CsBr10p_1to2_k_shifted.txt | 69 +
docs/Examples/data/CsBr10p_1to2_n_shifted.txt | 69 +
.../Examples/data/IZO_Ballif_rO2_10pcnt_k.txt | 59 +
.../Examples/data/IZO_Ballif_rO2_10pcnt_n.txt | 62 +
docs/Examples/data/MgF2_RdeM_k.txt | 960 +++++++
docs/Examples/data/MgF2_RdeM_n.txt | 960 +++++++
docs/Examples/data/RAT_data_300um_2um_55.csv | 47 +
docs/Examples/data/Si_IR_recon_k.txt | 1000 +++++++
docs/Examples/data/Si_IR_recon_n.txt | 1000 +++++++
docs/Examples/data/Si_OPTOS_k.txt | 121 +
docs/Examples/data/Si_OPTOS_n.txt | 121 +
docs/Examples/data/back_ITO_k.txt | 315 +++
docs/Examples/data/back_ITO_n.txt | 315 +++
docs/Examples/data/emissivity.csv | 44 +
docs/Examples/data/emissivity_noITO.csv | 47 +
docs/Examples/data/front_ITO_k.txt | 410 +++
docs/Examples/data/front_ITO_n.txt | 410 +++
docs/Examples/data/model_back_ito_k.txt | 312 +++
docs/Examples/data/model_back_ito_n.txt | 312 +++
docs/Examples/data/model_i_a_silicon_k.txt | 314 +++
docs/Examples/data/model_i_a_silicon_n.txt | 314 +++
docs/Examples/data/model_n_a_silicon_k.txt | 314 +++
docs/Examples/data/model_n_a_silicon_n.txt | 314 +++
docs/Examples/data/model_p_a_silicon_k.txt | 314 +++
docs/Examples/data/model_p_a_silicon_n.txt | 314 +++
docs/Examples/data/optos_fig6_sim.csv | 82 +
docs/Examples/data/optos_fig7_sim.csv | 77 +
docs/Examples/data/optos_fig8_sim.csv | 58 +
docs/Examples/data/pyramids.csv | 128 +
...lare_fullrt_300um_2umpyramids_300_1200nm_3 | 50 +
.../data/si_AlkineEtchSide0003_ZSensor.txt | 260 ++
.../si_PyramidSide_30jan_0001_ZSensor.txt | 260 ++
docs/Examples/examples.rst | 33 +-
docs/Examples/grating_pyramids_OPTOS.ipynb | 588 +++--
docs/Examples/perovskite_Si_rt.ipynb | 164 +-
docs/Examples/rcwa_examples.ipynb | 93 +-
docs/Examples/rcwa_tmm_validation.ipynb | 142 +-
docs/Examples/rt_pyramids.ipynb | 327 ++-
docs/Matrix/matrix_method.rst | 4 +
docs/Options/user_options.rst | 11 +
docs/RCWA/rcwa.rst | 4 +
docs/README.rst | 4 +
docs/Ray_tracing/analytical_ray_tracing.rst | 19 +
docs/Ray_tracing/polarization.rst | 76 +
docs/Ray_tracing/ray_tracing.rst | 31 +-
docs/TMM/tmm.rst | 4 +
docs/Textures/textures.rst | 23 +-
docs/Utilities/utilities.rst | 4 +
docs/news.rst | 43 +-
docs/requirements.txt | 4 +-
examples/HIT_emissivity.ipynb | 576 ++++-
examples/analytical_rt_comparison.py | 114 +
examples/compare_models_3Jsolarcell.ipynb | 1456 ++++++++++-
.../compare_models_3Jsolarcell_profile.ipynb | 291 +--
examples/create_rt_texture.ipynb | 151 +-
examples/glass_GaAs_Si.py | 132 +
examples/grating_pyramids_OPTOS.ipynb | 875 ++++---
examples/lens_hyperhemisphere_rt.py | 184 +-
examples/perovskite_Si_rt.py | 83 +-
examples/phong_scattering.py | 162 ++
examples/phong_scattering_2.py | 129 +
examples/phong_theory.py | 65 +
examples/pvk_Si_analytical_RT.py | 142 +
examples/rcwa_examples.ipynb | 277 +-
examples/rcwa_tmm_validation.ipynb | 257 +-
examples/rt_pyramids.ipynb | 211 +-
examples/rt_pyramids.py | 179 ++
examples/rt_structure_with_lookuptable.py | 1 +
pyproject.toml | 68 +
.../matrix_formalism/multiply_matrices.py | 26 +-
rayflare/options.py | 3 +-
rayflare/ray_tracing/__init__.py | 3 +-
rayflare/ray_tracing/analytical_rt.py | 725 ++++++
rayflare/ray_tracing/rt.py | 2303 -----------------
rayflare/ray_tracing/rt_common.py | 750 ++++++
rayflare/ray_tracing/rt_matrix.py | 694 +++++
rayflare/ray_tracing/rt_structure.py | 1652 ++++++++++++
.../rigorous_coupled_wave_analysis/rcwa.py | 176 +-
rayflare/textures/define_textures.py | 3 +-
rayflare/textures/standard_rt_textures.py | 30 +-
.../transfer_matrix_method/lookup_table.py | 7 +-
rayflare/transfer_matrix_method/tmm.py | 44 +-
rayflare/utilities.py | 27 +-
setup.py | 97 -
tests/test_analytical_rt.py | 404 +++
tests/test_compare_methods.py | 60 +-
tests/test_errors.py | 2 +-
tests/test_ideal_cases.py | 18 +-
tests/test_inkstone.py | 2 +-
tests/test_matrix_formalism.py | 6 +-
tests/test_ray_tracing.py | 119 +-
tests/test_rigorous_coupled_wave.py | 12 +-
tests/test_textures.py | 12 +-
tests/test_transfer_matrix_method.py | 4 +-
tests/test_utilities.py | 6 +-
106 files changed, 25419 insertions(+), 4653 deletions(-)
create mode 100644 docs/Examples/data/AM0.csv
create mode 100644 docs/Examples/data/Ag_UNSW_k.txt
create mode 100644 docs/Examples/data/Ag_UNSW_n.txt
create mode 100644 docs/Examples/data/C60_Ren_k.txt
create mode 100644 docs/Examples/data/C60_Ren_n.txt
create mode 100644 docs/Examples/data/CsBr10p_1to2_k_shifted.txt
create mode 100644 docs/Examples/data/CsBr10p_1to2_n_shifted.txt
create mode 100644 docs/Examples/data/IZO_Ballif_rO2_10pcnt_k.txt
create mode 100644 docs/Examples/data/IZO_Ballif_rO2_10pcnt_n.txt
create mode 100644 docs/Examples/data/MgF2_RdeM_k.txt
create mode 100644 docs/Examples/data/MgF2_RdeM_n.txt
create mode 100644 docs/Examples/data/RAT_data_300um_2um_55.csv
create mode 100644 docs/Examples/data/Si_IR_recon_k.txt
create mode 100644 docs/Examples/data/Si_IR_recon_n.txt
create mode 100644 docs/Examples/data/Si_OPTOS_k.txt
create mode 100644 docs/Examples/data/Si_OPTOS_n.txt
create mode 100644 docs/Examples/data/back_ITO_k.txt
create mode 100644 docs/Examples/data/back_ITO_n.txt
create mode 100644 docs/Examples/data/emissivity.csv
create mode 100644 docs/Examples/data/emissivity_noITO.csv
create mode 100644 docs/Examples/data/front_ITO_k.txt
create mode 100644 docs/Examples/data/front_ITO_n.txt
create mode 100644 docs/Examples/data/model_back_ito_k.txt
create mode 100644 docs/Examples/data/model_back_ito_n.txt
create mode 100644 docs/Examples/data/model_i_a_silicon_k.txt
create mode 100644 docs/Examples/data/model_i_a_silicon_n.txt
create mode 100644 docs/Examples/data/model_n_a_silicon_k.txt
create mode 100644 docs/Examples/data/model_n_a_silicon_n.txt
create mode 100644 docs/Examples/data/model_p_a_silicon_k.txt
create mode 100644 docs/Examples/data/model_p_a_silicon_n.txt
create mode 100644 docs/Examples/data/optos_fig6_sim.csv
create mode 100644 docs/Examples/data/optos_fig7_sim.csv
create mode 100644 docs/Examples/data/optos_fig8_sim.csv
create mode 100644 docs/Examples/data/pyramids.csv
create mode 100644 docs/Examples/data/rayflare_fullrt_300um_2umpyramids_300_1200nm_3
create mode 100644 docs/Examples/data/si_AlkineEtchSide0003_ZSensor.txt
create mode 100644 docs/Examples/data/si_PyramidSide_30jan_0001_ZSensor.txt
create mode 100644 docs/Ray_tracing/analytical_ray_tracing.rst
create mode 100644 docs/Ray_tracing/polarization.rst
create mode 100644 examples/analytical_rt_comparison.py
create mode 100644 examples/glass_GaAs_Si.py
create mode 100644 examples/phong_scattering.py
create mode 100644 examples/phong_scattering_2.py
create mode 100644 examples/phong_theory.py
create mode 100644 examples/pvk_Si_analytical_RT.py
create mode 100644 examples/rt_pyramids.py
create mode 100644 pyproject.toml
create mode 100644 rayflare/ray_tracing/analytical_rt.py
delete mode 100644 rayflare/ray_tracing/rt.py
create mode 100644 rayflare/ray_tracing/rt_common.py
create mode 100644 rayflare/ray_tracing/rt_matrix.py
create mode 100644 rayflare/ray_tracing/rt_structure.py
delete mode 100644 setup.py
create mode 100644 tests/test_analytical_rt.py
diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml
index 77aff5f..9de7d8a 100644
--- a/.github/workflows/testing.yml
+++ b/.github/workflows/testing.yml
@@ -5,9 +5,9 @@ on:
pull_request:
- # everyday at 3 am UTC
- # schedule:
- # - cron: '0 3 * * *'
+ # weekly
+ schedule:
+ - cron: '3 7 * * 4'
jobs:
testing:
@@ -35,15 +35,16 @@ jobs:
sudo apt install -y python3-tk libboost-all-dev libopenblas-dev libfftw3-dev libsuitesparse-dev
# Do not need to do this if not installing S4
-# - name: Install system dependencies in MacOS
-# if: matrix.os == 'macos-latest'
-# run: |
-# brew install fftw suite-sparse openblas lapack boost
+ - name: Install system dependencies in MacOS
+ if: matrix.os == 'macos-latest'
+ run: |
+ brew install fftw suite-sparse openblas lapack boost
- name: Install python dependencies
run: |
- python -m pip install --upgrade setuptools wheel pip
- pip install .
+ python -m pip install uv
+ uv pip install --system .
+ uv pip install --system numpy wheel setuptools
- name: Install S4 in Linux
if: matrix.os == 'ubuntu-latest'
@@ -55,34 +56,26 @@ jobs:
rm -rf S4
# Not working as of March 2024. Cannot find cholmod.h header file. Reason unclear.
-# - name: Install S4 in MacOS
-# if: matrix.os == 'macos-latest'
-# run: |
-# git clone https://github.com/phoebe-p/S4
-# cd S4
-# make S4_pyext --file="Makefile.mac_intel"
-# cd ..
-# rm -rf S4
-
- - name: Install on Linux and MacOS
- if: matrix.os != 'windows-latest'
- run: pip install .
-
- - name: Install on Windows
- if: matrix.os == 'windows-latest'
+ - name: Install S4 in MacOS
+ if: matrix.os == 'macos-latest'
run: |
- pip install .
- shell: powershell
+ git clone https://github.com/phoebe-p/S4
+ cd S4
+ make S4_pyext --file="Makefile.m1"
+ cd ..
+ rm -rf S4
- name: Test with pytest
+ env:
+ NUMBA_DISABLE_JIT: ${{ matrix.os == 'ubuntu-latest' && matrix.python-version == '3.12' && '1' || '0' }}
run: |
- pip install pytest-cov pytest-rerunfailures
+ uv pip install --system pytest-cov pytest-rerunfailures
pytest --cov-report= --cov=rayflare tests/ --reruns 5
- name: Codecov
- if: matrix.os == 'ubuntu-latest'
+ if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.12'
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
run: |
- pip install codecov
+ uv pip install --system codecov
codecov
\ No newline at end of file
diff --git a/docs/Analytic/analytic.rst b/docs/Analytic/analytic.rst
index ee1e44d..fc17e42 100644
--- a/docs/Analytic/analytic.rst
+++ b/docs/Analytic/analytic.rst
@@ -4,6 +4,10 @@ Analytical calculations
Analytic calculations relating to diffraction (i.e. not using S4).
+###################################
+Individual function documentation:
+###################################
+
.. automodule:: rayflare.analytic.diffraction
:members:
:undoc-members:
diff --git a/docs/Examples/HIT_emissivity.ipynb b/docs/Examples/HIT_emissivity.ipynb
index 7c7a381..4161c37 100644
--- a/docs/Examples/HIT_emissivity.ipynb
+++ b/docs/Examples/HIT_emissivity.ipynb
@@ -16,10 +16,14 @@
},
{
"cell_type": "code",
- "execution_count": 1,
+ "execution_count": 13,
"metadata": {
"pycharm": {
"name": "#%%\n"
+ },
+ "ExecuteTime": {
+ "end_time": "2024-09-21T17:50:26.743912Z",
+ "start_time": "2024-09-21T17:50:26.732949Z"
}
},
"outputs": [],
@@ -57,10 +61,14 @@
},
{
"cell_type": "code",
- "execution_count": 2,
+ "execution_count": 14,
"metadata": {
"pycharm": {
"name": "#%%\n"
+ },
+ "ExecuteTime": {
+ "end_time": "2024-09-21T17:50:26.744931Z",
+ "start_time": "2024-09-21T17:50:26.737057Z"
}
},
"outputs": [],
@@ -69,9 +77,9 @@
"wavelengths = np.round(np.floor(np.exp(wavelengths))*1e-9, 12)\n",
"\n",
"options = default_options()\n",
- "options.wavelengths = wavelengths\n",
+ "options.wavelength = wavelengths\n",
"options.project_name = 'HIT_notebook'\n",
- "options.n_rays = 5000\n",
+ "options.n_rays = 10000\n",
"options.n_theta_bins = 20\n",
"options.nx = 5\n",
"options.ny = 5"
@@ -90,10 +98,14 @@
},
{
"cell_type": "code",
- "execution_count": 3,
+ "execution_count": 15,
"metadata": {
"pycharm": {
"name": "#%%\n"
+ },
+ "ExecuteTime": {
+ "end_time": "2024-09-21T17:50:26.749555Z",
+ "start_time": "2024-09-21T17:50:26.741317Z"
}
},
"outputs": [],
@@ -126,10 +138,14 @@
},
{
"cell_type": "code",
- "execution_count": 4,
+ "execution_count": 16,
"metadata": {
"pycharm": {
"name": "#%%\n"
+ },
+ "ExecuteTime": {
+ "end_time": "2024-09-21T17:50:26.758004Z",
+ "start_time": "2024-09-21T17:50:26.747699Z"
}
},
"outputs": [],
@@ -161,39 +177,348 @@
},
{
"cell_type": "code",
- "execution_count": 5,
+ "execution_count": 17,
"metadata": {
"pycharm": {
"name": "#%%\n"
+ },
+ "ExecuteTime": {
+ "end_time": "2024-09-21T17:51:37.309212Z",
+ "start_time": "2024-09-21T17:50:26.752520Z"
}
},
"outputs": [
{
- "name": "stdout",
+ "name": "stderr",
"output_type": "stream",
"text": [
- "Making lookuptable for element 0 in structure\n",
- "Existing lookup table found\n",
- "Making lookuptable for element 2 in structure\n",
- "Existing lookup table found\n",
- "Ray tracing with TMM lookup table for element 0 in structure\n",
- "Existing angular redistribution matrices found\n",
- "Existing angular redistribution matrices found\n",
- "Ray tracing with TMM lookup table for element 2 in structure\n",
- "Existing angular redistribution matrices found\n",
- "After iteration 1 : maximum power fraction remaining = 0.6097034485957743\n",
- "After iteration 2 : maximum power fraction remaining = 0.4231168493584152\n",
- "After iteration 3 : maximum power fraction remaining = 0.29274584120143654\n",
- "After iteration 4 : maximum power fraction remaining = 0.20242354720194347\n",
- "After iteration 5 : maximum power fraction remaining = 0.13972317102933673\n",
- "After iteration 6 : maximum power fraction remaining = 0.09641891122644888\n",
- "After iteration 7 : maximum power fraction remaining = 0.06653665716366666\n",
- "After iteration 8 : maximum power fraction remaining = 0.04591593147741026\n",
- "After iteration 9 : maximum power fraction remaining = 0.03168609279992504\n",
- "After iteration 10 : maximum power fraction remaining = 0.021866277368570355\n",
- "After iteration 11 : maximum power fraction remaining = 0.015089717420193792\n",
- "After iteration 12 : maximum power fraction remaining = 0.01041327533750268\n",
- "After iteration 13 : maximum power fraction remaining = 0.00718610544936348\n"
+ "INFO: Making RT/TMM lookuptable for element 0 in structure\n",
+ "INFO: Making RT/TMM lookuptable for element 2 in structure\n",
+ "INFO: Ray tracing with TMM lookup table for element 0 in structure\n",
+ "INFO: Calculating matrix only for incidence theta/phi\n",
+ "INFO: RT calculation for wavelength = 299.0 nm\n",
+ "INFO: RT calculation for wavelength = 311.0 nm\n",
+ "INFO: RT calculation for wavelength = 324.0 nm\n",
+ "INFO: RT calculation for wavelength = 336.0 nm\n",
+ "INFO: RT calculation for wavelength = 350.0 nm\n",
+ "INFO: RT calculation for wavelength = 363.0 nm\n",
+ "INFO: RT calculation for wavelength = 378.0 nm\n",
+ "INFO: RT calculation for wavelength = 393.0 nm\n",
+ "INFO: RT calculation for wavelength = 408.0 nm\n",
+ "INFO: RT calculation for wavelength = 424.0 nm\n",
+ "INFO: RT calculation for wavelength = 441.0 nm\n",
+ "INFO: RT calculation for wavelength = 458.0 nm\n",
+ "INFO: RT calculation for wavelength = 476.0 nm\n",
+ "INFO: RT calculation for wavelength = 495.0 nm\n",
+ "INFO: RT calculation for wavelength = 515.0 nm\n",
+ "INFO: RT calculation for wavelength = 535.0 nm\n",
+ "INFO: RT calculation for wavelength = 556.0 nm\n",
+ "INFO: RT calculation for wavelength = 578.0 nm\n",
+ "INFO: RT calculation for wavelength = 601.0 nm\n",
+ "INFO: RT calculation for wavelength = 624.0 nm\n",
+ "INFO: RT calculation for wavelength = 701.0 nm\n",
+ "INFO: RT calculation for wavelength = 649.0 nm\n",
+ "INFO: RT calculation for wavelength = 818.0 nm\n",
+ "INFO: RT calculation for wavelength = 757.0 nm\n",
+ "INFO: RT calculation for wavelength = 884.0 nm\n",
+ "INFO: RT calculation for wavelength = 955.0 nm\n",
+ "INFO: RT calculation for wavelength = 1031.0 nm\n",
+ "INFO: RT calculation for wavelength = 1114.0 nm\n",
+ "INFO: RT calculation for wavelength = 1204.0 nm\n",
+ "INFO: RT calculation for wavelength = 850.0 nm\n",
+ "INFO: RT calculation for wavelength = 674.0 nm\n",
+ "INFO: RT calculation for wavelength = 919.0 nm\n",
+ "INFO: RT calculation for wavelength = 1300.0 nm\n",
+ "INFO: RT calculation for wavelength = 1072.0 nm\n",
+ "INFO: RT calculation for wavelength = 729.0 nm\n",
+ "INFO: RT calculation for wavelength = 787.0 nm\n",
+ "INFO: RT calculation for wavelength = 1251.0 nm\n",
+ "INFO: RT calculation for wavelength = 992.0 nm\n",
+ "INFO: RT calculation for wavelength = 1158.0 nm\n",
+ "INFO: RT calculation for wavelength = 1405.0 nm\n",
+ "INFO: RT calculation for wavelength = 1518.0 nm\n",
+ "INFO: RT calculation for wavelength = 1640.0 nm\n",
+ "INFO: RT calculation for wavelength = 1771.0 nm\n",
+ "INFO: RT calculation for wavelength = 1913.0000000000002 nm\n",
+ "INFO: RT calculation for wavelength = 1352.0 nm\n",
+ "INFO: RT calculation for wavelength = 2067.0 nm\n",
+ "INFO: RT calculation for wavelength = 2233.0 nm\n",
+ "INFO: RT calculation for wavelength = 2412.0 nm\n",
+ "INFO: RT calculation for wavelength = 1704.0 nm\n",
+ "INFO: RT calculation for wavelength = 1577.0 nm\n",
+ "INFO: RT calculation for wavelength = 2815.0 nm\n",
+ "INFO: RT calculation for wavelength = 1989.0 nm\n",
+ "INFO: RT calculation for wavelength = 2606.0 nm\n",
+ "INFO: RT calculation for wavelength = 1460.0 nm\n",
+ "INFO: RT calculation for wavelength = 2149.0 nm\n",
+ "INFO: RT calculation for wavelength = 1841.0 nm\n",
+ "INFO: RT calculation for wavelength = 2321.0 nm\n",
+ "INFO: RT calculation for wavelength = 2507.0 nm\n",
+ "INFO: RT calculation for wavelength = 3041.0 nm\n",
+ "INFO: RT calculation for wavelength = 3286.0 nm\n",
+ "INFO: RT calculation for wavelength = 2926.0 nm\n",
+ "INFO: RT calculation for wavelength = 3549.0 nm\n",
+ "INFO: RT calculation for wavelength = 3834.0 nm\n",
+ "INFO: RT calculation for wavelength = 4142.0 nm\n",
+ "INFO: RT calculation for wavelength = 4475.0 nm\n",
+ "INFO: RT calculation for wavelength = 4834.0 nm\n",
+ "INFO: RT calculation for wavelength = 2709.0 nm\n",
+ "INFO: RT calculation for wavelength = 5222.0 nm\n",
+ "INFO: RT calculation for wavelength = 3161.0 nm\n",
+ "INFO: RT calculation for wavelength = 5641.0 nm\n",
+ "INFO: RT calculation for wavelength = 4305.0 nm\n",
+ "INFO: RT calculation for wavelength = 4651.0 nm\n",
+ "INFO: RT calculation for wavelength = 3415.0 nm\n",
+ "INFO: RT calculation for wavelength = 3689.0 nm\n",
+ "INFO: RT calculation for wavelength = 5428.0 nm\n",
+ "INFO: RT calculation for wavelength = 6094.0 nm\n",
+ "INFO: RT calculation for wavelength = 5024.0 nm\n",
+ "INFO: RT calculation for wavelength = 6583.0 nm\n",
+ "INFO: RT calculation for wavelength = 6842.0 nm\n",
+ "INFO: RT calculation for wavelength = 7112.0 nm\n",
+ "INFO: RT calculation for wavelength = 7392.0 nm\n",
+ "INFO: RT calculation for wavelength = 6334.0 nm\n",
+ "INFO: RT calculation for wavelength = 5863.0 nm\n",
+ "INFO: RT calculation for wavelength = 7683.000000000001 nm\n",
+ "INFO: RT calculation for wavelength = 7985.000000000001 nm\n",
+ "INFO: RT calculation for wavelength = 8300.0 nm\n",
+ "INFO: RT calculation for wavelength = 3985.0 nm\n",
+ "INFO: RT calculation for wavelength = 8626.0 nm\n",
+ "INFO: RT calculation for wavelength = 8966.0 nm\n",
+ "INFO: RT calculation for wavelength = 9319.0 nm\n",
+ "INFO: RT calculation for wavelength = 9686.0 nm\n",
+ "INFO: RT calculation for wavelength = 10067.0 nm\n",
+ "INFO: RT calculation for wavelength = 11303.0 nm\n",
+ "INFO: RT calculation for wavelength = 10875.0 nm\n",
+ "INFO: RT calculation for wavelength = 10463.0 nm\n",
+ "INFO: RT calculation for wavelength = 11748.0 nm\n",
+ "INFO: RT calculation for wavelength = 12210.0 nm\n",
+ "INFO: RT calculation for wavelength = 12691.0 nm\n",
+ "INFO: RT calculation for wavelength = 13191.0 nm\n",
+ "INFO: RT calculation for wavelength = 13710.0 nm\n",
+ "INFO: RT calculation for wavelength = 14250.0 nm\n",
+ "INFO: RT calculation for wavelength = 14811.0 nm\n",
+ "INFO: RT calculation for wavelength = 16000.0 nm\n",
+ "INFO: RT calculation for wavelength = 15393.999999999998 nm\n",
+ "INFO: RT calculation for wavelength = 299.0 nm\n",
+ "INFO: RT calculation for wavelength = 311.0 nm\n",
+ "INFO: RT calculation for wavelength = 324.0 nm\n",
+ "INFO: RT calculation for wavelength = 336.0 nm\n",
+ "INFO: RT calculation for wavelength = 350.0 nm\n",
+ "INFO: RT calculation for wavelength = 363.0 nm\n",
+ "INFO: RT calculation for wavelength = 378.0 nm\n",
+ "INFO: RT calculation for wavelength = 393.0 nm\n",
+ "INFO: RT calculation for wavelength = 408.0 nm\n",
+ "INFO: RT calculation for wavelength = 424.0 nm\n",
+ "INFO: RT calculation for wavelength = 441.0 nm\n",
+ "INFO: RT calculation for wavelength = 476.0 nm\n",
+ "INFO: RT calculation for wavelength = 458.0 nm\n",
+ "INFO: RT calculation for wavelength = 495.0 nm\n",
+ "INFO: RT calculation for wavelength = 515.0 nm\n",
+ "INFO: RT calculation for wavelength = 535.0 nm\n",
+ "INFO: RT calculation for wavelength = 556.0 nm\n",
+ "INFO: RT calculation for wavelength = 578.0 nm\n",
+ "INFO: RT calculation for wavelength = 601.0 nm\n",
+ "INFO: RT calculation for wavelength = 624.0 nm\n",
+ "INFO: RT calculation for wavelength = 649.0 nm\n",
+ "INFO: RT calculation for wavelength = 674.0 nm\n",
+ "INFO: RT calculation for wavelength = 701.0 nm\n",
+ "INFO: RT calculation for wavelength = 729.0 nm\n",
+ "INFO: RT calculation for wavelength = 757.0 nm\n",
+ "INFO: RT calculation for wavelength = 787.0 nm\n",
+ "INFO: RT calculation for wavelength = 818.0 nm\n",
+ "INFO: RT calculation for wavelength = 850.0 nm\n",
+ "INFO: RT calculation for wavelength = 884.0 nm\n",
+ "INFO: RT calculation for wavelength = 919.0 nm\n",
+ "INFO: RT calculation for wavelength = 955.0 nm\n",
+ "INFO: RT calculation for wavelength = 992.0 nm\n",
+ "INFO: RT calculation for wavelength = 1031.0 nm\n",
+ "INFO: RT calculation for wavelength = 1072.0 nm\n",
+ "INFO: RT calculation for wavelength = 1114.0 nm\n",
+ "INFO: RT calculation for wavelength = 1158.0 nm\n",
+ "INFO: RT calculation for wavelength = 1204.0 nm\n",
+ "INFO: RT calculation for wavelength = 1251.0 nm\n",
+ "INFO: RT calculation for wavelength = 1300.0 nm\n",
+ "INFO: RT calculation for wavelength = 1352.0 nm\n",
+ "INFO: RT calculation for wavelength = 1405.0 nm\n",
+ "INFO: RT calculation for wavelength = 1460.0 nm\n",
+ "INFO: RT calculation for wavelength = 1518.0 nm\n",
+ "INFO: RT calculation for wavelength = 1577.0 nm\n",
+ "INFO: RT calculation for wavelength = 1640.0 nm\n",
+ "INFO: RT calculation for wavelength = 1704.0 nm\n",
+ "INFO: RT calculation for wavelength = 1771.0 nm\n",
+ "INFO: RT calculation for wavelength = 1841.0 nm\n",
+ "INFO: RT calculation for wavelength = 1913.0000000000002 nm\n",
+ "INFO: RT calculation for wavelength = 1989.0 nm\n",
+ "INFO: RT calculation for wavelength = 2067.0 nm\n",
+ "INFO: RT calculation for wavelength = 2149.0 nm\n",
+ "INFO: RT calculation for wavelength = 2233.0 nm\n",
+ "INFO: RT calculation for wavelength = 2321.0 nm\n",
+ "INFO: RT calculation for wavelength = 2412.0 nm\n",
+ "INFO: RT calculation for wavelength = 2507.0 nm\n",
+ "INFO: RT calculation for wavelength = 2606.0 nm\n",
+ "INFO: RT calculation for wavelength = 2709.0 nm\n",
+ "INFO: RT calculation for wavelength = 2815.0 nm\n",
+ "INFO: RT calculation for wavelength = 2926.0 nm\n",
+ "INFO: RT calculation for wavelength = 3041.0 nm\n",
+ "INFO: RT calculation for wavelength = 3161.0 nm\n",
+ "INFO: RT calculation for wavelength = 3286.0 nm\n",
+ "INFO: RT calculation for wavelength = 3415.0 nm\n",
+ "INFO: RT calculation for wavelength = 3549.0 nm\n",
+ "INFO: RT calculation for wavelength = 3689.0 nm\n",
+ "INFO: RT calculation for wavelength = 3834.0 nm\n",
+ "INFO: RT calculation for wavelength = 3985.0 nm\n",
+ "INFO: RT calculation for wavelength = 4142.0 nm\n",
+ "INFO: RT calculation for wavelength = 4305.0 nm\n",
+ "INFO: RT calculation for wavelength = 4475.0 nm\n",
+ "INFO: RT calculation for wavelength = 4651.0 nm\n",
+ "INFO: RT calculation for wavelength = 4834.0 nm\n",
+ "INFO: RT calculation for wavelength = 5024.0 nm\n",
+ "INFO: RT calculation for wavelength = 5222.0 nm\n",
+ "INFO: RT calculation for wavelength = 5428.0 nm\n",
+ "INFO: RT calculation for wavelength = 5641.0 nm\n",
+ "INFO: RT calculation for wavelength = 5863.0 nm\n",
+ "INFO: RT calculation for wavelength = 6094.0 nm\n",
+ "INFO: RT calculation for wavelength = 6334.0 nm\n",
+ "INFO: RT calculation for wavelength = 6583.0 nm\n",
+ "INFO: RT calculation for wavelength = 6842.0 nm\n",
+ "INFO: RT calculation for wavelength = 7112.0 nm\n",
+ "INFO: RT calculation for wavelength = 7392.0 nm\n",
+ "INFO: RT calculation for wavelength = 7683.000000000001 nm\n",
+ "INFO: RT calculation for wavelength = 7985.000000000001 nm\n",
+ "INFO: RT calculation for wavelength = 8300.0 nm\n",
+ "INFO: RT calculation for wavelength = 8626.0 nm\n",
+ "INFO: RT calculation for wavelength = 8966.0 nm\n",
+ "INFO: RT calculation for wavelength = 9319.0 nm\n",
+ "INFO: RT calculation for wavelength = 9686.0 nm\n",
+ "INFO: RT calculation for wavelength = 10067.0 nm\n",
+ "INFO: RT calculation for wavelength = 10463.0 nm\n",
+ "INFO: RT calculation for wavelength = 10875.0 nm\n",
+ "INFO: RT calculation for wavelength = 11303.0 nm\n",
+ "INFO: RT calculation for wavelength = 11748.0 nm\n",
+ "INFO: RT calculation for wavelength = 12210.0 nm\n",
+ "INFO: RT calculation for wavelength = 12691.0 nm\n",
+ "INFO: RT calculation for wavelength = 13191.0 nm\n",
+ "INFO: RT calculation for wavelength = 13710.0 nm\n",
+ "INFO: RT calculation for wavelength = 14250.0 nm\n",
+ "INFO: RT calculation for wavelength = 14811.0 nm\n",
+ "INFO: RT calculation for wavelength = 15393.999999999998 nm\n",
+ "INFO: RT calculation for wavelength = 16000.0 nm\n",
+ "INFO: Ray tracing with TMM lookup table for element 2 in structure\n",
+ "INFO: RT calculation for wavelength = 299.0 nm\n",
+ "INFO: RT calculation for wavelength = 311.0 nm\n",
+ "INFO: RT calculation for wavelength = 324.0 nm\n",
+ "INFO: RT calculation for wavelength = 336.0 nm\n",
+ "INFO: RT calculation for wavelength = 350.0 nm\n",
+ "INFO: RT calculation for wavelength = 363.0 nm\n",
+ "INFO: RT calculation for wavelength = 378.0 nm\n",
+ "INFO: RT calculation for wavelength = 424.0 nm\n",
+ "INFO: RT calculation for wavelength = 393.0 nm\n",
+ "INFO: RT calculation for wavelength = 408.0 nm\n",
+ "INFO: RT calculation for wavelength = 441.0 nm\n",
+ "INFO: RT calculation for wavelength = 458.0 nm\n",
+ "INFO: RT calculation for wavelength = 476.0 nm\n",
+ "INFO: RT calculation for wavelength = 495.0 nm\n",
+ "INFO: RT calculation for wavelength = 515.0 nm\n",
+ "INFO: RT calculation for wavelength = 535.0 nm\n",
+ "INFO: RT calculation for wavelength = 556.0 nm\n",
+ "INFO: RT calculation for wavelength = 578.0 nm\n",
+ "INFO: RT calculation for wavelength = 601.0 nm\n",
+ "INFO: RT calculation for wavelength = 624.0 nm\n",
+ "INFO: RT calculation for wavelength = 649.0 nm\n",
+ "INFO: RT calculation for wavelength = 674.0 nm\n",
+ "INFO: RT calculation for wavelength = 701.0 nm\n",
+ "INFO: RT calculation for wavelength = 729.0 nm\n",
+ "INFO: RT calculation for wavelength = 757.0 nm\n",
+ "INFO: RT calculation for wavelength = 787.0 nm\n",
+ "INFO: RT calculation for wavelength = 818.0 nm\n",
+ "INFO: RT calculation for wavelength = 850.0 nm\n",
+ "INFO: RT calculation for wavelength = 884.0 nm\n",
+ "INFO: RT calculation for wavelength = 919.0 nm\n",
+ "INFO: RT calculation for wavelength = 955.0 nm\n",
+ "INFO: RT calculation for wavelength = 992.0 nm\n",
+ "INFO: RT calculation for wavelength = 1031.0 nm\n",
+ "INFO: RT calculation for wavelength = 1072.0 nm\n",
+ "INFO: RT calculation for wavelength = 1114.0 nm\n",
+ "INFO: RT calculation for wavelength = 1158.0 nm\n",
+ "INFO: RT calculation for wavelength = 1204.0 nm\n",
+ "INFO: RT calculation for wavelength = 1251.0 nm\n",
+ "INFO: RT calculation for wavelength = 1300.0 nm\n",
+ "INFO: RT calculation for wavelength = 1352.0 nm\n",
+ "INFO: RT calculation for wavelength = 1405.0 nm\n",
+ "INFO: RT calculation for wavelength = 1460.0 nm\n",
+ "INFO: RT calculation for wavelength = 1518.0 nm\n",
+ "INFO: RT calculation for wavelength = 1577.0 nm\n",
+ "INFO: RT calculation for wavelength = 1640.0 nm\n",
+ "INFO: RT calculation for wavelength = 1704.0 nm\n",
+ "INFO: RT calculation for wavelength = 1771.0 nm\n",
+ "INFO: RT calculation for wavelength = 1841.0 nm\n",
+ "INFO: RT calculation for wavelength = 1913.0000000000002 nm\n",
+ "INFO: RT calculation for wavelength = 1989.0 nm\n",
+ "INFO: RT calculation for wavelength = 2067.0 nm\n",
+ "INFO: RT calculation for wavelength = 2149.0 nm\n",
+ "INFO: RT calculation for wavelength = 2233.0 nm\n",
+ "INFO: RT calculation for wavelength = 2321.0 nm\n",
+ "INFO: RT calculation for wavelength = 2412.0 nm\n",
+ "INFO: RT calculation for wavelength = 2507.0 nm\n",
+ "INFO: RT calculation for wavelength = 2606.0 nm\n",
+ "INFO: RT calculation for wavelength = 2709.0 nm\n",
+ "INFO: RT calculation for wavelength = 2815.0 nm\n",
+ "INFO: RT calculation for wavelength = 2926.0 nm\n",
+ "INFO: RT calculation for wavelength = 3161.0 nm\n",
+ "INFO: RT calculation for wavelength = 3041.0 nm\n",
+ "INFO: RT calculation for wavelength = 3286.0 nm\n",
+ "INFO: RT calculation for wavelength = 3415.0 nm\n",
+ "INFO: RT calculation for wavelength = 3549.0 nm\n",
+ "INFO: RT calculation for wavelength = 3689.0 nm\n",
+ "INFO: RT calculation for wavelength = 3834.0 nm\n",
+ "INFO: RT calculation for wavelength = 3985.0 nm\n",
+ "INFO: RT calculation for wavelength = 4142.0 nm\n",
+ "INFO: RT calculation for wavelength = 4305.0 nm\n",
+ "INFO: RT calculation for wavelength = 4475.0 nm\n",
+ "INFO: RT calculation for wavelength = 4651.0 nm\n",
+ "INFO: RT calculation for wavelength = 4834.0 nm\n",
+ "INFO: RT calculation for wavelength = 5024.0 nm\n",
+ "INFO: RT calculation for wavelength = 5222.0 nm\n",
+ "INFO: RT calculation for wavelength = 5428.0 nm\n",
+ "INFO: RT calculation for wavelength = 5641.0 nm\n",
+ "INFO: RT calculation for wavelength = 5863.0 nm\n",
+ "INFO: RT calculation for wavelength = 6094.0 nm\n",
+ "INFO: RT calculation for wavelength = 6334.0 nm\n",
+ "INFO: RT calculation for wavelength = 6583.0 nm\n",
+ "INFO: RT calculation for wavelength = 6842.0 nm\n",
+ "INFO: RT calculation for wavelength = 7112.0 nm\n",
+ "INFO: RT calculation for wavelength = 7392.0 nm\n",
+ "INFO: RT calculation for wavelength = 7985.000000000001 nm\n",
+ "INFO: RT calculation for wavelength = 7683.000000000001 nm\n",
+ "INFO: RT calculation for wavelength = 8300.0 nm\n",
+ "INFO: RT calculation for wavelength = 8626.0 nm\n",
+ "INFO: RT calculation for wavelength = 8966.0 nm\n",
+ "INFO: RT calculation for wavelength = 9319.0 nm\n",
+ "INFO: RT calculation for wavelength = 9686.0 nm\n",
+ "INFO: RT calculation for wavelength = 10067.0 nm\n",
+ "INFO: RT calculation for wavelength = 10463.0 nm\n",
+ "INFO: RT calculation for wavelength = 10875.0 nm\n",
+ "INFO: RT calculation for wavelength = 11303.0 nm\n",
+ "INFO: RT calculation for wavelength = 11748.0 nm\n",
+ "INFO: RT calculation for wavelength = 12210.0 nm\n",
+ "INFO: RT calculation for wavelength = 12691.0 nm\n",
+ "INFO: RT calculation for wavelength = 13191.0 nm\n",
+ "INFO: RT calculation for wavelength = 13710.0 nm\n",
+ "INFO: RT calculation for wavelength = 14250.0 nm\n",
+ "INFO: RT calculation for wavelength = 14811.0 nm\n",
+ "INFO: RT calculation for wavelength = 15393.999999999998 nm\n",
+ "INFO: RT calculation for wavelength = 16000.0 nm\n",
+ "INFO: After iteration 1: maximum power fraction remaining = 0.6263919217313435\n",
+ "INFO: After iteration 2: maximum power fraction remaining = 0.38956713166279705\n",
+ "INFO: After iteration 3: maximum power fraction remaining = 0.24515482469704067\n",
+ "INFO: After iteration 4: maximum power fraction remaining = 0.15418570734748918\n",
+ "INFO: After iteration 5: maximum power fraction remaining = 0.09678801368316606\n",
+ "INFO: After iteration 6: maximum power fraction remaining = 0.06066147968810933\n",
+ "INFO: After iteration 7: maximum power fraction remaining = 0.03797784796825294\n",
+ "INFO: After iteration 8: maximum power fraction remaining = 0.023759689844090878\n",
+ "INFO: After iteration 9: maximum power fraction remaining = 0.014857958555146896\n",
+ "INFO: After iteration 10: maximum power fraction remaining = 0.009367916110272037\n"
]
}
],
@@ -244,21 +569,23 @@
},
{
"cell_type": "code",
- "execution_count": 6,
+ "execution_count": 18,
"metadata": {
"pycharm": {
"name": "#%%\n"
+ },
+ "ExecuteTime": {
+ "end_time": "2024-09-21T17:51:37.458552Z",
+ "start_time": "2024-09-21T17:51:37.318643Z"
}
},
"outputs": [
{
"data": {
- "text/plain": "