├── tests ├── __init__.py ├── test_Sellmeier.py ├── test_SystemGrids.py ├── test_MatUtils.py ├── test_CustomLogger.py ├── test_FitGauss.py ├── test_SystemPaths.py ├── test_SystemEfficiencies.py ├── test_RayTraceUtils.py ├── test_NumberingOfElements.py └── test_SystemDictsAndAddElements.py ├── src ├── GUI │ ├── __init__.py │ ├── ParameterForms │ │ ├── __init__.py │ │ └── inputWidgetInterfaces.py │ ├── resources │ │ ├── logo.png │ │ └── logo_dark_bg.png │ ├── PlotScreen.py │ ├── utils.py │ └── Accordion.py ├── PyPO │ ├── __init__.py │ ├── PlotConfig.py │ ├── Config.py │ ├── WorldParam.py │ ├── Threadmgr.py │ ├── BindRefl.py │ ├── Sellmeier.py │ └── BindTransf.py ├── common │ ├── Transform.h │ ├── InterfaceReflector.h │ ├── InterfaceBeam.h │ └── Transform.cpp ├── CUDA │ ├── Debug.h │ └── InterfaceCUDA.h ├── CMakeLists.txt ├── SetupGTest.py └── include │ └── Random.h ├── .gitattributes ├── docs ├── bc_s.png ├── bc_sd.png ├── nav_f.png ├── nav_g.png ├── nav_h.png ├── open.png ├── tab_a.png ├── tab_b.png ├── tab_h.png ├── tab_s.png ├── closed.png ├── nav_fd.png ├── nav_hd.png ├── par_uv.png ├── par_xy.png ├── splitbar.png ├── sync_off.png ├── sync_on.png ├── tab_ad.png ├── tab_bd.png ├── tab_hd.png ├── tab_sd.png ├── par_uv_gc.png ├── splitbard.png ├── par_uv_07_45.png ├── search │ ├── pages_6.js │ ├── files_6.js │ ├── all_10.js │ ├── files_0.js │ ├── classes_1.js │ ├── groups_0.js │ ├── pages_0.js │ ├── pages_8.js │ ├── pages_a.js │ ├── namespaces_0.js │ ├── groups_b.js │ ├── groups_3.js │ ├── classes_7.js │ ├── files_e.js │ ├── groups_1.js │ ├── files_3.js │ ├── functions_11.js │ ├── functions_13.js │ ├── pages_4.js │ ├── variables_6.js │ ├── all_a.js │ ├── files_8.js │ ├── classes_10.js │ ├── files_f.js │ ├── pages_3.js │ ├── classes_e.js │ ├── pages_b.js │ ├── functions_12.js │ ├── files_b.js │ ├── pages_1.js │ ├── variables_4.js │ ├── groups_a.js │ ├── files_2.js │ ├── groups_4.js │ ├── groups_2.js │ ├── groups_9.js │ ├── pages_5.js │ ├── files_d.js │ ├── files_5.js │ ├── files_4.js │ ├── all_15.js │ ├── pages_c.js │ ├── groups_6.js │ ├── files_9.js │ ├── classes_f.js │ ├── variables_a.js │ ├── variables_b.js │ ├── groups_7.js │ ├── pages_7.js │ ├── variables_f.js │ ├── classes_d.js │ ├── files_a.js │ ├── variables_1.js │ ├── classes_a.js │ ├── pages_2.js │ ├── classes_3.js │ ├── functions_2.js │ ├── pages_9.js │ ├── groups_5.js │ ├── groups_8.js │ ├── files_c.js │ ├── files_1.js │ ├── variables_3.js │ ├── all_19.js │ ├── variables_d.js │ ├── variables_13.js │ ├── classes_4.js │ ├── variables_5.js │ ├── searchdata.js │ ├── variables_10.js │ ├── variables_8.js │ ├── files_7.js │ ├── functions_8.js │ ├── mag.svg │ ├── mag_d.svg │ ├── variables_2.js │ ├── classes_6.js │ ├── classes_8.js │ ├── variables_e.js │ ├── functions_c.js │ ├── classes_0.js │ ├── close.svg │ ├── functions_a.js │ ├── variables_0.js │ ├── all_18.js │ ├── variables_11.js │ ├── variables_12.js │ ├── classes_5.js │ ├── mag_sel.svg │ ├── mag_seld.svg │ ├── all_14.js │ ├── classes_9.js │ ├── all_17.js │ ├── all_8.js │ ├── all_16.js │ ├── all_e.js │ ├── all_2.js │ ├── variables_9.js │ ├── classes_c.js │ ├── functions_6.js │ ├── all_b.js │ ├── classes_b.js │ ├── classes_2.js │ ├── all_d.js │ ├── functions_4.js │ └── functions_10.js ├── Gui │ └── README_Resources │ │ ├── blankGui.png │ │ ├── fr2_plot.png │ │ ├── fr2_plot2.png │ │ ├── pri_form.png │ │ ├── pri_plot.png │ │ ├── tooltips.png │ │ ├── frame_form.png │ │ ├── frame_plot.png │ │ ├── frame_plot2.png │ │ ├── options_plot.png │ │ ├── emptyFieldErr.png │ │ ├── foc_frame_plot.png │ │ ├── ResourcesT2 │ │ ├── prop1.png │ │ ├── prop2.png │ │ ├── prop3.png │ │ ├── prop4.png │ │ ├── t2Pl.png │ │ ├── pltRot.png │ │ ├── rePlot.png │ │ ├── saveSys.png │ │ ├── system.png │ │ ├── t2Plout.png │ │ ├── t2ellip.png │ │ ├── t2para.png │ │ ├── GaussPlot.png │ │ ├── focusFound.png │ │ ├── initGauss.png │ │ ├── ploutRot.png │ │ ├── ploutTrans.png │ │ └── gaussTranslation.png │ │ ├── ResourcesT3 │ │ ├── last.png │ │ ├── EH_plot.png │ │ ├── loadSys.png │ │ ├── newPar.png │ │ ├── pl_foc.png │ │ ├── planeFF.png │ │ ├── poProp1.png │ │ ├── poProp2.png │ │ ├── poProp3.png │ │ ├── propFF.png │ │ ├── ffAmpOnly.png │ │ ├── fieldPlot.png │ │ ├── noisyField.png │ │ ├── poProp1.5.png │ │ ├── removeElem.png │ │ ├── transFocPl.png │ │ ├── beamCreated.png │ │ └── gaussBeamForm.png │ │ ├── frame_transform.png │ │ ├── frame_transrform.png │ │ ├── make_tube_frame.png │ │ ├── parabolaGenerated.png │ │ └── prop_frame_form.png ├── minus.svg ├── minusd.svg ├── plus.svg ├── plusd.svg ├── navtreeindex0.js ├── index.js ├── doc.svg ├── docd.svg ├── folderclosed.svg ├── folderclosedd.svg ├── navtreedata.js ├── cookie.js ├── navtree.css ├── folderopend.svg └── clipboard.js ├── doxy ├── resources │ ├── par_uv.png │ ├── par_xy.png │ ├── par_uv_gc.png │ └── par_uv_07_45.png ├── PubAPITypes.dox ├── PubAPITemplates.dox ├── PubAPIFrameMeths.dox ├── PubAPIReflMeths.dox ├── PubAPIPOMeths.dox ├── PubAPIHybrid.dox ├── PubAPISystemPaths.dox ├── PubAPIVisualisation.dox ├── PubAPICommon.dox ├── Explanations.dox ├── PubAPIArgOpts.dox ├── Demo.dox ├── Documentation.dox ├── CommonIssues.dox ├── BasicTut2.dox └── Tutorial.dox ├── tutorials └── Gui │ └── README_Resources │ ├── blankGui.png │ ├── fr2_plot.png │ ├── fr2_plot2.png │ ├── pri_form.png │ ├── pri_plot.png │ ├── tooltips.png │ ├── frame_form.png │ ├── frame_plot.png │ ├── frame_plot2.png │ ├── options_plot.png │ ├── emptyFieldErr.png │ ├── foc_frame_plot.png │ ├── ResourcesT2 │ ├── prop1.png │ ├── prop2.png │ ├── prop3.png │ ├── prop4.png │ ├── t2Pl.png │ ├── pltRot.png │ ├── rePlot.png │ ├── saveSys.png │ ├── system.png │ ├── t2Plout.png │ ├── t2ellip.png │ ├── t2para.png │ ├── GaussPlot.png │ ├── focusFound.png │ ├── initGauss.png │ ├── ploutRot.png │ ├── ploutTrans.png │ └── gaussTranslation.png │ ├── ResourcesT3 │ ├── last.png │ ├── EH_plot.png │ ├── loadSys.png │ ├── newPar.png │ ├── pl_foc.png │ ├── planeFF.png │ ├── poProp1.png │ ├── poProp2.png │ ├── poProp3.png │ ├── propFF.png │ ├── ffAmpOnly.png │ ├── fieldPlot.png │ ├── noisyField.png │ ├── poProp1.5.png │ ├── removeElem.png │ ├── transFocPl.png │ ├── beamCreated.png │ └── gaussBeamForm.png │ ├── frame_transform.png │ ├── frame_transrform.png │ ├── make_tube_frame.png │ ├── parabolaGenerated.png │ └── prop_frame_form.png ├── MANIFEST.in ├── .coveragerc ├── GuiApp.py ├── README.md ├── LICENSE ├── CITATION.cff ├── CMakeLists.txt └── setup.py /tests/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/GUI/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/PyPO/__init__.py: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /src/GUI/ParameterForms/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | *.ipynb linguist-vendored 2 | -------------------------------------------------------------------------------- /docs/bc_s.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PyPO-dev/PyPO/HEAD/docs/bc_s.png -------------------------------------------------------------------------------- /docs/bc_sd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PyPO-dev/PyPO/HEAD/docs/bc_sd.png -------------------------------------------------------------------------------- /docs/nav_f.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PyPO-dev/PyPO/HEAD/docs/nav_f.png -------------------------------------------------------------------------------- /docs/nav_g.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PyPO-dev/PyPO/HEAD/docs/nav_g.png -------------------------------------------------------------------------------- /docs/nav_h.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PyPO-dev/PyPO/HEAD/docs/nav_h.png -------------------------------------------------------------------------------- /docs/open.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PyPO-dev/PyPO/HEAD/docs/open.png -------------------------------------------------------------------------------- /docs/tab_a.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PyPO-dev/PyPO/HEAD/docs/tab_a.png -------------------------------------------------------------------------------- /docs/tab_b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PyPO-dev/PyPO/HEAD/docs/tab_b.png -------------------------------------------------------------------------------- /docs/tab_h.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PyPO-dev/PyPO/HEAD/docs/tab_h.png -------------------------------------------------------------------------------- /docs/tab_s.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PyPO-dev/PyPO/HEAD/docs/tab_s.png -------------------------------------------------------------------------------- /docs/closed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PyPO-dev/PyPO/HEAD/docs/closed.png -------------------------------------------------------------------------------- /docs/nav_fd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PyPO-dev/PyPO/HEAD/docs/nav_fd.png -------------------------------------------------------------------------------- /docs/nav_hd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PyPO-dev/PyPO/HEAD/docs/nav_hd.png -------------------------------------------------------------------------------- /docs/par_uv.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PyPO-dev/PyPO/HEAD/docs/par_uv.png -------------------------------------------------------------------------------- /docs/par_xy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PyPO-dev/PyPO/HEAD/docs/par_xy.png -------------------------------------------------------------------------------- /docs/splitbar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PyPO-dev/PyPO/HEAD/docs/splitbar.png -------------------------------------------------------------------------------- /docs/sync_off.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PyPO-dev/PyPO/HEAD/docs/sync_off.png -------------------------------------------------------------------------------- /docs/sync_on.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PyPO-dev/PyPO/HEAD/docs/sync_on.png -------------------------------------------------------------------------------- /docs/tab_ad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PyPO-dev/PyPO/HEAD/docs/tab_ad.png -------------------------------------------------------------------------------- /docs/tab_bd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PyPO-dev/PyPO/HEAD/docs/tab_bd.png -------------------------------------------------------------------------------- /docs/tab_hd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PyPO-dev/PyPO/HEAD/docs/tab_hd.png -------------------------------------------------------------------------------- /docs/tab_sd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PyPO-dev/PyPO/HEAD/docs/tab_sd.png -------------------------------------------------------------------------------- /docs/par_uv_gc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PyPO-dev/PyPO/HEAD/docs/par_uv_gc.png -------------------------------------------------------------------------------- /docs/splitbard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PyPO-dev/PyPO/HEAD/docs/splitbard.png -------------------------------------------------------------------------------- /docs/par_uv_07_45.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PyPO-dev/PyPO/HEAD/docs/par_uv_07_45.png -------------------------------------------------------------------------------- /doxy/resources/par_uv.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PyPO-dev/PyPO/HEAD/doxy/resources/par_uv.png -------------------------------------------------------------------------------- /doxy/resources/par_xy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PyPO-dev/PyPO/HEAD/doxy/resources/par_xy.png -------------------------------------------------------------------------------- /src/GUI/resources/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PyPO-dev/PyPO/HEAD/src/GUI/resources/logo.png -------------------------------------------------------------------------------- /docs/search/pages_6.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['home_0',['Home',['../index.html',1,'']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /doxy/resources/par_uv_gc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PyPO-dev/PyPO/HEAD/doxy/resources/par_uv_gc.png -------------------------------------------------------------------------------- /doxy/resources/par_uv_07_45.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PyPO-dev/PyPO/HEAD/doxy/resources/par_uv_07_45.png -------------------------------------------------------------------------------- /docs/search/files_6.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['gutils_2eh_0',['GUtils.h',['../GUtils_8h.html',1,'']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /src/GUI/resources/logo_dark_bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PyPO-dev/PyPO/HEAD/src/GUI/resources/logo_dark_bg.png -------------------------------------------------------------------------------- /docs/Gui/README_Resources/blankGui.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PyPO-dev/PyPO/HEAD/docs/Gui/README_Resources/blankGui.png -------------------------------------------------------------------------------- /docs/Gui/README_Resources/fr2_plot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PyPO-dev/PyPO/HEAD/docs/Gui/README_Resources/fr2_plot.png -------------------------------------------------------------------------------- /docs/Gui/README_Resources/fr2_plot2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PyPO-dev/PyPO/HEAD/docs/Gui/README_Resources/fr2_plot2.png -------------------------------------------------------------------------------- /docs/Gui/README_Resources/pri_form.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PyPO-dev/PyPO/HEAD/docs/Gui/README_Resources/pri_form.png -------------------------------------------------------------------------------- /docs/Gui/README_Resources/pri_plot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PyPO-dev/PyPO/HEAD/docs/Gui/README_Resources/pri_plot.png -------------------------------------------------------------------------------- /docs/Gui/README_Resources/tooltips.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PyPO-dev/PyPO/HEAD/docs/Gui/README_Resources/tooltips.png -------------------------------------------------------------------------------- /docs/Gui/README_Resources/frame_form.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PyPO-dev/PyPO/HEAD/docs/Gui/README_Resources/frame_form.png -------------------------------------------------------------------------------- /docs/Gui/README_Resources/frame_plot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PyPO-dev/PyPO/HEAD/docs/Gui/README_Resources/frame_plot.png -------------------------------------------------------------------------------- /docs/Gui/README_Resources/frame_plot2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PyPO-dev/PyPO/HEAD/docs/Gui/README_Resources/frame_plot2.png -------------------------------------------------------------------------------- /docs/Gui/README_Resources/options_plot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PyPO-dev/PyPO/HEAD/docs/Gui/README_Resources/options_plot.png -------------------------------------------------------------------------------- /docs/search/all_10.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['qt_20errors_0',['Qt Errors',['../common_issues.html#qterrors',1,'']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /docs/search/files_0.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['accordion_2epy_0',['Accordion.py',['../Accordion_8py.html',1,'']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /docs/Gui/README_Resources/emptyFieldErr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PyPO-dev/PyPO/HEAD/docs/Gui/README_Resources/emptyFieldErr.png -------------------------------------------------------------------------------- /docs/Gui/README_Resources/foc_frame_plot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PyPO-dev/PyPO/HEAD/docs/Gui/README_Resources/foc_frame_plot.png -------------------------------------------------------------------------------- /tutorials/Gui/README_Resources/blankGui.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PyPO-dev/PyPO/HEAD/tutorials/Gui/README_Resources/blankGui.png -------------------------------------------------------------------------------- /tutorials/Gui/README_Resources/fr2_plot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PyPO-dev/PyPO/HEAD/tutorials/Gui/README_Resources/fr2_plot.png -------------------------------------------------------------------------------- /tutorials/Gui/README_Resources/fr2_plot2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PyPO-dev/PyPO/HEAD/tutorials/Gui/README_Resources/fr2_plot2.png -------------------------------------------------------------------------------- /tutorials/Gui/README_Resources/pri_form.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PyPO-dev/PyPO/HEAD/tutorials/Gui/README_Resources/pri_form.png -------------------------------------------------------------------------------- /tutorials/Gui/README_Resources/pri_plot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PyPO-dev/PyPO/HEAD/tutorials/Gui/README_Resources/pri_plot.png -------------------------------------------------------------------------------- /tutorials/Gui/README_Resources/tooltips.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PyPO-dev/PyPO/HEAD/tutorials/Gui/README_Resources/tooltips.png -------------------------------------------------------------------------------- /docs/Gui/README_Resources/ResourcesT2/prop1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PyPO-dev/PyPO/HEAD/docs/Gui/README_Resources/ResourcesT2/prop1.png -------------------------------------------------------------------------------- /docs/Gui/README_Resources/ResourcesT2/prop2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PyPO-dev/PyPO/HEAD/docs/Gui/README_Resources/ResourcesT2/prop2.png -------------------------------------------------------------------------------- /docs/Gui/README_Resources/ResourcesT2/prop3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PyPO-dev/PyPO/HEAD/docs/Gui/README_Resources/ResourcesT2/prop3.png -------------------------------------------------------------------------------- /docs/Gui/README_Resources/ResourcesT2/prop4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PyPO-dev/PyPO/HEAD/docs/Gui/README_Resources/ResourcesT2/prop4.png -------------------------------------------------------------------------------- /docs/Gui/README_Resources/ResourcesT2/t2Pl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PyPO-dev/PyPO/HEAD/docs/Gui/README_Resources/ResourcesT2/t2Pl.png -------------------------------------------------------------------------------- /docs/Gui/README_Resources/ResourcesT3/last.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PyPO-dev/PyPO/HEAD/docs/Gui/README_Resources/ResourcesT3/last.png -------------------------------------------------------------------------------- /docs/Gui/README_Resources/frame_transform.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PyPO-dev/PyPO/HEAD/docs/Gui/README_Resources/frame_transform.png -------------------------------------------------------------------------------- /docs/Gui/README_Resources/frame_transrform.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PyPO-dev/PyPO/HEAD/docs/Gui/README_Resources/frame_transrform.png -------------------------------------------------------------------------------- /docs/Gui/README_Resources/make_tube_frame.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PyPO-dev/PyPO/HEAD/docs/Gui/README_Resources/make_tube_frame.png -------------------------------------------------------------------------------- /docs/Gui/README_Resources/parabolaGenerated.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PyPO-dev/PyPO/HEAD/docs/Gui/README_Resources/parabolaGenerated.png -------------------------------------------------------------------------------- /docs/Gui/README_Resources/prop_frame_form.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PyPO-dev/PyPO/HEAD/docs/Gui/README_Resources/prop_frame_form.png -------------------------------------------------------------------------------- /docs/search/classes_1.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['bk7_0',['BK7',['../classPyPO_1_1Sellmeier_1_1BK7.html',1,'PyPO::Sellmeier']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /tutorials/Gui/README_Resources/frame_form.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PyPO-dev/PyPO/HEAD/tutorials/Gui/README_Resources/frame_form.png -------------------------------------------------------------------------------- /tutorials/Gui/README_Resources/frame_plot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PyPO-dev/PyPO/HEAD/tutorials/Gui/README_Resources/frame_plot.png -------------------------------------------------------------------------------- /tutorials/Gui/README_Resources/frame_plot2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PyPO-dev/PyPO/HEAD/tutorials/Gui/README_Resources/frame_plot2.png -------------------------------------------------------------------------------- /tutorials/Gui/README_Resources/options_plot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PyPO-dev/PyPO/HEAD/tutorials/Gui/README_Resources/options_plot.png -------------------------------------------------------------------------------- /docs/Gui/README_Resources/ResourcesT2/pltRot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PyPO-dev/PyPO/HEAD/docs/Gui/README_Resources/ResourcesT2/pltRot.png -------------------------------------------------------------------------------- /docs/Gui/README_Resources/ResourcesT2/rePlot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PyPO-dev/PyPO/HEAD/docs/Gui/README_Resources/ResourcesT2/rePlot.png -------------------------------------------------------------------------------- /docs/Gui/README_Resources/ResourcesT2/saveSys.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PyPO-dev/PyPO/HEAD/docs/Gui/README_Resources/ResourcesT2/saveSys.png -------------------------------------------------------------------------------- /docs/Gui/README_Resources/ResourcesT2/system.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PyPO-dev/PyPO/HEAD/docs/Gui/README_Resources/ResourcesT2/system.png -------------------------------------------------------------------------------- /docs/Gui/README_Resources/ResourcesT2/t2Plout.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PyPO-dev/PyPO/HEAD/docs/Gui/README_Resources/ResourcesT2/t2Plout.png -------------------------------------------------------------------------------- /docs/Gui/README_Resources/ResourcesT2/t2ellip.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PyPO-dev/PyPO/HEAD/docs/Gui/README_Resources/ResourcesT2/t2ellip.png -------------------------------------------------------------------------------- /docs/Gui/README_Resources/ResourcesT2/t2para.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PyPO-dev/PyPO/HEAD/docs/Gui/README_Resources/ResourcesT2/t2para.png -------------------------------------------------------------------------------- /docs/Gui/README_Resources/ResourcesT3/EH_plot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PyPO-dev/PyPO/HEAD/docs/Gui/README_Resources/ResourcesT3/EH_plot.png -------------------------------------------------------------------------------- /docs/Gui/README_Resources/ResourcesT3/loadSys.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PyPO-dev/PyPO/HEAD/docs/Gui/README_Resources/ResourcesT3/loadSys.png -------------------------------------------------------------------------------- /docs/Gui/README_Resources/ResourcesT3/newPar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PyPO-dev/PyPO/HEAD/docs/Gui/README_Resources/ResourcesT3/newPar.png -------------------------------------------------------------------------------- /docs/Gui/README_Resources/ResourcesT3/pl_foc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PyPO-dev/PyPO/HEAD/docs/Gui/README_Resources/ResourcesT3/pl_foc.png -------------------------------------------------------------------------------- /docs/Gui/README_Resources/ResourcesT3/planeFF.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PyPO-dev/PyPO/HEAD/docs/Gui/README_Resources/ResourcesT3/planeFF.png -------------------------------------------------------------------------------- /docs/Gui/README_Resources/ResourcesT3/poProp1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PyPO-dev/PyPO/HEAD/docs/Gui/README_Resources/ResourcesT3/poProp1.png -------------------------------------------------------------------------------- /docs/Gui/README_Resources/ResourcesT3/poProp2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PyPO-dev/PyPO/HEAD/docs/Gui/README_Resources/ResourcesT3/poProp2.png -------------------------------------------------------------------------------- /docs/Gui/README_Resources/ResourcesT3/poProp3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PyPO-dev/PyPO/HEAD/docs/Gui/README_Resources/ResourcesT3/poProp3.png -------------------------------------------------------------------------------- /docs/Gui/README_Resources/ResourcesT3/propFF.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PyPO-dev/PyPO/HEAD/docs/Gui/README_Resources/ResourcesT3/propFF.png -------------------------------------------------------------------------------- /tutorials/Gui/README_Resources/emptyFieldErr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PyPO-dev/PyPO/HEAD/tutorials/Gui/README_Resources/emptyFieldErr.png -------------------------------------------------------------------------------- /tutorials/Gui/README_Resources/foc_frame_plot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PyPO-dev/PyPO/HEAD/tutorials/Gui/README_Resources/foc_frame_plot.png -------------------------------------------------------------------------------- /docs/Gui/README_Resources/ResourcesT2/GaussPlot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PyPO-dev/PyPO/HEAD/docs/Gui/README_Resources/ResourcesT2/GaussPlot.png -------------------------------------------------------------------------------- /docs/Gui/README_Resources/ResourcesT2/focusFound.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PyPO-dev/PyPO/HEAD/docs/Gui/README_Resources/ResourcesT2/focusFound.png -------------------------------------------------------------------------------- /docs/Gui/README_Resources/ResourcesT2/initGauss.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PyPO-dev/PyPO/HEAD/docs/Gui/README_Resources/ResourcesT2/initGauss.png -------------------------------------------------------------------------------- /docs/Gui/README_Resources/ResourcesT2/ploutRot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PyPO-dev/PyPO/HEAD/docs/Gui/README_Resources/ResourcesT2/ploutRot.png -------------------------------------------------------------------------------- /docs/Gui/README_Resources/ResourcesT2/ploutTrans.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PyPO-dev/PyPO/HEAD/docs/Gui/README_Resources/ResourcesT2/ploutTrans.png -------------------------------------------------------------------------------- /docs/Gui/README_Resources/ResourcesT3/ffAmpOnly.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PyPO-dev/PyPO/HEAD/docs/Gui/README_Resources/ResourcesT3/ffAmpOnly.png -------------------------------------------------------------------------------- /docs/Gui/README_Resources/ResourcesT3/fieldPlot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PyPO-dev/PyPO/HEAD/docs/Gui/README_Resources/ResourcesT3/fieldPlot.png -------------------------------------------------------------------------------- /docs/Gui/README_Resources/ResourcesT3/noisyField.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PyPO-dev/PyPO/HEAD/docs/Gui/README_Resources/ResourcesT3/noisyField.png -------------------------------------------------------------------------------- /docs/Gui/README_Resources/ResourcesT3/poProp1.5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PyPO-dev/PyPO/HEAD/docs/Gui/README_Resources/ResourcesT3/poProp1.5.png -------------------------------------------------------------------------------- /docs/Gui/README_Resources/ResourcesT3/removeElem.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PyPO-dev/PyPO/HEAD/docs/Gui/README_Resources/ResourcesT3/removeElem.png -------------------------------------------------------------------------------- /docs/Gui/README_Resources/ResourcesT3/transFocPl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PyPO-dev/PyPO/HEAD/docs/Gui/README_Resources/ResourcesT3/transFocPl.png -------------------------------------------------------------------------------- /docs/search/groups_0.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['arguments_0',['Special Option Arguments',['../group__public__api__argopts.html',1,'']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /docs/search/pages_0.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['and_20parameterisations_0',['Gridding And Parameterisations',['../basictut4.html',1,'']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /docs/search/pages_8.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['more_20pypo_20dataclasses_0',['Some More PyPO Dataclasses',['../basictut5.html',1,'']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /docs/search/pages_a.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['reflectors_20elements_0',['Generating Reflectors/Elements',['../basictut3.html',1,'']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /tutorials/Gui/README_Resources/ResourcesT2/prop1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PyPO-dev/PyPO/HEAD/tutorials/Gui/README_Resources/ResourcesT2/prop1.png -------------------------------------------------------------------------------- /tutorials/Gui/README_Resources/ResourcesT2/prop2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PyPO-dev/PyPO/HEAD/tutorials/Gui/README_Resources/ResourcesT2/prop2.png -------------------------------------------------------------------------------- /tutorials/Gui/README_Resources/ResourcesT2/prop3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PyPO-dev/PyPO/HEAD/tutorials/Gui/README_Resources/ResourcesT2/prop3.png -------------------------------------------------------------------------------- /tutorials/Gui/README_Resources/ResourcesT2/prop4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PyPO-dev/PyPO/HEAD/tutorials/Gui/README_Resources/ResourcesT2/prop4.png -------------------------------------------------------------------------------- /tutorials/Gui/README_Resources/ResourcesT2/t2Pl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PyPO-dev/PyPO/HEAD/tutorials/Gui/README_Resources/ResourcesT2/t2Pl.png -------------------------------------------------------------------------------- /tutorials/Gui/README_Resources/ResourcesT3/last.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PyPO-dev/PyPO/HEAD/tutorials/Gui/README_Resources/ResourcesT3/last.png -------------------------------------------------------------------------------- /tutorials/Gui/README_Resources/frame_transform.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PyPO-dev/PyPO/HEAD/tutorials/Gui/README_Resources/frame_transform.png -------------------------------------------------------------------------------- /tutorials/Gui/README_Resources/frame_transrform.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PyPO-dev/PyPO/HEAD/tutorials/Gui/README_Resources/frame_transrform.png -------------------------------------------------------------------------------- /tutorials/Gui/README_Resources/make_tube_frame.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PyPO-dev/PyPO/HEAD/tutorials/Gui/README_Resources/make_tube_frame.png -------------------------------------------------------------------------------- /tutorials/Gui/README_Resources/parabolaGenerated.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PyPO-dev/PyPO/HEAD/tutorials/Gui/README_Resources/parabolaGenerated.png -------------------------------------------------------------------------------- /tutorials/Gui/README_Resources/prop_frame_form.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PyPO-dev/PyPO/HEAD/tutorials/Gui/README_Resources/prop_frame_form.png -------------------------------------------------------------------------------- /docs/Gui/README_Resources/ResourcesT3/beamCreated.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PyPO-dev/PyPO/HEAD/docs/Gui/README_Resources/ResourcesT3/beamCreated.png -------------------------------------------------------------------------------- /docs/search/namespaces_0.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['pypo_3a_3athreadmgr_0',['Threadmgr',['../namespacePyPO_1_1Threadmgr.html',1,'PyPO']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /tutorials/Gui/README_Resources/ResourcesT2/pltRot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PyPO-dev/PyPO/HEAD/tutorials/Gui/README_Resources/ResourcesT2/pltRot.png -------------------------------------------------------------------------------- /tutorials/Gui/README_Resources/ResourcesT2/rePlot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PyPO-dev/PyPO/HEAD/tutorials/Gui/README_Resources/ResourcesT2/rePlot.png -------------------------------------------------------------------------------- /tutorials/Gui/README_Resources/ResourcesT2/saveSys.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PyPO-dev/PyPO/HEAD/tutorials/Gui/README_Resources/ResourcesT2/saveSys.png -------------------------------------------------------------------------------- /tutorials/Gui/README_Resources/ResourcesT2/system.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PyPO-dev/PyPO/HEAD/tutorials/Gui/README_Resources/ResourcesT2/system.png -------------------------------------------------------------------------------- /tutorials/Gui/README_Resources/ResourcesT2/t2Plout.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PyPO-dev/PyPO/HEAD/tutorials/Gui/README_Resources/ResourcesT2/t2Plout.png -------------------------------------------------------------------------------- /tutorials/Gui/README_Resources/ResourcesT2/t2ellip.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PyPO-dev/PyPO/HEAD/tutorials/Gui/README_Resources/ResourcesT2/t2ellip.png -------------------------------------------------------------------------------- /tutorials/Gui/README_Resources/ResourcesT2/t2para.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PyPO-dev/PyPO/HEAD/tutorials/Gui/README_Resources/ResourcesT2/t2para.png -------------------------------------------------------------------------------- /tutorials/Gui/README_Resources/ResourcesT3/EH_plot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PyPO-dev/PyPO/HEAD/tutorials/Gui/README_Resources/ResourcesT3/EH_plot.png -------------------------------------------------------------------------------- /tutorials/Gui/README_Resources/ResourcesT3/loadSys.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PyPO-dev/PyPO/HEAD/tutorials/Gui/README_Resources/ResourcesT3/loadSys.png -------------------------------------------------------------------------------- /tutorials/Gui/README_Resources/ResourcesT3/newPar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PyPO-dev/PyPO/HEAD/tutorials/Gui/README_Resources/ResourcesT3/newPar.png -------------------------------------------------------------------------------- /tutorials/Gui/README_Resources/ResourcesT3/pl_foc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PyPO-dev/PyPO/HEAD/tutorials/Gui/README_Resources/ResourcesT3/pl_foc.png -------------------------------------------------------------------------------- /tutorials/Gui/README_Resources/ResourcesT3/planeFF.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PyPO-dev/PyPO/HEAD/tutorials/Gui/README_Resources/ResourcesT3/planeFF.png -------------------------------------------------------------------------------- /tutorials/Gui/README_Resources/ResourcesT3/poProp1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PyPO-dev/PyPO/HEAD/tutorials/Gui/README_Resources/ResourcesT3/poProp1.png -------------------------------------------------------------------------------- /tutorials/Gui/README_Resources/ResourcesT3/poProp2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PyPO-dev/PyPO/HEAD/tutorials/Gui/README_Resources/ResourcesT3/poProp2.png -------------------------------------------------------------------------------- /tutorials/Gui/README_Resources/ResourcesT3/poProp3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PyPO-dev/PyPO/HEAD/tutorials/Gui/README_Resources/ResourcesT3/poProp3.png -------------------------------------------------------------------------------- /tutorials/Gui/README_Resources/ResourcesT3/propFF.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PyPO-dev/PyPO/HEAD/tutorials/Gui/README_Resources/ResourcesT3/propFF.png -------------------------------------------------------------------------------- /docs/Gui/README_Resources/ResourcesT3/gaussBeamForm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PyPO-dev/PyPO/HEAD/docs/Gui/README_Resources/ResourcesT3/gaussBeamForm.png -------------------------------------------------------------------------------- /docs/search/groups_b.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['visualisation_20methods_0',['Visualisation Methods',['../group__public__api__vis.html',1,'']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /tutorials/Gui/README_Resources/ResourcesT2/GaussPlot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PyPO-dev/PyPO/HEAD/tutorials/Gui/README_Resources/ResourcesT2/GaussPlot.png -------------------------------------------------------------------------------- /tutorials/Gui/README_Resources/ResourcesT2/focusFound.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PyPO-dev/PyPO/HEAD/tutorials/Gui/README_Resources/ResourcesT2/focusFound.png -------------------------------------------------------------------------------- /tutorials/Gui/README_Resources/ResourcesT2/initGauss.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PyPO-dev/PyPO/HEAD/tutorials/Gui/README_Resources/ResourcesT2/initGauss.png -------------------------------------------------------------------------------- /tutorials/Gui/README_Resources/ResourcesT2/ploutRot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PyPO-dev/PyPO/HEAD/tutorials/Gui/README_Resources/ResourcesT2/ploutRot.png -------------------------------------------------------------------------------- /tutorials/Gui/README_Resources/ResourcesT2/ploutTrans.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PyPO-dev/PyPO/HEAD/tutorials/Gui/README_Resources/ResourcesT2/ploutTrans.png -------------------------------------------------------------------------------- /tutorials/Gui/README_Resources/ResourcesT3/ffAmpOnly.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PyPO-dev/PyPO/HEAD/tutorials/Gui/README_Resources/ResourcesT3/ffAmpOnly.png -------------------------------------------------------------------------------- /tutorials/Gui/README_Resources/ResourcesT3/fieldPlot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PyPO-dev/PyPO/HEAD/tutorials/Gui/README_Resources/ResourcesT3/fieldPlot.png -------------------------------------------------------------------------------- /tutorials/Gui/README_Resources/ResourcesT3/noisyField.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PyPO-dev/PyPO/HEAD/tutorials/Gui/README_Resources/ResourcesT3/noisyField.png -------------------------------------------------------------------------------- /tutorials/Gui/README_Resources/ResourcesT3/poProp1.5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PyPO-dev/PyPO/HEAD/tutorials/Gui/README_Resources/ResourcesT3/poProp1.5.png -------------------------------------------------------------------------------- /tutorials/Gui/README_Resources/ResourcesT3/removeElem.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PyPO-dev/PyPO/HEAD/tutorials/Gui/README_Resources/ResourcesT3/removeElem.png -------------------------------------------------------------------------------- /tutorials/Gui/README_Resources/ResourcesT3/transFocPl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PyPO-dev/PyPO/HEAD/tutorials/Gui/README_Resources/ResourcesT3/transFocPl.png -------------------------------------------------------------------------------- /docs/Gui/README_Resources/ResourcesT2/gaussTranslation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PyPO-dev/PyPO/HEAD/docs/Gui/README_Resources/ResourcesT2/gaussTranslation.png -------------------------------------------------------------------------------- /docs/search/groups_3.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['hybrid_20rt_20po_20methods_0',['Hybrid RT/PO Methods',['../group__public__api__hybrid.html',1,'']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /tutorials/Gui/README_Resources/ResourcesT3/beamCreated.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PyPO-dev/PyPO/HEAD/tutorials/Gui/README_Resources/ResourcesT3/beamCreated.png -------------------------------------------------------------------------------- /docs/search/classes_7.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['hybridproperror_0',['HybridPropError',['../classPyPO_1_1Checks_1_1HybridPropError.html',1,'PyPO::Checks']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /tutorials/Gui/README_Resources/ResourcesT3/gaussBeamForm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PyPO-dev/PyPO/HEAD/tutorials/Gui/README_Resources/ResourcesT3/gaussBeamForm.png -------------------------------------------------------------------------------- /tutorials/Gui/README_Resources/ResourcesT2/gaussTranslation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PyPO-dev/PyPO/HEAD/tutorials/Gui/README_Resources/ResourcesT2/gaussTranslation.png -------------------------------------------------------------------------------- /docs/search/files_e.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['utils_2eh_0',['Utils.h',['../Utils_8h.html',1,'']]], 4 | ['utils_2epy_1',['utils.py',['../utils_8py.html',1,'']]] 5 | ]; 6 | -------------------------------------------------------------------------------- /docs/search/groups_1.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['common_20transformation_20methods_0',['Common Transformation Methods',['../group__public__api__common.html',1,'']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /doxy/PubAPITypes.dox: -------------------------------------------------------------------------------- 1 | /** 2 | \defgroup public_api_types PyPO Datatype Reference 3 | \brief This section contains a list of all datatype classes used in `PyPO`. 4 | */ 5 | 6 | 7 | -------------------------------------------------------------------------------- /docs/search/files_3.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['debug_2eh_0',['Debug.h',['../Debug_8h.html',1,'']]], 4 | ['dialogs_2epy_1',['Dialogs.py',['../Dialogs_8py.html',1,'']]] 5 | ]; 6 | -------------------------------------------------------------------------------- /docs/search/functions_11.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['uv_5fopts_0',['uv_opts',['../formData_8py.html#a1f764c8ddc2af707056c90185f740465',1,'GUI::ParameterForms::formData']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /docs/search/functions_13.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['xy_5fopts_0',['xy_opts',['../formData_8py.html#af90e2bc385cd3bf85f3d6e8a49fbfd1b',1,'GUI::ParameterForms::formData']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /docs/search/pages_4.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['for_20contributions_20development_0',['Instructions For Contributions & Development',['../contribguide.html',1,'']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /doxy/PubAPITemplates.dox: -------------------------------------------------------------------------------- 1 | /** 2 | \defgroup public_api_templates Input Dictionary Reference 3 | \brief This section contains a list of all input dictionaries used in `PyPO`. 4 | */ 5 | 6 | -------------------------------------------------------------------------------- /docs/search/variables_6.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['hybriddict_0',['hybridDict',['../group__public__api__templates.html#gaf71ae22b35bbb255db8d65437e9dd3d0',1,'PyPO::Templates']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /docs/search/all_a.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['kernelsf_2ecu_0',['Kernelsf.cu',['../Kernelsf_8cu.html',1,'']]], 4 | ['kernelsrtf_2ecu_1',['KernelsRTf.cu',['../KernelsRTf_8cu.html',1,'']]] 5 | ]; 6 | -------------------------------------------------------------------------------- /docs/search/files_8.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['kernelsf_2ecu_0',['Kernelsf.cu',['../Kernelsf_8cu.html',1,'']]], 4 | ['kernelsrtf_2ecu_1',['KernelsRTf.cu',['../KernelsRTf_8cu.html',1,'']]] 5 | ]; 6 | -------------------------------------------------------------------------------- /docs/search/classes_10.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['xyzradio_0',['XYZRadio',['../classGUI_1_1ParameterForms_1_1simpleInputWidgets_1_1XYZRadio.html',1,'GUI::ParameterForms::simpleInputWidgets']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /docs/search/files_f.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['workspace_2epy_0',['WorkSpace.py',['../WorkSpace_8py.html',1,'']]], 4 | ['worldparam_2epy_1',['WorldParam.py',['../WorldParam_8py.html',1,'']]] 5 | ]; 6 | -------------------------------------------------------------------------------- /docs/search/pages_3.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['elements_0',['Generating Reflectors/Elements',['../basictut3.html',1,'']]], 4 | ['explanations_1',['Explanations',['../explanations.html',1,'']]] 5 | ]; 6 | -------------------------------------------------------------------------------- /doxy/PubAPIFrameMeths.dox: -------------------------------------------------------------------------------- 1 | /** 2 | \defgroup public_api_frames Ray Trace Methods 3 | \brief This section contains a list of public `PyPO` methods which are used for performing ray trace related tasks. 4 | */ 5 | -------------------------------------------------------------------------------- /doxy/PubAPIReflMeths.dox: -------------------------------------------------------------------------------- 1 | /** 2 | \defgroup public_api_reflmeths Reflector Methods 3 | \brief This section contains a list of public `PyPO` methods concerning making/moving/deleting elements and groups. 4 | */ 5 | -------------------------------------------------------------------------------- /docs/search/classes_e.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['vectorinput_0',['VectorInput',['../classGUI_1_1ParameterForms_1_1simpleInputWidgets_1_1VectorInput.html',1,'GUI::ParameterForms::simpleInputWidgets']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /doxy/PubAPIPOMeths.dox: -------------------------------------------------------------------------------- 1 | /** 2 | \defgroup public_api_po Physical Optics Methods 3 | \brief This section contains a list of public `PyPO` methods which are used for performing physical optics related tasks. 4 | */ 5 | -------------------------------------------------------------------------------- /doxy/PubAPIHybrid.dox: -------------------------------------------------------------------------------- 1 | /** 2 | \defgroup public_api_hybrid Hybrid RT/PO Methods 3 | \brief This section contains a list of public `PyPO` methods which employ both ray tracing (RT) and physical optics (PO). 4 | */ 5 | 6 | -------------------------------------------------------------------------------- /doxy/PubAPISystemPaths.dox: -------------------------------------------------------------------------------- 1 | /** 2 | \defgroup public_api_sysio System I/O Methods 3 | \brief This section contains a list of public `PyPO` methods which are used for handling input/output with `PyPO` systems. 4 | */ 5 | -------------------------------------------------------------------------------- /docs/search/pages_b.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['some_20more_20pypo_20dataclasses_0',['Some More PyPO Dataclasses',['../basictut5.html',1,'']]], 4 | ['system_1',['The PyPO System',['../basictut2.html',1,'']]] 5 | ]; 6 | -------------------------------------------------------------------------------- /doxy/PubAPIVisualisation.dox: -------------------------------------------------------------------------------- 1 | /** 2 | \defgroup public_api_vis Visualisation Methods 3 | \brief This section contains a list of public `PyPO` methods which are used for visualising systems, elements, frames and PO fields/currents. 4 | */ 5 | -------------------------------------------------------------------------------- /docs/search/functions_12.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['waiterfinished_0',['waiterFinished',['../classGUI_1_1SubprocessManager_1_1SubprocessManager.html#aa39a5bb76c64dda4627e57ed683b27d0',1,'GUI::SubprocessManager::SubprocessManager']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /doxy/PubAPICommon.dox: -------------------------------------------------------------------------------- 1 | /** 2 | \defgroup public_api_common Common Transformation Methods 3 | \brief This section contains a list of public `PyPO` methods which are used for rotating and translating reflectors, groups and frame objects. 4 | */ 5 | 6 | -------------------------------------------------------------------------------- /docs/search/files_b.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['random_2eh_0',['Random.h',['../Random_8h.html',1,'']]], 4 | ['raytrace_2eh_1',['RayTrace.h',['../RayTrace_8h.html',1,'']]], 5 | ['rtrefls_2eh_2',['RTRefls.h',['../RTRefls_8h.html',1,'']]] 6 | ]; 7 | -------------------------------------------------------------------------------- /docs/search/pages_1.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['common_20issues_0',['Common Issues',['../common_issues.html',1,'']]], 4 | ['contributions_20development_1',['Instructions For Contributions & Development',['../contribguide.html',1,'']]] 5 | ]; 6 | -------------------------------------------------------------------------------- /docs/search/variables_4.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['flip_0',['flip',['../structreflparams.html#a4386c738c9df82696987dfc73620b408',1,'reflparams::flip'],['../structreflparamsf.html#a7ce43b7389a7b0e38bdad303a93ceab9',1,'reflparamsf::flip']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /docs/search/groups_a.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['trace_20methods_0',['Ray Trace Methods',['../group__public__api__frames.html',1,'']]], 4 | ['transformation_20methods_1',['Common Transformation Methods',['../group__public__api__common.html',1,'']]] 5 | ]; 6 | -------------------------------------------------------------------------------- /docs/search/files_2.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['checks_2epy_0',['Checks.py',['../Checks_8py.html',1,'']]], 4 | ['config_2epy_1',['Config.py',['../Config_8py.html',1,'']]], 5 | ['customlogger_2epy_2',['CustomLogger.py',['../CustomLogger_8py.html',1,'']]] 6 | ]; 7 | -------------------------------------------------------------------------------- /docs/search/groups_4.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['i_20o_20methods_0',['System I/O Methods',['../group__public__api__sysio.html',1,'']]], 4 | ['input_20dictionary_20reference_1',['Input Dictionary Reference',['../group__public__api__templates.html',1,'']]] 5 | ]; 6 | -------------------------------------------------------------------------------- /docs/search/groups_2.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['datatype_20reference_0',['PyPO Datatype Reference',['../group__public__api__types.html',1,'']]], 4 | ['dictionary_20reference_1',['Input Dictionary Reference',['../group__public__api__templates.html',1,'']]] 5 | ]; 6 | -------------------------------------------------------------------------------- /docs/search/groups_9.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['special_20option_20arguments_0',['Special Option Arguments',['../group__public__api__argopts.html',1,'']]], 4 | ['system_20i_20o_20methods_1',['System I/O Methods',['../group__public__api__sysio.html',1,'']]] 5 | ]; 6 | -------------------------------------------------------------------------------- /docs/search/pages_5.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['generating_20reflectors_20elements_0',['Generating Reflectors/Elements',['../basictut3.html',1,'']]], 4 | ['gridding_20and_20parameterisations_1',['Gridding And Parameterisations',['../basictut4.html',1,'']]] 5 | ]; 6 | -------------------------------------------------------------------------------- /MANIFEST.in: -------------------------------------------------------------------------------- 1 | include README.md 2 | include LICENSE 3 | include CMakeLists.txt 4 | include src/CMakeLists.txt 5 | recursive-include src *.py 6 | recursive-include src *.cpp 7 | recursive-include src *.h 8 | recursive-include src *.cu 9 | recursive-include tests *.py 10 | -------------------------------------------------------------------------------- /docs/search/files_d.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['templates_2epy_0',['Templates.py',['../Templates_8py.html',1,'']]], 4 | ['transform_2ecpp_1',['Transform.cpp',['../Transform_8cpp.html',1,'']]], 5 | ['transform_2eh_2',['Transform.h',['../Transform_8h.html',1,'']]] 6 | ]; 7 | -------------------------------------------------------------------------------- /docs/search/files_5.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['fitgauss_2epy_0',['FitGauss.py',['../FitGauss_8py.html',1,'']]], 4 | ['formdata_2epy_1',['formData.py',['../formData_8py.html',1,'']]], 5 | ['formgenerator_2epy_2',['formGenerator.py',['../formGenerator_8py.html',1,'']]] 6 | ]; 7 | -------------------------------------------------------------------------------- /docs/search/files_4.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['efficiencies_2epy_0',['Efficiencies.py',['../Efficiencies_8py.html',1,'']]], 4 | ['elementwidget_2epy_1',['ElementWidget.py',['../ElementWidget_8py.html',1,'']]], 5 | ['enums_2epy_2',['Enums.py',['../Enums_8py.html',1,'']]] 6 | ]; 7 | -------------------------------------------------------------------------------- /docs/search/all_15.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['vectorinput_0',['VectorInput',['../classGUI_1_1ParameterForms_1_1simpleInputWidgets_1_1VectorInput.html',1,'GUI::ParameterForms::simpleInputWidgets']]], 4 | ['visualisation_20methods_1',['Visualisation Methods',['../group__public__api__vis.html',1,'']]] 5 | ]; 6 | -------------------------------------------------------------------------------- /docs/search/pages_c.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['the_20pypo_20system_0',['The PyPO System',['../basictut2.html',1,'']]], 4 | ['to_20pypo_20design_20principles_1',['Introduction To PyPO & Design Principles',['../basictut1.html',1,'']]], 5 | ['tutorials_2',['Tutorials',['../tutorials.html',1,'']]] 6 | ]; 7 | -------------------------------------------------------------------------------- /.coveragerc: -------------------------------------------------------------------------------- 1 | [run] 2 | branch = True 3 | 4 | [report] 5 | omit = 6 | build/* 7 | tests/* 8 | GenerateDocs.py 9 | GuiApp.py 10 | setup.py 11 | src/PyPO/__init__.py 12 | src/PyPO/*.swp 13 | src/PyPO/__pycache__/* 14 | shibokensupport/* 15 | pyscript 16 | signature_bootstrap.py 17 | -------------------------------------------------------------------------------- /docs/search/groups_6.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['o_20methods_0',['System I/O Methods',['../group__public__api__sysio.html',1,'']]], 4 | ['optics_20methods_1',['Physical Optics Methods',['../group__public__api__po.html',1,'']]], 5 | ['option_20arguments_2',['Special Option Arguments',['../group__public__api__argopts.html',1,'']]] 6 | ]; 7 | -------------------------------------------------------------------------------- /docs/search/files_9.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['mainwindow_2epy_0',['MainWindow.py',['../MainWindow_8py.html',1,'']]], 4 | ['mattransform_2epy_1',['MatTransform.py',['../MatTransform_8py.html',1,'']]], 5 | ['matutils_2epy_2',['MatUtils.py',['../MatUtils_8py.html',1,'']]], 6 | ['memutils_2eh_3',['MemUtils.h',['../MemUtils_8h.html',1,'']]] 7 | ]; 8 | -------------------------------------------------------------------------------- /GuiApp.py: -------------------------------------------------------------------------------- 1 | """! 2 | @file 3 | Main GUI entry point. Run this file from the terminal and watch the magic happen. 4 | """ 5 | 6 | import sys 7 | from PySide6.QtWidgets import QApplication 8 | from src.GUI.MainWindow import PyPOMainWindow 9 | 10 | app = QApplication(sys.argv) 11 | 12 | win = PyPOMainWindow(parent=None) 13 | win.show() 14 | app.exec_() 15 | -------------------------------------------------------------------------------- /docs/search/classes_f.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['waiter_0',['Waiter',['../classGUI_1_1SubprocessManager_1_1Waiter.html',1,'GUI::SubprocessManager']]], 4 | ['workspace_1',['Workspace',['../classGUI_1_1WorkSpace_1_1Workspace.html',1,'GUI::WorkSpace']]], 5 | ['wssections_2',['WSSections',['../classGUI_1_1utils_1_1WSSections.html',1,'GUI::utils']]] 6 | ]; 7 | -------------------------------------------------------------------------------- /docs/search/variables_a.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['ochief_0',['oChief',['../structRTDictf.html#a8e68218abe120199a50d26cec14f98fa',1,'RTDictf::oChief'],['../structGRTDictf.html#a415e6900c4f83fe28d745f56c3790ba6',1,'GRTDictf::oChief']]], 4 | ['origin_1',['ORIGIN',['../WorldParam_8py.html#a3888493873bf68358e0a49f7345b7df3',1,'PyPO::WorldParam']]] 5 | ]; 6 | -------------------------------------------------------------------------------- /docs/search/variables_b.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['pol_0',['pol',['../structGPODict.html#a3084b71f8e49fc0e3fdd3ebd309518b8',1,'GPODict::pol'],['../structGPODictf.html#a4a5a79a5e2a0d9d37add902f1eacaa12',1,'GPODictf::pol']]], 4 | ['psdict_1',['PSDict',['../group__public__api__templates.html#ga501b355d3b0641cdbd3ea3ca7ccaeb53',1,'PyPO::Templates']]] 5 | ]; 6 | -------------------------------------------------------------------------------- /docs/search/groups_7.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['physical_20optics_20methods_0',['Physical Optics Methods',['../group__public__api__po.html',1,'']]], 4 | ['po_20methods_1',['Hybrid RT/PO Methods',['../group__public__api__hybrid.html',1,'']]], 5 | ['pypo_20datatype_20reference_2',['PyPO Datatype Reference',['../group__public__api__types.html',1,'']]] 6 | ]; 7 | -------------------------------------------------------------------------------- /docs/search/pages_7.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['instructions_20for_20contributions_20development_0',['Instructions For Contributions & Development',['../contribguide.html',1,'']]], 4 | ['introduction_20to_20pypo_20design_20principles_1',['Introduction To PyPO & Design Principles',['../basictut1.html',1,'']]], 5 | ['issues_2',['Common Issues',['../common_issues.html',1,'']]] 6 | ]; 7 | -------------------------------------------------------------------------------- /docs/search/variables_f.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['unsavedchanges_0',['unsavedChanges',['../classGUI_1_1MainWindow_1_1MainWidget.html#abe819bcb72381570a27c6204dda391e5',1,'GUI::MainWindow::MainWidget']]], 4 | ['ut_1',['ut',['../classPropagation.html#a03debe9247f26aae02e9c2979251bdde',1,'Propagation::ut'],['../classRayTracer.html#a2f9aaccce6775a7b69c02700c6077805',1,'RayTracer::ut']]] 5 | ]; 6 | -------------------------------------------------------------------------------- /docs/search/classes_d.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['units_0',['Units',['../classPyPO_1_1Enums_1_1Units.html',1,'PyPO::Enums']]], 4 | ['unsavedchangesdialog_1',['UnsavedChangesDialog',['../classGUI_1_1Dialogs_1_1UnsavedChangesDialog.html',1,'GUI::Dialogs']]], 5 | ['utils_2',['Utils',['../classUtils.html',1,'']]], 6 | ['utils_3c_20v_20_3e_3',['Utils< V >',['../classUtils.html',1,'']]] 7 | ]; 8 | -------------------------------------------------------------------------------- /docs/search/files_a.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['plotconfig_2epy_0',['PlotConfig.py',['../PlotConfig_8py.html',1,'']]], 4 | ['plotscreen_2epy_1',['PlotScreen.py',['../PlotScreen_8py.html',1,'']]], 5 | ['plotter_2epy_2',['Plotter.py',['../Plotter_8py.html',1,'']]], 6 | ['propagation_2eh_3',['Propagation.h',['../Propagation_8h.html',1,'']]], 7 | ['pypotypes_2epy_4',['PyPOTypes.py',['../PyPOTypes_8py.html',1,'']]] 8 | ]; 9 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | [![DOI](https://zenodo.org/badge/490758642.svg)](https://zenodo.org/badge/latestdoi/490758642) 2 | [![DOI](https://joss.theoj.org/papers/10.21105/joss.05478/status.svg)](https://doi.org/10.21105/joss.05478) 3 | 4 | # Welcome to the Python Physical Optics (PyPO) package! 5 | 6 | For full documentation and instructions on how to install and use PyPO, we kindly refer to the [documentation page](https://pypo-dev.github.io/PyPO/). 7 | -------------------------------------------------------------------------------- /docs/search/variables_1.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['coeffs_0',['coeffs',['../structreflparams.html#affe6ce72851da53f1fcb067162420f80',1,'reflparams::coeffs'],['../structreflparamsf.html#a2fc4eeece35ae58d81bc2960c472c1a7',1,'reflparamsf::coeffs']]], 4 | ['content_1',['content',['../classGUI_1_1Accordion_1_1Accordion_1_1AccordionSection.html#a3b565145a0759d93c35f28119dee6a63',1,'GUI::Accordion::Accordion::AccordionSection']]] 5 | ]; 6 | -------------------------------------------------------------------------------- /docs/search/classes_a.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['plotscreen_0',['PlotScreen',['../classGUI_1_1PlotScreen_1_1PlotScreen.html',1,'GUI::PlotScreen']]], 4 | ['projections_1',['Projections',['../classPyPO_1_1Enums_1_1Projections.html',1,'PyPO::Enums']]], 5 | ['propagation_2',['Propagation',['../classPropagation.html',1,'']]], 6 | ['pypomainwindow_3',['PyPOMainWindow',['../classGUI_1_1MainWindow_1_1PyPOMainWindow.html',1,'GUI::MainWindow']]] 7 | ]; 8 | -------------------------------------------------------------------------------- /docs/search/pages_2.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['dataclasses_0',['Some More PyPO Dataclasses',['../basictut5.html',1,'']]], 4 | ['demonstrations_1',['Demonstrations',['../demos.html',1,'']]], 5 | ['design_20principles_2',['Introduction To PyPO & Design Principles',['../basictut1.html',1,'']]], 6 | ['development_3',['Instructions For Contributions & Development',['../contribguide.html',1,'']]], 7 | ['documentation_4',['Documentation',['../pypodocs.html',1,'']]] 8 | ]; 9 | -------------------------------------------------------------------------------- /docs/search/classes_3.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['dielectrics_0',['Dielectrics',['../classPyPO_1_1Enums_1_1Dielectrics.html',1,'PyPO::Enums']]], 4 | ['dynamicdropdownwidget_1',['DynamicDropdownWidget',['../classGUI_1_1ParameterForms_1_1formGenerator_1_1DynamicDropdownWidget.html',1,'GUI::ParameterForms::formGenerator']]], 5 | ['dynamicradiowidget_2',['DynamicRadioWidget',['../classGUI_1_1ParameterForms_1_1formGenerator_1_1DynamicRadioWidget.html',1,'GUI::ParameterForms::formGenerator']]] 6 | ]; 7 | -------------------------------------------------------------------------------- /docs/search/functions_2.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['block_5fndarray_0',['block_ndarray',['../Checks_8py.html#a0b5315780bbe8f0aab41eb577725bdff',1,'PyPO::Checks']]], 4 | ['bmergeactioncurrents_1',['BMergeActionCurrents',['../classGUI_1_1MainWindow_1_1MainWidget.html#aae2096409ad7e45f865db4c1458bbe81',1,'GUI::MainWindow::MainWidget']]], 5 | ['bmergeactionfields_2',['BMergeActionFields',['../classGUI_1_1MainWindow_1_1MainWidget.html#ab8c38207eef0d21abe9dfeb307a3f071',1,'GUI::MainWindow::MainWidget']]] 6 | ]; 7 | -------------------------------------------------------------------------------- /docs/search/pages_9.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['parameterisations_0',['Gridding And Parameterisations',['../basictut4.html',1,'']]], 4 | ['principles_1',['Introduction To PyPO & Design Principles',['../basictut1.html',1,'']]], 5 | ['pypo_20dataclasses_2',['Some More PyPO Dataclasses',['../basictut5.html',1,'']]], 6 | ['pypo_20design_20principles_3',['Introduction To PyPO & Design Principles',['../basictut1.html',1,'']]], 7 | ['pypo_20system_4',['The PyPO System',['../basictut2.html',1,'']]] 8 | ]; 9 | -------------------------------------------------------------------------------- /docs/search/groups_5.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['methods_0',['Methods',['../group__public__api__common.html',1,'Common Transformation Methods'],['../group__public__api__hybrid.html',1,'Hybrid RT/PO Methods'],['../group__public__api__po.html',1,'Physical Optics Methods'],['../group__public__api__frames.html',1,'Ray Trace Methods'],['../group__public__api__reflmeths.html',1,'Reflector Methods'],['../group__public__api__sysio.html',1,'System I/O Methods'],['../group__public__api__vis.html',1,'Visualisation Methods']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /docs/search/groups_8.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['ray_20trace_20methods_0',['Ray Trace Methods',['../group__public__api__frames.html',1,'']]], 4 | ['reference_1',['Reference',['../group__public__api__templates.html',1,'Input Dictionary Reference'],['../group__public__api__types.html',1,'PyPO Datatype Reference']]], 5 | ['reflector_20methods_2',['Reflector Methods',['../group__public__api__reflmeths.html',1,'']]], 6 | ['rt_20po_20methods_3',['Hybrid RT/PO Methods',['../group__public__api__hybrid.html',1,'']]] 7 | ]; 8 | -------------------------------------------------------------------------------- /docs/search/files_c.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['sellmeier_2epy_0',['Sellmeier.py',['../Sellmeier_8py.html',1,'']]], 4 | ['simpleinputwidgets_2epy_1',['simpleInputWidgets.py',['../simpleInputWidgets_8py.html',1,'']]], 5 | ['structs_2eh_2',['Structs.h',['../Structs_8h.html',1,'']]], 6 | ['structs_2epy_3',['Structs.py',['../Structs_8py.html',1,'']]], 7 | ['subprocessmanager_2epy_4',['SubprocessManager.py',['../SubprocessManager_8py.html',1,'']]], 8 | ['system_2epy_5',['System.py',['../System_8py.html',1,'']]] 9 | ]; 10 | -------------------------------------------------------------------------------- /docs/search/files_1.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['beaminit_2eh_0',['BeamInit.h',['../BeamInit_8h.html',1,'']]], 4 | ['bindbeam_2epy_1',['BindBeam.py',['../BindBeam_8py.html',1,'']]], 5 | ['bindcpu_2epy_2',['BindCPU.py',['../BindCPU_8py.html',1,'']]], 6 | ['bindgpu_2epy_3',['BindGPU.py',['../BindGPU_8py.html',1,'']]], 7 | ['bindrefl_2epy_4',['BindRefl.py',['../BindRefl_8py.html',1,'']]], 8 | ['bindtransf_2epy_5',['BindTransf.py',['../BindTransf_8py.html',1,'']]], 9 | ['bindutils_2epy_6',['BindUtils.py',['../BindUtils_8py.html',1,'']]] 10 | ]; 11 | -------------------------------------------------------------------------------- /docs/search/variables_3.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['e0_0',['E0',['../structGPODict.html#a645913720bcc71df91334a1c05ff9045',1,'GPODict::E0'],['../structScalarGPODict.html#a001b9447cad35384d1118bcc35a486b2',1,'ScalarGPODict::E0'],['../structGPODictf.html#a5b1466ca9cbafb7f96bc1cca578ce368',1,'GPODictf::E0'],['../structScalarGPODictf.html#a709608689cfe99d9b3298adddfae61ad',1,'ScalarGPODictf::E0']]], 4 | ['ecc_5fuv_1',['ecc_uv',['../structreflparams.html#a5ccc1216307dc1968f59782a4504f70a',1,'reflparams::ecc_uv'],['../structreflparamsf.html#a37ae1ab16c231af5e4eb748a2241a91e',1,'reflparamsf::ecc_uv']]] 5 | ]; 6 | -------------------------------------------------------------------------------- /docs/minus.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /docs/minusd.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /docs/search/all_19.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['z_0',['z',['../structarrR3.html#a51867acb25f5599fbab613a8af2fa9d5',1,'arrR3::z'],['../structreflcontainer.html#a0fcbae1eeadfc615870fb6cd6ba1490e',1,'reflcontainer::z'],['../structcframe.html#a0ed85ddb9f3eae26f605b77c52832bf6',1,'cframe::z'],['../structarrR3f.html#ad4c4e5e7929a412950638873fadd9d9f',1,'arrR3f::z'],['../structreflcontainerf.html#a449650c6db72b3e218c9c8eea6abdb3d',1,'reflcontainerf::z'],['../structcframef.html#a1178ab08b05c385e628a0f76485473dd',1,'cframef::z']]], 4 | ['zax_1',['ZAX',['../WorldParam_8py.html#ae45cef8376fb65cf2213ffb61a58bffb',1,'PyPO::WorldParam']]] 5 | ]; 6 | -------------------------------------------------------------------------------- /docs/search/variables_d.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['selectedlist_0',['selectedList',['../classGUI_1_1ParameterForms_1_1simpleInputWidgets_1_1ElementSelectionWidget.html#a2e75c60a2a9f6d7feba472d75bebf040',1,'GUI::ParameterForms::simpleInputWidgets::ElementSelectionWidget']]], 4 | ['size_1',['size',['../structreflcontainer.html#a2d5052f1f72b10b0d150927d73ff3089',1,'reflcontainer::size'],['../structcframe.html#adc1f0c76a417c7790c203e16cedd6f19',1,'cframe::size'],['../structreflcontainerf.html#a9d558fe9b6de6d6c7ab7dca2d5912d2b',1,'reflcontainerf::size'],['../structcframef.html#a20e0172bfcd09c1ec9a6582ed98236e7',1,'cframef::size']]] 5 | ]; 6 | -------------------------------------------------------------------------------- /docs/search/variables_13.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['z_0',['z',['../structarrR3.html#a51867acb25f5599fbab613a8af2fa9d5',1,'arrR3::z'],['../structreflcontainer.html#a0fcbae1eeadfc615870fb6cd6ba1490e',1,'reflcontainer::z'],['../structcframe.html#a0ed85ddb9f3eae26f605b77c52832bf6',1,'cframe::z'],['../structarrR3f.html#ad4c4e5e7929a412950638873fadd9d9f',1,'arrR3f::z'],['../structreflcontainerf.html#a449650c6db72b3e218c9c8eea6abdb3d',1,'reflcontainerf::z'],['../structcframef.html#a1178ab08b05c385e628a0f76485473dd',1,'cframef::z']]], 4 | ['zax_1',['ZAX',['../WorldParam_8py.html#ae45cef8376fb65cf2213ffb61a58bffb',1,'PyPO::WorldParam']]] 5 | ]; 6 | -------------------------------------------------------------------------------- /docs/search/classes_4.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['elementselectionwidget_0',['ElementSelectionWidget',['../classGUI_1_1ParameterForms_1_1simpleInputWidgets_1_1ElementSelectionWidget.html',1,'GUI::ParameterForms::simpleInputWidgets']]], 4 | ['elementwidget_1',['ElementWidget',['../classGUI_1_1ElementWidget_1_1ElementWidget.html',1,'GUI::ElementWidget']]], 5 | ['elemnameerror_2',['ElemNameError',['../classPyPO_1_1Checks_1_1ElemNameError.html',1,'PyPO::Checks']]], 6 | ['emptyfieldexception_3',['EmptyFieldException',['../classGUI_1_1ParameterForms_1_1simpleInputWidgets_1_1EmptyFieldException.html',1,'GUI::ParameterForms::simpleInputWidgets']]] 7 | ]; 8 | -------------------------------------------------------------------------------- /doxy/Explanations.dox: -------------------------------------------------------------------------------- 1 | /** 2 | \page explanations Explanations 3 | \section expl_head PyPO Explanations 4 | Here you can find explanations on basic `PyPO` topics. 5 | Reading these explanations is recommended before diving into the \ref tutorials "tutorials" proper. 6 | 7 | \ref basictut1 "Introduction to PyPO and design principles" 8 | 9 | \ref basictut2 "Introduction To The System object" 10 | 11 | \ref basictut3 "Reflectors/Elements In PyPO" 12 | 13 | \ref basictut4 "Gridding And Parameterisations In PyPO" 14 | 15 | \ref basictut5 "Some More PyPO Datatypes" 16 | 17 | \ref basictut6 "Optimising reflector/group configurations in PyPO" 18 | */ 19 | -------------------------------------------------------------------------------- /src/common/Transform.h: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | 8 | #include "Structs.h" 9 | #include "Utils.h" 10 | 11 | #ifdef _WIN32 12 | # define PYPO_DLL __declspec(dllexport) 13 | #else 14 | # define PYPO_DLL 15 | #endif 16 | 17 | #ifndef __Transform_h 18 | #define __Transform_h 19 | 20 | /*! \file Transform.h 21 | \brief Declaration of transformations for frames and fields/currents. 22 | */ 23 | extern "C" 24 | { 25 | PYPO_DLL void transformRays(cframe *fr, double *mat); 26 | PYPO_DLL void transformFields(c2Bundle *fields, double *mat, int nTot); 27 | } 28 | 29 | #endif 30 | -------------------------------------------------------------------------------- /docs/search/variables_5.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['gcenter_0',['gcenter',['../structreflparams.html#a4611bf2bf9cead78987049c7241b84b5',1,'reflparams::gcenter'],['../structreflparamsf.html#a230a70811a8bf6135a7b93d83c133436',1,'reflparamsf::gcenter']]], 4 | ['gmode_1',['gmode',['../structreflparams.html#a918e780b9a6293c485a349e5456560f2',1,'reflparams::gmode'],['../structreflparamsf.html#a6f435d3f135363253d633ec03c93860c',1,'reflparamsf::gmode']]], 5 | ['gpodict_2',['GPODict',['../group__public__api__templates.html#gab71e11872c13b528cc29986fb43d38d7',1,'PyPO::Templates']]], 6 | ['grtdict_3',['GRTDict',['../group__public__api__templates.html#ga096dd833d989be8e6a65d56a18831721',1,'PyPO::Templates']]] 7 | ]; 8 | -------------------------------------------------------------------------------- /docs/search/searchdata.js: -------------------------------------------------------------------------------- 1 | var indexSectionsWithContent = 2 | { 3 | 0: "_abcdefghiklmnopqrstuvwxyz", 4 | 1: "abcdefghimprsuvwx", 5 | 2: "p", 6 | 3: "abcdefgikmprstuw", 7 | 4: "_abcdefghilmnprstuwx", 8 | 5: "acdefghilnoprstuwxyz", 9 | 6: "acdhimoprstv", 10 | 7: "acdefghimprst" 11 | }; 12 | 13 | var indexSectionNames = 14 | { 15 | 0: "all", 16 | 1: "classes", 17 | 2: "namespaces", 18 | 3: "files", 19 | 4: "functions", 20 | 5: "variables", 21 | 6: "groups", 22 | 7: "pages" 23 | }; 24 | 25 | var indexSectionLabels = 26 | { 27 | 0: "All", 28 | 1: "Classes", 29 | 2: "Namespaces", 30 | 3: "Files", 31 | 4: "Functions", 32 | 5: "Variables", 33 | 6: "Modules", 34 | 7: "Pages" 35 | }; 36 | 37 | -------------------------------------------------------------------------------- /docs/plus.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /docs/plusd.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /docs/search/variables_10.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['w0x_0',['w0x',['../structGPODict.html#a4bca7dd22fd9d65c27f8c383fca6a07e',1,'GPODict::w0x'],['../structScalarGPODict.html#a28216534246d76d1b6ac8d876a9893e5',1,'ScalarGPODict::w0x'],['../structGPODictf.html#a48e64390db74559aeb13f070a44f1d54',1,'GPODictf::w0x'],['../structScalarGPODictf.html#a07bc06402837c5d6d8091fc581d77e3f',1,'ScalarGPODictf::w0x']]], 4 | ['w0y_1',['w0y',['../structGPODict.html#add702249184a68db5d8efb900f0e3be3',1,'GPODict::w0y'],['../structScalarGPODict.html#ad2ea6f58f1322c6a239e858451740945',1,'ScalarGPODict::w0y'],['../structGPODictf.html#a5de635c56c7965028b673b33f235c37c',1,'GPODictf::w0y'],['../structScalarGPODictf.html#adfb5015f159ce846256631333c514496',1,'ScalarGPODictf::w0y']]] 5 | ]; 6 | -------------------------------------------------------------------------------- /docs/navtreeindex0.js: -------------------------------------------------------------------------------- 1 | var NAVTREEINDEX0 = 2 | { 3 | "common_issues.html":[6], 4 | "contribguide.html":[5], 5 | "demos.html":[3], 6 | "explanations.html":[1], 7 | "index.html":[], 8 | "index.html":[0], 9 | "index.html#General":[0,1,0,0], 10 | "index.html#contact":[0,5], 11 | "index.html#cuda":[0,1,1], 12 | "index.html#devinstall":[0,1,0,4], 13 | "index.html#inst":[0,1], 14 | "index.html#intro_sec":[0,0], 15 | "index.html#license":[0,4], 16 | "index.html#linux":[0,1,0,1], 17 | "index.html#macos":[0,1,0,2], 18 | "index.html#main_contribguidelines":[0,3], 19 | "index.html#man":[0,2], 20 | "index.html#optdep":[0,1,2], 21 | "index.html#sdist":[0,1,0], 22 | "index.html#windows":[0,1,0,3], 23 | "pages.html":[], 24 | "pypodocs.html":[4], 25 | "tutorials.html":[2] 26 | }; 27 | -------------------------------------------------------------------------------- /docs/search/variables_8.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['lam_0',['lam',['../structGPODict.html#a09bafcf782b5bfd3b7e4cf1957b48b2c',1,'GPODict::lam'],['../structScalarGPODict.html#a957209e5bcba36eda01fd6d61d040473',1,'ScalarGPODict::lam'],['../structGPODictf.html#a34bda8ca611e8ebef80d8c5e364b7c7a',1,'GPODictf::lam'],['../structScalarGPODictf.html#a04984941dc0fa0365fe314730ace0905',1,'ScalarGPODictf::lam']]], 4 | ['lxu_1',['lxu',['../structreflparams.html#a748214eefdc845e7ec75fe5bc7adff81',1,'reflparams::lxu'],['../structreflparamsf.html#a55a1df398503cc1e9fcd63e49bbff8ee',1,'reflparamsf::lxu']]], 5 | ['lyv_2',['lyv',['../structreflparams.html#ad637efde9527b76c2063e91466451ab1',1,'reflparams::lyv'],['../structreflparamsf.html#ab4b1a1219effaf7763896b602d0604a0',1,'reflparamsf::lyv']]] 6 | ]; 7 | -------------------------------------------------------------------------------- /doxy/PubAPIArgOpts.dox: -------------------------------------------------------------------------------- 1 | /** 2 | \defgroup public_api_argopts Special Option Arguments 3 | \brief Here you can find information on the special options `PyPO` that can be passed as arguments to functions. 4 | 5 | Several `PyPO` functions expect special arguments. 6 | For example, plotting a field or current distribution usually involves selecting a plane on which to project the object for visualisation. 7 | Also, for polarised fields and currents, the component of the field needs to be specified. 8 | What makes these special is the fact that only a few options are allowed per argument, but between the available options, the choice is free. 9 | `PyPO` provides built-in enumerable types that contain the special options. 10 | These can be imported and used as inpit to functions that require one. 11 | */ 12 | -------------------------------------------------------------------------------- /doxy/Demo.dox: -------------------------------------------------------------------------------- 1 | /** 2 | \page demos Demonstrations 3 | These demos are developed to show how to use `PyPO` by carrying out a few validation tests. 4 | They contain less instructions than the tutorials and are more structured like actual scripts. 5 | These demos are also included in the "demos" folder of the `PyPO` root directory as interactive Jupyter notebooks. 6 | 7 | [Inspecting phase conservation of backwards propagation](demos/Demo1.html) 8 | 9 | [Diffraction from a uniform current distribution on a disk](demos/Demo2.html) 10 | 11 | [Diffraction from a uniform current distribution on a square](demos/Demo3.html) 12 | 13 | [Diffraction from a double slit](demos/Demo4.html) 14 | 15 | [Inspecting the focus finder tool](demos/Demo5.html) 16 | 17 | [Validating a Dragonian dual reflector design](demos/Demo6.html) 18 | */ 19 | -------------------------------------------------------------------------------- /src/common/InterfaceReflector.h: -------------------------------------------------------------------------------- 1 | #include "Structs.h" 2 | 3 | #ifndef __InterfaceReflector_h 4 | #define __InterfaceReflector_h 5 | 6 | #ifdef _WIN32 7 | # define PYPO_DLL __declspec(dllexport) 8 | #else 9 | # define PYPO_DLL 10 | #endif 11 | 12 | /*! \file InterfaceReflector.h 13 | \brief Header for reflector generation interface. 14 | 15 | Declaration of interface for reflector objects. 16 | @see Structs 17 | @see generateGrid() 18 | @see generateGridf() 19 | */ 20 | extern "C" 21 | { 22 | PYPO_DLL void generateGrid(reflparams refl, reflcontainer *container, 23 | bool transform=true, bool spheric=true); 24 | 25 | PYPO_DLL void generateGridf(reflparamsf refl, reflcontainerf *container, 26 | bool transform=true, bool spheric=true); 27 | } 28 | #endif 29 | -------------------------------------------------------------------------------- /tests/test_Sellmeier.py: -------------------------------------------------------------------------------- 1 | """! 2 | @file 3 | Script for testing the Sellmeier implementation for PyPO. 4 | """ 5 | 6 | from nose2.tools import params 7 | 8 | try: 9 | from . import TestTemplates 10 | except ImportError: 11 | import TestTemplates 12 | 13 | import unittest 14 | import numpy as np 15 | 16 | from PyPO.Sellmeier import BK7, FS 17 | 18 | class Test_Sellmeier(unittest.TestCase): 19 | def test_BK7(self): 20 | lam = 2.5e-3 21 | ntest = 1.4860 22 | bk7 = BK7(lam) 23 | 24 | self.assertAlmostEqual(bk7.n, ntest, delta=1e-3) 25 | 26 | def test_FS(self): 27 | lam = 2.5e-3 28 | ntest = 1.4298 29 | fs = FS(lam) 30 | 31 | self.assertAlmostEqual(fs.n, ntest, delta=1e-3) 32 | 33 | if __name__ == "__main__": 34 | import nose2 35 | nose2.main() 36 | -------------------------------------------------------------------------------- /docs/index.js: -------------------------------------------------------------------------------- 1 | var index = 2 | [ 3 | [ "Introduction", "index.html#intro_sec", null ], 4 | [ "Installation", "index.html#inst", [ 5 | [ "Install From Source", "index.html#sdist", [ 6 | [ "Prerequisites", "index.html#General", null ], 7 | [ "Linux", "index.html#linux", null ], 8 | [ "MacOS", "index.html#macos", null ], 9 | [ "Windows", "index.html#windows", null ], 10 | [ "Dev Install", "index.html#devinstall", null ] 11 | ] ], 12 | [ "Using PyPO On GPU", "index.html#cuda", null ], 13 | [ "Optional Dependencies", "index.html#optdep", null ] 14 | ] ], 15 | [ "User Manual", "index.html#man", null ], 16 | [ "Contributor Guidelines", "index.html#main_contribguidelines", null ], 17 | [ "License", "index.html#license", null ], 18 | [ "Contact", "index.html#contact", null ] 19 | ]; -------------------------------------------------------------------------------- /docs/search/files_7.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['inputdescription_2epy_0',['InputDescription.py',['../InputDescription_8py.html',1,'']]], 4 | ['inputwidgetinterfaces_2epy_1',['inputWidgetInterfaces.py',['../inputWidgetInterfaces_8py.html',1,'']]], 5 | ['interfacebeam_2ecpp_2',['InterfaceBeam.cpp',['../InterfaceBeam_8cpp.html',1,'']]], 6 | ['interfacebeam_2eh_3',['InterfaceBeam.h',['../InterfaceBeam_8h.html',1,'']]], 7 | ['interfacecpu_2ecpp_4',['InterfaceCPU.cpp',['../InterfaceCPU_8cpp.html',1,'']]], 8 | ['interfacecpu_2eh_5',['InterfaceCPU.h',['../InterfaceCPU_8h.html',1,'']]], 9 | ['interfacecuda_2eh_6',['InterfaceCUDA.h',['../InterfaceCUDA_8h.html',1,'']]], 10 | ['interfacereflector_2ecpp_7',['InterfaceReflector.cpp',['../InterfaceReflector_8cpp.html',1,'']]], 11 | ['interfacereflector_2eh_8',['InterfaceReflector.h',['../InterfaceReflector_8h.html',1,'']]] 12 | ]; 13 | -------------------------------------------------------------------------------- /docs/search/functions_8.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['h_0',['H',['../classPyPO_1_1PyPOTypes_1_1resContainer.html#a03eb3e3a141b1b280f983959e006552d',1,'PyPO::PyPOTypes::resContainer']]], 4 | ['has_5fcuda_1',['has_CUDA',['../Checks_8py.html#a34775586534cfcede50a1717460ed921',1,'PyPO::Checks']]], 5 | ['homereflector_2',['homeReflector',['../group__public__api__reflmeths.html#ga2b5c6750b32a4cd9e9987bdf122a96f0',1,'PyPO::System::System']]], 6 | ['hybridguipropagation_3',['hybridGUIPropagation',['../classPyPO_1_1System_1_1System.html#a9b3c1fa2ef91cfee2cece9a6206fd9b9',1,'PyPO::System::System']]], 7 | ['hyperbola_5fuv_4',['Hyperbola_uv',['../InterfaceReflector_8cpp.html#a45cdd8e8d3b7f60bf94997ca5bfee4f8',1,'InterfaceReflector.cpp']]], 8 | ['hyperbola_5fxy_5',['Hyperbola_xy',['../InterfaceReflector_8cpp.html#a7433b1e9e2c9d8768fa0ec3610315fe2',1,'InterfaceReflector.cpp']]] 9 | ]; 10 | -------------------------------------------------------------------------------- /docs/search/mag.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 12 | 14 | 20 | 24 | 25 | -------------------------------------------------------------------------------- /docs/search/mag_d.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 12 | 14 | 20 | 24 | 25 | -------------------------------------------------------------------------------- /docs/search/variables_2.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['dx_0',['dx',['../structcframe.html#a55264c00549bead5cfaa2edb45b160a0',1,'cframe::dx'],['../structcframef.html#ac1d5bdfd60150334db22ea0c8ff2a6d6',1,'cframef::dx']]], 4 | ['dxyz_1',['dxyz',['../structGPODict.html#a7f9b344d7b053670b7f7993e298744eb',1,'GPODict::dxyz'],['../structScalarGPODict.html#a3ea8d410d081ea344eed894a93b51032',1,'ScalarGPODict::dxyz'],['../structGPODictf.html#a04d94210dddb4f38675bebe8c0666a19',1,'GPODictf::dxyz'],['../structScalarGPODictf.html#a7dcfac92a68207b17d8d8aebfc45d2f4',1,'ScalarGPODictf::dxyz']]], 5 | ['dy_2',['dy',['../structcframe.html#acc86a8406e9dde7c8e6b59e315691886',1,'cframe::dy'],['../structcframef.html#a4290e80d1c82e717936969318b365cb3',1,'cframef::dy']]], 6 | ['dz_3',['dz',['../structcframe.html#abe50267e98be52be2bb72eb9802cc47d',1,'cframe::dz'],['../structcframef.html#af95ad7b4f4cb56f0f9132cda4a94785c',1,'cframef::dz']]] 7 | ]; 8 | -------------------------------------------------------------------------------- /docs/search/classes_6.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['gpodict_0',['GPODict',['../structGPODict.html',1,'GPODict'],['../classPyPO_1_1Structs_1_1GPODict.html',1,'PyPO.Structs.GPODict']]], 4 | ['gpodictf_1',['GPODictf',['../structGPODictf.html',1,'GPODictf'],['../classPyPO_1_1Structs_1_1GPODictf.html',1,'PyPO.Structs.GPODictf']]], 5 | ['groupnameerror_2',['GroupNameError',['../classPyPO_1_1Checks_1_1GroupNameError.html',1,'PyPO::Checks']]], 6 | ['groupwidget_3',['GroupWidget',['../classGUI_1_1ElementWidget_1_1GroupWidget.html',1,'GUI::ElementWidget']]], 7 | ['grtdict_4',['GRTDict',['../structGRTDict.html',1,'GRTDict'],['../classPyPO_1_1Structs_1_1GRTDict.html',1,'PyPO.Structs.GRTDict']]], 8 | ['grtdictf_5',['GRTDictf',['../structGRTDictf.html',1,'GRTDictf'],['../classPyPO_1_1Structs_1_1GRTDictf.html',1,'PyPO.Structs.GRTDictf']]], 9 | ['guilogger_6',['GUILogger',['../classPyPO_1_1CustomLogger_1_1GUILogger.html',1,'PyPO::CustomLogger']]] 10 | ]; 11 | -------------------------------------------------------------------------------- /docs/search/classes_8.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['inputdescription_0',['InputDescription',['../classGUI_1_1ParameterForms_1_1InputDescription_1_1InputDescription.html',1,'GUI::ParameterForms::InputDescription']]], 4 | ['inputdescriptionerror_1',['InputDescriptionError',['../classGUI_1_1utils_1_1InputDescriptionError.html',1,'GUI::utils']]], 5 | ['inputpoerror_2',['InputPOError',['../classPyPO_1_1Checks_1_1InputPOError.html',1,'PyPO::Checks']]], 6 | ['inputreflerror_3',['InputReflError',['../classPyPO_1_1Checks_1_1InputReflError.html',1,'PyPO::Checks']]], 7 | ['inputrterror_4',['InputRTError',['../classPyPO_1_1Checks_1_1InputRTError.html',1,'PyPO::Checks']]], 8 | ['inputwidgetinterface_5',['inputWidgetInterface',['../classGUI_1_1ParameterForms_1_1inputWidgetInterfaces_1_1inputWidgetInterface.html',1,'GUI::ParameterForms::inputWidgetInterfaces']]], 9 | ['intype_6',['inType',['../classGUI_1_1utils_1_1inType.html',1,'GUI::utils']]] 10 | ]; 11 | -------------------------------------------------------------------------------- /src/common/InterfaceBeam.h: -------------------------------------------------------------------------------- 1 | #include "BeamInit.h" 2 | #include "Structs.h" 3 | 4 | #ifdef _WIN32 5 | # define PYPO_DLL __declspec(dllexport) 6 | #else 7 | # define PYPO_DLL 8 | #endif 9 | 10 | #ifndef InterfaceBeam_h 11 | #define InterfaceBeam_h 12 | 13 | /*! \file InterfaceBeam.h 14 | \brief Header for beam initialization interface. 15 | 16 | Declaration of interface for initializing ray-trace frames and PO beams. 17 | */ 18 | 19 | extern "C" 20 | { 21 | PYPO_DLL void makeRTframe(RTDict rdict, cframe *fr); 22 | 23 | PYPO_DLL void makeGRTframe(GRTDict grdict, cframe *fr); 24 | 25 | PYPO_DLL void makeGauss(GPODict gdict, reflparams plane, c2Bundle *res_field, c2Bundle *res_current); 26 | 27 | PYPO_DLL void makeScalarGauss(ScalarGPODict sgdict, reflparams plane, arrC1 *res_field); 28 | 29 | PYPO_DLL void calcCurrents(c2Bundle *res_field, c2Bundle *res_current, reflparams rdict, int mode); 30 | } 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /docs/search/variables_e.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['tchief_0',['tChief',['../structRTDictf.html#ae9e47b54717ddc25848d8f5b2b3186f3',1,'RTDictf::tChief'],['../structGRTDictf.html#aa005f4727eceb7d21e7d0e8902959db7',1,'GRTDictf::tChief']]], 4 | ['threadpool_1',['threadPool',['../classPropagation.html#a2a5c3d3e2dfef55d84e3c561db8e5610',1,'Propagation::threadPool'],['../classRayTracer.html#a20d7d1fcca98cb681c8436a024b2092b',1,'RayTracer::threadPool']]], 5 | ['transf_2',['transf',['../structreflparams.html#a8434d4e674be3ec03170fb0088e2c760',1,'reflparams::transf'],['../structreflparamsf.html#a15b792a2a65a1834a09990a17ed649dd',1,'reflparamsf::transf']]], 6 | ['tubertdict_3',['TubeRTDict',['../group__public__api__templates.html#ga14d4e4e0e7614d86723a063101b9589c',1,'PyPO::Templates']]], 7 | ['type_4',['type',['../structreflparams.html#a8ac54ddf87ce608439170fc70bbddb4d',1,'reflparams::type'],['../structreflparamsf.html#aee4936b839c62673c1d12a2924579e32',1,'reflparamsf::type']]] 8 | ]; 9 | -------------------------------------------------------------------------------- /docs/search/functions_c.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['ne_0',['ne',['../classRTRefls.html#a170c833e1bd5e0e939961e99b1571f13',1,'RTRefls::ne()'],['../KernelsRTf_8cu.html#ab9b820f2d992c2e30a79f0a0bb899240',1,'ne(): KernelsRTf.cu']]], 4 | ['nh_1',['nh',['../classRTRefls.html#ab43f854e2976d9d926ad592cb0dbac4c',1,'RTRefls::nh()'],['../KernelsRTf_8cu.html#a5031891e820b84beb3d1a7e19763f474',1,'nh(): KernelsRTf.cu']]], 5 | ['normalize_2',['normalize',['../classUtils.html#a3db4ae94a1e9d5f55ff5b93a81f718ff',1,'Utils::normalize()'],['../GUtils_8h.html#ac6365a1b5589b457915196e459e9ceae',1,'normalize(): GUtils.h']]], 6 | ['np_3',['np',['../classRTRefls.html#aa85c63cb82a4867e0141647f20410dda',1,'RTRefls::np()'],['../KernelsRTf_8cu.html#a8e1559c2ea648b1288085b2faf63bad7',1,'np(): KernelsRTf.cu']]], 7 | ['npl_4',['npl',['../classRTRefls.html#a0121b3c72f73eff31898ab2f39d1ae39',1,'RTRefls::npl()'],['../KernelsRTf_8cu.html#ae03d7f2f3141a07eca2cd1e6cc6040da',1,'npl(): KernelsRTf.cu']]] 8 | ]; 9 | -------------------------------------------------------------------------------- /tests/test_SystemGrids.py: -------------------------------------------------------------------------------- 1 | """! 2 | @file 3 | Tests for checking if grids in PyPO are correct 4 | """ 5 | 6 | import unittest 7 | import ctypes 8 | 9 | from nose2.tools import params 10 | 11 | try: 12 | from . import TestTemplates 13 | except ImportError: 14 | import TestTemplates 15 | 16 | import PyPO.BindRefl as refllibs 17 | import PyPO.PyPOTypes as pypotypes 18 | 19 | from PyPO.System import System 20 | 21 | class Test_SystemGrids(unittest.TestCase): 22 | def setUp(self): 23 | self.s = TestTemplates.getSystemWithReflectors() 24 | 25 | def test_loadRefllib(self): 26 | lib = refllibs.loadRefllib() 27 | self.assertEqual(type(lib), ctypes.CDLL) 28 | 29 | @params(*TestTemplates.getAllSurfList()) 30 | def test_generateGrids(self, element): 31 | grids = self.s.generateGrids(element["name"]) 32 | self.assertEqual(type(grids), pypotypes.reflGrids) 33 | 34 | if __name__ == "__main__": 35 | import nose2 36 | nose2.main() 37 | -------------------------------------------------------------------------------- /src/GUI/PlotScreen.py: -------------------------------------------------------------------------------- 1 | """! 2 | @file 3 | Defines a matplotlib plot widget that can be placed in the GUI. 4 | """ 5 | 6 | from PySide6.QtWidgets import QWidget, QVBoxLayout 7 | from matplotlib import use 8 | from matplotlib.figure import Figure 9 | from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg, NavigationToolbar2QT as NavigationToolbar 10 | 11 | use('Qt5Agg') 12 | class MplCanvas(FigureCanvasQTAgg): 13 | def __init__(self, fig): 14 | super(MplCanvas, self).__init__(fig) 15 | self.setStyleSheet("background-color:transparent;") 16 | 17 | 18 | class PlotScreen(QWidget): 19 | """! 20 | Plot widget for the GUI. 21 | """ 22 | def __init__(self, fig: Figure, parent = None): 23 | super().__init__(parent=parent) 24 | # fig.set_facecolor("none") 25 | canvas = MplCanvas(fig) 26 | NavTB = NavigationToolbar(canvas, self) 27 | 28 | layout = QVBoxLayout(self) 29 | layout.addWidget(NavTB) 30 | layout.addWidget(canvas) 31 | -------------------------------------------------------------------------------- /docs/search/classes_0.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['accordion_0',['Accordion',['../classGUI_1_1Accordion_1_1Accordion.html',1,'GUI::Accordion']]], 4 | ['accordionsection_1',['AccordionSection',['../classGUI_1_1Accordion_1_1Accordion_1_1AccordionSection.html',1,'GUI::Accordion::Accordion']]], 5 | ['apershapes_2',['AperShapes',['../classPyPO_1_1Enums_1_1AperShapes.html',1,'PyPO::Enums']]], 6 | ['apertureerror_3',['ApertureError',['../classPyPO_1_1Checks_1_1ApertureError.html',1,'PyPO::Checks']]], 7 | ['arrc1_4',['arrC1',['../structarrC1.html',1,'arrC1'],['../classPyPO_1_1Structs_1_1arrC1.html',1,'PyPO.Structs.arrC1']]], 8 | ['arrc1f_5',['arrC1f',['../structarrC1f.html',1,'arrC1f'],['../classPyPO_1_1Structs_1_1arrC1f.html',1,'PyPO.Structs.arrC1f']]], 9 | ['arrr3_6',['arrR3',['../structarrR3.html',1,'arrR3'],['../classPyPO_1_1Structs_1_1arrR3.html',1,'PyPO.Structs.arrR3']]], 10 | ['arrr3f_7',['arrR3f',['../structarrR3f.html',1,'arrR3f'],['../classPyPO_1_1Structs_1_1arrR3f.html',1,'PyPO.Structs.arrR3f']]] 11 | ]; 12 | -------------------------------------------------------------------------------- /docs/search/close.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 12 | 14 | 18 | 19 | -------------------------------------------------------------------------------- /src/PyPO/PlotConfig.py: -------------------------------------------------------------------------------- 1 | """! 2 | @file 3 | File containing the definitions for plotting style. 4 | Also enables LaTeX backend if present. 5 | """ 6 | 7 | import matplotlib.pyplot as pt 8 | import matplotlib 9 | from shutil import which as find_executable 10 | 11 | if find_executable('latex'): 12 | 13 | matplotlib.rcParams.update({ 14 | 'font.size': 15, 15 | 'text.usetex': True, 16 | 'text.latex.preamble': r'\usepackage{amsmath}', 17 | 'text.latex.preamble': r'\usepackage{amssymb}', 18 | 'text.latex.preamble': r'\usepackage[utf8]{inputenc}', 19 | 'text.latex.preamble': r'\usepackage{siunitx}' 20 | }) 21 | 22 | matplotlib.rcParams['mathtext.fontset'] = 'stix' 23 | matplotlib.rcParams['font.family'] = 'STIXGeneral' 24 | 25 | pt.rcParams['xtick.top'] = True 26 | pt.rcParams['ytick.right'] = True 27 | 28 | pt.rcParams['xtick.direction'] = "in" 29 | pt.rcParams['ytick.direction'] = "in" 30 | 31 | pt.rcParams['xtick.minor.visible'] = True 32 | pt.rcParams['ytick.minor.visible'] = True 33 | -------------------------------------------------------------------------------- /src/PyPO/Config.py: -------------------------------------------------------------------------------- 1 | """! 2 | @file 3 | Functions to set context for the logging and error checking. 4 | """ 5 | 6 | context = "S" 7 | 8 | def setContext(_context=None): 9 | """! 10 | Set the context in which PyPO is run. 11 | 12 | If the context is set to "S", PyPO assumes it is run in scripting mode and use the regular output streams and methods. 13 | If the context is set to "G", PyPO assumes it is run in GUI mode and will not output to the standard output. 14 | Also, PyPO will use special GUI methods. 15 | """ 16 | 17 | global context 18 | context = "S" if _context is None else _context 19 | 20 | def setOverride(_override=None): 21 | """! 22 | Set the override parameter. 23 | 24 | If the parameter is set to True, PyPO will overwrite entries with identical names. 25 | If False, PyPO will append the number of occurences of the name to the name, so that there are no duplicates anymore. 26 | """ 27 | 28 | global override 29 | override = True if _override is None else _override 30 | -------------------------------------------------------------------------------- /docs/search/functions_a.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['loadbeamlib_0',['loadBeamlib',['../BindBeam_8py.html#a5a24840686571bc0e14536d3860cfe2c',1,'PyPO::BindBeam']]], 4 | ['loadcpulib_1',['loadCPUlib',['../BindCPU_8py.html#a8399836b880e05a0bd1fad787d53aeb1',1,'PyPO::BindCPU']]], 5 | ['loadgpulib_2',['loadGPUlib',['../BindGPU_8py.html#a40a3fc036f857cb8842034a8c0f2d18d',1,'PyPO::BindGPU']]], 6 | ['loadrefllib_3',['loadRefllib',['../BindRefl_8py.html#ac6604b085e10834536acf5053b6f88c3',1,'PyPO::BindRefl']]], 7 | ['loadsystem_4',['loadSystem',['../group__public__api__sysio.html#gaf7a286268d5d675b5449e0baae6186e8',1,'PyPO.System.System.loadSystem()'],['../classGUI_1_1MainWindow_1_1MainWidget.html#a572c25b71e67f53a380e7964f00047d7',1,'GUI.MainWindow.MainWidget.loadSystem()']]], 8 | ['loadsystemform_5',['loadSystemForm',['../formData_8py.html#ab9fb8bf0bbd26a80d55ea1a7b239bd3f',1,'GUI::ParameterForms::formData']]], 9 | ['loadtransflib_6',['loadTransflib',['../BindTransf_8py.html#a19d26a1ebea74e8f9ef304a41b45f511',1,'PyPO::BindTransf']]] 10 | ]; 11 | -------------------------------------------------------------------------------- /src/CUDA/Debug.h: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #ifndef __Debug_h 4 | #define __Debug_h 5 | 6 | /*! \file Debug.h 7 | \brief Methods for printing complex or real arrays of length 3 for GPU. 8 | */ 9 | 10 | __host__ __device__ inline void _debugArray(cuFloatComplex arr[3]); 11 | __host__ __device__ inline void _debugArray(float arr[3]); 12 | 13 | #endif 14 | 15 | /** 16 | * Debug complex array. 17 | * 18 | * Print complex array of size 3. 19 | * Useful for debugging. 20 | 21 | * @param arr Array of 3 cuFloatComplex. 22 | */ 23 | __host__ __device__ inline void _debugArray(cuFloatComplex arr[3]) 24 | { 25 | printf("%e + %ej, %e + %ej, %e + %ej\n", arr[0].x, arr[0].y, arr[1].x, arr[1].y, arr[2].x, arr[2].y); 26 | } 27 | 28 | /** 29 | * Debug real array. 30 | * 31 | * Print real valued array of size 3. 32 | * Useful for debugging. 33 | 34 | * @param arr Array of 3 float. 35 | */ 36 | __host__ __device__ inline void _debugArray(float arr[3]) 37 | { 38 | printf("%e, %e, %e\n", arr[0], arr[1], arr[2]); 39 | } 40 | 41 | -------------------------------------------------------------------------------- /docs/search/variables_0.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['angx0_0',['angx0',['../structRTDict.html#a0cb7d42914c6dc4662a1cc7b5860f9cd',1,'RTDict::angx0'],['../structGRTDict.html#a9efa97d168b96234641b0ad9b30a0d5b',1,'GRTDict::angx0'],['../structRTDictf.html#a51a3051614c53abd0d25ed06ec295868',1,'RTDictf::angx0'],['../structGRTDictf.html#a63f4f94f2688a8bdc64f318ac35d0e87',1,'GRTDictf::angx0']]], 4 | ['angy0_1',['angy0',['../structRTDict.html#adadd95c25b6de8e07e033cfcaeda9e19',1,'RTDict::angy0'],['../structGRTDict.html#aa56e376d1ec7cd4c85c110123bffb632',1,'GRTDict::angy0'],['../structRTDictf.html#abb3c5062ca338f987b0b2a246e109b7e',1,'RTDictf::angy0'],['../structGRTDictf.html#a5301a75169901b4be4b452e10c0751bc',1,'GRTDictf::angy0']]], 5 | ['aperdict_2',['aperDict',['../group__public__api__templates.html#gaa75cc979d969bd54a7abf8917747221a',1,'PyPO::Templates']]], 6 | ['area_3',['area',['../structreflcontainer.html#a30e6e031b9a4549999a7f32367758b6f',1,'reflcontainer::area'],['../structreflcontainerf.html#a65245cae517c44a51e234dbc378011b1',1,'reflcontainerf::area']]] 7 | ]; 8 | -------------------------------------------------------------------------------- /tests/test_MatUtils.py: -------------------------------------------------------------------------------- 1 | """! 2 | @file 3 | Script for testing the matrix utilities of PyPO. 4 | """ 5 | 6 | import unittest 7 | import numpy as np 8 | 9 | from PyPO.MatUtils import findConnectedSubsets 10 | 11 | class Test_MatUtils(unittest.TestCase): 12 | def test_findConnectedSubsets(self): 13 | mat = np.zeros((6,6)) 14 | mat[1,2] = 1 15 | mat[0,2] = 1 16 | mat[2,2] = 1 17 | mat[1,3] = 1 18 | mat[1,1] = 1 19 | 20 | lims_0_check = [0, 1, 2] 21 | lims_1_check = [1, 2, 3] 22 | 23 | mat[5,5] = 1 24 | mat[5,4] = 1 25 | mat[5,3] = 1 26 | mat[5,2] = 1 27 | 28 | component = 1 29 | idx_start = [1,2] 30 | 31 | x, y = findConnectedSubsets(mat, component, idx_start) 32 | for l0, xx in zip(lims_0_check, x): 33 | self.assertEqual(l0, xx) 34 | for l1, yy in zip(lims_1_check, y): 35 | self.assertEqual(l1, yy) 36 | 37 | if __name__ == "__main__": 38 | import nose2 39 | nose2.main() 40 | -------------------------------------------------------------------------------- /docs/search/all_18.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['y_0',['y',['../structarrC1.html#a989c527d622043725ce74e360159b106',1,'arrC1::y'],['../structarrR3.html#ab8bae9f6dedda7b527f398325743416f',1,'arrR3::y'],['../structreflcontainer.html#ad31bfa13eb03f8aa553b7c6174760da3',1,'reflcontainer::y'],['../structcframe.html#afa6166d62b9ad2849113d7cd7ce8bd6b',1,'cframe::y'],['../structarrC1f.html#a2275f460c9b1bb2d6fc619eee2d907cd',1,'arrC1f::y'],['../structarrR3f.html#abf6b0ef756b5ad4d87087a8703dfde7b',1,'arrR3f::y'],['../structreflcontainerf.html#aa1f55fbf52b4d94914da84c5eef2e66a',1,'reflcontainerf::y'],['../structcframef.html#ac8c3b8592d624bc2ed1d0d9ba01a5787',1,'cframef::y']]], 4 | ['y0_1',['y0',['../structRTDict.html#a925eeee8abaf47063c4dc26d7e493b95',1,'RTDict::y0'],['../structGRTDict.html#aeef592b5cc3c70951138488180c3a7e3',1,'GRTDict::y0'],['../structRTDictf.html#a2434193c309863e4f93648ccf6898dc5',1,'RTDictf::y0'],['../structGRTDictf.html#af45540e2f1f21e6b797000e02682e112',1,'GRTDictf::y0']]], 5 | ['yax_2',['YAX',['../WorldParam_8py.html#a7478825a2e538caef208026f95a9a21c',1,'PyPO::WorldParam']]] 6 | ]; 7 | -------------------------------------------------------------------------------- /docs/search/variables_11.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['x_0',['x',['../structarrC1.html#add88d689eb190af7ca09193966607028',1,'arrC1::x'],['../structarrR3.html#a7c715a534bde12c136b18835bb3521a6',1,'arrR3::x'],['../structreflcontainer.html#aecd509d495f5ef98bb17eb4139ec8332',1,'reflcontainer::x'],['../structcframe.html#aeb88dd2bee588aceff6e355c9cde20d0',1,'cframe::x'],['../structarrC1f.html#aaae34bd8e7ee4223ecd1fd6864ad5045',1,'arrC1f::x'],['../structarrR3f.html#ab54d6ba64a133dfa4aee1e49a17fbf52',1,'arrR3f::x'],['../structreflcontainerf.html#a8c882a3f3313f28e9f80d2490563e055',1,'reflcontainerf::x'],['../structcframef.html#aecfafdaef1299cf688c14f0f327e2764',1,'cframef::x']]], 4 | ['x0_1',['x0',['../structRTDict.html#a98f3101f04833af81940fc05505b1ec4',1,'RTDict::x0'],['../structGRTDict.html#a759b45a6b4a49b5f6736d1d81d47a81a',1,'GRTDict::x0'],['../structRTDictf.html#a2a41a02df0c8414a205d4444f7dba6c5',1,'RTDictf::x0'],['../structGRTDictf.html#a895596f1d77ae2e9e491fc1d50369b2b',1,'GRTDictf::x0']]], 5 | ['xax_2',['XAX',['../WorldParam_8py.html#ad9bc912ba0d13c8cf8452ce56ba9b5cb',1,'PyPO::WorldParam']]] 6 | ]; 7 | -------------------------------------------------------------------------------- /docs/search/variables_12.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['y_0',['y',['../structarrC1.html#a989c527d622043725ce74e360159b106',1,'arrC1::y'],['../structarrR3.html#ab8bae9f6dedda7b527f398325743416f',1,'arrR3::y'],['../structreflcontainer.html#ad31bfa13eb03f8aa553b7c6174760da3',1,'reflcontainer::y'],['../structcframe.html#afa6166d62b9ad2849113d7cd7ce8bd6b',1,'cframe::y'],['../structarrC1f.html#a2275f460c9b1bb2d6fc619eee2d907cd',1,'arrC1f::y'],['../structarrR3f.html#abf6b0ef756b5ad4d87087a8703dfde7b',1,'arrR3f::y'],['../structreflcontainerf.html#aa1f55fbf52b4d94914da84c5eef2e66a',1,'reflcontainerf::y'],['../structcframef.html#ac8c3b8592d624bc2ed1d0d9ba01a5787',1,'cframef::y']]], 4 | ['y0_1',['y0',['../structRTDict.html#a925eeee8abaf47063c4dc26d7e493b95',1,'RTDict::y0'],['../structGRTDict.html#aeef592b5cc3c70951138488180c3a7e3',1,'GRTDict::y0'],['../structRTDictf.html#a2434193c309863e4f93648ccf6898dc5',1,'RTDictf::y0'],['../structGRTDictf.html#af45540e2f1f21e6b797000e02682e112',1,'GRTDictf::y0']]], 5 | ['yax_2',['YAX',['../WorldParam_8py.html#a7478825a2e538caef208026f95a9a21c',1,'PyPO::WorldParam']]] 6 | ]; 7 | -------------------------------------------------------------------------------- /docs/search/classes_5.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['f2_0',['F2',['../classPyPO_1_1Sellmeier_1_1F2.html',1,'PyPO::Sellmeier']]], 4 | ['fieldcomponents_1',['FieldComponents',['../classPyPO_1_1Enums_1_1FieldComponents.html',1,'PyPO::Enums']]], 5 | ['fieldnameerror_2',['FieldNameError',['../classPyPO_1_1Checks_1_1FieldNameError.html',1,'PyPO::Checks']]], 6 | ['fields_3',['fields',['../classPyPO_1_1PyPOTypes_1_1fields.html',1,'PyPO::PyPOTypes']]], 7 | ['fieldswidget_4',['FieldsWidget',['../classGUI_1_1ElementWidget_1_1FieldsWidget.html',1,'GUI::ElementWidget']]], 8 | ['formgenerator_5',['FormGenerator',['../classGUI_1_1ParameterForms_1_1formGenerator_1_1FormGenerator.html',1,'GUI::ParameterForms::formGenerator']]], 9 | ['frame_6',['frame',['../classPyPO_1_1PyPOTypes_1_1frame.html',1,'PyPO::PyPOTypes']]], 10 | ['framenameerror_7',['FrameNameError',['../classPyPO_1_1Checks_1_1FrameNameError.html',1,'PyPO::Checks']]], 11 | ['framewidget_8',['FrameWidget',['../classGUI_1_1ElementWidget_1_1FrameWidget.html',1,'GUI::ElementWidget']]], 12 | ['fs_9',['FS',['../classPyPO_1_1Sellmeier_1_1FS.html',1,'PyPO::Sellmeier']]] 13 | ]; 14 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 Arend Moerman 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /docs/search/mag_sel.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 13 | 15 | 21 | 26 | 31 | 32 | -------------------------------------------------------------------------------- /docs/search/mag_seld.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 13 | 15 | 21 | 26 | 31 | 32 | -------------------------------------------------------------------------------- /src/PyPO/WorldParam.py: -------------------------------------------------------------------------------- 1 | """! 2 | @file 3 | Set global world parameters for PyPO. 4 | """ 5 | 6 | import numpy as np 7 | 8 | ORIGIN = np.zeros(3) 9 | XAX = np.array([1, 0, 0]) 10 | YAX = np.array([0, 1, 0]) 11 | ZAX = np.array([0, 0, 1]) 12 | 13 | IAX = ZAX 14 | 15 | INITM = np.eye(4) 16 | 17 | def ORIGIN(): 18 | """! 19 | Set origin of co-ordinate system. 20 | """ 21 | 22 | return np.zeros(3) 23 | 24 | def XAX(): 25 | """! 26 | Set x-axis of co-ordinate system. 27 | """ 28 | 29 | return np.array([1, 0, 0]) 30 | 31 | def YAX(): 32 | """! 33 | Set y-axis of co-ordinate system. 34 | """ 35 | 36 | return np.array([0, 1, 0]) 37 | 38 | def ZAX(): 39 | """! 40 | Set z-axis of co-ordinate system. 41 | """ 42 | 43 | return np.array([0, 0, 1]) 44 | 45 | def IAX(): 46 | """! 47 | Set reference axis of co-ordinate system. 48 | Used as standard direction in PyPO. 49 | """ 50 | 51 | return ZAX() 52 | 53 | def INITM(): 54 | """! 55 | Set initial transformation matrix of object. 56 | Defaults to 4x4 identity matrix. 57 | """ 58 | 59 | return np.eye(4) 60 | -------------------------------------------------------------------------------- /src/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.16.3) 2 | 3 | # Locate GTest 4 | find_package(GTest REQUIRED) 5 | include_directories(${GTEST_INCLUDE_DIRS}) 6 | 7 | enable_testing() 8 | 9 | include(GoogleTest) 10 | 11 | # Link runTests with what we want to test and the GTest and pthread library 12 | add_executable(runTests include/tests/test_Utils.cpp) 13 | target_link_libraries(runTests ${GTEST_LIBRARIES} GTest::gtest_main) 14 | set_target_properties(runTests PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/bin") 15 | if(NOT WIN32) 16 | target_link_libraries(runTests pthread) 17 | endif() 18 | gtest_discover_tests(runTests) 19 | 20 | include(CheckLanguage) 21 | check_language(CUDA) 22 | 23 | if(CMAKE_CUDA_COMPILER) 24 | add_executable(runCUDATests include/tests/test_GUtils.cpp) 25 | set_target_properties(runCUDATests PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/bin") 26 | 27 | target_link_libraries(runCUDATests ${GTEST_LIBRARIES} GTest::gtest_main) 28 | 29 | if(NOT WIN32) 30 | target_link_libraries(runCUDATests pthread) 31 | endif() 32 | gtest_discover_tests(runCUDATests) 33 | else() 34 | message(STATUS "WARNING: no CUDA compiler detected. Not building CUDA tests") 35 | endif() 36 | 37 | -------------------------------------------------------------------------------- /docs/search/all_14.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['units_0',['Units',['../classPyPO_1_1Enums_1_1Units.html',1,'PyPO::Enums']]], 4 | ['unsavedchanges_1',['unsavedChanges',['../classGUI_1_1MainWindow_1_1MainWidget.html#abe819bcb72381570a27c6204dda391e5',1,'GUI::MainWindow::MainWidget']]], 5 | ['unsavedchangesdialog_2',['UnsavedChangesDialog',['../classGUI_1_1Dialogs_1_1UnsavedChangesDialog.html',1,'GUI::Dialogs']]], 6 | ['user_20manual_3',['User Manual',['../index.html#man',1,'']]], 7 | ['using_20pypo_20on_20gpu_4',['Using PyPO On GPU',['../index.html#cuda',1,'']]], 8 | ['ut_5',['ut',['../classPropagation.html#a03debe9247f26aae02e9c2979251bdde',1,'Propagation::ut'],['../classRayTracer.html#a2f9aaccce6775a7b69c02700c6077805',1,'RayTracer::ut']]], 9 | ['utils_6',['Utils',['../classUtils.html',1,'']]], 10 | ['utils_2eh_7',['Utils.h',['../Utils_8h.html',1,'']]], 11 | ['utils_2epy_8',['utils.py',['../utils_8py.html',1,'']]], 12 | ['utils_3c_20v_20_3e_9',['Utils< V >',['../classUtils.html',1,'']]], 13 | ['uv_20parameterisation_10',['Optional Fields For "uv" Parameterisation',['../basictut4.html#basictut4_uv_opts',1,'']]], 14 | ['uv_5fopts_11',['uv_opts',['../formData_8py.html#a1f764c8ddc2af707056c90185f740465',1,'GUI::ParameterForms::formData']]] 15 | ]; 16 | -------------------------------------------------------------------------------- /doxy/Documentation.dox: -------------------------------------------------------------------------------- 1 | /** 2 | \page pypodocs Documentation 3 | This page contains the software documentation for `PyPO`. 4 | 5 | \section apiref Public API Reference 6 | The public API reference contains all public methods of `PyPO`. 7 | This list acts as a reference for general users and is structured in groups for a better overview. 8 | 9 | \subpage public_api_sysio 10 | 11 | \subpage public_api_common 12 | 13 | \subpage public_api_reflmeths 14 | 15 | \subpage public_api_frames 16 | 17 | \subpage public_api_po 18 | 19 | \subpage public_api_argopts 20 | 21 | \subpage public_api_vis 22 | 23 | \section input_templates Input Dictionary Templates & Datatypes 24 | This section contains an overview of all dictionaries used in `PyPO` as input. 25 | This includes reflector dictionaries, input beam pattern dictionaries, frame dictionaries, etc. 26 | Also, the datatype classes, such as frames and PO fields, are referenced here. 27 | 28 | \subpage public_api_templates 29 | 30 | \subpage public_api_types 31 | 32 | \section fulldocs Full Software Documentation 33 | This page contains the entire documented source code, including the GUI source code. 34 | It is mostly aimed towards developers wanting to work on `PyPO` and/or the GUI. 35 | 36 | [Full software documentation](files.html) 37 | */ 38 | -------------------------------------------------------------------------------- /docs/search/classes_9.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['mainwidget_0',['MainWidget',['../classGUI_1_1MainWindow_1_1MainWidget.html',1,'GUI::MainWindow']]], 4 | ['manager_1',['Manager',['../classPyPO_1_1Threadmgr_1_1Manager.html',1,'PyPO::Threadmgr']]], 5 | ['memutils_2',['MemUtils',['../classMemUtils.html',1,'']]], 6 | ['mergebeamerror_3',['MergeBeamError',['../classPyPO_1_1Checks_1_1MergeBeamError.html',1,'PyPO::Checks']]], 7 | ['metacombinerinputwidget_4',['MetaCombinerInputWidget',['../classGUI_1_1ParameterForms_1_1inputWidgetInterfaces_1_1MetaCombinerInputWidget.html',1,'GUI::ParameterForms::inputWidgetInterfaces']]], 8 | ['metacombinerselectionwidget_5',['MetaCombinerSelectionWidget',['../classGUI_1_1ParameterForms_1_1inputWidgetInterfaces_1_1MetaCombinerSelectionWidget.html',1,'GUI::ParameterForms::inputWidgetInterfaces']]], 9 | ['modes_6',['Modes',['../classPyPO_1_1Enums_1_1Modes.html',1,'PyPO::Enums']]], 10 | ['mplcanvas_7',['MplCanvas',['../classGUI_1_1PlotScreen_1_1MplCanvas.html',1,'GUI::PlotScreen']]], 11 | ['mybutton_8',['MyButton',['../classGUI_1_1utils_1_1MyButton.html',1,'GUI::utils']]], 12 | ['myedit_9',['MyEdit',['../classGUI_1_1utils_1_1MyEdit.html',1,'GUI::utils']]], 13 | ['mylabel_10',['MyLabel',['../classGUI_1_1utils_1_1MyLabel.html',1,'GUI::utils']]] 14 | ]; 15 | -------------------------------------------------------------------------------- /src/PyPO/Threadmgr.py: -------------------------------------------------------------------------------- 1 | """ 2 | @file 3 | File containing the threadmanager class for PyPO. 4 | This class is responsible for launching heavy calculations on a separate daemon thread, 5 | preventing the program from becoming unresponsive. 6 | """ 7 | 8 | import threading 9 | 10 | class Manager(object): 11 | """! 12 | This class generates a threadmanager object. 13 | This manager can start daemon threads and signal when the thread is finished. 14 | This class is only used to spawn calls to the C++/CUDA backend inside a daemon thread so that Python keeps control over the process. 15 | This allows users to Ctrl-c a running calculation in C++/CUDA from Python. 16 | """ 17 | 18 | def __init__(self, context, callback=None): 19 | self.context = context 20 | self.callback = callback 21 | 22 | def new_sthread(self, target, args): 23 | if self.context == "S": 24 | t = threading.Thread(target=target, args=args) 25 | t.daemon = True 26 | t.start() 27 | 28 | while t.is_alive(): # wait for the thread to exit 29 | t.join(.1) 30 | 31 | else: 32 | target(*list(args)) 33 | 34 | def on_thread_finished(self): 35 | if self.callback is not None: 36 | self.callback() 37 | -------------------------------------------------------------------------------- /docs/search/all_17.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['x_0',['x',['../structarrC1.html#add88d689eb190af7ca09193966607028',1,'arrC1::x'],['../structarrR3.html#a7c715a534bde12c136b18835bb3521a6',1,'arrR3::x'],['../structreflcontainer.html#aecd509d495f5ef98bb17eb4139ec8332',1,'reflcontainer::x'],['../structcframe.html#aeb88dd2bee588aceff6e355c9cde20d0',1,'cframe::x'],['../structarrC1f.html#aaae34bd8e7ee4223ecd1fd6864ad5045',1,'arrC1f::x'],['../structarrR3f.html#ab54d6ba64a133dfa4aee1e49a17fbf52',1,'arrR3f::x'],['../structreflcontainerf.html#a8c882a3f3313f28e9f80d2490563e055',1,'reflcontainerf::x'],['../structcframef.html#aecfafdaef1299cf688c14f0f327e2764',1,'cframef::x']]], 4 | ['x0_1',['x0',['../structRTDict.html#a98f3101f04833af81940fc05505b1ec4',1,'RTDict::x0'],['../structGRTDict.html#a759b45a6b4a49b5f6736d1d81d47a81a',1,'GRTDict::x0'],['../structRTDictf.html#a2a41a02df0c8414a205d4444f7dba6c5',1,'RTDictf::x0'],['../structGRTDictf.html#a895596f1d77ae2e9e491fc1d50369b2b',1,'GRTDictf::x0']]], 5 | ['xax_2',['XAX',['../WorldParam_8py.html#ad9bc912ba0d13c8cf8452ce56ba9b5cb',1,'PyPO::WorldParam']]], 6 | ['xy_5fopts_3',['xy_opts',['../formData_8py.html#af90e2bc385cd3bf85f3d6e8a49fbfd1b',1,'GUI::ParameterForms::formData']]], 7 | ['xyzradio_4',['XYZRadio',['../classGUI_1_1ParameterForms_1_1simpleInputWidgets_1_1XYZRadio.html',1,'GUI::ParameterForms::simpleInputWidgets']]] 8 | ]; 9 | -------------------------------------------------------------------------------- /docs/search/all_8.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['h_0',['H',['../classPyPO_1_1PyPOTypes_1_1resContainer.html#a03eb3e3a141b1b280f983959e006552d',1,'PyPO::PyPOTypes::resContainer']]], 4 | ['has_5fcuda_1',['has_CUDA',['../Checks_8py.html#a34775586534cfcede50a1717460ed921',1,'PyPO::Checks']]], 5 | ['home_2',['Home',['../index.html',1,'']]], 6 | ['homereflector_3',['homeReflector',['../group__public__api__reflmeths.html#ga2b5c6750b32a4cd9e9987bdf122a96f0',1,'PyPO::System::System']]], 7 | ['hybrid_20rt_20po_20methods_4',['Hybrid RT/PO Methods',['../group__public__api__hybrid.html',1,'']]], 8 | ['hybriddict_5',['hybridDict',['../group__public__api__templates.html#gaf71ae22b35bbb255db8d65437e9dd3d0',1,'PyPO::Templates']]], 9 | ['hybridguipropagation_6',['hybridGUIPropagation',['../classPyPO_1_1System_1_1System.html#a9b3c1fa2ef91cfee2cece9a6206fd9b9',1,'PyPO::System::System']]], 10 | ['hybridproperror_7',['HybridPropError',['../classPyPO_1_1Checks_1_1HybridPropError.html',1,'PyPO::Checks']]], 11 | ['hyperbola_5fuv_8',['Hyperbola_uv',['../InterfaceReflector_8cpp.html#a45cdd8e8d3b7f60bf94997ca5bfee4f8',1,'InterfaceReflector.cpp']]], 12 | ['hyperbola_5fxy_9',['Hyperbola_xy',['../InterfaceReflector_8cpp.html#a7433b1e9e2c9d8768fa0ec3610315fe2',1,'InterfaceReflector.cpp']]], 13 | ['hyperboloid_20geometries_10',['Hyperboloid Geometries',['../basictut3.html#basictut3_hyperbola',1,'']]] 14 | ]; 15 | -------------------------------------------------------------------------------- /docs/search/all_16.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['w0x_0',['w0x',['../structGPODict.html#a4bca7dd22fd9d65c27f8c383fca6a07e',1,'GPODict::w0x'],['../structScalarGPODict.html#a28216534246d76d1b6ac8d876a9893e5',1,'ScalarGPODict::w0x'],['../structGPODictf.html#a48e64390db74559aeb13f070a44f1d54',1,'GPODictf::w0x'],['../structScalarGPODictf.html#a07bc06402837c5d6d8091fc581d77e3f',1,'ScalarGPODictf::w0x']]], 4 | ['w0y_1',['w0y',['../structGPODict.html#add702249184a68db5d8efb900f0e3be3',1,'GPODict::w0y'],['../structScalarGPODict.html#ad2ea6f58f1322c6a239e858451740945',1,'ScalarGPODict::w0y'],['../structGPODictf.html#a5de635c56c7965028b673b33f235c37c',1,'GPODictf::w0y'],['../structScalarGPODictf.html#adfb5015f159ce846256631333c514496',1,'ScalarGPODictf::w0y']]], 5 | ['waiter_2',['Waiter',['../classGUI_1_1SubprocessManager_1_1Waiter.html',1,'GUI::SubprocessManager']]], 6 | ['waiterfinished_3',['waiterFinished',['../classGUI_1_1SubprocessManager_1_1SubprocessManager.html#aa39a5bb76c64dda4627e57ed683b27d0',1,'GUI::SubprocessManager::SubprocessManager']]], 7 | ['windows_4',['Windows',['../index.html#windows',1,'']]], 8 | ['workspace_5',['Workspace',['../classGUI_1_1WorkSpace_1_1Workspace.html',1,'GUI::WorkSpace']]], 9 | ['workspace_2epy_6',['WorkSpace.py',['../WorkSpace_8py.html',1,'']]], 10 | ['worldparam_2epy_7',['WorldParam.py',['../WorldParam_8py.html',1,'']]], 11 | ['wssections_8',['WSSections',['../classGUI_1_1utils_1_1WSSections.html',1,'GUI::utils']]] 12 | ]; 13 | -------------------------------------------------------------------------------- /docs/doc.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /docs/docd.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /docs/search/all_e.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['o_20methods_0',['System I/O Methods',['../group__public__api__sysio.html',1,'']]], 4 | ['object_1',['Object',['../basictut5.html#basictut5_frames',1,'The "frames" Object'],['../basictut5.html#basictut5_grids',1,'The "reflGrids" Object']]], 5 | ['objects_2',['The "PO fields" and "PO currents" Objects',['../basictut5.html#basictut5_fieldscurrents',1,'']]], 6 | ['ochief_3',['oChief',['../structRTDictf.html#a8e68218abe120199a50d26cec14f98fa',1,'RTDictf::oChief'],['../structGRTDictf.html#a415e6900c4f83fe28d745f56c3790ba6',1,'GRTDictf::oChief']]], 7 | ['of_20a_20system_4',['Internal Components Of A System',['../basictut2.html#basictut2_internal',1,'']]], 8 | ['on_20gpu_5',['Using PyPO On GPU',['../index.html#cuda',1,'']]], 9 | ['optics_20methods_6',['Physical Optics Methods',['../group__public__api__po.html',1,'']]], 10 | ['option_20arguments_7',['Special Option Arguments',['../group__public__api__argopts.html',1,'']]], 11 | ['optional_20dependencies_8',['Optional Dependencies',['../index.html#optdep',1,'']]], 12 | ['optional_20fields_20for_20uv_20parameterisation_9',['Optional Fields For "uv" Parameterisation',['../basictut4.html#basictut4_uv_opts',1,'']]], 13 | ['origin_10',['ORIGIN',['../WorldParam_8py.html#a3888493873bf68358e0a49f7345b7df3',1,'PyPO::WorldParam']]], 14 | ['over_20elevation_20parameterisation_11',['"AoE" (Azimuth Over Elevation) Parameterisation',['../basictut4.html#basictut4_AoE',1,'']]] 15 | ]; 16 | -------------------------------------------------------------------------------- /CITATION.cff: -------------------------------------------------------------------------------- 1 | cff-version: "1.2.0" 2 | authors: 3 | - family-names: Moerman 4 | given-names: Arend 5 | orcid: "https://orcid.org/0000-0002-0475-6134" 6 | - family-names: Gafaji 7 | given-names: Maikel H. 8 | - family-names: Karatsu 9 | given-names: Kenichi 10 | orcid: "https://orcid.org/0000-0003-4562-5584" 11 | - family-names: Endo 12 | given-names: Akira 13 | orcid: "https://orcid.org/0000-0003-0379-2341" 14 | contact: 15 | - family-names: Moerman 16 | given-names: Arend 17 | orcid: "https://orcid.org/0000-0002-0475-6134" 18 | doi: 10.5281/zenodo.8241427 19 | message: If you use this software, please cite our article in the 20 | Journal of Open Source Software. 21 | preferred-citation: 22 | authors: 23 | - family-names: Moerman 24 | given-names: Arend 25 | orcid: "https://orcid.org/0000-0002-0475-6134" 26 | - family-names: Gafaji 27 | given-names: Maikel H. 28 | - family-names: Karatsu 29 | given-names: Kenichi 30 | orcid: "https://orcid.org/0000-0003-4562-5584" 31 | - family-names: Endo 32 | given-names: Akira 33 | orcid: "https://orcid.org/0000-0003-0379-2341" 34 | date-published: 2023-08-12 35 | doi: 10.21105/joss.05478 36 | issn: 2475-9066 37 | issue: 88 38 | journal: Journal of Open Source Software 39 | publisher: 40 | name: Open Journals 41 | start: 5478 42 | title: "PyPO: a Python package for Physical Optics" 43 | type: article 44 | url: "https://joss.theoj.org/papers/10.21105/joss.05478" 45 | volume: 8 46 | title: "PyPO: a Python package for Physical Optics" 47 | -------------------------------------------------------------------------------- /docs/search/all_2.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['beaminit_2eh_0',['BeamInit.h',['../BeamInit_8h.html',1,'']]], 4 | ['bindbeam_2epy_1',['BindBeam.py',['../BindBeam_8py.html',1,'']]], 5 | ['bindcpu_2epy_2',['BindCPU.py',['../BindCPU_8py.html',1,'']]], 6 | ['bindgpu_2epy_3',['BindGPU.py',['../BindGPU_8py.html',1,'']]], 7 | ['binding_20it_20together_3a_20the_20middle_20layer_4',['Binding It Together: The Middle Layer',['../basictut1.html#basictut1_middle',1,'']]], 8 | ['bindrefl_2epy_5',['BindRefl.py',['../BindRefl_8py.html',1,'']]], 9 | ['bindtransf_2epy_6',['BindTransf.py',['../BindTransf_8py.html',1,'']]], 10 | ['bindutils_2epy_7',['BindUtils.py',['../BindUtils_8py.html',1,'']]], 11 | ['bk7_8',['BK7',['../classPyPO_1_1Sellmeier_1_1BK7.html',1,'PyPO::Sellmeier']]], 12 | ['block_5fndarray_9',['block_ndarray',['../Checks_8py.html#a0b5315780bbe8f0aab41eb577725bdff',1,'PyPO::Checks']]], 13 | ['bmergeactioncurrents_10',['BMergeActionCurrents',['../classGUI_1_1MainWindow_1_1MainWidget.html#aae2096409ad7e45f865db4c1458bbe81',1,'GUI::MainWindow::MainWidget']]], 14 | ['bmergeactionfields_11',['BMergeActionFields',['../classGUI_1_1MainWindow_1_1MainWidget.html#ab8c38207eef0d21abe9dfeb307a3f071',1,'GUI::MainWindow::MainWidget']]], 15 | ['bottom_20layer_12',['Rock Bottom: The Bottom Layer',['../basictut1.html#basictut1_bottom',1,'']]], 16 | ['bottom_3a_20the_20bottom_20layer_13',['Rock Bottom: The Bottom Layer',['../basictut1.html#basictut1_bottom',1,'']]], 17 | ['bugs_14',['Issues, Feauture Requests & Bugs',['../contribguide.html#issues',1,'']]] 18 | ]; 19 | -------------------------------------------------------------------------------- /tests/test_CustomLogger.py: -------------------------------------------------------------------------------- 1 | """! 2 | @file 3 | Test custom logger of PyPO. 4 | """ 5 | 6 | import unittest 7 | import logging 8 | 9 | from PyPO.CustomLogger import addLoggingLevel, CustomFormatter, CustomLogger, GUILogger, CustomGUIFormatter, CustomGUILogger 10 | 11 | class TestCustomLogger(unittest.TestCase): 12 | def test_addLoggingLevel(self): 13 | addLoggingLevel("TEST", logging.INFO) 14 | self.assertTrue(logging.TEST) 15 | self.assertEqual(logging.TEST, logging.INFO) 16 | 17 | def test_CustomFormatter(self): 18 | test_cf = CustomFormatter() 19 | self.assertEqual(type(test_cf), CustomFormatter) 20 | 21 | def test_CustomGUIFormatter(self): 22 | test_cf = CustomGUIFormatter() 23 | self.assertEqual(type(test_cf), CustomGUIFormatter) 24 | 25 | def test_CustomLogger(self): 26 | test_cl = CustomLogger() 27 | self.assertEqual(type(test_cl), CustomLogger) 28 | 29 | test_clo = test_cl.getCustomLogger(stdout="test") 30 | self.assertEqual(type(test_clo), logging.Logger) 31 | 32 | def test_CustomGUILogger(self): 33 | test_cl = CustomGUILogger() 34 | self.assertEqual(type(test_cl), CustomGUILogger) 35 | 36 | test_clo = test_cl.getCustomGUILogger(TextEditWidget="test") 37 | self.assertEqual(type(test_clo), logging.Logger) 38 | 39 | def test_GUILogger(self): 40 | test_gl = GUILogger() 41 | self.assertEqual(type(test_gl), GUILogger) 42 | 43 | if __name__ == "__main__": 44 | import nose2 45 | nose2.main() 46 | -------------------------------------------------------------------------------- /doxy/CommonIssues.dox: -------------------------------------------------------------------------------- 1 | /** 2 | \page common_issues Common Issues 3 | This page contains a, possibly growing, list of commonly encountered issues during installing or running `PyPO`. 4 | This list is structured somewhat in a Q&A format. If you encounter an issue which is not listed here, please open an issue in the [issue tracker](https://github.com/PyPO-dev/PyPO/issues) of the `PyPO` repository. 5 | When the issue is resolved, we will add it to this list for bookkeeping and future reference. 6 | 7 | \section qterrors Qt Errors 8 | Q: When trying to run the GUI or the unittests on Linux, I get the following error: 9 | 10 | qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found. 11 | This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem. 12 | Available platform plugins are: vkkhrdisplay, offscreen, minimal, vnc, wayland, eglfs, wayland-egl, xcb, linuxfb, minimalegl. 13 | 14 | A: This is due to the `xcb` library missing certain dependencies. In most cases, this can be resolved by running: 15 | ``` 16 | sudo apt install libxcb-cursor-dev 17 | ``` 18 | 19 | A generally useful tip for dealing with these Qt related bugs, is to first enable debugging in Qt. 20 | From the command line: 21 | ``` 22 | export QT_DEBUG_PLUGINS=1 23 | ``` 24 | 25 | This enables debugging when plugins for Qt are loaded and will give a list of libraries it could not load. 26 | With this information, it is then relatively easy to figure out what libraries are missing and should be installed. 27 | */ 28 | 29 | -------------------------------------------------------------------------------- /tests/test_FitGauss.py: -------------------------------------------------------------------------------- 1 | """! 2 | @file 3 | File containing tests for Gaussian fitting in PyPO. 4 | """ 5 | 6 | import unittest 7 | from nose2.tools import params 8 | 9 | from PyPO.System import System 10 | from PyPO.FitGauss import fitGaussAbs, generateGauss 11 | from PyPO.Enums import FieldComponents, CurrentComponents, Scales 12 | 13 | try: 14 | from . import TestTemplates 15 | except ImportError: 16 | import TestTemplates 17 | 18 | class Test_FitGauss(unittest.TestCase): 19 | def setUp(self): 20 | self.s = TestTemplates.getSystemWithReflectors() 21 | self.s.setOverride(False) 22 | 23 | @params(Scales.dB, Scales.LIN) 24 | def test_fitGauss(self, scale): 25 | popt = self.s.fitGaussAbs(TestTemplates.GPOfield["name"], FieldComponents.Ex, thres=-100, scale=scale, full_output=True, ratio=None) 26 | self.assertTrue(len(popt) == 6) 27 | self.assertTrue(f"fitGauss_{TestTemplates.GPOfield['name']}" in self.s.scalarfields) 28 | 29 | popt = self.s.fitGaussAbs(TestTemplates.GPOfield["name"], FieldComponents.Ex, thres=-100, scale=scale, full_output=True, ratio=1) 30 | self.assertTrue(len(popt) == 6) 31 | self.assertTrue(f"fitGauss_{TestTemplates.GPOfield['name']}" in self.s.scalarfields) 32 | 33 | def test_calcHPBW(self): 34 | E, H = self.s.calcHPBW(TestTemplates.GPOfield["name"], FieldComponents.Ex) 35 | self.assertTrue(isinstance(E, float)) 36 | self.assertTrue(isinstance(H, float)) 37 | 38 | if __name__ == "__main__": 39 | import nose2 40 | nose2.main() 41 | -------------------------------------------------------------------------------- /CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.16.3) 2 | 3 | #set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") 4 | 5 | project(PyPO-pkg 6 | VERSION 1.0.0 7 | DESCRIPTION "Python Physical Optics" 8 | LANGUAGES CXX C) 9 | 10 | set(CMAKE_CXX_STANDARD 11) 11 | set(CMAKE_CXX_FLAGS_RELEASE "-O3") 12 | 13 | add_library(pyporefl SHARED src/common/InterfaceReflector.cpp) 14 | target_include_directories(pyporefl PUBLIC src/common src/include) 15 | 16 | add_library(pypobeam SHARED src/common/InterfaceBeam.cpp) 17 | target_link_libraries(pypobeam PRIVATE pyporefl) 18 | 19 | add_library(pypotransf SHARED src/common/Transform.cpp) 20 | target_include_directories(pypotransf PRIVATE src/include) 21 | 22 | add_library(pypocpu SHARED src/CPU/InterfaceCPU.cpp) 23 | target_include_directories(pypocpu PRIVATE src/CPU) 24 | 25 | if(NOT WIN32) 26 | target_compile_options(pypocpu PRIVATE -pthread) 27 | endif() 28 | 29 | target_link_libraries(pypocpu PRIVATE pyporefl) 30 | 31 | include(CheckLanguage) 32 | 33 | check_language(CUDA) 34 | 35 | 36 | if(CMAKE_CUDA_COMPILER) 37 | enable_language(CUDA) 38 | set(CMAKE_CUDA_STANDARD 14) 39 | file(GLOB CUDAfiles src/CUDA/*.cu) 40 | 41 | add_library(pypogpu SHARED ${CUDAfiles}) 42 | target_include_directories(pypogpu PRIVATE src/CUDA) 43 | target_link_libraries(pypogpu PRIVATE pyporefl) 44 | set_target_properties(pypogpu PROPERTIES CUDA_SEPARABLE_COMPILATION ON) 45 | set_property(TARGET pypogpu PROPERTY CUDA_ARCHITECTURES OFF) 46 | else() 47 | message(STATUS "WARNING: no CUDA compiler detected. Not building CUDA libraries") 48 | endif() 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /docs/search/variables_9.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['n_0',['n',['../structGPODict.html#a8af7bb2b1c43dfcd9d76d2d6348fc341',1,'GPODict::n'],['../structScalarGPODict.html#a3f8b679fa8f6575bb6d045315fd2ccea',1,'ScalarGPODict::n'],['../structGPODictf.html#a4638f157cee8c586889079e35b0eff22',1,'GPODictf::n'],['../structScalarGPODictf.html#a3a980d4b83748c6c936cdfd930a6d538',1,'ScalarGPODictf::n']]], 4 | ['n_5fcells_1',['n_cells',['../structreflparams.html#a0098abebe5a4fb9755bc183191af8327',1,'reflparams::n_cells'],['../structreflparamsf.html#ad7d0eba6186d4faffd405ec456d90f69',1,'reflparamsf::n_cells']]], 5 | ['nrays_2',['nRays',['../structRTDict.html#ad8d2fce8a2bbcb02308843c07c5b1745',1,'RTDict::nRays'],['../structGRTDict.html#a30b3004729305813debbe1d89ae9994b',1,'GRTDict::nRays'],['../structRTDictf.html#a44756df9adb2c8514a28511a00ed07a5',1,'RTDictf::nRays'],['../structGRTDictf.html#a2e03bce49f79c79d6b87413b8d4ca43d',1,'GRTDictf::nRays']]], 6 | ['nring_3',['nRing',['../structRTDict.html#add71a44e886bcd94a47de8003c3c18c6',1,'RTDict::nRing'],['../structRTDictf.html#a087b9b84bc06e8ec57f4fc54aa03adc9',1,'RTDictf::nRing']]], 7 | ['nx_4',['nx',['../structreflcontainer.html#ab862b2fa619189a2c0bfe4391d9001ee',1,'reflcontainer::nx'],['../structreflcontainerf.html#a53fe29cfc58c61904f8517bd0f7c20dc',1,'reflcontainerf::nx']]], 8 | ['ny_5',['ny',['../structreflcontainer.html#a2737304edbcc529252b75a96e0138d7c',1,'reflcontainer::ny'],['../structreflcontainerf.html#a3361936844af5a235400f0804d7beef5',1,'reflcontainerf::ny']]], 9 | ['nz_6',['nz',['../structreflcontainer.html#ac6db2cc383c52f6ede1bc0215e048845',1,'reflcontainer::nz'],['../structreflcontainerf.html#a87ade7f24d62d965a50746719fd0cb76',1,'reflcontainerf::nz']]] 10 | ]; 11 | -------------------------------------------------------------------------------- /tests/test_SystemPaths.py: -------------------------------------------------------------------------------- 1 | """! 2 | @file 3 | 4 | Script for testing the path setting functionality in PyPO. 5 | """ 6 | 7 | import os 8 | import shutil 9 | 10 | import unittest 11 | from pathlib import Path 12 | 13 | from PyPO.System import System 14 | class Test_SystemPaths(unittest.TestCase): 15 | def setUp(self): 16 | self.s = System(verbose=False) 17 | self.filePath = Path(__file__).parents[0] 18 | self.path_test = os.path.join(self.filePath, "test/") 19 | self.path_app = "append/" 20 | 21 | def test_setCustomBeamPath(self): 22 | self.s.setCustomBeamPath(self.path_test) 23 | self.assertEqual(self.path_test, self.s.customBeamPath) 24 | 25 | self.s.setCustomBeamPath(self.path_app, append=True) 26 | self.assertEqual(os.path.join(self.path_test, self.path_app), self.s.customBeamPath) 27 | 28 | def test_setSavePath(self): 29 | funcs = ["setSavePath", "setSavePathSystems"] 30 | 31 | for func in funcs: 32 | getattr(self.s, func)(self.path_test) 33 | path = getattr(self.s, "s" + func.split("setS")[1]) 34 | self.assertEqual(self.path_test, path) 35 | 36 | getattr(self.s, func)(self.path_app, append=True) 37 | path = getattr(self.s, "s" + func.split("setS")[1]) 38 | self.assertEqual(os.path.join(self.path_test, self.path_app), path) 39 | 40 | self.assertTrue(os.path.exists(os.path.join(self.path_test, self.path_app))) 41 | shutil.rmtree(self.path_test) 42 | self.assertFalse(os.path.exists(os.path.join(self.path_test, self.path_app))) 43 | 44 | if __name__ == "__main__": 45 | import nose2 46 | nose2.main() 47 | -------------------------------------------------------------------------------- /tests/test_SystemEfficiencies.py: -------------------------------------------------------------------------------- 1 | """! 2 | @file 3 | File containing tests for the PO efficiencies in PyPO. 4 | """ 5 | 6 | import unittest 7 | from nose2.tools import params 8 | 9 | try: 10 | from . import TestTemplates 11 | except: 12 | import TestTemplates 13 | 14 | from PyPO.System import System 15 | from PyPO.Enums import FieldComponents, CurrentComponents 16 | 17 | class Test_SystemEfficiencies(unittest.TestCase): 18 | def setUp(self): 19 | self.s = TestTemplates.getSystemWithReflectors() 20 | self.s.setLoggingVerbosity(False) 21 | 22 | @params(TestTemplates.aperDictEll, TestTemplates.aperDictRect) 23 | def test_spillover(self, aper): 24 | eta_s = self.s.calcSpillover(TestTemplates.GPOfield["name"], FieldComponents.Ex, aper) 25 | self.assertTrue(isinstance(eta_s, float)) 26 | 27 | @params(TestTemplates.aperDictEll, TestTemplates.aperDictRect) 28 | def test_taper(self, aper): 29 | eta_t = self.s.calcTaper(TestTemplates.GPOfield["name"], FieldComponents.Ex) 30 | self.assertTrue(isinstance(eta_t, float)) 31 | 32 | eta_t = self.s.calcTaper(TestTemplates.GPOfield["name"], FieldComponents.Ex, aperDict=aper) 33 | self.assertTrue(isinstance(eta_t, float)) 34 | 35 | def test_Xpol(self): 36 | eta_x = self.s.calcXpol(TestTemplates.GPOfield["name"], FieldComponents.Ex, FieldComponents.Ex) 37 | self.assertTrue(isinstance(eta_x, float)) 38 | 39 | def test_mainBeam(self): 40 | eta_mb = self.s.calcMainBeam(TestTemplates.GPOfield["name"], FieldComponents.Ex) 41 | self.assertTrue(isinstance(eta_mb, float)) 42 | 43 | if __name__ == "__main__": 44 | import nose2 45 | nose2.main() 46 | 47 | -------------------------------------------------------------------------------- /tests/test_RayTraceUtils.py: -------------------------------------------------------------------------------- 1 | """! 2 | @file 3 | Script for testing the ray-trace functionalities of PyPO. 4 | """ 5 | 6 | from scipy.stats import special_ortho_group 7 | 8 | try: 9 | from . import TestTemplates 10 | except ImportError: 11 | import TestTemplates 12 | 13 | import unittest 14 | import numpy as np 15 | 16 | from PyPO.System import System 17 | import PyPO.MatTransform as mt 18 | 19 | class Test_RayTraceUtils(unittest.TestCase): 20 | def setUp(self): 21 | self.s = TestTemplates.getSystemWithReflectors() 22 | 23 | def test_focusFind(self): 24 | focus = self.s.findRTfocus(TestTemplates.TubeRTframe["name"]) 25 | self.assertTrue(focus.shape == (3,)) 26 | 27 | def test_findRotation(self): 28 | R = special_ortho_group.rvs(dim=3) 29 | 30 | v = np.array([1, 1, 1]) 31 | 32 | v = v / np.linalg.norm(v) if np.linalg.norm(v) > 0 else np.array([0, 0, 1]) 33 | 34 | u = R @ v 35 | 36 | R_find = self.s.findRotation(v, u) 37 | _u = R_find[:-1, :-1] @ v 38 | 39 | for ri, ro in zip(u, _u): 40 | self.assertAlmostEqual(ri, ro) 41 | 42 | def test_getAnglesFromMatrix(self): 43 | R = special_ortho_group.rvs(dim=3) 44 | 45 | angles = self.s.getAnglesFromMatrix(R) 46 | 47 | R_find = mt.MatRotate(angles) 48 | 49 | v = np.array([1, 1, 1]) 50 | 51 | v = v / np.linalg.norm(v) if np.linalg.norm(v) > 0 else np.array([0, 0, 1]) 52 | 53 | u = R @ v 54 | _u = R_find[:-1, :-1] @ v 55 | 56 | for ri, ro in zip(u, _u): 57 | self.assertAlmostEqual(ri, ro) 58 | 59 | if __name__ == "__main__": 60 | import nose2 61 | nose2.main() 62 | -------------------------------------------------------------------------------- /doxy/BasicTut2.dox: -------------------------------------------------------------------------------- 1 | /** 2 | \page basictut2 The PyPO System 3 | \section basictut2_intro Introduction 4 | In this tutorial, we discuss the `System` object. In `PyPO`, all functionality is accessed through the `System` object. 5 | This object can be seen as the laboratory, where one can place optical elements and simulate the propagation of electromagnetic fields through them. 6 | 7 | \section basictut2_import Importing The System 8 | A `System` object is created in `PyPO` in the following way: 9 | ``` 10 | from PyPO.System import System 11 | st = System() 12 | ``` 13 | We have created a `System` object named `st`. 14 | A `System` has its own logger. This logger is an instance of the `Logging` module in the Python standard library. 15 | It logs, for example, whenever a reflector or optical element is generated, or when such an element is transformed. 16 | If you do not want the `System` to log actions, you can instantiate the `System` and pass the "verbose=False" argument: 17 | ``` 18 | from PyPO.System import System 19 | st = System(verbose=False) 20 | ``` 21 | 22 | This can always be changed down the line by calling the `setLoggingVerbosity()` method of `System`: 23 | ``` 24 | st.setLoggingVerbosity(True) 25 | ``` 26 | For an overview of the `System` methods that affect the configuration of the `System`, see \ref public_api_sysio "the API documentation for the System". 27 | 28 | \section basictut2_internal Internal Components Of A System 29 | A `System` keeps track of all reflectors/elements, ray-trace frames and PO fields/currents (these are explained in a later tutorial) in internal dictionaries. 30 | Each internal dictionary will be explained later when the relevant data structure it stores is discussed, but for now, it is important to know that `System` methods rarely return objects. 31 | Rather, it stores these objects internally. 32 | */ 33 | 34 | -------------------------------------------------------------------------------- /doxy/Tutorial.dox: -------------------------------------------------------------------------------- 1 | /** 2 | \page tutorials Tutorials 3 | These tutorials are designed to showcase the features of `PyPO`. 4 | 5 | 6 | \section funcs PyPO Functionalities 7 | This set of tutorials demonstrates how to use `PyPO`, such as for making optical systems and performing calculations. 8 | The set starts with tutorials on how to build optical systems and perform ray-traces through them. 9 | Then, the physical optics calculations are demonstrated. 10 | The final tutorials in this set are concerned with calculating metrics used in `PyPO`, such as aperture efficiency, and importing custom beam patterns. 11 | These tutorials are HTML renders of Jupyter notebooks. For the interactive versions, see the "tutorials" folder in the root directory of `PyPO`. 12 | 13 | [Building an optical system and performing ray-traces](tutorials/Tutorial1.html) 14 | 15 | [More advanced optical systems and ray-tracing options](tutorials/Tutorial2.html) 16 | 17 | [Performing physical optics propagations](tutorials/Tutorial3.html) 18 | 19 | [Backward propagation](tutorials/Tutorial4.html) 20 | 21 | [PO efficiencies and metrics](tutorials/Tutorial5.html) 22 | 23 | [Importing custom beam patterns](tutorials/Tutorial6.html) 24 | 25 | \section guitut GUI Tutorials 26 | To provide a little help on how to use the GUI module, these tutorials can come in handy. 27 | The tutorials are designed to demonstrate basic knowledge on how to use `PyPO` through the GUI. 28 | This set of tutorials is essentially the same as the first three tutorials in the `PyPO` functionalities set, but worked in the GUI. 29 | 30 | [Building an optical system and performing ray-traces (GUI)](Gui/Tutorial_Gui_1.html) 31 | 32 | [More advanced optical systems and ray-tracing options (GUI)](Gui/Tutorial_Gui_2.html) 33 | 34 | [Performing physical optics propagations (GUI)](Gui/Tutorial_Gui_3.html) 35 | */ 36 | -------------------------------------------------------------------------------- /docs/search/classes_c.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['scalarfield_0',['scalarfield',['../classPyPO_1_1PyPOTypes_1_1scalarfield.html',1,'PyPO::PyPOTypes']]], 4 | ['scalarfieldnameerror_1',['ScalarFieldNameError',['../classPyPO_1_1Checks_1_1ScalarFieldNameError.html',1,'PyPO::Checks']]], 5 | ['scalargpodict_2',['ScalarGPODict',['../classPyPO_1_1Structs_1_1ScalarGPODict.html',1,'PyPO.Structs.ScalarGPODict'],['../structScalarGPODict.html',1,'ScalarGPODict']]], 6 | ['scalargpodictf_3',['ScalarGPODictf',['../classPyPO_1_1Structs_1_1ScalarGPODictf.html',1,'PyPO.Structs.ScalarGPODictf'],['../structScalarGPODictf.html',1,'ScalarGPODictf']]], 7 | ['selectionwidgetinterface_4',['selectionWidgetInterface',['../classGUI_1_1ParameterForms_1_1inputWidgetInterfaces_1_1selectionWidgetInterface.html',1,'GUI::ParameterForms::inputWidgetInterfaces']]], 8 | ['selfclosingdialog_5',['selfClosingDialog',['../classGUI_1_1Dialogs_1_1selfClosingDialog.html',1,'GUI::Dialogs']]], 9 | ['sfieldswidget_6',['SFieldsWidget',['../classGUI_1_1ElementWidget_1_1SFieldsWidget.html',1,'GUI::ElementWidget']]], 10 | ['simpledropdown_7',['SimpleDropdown',['../classGUI_1_1ParameterForms_1_1simpleInputWidgets_1_1SimpleDropdown.html',1,'GUI::ParameterForms::simpleInputWidgets']]], 11 | ['simpleradio_8',['SimpleRadio',['../classGUI_1_1ParameterForms_1_1simpleInputWidgets_1_1SimpleRadio.html',1,'GUI::ParameterForms::simpleInputWidgets']]], 12 | ['staticinput_9',['StaticInput',['../classGUI_1_1ParameterForms_1_1simpleInputWidgets_1_1StaticInput.html',1,'GUI::ParameterForms::simpleInputWidgets']]], 13 | ['subprocessmanager_10',['SubprocessManager',['../classGUI_1_1SubprocessManager_1_1SubprocessManager.html',1,'GUI::SubprocessManager']]], 14 | ['symdialog_11',['SymDialog',['../classGUI_1_1Dialogs_1_1SymDialog.html',1,'GUI::Dialogs']]], 15 | ['system_12',['System',['../classPyPO_1_1System_1_1System.html',1,'PyPO::System']]] 16 | ]; 17 | -------------------------------------------------------------------------------- /docs/search/functions_6.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['farfieldatpoint_0',['farfieldAtPoint',['../classPropagation.html#a1e180646ebc259889117f8b95a4210cd',1,'Propagation::farfieldAtPoint()'],['../Kernelsf_8cu.html#ade3957d3d9598af2260d81a7c2895dda',1,'farfieldAtPoint(): Kernelsf.cu']]], 4 | ['fieldatpoint_1',['fieldAtPoint',['../classPropagation.html#a624b50b5c7b44511575b290a81b6567a',1,'Propagation::fieldAtPoint()'],['../Kernelsf_8cu.html#ab22e5a6574f3f494b1c4310706c24ebc',1,'fieldAtPoint(): Kernelsf.cu']]], 5 | ['fieldscalaratpoint_2',['fieldScalarAtPoint',['../classPropagation.html#a68b38f577289a8b480597a96991cbb42',1,'Propagation']]], 6 | ['findconnectedsubsets_3',['findConnectedSubsets',['../MatUtils_8py.html#a03277d1ecb82dd2fd87f936b46e8c17c',1,'PyPO::MatUtils']]], 7 | ['findfocusaction_4',['findFocusAction',['../classGUI_1_1MainWindow_1_1MainWidget.html#a518d3df633bd40bbcba052c3d103a974',1,'GUI::MainWindow::MainWidget']]], 8 | ['findrotation_5',['findRotation',['../classPyPO_1_1System_1_1System.html#ae98c7c3f2a57bf54e9a3c4599c42fa1c',1,'PyPO.System.System.findRotation()'],['../MatUtils_8py.html#a7a48213013892eed79ab5381742dde0d',1,'PyPO.MatUtils.findRotation()']]], 9 | ['findrtfocus_6',['findRTfocus',['../group__public__api__frames.html#ga001dff04cfa6b85d4e94fb6c116139ea',1,'PyPO::System::System']]], 10 | ['fitgaussabs_7',['fitGaussAbs',['../group__public__api__po.html#ga671dae3dacbd51f806ea9bb0ec4a4ca4',1,'PyPO.System.System.fitGaussAbs()'],['../FitGauss_8py.html#a904be10a5198a062318c894ae89f3338',1,'PyPO.FitGauss.fitGaussAbs()']]], 11 | ['focus_5fopts_5fhyp_5fell_8',['focus_opts_hyp_ell',['../formData_8py.html#a30b25ed6aa395dbcb9330dc3f86b575c',1,'GUI::ParameterForms::formData']]], 12 | ['focusfind_9',['focusFind',['../formData_8py.html#ac4e45c825439cdd95c4f1ad15a34e0b8',1,'GUI::ParameterForms::formData']]], 13 | ['frametoobj_10',['frameToObj',['../BindUtils_8py.html#ada4410ca15aee6d8a8d0c9b7a9612947',1,'PyPO::BindUtils']]] 14 | ]; 15 | -------------------------------------------------------------------------------- /docs/folderclosed.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /docs/folderclosedd.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /docs/navtreedata.js: -------------------------------------------------------------------------------- 1 | /* 2 | @licstart The following is the entire license notice for the JavaScript code in this file. 3 | 4 | The MIT License (MIT) 5 | 6 | Copyright (C) 1997-2020 by Dimitri van Heesch 7 | 8 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software 9 | and associated documentation files (the "Software"), to deal in the Software without restriction, 10 | including without limitation the rights to use, copy, modify, merge, publish, distribute, 11 | sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is 12 | furnished to do so, subject to the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be included in all copies or 15 | substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING 18 | BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 19 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 20 | DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | @licend The above is the entire license notice for the JavaScript code in this file 24 | */ 25 | var NAVTREE = 26 | [ 27 | [ "PyPO User Manual", "index.html", [ 28 | [ "Home", "index.html", "index" ], 29 | [ "Explanations", "explanations.html", null ], 30 | [ "Tutorials", "tutorials.html", null ], 31 | [ "Demonstrations", "demos.html", null ], 32 | [ "Documentation", "pypodocs.html", null ], 33 | [ "Contribution", "contribguide.html", null ], 34 | [ "Common Issues", "common_issues.html", null ] 35 | ] ] 36 | ]; 37 | 38 | var NAVTREEINDEX = 39 | [ 40 | "common_issues.html" 41 | ]; 42 | 43 | var SYNCONMSG = 'click to disable panel synchronisation'; 44 | var SYNCOFFMSG = 'click to enable panel synchronisation'; -------------------------------------------------------------------------------- /src/GUI/utils.py: -------------------------------------------------------------------------------- 1 | """! 2 | @file 3 | Contains utilities for the GUI. 4 | """ 5 | 6 | from PySide6.QtWidgets import QLabel, QLineEdit, QPushButton 7 | from PySide6.QtCore import Qt, QRegularExpression 8 | from PySide6.QtGui import QRegularExpressionValidator 9 | from enum import Enum, auto 10 | 11 | class InputDescriptionError(Exception): 12 | """! 13 | Raised when an inputDescription is created incorrectly 14 | """ 15 | pass 16 | 17 | class inType(Enum): 18 | """! 19 | Enum containing the possible types for an inputDescription 20 | """ 21 | static = 0 22 | vectorStrings = 1 23 | vectorIntegers = 2 24 | vectorFloats = 3 25 | checkbox = 4 26 | dropdown = 5 27 | radio = 6 28 | xyzRadio = 7 29 | dynamicDropdown = 8 30 | dynamicRadio = 9 31 | elementSelector = 10 32 | 33 | class WSSections(Enum): 34 | """! 35 | Enum containing workspace sections 36 | """ 37 | Element = 0 38 | RayTraceFrame = 1 39 | POField = 2 40 | SPOField = 3 41 | POCurrent = 4 42 | Group = 5 43 | 44 | class MyButton(QPushButton): 45 | def __init__(self, s): 46 | super().__init__(s) 47 | 48 | class MyLabel(QLabel): 49 | def __init__ (self, s): 50 | super().__init__(s) 51 | self.setWordWrap(True) 52 | 53 | class MyEdit(QLineEdit): 54 | def __init__ (self): 55 | super().__init__() 56 | self.setAlignment = Qt.AlignTop 57 | 58 | def makeLabelFromString(s): 59 | return MyLabel(s.replace("_"," ").capitalize()) 60 | 61 | def getValidator(intype): 62 | if intype == inType.vectorIntegers: 63 | return QRegularExpressionValidator(QRegularExpression("[-+]?[0-9]*")) 64 | elif intype == inType.vectorFloats: 65 | return QRegularExpressionValidator(QRegularExpression("[-+]?[0-9]*[\.,]?[0-9]*(e-?)?[0-9]*")) 66 | elif intype == inType.vectorStrings: 67 | return QRegularExpressionValidator(QRegularExpression("[A-Za-z0-9_]+")) 68 | else: 69 | raise Exception("No validator available") 70 | -------------------------------------------------------------------------------- /docs/cookie.js: -------------------------------------------------------------------------------- 1 | /*! 2 | Cookie helper functions 3 | Copyright (c) 2023 Dimitri van Heesch 4 | Released under MIT license. 5 | */ 6 | let Cookie = { 7 | cookie_namespace: 'doxygen_', 8 | 9 | readSetting(cookie,defVal) { 10 | if (window.chrome) { 11 | const val = localStorage.getItem(this.cookie_namespace+cookie) || 12 | sessionStorage.getItem(this.cookie_namespace+cookie); 13 | if (val) return val; 14 | } else { 15 | let myCookie = this.cookie_namespace+cookie+"="; 16 | if (document.cookie) { 17 | const index = document.cookie.indexOf(myCookie); 18 | if (index != -1) { 19 | const valStart = index + myCookie.length; 20 | let valEnd = document.cookie.indexOf(";", valStart); 21 | if (valEnd == -1) { 22 | valEnd = document.cookie.length; 23 | } 24 | return document.cookie.substring(valStart, valEnd); 25 | } 26 | } 27 | } 28 | return defVal; 29 | }, 30 | 31 | writeSetting(cookie,val,days=10*365) { // default days='forever', 0=session cookie, -1=delete 32 | if (window.chrome) { 33 | if (days==0) { 34 | sessionStorage.setItem(this.cookie_namespace+cookie,val); 35 | } else { 36 | localStorage.setItem(this.cookie_namespace+cookie,val); 37 | } 38 | } else { 39 | let date = new Date(); 40 | date.setTime(date.getTime()+(days*24*60*60*1000)); 41 | const expiration = days!=0 ? "expires="+date.toGMTString()+";" : ""; 42 | document.cookie = this.cookie_namespace + cookie + "=" + 43 | val + "; SameSite=Lax;" + expiration + "path=/"; 44 | } 45 | }, 46 | 47 | eraseSetting(cookie) { 48 | if (window.chrome) { 49 | if (localStorage.getItem(this.cookie_namespace+cookie)) { 50 | localStorage.removeItem(this.cookie_namespace+cookie); 51 | } else if (sessionStorage.getItem(this.cookie_namespace+cookie)) { 52 | sessionStorage.removeItem(this.cookie_namespace+cookie); 53 | } 54 | } else { 55 | this.writeSetting(cookie,'',-1); 56 | } 57 | }, 58 | } 59 | -------------------------------------------------------------------------------- /docs/search/all_b.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['lam_0',['lam',['../structGPODict.html#a09bafcf782b5bfd3b7e4cf1957b48b2c',1,'GPODict::lam'],['../structScalarGPODict.html#a957209e5bcba36eda01fd6d61d040473',1,'ScalarGPODict::lam'],['../structGPODictf.html#a34bda8ca611e8ebef80d8c5e364b7c7a',1,'GPODictf::lam'],['../structScalarGPODictf.html#a04984941dc0fa0365fe314730ace0905',1,'ScalarGPODictf::lam']]], 4 | ['layer_1',['Layer',['../basictut1.html#basictut1_middle',1,'Binding It Together: The Middle Layer'],['../basictut1.html#basictut1_top',1,'Getting There: The Top Layer'],['../basictut1.html#basictut1_bottom',1,'Rock Bottom: The Bottom Layer']]], 5 | ['license_2',['License',['../index.html#license',1,'']]], 6 | ['linux_3',['Linux',['../index.html#linux',1,'']]], 7 | ['loadbeamlib_4',['loadBeamlib',['../BindBeam_8py.html#a5a24840686571bc0e14536d3860cfe2c',1,'PyPO::BindBeam']]], 8 | ['loadcpulib_5',['loadCPUlib',['../BindCPU_8py.html#a8399836b880e05a0bd1fad787d53aeb1',1,'PyPO::BindCPU']]], 9 | ['loadgpulib_6',['loadGPUlib',['../BindGPU_8py.html#a40a3fc036f857cb8842034a8c0f2d18d',1,'PyPO::BindGPU']]], 10 | ['loadrefllib_7',['loadRefllib',['../BindRefl_8py.html#ac6604b085e10834536acf5053b6f88c3',1,'PyPO::BindRefl']]], 11 | ['loadsystem_8',['loadSystem',['../group__public__api__sysio.html#gaf7a286268d5d675b5449e0baae6186e8',1,'PyPO.System.System.loadSystem()'],['../classGUI_1_1MainWindow_1_1MainWidget.html#a572c25b71e67f53a380e7964f00047d7',1,'GUI.MainWindow.MainWidget.loadSystem()']]], 12 | ['loadsystemform_9',['loadSystemForm',['../formData_8py.html#ab9fb8bf0bbd26a80d55ea1a7b239bd3f',1,'GUI::ParameterForms::formData']]], 13 | ['loadtransflib_10',['loadTransflib',['../BindTransf_8py.html#a19d26a1ebea74e8f9ef304a41b45f511',1,'PyPO::BindTransf']]], 14 | ['lxu_11',['lxu',['../structreflparams.html#a748214eefdc845e7ec75fe5bc7adff81',1,'reflparams::lxu'],['../structreflparamsf.html#a55a1df398503cc1e9fcd63e49bbff8ee',1,'reflparamsf::lxu']]], 15 | ['lyv_12',['lyv',['../structreflparams.html#ad637efde9527b76c2063e91466451ab1',1,'reflparams::lyv'],['../structreflparamsf.html#ab4b1a1219effaf7763896b602d0604a0',1,'reflparamsf::lyv']]] 16 | ]; 17 | -------------------------------------------------------------------------------- /docs/search/classes_b.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['radiosubwidget_0',['RadioSubWidget',['../classGUI_1_1ParameterForms_1_1simpleInputWidgets_1_1XYZRadio_1_1RadioSubWidget.html',1,'GUI::ParameterForms::simpleInputWidgets::XYZRadio']]], 4 | ['random_1',['Random',['../classRandom.html',1,'']]], 5 | ['raytracer_2',['RayTracer',['../classRayTracer.html',1,'']]], 6 | ['reflcontainer_3',['reflcontainer',['../classPyPO_1_1Structs_1_1reflcontainer.html',1,'PyPO.Structs.reflcontainer'],['../structreflcontainer.html',1,'reflcontainer']]], 7 | ['reflcontainerf_4',['reflcontainerf',['../classPyPO_1_1Structs_1_1reflcontainerf.html',1,'PyPO.Structs.reflcontainerf'],['../structreflcontainerf.html',1,'reflcontainerf']]], 8 | ['reflectorwidget_5',['ReflectorWidget',['../classGUI_1_1ElementWidget_1_1ReflectorWidget.html',1,'GUI::ElementWidget']]], 9 | ['reflgrids_6',['reflGrids',['../classPyPO_1_1PyPOTypes_1_1reflGrids.html',1,'PyPO::PyPOTypes']]], 10 | ['reflparams_7',['reflparams',['../classPyPO_1_1Structs_1_1reflparams.html',1,'PyPO.Structs.reflparams'],['../structreflparams.html',1,'reflparams']]], 11 | ['reflparamsf_8',['reflparamsf',['../classPyPO_1_1Structs_1_1reflparamsf.html',1,'PyPO.Structs.reflparamsf'],['../structreflparamsf.html',1,'reflparamsf']]], 12 | ['removeelementdialog_9',['RemoveElementDialog',['../classGUI_1_1Dialogs_1_1RemoveElementDialog.html',1,'GUI::Dialogs']]], 13 | ['rescontainer_10',['resContainer',['../classPyPO_1_1PyPOTypes_1_1resContainer.html',1,'PyPO::PyPOTypes']]], 14 | ['rfield_11',['rfield',['../classPyPO_1_1PyPOTypes_1_1rfield.html',1,'PyPO::PyPOTypes']]], 15 | ['rtdict_12',['RTDict',['../classPyPO_1_1Structs_1_1RTDict.html',1,'PyPO.Structs.RTDict'],['../structRTDict.html',1,'RTDict']]], 16 | ['rtdictf_13',['RTDictf',['../classPyPO_1_1Structs_1_1RTDictf.html',1,'PyPO.Structs.RTDictf'],['../structRTDictf.html',1,'RTDictf']]], 17 | ['rtrefls_14',['RTRefls',['../classRTRefls.html',1,'']]], 18 | ['runpoerror_15',['RunPOError',['../classPyPO_1_1Checks_1_1RunPOError.html',1,'PyPO::Checks']]], 19 | ['runrterror_16',['RunRTError',['../classPyPO_1_1Checks_1_1RunRTError.html',1,'PyPO::Checks']]] 20 | ]; 21 | -------------------------------------------------------------------------------- /src/GUI/ParameterForms/inputWidgetInterfaces.py: -------------------------------------------------------------------------------- 1 | """! 2 | @file 3 | Defines interfaces for input widgets to inherit from to ensure certain behavior. 4 | """ 5 | 6 | from PySide6.QtWidgets import QWidget 7 | from abc import ABC, abstractclassmethod 8 | 9 | class MetaCombinerInputWidget(type(QWidget), type(ABC)): 10 | """! 11 | Metaclass for inputWidgetInterface because Python does not allow multiple inheritance. 12 | """ 13 | pass 14 | 15 | class inputWidgetInterface(QWidget, ABC, metaclass=MetaCombinerInputWidget): 16 | """! 17 | This is a base class for inputWidgets and should not be instantiated. 18 | """ 19 | def __init__ (self, parent = None): 20 | super().__init__(parent) 21 | 22 | @abstractclassmethod 23 | def read() -> dict: 24 | """! 25 | subclasses need to reimplement this method and return a dict 26 | containing strings as keys. These strings should originate from 27 | the instances InputDescription.outputName. If outputName is 28 | None then it should return an empty dict. 29 | """ 30 | pass 31 | 32 | @abstractclassmethod 33 | def clear() -> dict: 34 | """! 35 | Clears user input and resets widget. 36 | """ 37 | pass 38 | 39 | 40 | class MetaCombinerSelectionWidget(type(inputWidgetInterface), type(ABC)): 41 | """! 42 | Metaclass for selectionWidgetInterface because Python does not allow multiple inheritance. 43 | """ 44 | pass 45 | 46 | 47 | class selectionWidgetInterface(inputWidgetInterface, ABC, metaclass=MetaCombinerSelectionWidget): 48 | """! 49 | Provides ground work for dynamic input widgets by forcing a selection widget te implement a 50 | selectionChanged method. This method might emit a signal to notify its parent that the user 51 | has changed the selection. 52 | """ 53 | def __init__ (self, parent = None): 54 | super().__init__(parent) 55 | 56 | @abstractclassmethod 57 | def selectionChanged(self): 58 | """! 59 | Should be reimplemented to emit a signal. 60 | 61 | @see selectionWidgetInterface 62 | """ 63 | pass 64 | 65 | -------------------------------------------------------------------------------- /setup.py: -------------------------------------------------------------------------------- 1 | import os 2 | import pathlib 3 | 4 | from setuptools import setup, Extension, find_packages 5 | from setuptools.command.build_ext import build_ext as build_ext_orig 6 | 7 | 8 | class CMakeExtension(Extension): 9 | 10 | def __init__(self, name): 11 | # don't invoke the original build_ext for this special extension 12 | super().__init__(name, sources=[]) 13 | 14 | 15 | class build_ext(build_ext_orig): 16 | 17 | def run(self): 18 | for ext in self.extensions: 19 | self.build_cmake(ext) 20 | #super().run() 21 | 22 | def build_cmake(self, ext): 23 | cwd = pathlib.Path().absolute() 24 | 25 | build_temp = pathlib.Path(self.build_temp) 26 | build_temp.mkdir(parents=True, exist_ok=True) 27 | extdir = pathlib.Path(self.get_ext_fullpath(ext.name)) 28 | 29 | config = 'Release ' + '--j4' 30 | cmake_args = [ 31 | '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=' + str(extdir.parent.absolute()), 32 | '-DCMAKE_BUILD_TYPE=' + config 33 | ] 34 | 35 | build_args = [ 36 | '--config', config 37 | ] 38 | 39 | os.chdir(str(build_temp)) 40 | self.spawn(['cmake', str(cwd)] + cmake_args) 41 | if not self.dry_run: 42 | if os.name != "nt": 43 | self.spawn(['cmake', '--build', '.'] + build_args) 44 | else: 45 | self.spawn(['cmake', '--build', '.']) 46 | os.chdir(str(cwd)) 47 | 48 | required = ["numpy", "scipy", "matplotlib"] 49 | 50 | setup( 51 | name='PyPO-pkg', 52 | license="MIT", 53 | version='1.0.0', 54 | author="Arend Moerman", 55 | install_requires = required, 56 | package_dir = {'': 'src'}, 57 | packages=['PyPO'], 58 | ext_modules=[CMakeExtension(os.path.join("PyPO", "libs"))], 59 | cmdclass={'build_ext': build_ext}, 60 | classifiers=[ 61 | "Programming Language :: Python :: 3", 62 | "Programming Language :: C", 63 | "Programming Language :: C++", 64 | "Environment :: GPU :: NVIDIA CUDA :: 11", 65 | "License :: OSI Approved :: MIT License", 66 | "Operating System :: OS Independent", 67 | "Topic :: Scientific/Engineering :: Physics" 68 | ], 69 | python_requires='>=3.8', 70 | ) 71 | -------------------------------------------------------------------------------- /src/PyPO/BindRefl.py: -------------------------------------------------------------------------------- 1 | """! 2 | @file 3 | Bindings for the ctypes interface for PyPO. 4 | These bindings are concerned with generation of reflector grids from dictionaries. 5 | """ 6 | 7 | import ctypes 8 | import numpy as np 9 | import os 10 | import sys 11 | import pathlib 12 | 13 | import PyPO.BindUtils as BUtils 14 | import PyPO.Structs as PStructs 15 | 16 | def loadRefllib(): 17 | """! 18 | Load the PyPOrefl shared library. Will detect the operating system and link the library accordingly. 19 | 20 | @returns lib The ctypes library containing the C/C++ functions. 21 | """ 22 | 23 | path_cur = pathlib.Path(__file__).parent.resolve() 24 | try: 25 | lib = ctypes.CDLL(os.path.join(path_cur, "pyporefl.dll")) 26 | except: 27 | try: 28 | lib = ctypes.CDLL(os.path.join(path_cur, "libpyporefl.so")) 29 | except: 30 | lib = ctypes.CDLL(os.path.join(path_cur, "libpyporefl.dylib")) 31 | 32 | return lib 33 | 34 | def generateGrid(reflparams_py, transform=True, spheric=True): 35 | """! 36 | Double precision function for generating reflector grids. 37 | This is the function called by the CPU PyPO bindings. 38 | Also, when called from System, this is the binding that is called. 39 | 40 | @param reflparams_py A reflDict dictionary. 41 | @param transform Whether to generate the grid in nominal configuration or to apply transformation matrix. 42 | @param spheric Convert Az-El co-ordinates to spherical (far-field only). 43 | 44 | @returns grids A reflGrids object. 45 | """ 46 | 47 | lib = loadRefllib() 48 | 49 | size = reflparams_py["gridsize"][0] * reflparams_py["gridsize"][1] 50 | 51 | inp = PStructs.reflparams() 52 | res = PStructs.reflcontainer() 53 | 54 | 55 | BUtils.allfill_reflparams(inp, reflparams_py, ctypes.c_double) 56 | BUtils.allocate_reflcontainer(res, size, ctypes.c_double) 57 | 58 | lib.generateGrid.argtypes = [PStructs.reflparams, ctypes.POINTER(PStructs.reflcontainer), 59 | ctypes.c_bool, ctypes.c_bool] 60 | lib.generateGrid.restype = None 61 | 62 | lib.generateGrid(inp, ctypes.byref(res), transform, spheric) 63 | 64 | 65 | grids = BUtils.creflToObj(res, reflparams_py["gridsize"], np.float64) 66 | 67 | 68 | return grids 69 | -------------------------------------------------------------------------------- /docs/search/classes_2.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['c2bundle_0',['c2Bundle',['../structc2Bundle.html',1,'c2Bundle'],['../classPyPO_1_1Structs_1_1c2Bundle.html',1,'PyPO.Structs.c2Bundle']]], 4 | ['c2bundlef_1',['c2Bundlef',['../structc2Bundlef.html',1,'c2Bundlef'],['../classPyPO_1_1Structs_1_1c2Bundlef.html',1,'PyPO.Structs.c2Bundlef']]], 5 | ['c2rbundle_2',['c2rBundle',['../structc2rBundle.html',1,'c2rBundle'],['../classPyPO_1_1Structs_1_1c2rBundle.html',1,'PyPO.Structs.c2rBundle']]], 6 | ['c2rbundlef_3',['c2rBundlef',['../structc2rBundlef.html',1,'c2rBundlef'],['../classPyPO_1_1Structs_1_1c2rBundlef.html',1,'PyPO.Structs.c2rBundlef']]], 7 | ['c4bundle_4',['c4Bundle',['../structc4Bundle.html',1,'c4Bundle'],['../classPyPO_1_1Structs_1_1c4Bundle.html',1,'PyPO.Structs.c4Bundle']]], 8 | ['c4bundlef_5',['c4Bundlef',['../structc4Bundlef.html',1,'c4Bundlef'],['../classPyPO_1_1Structs_1_1c4Bundlef.html',1,'PyPO.Structs.c4Bundlef']]], 9 | ['cframe_6',['cframe',['../structcframe.html',1,'cframe'],['../classPyPO_1_1Structs_1_1cframe.html',1,'PyPO.Structs.cframe']]], 10 | ['cframef_7',['cframef',['../structcframef.html',1,'cframef'],['../classPyPO_1_1Structs_1_1cframef.html',1,'PyPO.Structs.cframef']]], 11 | ['checkbox_8',['checkbox',['../classGUI_1_1ParameterForms_1_1simpleInputWidgets_1_1checkbox.html',1,'GUI::ParameterForms::simpleInputWidgets']]], 12 | ['currentcomponents_9',['CurrentComponents',['../classPyPO_1_1Enums_1_1CurrentComponents.html',1,'PyPO::Enums']]], 13 | ['currentnameerror_10',['CurrentNameError',['../classPyPO_1_1Checks_1_1CurrentNameError.html',1,'PyPO::Checks']]], 14 | ['currents_11',['currents',['../classPyPO_1_1PyPOTypes_1_1currents.html',1,'PyPO::PyPOTypes']]], 15 | ['currentwidget_12',['CurrentWidget',['../classGUI_1_1ElementWidget_1_1CurrentWidget.html',1,'GUI::ElementWidget']]], 16 | ['customenum_13',['CustomEnum',['../classPyPO_1_1Enums_1_1CustomEnum.html',1,'PyPO::Enums']]], 17 | ['customformatter_14',['CustomFormatter',['../classPyPO_1_1CustomLogger_1_1CustomFormatter.html',1,'PyPO::CustomLogger']]], 18 | ['customguiformatter_15',['CustomGUIFormatter',['../classPyPO_1_1CustomLogger_1_1CustomGUIFormatter.html',1,'PyPO::CustomLogger']]], 19 | ['customguilogger_16',['CustomGUILogger',['../classPyPO_1_1CustomLogger_1_1CustomGUILogger.html',1,'PyPO::CustomLogger']]], 20 | ['customlogger_17',['CustomLogger',['../classPyPO_1_1CustomLogger_1_1CustomLogger.html',1,'PyPO::CustomLogger']]] 21 | ]; 22 | -------------------------------------------------------------------------------- /src/GUI/Accordion.py: -------------------------------------------------------------------------------- 1 | """! 2 | @file 3 | An implementation of an accordion component. 4 | """ 5 | 6 | from PySide6.QtWidgets import QWidget, QVBoxLayout, QLabel, QHBoxLayout 7 | from PySide6.QtCore import Qt 8 | 9 | class Accordion(QWidget): 10 | """! 11 | Class to implement an Accordion widget. 12 | """ 13 | def __init__(self, parent=None): 14 | super().__init__(parent) 15 | layout = QVBoxLayout() 16 | self.setLayout(layout) 17 | layout.setAlignment(Qt.AlignTop) 18 | 19 | self.POFields = self.AccordionSection("Fields") 20 | self.POCurrents = self.AccordionSection("Currents") 21 | self.SPOFields = self.AccordionSection("Scalar Fields") 22 | layout.addWidget(self.POFields) 23 | layout.addWidget(self.POCurrents) 24 | layout.addWidget(self.SPOFields) 25 | 26 | class AccordionSection(QWidget): 27 | """! 28 | Define section of Accordion. 29 | """ 30 | def __init__(self, text, parent=None): 31 | super().__init__(parent) 32 | 33 | ### MainLayout ### 34 | layout = QVBoxLayout() 35 | layout.setAlignment(Qt.AlignTop) 36 | self.setLayout(layout) 37 | 38 | ### Header ### 39 | Header = QWidget() 40 | headerLayout = QHBoxLayout(Header) 41 | 42 | textLabel = QLabel(text) 43 | textLabel.setAlignment(Qt.AlignLeft) 44 | self.arrowLabel = QLabel() 45 | self.arrowLabel.setAlignment(Qt.AlignRight) 46 | headerLayout.addWidget(textLabel) 47 | headerLayout.addWidget(self.arrowLabel) 48 | 49 | Header.mouseReleaseEvent = self.toggle 50 | layout.addWidget(Header) 51 | 52 | ### Content ### 53 | self.content = QWidget() 54 | self.contentLayout = QVBoxLayout(self.content) 55 | layout.addWidget(self.content) 56 | 57 | self.showContent() 58 | 59 | def toggle(self, event): 60 | if self.content.isVisible(): 61 | self.hideContent() 62 | else: 63 | self.showContent() 64 | 65 | def hideContent(self): 66 | self.content.hide() 67 | self.arrowLabel.setText("▽") 68 | 69 | def showContent(self): 70 | self.content.show() 71 | self.arrowLabel.setText("△") 72 | 73 | def addWidget(self, widget): 74 | self.contentLayout.addWidget(widget) 75 | 76 | 77 | -------------------------------------------------------------------------------- /src/SetupGTest.py: -------------------------------------------------------------------------------- 1 | """! 2 | @file 3 | File for building, making and running the C++ unittests. 4 | """ 5 | 6 | import os 7 | 8 | import shutil 9 | import traceback 10 | import argparse 11 | 12 | def SetupGTest(): 13 | """ 14 | Create build environment for C++/CUDA unittest using Google test. 15 | """ 16 | 17 | parser = argparse.ArgumentParser(description="setup for making C++/CUDA unittests") 18 | parser.add_argument("-b", "--build", help="generate build files", action="store_true") 19 | parser.add_argument("-m", "--make", help="make from build files", action="store_true") 20 | parser.add_argument("-c", "--clean", help="clean build files", action="store_true") 21 | parser.add_argument("-r", "--run", help="run all unittests", action="store_true") 22 | args = parser.parse_args() 23 | 24 | buildPath = os.path.join(os.path.dirname(os.path.realpath(__file__)), "build") 25 | binPath = os.path.join(os.path.dirname(os.path.realpath(__file__)), "bin") 26 | 27 | 28 | if args.clean: 29 | try: 30 | shutil.rmtree(buildPath) 31 | except Exception as err: 32 | print(traceback.format_exc()) 33 | 34 | try: 35 | shutil.rmtree(binPath) 36 | except Exception as err: 37 | print(traceback.format_exc()) 38 | 39 | if args.build: 40 | try: 41 | cwd = os.getcwd() 42 | try: 43 | os.mkdir(buildPath) 44 | 45 | except Exception as err: 46 | print(traceback.format_exc()) 47 | 48 | os.chdir(buildPath) 49 | os.system(f"cmake ..") 50 | os.chdir(cwd) 51 | 52 | except Exception as err: 53 | print(traceback.format_exc()) 54 | 55 | if args.make: 56 | try: 57 | cwd = os.getcwd() 58 | os.chdir(buildPath) 59 | os.system("make") 60 | os.chdir(cwd) 61 | except Exception as err: 62 | print(traceback.format_exc()) 63 | 64 | if args.run: 65 | try: 66 | exePath = os.path.join(binPath, "runTests") 67 | os.system(exePath) 68 | except Exception as err: 69 | print(traceback.format_exc()) 70 | 71 | try: 72 | exePath = os.path.join(binPath, "runCUDATests") 73 | os.system(exePath) 74 | except Exception as err: 75 | print(traceback.format_exc()) 76 | 77 | 78 | if __name__ == "__main__": 79 | SetupGTest() 80 | -------------------------------------------------------------------------------- /src/PyPO/Sellmeier.py: -------------------------------------------------------------------------------- 1 | """! 2 | @file 3 | File containing classes representing dielectric materials commonly used in lenses. 4 | Each class holds the Sellmeier coefficients in order to calculate the wavelength-dependent refractive index for a lens. 5 | """ 6 | 7 | from dataclasses import dataclass 8 | import numpy as np 9 | 10 | def Sellmeier(A1, A2, A3, B1, B2, B3, lam): 11 | n = np.sqrt((A1/(lam**2 - B1) + A2/(lam**2 - B2) + A3/(lam**2 - B3)) * lam**2 + 1) 12 | return n 13 | 14 | class BK7: 15 | """! 16 | Class for representing borosilicate crown glass (BK7). 17 | """ 18 | 19 | A1 = 1.03961212 20 | A2 = 0.231792344 21 | A3 = 1.01046945 22 | 23 | B1 = 0.00600069867 24 | B2 = 0.0200179144 25 | B3 = 103.560653 26 | 27 | def __init__(self, lam): 28 | """! 29 | Constructor. Sets the wavelength at which refractive index will be calculated. 30 | Note that the wavelength has to be given in millimeters, otherwise PyPO will not return the correct refractive index. 31 | """ 32 | 33 | self.lam_um = lam * 1e3 34 | self.n = Sellmeier(self.A1, self.A2, self.A3, 35 | self.B1, self.B2, self.B3, self.lam_um) 36 | 37 | class FS: 38 | """! 39 | Class for representing fused silica glass (FS). 40 | """ 41 | 42 | A1 = 0.6961663 43 | A2 = 0.4079426 44 | A3 = 0.8974794 45 | 46 | B1 = 0.0684043**2 47 | B2 = 0.1162414**2 48 | B3 = 9.896161**2 49 | 50 | def __init__(self, lam): 51 | """! 52 | Constructor. Sets the wavelength at which refractive index will be calculated. 53 | Note that the wavelength has to be given in millimeters, otherwise PyPO will not return the correct refractive index. 54 | """ 55 | 56 | self.lam_um = lam * 1e3 57 | self.n = Sellmeier(self.A1, self.A2, self.A3, 58 | self.B1, self.B2, self.B3, self.lam_um) 59 | 60 | 61 | class F2: 62 | """! 63 | Class for representing Schott flint glass (F2). 64 | """ 65 | 66 | A1 = 1.34533359 67 | A2 = 0.209073176 68 | A3 = 0.937357162 69 | 70 | B1 = 0.00997743871 71 | B2 = 0.0470450767 72 | B3 = 111.886764 73 | 74 | def __init__(self, lam): 75 | """! 76 | Constructor. Sets the wavelength at which refractive index will be calculated. 77 | Note that the wavelength has to be given in millimeters, otherwise PyPO will not return the correct refractive index. 78 | """ 79 | 80 | self.lam_um = lam * 1e3 81 | self.n = Sellmeier(self.A1, self.A2, self.A3, 82 | self.B1, self.B2, self.B3, self.lam_um) 83 | 84 | 85 | -------------------------------------------------------------------------------- /docs/search/all_d.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['n_0',['n',['../structGPODict.html#a8af7bb2b1c43dfcd9d76d2d6348fc341',1,'GPODict::n'],['../structScalarGPODict.html#a3f8b679fa8f6575bb6d045315fd2ccea',1,'ScalarGPODict::n'],['../structGPODictf.html#a4638f157cee8c586889079e35b0eff22',1,'GPODictf::n'],['../structScalarGPODictf.html#a3a980d4b83748c6c936cdfd930a6d538',1,'ScalarGPODictf::n']]], 4 | ['n_5fcells_1',['n_cells',['../structreflparams.html#a0098abebe5a4fb9755bc183191af8327',1,'reflparams::n_cells'],['../structreflparamsf.html#ad7d0eba6186d4faffd405ec456d90f69',1,'reflparamsf::n_cells']]], 5 | ['ne_2',['ne',['../classRTRefls.html#a170c833e1bd5e0e939961e99b1571f13',1,'RTRefls::ne()'],['../KernelsRTf_8cu.html#ab9b820f2d992c2e30a79f0a0bb899240',1,'ne(): KernelsRTf.cu']]], 6 | ['nh_3',['nh',['../classRTRefls.html#ab43f854e2976d9d926ad592cb0dbac4c',1,'RTRefls::nh()'],['../KernelsRTf_8cu.html#a5031891e820b84beb3d1a7e19763f474',1,'nh(): KernelsRTf.cu']]], 7 | ['normalize_4',['normalize',['../classUtils.html#a3db4ae94a1e9d5f55ff5b93a81f718ff',1,'Utils::normalize()'],['../GUtils_8h.html#ac6365a1b5589b457915196e459e9ceae',1,'normalize(): GUtils.h']]], 8 | ['np_5',['np',['../classRTRefls.html#aa85c63cb82a4867e0141647f20410dda',1,'RTRefls::np()'],['../KernelsRTf_8cu.html#a8e1559c2ea648b1288085b2faf63bad7',1,'np(): KernelsRTf.cu']]], 9 | ['npl_6',['npl',['../classRTRefls.html#a0121b3c72f73eff31898ab2f39d1ae39',1,'RTRefls::npl()'],['../KernelsRTf_8cu.html#ae03d7f2f3141a07eca2cd1e6cc6040da',1,'npl(): KernelsRTf.cu']]], 10 | ['nrays_7',['nRays',['../structRTDict.html#ad8d2fce8a2bbcb02308843c07c5b1745',1,'RTDict::nRays'],['../structGRTDict.html#a30b3004729305813debbe1d89ae9994b',1,'GRTDict::nRays'],['../structRTDictf.html#a44756df9adb2c8514a28511a00ed07a5',1,'RTDictf::nRays'],['../structGRTDictf.html#a2e03bce49f79c79d6b87413b8d4ca43d',1,'GRTDictf::nRays']]], 11 | ['nring_8',['nRing',['../structRTDict.html#add71a44e886bcd94a47de8003c3c18c6',1,'RTDict::nRing'],['../structRTDictf.html#a087b9b84bc06e8ec57f4fc54aa03adc9',1,'RTDictf::nRing']]], 12 | ['nx_9',['nx',['../structreflcontainer.html#ab862b2fa619189a2c0bfe4391d9001ee',1,'reflcontainer::nx'],['../structreflcontainerf.html#a53fe29cfc58c61904f8517bd0f7c20dc',1,'reflcontainerf::nx']]], 13 | ['ny_10',['ny',['../structreflcontainer.html#a2737304edbcc529252b75a96e0138d7c',1,'reflcontainer::ny'],['../structreflcontainerf.html#a3361936844af5a235400f0804d7beef5',1,'reflcontainerf::ny']]], 14 | ['nz_11',['nz',['../structreflcontainer.html#ac6db2cc383c52f6ede1bc0215e048845',1,'reflcontainer::nz'],['../structreflcontainerf.html#a87ade7f24d62d965a50746719fd0cb76',1,'reflcontainerf::nz']]] 15 | ]; 16 | -------------------------------------------------------------------------------- /src/include/Random.h: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | 6 | #define _USE_MATH_DEFINES 7 | 8 | #ifndef __Random_h 9 | #define __Random_h 10 | 11 | /*! \file Random.h 12 | \brief Class for generating random numbers. 13 | 14 | Generate object for creating random numbers for rejection sampling. 15 | Currently only for Gaussian beams, but want to include Poisson disk sampling too. 16 | If called empty, generate a random seed to use, which can be retrieved. 17 | If called with seed, use that seed. 18 | */ 19 | 20 | /** 21 | * Class for generating random numbers. 22 | * 23 | * Note that no function returns. All values are stored inside a variable which is passed by reference to the function. 24 | */ 25 | template class Random 26 | { 27 | private: 28 | unsigned int seed; 29 | std::mt19937 gen; 30 | 31 | public: 32 | Random(); 33 | Random(unsigned int seed); 34 | 35 | T generateUniform(T lower = -1.0); 36 | std::vector generateUniform(int num, T lower = -1.0); 37 | }; 38 | #endif 39 | 40 | /** 41 | * Initialize RNG. This constructor generates a random seed for the random draws. 42 | */ 43 | template 44 | Random::Random() 45 | { 46 | std::random_device rd; 47 | std::mt19937 geno(rd()); 48 | this->seed = rd(); 49 | this->gen = geno; 50 | } 51 | 52 | /** 53 | * Initialize RNG. This constructor takes a pre-set seed for the random draws. 54 | * 55 | * @param seed Positive integer determining the RNG seed. 56 | */ 57 | template 58 | Random::Random(unsigned int seed) 59 | { 60 | std::mt19937 geno(seed); 61 | this->seed = seed; 62 | this->gen = geno; 63 | } 64 | 65 | /** 66 | * Generate a random sample. 67 | * 68 | * @param lower Lower value of range. Defaults to -1.0. 69 | * 70 | * @returns out Number between lower and 1.0.. 71 | */ 72 | template 73 | T Random::generateUniform(T lower) 74 | { 75 | std::uniform_real_distribution dis(lower, 1.0); 76 | return dis(this->gen); 77 | } 78 | 79 | /** 80 | * Generate multiple random samples. 81 | * 82 | * @param num Number of samples to return 83 | * @param lower Lower value of range. Defaults to -1.0. 84 | * 85 | * @returns out Vector containing num uniform samples between lower and 1.0. 86 | */ 87 | template 88 | std::vector Random::generateUniform(int num, T lower) 89 | { 90 | std::uniform_real_distribution dis(lower, 1.0); 91 | std::vector out(num, 0); 92 | 93 | for (int n = 0; n < num; ++n) { 94 | out[n] = dis(this->gen); 95 | } 96 | return out; 97 | } 98 | -------------------------------------------------------------------------------- /src/CUDA/InterfaceCUDA.h: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | 6 | #include "GUtils.h" 7 | #include "Structs.h" 8 | #include "InterfaceReflector.h" 9 | #include "MemUtils.h" 10 | #include "Debug.h" 11 | 12 | #define CSIZE 10 13 | #define CSIZERT 5 14 | 15 | #ifdef _WIN32 16 | # define PYPO_DLL __declspec(dllexport) 17 | #else 18 | # define PYPO_DLL 19 | #endif 20 | 21 | #ifndef __InterfaceCUDA_h 22 | #define __InterfaceCUDA_h 23 | /*! \file InterfaceCUDA.h 24 | \brief Declarations of PO and RT library for GPU. 25 | 26 | Provides double and single precision interface for NVIDIA GPUs running CUDA. 27 | */ 28 | 29 | extern "C" 30 | { 31 | PYPO_DLL void callKernelf_JM(c2Bundlef *res, reflparamsf source, reflparamsf target, 32 | reflcontainerf *cs, reflcontainerf *ct, 33 | c2Bundlef *currents, 34 | float k, float epsilon, 35 | float t_direction, int nBlocks, int nThreads); 36 | 37 | PYPO_DLL void callKernelf_EH(c2Bundlef *res, reflparamsf source, reflparamsf target, 38 | reflcontainerf *cs, reflcontainerf *ct, 39 | c2Bundlef *currents, 40 | float k, float epsilon, 41 | float t_direction, int nBlocks, int nThreads); 42 | 43 | PYPO_DLL void callKernelf_JMEH(c4Bundlef *res, reflparamsf source, reflparamsf target, 44 | reflcontainerf *cs, reflcontainerf *ct, 45 | c2Bundlef *currents, 46 | float k, float epsilon, 47 | float t_direction, int nBlocks, int nThreads); 48 | 49 | PYPO_DLL void callKernelf_EHP(c2rBundlef *res, reflparamsf source, reflparamsf target, 50 | reflcontainerf *cs, reflcontainerf *ct, 51 | c2Bundlef *currents, 52 | float k, float epsilon, 53 | float t_direction, int nBlocks, int nThreads); 54 | 55 | PYPO_DLL void callKernelf_FF(c2Bundlef *res, reflparamsf source, reflparamsf target, 56 | reflcontainerf *cs, reflcontainerf *ct, 57 | c2Bundlef *currents, 58 | float k, float epsilon, 59 | float t_direction, int nBlocks, int nThreads); 60 | 61 | PYPO_DLL void callKernelf_scalar(arrC1f *res, reflparamsf source, reflparamsf target, 62 | reflcontainerf *cs, reflcontainerf *ct, arrC1f *inp, 63 | float k, float epsilon, 64 | float t_direction, int nBlocks, int nThreads); 65 | 66 | PYPO_DLL void callRTKernel(reflparamsf ctp, cframef *fr_in, 67 | cframef *fr_out, float epsilon, float t0, 68 | int nBlocks, int nThreads); 69 | } 70 | 71 | #endif 72 | -------------------------------------------------------------------------------- /src/PyPO/BindTransf.py: -------------------------------------------------------------------------------- 1 | """! 2 | @file 3 | Bindings for the ctypes interface for PyPO. 4 | These bindings are concerned with transforming frame and fields/currents. 5 | """ 6 | 7 | import ctypes 8 | import numpy as np 9 | import os 10 | import pathlib 11 | import traceback 12 | 13 | import PyPO.BindUtils as BUtils 14 | import PyPO.Structs as PStructs 15 | import PyPO.Config as Config 16 | import PyPO.Threadmgr as TManager 17 | 18 | def loadTransflib(): 19 | """! 20 | Load the pypotransf shared library. Will detect the operating system and link the library accordingly. 21 | 22 | @returns lib The ctypes library containing the C/C++ functions. 23 | """ 24 | 25 | path_cur = pathlib.Path(__file__).parent.resolve() 26 | try: 27 | lib = ctypes.CDLL(os.path.join(path_cur, "pypotransf.dll")) 28 | except: 29 | try: 30 | lib = ctypes.CDLL(os.path.join(path_cur, "libpypotransf.so")) 31 | except: 32 | lib = ctypes.CDLL(os.path.join(path_cur, "libpypotransf.dylib")) 33 | 34 | lib.transformRays.argtypes = [ctypes.POINTER(PStructs.cframe), ctypes.POINTER(ctypes.c_double)] 35 | lib.transformRays.restype = None 36 | 37 | lib.transformFields.argtypes = [ctypes.POINTER(PStructs.c2Bundle), ctypes.POINTER(ctypes.c_double), ctypes.c_int] 38 | lib.transformFields.restype = None 39 | 40 | return lib 41 | 42 | def transformRays(fr): 43 | """! 44 | Transform a frame of rays. 45 | 46 | @param fr A frame object. 47 | 48 | @see frame 49 | """ 50 | 51 | lib = loadTransflib() 52 | 53 | res = PStructs.cframe() 54 | 55 | BUtils.allfill_cframe(res, fr, fr.size, ctypes.c_double) 56 | c_mat = BUtils.allfill_mat4D(fr.transf, ctypes.c_double) 57 | 58 | lib.transformRays(ctypes.byref(res), c_mat) 59 | 60 | shape = (fr.size,) 61 | out = BUtils.frameToObj(res, np_t=np.float64, shape=shape) 62 | 63 | out.setMeta(fr.pos, fr.ori, fr.transf) 64 | out.snapshots = fr.snapshots 65 | return out 66 | 67 | def transformPO(obj, transf): 68 | """! 69 | Transform a frame of rays. 70 | 71 | @param fr A frame object. 72 | 73 | @see frame 74 | """ 75 | 76 | lib = loadTransflib() 77 | 78 | res = PStructs.c2Bundle() 79 | BUtils.allfill_c2Bundle(res, obj, obj.size, ctypes.c_double) 80 | c_mat = BUtils.allfill_mat4D(transf, ctypes.c_double) 81 | 82 | obj_type = "fields" 83 | 84 | if obj.type == "JM": 85 | obj_type = "currents" 86 | 87 | nTot = ctypes.c_int(obj.size) 88 | 89 | lib.transformFields(ctypes.byref(res), c_mat, nTot) 90 | 91 | out = BUtils.c2BundleToObj(res, shape=obj.shape, obj_t=obj_type, np_t=np.float64) 92 | 93 | out.setMeta(obj.surf, obj.k) 94 | return out 95 | 96 | -------------------------------------------------------------------------------- /docs/search/functions_4.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['dealloccomplexhost_0',['deallocComplexHost',['../classMemUtils.html#a39d844d5096373202c6ea66d37639c60',1,'MemUtils']]], 4 | ['deallocfloathost_1',['deallocFloatHost',['../classMemUtils.html#aa5faf9b3c39442a2bb653b644e4ab473',1,'MemUtils']]], 5 | ['deletesnap_2',['deleteSnap',['../group__public__api__reflmeths.html#gacbd2cc901df745d4de56e220635f3bb4',1,'PyPO::System::System']]], 6 | ['diff_3',['diff',['../classUtils.html#a739ead0c32841ad54b998d18447b24f4',1,'Utils::diff(const std::array< T, 3 > &v1, const std::array< T, 3 > &v2, std::array< T, 3 > &out)'],['../classUtils.html#a3157197aea47bb63c1595a94a05cfe55',1,'Utils::diff(const std::array< std::complex< T >, 3 > &cv1, const std::array< std::complex< T >, 3 > &cv2, std::array< std::complex< T >, 3 > &out)'],['../GUtils_8h.html#a2dfc51352d5569a3f70d63d99091ae4e',1,'diff(float(&v1)[3], float(&v2)[3], float(&out)[3]): GUtils.h'],['../GUtils_8h.html#a863cace8ce609617a08f0d7fba11cd9e',1,'diff(cuFloatComplex(&cv1)[3], cuFloatComplex(&cv2)[3], cuFloatComplex(&out)[3]): GUtils.h']]], 7 | ['dot_4',['dot',['../classUtils.html#adc5fb35aec20bd543c74b9b8d37c59d2',1,'Utils::dot(const std::array< T, 3 > &v1, const std::array< T, 3 > &v2, T &out)'],['../classUtils.html#a42c70633cdc6fe4912c289c9289bb481',1,'Utils::dot(const std::array< std::complex< T >, 3 > &cv1, const std::array< std::complex< T >, 3 > &cv2, std::complex< T > &out)'],['../classUtils.html#a4a76c3dadce13a5f00a1256a47c7bd92',1,'Utils::dot(const std::array< std::complex< T >, 3 > &cv1, const std::array< T, 3 > &v2, std::complex< T > &out)'],['../classUtils.html#a48d4f0c85d1f8ff8dcd6e7bd0975c61a',1,'Utils::dot(const std::array< T, 3 > &v1, const std::array< std::complex< T >, 3 > &cv2, std::complex< T > &out)'],['../GUtils_8h.html#aa886a7ee4fb4b31a2e473dbac795cd18',1,'dot(float(&v1)[3], float(&v2)[3], float &out): GUtils.h'],['../GUtils_8h.html#ab5e53c7a59c8c49bed04fa052f13a6db',1,'dot(cuFloatComplex(&cv1)[3], cuFloatComplex(&cv2)[3], cuFloatComplex &out): GUtils.h'],['../GUtils_8h.html#ab51c3139511c69775d2e01ec7885d495',1,'dot(cuFloatComplex(&cv1)[3], float(&v2)[3], cuFloatComplex &out): GUtils.h'],['../GUtils_8h.html#a9a8a6dfdea89253ed5b0fd379eba51a0',1,'dot(float(&v1)[3], cuFloatComplex(&cv2)[3], cuFloatComplex &out): GUtils.h']]], 8 | ['dyad_5',['dyad',['../classUtils.html#a1947abd98bcfe594b950d90db4f12e59',1,'Utils::dyad()'],['../GUtils_8h.html#ab9481598dea03b38225920c01e04ec3e',1,'dyad(): GUtils.h']]] 9 | ]; 10 | -------------------------------------------------------------------------------- /src/common/Transform.cpp: -------------------------------------------------------------------------------- 1 | #include "Transform.h" 2 | 3 | /*! \file Transform.cpp 4 | \brief Implementations of transformations for frames and fields/currents. 5 | */ 6 | 7 | /** 8 | * Transform a frame of rays. 9 | * 10 | * @param fr Pointer to frame to be transformed. 11 | * @param mat Pointer to transformation matrix. 12 | */ 13 | void transformRays(cframe *fr, double *mat) 14 | { 15 | Utils ut; 16 | 17 | bool vec = true; 18 | std::array inp, out; 19 | for (int i=0; isize; i++) 20 | { 21 | inp[0] = fr->x[i]; 22 | inp[1] = fr->y[i]; 23 | inp[2] = fr->z[i]; 24 | 25 | ut.matVec4(mat, inp, out); 26 | 27 | fr->x[i] = out[0]; 28 | fr->y[i] = out[1]; 29 | fr->z[i] = out[2]; 30 | 31 | inp[0] = fr->dx[i]; 32 | inp[1] = fr->dy[i]; 33 | inp[2] = fr->dz[i]; 34 | 35 | ut.matVec4(mat, inp, out, vec); 36 | 37 | fr->dx[i] = out[0]; 38 | fr->dy[i] = out[1]; 39 | fr->dz[i] = out[2]; 40 | } 41 | } 42 | 43 | /** 44 | * Transform a c2Bundle. 45 | * 46 | * Because c2Bundle objects are defined on surfaces, the components are only rotated. 47 | * 48 | * @param fr Pointer to frame to be transformed. 49 | * @param mat Pointer to transformation matrix. 50 | */ 51 | void transformFields(c2Bundle *fields, double *mat, int nTot) 52 | { 53 | Utils ut; 54 | 55 | bool vec = true; 56 | std::array inp, out; 57 | for (int i=0; ir1x[i]; 60 | inp[1] = fields->r1y[i]; 61 | inp[2] = fields->r1z[i]; 62 | 63 | ut.matVec4(mat, inp, out, vec); 64 | //printf("%d\n", len); 65 | fields->r1x[i] = out[0]; 66 | fields->r1y[i] = out[1]; 67 | fields->r1z[i] = out[2]; 68 | 69 | inp[0] = fields->i1x[i]; 70 | inp[1] = fields->i1y[i]; 71 | inp[2] = fields->i1z[i]; 72 | 73 | ut.matVec4(mat, inp, out, vec); 74 | 75 | fields->i1x[i] = out[0]; 76 | fields->i1y[i] = out[1]; 77 | fields->i1z[i] = out[2]; 78 | 79 | inp[0] = fields->r2x[i]; 80 | inp[1] = fields->r2y[i]; 81 | inp[2] = fields->r2z[i]; 82 | 83 | ut.matVec4(mat, inp, out, vec); 84 | 85 | fields->r2x[i] = out[0]; 86 | fields->r2y[i] = out[1]; 87 | fields->r2z[i] = out[2]; 88 | 89 | inp[0] = fields->i2x[i]; 90 | inp[1] = fields->i2y[i]; 91 | inp[2] = fields->i2z[i]; 92 | 93 | ut.matVec4(mat, inp, out, vec); 94 | 95 | fields->i2x[i] = out[0]; 96 | fields->i2y[i] = out[1]; 97 | fields->i2z[i] = out[2]; 98 | } 99 | } 100 | -------------------------------------------------------------------------------- /docs/search/functions_10.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['t_0',['T',['../classPyPO_1_1PyPOTypes_1_1resContainer.html#adaef80d555cc2c87a991a887edd81831',1,'PyPO::PyPOTypes::resContainer']]], 4 | ['transformaction_1',['transformAction',['../classGUI_1_1MainWindow_1_1MainWidget.html#a7327ae74af9a986fb33c5b4a12d138db',1,'GUI::MainWindow::MainWidget']]], 5 | ['transformationmultipleaction_2',['transformationMultipleAction',['../classGUI_1_1MainWindow_1_1MainWidget.html#aa1d2301e83bc7f0ceeb0ca9353c6480e',1,'GUI::MainWindow::MainWidget']]], 6 | ['transformationmultipleform_3',['transformationMultipleForm',['../classGUI_1_1MainWindow_1_1MainWidget.html#aa114b70ef1abab82a54cb2a3612bb6d4',1,'GUI::MainWindow::MainWidget']]], 7 | ['transformfields_4',['transformFields',['../Transform_8cpp.html#a8349062c95e8ba262075db5cc8ff98cf',1,'transformFields(c2Bundle *fields, double *mat, int nTot): Transform.cpp'],['../Transform_8h.html#a0f90e058c3134128d485f07cb8d4f0e6',1,'transformFields(c2Bundle *fields, double *mat, int nTot): Transform.cpp']]], 8 | ['transformframeaction_5',['transformFrameAction',['../classGUI_1_1MainWindow_1_1MainWidget.html#a2496c83f6ee12bdb1553dda2a0fce7cc',1,'GUI::MainWindow::MainWidget']]], 9 | ['transformframeform_6',['transformFrameForm',['../classGUI_1_1MainWindow_1_1MainWidget.html#a126f7329f4731ee6e04b9be1775dd202',1,'GUI::MainWindow::MainWidget']]], 10 | ['transformgrids_7',['transformGrids',['../InterfaceReflector_8cpp.html#ac12e89b8d533f7b60f638452323be9a3',1,'InterfaceReflector.cpp']]], 11 | ['transformgroupaction_8',['transformGroupAction',['../classGUI_1_1MainWindow_1_1MainWidget.html#a3aa884bcb4ac092d57512de164e0d6ea',1,'GUI::MainWindow::MainWidget']]], 12 | ['transformgroupform_9',['transformGroupForm',['../classGUI_1_1MainWindow_1_1MainWidget.html#ad6c5c48f111f71633c299667e5e6c903',1,'GUI::MainWindow::MainWidget']]], 13 | ['transformpo_10',['transformPO',['../BindTransf_8py.html#a74a15e4d2f0dc2b1f11c6e4c5c0b15ab',1,'PyPO::BindTransf']]], 14 | ['transformrays_11',['transformRays',['../Transform_8cpp.html#adeaa8489e7f9a924f6cacdfc0e255e14',1,'transformRays(cframe *fr, double *mat): Transform.cpp'],['../Transform_8h.html#aa1aae41a937eb5a3fb817a7d737e914a',1,'transformRays(cframe *fr, double *mat): Transform.cpp'],['../BindTransf_8py.html#a906752d605caa49e5d57b4c08c647bf4',1,'PyPO.BindTransf.transformRays()']]], 15 | ['transformsingleform_12',['transformSingleForm',['../classGUI_1_1MainWindow_1_1MainWidget.html#a0119e9d9a42f2b4916d5320eb6c5a48d',1,'GUI::MainWindow::MainWidget']]], 16 | ['transfrays_13',['transfRays',['../classRayTracer.html#a54308039ddbee81e5c2d2cb0cc7f992f',1,'RayTracer::transfRays()'],['../KernelsRTf_8cu.html#a8e11820281e7691d1ebe20e66176bb53',1,'transfRays(): KernelsRTf.cu']]], 17 | ['translategrids_14',['translateGrids',['../group__public__api__common.html#gaeb3bf04db981faf23c9f9bcc999cc4f7',1,'PyPO::System::System']]] 18 | ]; 19 | -------------------------------------------------------------------------------- /docs/navtree.css: -------------------------------------------------------------------------------- 1 | #nav-tree .children_ul { 2 | margin:0; 3 | padding:4px; 4 | } 5 | 6 | #nav-tree ul { 7 | list-style:none outside none; 8 | margin:0px; 9 | padding:0px; 10 | } 11 | 12 | #nav-tree li { 13 | white-space:nowrap; 14 | margin:0px; 15 | padding:0px; 16 | } 17 | 18 | #nav-tree .plus { 19 | margin:0px; 20 | } 21 | 22 | #nav-tree .selected { 23 | background-image: url('tab_a.png'); 24 | background-repeat:repeat-x; 25 | color: var(--nav-text-active-color); 26 | text-shadow: var(--nav-text-active-shadow); 27 | } 28 | 29 | #nav-tree .selected .arrow { 30 | color: var(--nav-arrow-selected-color); 31 | text-shadow: none; 32 | } 33 | 34 | #nav-tree img { 35 | margin:0px; 36 | padding:0px; 37 | border:0px; 38 | vertical-align: middle; 39 | } 40 | 41 | #nav-tree a { 42 | text-decoration:none; 43 | padding:0px; 44 | margin:0px; 45 | } 46 | 47 | #nav-tree .label { 48 | margin:0px; 49 | padding:0px; 50 | font: 12px var(--font-family-nav); 51 | } 52 | 53 | #nav-tree .label a { 54 | padding:2px; 55 | } 56 | 57 | #nav-tree .selected a { 58 | text-decoration:none; 59 | color:var(--nav-text-active-color); 60 | } 61 | 62 | #nav-tree .children_ul { 63 | margin:0px; 64 | padding:0px; 65 | } 66 | 67 | #nav-tree .item { 68 | margin:0px; 69 | padding:0px; 70 | } 71 | 72 | #nav-tree { 73 | padding: 0px 0px; 74 | font-size:14px; 75 | overflow:auto; 76 | } 77 | 78 | #doc-content { 79 | overflow:auto; 80 | display:block; 81 | padding:0px; 82 | margin:0px; 83 | -webkit-overflow-scrolling : touch; /* iOS 5+ */ 84 | } 85 | 86 | #side-nav { 87 | padding:0 6px 0 0; 88 | margin: 0px; 89 | display:block; 90 | position: absolute; 91 | left: 0px; 92 | width: $width; 93 | overflow : hidden; 94 | } 95 | 96 | .ui-resizable .ui-resizable-handle { 97 | display:block; 98 | } 99 | 100 | .ui-resizable-e { 101 | background-image:var(--nav-splitbar-image); 102 | background-size:100%; 103 | background-repeat:repeat-y; 104 | background-attachment: scroll; 105 | cursor:ew-resize; 106 | height:100%; 107 | right:0; 108 | top:0; 109 | width:6px; 110 | } 111 | 112 | .ui-resizable-handle { 113 | display:none; 114 | font-size:0.1px; 115 | position:absolute; 116 | z-index:1; 117 | } 118 | 119 | #nav-tree-contents { 120 | margin: 6px 0px 0px 0px; 121 | } 122 | 123 | #nav-tree { 124 | background-repeat:repeat-x; 125 | background-color: var(--nav-background-color); 126 | -webkit-overflow-scrolling : touch; /* iOS 5+ */ 127 | } 128 | 129 | #nav-sync { 130 | position:absolute; 131 | top:5px; 132 | right:24px; 133 | z-index:0; 134 | } 135 | 136 | #nav-sync img { 137 | opacity:0.3; 138 | } 139 | 140 | #nav-sync img:hover { 141 | opacity:0.9; 142 | } 143 | 144 | @media print 145 | { 146 | #nav-tree { display: none; } 147 | div.ui-resizable-handle { display: none; position: relative; } 148 | } 149 | 150 | -------------------------------------------------------------------------------- /tests/test_NumberingOfElements.py: -------------------------------------------------------------------------------- 1 | """! 2 | @file 3 | Check whether automatic numbering (override=False) works properly. 4 | """ 5 | 6 | import unittest 7 | from PyPO.System import System 8 | from PyPO.Checks import InputReflError, InputRTError, InputPOError 9 | 10 | from nose2.tools import params 11 | 12 | try: 13 | from . import TestTemplates 14 | except ImportError: 15 | import TestTemplates 16 | 17 | class Test_SystemDictsAndAddElement(unittest.TestCase): 18 | def setUp(self): 19 | self.s = TestTemplates.getSystemWithReflectors() 20 | self.s.setOverride(False) 21 | 22 | self.funcSelect = { 23 | 0 : self.s.addParabola, 24 | 1 : self.s.addHyperbola, 25 | 2 : self.s.addEllipse, 26 | 3 : self.s.addPlane 27 | } 28 | 29 | @params(*TestTemplates.getAllReflectorList()) 30 | def test_namingReflector(self, element): 31 | for i in range(2): 32 | self.funcSelect[self.s.system[element["name"]]["type"]](element) 33 | self.assertTrue(element['name'] + f"_{i+1}" in self.s.system) 34 | 35 | def test_namingGroup(self): 36 | self.s.groupElements('g') 37 | self.s.groupElements('g') 38 | self.s.groupElements('g') 39 | self.assertTrue("g_1" in self.s.groups) 40 | self.assertTrue("g_2" in self.s.groups) 41 | 42 | def test_namingFrames(self): 43 | for i in range(2): 44 | self.s.createTubeFrame(TestTemplates.TubeRTframe) 45 | self.assertTrue(TestTemplates.TubeRTframe["name"] + f"_{i+1}" in self.s.frames) 46 | 47 | self.s.createGRTFrame(TestTemplates.GaussRTframe) 48 | self.assertTrue(TestTemplates.GaussRTframe["name"] + f"_{i+1}" in self.s.frames) 49 | 50 | @params(*TestTemplates.getPlaneList()) 51 | def test_addPOFields(self, plane): 52 | if plane["gmode"] == "AoE": 53 | return 54 | 55 | for i in range(2): 56 | self.s.createPointSource(TestTemplates.PS_Ufield, plane["name"]) 57 | self.assertTrue(TestTemplates.PS_Ufield["name"] + f"_{i+1}" in self.s.fields) 58 | self.assertTrue(TestTemplates.PS_Ufield["name"] + f"_{i+1}" in self.s.currents) 59 | 60 | self.s.createGaussian(TestTemplates.GPOfield, plane["name"]) 61 | self.assertTrue(TestTemplates.GPOfield["name"] + f"_{i+1}" in self.s.fields) 62 | self.assertTrue(TestTemplates.GPOfield["name"] + f"_{i+1}" in self.s.currents) 63 | 64 | self.s.createPointSourceScalar(TestTemplates.PS_Ufield, plane["name"]) 65 | self.assertTrue(TestTemplates.PS_Ufield["name"] + f"_{i+1}" in self.s.scalarfields) 66 | 67 | self.s.createScalarGaussian(TestTemplates.GPOfield, plane["name"]) 68 | self.assertTrue(TestTemplates.GPOfield["name"] + f"_{i+1}" in self.s.scalarfields) 69 | 70 | if __name__ == "__main__": 71 | import nose2 72 | nose2.main() 73 | -------------------------------------------------------------------------------- /docs/folderopend.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /docs/clipboard.js: -------------------------------------------------------------------------------- 1 | /** 2 | 3 | The code below is based on the Doxygen Awesome project, see 4 | https://github.com/jothepro/doxygen-awesome-css 5 | 6 | MIT License 7 | 8 | Copyright (c) 2021 - 2022 jothepro 9 | 10 | Permission is hereby granted, free of charge, to any person obtaining a copy 11 | of this software and associated documentation files (the "Software"), to deal 12 | in the Software without restriction, including without limitation the rights 13 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 14 | copies of the Software, and to permit persons to whom the Software is 15 | furnished to do so, subject to the following conditions: 16 | 17 | The above copyright notice and this permission notice shall be included in all 18 | copies or substantial portions of the Software. 19 | 20 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 21 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 22 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 23 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 24 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 25 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 26 | SOFTWARE. 27 | 28 | */ 29 | 30 | let clipboard_title = "Copy to clipboard" 31 | let clipboard_icon = `` 32 | let clipboard_successIcon = `` 33 | let clipboard_successDuration = 1000 34 | 35 | $(function() { 36 | if(navigator.clipboard) { 37 | const fragments = document.getElementsByClassName("fragment") 38 | for(const fragment of fragments) { 39 | const clipboard_div = document.createElement("div") 40 | clipboard_div.classList.add("clipboard") 41 | clipboard_div.innerHTML = clipboard_icon 42 | clipboard_div.title = clipboard_title 43 | $(clipboard_div).click(function() { 44 | const content = this.parentNode.cloneNode(true) 45 | // filter out line number and folded fragments from file listings 46 | content.querySelectorAll(".lineno, .ttc, .foldclosed").forEach((node) => { node.remove() }) 47 | let text = content.textContent 48 | // remove trailing newlines and trailing spaces from empty lines 49 | text = text.replace(/^\s*\n/gm,'\n').replace(/\n*$/,'') 50 | navigator.clipboard.writeText(text); 51 | this.classList.add("success") 52 | this.innerHTML = clipboard_successIcon 53 | window.setTimeout(() => { // switch back to normal icon after timeout 54 | this.classList.remove("success") 55 | this.innerHTML = clipboard_icon 56 | }, clipboard_successDuration); 57 | }) 58 | fragment.insertBefore(clipboard_div, fragment.firstChild) 59 | } 60 | } 61 | }) 62 | -------------------------------------------------------------------------------- /tests/test_SystemDictsAndAddElements.py: -------------------------------------------------------------------------------- 1 | """! 2 | @file 3 | Tests for checking if objects are properly added to the system. 4 | """ 5 | 6 | import unittest 7 | from PyPO.Checks import InputReflError, InputRTError, InputPOError 8 | import PyPO.Templates as pypotemp 9 | 10 | from PyPO.System import System 11 | 12 | from nose2.tools import params 13 | 14 | try: 15 | from . import TestTemplates 16 | except ImportError: 17 | import TestTemplates 18 | 19 | class Test_SystemDictsAndAddElement(unittest.TestCase): 20 | def setUp(self): 21 | self.s = TestTemplates.getSystemWithReflectors() 22 | 23 | self.invalidDict = {'name' : 'someElement'} 24 | 25 | def test_dictsExist(self): 26 | for i in ["system", "groups", "frames", "currents", "fields", "scalarfields"]: 27 | self.assertIsNotNone(self.s.__getattribute__(i)) 28 | 29 | @params(System.addPlane, System.addParabola, System.addHyperbola, System.addEllipse) 30 | def test_addReflector(self, func): 31 | ltot = len(TestTemplates.getAllReflectorList()) + 1 # 1 extra for far-field plane 32 | 33 | self.assertEqual(len(self.s.system), ltot) 34 | 35 | with self.assertRaises(InputReflError): 36 | func(self.s, self.invalidDict) 37 | 38 | def test_addGroup(self): 39 | ltot = 0 40 | with self.assertRaises(TypeError): 41 | self.s.groupElements() 42 | self.assertEqual(len(self.s.groups), ltot) 43 | 44 | self.s.groupElements(TestTemplates.paraboloid_man_xy["name"], TestTemplates.ellipsoid_z_man_xy["name"]) 45 | self.assertEqual(len(self.s.groups), ltot + 1) 46 | 47 | def test_removeGroup(self): 48 | self.s.groupElements("test", TestTemplates.paraboloid_man_xy["name"], TestTemplates.ellipsoid_z_man_xy["name"]) 49 | self.assertTrue("test" in self.s.groups) 50 | 51 | self.s.removeGroup("test") 52 | self.assertFalse("test" in self.s.groups) 53 | 54 | @params(System.createTubeFrame, System.createGRTFrame) 55 | def test_addRTFrame(self, func): 56 | ltot = len(TestTemplates.getFrameList()) 57 | 58 | self.assertEqual(len(self.s.frames), ltot) 59 | 60 | with self.assertRaises(InputRTError): 61 | func(self.s, self.invalidDict) 62 | 63 | @params(System.createGaussian, System.createPointSource, System.createUniformSource) 64 | def test_addPOFields(self, func): 65 | ltot = len(TestTemplates.getPOSourceList()) + 1 66 | 67 | self.assertEqual(len(self.s.fields), ltot) 68 | self.assertEqual(len(self.s.currents), ltot) 69 | 70 | with self.assertRaises(InputPOError): 71 | func(self.s, self.invalidDict, TestTemplates.plane_xy["name"]) 72 | 73 | @params(System.createScalarGaussian, System.createPointSourceScalar, System.createUniformSourceScalar) 74 | def test_addPOScalarFields(self, func): 75 | ltot = len(TestTemplates.getPOSourceList()) 76 | 77 | self.assertEqual(len(self.s.scalarfields), ltot) 78 | 79 | with self.assertRaises(InputPOError): 80 | func(self.s, self.invalidDict, TestTemplates.plane_xy["name"]) 81 | 82 | if __name__ == "__main__": 83 | import nose2 84 | nose2.main() 85 | 86 | --------------------------------------------------------------------------------