setiastrosuitepro 1.8.0.post3__py3-none-any.whl → 1.8.2__py3-none-any.whl

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.

Potentially problematic release.


This version of setiastrosuitepro might be problematic. Click here for more details.

Files changed (43) hide show
  1. setiastro/images/finderchart.png +0 -0
  2. setiastro/saspro/__main__.py +41 -39
  3. setiastro/saspro/_generated/build_info.py +2 -2
  4. setiastro/saspro/abe.py +1 -1
  5. setiastro/saspro/blink_comparator_pro.py +3 -1
  6. setiastro/saspro/bright_stars.py +305 -0
  7. setiastro/saspro/continuum_subtract.py +2 -1
  8. setiastro/saspro/cosmicclarity_engines/darkstar_engine.py +22 -2
  9. setiastro/saspro/cosmicclarity_engines/denoise_engine.py +68 -15
  10. setiastro/saspro/cosmicclarity_engines/satellite_engine.py +7 -3
  11. setiastro/saspro/cosmicclarity_engines/sharpen_engine.py +371 -98
  12. setiastro/saspro/cosmicclarity_engines/superres_engine.py +1 -0
  13. setiastro/saspro/cosmicclarity_preset.py +2 -1
  14. setiastro/saspro/doc_manager.py +8 -0
  15. setiastro/saspro/exoplanet_detector.py +22 -17
  16. setiastro/saspro/finder_chart.py +1639 -0
  17. setiastro/saspro/gui/main_window.py +36 -14
  18. setiastro/saspro/gui/mixins/menu_mixin.py +2 -0
  19. setiastro/saspro/gui/mixins/toolbar_mixin.py +9 -1
  20. setiastro/saspro/legacy/image_manager.py +18 -4
  21. setiastro/saspro/legacy/xisf.py +3 -3
  22. setiastro/saspro/main_helpers.py +18 -0
  23. setiastro/saspro/memory_utils.py +18 -14
  24. setiastro/saspro/model_manager.py +65 -0
  25. setiastro/saspro/model_workers.py +58 -24
  26. setiastro/saspro/ops/settings.py +45 -8
  27. setiastro/saspro/planetprojection.py +68 -36
  28. setiastro/saspro/resources.py +193 -175
  29. setiastro/saspro/runtime_torch.py +622 -137
  30. setiastro/saspro/sfcc.py +5 -3
  31. setiastro/saspro/stacking_suite.py +4 -3
  32. setiastro/saspro/star_alignment.py +266 -212
  33. setiastro/saspro/texture_clarity.py +1 -1
  34. setiastro/saspro/widgets/image_utils.py +12 -4
  35. setiastro/saspro/widgets/spinboxes.py +5 -7
  36. setiastro/saspro/wimi.py +2 -1
  37. setiastro/saspro/xisf.py +3 -3
  38. {setiastrosuitepro-1.8.0.post3.dist-info → setiastrosuitepro-1.8.2.dist-info}/METADATA +4 -4
  39. {setiastrosuitepro-1.8.0.post3.dist-info → setiastrosuitepro-1.8.2.dist-info}/RECORD +43 -40
  40. {setiastrosuitepro-1.8.0.post3.dist-info → setiastrosuitepro-1.8.2.dist-info}/WHEEL +0 -0
  41. {setiastrosuitepro-1.8.0.post3.dist-info → setiastrosuitepro-1.8.2.dist-info}/entry_points.txt +0 -0
  42. {setiastrosuitepro-1.8.0.post3.dist-info → setiastrosuitepro-1.8.2.dist-info}/licenses/LICENSE +0 -0
  43. {setiastrosuitepro-1.8.0.post3.dist-info → setiastrosuitepro-1.8.2.dist-info}/licenses/license.txt +0 -0
Binary file
@@ -538,7 +538,18 @@ def _bootstrap_imports():
538
538
  add_runtime_to_sys_path(status_cb=lambda *_: None)
539
539
  _ban_shadow_torch_paths(status_cb=lambda *_: None)
540
540
  _purge_bad_torch_from_sysmodules(status_cb=lambda *_: None)
541
-
541
+ _update_splash(QCoreApplication.translate("Splash", "Preparing AI runtime cache..."), 7)
542
+ try:
543
+ from setiastro.saspro.runtime_torch import prewarm_torch_cache
544
+ prewarm_torch_cache(
545
+ status_cb=lambda *_: None, # keep console clean during splash
546
+ require_torchaudio=True,
547
+ ensure_venv=True,
548
+ ensure_numpy=False,
549
+ validate_marker=True,
550
+ )
551
+ except Exception:
552
+ pass
542
553
  _update_splash(QCoreApplication.translate("Splash", "Loading standard libraries..."), 10)
543
554
 
544
555
  # ----------------------------------------
@@ -573,11 +584,11 @@ def _bootstrap_imports():
573
584
  # ----------------------------------------
574
585
  # Third-party imports
575
586
  # ----------------------------------------
576
- import numpy as np
587
+ # numpy deferred to modules that need it
588
+
589
+
590
+ # Image libraries (tifffile, XISF) deferred
577
591
 
