iactsim 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (119) hide show
  1. iactsim-0.1.0/.dockerignore +17 -0
  2. iactsim-0.1.0/.gitignore +35 -0
  3. iactsim-0.1.0/.gitlab-ci.yml +130 -0
  4. iactsim-0.1.0/.reuse/templates/GPL3.txt +17 -0
  5. iactsim-0.1.0/LICENSE.txt +674 -0
  6. iactsim-0.1.0/LICENSES/GPL-3.0-or-later.txt +232 -0
  7. iactsim-0.1.0/LICENSES/Zlib.txt +11 -0
  8. iactsim-0.1.0/PKG-INFO +316 -0
  9. iactsim-0.1.0/README.md +301 -0
  10. iactsim-0.1.0/configure_conda_env.sh +52 -0
  11. iactsim-0.1.0/doc/Makefile +38 -0
  12. iactsim-0.1.0/doc/make.bat +53 -0
  13. iactsim-0.1.0/doc/source/_static/rtd-overrides.css +23 -0
  14. iactsim-0.1.0/doc/source/_templates/versions.html +29 -0
  15. iactsim-0.1.0/doc/source/about.rst +254 -0
  16. iactsim-0.1.0/doc/source/conf.py +109 -0
  17. iactsim-0.1.0/doc/source/images/psf.png +0 -0
  18. iactsim-0.1.0/doc/source/images/psf.png.license +17 -0
  19. iactsim-0.1.0/doc/source/images/segmented_psf.png +0 -0
  20. iactsim-0.1.0/doc/source/images/segmented_psf.png.license +17 -0
  21. iactsim-0.1.0/doc/source/images/vtk_os.png +0 -0
  22. iactsim-0.1.0/doc/source/images/vtk_os.png.license +17 -0
  23. iactsim-0.1.0/doc/source/index.rst +38 -0
  24. iactsim-0.1.0/doc/source/install.rst +93 -0
  25. iactsim-0.1.0/doc/source/reference/reference.rst +182 -0
  26. iactsim-0.1.0/dockerfiles/iactsim-devel-new.Dockerfile +72 -0
  27. iactsim-0.1.0/dockerfiles/iactsim-devel.Dockerfile +77 -0
  28. iactsim-0.1.0/media/psf.png +0 -0
  29. iactsim-0.1.0/media/psf.png.license +17 -0
  30. iactsim-0.1.0/media/psf_spherical.png +0 -0
  31. iactsim-0.1.0/media/psf_spherical.png.license +17 -0
  32. iactsim-0.1.0/media/segmented_psf.png +0 -0
  33. iactsim-0.1.0/media/segmented_psf.png.license +17 -0
  34. iactsim-0.1.0/media/vtk_os.png +0 -0
  35. iactsim-0.1.0/media/vtk_os.png.license +17 -0
  36. iactsim-0.1.0/pyproject.toml +73 -0
  37. iactsim-0.1.0/src/iactsim/__init__.py +60 -0
  38. iactsim-0.1.0/src/iactsim/_iact.py +712 -0
  39. iactsim-0.1.0/src/iactsim/_version.py +21 -0
  40. iactsim-0.1.0/src/iactsim/electronics/__init__.py +24 -0
  41. iactsim-0.1.0/src/iactsim/electronics/_camera.py +988 -0
  42. iactsim-0.1.0/src/iactsim/electronics/_camera_geometry.py +148 -0
  43. iactsim-0.1.0/src/iactsim/electronics/_pde.py +57 -0
  44. iactsim-0.1.0/src/iactsim/electronics/_waveforms.py +214 -0
  45. iactsim-0.1.0/src/iactsim/electronics/signals/__init__.py +22 -0
  46. iactsim-0.1.0/src/iactsim/electronics/signals/discriminator_signals/__init__.py +23 -0
  47. iactsim-0.1.0/src/iactsim/electronics/signals/discriminator_signals/_disciminator_kernels.py +35 -0
  48. iactsim-0.1.0/src/iactsim/electronics/signals/discriminator_signals/disciminator_signals.cu +380 -0
  49. iactsim-0.1.0/src/iactsim/electronics/signals/sampling_signals/__init__.py +22 -0
  50. iactsim-0.1.0/src/iactsim/electronics/signals/sampling_signals/_sampling_kernels.py +35 -0
  51. iactsim-0.1.0/src/iactsim/electronics/signals/sampling_signals/sampling_signals.cu +278 -0
  52. iactsim-0.1.0/src/iactsim/electronics/signals/sipm_signals/__init__.py +21 -0
  53. iactsim-0.1.0/src/iactsim/electronics/signals/sipm_signals/_sipm_kernels.py +31 -0
  54. iactsim-0.1.0/src/iactsim/electronics/signals/sipm_signals/sipm_signals.cu +517 -0
  55. iactsim-0.1.0/src/iactsim/electronics/signals/trigger_logic/__init__.py +22 -0
  56. iactsim-0.1.0/src/iactsim/electronics/signals/trigger_logic/_trigger_kernels.py +43 -0
  57. iactsim-0.1.0/src/iactsim/electronics/signals/trigger_logic/topological_trigger_logic.cu +512 -0
  58. iactsim-0.1.0/src/iactsim/electronics/sources/__init__.py +19 -0
  59. iactsim-0.1.0/src/iactsim/electronics/sources/_poisson_flash.py +113 -0
  60. iactsim-0.1.0/src/iactsim/electronics/sources/poisson_flash.cu +92 -0
  61. iactsim-0.1.0/src/iactsim/electronics/utils/__init__.py +0 -0
  62. iactsim-0.1.0/src/iactsim/electronics/visualization/__init__.py +0 -0
  63. iactsim-0.1.0/src/iactsim/iactsim.mplstyle +70 -0
  64. iactsim-0.1.0/src/iactsim/io/__init__.py +22 -0
  65. iactsim-0.1.0/src/iactsim/io/_corsika.py +358 -0
  66. iactsim-0.1.0/src/iactsim/models/__init__.py +19 -0
  67. iactsim-0.1.0/src/iactsim/models/astri/__init__.py +141 -0
  68. iactsim-0.1.0/src/iactsim/models/astri/_camera.py +1063 -0
  69. iactsim-0.1.0/src/iactsim/models/astri/_os.py +575 -0
  70. iactsim-0.1.0/src/iactsim/models/astri/cam_conf.yaml +87 -0
  71. iactsim-0.1.0/src/iactsim/models/astri/os_conf.yml +39 -0
  72. iactsim-0.1.0/src/iactsim/models/astri/tel_conf.yml +22 -0
  73. iactsim-0.1.0/src/iactsim/optics/__init__.py +25 -0
  74. iactsim-0.1.0/src/iactsim/optics/_atmosphere.py +88 -0
  75. iactsim-0.1.0/src/iactsim/optics/_cpu_transforms.py +294 -0
  76. iactsim-0.1.0/src/iactsim/optics/_materials.py +60 -0
  77. iactsim-0.1.0/src/iactsim/optics/_optical_system.py +241 -0
  78. iactsim-0.1.0/src/iactsim/optics/_sag.py +112 -0
  79. iactsim-0.1.0/src/iactsim/optics/_surface.py +577 -0
  80. iactsim-0.1.0/src/iactsim/optics/_surface_misc.py +222 -0
  81. iactsim-0.1.0/src/iactsim/optics/ray_tracing/__init__.py +25 -0
  82. iactsim-0.1.0/src/iactsim/optics/ray_tracing/_cuda_kernels.py +38 -0
  83. iactsim-0.1.0/src/iactsim/optics/ray_tracing/ray_tracing.cu +2187 -0
  84. iactsim-0.1.0/src/iactsim/optics/sources/__init__.py +21 -0
  85. iactsim-0.1.0/src/iactsim/optics/sources/_source.py +310 -0
  86. iactsim-0.1.0/src/iactsim/optics/sources/_utils.py +72 -0
  87. iactsim-0.1.0/src/iactsim/optics/sources/directions/__init__.py +24 -0
  88. iactsim-0.1.0/src/iactsim/optics/sources/directions/_sources.py +304 -0
  89. iactsim-0.1.0/src/iactsim/optics/sources/directions.py +21 -0
  90. iactsim-0.1.0/src/iactsim/optics/sources/positions/__init__.py +24 -0
  91. iactsim-0.1.0/src/iactsim/optics/sources/positions/_sources.py +386 -0
  92. iactsim-0.1.0/src/iactsim/optics/sources/positions.py +20 -0
  93. iactsim-0.1.0/src/iactsim/optics/transforms.py +31 -0
  94. iactsim-0.1.0/src/iactsim/optics/utils/__init__.py +19 -0
  95. iactsim-0.1.0/src/iactsim/optics/utils/_aspheric_coeffs.py +51 -0
  96. iactsim-0.1.0/src/iactsim/optics/visualization/__init__.py +17 -0
  97. iactsim-0.1.0/src/iactsim/utils/__init__.py +24 -0
  98. iactsim-0.1.0/src/iactsim/utils/_is_notebook.py +36 -0
  99. iactsim-0.1.0/src/iactsim/utils/_kernels.py +249 -0
  100. iactsim-0.1.0/src/iactsim/utils/_timer.py +299 -0
  101. iactsim-0.1.0/src/iactsim/visualization/__init__.py +41 -0
  102. iactsim-0.1.0/src/iactsim/visualization/_histogram2d.py +157 -0
  103. iactsim-0.1.0/src/iactsim/visualization/_iactsim_style.py +48 -0
  104. iactsim-0.1.0/src/iactsim/visualization/_scatter_plot.py +82 -0
  105. iactsim-0.1.0/src/iactsim/visualization/_sipm_camera_plots.py +165 -0
  106. iactsim-0.1.0/src/iactsim/visualization/_vtk_optical_system.py +208 -0
  107. iactsim-0.1.0/src/iactsim/visualization/_vtk_utils.py +332 -0
  108. iactsim-0.1.0/src/iactxx/CMakeLists.txt +223 -0
  109. iactsim-0.1.0/src/iactxx/__init__.py +17 -0
  110. iactsim-0.1.0/src/iactxx/clone-repo.cmake +39 -0
  111. iactsim-0.1.0/src/iactxx/iactxx.cpp +574 -0
  112. iactsim-0.1.0/src/iactxx/include/IACTFile.h +238 -0
  113. iactsim-0.1.0/src/iactxx/include/arrays_ops.h +73 -0
  114. iactsim-0.1.0/src/iactxx/include/eventio.h +831 -0
  115. iactsim-0.1.0/src/iactxx/src/CMakeLists.txt +26 -0
  116. iactsim-0.1.0/src/iactxx/src/IACTFile.cpp +386 -0
  117. iactsim-0.1.0/src/iactxx/test_parallel.cpp +165 -0
  118. iactsim-0.1.0/tests/test_import_submodules.py +24 -0
  119. iactsim-0.1.0/tests/test_sipm_camera.py +178 -0
