graxpert 3.2.0a0.dev7__tar.gz → 3.2.0a0.dev8__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 (84) hide show
  1. {graxpert-3.2.0a0.dev7 → graxpert-3.2.0a0.dev8}/PKG-INFO +6 -5
  2. {graxpert-3.2.0a0.dev7 → graxpert-3.2.0a0.dev8}/graxpert/ai_model_handling.py +41 -2
  3. graxpert-3.2.0a0.dev8/graxpert/version.py +2 -0
  4. graxpert-3.2.0a0.dev8/graxpert/version.py.bak +2 -0
  5. {graxpert-3.2.0a0.dev7 → graxpert-3.2.0a0.dev8}/graxpert.egg-info/PKG-INFO +6 -5
  6. {graxpert-3.2.0a0.dev7 → graxpert-3.2.0a0.dev8}/graxpert.egg-info/requires.txt +4 -4
  7. {graxpert-3.2.0a0.dev7 → graxpert-3.2.0a0.dev8}/pyproject.toml +2 -2
  8. {graxpert-3.2.0a0.dev7 → graxpert-3.2.0a0.dev8}/requirements.txt +4 -4
  9. {graxpert-3.2.0a0.dev7 → graxpert-3.2.0a0.dev8}/setup.py +6 -3
  10. graxpert-3.2.0a0.dev7/graxpert/version.py +0 -2
  11. graxpert-3.2.0a0.dev7/graxpert/version.py.bak +0 -2
  12. {graxpert-3.2.0a0.dev7 → graxpert-3.2.0a0.dev8}/MANIFEST.in +0 -0
  13. {graxpert-3.2.0a0.dev7 → graxpert-3.2.0a0.dev8}/README.md +0 -0
  14. {graxpert-3.2.0a0.dev7 → graxpert-3.2.0a0.dev8}/graxpert/AstroImageRepository.py +0 -0
  15. {graxpert-3.2.0a0.dev7 → graxpert-3.2.0a0.dev8}/graxpert/__init__.py +0 -0
  16. {graxpert-3.2.0a0.dev7 → graxpert-3.2.0a0.dev8}/graxpert/app_state.py +0 -0
  17. {graxpert-3.2.0a0.dev7 → graxpert-3.2.0a0.dev8}/graxpert/application/__init__.py +0 -0
  18. {graxpert-3.2.0a0.dev7 → graxpert-3.2.0a0.dev8}/graxpert/application/app.py +0 -0
  19. {graxpert-3.2.0a0.dev7 → graxpert-3.2.0a0.dev8}/graxpert/application/app_events.py +0 -0
  20. {graxpert-3.2.0a0.dev7 → graxpert-3.2.0a0.dev8}/graxpert/application/eventbus.py +0 -0
  21. {graxpert-3.2.0a0.dev7 → graxpert-3.2.0a0.dev8}/graxpert/astroimage.py +0 -0
  22. {graxpert-3.2.0a0.dev7 → graxpert-3.2.0a0.dev8}/graxpert/background_extraction.py +0 -0
  23. {graxpert-3.2.0a0.dev7 → graxpert-3.2.0a0.dev8}/graxpert/background_flood_selection.py +0 -0
  24. {graxpert-3.2.0a0.dev7 → graxpert-3.2.0a0.dev8}/graxpert/background_grid_selection.py +0 -0
  25. {graxpert-3.2.0a0.dev7 → graxpert-3.2.0a0.dev8}/graxpert/cmdline_tools.py +0 -0
  26. {graxpert-3.2.0a0.dev7 → graxpert-3.2.0a0.dev8}/graxpert/commands.py +0 -0
  27. {graxpert-3.2.0a0.dev7 → graxpert-3.2.0a0.dev8}/graxpert/deconvolution.py +0 -0
  28. {graxpert-3.2.0a0.dev7 → graxpert-3.2.0a0.dev8}/graxpert/denoising.py +0 -0
  29. {graxpert-3.2.0a0.dev7 → graxpert-3.2.0a0.dev8}/graxpert/grid_utils.py +0 -0
  30. {graxpert-3.2.0a0.dev7 → graxpert-3.2.0a0.dev8}/graxpert/img/GraXpert_LOGO_Hauptvariante.png +0 -0
  31. {graxpert-3.2.0a0.dev7 → graxpert-3.2.0a0.dev8}/graxpert/img/Icon.png +0 -0
  32. {graxpert-3.2.0a0.dev7 → graxpert-3.2.0a0.dev8}/graxpert/img/LDN1235_original.jpg +0 -0
  33. {graxpert-3.2.0a0.dev7 → graxpert-3.2.0a0.dev8}/graxpert/img/LDN1235_processed.jpg +0 -0
  34. {graxpert-3.2.0a0.dev7 → graxpert-3.2.0a0.dev8}/graxpert/img/__init__.py +0 -0
  35. {graxpert-3.2.0a0.dev7 → graxpert-3.2.0a0.dev8}/graxpert/img/gfx_numbers.png +0 -0
  36. {graxpert-3.2.0a0.dev7 → graxpert-3.2.0a0.dev8}/graxpert/img/gfx_numbers.svg +0 -0
  37. {graxpert-3.2.0a0.dev7 → graxpert-3.2.0a0.dev8}/graxpert/img/graXpert_Startbadge_Umbriel.png +0 -0
  38. {graxpert-3.2.0a0.dev7 → graxpert-3.2.0a0.dev8}/graxpert/img/hourglass.png +0 -0
  39. {graxpert-3.2.0a0.dev7 → graxpert-3.2.0a0.dev8}/graxpert/locales/__init__.py +0 -0
  40. {graxpert-3.2.0a0.dev7 → graxpert-3.2.0a0.dev8}/graxpert/locales/base.pot +0 -0
  41. {graxpert-3.2.0a0.dev7 → graxpert-3.2.0a0.dev8}/graxpert/locales/de_DE/LC_MESSAGES/base.mo +0 -0
  42. {graxpert-3.2.0a0.dev7 → graxpert-3.2.0a0.dev8}/graxpert/locales/de_DE/LC_MESSAGES/base.po +0 -0
  43. {graxpert-3.2.0a0.dev7 → graxpert-3.2.0a0.dev8}/graxpert/localization.py +0 -0
  44. {graxpert-3.2.0a0.dev7 → graxpert-3.2.0a0.dev8}/graxpert/main.py +0 -0
  45. {graxpert-3.2.0a0.dev7 → graxpert-3.2.0a0.dev8}/graxpert/mp_logging.py +0 -0
  46. {graxpert-3.2.0a0.dev7 → graxpert-3.2.0a0.dev8}/graxpert/parallel_processing.py +0 -0
  47. {graxpert-3.2.0a0.dev7 → graxpert-3.2.0a0.dev8}/graxpert/preferences.py +0 -0
  48. {graxpert-3.2.0a0.dev7 → graxpert-3.2.0a0.dev8}/graxpert/radialbasisinterpolation.py +0 -0
  49. {graxpert-3.2.0a0.dev7 → graxpert-3.2.0a0.dev8}/graxpert/resource_utils.py +0 -0
  50. {graxpert-3.2.0a0.dev7 → graxpert-3.2.0a0.dev8}/graxpert/s3_secrets.py +0 -0
  51. {graxpert-3.2.0a0.dev7 → graxpert-3.2.0a0.dev8}/graxpert/skyall.py +0 -0
  52. {graxpert-3.2.0a0.dev7 → graxpert-3.2.0a0.dev8}/graxpert/stretch.py +0 -0
  53. {graxpert-3.2.0a0.dev7 → graxpert-3.2.0a0.dev8}/graxpert/theme/__init__.py +0 -0
  54. {graxpert-3.2.0a0.dev7 → graxpert-3.2.0a0.dev8}/graxpert/theme/graxpert-dark-blue.json +0 -0
  55. {graxpert-3.2.0a0.dev7 → graxpert-3.2.0a0.dev8}/graxpert/ui/__init__.py +0 -0
  56. {graxpert-3.2.0a0.dev7 → graxpert-3.2.0a0.dev8}/graxpert/ui/application_frame.py +0 -0
  57. {graxpert-3.2.0a0.dev7 → graxpert-3.2.0a0.dev8}/graxpert/ui/canvas.py +0 -0
  58. {graxpert-3.2.0a0.dev7 → graxpert-3.2.0a0.dev8}/graxpert/ui/left_menu.py +0 -0
  59. {graxpert-3.2.0a0.dev7 → graxpert-3.2.0a0.dev8}/graxpert/ui/loadingframe.py +0 -0
  60. {graxpert-3.2.0a0.dev7 → graxpert-3.2.0a0.dev8}/graxpert/ui/right_menu.py +0 -0
  61. {graxpert-3.2.0a0.dev7 → graxpert-3.2.0a0.dev8}/graxpert/ui/statusbar.py +0 -0
  62. {graxpert-3.2.0a0.dev7 → graxpert-3.2.0a0.dev8}/graxpert/ui/styling.py +0 -0
  63. {graxpert-3.2.0a0.dev7 → graxpert-3.2.0a0.dev8}/graxpert/ui/tooltip.py +0 -0
  64. {graxpert-3.2.0a0.dev7 → graxpert-3.2.0a0.dev8}/graxpert/ui/ui_events.py +0 -0
  65. {graxpert-3.2.0a0.dev7 → graxpert-3.2.0a0.dev8}/graxpert/ui/widgets.py +0 -0
  66. {graxpert-3.2.0a0.dev7 → graxpert-3.2.0a0.dev8}/graxpert/ui_scaling.py +0 -0
  67. {graxpert-3.2.0a0.dev7 → graxpert-3.2.0a0.dev8}/graxpert.egg-info/SOURCES.txt +0 -0
  68. {graxpert-3.2.0a0.dev7 → graxpert-3.2.0a0.dev8}/graxpert.egg-info/dependency_links.txt +0 -0
  69. {graxpert-3.2.0a0.dev7 → graxpert-3.2.0a0.dev8}/graxpert.egg-info/entry_points.txt +0 -0
  70. {graxpert-3.2.0a0.dev7 → graxpert-3.2.0a0.dev8}/graxpert.egg-info/top_level.txt +0 -0
  71. {graxpert-3.2.0a0.dev7 → graxpert-3.2.0a0.dev8}/img/Icon.icns +0 -0
  72. {graxpert-3.2.0a0.dev7 → graxpert-3.2.0a0.dev8}/img/Icon.ico +0 -0
  73. {graxpert-3.2.0a0.dev7 → graxpert-3.2.0a0.dev8}/img/Icon.png +0 -0
  74. {graxpert-3.2.0a0.dev7 → graxpert-3.2.0a0.dev8}/img/NGC7000_original.jpg +0 -0
  75. {graxpert-3.2.0a0.dev7 → graxpert-3.2.0a0.dev8}/img/NGC7000_processed.jpg +0 -0
  76. {graxpert-3.2.0a0.dev7 → graxpert-3.2.0a0.dev8}/img/graXpert_Startbadge_Ariel.png +0 -0
  77. {graxpert-3.2.0a0.dev7 → graxpert-3.2.0a0.dev8}/img/graXpert_Startbadge_Ariel.svg +0 -0
  78. {graxpert-3.2.0a0.dev7 → graxpert-3.2.0a0.dev8}/img/graXpert_Startbadge_Dione.png +0 -0
  79. {graxpert-3.2.0a0.dev7 → graxpert-3.2.0a0.dev8}/img/graXpert_Startbadge_Dione.svg +0 -0
  80. {graxpert-3.2.0a0.dev7 → graxpert-3.2.0a0.dev8}/img/graXpert_Startbadge_Tethys.png +0 -0
  81. {graxpert-3.2.0a0.dev7 → graxpert-3.2.0a0.dev8}/img/graXpert_Startbadge_Tethys.svg +0 -0
  82. {graxpert-3.2.0a0.dev7 → graxpert-3.2.0a0.dev8}/img/graXpert_Startbadge_Umbriel.png +0 -0
  83. {graxpert-3.2.0a0.dev7 → graxpert-3.2.0a0.dev8}/img/graXpert_Startbadge_Umbriel.svg +0 -0
  84. {graxpert-3.2.0a0.dev7 → graxpert-3.2.0a0.dev8}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: graxpert