578
- _update_splash(QCoreApplication.translate("Splash", "Loading image libraries..."), 20)
579
- from tifffile import imwrite
580
- from setiastro.saspro.xisf import XISF
581
592
 
582
593
  _update_splash(QCoreApplication.translate("Splash", "Configuring matplotlib..."), 25)
583
594
  from setiastro.saspro.config_bootstrap import ensure_mpl_config_dir
@@ -656,20 +667,11 @@ def _bootstrap_imports():
656
667
  install_crash_handlers,
657
668
  )
658
669
 
659
- _update_splash(QCoreApplication.translate("Splash", "Loading reproject library..."), 35)
670
+ # reproject deferred
660
671
 
661
- try:
662
- from reproject import reproject_interp
663
- except ImportError:
664
- reproject_interp = None
665
672
 
666
- _update_splash(QCoreApplication.translate("Splash", "Loading OpenCV..."), 40)
673
+ # OpenCV deferred
667
674
 
668
- try:
669
- import cv2
670
- OPENCV_AVAILABLE = True
671
- except ImportError:
672
- OPENCV_AVAILABLE = False
673
675
 
674
676
  _update_splash(QCoreApplication.translate("Splash", "Loading PyQt6 components..."), 45)
675
677
 
@@ -699,28 +701,28 @@ def _bootstrap_imports():
699
701
  _update_splash(QCoreApplication.translate("Splash", "Loading resources..."), 50)
700
702
 
701
703
  from setiastro.saspro.resources import (
702
- icon_path, windowslogo_path, green_path, neutral_path, whitebalance_path,
703
- morpho_path, clahe_path, starnet_path, staradd_path, LExtract_path,
704
- LInsert_path, slot0_path, slot1_path, slot2_path, slot3_path, slot4_path,
705
- rgbcombo_path, rgbextract_path, copyslot_path, graxperticon_path,
706
- cropicon_path, openfile_path, abeicon_path, undoicon_path, redoicon_path,
707
- blastericon_path, hdr_path, invert_path, fliphorizontal_path,
708
- flipvertical_path, rotateclockwise_path, rotatecounterclockwise_path,
709
- rotate180_path, maskcreate_path, maskapply_path, maskremove_path,
710
- slot5_path, slot6_path, slot7_path, slot8_path, slot9_path, pixelmath_path,
711
- histogram_path, mosaic_path, rescale_path, staralign_path, mask_path,
712
- platesolve_path, psf_path, supernova_path, starregistration_path,
713
- stacking_path, pedestal_icon_path, starspike_path, aperture_path,
714
- jwstpupil_path, signature_icon_path, livestacking_path, hrdiagram_path,
715
- convoicon_path, spcc_icon_path, sasp_data_path, exoicon_path, peeker_icon,
716
- dse_icon_path, astrobin_filters_csv_path, isophote_path, statstretch_path,
717
- starstretch_path, curves_path, disk_path, uhs_path, blink_path, ppp_path,
718
- nbtorgb_path, freqsep_path, contsub_path, halo_path, cosmic_path,
719
- satellite_path, imagecombine_path, wrench_path, eye_icon_path,
720
- disk_icon_path, nuke_path, hubble_path, collage_path, annotated_path,
721
- colorwheel_path, font_path, csv_icon_path, spinner_path, wims_path,
722
- wimi_path, linearfit_path, debayer_path, aberration_path,
723
- functionbundles_path, viewbundles_path, selectivecolor_path, rgbalign_path,
704
+ icon_path, windowslogo_path, # green_path, neutral_path, whitebalance_path,
705
+ #morpho_path, clahe_path, starnet_path, staradd_path, LExtract_path,
706
+ #LInsert_path, slot0_path, slot1_path, slot2_path, slot3_path, slot4_path,
707
+ #rgbcombo_path, rgbextract_path, copyslot_path, graxperticon_path,
708
+ #cropicon_path, openfile_path, abeicon_path, undoicon_path, redoicon_path,
709
+ #blastericon_path, hdr_path, invert_path, fliphorizontal_path,
710
+ #flipvertical_path, rotateclockwise_path, rotatecounterclockwise_path,
711
+ #rotate180_path, maskcreate_path, maskapply_path, maskremove_path,
712
+ #slot5_path, slot6_path, slot7_path, slot8_path, slot9_path, pixelmath_path,
713
+ #histogram_path, mosaic_path, rescale_path, staralign_path, mask_path,
714
+ #platesolve_path, psf_path, supernova_path, starregistration_path,
715
+ #stacking_path, pedestal_icon_path, starspike_path, aperture_path,
716
+ #jwstpupil_path, signature_icon_path, livestacking_path, hrdiagram_path,
717
+ #convoicon_path, spcc_icon_path, sasp_data_path, exoicon_path, peeker_icon,
718
+ #dse_icon_path, astrobin_filters_csv_path, isophote_path, statstretch_path,
719
+ #starstretch_path, curves_path, disk_path, uhs_path, blink_path, ppp_path,
720
+ #nbtorgb_path, freqsep_path, contsub_path, halo_path, cosmic_path,
721
+ #satellite_path, imagecombine_path, wrench_path, eye_icon_path,
722
+ #disk_icon_path, nuke_path, hubble_path, collage_path, annotated_path,
723
+ #colorwheel_path, font_path, csv_icon_path, spinner_path, wims_path,
724
+ #wimi_path, linearfit_path, debayer_path, aberration_path,
725
+ #functionbundles_path, viewbundles_path, selectivecolor_path, rgbalign_path,
724
726
  )