@@ -0,0 +1,17 @@
1
+ # Copyright (C) 2024- Davide Mollica <davide.mollica@inaf.it>
2
+ # SPDX-License-Identifier: GPL-3.0-or-later
3
+ #
4
+ # This file is part of iactsim.
5
+ #
6
+ # iactsim is free software: you can redistribute it and/or modify
7
+ # it under the terms of the GNU General Public License as published by
8
+ # the Free Software Foundation, either version 3 of the License, or
9
+ # (at your option) any later version.
10
+ #
11
+ # iactsim is distributed in the hope that it will be useful,
12
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
13
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
+ # GNU General Public License for more details.
15
+ #
16
+ # You should have received a copy of the GNU General Public License
17
+ # along with iactsim. If not, see <https://www.gnu.org/licenses/>.
@@ -0,0 +1,35 @@
1
+ # Copyright (C) 2024- Davide Mollica <davide.mollica@inaf.it>
2
+ # SPDX-License-Identifier: GPL-3.0-or-later
3
+ #
4
+ # This file is part of iactsim.
5
+ #
6
+ # iactsim is free software: you can redistribute it and/or modify
7
+ # it under the terms of the GNU General Public License as published by
8
+ # the Free Software Foundation, either version 3 of the License, or
9
+ # (at your option) any later version.
10
+ #
11
+ # iactsim is distributed in the hope that it will be useful,
12
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
13
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
+ # GNU General Public License for more details.
15
+ #
16
+ # You should have received a copy of the GNU General Public License
17
+ # along with iactsim. If not, see <https://www.gnu.org/licenses/>.
18
+
19
+ # Workspace
20
+ dist
21
+ aut.sh
22
+ push.sh
23
+ compilation_info.txt
24
+ # c_cpp_properties.json
25
+ .vscode
26
+ /_build
27
+ /_static
28
+ *__pycache__*
29
+
30
+ # Doc
31
+ doc/build/
32
+ src/iactsim/_version.py
33
+
34
+ # C++ build
35
+ src/iactxx/third_party
@@ -0,0 +1,130 @@
1
+ # Copyright (C) 2024- Davide Mollica <davide.mollica@inaf.it>
2
+ # SPDX-License-Identifier: GPL-3.0-or-later
3
+ #
4
+ # This file is part of iactsim.
5
+ #
6
+ # iactsim is free software: you can redistribute it and/or modify
7
+ # it under the terms of the GNU General Public License as published by
8
+ # the Free Software Foundation, either version 3 of the License, or
9
+ # (at your option) any later version.
10
+ #
11
+ # iactsim is distributed in the hope that it will be useful,
12
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
13
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
+ # GNU General Public License for more details.
15
+ #
16
+ # You should have received a copy of the GNU General Public License
17
+ # along with iactsim. If not, see <https://www.gnu.org/licenses/>.
18
+
19
+ variables:
20
+ GIT_DEPTH: 0
21
+
22
+ stages:
23
+ - test
24
+ - build
25
+ - deploy_test
26
+ - deploy
27
+
28
+ image: $CI_REGISTRY_IMAGE/iactsim-devel-cuda12.6-ubuntu24.04:v0.0.2
29
+
30
+ cache:
31
+ paths:
32
+ - venv/
33
+
34
+ before_script:
35
+ - which python3
36
+ - python3 -V
37
+ - python3 -m venv venv
38
+ - source venv/bin/activate
39
+ - python3 -m pip install . -vv
40
+ - nvidia-smi
41
+ - which gcc
42
+ - gcc --version
43
+ - g++ --version
44
+ - cmake --version
45
+ - pip install cupy-cuda12x
46
+
47
+ test:
48
+ stage: test
49
+ script:
50
+ - pip install pytest pytest-cov
51
+ - coverage run --source=iactsim -m pytest tests/ --junitxml="pytest_result.xml"
52
+ - coverage report
53
+ - coverage xml -o coverage_py.xml
54
+ - coverage html -d coverage_py
55
+ coverage: '/(?i)total.*? (100(?:\.0+)?\%|[1-9]?\d(?:\.\d+)?\%)$/'
56
+ artifacts:
57
+ paths:
58
+ - coverage_py/
59
+ - coverage_py.xml
60
+ - pytest_result.xml
61
+ when: always
62
+ reports:
63
+ junit: pytest_result.xml
64
+ coverage_report:
65
+ coverage_format: cobertura
66
+ path: coverage_py.xml
67
+ rules:
68
+ - if: $CI_PIPELINE_SOURCE == "merge_request_event"
69
+ allow_failure: false
70
+
71
+ pages:
72
+ stage: deploy
73
+ script:
74
+ - apt-get update
75
+ - apt-get install pandoc -y
76
+ - python3 -m pip install sphinx nbsphinx sphinx_toolbox sphinx_rtd_theme vtk myst-nb
77
+ - make -C doc html
78
+ - mkdir public
79
+ - mv doc/build/html/* public/
80
+ - mv coverage_py public/
81
+
82
+ artifacts:
83
+ paths:
84
+ - public
85
+ when: always
86
+
87
+ rules:
88
+ - if: $CI_PIPELINE_SOURCE == "merge_request_event"
89
+
90
+ build_package:
91
+ stage: build
92
+ before_script: []
93
+ script:
94
+ - apt-get update && apt-get install -y pipx
95
+ # Build ONLY the sdist
96
+ - pipx run build --sdist --outdir dist
97
+ - echo "Contents of dist/ after sdist build:"
98
+ - ls -l dist/
99
+ - pipx run twine check dist/*
100
+ artifacts:
101
+ paths:
102
+ - dist/
103
+ rules:
104
+ - if: '$CI_COMMIT_TAG'
105
+
106
+ deploy_to_testpypi:
107
+ stage: deploy_test
108
+ before_script: []
109
+ script:
110
+ - apt-get update && apt-get install -y pipx
111
+ - pipx ensurepath
112
+ - TWINE_USERNAME=__token__ TWINE_PASSWORD=$TEST_PYPI_API_TOKEN pipx run twine upload --skip-existing --verbose --repository-url https://test.pypi.org/legacy/ dist/*
113
+ dependencies:
114
+ - build_package
115
+ rules:
116
+ - if: '$CI_COMMIT_TAG'
117
+ allow_failure: false
118
+
119
+ deploy_to_pypi:
120
+ stage: deploy
121
+ before_script: []
122
+ script:
123
+ - apt-get update && apt-get install -y pipx
124
+ - TWINE_USERNAME=__token__ TWINE_PASSWORD=$PYPI_API_TOKEN pipx run twine upload --verbose dist/*
125
+ dependencies:
126
+ - build_package
127
+ rules:
128
+ - if: '$CI_COMMIT_TAG'
129
+ when: manual
130
+ allow_failure: false
@@ -0,0 +1,17 @@
1
+ Copyright (C) 2024- Davide Mollica <davide.mollica@inaf.it>
2
+ SPDX-License-Identifier: GPL-3.0-or-later
3
+
4
+ This file is part of iactsim.
5
+
6
+ iactsim is free software: you can redistribute it and/or modify
7
+ it under the terms of the GNU General Public License as published by
8
+ the Free Software Foundation, either version 3 of the License, or
9
+ (at your option) any later version.
10
+
11
+ iactsim is distributed in the hope that it will be useful,
12
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
13
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
+ GNU General Public License for more details.
15
+
16
+ You should have received a copy of the GNU General Public License
17
+ along with iactsim. If not, see <https://www.gnu.org/licenses/>.