3
- Version: 3.2.0a0.dev7
3
+ Version: 3.2.0a0.dev8
4
4
  Summary: GraXpert is an astronomical image processing program for extracting and removing gradients in the background of your astrophotos
5
5
  Home-page: https://graxpert.com
6
6
  Author: GraXpert Development Team
@@ -15,6 +15,7 @@ Classifier: Topic :: Scientific/Engineering :: Image Processing
15
15
  Classifier: Topic :: Multimedia :: Graphics :: Editors
16
16
  Classifier: Programming Language :: Python :: 3.11
17
17
  Classifier: Programming Language :: Python :: 3.12
18
+ Classifier: Programming Language :: Python :: 3.13
18
19
  Classifier: Operating System :: Microsoft :: Windows
19
20
  Classifier: Operating System :: MacOS
20
21
  Classifier: Operating System :: POSIX :: Linux
@@ -28,17 +29,17 @@ Description-Content-Type: text/markdown
28
29
  Requires-Dist: ml-dtypes>=0.5.3
29
30
  Requires-Dist: pillow>=11.3.0
30
31
  Requires-Dist: appdirs
31
- Requires-Dist: astropy>=6.1.7
32
+ Requires-Dist: astropy>=6.0.1
32
33
  Requires-Dist: astropy-iers-data>=0.2025.9.1.0.42.11