725
727
 
726
728
  _update_splash(QCoreApplication.translate("Splash", "Configuring Qt message handler..."), 55)
@@ -1020,4 +1022,4 @@ def main():
1020
1022
 
1021
1023
  # When run as a module, execute main()
1022
1024
  if __name__ == "__main__":
1023
- main()
1025
+ main()
@@ -1,3 +1,3 @@
1
1
  # Auto-generated at build time. Do not edit.
2
- BUILD_TIMESTAMP = "2026-01-26T19:14:34Z"
3
- APP_VERSION = "1.8.0.post3"
2
+ BUILD_TIMESTAMP = "2026-01-29T01:10:38Z"
3
+ APP_VERSION = "1.8.2"
setiastro/saspro/abe.py CHANGED
@@ -1376,4 +1376,4 @@ class ABEDialog(QDialog):
1376
1376
  qimg = QImage(buf8.data, w, h, buf8.strides[0], QImage.Format.Format_RGB888)
1377
1377
  self._preview_qimg = qimg
1378
1378
  self._update_preview_scaled()
1379
- self._redraw_overlay()
1379
+ self._redraw_overlay()
@@ -1,6 +1,8 @@
1
1
  # pro/blink_comparator_pro.py
2
2
  from __future__ import annotations
3
3
 
4
+ from setiastro.saspro.main_helpers import non_blocking_sleep
5
+
4
6
  # ⬇️ keep your existing imports used by the code you pasted
5
7
  import os
6
8
  import re
@@ -2099,7 +2101,7 @@ class BlinkTab(QWidget):
2099
2101
  attempt += 1
2100
2102
  if remaining:
2101
2103
  print(f"[Retry] {len(remaining)} images will be retried after {RETRY_DELAY}s...")
2102
- time.sleep(RETRY_DELAY)
2104
+ non_blocking_sleep(RETRY_DELAY)
2103
2105
 
2104
2106
  if remaining:
2105
2107
  print(f"[FAILURE] These files failed to load after {MAX_RETRIES} retries:")
@@ -0,0 +1,305 @@
1
+ # Auto-generated by refine_bright_stars_simbad.py
2
+ # DO NOT EDIT BY HAND (re-run the script)
3
+
4
+ BRIGHT_STARS = [
5
+ ("Sirius", 101.28715533, -16.71611586, -1.46),
6
+ ("Canopus", 95.98795783, -52.69566138, -0.73),
7
+ ("Rigil Kentaurus", 219.90205833, -60.83399269, -0.29),
8
+ ("Arcturus", 213.91530029, 19.18240916, -0.05),
9
+ ("Vega", 279.23473479, 38.78368896, 0.03),
10
+ ("Capella", 79.17232794, 45.99799147, 0.07),
11
+ ("Rigel", 78.63446707, -8.20163836, 0.15),
12
+ ("Procyon", 114.82549791, 5.22498756, 0.36),
13
+ ("Achernar", 24.42852283, -57.23675281, 0.45),
14
+ ("Betelgeuse", 88.79293899, 7.40706400, 0.55),
15
+ ("Hadar", 210.95585562, -60.37303516, 0.61),
16
+ ("Altair", 297.69582730, 8.86832120, 0.77),
17
+ ("Acrux", 186.64956340, -63.09909286, 0.79),
18
+ ("Aldebaran", 68.98016279, 16.50930235, 0.86),
19
+ ("Antares", 247.35191542, -26.43200261, 0.95),
20
+ ("Spica", 201.29824736, -11.16131949, 0.97),
21
+ ("Pollux", 116.32895777, 28.02619889, 1.14),
22
+ ("Fomalhaut", 344.41269272, -29.62223703, 1.15),
23
+ ("Deneb", 310.35797975, 45.28033881, 1.24),
24
+ ("Mimosa", 191.93028656, -59.68877200, 1.26),
25
+ ("Regulus", 152.09296244, 11.96720878, 1.36),
26
+ ("Adhara", 104.65645315, -28.97208616, 1.50),
27
+ ("Castor", 113.64947164, 31.88828222, 1.58),
28
+ ("Shaula", 263.40216718, -37.10382355, 1.62),
29
+ ("Gacrux", 187.79149838, -57.11321346, 1.63),
30
+ ("Bellatrix", 81.28276356, 6.34970326, 1.64),
31
+ ("Elnath", 81.57297133, 28.60745172, 1.66),
32
+ ("Miaplacidus", 138.29990608, -69.71720760, 1.67),
33
+ ("Alnilam", 84.05338894, -1.20191914, 1.69),
34
+ ("Alnair", 332.05826970, -46.96097438, 1.74),
35
+ ("Alnitak", 85.18969443, -1.94257359, 1.75),
36
+ ("Alioth", 193.50728997, 55.95982296, 1.77),
37
+ ("Mirfak", 51.08070872, 49.86117929, 1.80),
38
+ ("Dubhe", 165.93196467, 61.75103469, 1.80),
39
+ ("Regor", 122.38312556, -47.33658633, 1.81),
40
+ ("Wezen", 107.09785021, -26.39319958, 1.83),
41
+ ("Kaus Australis", 276.04299335, -34.38461649, 1.84),
42
+ ("Alkaid", 206.88515734, 49.31326673, 1.86),
43
+ ("Sargas", 264.32970772, -42.99782799, 1.86),
44
+ ("Avior", 125.62848024, -59.50948419, 1.87),
45
+ ("Menkalinan", 89.88217887, 44.94743257, 1.90),
46
+ ("Alpha Trianguli Australis Atria", 252.16622951, -69.02771185, 1.92),
47
+ ("Alhena", 99.42796043, 16.39928043, 1.93),
48
+ ("Peacock", 306.41190437, -56.73508973, 1.93),
49
+ ("Koo She", 140.52840671, -55.01066713, 1.95),
50
+ ("Mirzam", 95.67493897, -17.95591871, 1.98),
51
+ ("Alphard", 141.89684460, -8.65859953, 1.98),
52
+ ("Polaris", 37.95456067, 89.26410897, 1.99),
53
+ ("Algieba", 154.99312733, 19.84148522, 2.00),
54
+ ("Hamal", 31.79335710, 23.46241755, 2.01),
55
+ ("Diphda", 10.89737874, -17.98660632, 2.04),
56
+ ("Nunki", 283.81636041, -26.29672411, 2.05),
57
+ ("Menkent", 211.67061468, -36.36995474, 2.06),
58
+ ("Alpheratz", 2.09691619, 29.09043112, 2.07),
59
+ ("Mirach", 17.43301617, 35.62055765, 2.07),
60
+ ("Saiph", 86.93912017, -9.66960492, 2.07),
61
+ ("Kochab", 222.67635750, 74.15550394, 2.07),
62
+ ("Al Dhanab", 328.48215125, -37.36487222, 2.07),
63
+ ("Rasalhague", 263.73362272, 12.56003739, 2.08),
64
+ ("Algol", 47.04221856, 40.95564667, 2.09),
65
+ ("Almach", 30.97480121, 42.32972842, 2.10),
66
+ ("Denebola", 177.26490976, 14.57205806, 2.14),
67
+ ("Navi", 14.17721289, 60.71674002, 2.15),
68
+ ("Muhlifain", 190.37933367, -48.95987152, 2.20),
69
+ ("Naos", 120.89603141, -40.00314780, 2.21),
70
+ ("Aspidiske", 139.27252857, -59.27523203, 2.21),
71
+ ("Alphecca", 233.67195203, 26.71468500, 2.22),
72
+ ("Suhail", 136.99899114, -43.43259091, 2.23),
73
+ ("Mizar", 200.98141867, 54.92535197, 2.23),
74
+ ("Sadr", 305.55709098, 40.25667916, 2.23),
75
+ ("Schedar", 10.12684601, 56.53732922, 2.24),
76
+ ("Eltanin", 269.15154118, 51.48889562, 2.24),
77
+ ("Mintaka", 83.00166706, -0.29909511, 2.25),
78
+ ("Caph", 2.29452158, 59.14978110, 2.28),
79
+ ("Epsilon Centauri", 204.97190723, -53.46639115, 2.29),
80
+ ("Dschubba", 240.08335535, -22.62170643, 2.29),
81
+ ("Wei", 261.32494919, -55.52988169, 2.29),
82
+ ("Men", 92.56030243, -74.75304398, 2.30),
83
+ ("Eta Centauri", 218.87676734, -42.15782522, 2.33),
84
+ ("Merak", 165.46033230, 56.38243365, 2.34),
85
+ ("Izar", 221.24673983, 27.07422232, 2.35),
86
+ ("Enif", 326.04648391, 9.87500865, 2.38),
87
+ ("Girtab", 265.62198000, -39.02998308, 2.39),
88
+ ("Ankaa", 6.57104752, -42.30598719, 2.40),
89
+ ("Phecda", 178.45769715, 53.69475973, 2.41),
90
+ ("Sabik", 257.59452871, -15.72490664, 2.43),
91
+ ("Scheat", 345.94357275, 28.08278712, 2.44),
92
+ ("Aludra", 111.02375950, -29.30310551, 2.45),
93
+ ("Alderamin", 319.64488470, 62.58557446, 2.45),
94
+ ("Markeb", 140.52840671, -55.01066713, 2.47),
95
+ ("Gienah", 183.95154504, -17.54193046, 2.48),
96
+ ("Markab", 346.19022269, 15.20526715, 2.49),
97
+ ("Menkar", 45.56988780, 4.08973877, 2.54),
98
+ ("Han", 249.21634437, -10.63118774, 2.54),
99
+ ("Al Nair al Kent.", 208.99927814, -47.31282204, 2.55),
100
+ ("Zosma", 168.52708927, 20.52371814, 2.56),
101
+ ("Graffias", 241.35929167, -19.80538889, 2.56),
102
+ ("Arneb", 83.18256716, -17.82228927, 2.58),
103
+ ("Delta Centauri", 182.08957349, -50.72242739, 2.58),
104
+ ("Gienah Ghurab", 183.94479902, -17.52927864, 2.58),
105
+ ("Ascella", 285.65304266, -29.88006330, 2.60),
106
+ ("Zubeneschamali", 229.25172425, -9.38291441, 2.61),
107
+ ("Unukalhai", 236.06697546, 6.42563022, 2.63),
108
+ ("Sheratan", 28.66004579, 20.80803147, 2.64),
109
+ ("Zubenelgenubi", 222.71963789, -16.04177652, 2.64),
110
+ ("Phact", 84.91225430, -34.07410972, 2.65),
111
+ ("Theta Aurigae", 89.93029218, 37.21258463, 2.65),
112
+ ("Kraz", 188.59681218, -23.39676022, 2.65),
113
+ ("Ruchbah", 21.45396446, 60.23528403, 2.66),
114
+ ("Muphrid", 208.67116217, 18.39772072, 2.68),
115
+ ("Ke Kouan", 125.62848024, -59.50948419, 2.68),
116
+ ("Hassaleh", 74.24841676, 33.16609377, 2.69),
117
+ ("Mu Velorum", 146.73337300, -47.51157800, 2.69),
118
+ ("Alpha Muscae", 189.29590787, -69.13556479, 2.69),
119
+ ("Lesath", 262.69098801, -37.29581348, 2.70),
120
+ ("Pi Puppis", 109.28565866, -37.09747346, 2.71),
121
+ ("Kaus Meridionalis", 275.24851206, -29.82810226, 2.72),
122
+ ("Tarazed", 296.56491231, 10.61325872, 2.72),
123
+ ("Yed Prior", 243.58641259, -3.69432579, 2.73),
124
+ ("Aldhibain", 245.99785970, 61.51420976, 2.73),
125
+ ("Theta Carinae", 160.73917486, -64.39445022, 2.74),
126
+ ("Porrima", 190.41511762, -1.44940395, 2.74),
127
+ ("Hatysa", 83.85827581, -5.90988852, 2.75),
128
+ ("Iota Centauri", 200.14922007, -36.71230458, 2.75),
129
+ ("Cebalrai", 265.86813296, 4.56730367, 2.76),
130
+ ("Kursa", 76.96239535, -5.08649698, 2.78),
131
+ ("Kornephoros", 247.55500134, 21.48961075, 2.78),
132
+ ("Delta Crucis", 183.78632700, -58.74892408, 2.79),
133
+ ("Rastaban", 262.60817373, 52.30138871, 2.79),
134
+ ("Cor Caroli", 194.00693995, 38.31837644, 2.80),
135
+ ("Gamma Lupi", 233.78520145, -41.16675687, 2.80),
136
+ ("Nihal", 82.06134537, -20.75944389, 2.81),
137
+ ("Rutilicus", 263.73362272, 12.56003739, 2.81),
138
+ ("Beta Hydri", 6.43779316, -77.25424612, 2.82),
139
+ ("Tau Scorpii", 248.97063689, -28.21601709, 2.82),
140
+ ("Kaus Borealis", 276.99266966, -25.42169850, 2.82),
141
+ ("Algenib", 3.30896812, 15.18359843, 2.83),
142
+ ("Turais", 121.88603676, -24.30432443, 2.83),
143
+ ("Beta Trianguli Australis", 238.78567527, -63.43072654, 2.83),
144
+ ("Zeta Persei", 58.53301031, 31.88363368, 2.84),
145
+ ("Beta Arae", 261.32494919, -55.52988169, 2.84),
146
+ ("Choo", 263.02095891, -49.90397613, 2.84),
147
+ ("Alcyone", 56.87115230, 24.10513565, 2.85),
148
+ ("Vindemiatrix", 195.54415423, 10.95914872, 2.85),
149
+ ("Deneb Algedi", 326.76018433, -16.12728709, 2.85),
150
+ ("Head of Hydrus", 29.69224410, -61.56982215, 2.86),
151
+ ("Delta Cygni", 296.24365384, 45.13081463, 2.86),
152
+ ("Tejat", 95.74011193, 22.51358275, 2.87),
153
+ ("Gamma Trianguli Australis", 229.72742204, -68.67954667, 2.87),
154
+ ("Alpha Tucanae", 334.62546849, -60.25962954, 2.87),
155
+ ("Acamar", 44.56531356, -40.30468123, 2.88),
156
+ ("Albaldah", 287.44097053, -21.02361398, 2.88),
157
+ ("Gomeisa", 111.78767391, 8.28931576, 2.89),
158
+ ("Pi Scorpii", 239.71297182, -26.11410795, 2.89),
159
+ ("Epsilon Persei", 59.46349742, 40.01019978, 2.90),
160
+ ("Alniyat", 245.29714881, -25.59279208, 2.90),
161
+ ("Albireo", 292.68031501, 27.95967363, 2.90),
162
+ ("Sadalsuud", 322.88971698, -5.57117483, 2.90),
163
+ ("Gamma Persei", 46.19925046, 53.50646183, 2.91),
164
+ ("Upsilon Carinae", 146.77550706, -65.07200742, 2.92),
165
+ ("Matar", 340.75053685, 30.22121471, 2.93),
166
+ ("Tau Puppis", 102.48403811, -50.61453870, 2.94),
167
+ ("Algorel", 177.67382715, 1.76472265, 2.94),
168
+ ("Sadalmelik", 331.44598144, -0.31985096, 2.95),
169
+ ("Zaurak", 59.50735759, -13.50851481, 2.97),
170
+ ("Alheka", 84.44960000, 21.12570000, 2.97),
171
+ ("Ras Elased Austr.", 146.46457917, 23.77875000, 2.97),
172
+ ("Alnasl", 271.45203374, -30.42408985, 2.98),
173
+ ("Gamma Hydrae", 199.73040704, -23.17151401, 2.99),
174
+ ("Iota¹ Scorpii", 267.00287964, -40.10176839, 2.99),
175
+ ("Deneb el Okab", 286.35253340, 13.86347728, 2.99),
176
+ ("Beta Trianguli", 32.38594634, 34.98729706, 3.00),
177
+ ("Psi Ursae Majoris", 167.41586790, 44.49848775, 3.00),
178
+ ("Pherkad Major", 230.18209805, 71.83402545, 3.00),
179
+ ("Mu¹ Scorpii", 263.99560239, -44.72771344, 3.00),
180
+ ("Gamma Gruis", 328.48215125, -37.36487222, 3.00),
181
+ ("Delta Persei", 55.73122002, 47.78749674, 3.01),
182
+ ("Phurad", 84.41118926, 21.14254411, 3.02),
183
+ ("Omicron² Canis Majoris", 105.75634918, -23.79494266, 3.02),
184
+ ("Minkar", 182.53116909, -22.61976722, 3.02),
185
+ ("Almaaz", 75.49222654, 43.82331031, 3.03),
186
+ ("Beta Muscae", 191.57001709, -68.10811567, 3.04),
187
+ ("Seginus", 218.01946533, 38.30824808, 3.04),
188
+ ("Dabih", 305.25277749, -14.78140760, 3.05),
189
+ ("Mebsuta", 100.98302980, 25.13112719, 3.06),
190
+ ("Tania Australis", 155.58219865, 41.49953826, 3.06),
191
+ ("Tais", 293.08995921, 69.66117661, 3.07),
192
+ ("Eta Sagittarii", 274.40682166, -36.76169016, 3.10),
193
+ ("Zeta Hydrae", 133.84844249, 5.94556521, 3.11),
194
+ ("Nu Hydrae", 137.58248808, -11.61668144, 3.11),
195
+ ("Lambda Centauri", 173.94532538, -63.01983499, 3.11),
196
+ ("Persian", 309.39180072, -47.29150145, 3.11),
197
+ ("Wazn", 87.73996785, -35.76830962, 3.12),
198
+ ("Talita", 134.80189007, 48.04182614, 3.12),
199
+ ("Zeta Arae", 254.65505223, -55.99013886, 3.12),
200
+ ("Sarin", 258.75796074, 24.83920697, 3.12),
201
+ ("Ke Kwan", 125.62848024, -59.50948419, 3.13),
202
+ ("Alpha Lyncis", 140.26375088, 34.39255929, 3.14),
203
+ ("N Velorum", 142.80549230, -57.03437645, 3.16),
204
+ ("Pi Herculis", 258.76180936, 36.80916155, 3.16),
205
+ ("Nu Puppis", 98.20037422, -43.90379684, 3.17),
206
+ ("Al Haud", 56.87115230, 24.10513565, 3.17),
207
+ ("Aldhibah", 257.19661554, 65.71464533, 3.17),
208
+ ("Phi Sagittarii", 281.41412309, -26.99078265, 3.17),
209
+ ("Hoedus II", 76.75607900, 41.19769500, 3.18),
210
+ ("Alpha Circini", 220.62675272, -64.97513301, 3.18),
211
+ ("Tabit", 72.46004669, 6.96127795, 3.19),
212
+ ("Epsilon Leporis", 76.36526836, -22.37103449, 3.19),
213
+ ("Kappa Ophiuchi", 254.41707293, 9.37502902, 3.19),
214
+ ("G Scorpii", 267.46450374, -37.04327638, 3.19),
215
+ ("Zeta Cygni", 318.23410829, 30.22689868, 3.21),
216
+ ("Errai", 354.83712672, 77.63236411, 3.21),
217
+ ("Delta Lupi", 230.34297427, -40.64753037, 3.22),
218
+ ("Yed Posterior", 244.58037594, -4.69251315, 3.23),
219
+ ("Alava", 260.20692403, -12.84687607, 3.23),
220
+ ("Alphirk", 322.16498688, 70.56071519, 3.23),
221
+ ("Alpha Pictoris", 102.04772968, -61.94138912, 3.24),
222
+ ("Theta Aquilae", 302.82619455, -0.82146359, 3.24),
223
+ ("Sigma Puppis", 112.30763599, -43.30143539, 3.25),
224
+ ("Pi Hydrae", 211.59290835, -26.68236158, 3.25),
225
+ ("Brachium", 226.01756171, -25.28196958, 3.25),
226
+ ("Sulaphat", 284.73592734, 32.68955574, 3.25),
227
+ ("Gamma Hydri", 56.80975276, -74.23896288, 3.26),
228
+ ("Delta Andromedae", 9.83167964, 30.86098358, 3.27),
229
+ ("Theta Ophiuchi", 260.50241395, -24.99954638, 3.27),
230
+ ("Skat", 343.66252607, -15.82081957, 3.27),
231
+ ("Mu Leporis", 78.25009988, -16.18824005, 3.29),
232
+ ("Omega Carinae", 153.43425248, -70.03790645, 3.29),
233
+ ("Edasich", 231.23239085, 58.96606586, 3.29),
234
+ ("Alpha Doradus", 68.49907161, -55.04497896, 3.30),
235
+ ("p Carinae", 158.00610455, -61.68533195, 3.30),
236
+ ("Mu Centauri", 183.22449259, -44.47111811, 3.30),
237
+ ("Propus", 93.71935536, 22.50678733, 3.31),
238
+ ("Rasalgethi", 258.66190909, 14.39034061, 3.31),
239
+ ("Gamma Arae", 261.34858046, -56.37772633, 3.31),
240
+ ("Beta Phoenicis", 16.52099799, -46.71841069, 3.32),
241
+ ("Gorgonea Tertia", 46.29414106, 38.84027619, 3.32),
242
+ ("Megrez", 183.85649936, 57.03261698, 3.32),
243
+ ("Eta Scorpii", 258.03830873, -43.23918953, 3.32),
244
+ ("Nu Ophiuchi", 254.88836619, -30.09376253, 3.32),
245
+ ("Tau Sagittarii", 286.73501297, -27.67041564, 3.32),
246
+ ("Alpha Reticuli", 63.60612502, -62.47380349, 3.33),
247
+ ("Chort", 168.56002363, 15.42957109, 3.33),
248
+ ("Asmidiske", 117.32355647, -24.85978388, 3.34),
249
+ ("Segin", 28.59889203, 63.67010007, 3.35),
250
+ ("Algjebbah", 80.98067159, -2.40104935, 3.35),
251
+ ("Alzirr", 101.32235202, 12.89559496, 3.35),
252
+ ("Muscida", 127.56612565, 60.71816822, 3.35),
253
+ ("Delta Aquilae", 291.37458914, 3.11477947, 3.36),
254
+ ("Epsilon Lupi", 230.67028440, -44.68961518, 3.37),
255
+ ("Heze", 203.67329733, -0.59581642, 3.38),
256
+ ("Epsilon Hydrae", 131.69380097, 6.41880152, 3.38),
257
+ ("Meissa", 83.78449002, 9.93415587, 3.39),
258
+ ("q Carinae", 154.27073140, -61.33230464, 3.39),
259
+ ("Auva", 194.00308750, 3.36659488, 3.39),
260
+ ("Zeta Cephei", 332.71365711, 58.20126183, 3.39),
261
+ ("Theta² Tauri", 67.28601254, 15.93975823, 3.40),
262
+ ("Gamma Phoenicis", 22.09136952, -43.31823474, 3.41),
263
+ ("Lambda Tauri", 60.17006989, 12.49034444, 3.41),
264
+ ("Nu Centauri", 200.82129113, -64.57827208, 3.41),
265
+ ("Zeta Lupi", 228.07123134, -52.09924870, 3.41),
266
+ ("Eta Cephei", 311.32239653, 61.83878173, 3.41),
267
+ ("Homam", 340.36550299, 10.83136331, 3.41),
268
+ ("Mothallah", 28.27043924, 29.57881867, 3.42),
269
+ ("Eta Lupi", 240.03053298, -38.39670506, 3.42),
270
+ ("Mu Herculis", 249.24507679, 42.74724515, 3.42),
271
+ ("Beta Pavonis", 311.23955663, -66.20321158, 3.42),
272
+ ("a Carinae", 137.74202207, -58.96690056, 3.43),
273
+ ("Adhafera", 154.17256318, 23.41731699, 3.43),
274
+ ("Althalimain", 304.41195470, -12.50821219, 3.43),
275
+ ("Tania Borealis", 154.27408024, 42.91441381, 3.45),
276
+ ("Sheliak", 282.51997977, 33.36266677, 3.45),
277
+ ("Achird", 12.27622748, 57.81517729, 3.46),
278
+ ("Dheneb", 39.87065353, 0.32850867, 3.46),
279
+ ("Chi Carinae", 119.19466706, -52.98234546, 3.46),
280
+ ("Delta Bootis", 228.87567842, 33.31483124, 3.46),
281
+ ("Kaffaljidhma", 40.82516290, 3.23581638, 3.47),
282
+ ("Eta Leonis", 151.83313496, 16.76266332, 3.48),
283
+ ("Eta Herculis", 250.72402061, 38.92225492, 3.48),
284
+ ("Tau Ceti", 26.01701307, -15.93747989, 3.49),
285
+ ("Sigma Canis Majoris", 105.42978350, -27.93483034, 3.49),
286
+ ("Alula Borealis", 169.61973836, 33.09430607, 3.49),
287
+ ("Nekkar", 225.48650960, 40.39056857, 3.49),
288
+ ("Alpha Telescopii", 276.74340177, -45.96845775, 3.49),
289
+ ("Epsilon Gruis", 342.13874192, -51.31686481, 3.49),
290
+ ("Kappa Canis Majoris", 102.46024630, -32.50847884, 3.50),
291
+ ("Wasat", 110.03072736, 21.98230405, 3.50),
292
+ ("Iota Cephei", 342.42007288, 66.20040505, 3.50),
293
+ ("Gamma Sagittae", 299.68928429, 19.49214613, 3.51),
294
+ ("Sadalbari", 342.50080448, 24.60158128, 3.51),
295
+ ("Rana", 55.81208557, -9.76339193, 3.52),
296
+ ("Subra", 145.28763406, 9.89230790, 3.52),
297
+ ("Tseen Ke", 229.72742204, -68.67954667, 3.52),
298
+ ("Xi² Sagittarii", 284.49772647, -21.10675573, 3.52),
299
+ ("Baham", 332.54995255, 6.19792159, 3.52),
300
+ ("Ain", 67.15416773, 19.18043421, 3.53),
301
+ ("Tarf", 124.12883745, 9.18554396, 3.53),
302
+ ("Xi Hydrae", 173.25047888, -31.85762444, 3.54),
303
+ ("Mu Serpentis", 268.96991667, -14.02141667, 3.54),
304
+ ("Xi Serpentis", 264.39666583, -15.39855576, 3.54),
305
+ ]
@@ -1,5 +1,6 @@
1
1
  # pro/continuum_subtract.py