33
34
  Requires-Dist: customtkinter>=5.2.2
34
35
  Requires-Dist: imageio>=2.37.0
35
36
  Requires-Dist: minio>=7.2.16
36
- Requires-Dist: numpy==2.2.6
37
+ Requires-Dist: numpy<=2.2.6,>=2.0.2
37
38
  Requires-Dist: opencv-python-headless==4.11.0.86
38
39
  Requires-Dist: PyKrige>=1.7.2
39
40
  Requires-Dist: requests>=2.32.5
40
- Requires-Dist: scikit-image>=0.25.2
41
- Requires-Dist: scipy>=1.15.3
41
+ Requires-Dist: scikit-image>=0.24.0
42
+ Requires-Dist: scipy>=1.13.1
42
43
  Requires-Dist: xisf>=0.9.5
43
44
  Provides-Extra: cuda
44
45
  Requires-Dist: onnxruntime-gpu[cuda,cudnn]==1.22.0; extra == "cuda"
@@ -4,6 +4,7 @@ import sys
4
4
  import re
5
5
  import shutil
6
6
  import zipfile
7
+ from multiprocessing import Process, Queue
7
8
 
8
9
  from appdirs import user_data_dir
9
10
  from minio import Minio
@@ -214,6 +215,33 @@ def get_execution_providers_ordered(gpu_acceleration=True):
214
215
  "{}".format(e))
215
216
  sys.exit(1)
216
217
 
218
+
219
+ def run_in_process(fn: callable):
220
+ """Run a function in a separate process and return the result or raise an exception."""
221
+
222
+ q = Queue()
223
+
224
+ # Create a closure to call fn and put the result in the queue
225
+ def wrapped():
226
+ try:
227
+ r = fn()
228
+ except Exception as e:
229
+ r = e # return the exception to the main process
230
+ q.put(r)
231
+
232
+ p = Process(target=wrapped, name="ai-worker")
233
+ p.start()
234
+ p.join()
235
+
236
+ if p.exitcode != 0:
237
+ raise RuntimeError(f"worker process crashed with exit code {p.exitcode}.")
238
+
239
+ result = q.get()
240
+ if isinstance(result, Exception):
241
+ raise result
242
+ return result
243
+
244
+
217
245
  # Provides a mutable session context that can swap out different sessions if needed
218
246
  class SessionContext:
219
247
  model_name: str
@@ -232,13 +260,24 @@ class SessionContext:
232
260
  logging.info(f"Used inference providers for {model_name}: {self.session.get_providers()}")
233
261
 
234
262
 
263
+ def __run_low(self, model_args: dict, gpu_acceleration: bool = True) -> any:
264
+ """Run the ONNX model using the specified execution provider."""
265
+
266
+ # if we are using a GPU the ONNX runtimes might crash due to native bugs (ROCm)
267
+ # so run in a separate process just in case
268
+ fn = lambda: self.session.run(None, model_args)
269
+ if gpu_acceleration:
270
+ return run_in_process(fn)
271
+ else:
272
+ return fn()
273
+
235
274
  def run(self, model_args: dict) -> any:
236
275
  """Run the ONNX model using the specified execution provider."""
237
276
 
238
277
  providers = self.session.get_providers()
239
278
  gpu_acceleration = len(providers) > 1 or providers[0] != "CPUExecutionProvider"
240
279
  try:
241
- result = self.session.run(None, model_args)
280
+ result = self.__run_low(model_args, gpu_acceleration)
242
281
  except Exception as e:
243
282
  if not gpu_acceleration:
244
283
  raise # Rethrow, the failure occurred with the regular CPU model also - show error dialog
@@ -246,7 +285,7 @@ class SessionContext:
246
285
  logging.warning(f"Error running model, falling back to CPU only: {e}")
247
286
  import onnxruntime as ort
248
287
  self.session = ort.InferenceSession(self.model_name, providers=get_execution_providers_ordered(False))
249
- result = self.session.run(None, model_args)
288
+ result = self.__run_low(model_args, False)
250
289
 
251
290
  # all graxpert results are in the first array index
252
291
  return result[0]
@@ -0,0 +1,2 @@
1
+ release = "update changelist notes"
2
+ version = "3.2.0.a0.dev8"
@@ -0,0 +1,2 @@
1
+ release = "update changelist notes"
2
+ version = "SNAPSHOT"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: graxpert
3
- Version: 3.2.0a0.dev7
3
+ Version: 3.2.0a0.dev8
4
4
  Summary: GraXpert is an astronomical image processing program for extracting and removing gradients in the background of your astrophotos
5
5
  Home-page: https://graxpert.com
6
6
  Author: GraXpert Development Team
@@ -15,6 +15,7 @@ Classifier: Topic :: Scientific/Engineering :: Image Processing
15
15
  Classifier: Topic :: Multimedia :: Graphics :: Editors
16
16
  Classifier: Programming Language :: Python :: 3.11
17
17
  Classifier: Programming Language :: Python :: 3.12
18
+ Classifier: Programming Language :: Python :: 3.13
18
19
  Classifier: Operating System :: Microsoft :: Windows
19
20
  Classifier: Operating System :: MacOS
20
21
  Classifier: Operating System :: POSIX :: Linux
@@ -28,17 +29,17 @@ Description-Content-Type: text/markdown
28
29
  Requires-Dist: ml-dtypes>=0.5.3
29
30
  Requires-Dist: pillow>=11.3.0
30
31
  Requires-Dist: appdirs
31
- Requires-Dist: astropy>=6.1.7
32
+ Requires-Dist: astropy>=6.0.1
32
33
  Requires-Dist: astropy-iers-data>=0.2025.9.1.0.42.11
33
34
  Requires-Dist: customtkinter>=5.2.2
34
35
  Requires-Dist: imageio>=2.37.0
35
36
  Requires-Dist: minio>=7.2.16
36
- Requires-Dist: numpy==2.2.6
37
+ Requires-Dist: numpy<=2.2.6,>=2.0.2
37
38
  Requires-Dist: opencv-python-headless==4.11.0.86
38
39
  Requires-Dist: PyKrige>=1.7.2
39
40
  Requires-Dist: requests>=2.32.5
40
- Requires-Dist: scikit-image>=0.25.2
41
- Requires-Dist: scipy>=1.15.3
41
+ Requires-Dist: scikit-image>=0.24.0
42
+ Requires-Dist: scipy>=1.13.1
42
43
  Requires-Dist: xisf>=0.9.5
43
44
  Provides-Extra: cuda
44
45
  Requires-Dist: onnxruntime-gpu[cuda,cudnn]==1.22.0; extra == "cuda"
@@ -1,17 +1,17 @@
1
1
  ml-dtypes>=0.5.3
2
2
  pillow>=11.3.0
3
3
  appdirs
4
- astropy>=6.1.7
4
+ astropy>=6.0.1
5
5
  astropy-iers-data>=0.2025.9.1.0.42.11
6
6
  customtkinter>=5.2.2
7
7
  imageio>=2.37.0
8
8
  minio>=7.2.16
9
- numpy==2.2.6
9
+ numpy<=2.2.6,>=2.0.2
10
10
  opencv-python-headless==4.11.0.86
11
11
  PyKrige>=1.7.2
12
12
  requests>=2.32.5
13
- scikit-image>=0.25.2
14
- scipy>=1.15.3
13
+ scikit-image>=0.24.0
14
+ scipy>=1.13.1
15
15
  xisf>=0.9.5
16
16
 
17
17
  [cpuonly]
@@ -11,9 +11,9 @@ archs = ["auto64"]
11
11
  requires = [
12
12
  "setuptools>=80.9.0",
13
13
  "wheel>=0.45.1",
14
- "astropy>=7.1.0",
14
+ "astropy>=6.0.1",
15
15
  "cx_Freeze>=8.4.0",
16
16
  "imageio>=2.37.0",
17
- "scikit-image>=0.25.2"
17
+ "scikit-image>=0.24.0"
18
18
  ]
19
19
  build-backend = "setuptools.build_meta"
@@ -1,15 +1,15 @@
1
1
  ml-dtypes>=0.5.3
2
2
  pillow>=11.3.0
3
3
  appdirs
4
- astropy>=6.1.7
4
+ astropy>=6.0.1
5
5
  astropy-iers-data>=0.2025.9.1.0.42.11
6
6
  customtkinter>=5.2.2
7
7
  imageio>=2.37.0
8
8
  minio>=7.2.16
9
- numpy==2.2.6
9
+ numpy>=2.0.2,<=2.2.6
10
10
  opencv-python-headless==4.11.0.86
11
11
  PyKrige>=1.7.2
12
12
  requests>=2.32.5
13
- scikit-image>=0.25.2
14
- scipy>=1.15.3
13
+ scikit-image>=0.24.0
14
+ scipy>=1.13.1
15
15
  xisf>=0.9.5
@@ -109,6 +109,7 @@ setup_options = {
109
109
  # Supported Python versions: List all versions you test against.
110
110
  "Programming Language :: Python :: 3.11",
111
111
  "Programming Language :: Python :: 3.12",
112
+ "Programming Language :: Python :: 3.13",
112
113
 
113
114
  # Operating System: Specify which OSs are supported.
114
115
  "Operating System :: Microsoft :: Windows",
@@ -208,15 +209,17 @@ if cx_freeze_commands.intersection(sys.argv):
208
209
 
209
210
  # for exe builds we are careful to include the correct onnxruntime
210
211
  if sys.platform == "win32":
211
- build_options["excludes"] += ["onnxruntime", "onnxruntime-rocm", "onnxruntime-gpu"]
212
- # FIXME temporarily disable until we see if it is needed on windows
212
+ pass
213
+ # on windows we default to whatever onnx lib was installed at build time
214
+ # build_options["excludes"] += ["onnxruntime", "onnxruntime-rocm", "onnxruntime-gpu"]
213
215
  # build_options["includes"] += ["onnxruntime-directml"]
214
216
  else:
215
217
  build_options["excludes"] += ["onnxruntime-gpu", "onnxruntime-rocm", "onnxruntime-directml"]
216
218
  build_options["includes"] += ["onnxruntime"]
217
219
 
218
220
  # console allows passing in command line
219
- base = "Win32GUI" if sys.platform == "win32" else "console"
221
+ base = "gui" if sys.platform == "win32" else "console"
222
+ # base = "console" # if debugging on windows (or trying to use the exe in a script, then this is probably better)
220
223
 
221
224
  executables = [cx_Freeze.Executable("./graxpert/main.py", base=base,
222
225
  icon="./img/Icon", # leave off extension so it will be autocorrected for any OS
@@ -1,2 +0,0 @@
1
- release = "the github CI DMG builds are not yet reliable, don't require them before pypi publish"
2
- version = "3.2.0.a0.dev7"
@@ -1,2 +0,0 @@
1
- release = "the github CI DMG builds are not yet reliable, don't require them before pypi publish"
2
- version = "SNAPSHOT"