2
2
  from __future__ import annotations
3
+ from setiastro.saspro.main_helpers import non_blocking_sleep
3
4
  import os
4
5
  import numpy as np
5
6
  import time # NEW
@@ -1616,5 +1617,5 @@ class ContinuumProcessingThread(QThread):
1616
1617
  return last
1617
1618
  except Exception:
1618
1619
  return last
1619
- time.sleep(poll)
1620
+ non_blocking_sleep(poll)
1620
1621
  return ""
@@ -7,6 +7,7 @@ from typing import Any, Callable, Optional
7
7
  import numpy as np
8
8
 
9
9
  from setiastro.saspro.resources import get_resources
10
+ from setiastro.saspro.runtime_torch import _user_runtime_dir, _venv_paths, _check_cuda_in_venv
10
11
 
11
12
  # Optional deps
12
13
  try:
@@ -44,13 +45,18 @@ def _autocast_context(torch, device) -> Any:
44
45
  major, minor = torch.cuda.get_device_capability()
45
46
  cap = float(f"{major}.{minor}")
46
47
  if cap >= 8.0:
47
- # Preferred API (torch >= 1.10-ish; definitely in 2.x)
48
48
  if hasattr(torch, "amp") and hasattr(torch.amp, "autocast"):
49
49
  return torch.amp.autocast(device_type="cuda")
50
- # Fallback for older torch
51
50
  return torch.cuda.amp.autocast()
51
+
52
+ elif hasattr(device, "type") and device.type == "mps":
53
+ # MPS often benefits from autocast in newer torch versions
54
+ if hasattr(torch, "amp") and hasattr(torch.amp, "autocast"):
55
+ return torch.amp.autocast(device_type="mps")
56
+
52
57
  except Exception:
53
58
  pass
59
+
54
60
  return _nullcontext()
55
61
 
56
62
 
@@ -365,7 +371,21 @@ def load_darkstar_models(*, use_gpu: bool, color: bool, status_cb=print) -> Dark
365
371
  m = DarkStarModels(device=dev, is_onnx=False, model=net, torch=torch, chunk_size=512)
366
372
  _MODELS_CACHE[key] = m
367
373
  return m
374
+ # ---------------- MPS (torch) ----------------
375
+ if use_gpu and hasattr(torch, "backends") and hasattr(torch.backends, "mps") and torch.backends.mps.is_available():
376
+ backend_id = "mps"
377
+ key = (tag, backend_id)
378
+ if key in _MODELS_CACHE:
379
+ return _MODELS_CACHE[key]
368
380
 
381
+ dev = torch.device("mps")
382
+ status_cb("Dark Star: using MPS")
383
+ Net = _build_darkstar_torch_models(torch)
384
+ net = Net(pth, None).eval().to(dev)
385
+
386
+ m = DarkStarModels(device=dev, is_onnx=False, model=net, torch=torch, chunk_size=512)
387
+ _MODELS_CACHE[key] = m
388
+ return m
369
389
  # ---------------- DirectML (torch-directml) ----------------
370
390
  if use_gpu and is_windows:
371
391
  try: