setiastrosuitepro 1.8.1.post2__py3-none-any.whl → 1.8.3__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.
- setiastro/images/finderchart.png +0 -0
- setiastro/images/magnitude.png +0 -0
- setiastro/saspro/__main__.py +29 -38
- setiastro/saspro/_generated/build_info.py +2 -2
- setiastro/saspro/abe.py +1 -1
- setiastro/saspro/backgroundneutral.py +54 -16
- setiastro/saspro/blink_comparator_pro.py +3 -1
- setiastro/saspro/bright_stars.py +305 -0
- setiastro/saspro/continuum_subtract.py +2 -1
- setiastro/saspro/cosmicclarity_preset.py +2 -1
- setiastro/saspro/doc_manager.py +8 -0
- setiastro/saspro/exoplanet_detector.py +22 -17
- setiastro/saspro/finder_chart.py +1650 -0
- setiastro/saspro/gui/main_window.py +131 -17
- setiastro/saspro/gui/mixins/header_mixin.py +40 -15
- setiastro/saspro/gui/mixins/menu_mixin.py +3 -0
- setiastro/saspro/gui/mixins/toolbar_mixin.py +16 -1
- setiastro/saspro/imageops/stretch.py +1 -1
- setiastro/saspro/legacy/image_manager.py +18 -4
- setiastro/saspro/legacy/xisf.py +3 -3
- setiastro/saspro/magnitude_tool.py +1724 -0
- setiastro/saspro/main_helpers.py +18 -0
- setiastro/saspro/memory_utils.py +18 -14
- setiastro/saspro/remove_stars.py +13 -30
- setiastro/saspro/resources.py +177 -161
- setiastro/saspro/runtime_torch.py +71 -10
- setiastro/saspro/sfcc.py +86 -77
- setiastro/saspro/stacking_suite.py +4 -3
- setiastro/saspro/star_alignment.py +4 -2
- setiastro/saspro/texture_clarity.py +1 -1
- setiastro/saspro/torch_rejection.py +59 -28
- setiastro/saspro/widgets/image_utils.py +12 -4
- setiastro/saspro/wimi.py +2 -1
- setiastro/saspro/xisf.py +3 -3
- {setiastrosuitepro-1.8.1.post2.dist-info → setiastrosuitepro-1.8.3.dist-info}/METADATA +4 -4
- {setiastrosuitepro-1.8.1.post2.dist-info → setiastrosuitepro-1.8.3.dist-info}/RECORD +40 -35
- {setiastrosuitepro-1.8.1.post2.dist-info → setiastrosuitepro-1.8.3.dist-info}/WHEEL +0 -0
- {setiastrosuitepro-1.8.1.post2.dist-info → setiastrosuitepro-1.8.3.dist-info}/entry_points.txt +0 -0
- {setiastrosuitepro-1.8.1.post2.dist-info → setiastrosuitepro-1.8.3.dist-info}/licenses/LICENSE +0 -0
- {setiastrosuitepro-1.8.1.post2.dist-info → setiastrosuitepro-1.8.3.dist-info}/licenses/license.txt +0 -0
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
+
from setiastro.saspro.main_helpers import non_blocking_sleep
|
|
6
|
+
|
|
5
7
|
import os
|
|
6
8
|
import shutil
|
|
7
9
|
import tempfile
|
|
@@ -713,13 +715,13 @@ class ExoPlanetWindow(QDialog):
|
|
|
713
715
|
img_meta = xisf.get_images_metadata()[0].get('FITSKeywords', {})
|
|
714
716
|
if 'DATE-OBS' in img_meta:
|
|
715
717
|
ds = img_meta['DATE-OBS'][0]['value']
|
|
716
|
-
except:
|
|
718
|
+
except Exception:
|
|
717
719
|
ds = None
|
|
718
720
|
elif ext in ('.fit', '.fits', '.fz'):
|
|
719
721
|
try:
|
|
720
722
|
hdr0, _ = get_valid_header(p)
|
|
721
723
|
ds = hdr0.get('DATE-OBS')
|
|
722
|
-
except:
|
|
724
|
+
except Exception:
|
|
723
725
|
ds = None
|
|
724
726
|
|
|
725
727
|
# Use robust header time parsing (UT-OBS -> DATE-OBS -> MJD-OBS fallback)
|
|
@@ -796,24 +798,24 @@ class ExoPlanetWindow(QDialog):
|
|
|
796
798
|
elif 'EXPTIME' in fits_kw: val = fits_kw['EXPTIME'][0].get('value')
|
|
797
799
|
try:
|
|
798
800
|
self.exposure_time = float(val)
|
|
799
|
-
except:
|
|
801
|
+
except (ValueError, TypeError):
|
|
800
802
|
print(f"[DEBUG] Could not parse exposure_time={val!r}")
|
|
801
803
|
|
|
802
804
|
am = None
|
|
803
805
|
if isinstance(hdr, fits.Header):
|
|
804
806
|
if 'AIRMASS' in hdr:
|
|
805
807
|
try: am = float(hdr['AIRMASS'])
|
|
806
|
-
except: am = None
|
|
808
|
+
except ValueError: am = None
|
|
807
809
|
if am is None:
|
|
808
810
|
alt = (hdr.get('OBJCTALT') or hdr.get('ALT') or hdr.get('ALTITUDE') or hdr.get('EL'))
|
|
809
811
|
try: am = self.estimate_airmass_from_altitude(float(alt))
|
|
810
|
-
except: am = 1.0
|
|
812
|
+
except (ValueError, TypeError): am = 1.0
|
|
811
813
|
elif isinstance(hdr, dict):
|
|
812
814
|
img_meta = hdr.get('image_meta', {}) or {}
|
|
813
815
|
fits_kw = img_meta.get('FITSKeywords', {})
|
|
814
816
|
if 'AIRMASS' in fits_kw:
|
|
815
817
|
try: am = float(fits_kw['AIRMASS'][0]['value'])
|
|
816
|
-
except: am = None
|
|
818
|
+
except (ValueError, TypeError): am = None
|
|
817
819
|
if am is None:
|
|
818
820
|
for key in ('OBJCTALT','ALT','ALTITUDE','EL'):
|
|
819
821
|
ent = fits_kw.get(key)
|
|
@@ -871,12 +873,12 @@ class ExoPlanetWindow(QDialog):
|
|
|
871
873
|
img_meta = xisf.get_images_metadata()[0]
|
|
872
874
|
kw = img_meta.get('FITSKeywords', {})
|
|
873
875
|
if 'DATE-OBS' in kw: ds = kw['DATE-OBS'][0]['value']
|
|
874
|
-
except: ds = None
|
|
876
|
+
except Exception: ds = None
|
|
875
877
|
elif ext in ('.fit', '.fits', '.fz'):
|
|
876
878
|
try:
|
|
877
879
|
hdr0, _ = get_valid_header(p)
|
|
878
880
|
ds = hdr0.get('DATE-OBS')
|
|
879
|
-
except: ds = None
|
|
881
|
+
except Exception: ds = None
|
|
880
882
|
# Use robust header time parsing (UT-OBS -> DATE-OBS -> MJD-OBS fallback)
|
|
881
883
|
t = None
|
|
882
884
|
try:
|
|
@@ -947,23 +949,23 @@ class ExoPlanetWindow(QDialog):
|
|
|
947
949
|
if 'EXPOSURE' in fits_kw: val = fits_kw['EXPOSURE'][0].get('value')
|
|
948
950
|
elif 'EXPTIME' in fits_kw: val = fits_kw['EXPTIME'][0].get('value')
|
|
949
951
|
try: self.exposure_time = float(val)
|
|
950
|
-
except: print(f"[DEBUG] Could not parse exposure_time={val!r}")
|
|
952
|
+
except (ValueError, TypeError): print(f"[DEBUG] Could not parse exposure_time={val!r}")
|
|
951
953
|
|
|
952
954
|
am = None
|
|
953
955
|
if isinstance(hdr, fits.Header):
|
|
954
956
|
if 'AIRMASS' in hdr:
|
|
955
957
|
try: am = float(hdr['AIRMASS'])
|
|
956
|
-
except: am = None
|
|
958
|
+
except ValueError: am = None
|
|
957
959
|
if am is None:
|
|
958
960
|
alt = (hdr.get('OBJCTALT') or hdr.get('ALT') or hdr.get('ALTITUDE') or hdr.get('EL'))
|
|
959
961
|
try: am = self.estimate_airmass_from_altitude(float(alt))
|
|
960
|
-
except: am = 1.0
|
|
962
|
+
except (ValueError, TypeError): am = 1.0
|
|
961
963
|
elif isinstance(hdr, dict):
|
|
962
964
|
img_meta = hdr.get('image_meta', {}) or {}
|
|
963
965
|
fits_kw = img_meta.get('FITSKeywords', {})
|
|
964
966
|
if 'AIRMASS' in fits_kw:
|
|
965
967
|
try: am = float(fits_kw['AIRMASS'][0]['value'])
|
|
966
|
-
except: am = None
|
|
968
|
+
except (ValueError, TypeError): am = None
|
|
967
969
|
if am is None:
|
|
968
970
|
for key in ('OBJCTALT','ALT','ALTITUDE','EL'):
|
|
969
971
|
ent = fits_kw.get(key)
|
|
@@ -1812,7 +1814,8 @@ class ExoPlanetWindow(QDialog):
|
|
|
1812
1814
|
if attempt == 5:
|
|
1813
1815
|
QMessageBox.critical(self, "SIMBAD Error", f"Could not reach SIMBAD after 5 tries:\n{e}")
|
|
1814
1816
|
return
|
|
1815
|
-
|
|
1817
|
+
# Use non-blocking sleep
|
|
1818
|
+
non_blocking_sleep(1)
|
|
1816
1819
|
|
|
1817
1820
|
if result is None or len(result) == 0:
|
|
1818
1821
|
QMessageBox.information(self, "No SIMBAD Matches", f"No objects found within 5″ of {ra:.6f}, {dec:.6f}.")
|
|
@@ -1880,7 +1883,7 @@ class ExoPlanetWindow(QDialog):
|
|
|
1880
1883
|
if attempt == 5:
|
|
1881
1884
|
QMessageBox.critical(self, "SIMBAD Error", f"Could not reach SIMBAD after 5 tries:\n{e}")
|
|
1882
1885
|
return None
|
|
1883
|
-
|
|
1886
|
+
non_blocking_sleep(1)
|
|
1884
1887
|
if table is None or len(table) == 0:
|
|
1885
1888
|
return None
|
|
1886
1889
|
try:
|
|
@@ -1905,7 +1908,8 @@ class ExoPlanetWindow(QDialog):
|
|
|
1905
1908
|
if attempt==5:
|
|
1906
1909
|
QMessageBox.critical(self, "SIMBAD Error", f"Could not reach SIMBAD after 5 tries:\n{e}")
|
|
1907
1910
|
return None, None
|
|
1908
|
-
|
|
1911
|
+
non_blocking_sleep(1)
|
|
1912
|
+
|
|
1909
1913
|
if table is None or len(table)==0:
|
|
1910
1914
|
return None, None
|
|
1911
1915
|
try:
|
|
@@ -2181,10 +2185,11 @@ class ExoPlanetWindow(QDialog):
|
|
|
2181
2185
|
QMessageBox.information(self, "No TESS Data", "There are no TESS cutouts available at that position.")
|
|
2182
2186
|
self.status_label.setText("No TESScut data found.")
|
|
2183
2187
|
return
|
|
2184
|
-
|
|
2188
|
+
non_blocking_sleep(2)
|
|
2185
2189
|
|
|
2186
2190
|
self.status_label.setText("Querying TESScut…")
|
|
2187
2191
|
QApplication.processEvents()
|
|
2192
|
+
|
|
2188
2193
|
cache_dir = os.path.join(os.path.expanduser("~"), ".setiastro", "tesscut_cache")
|
|
2189
2194
|
os.makedirs(cache_dir, exist_ok=True)
|
|
2190
2195
|
|
|
@@ -2242,7 +2247,7 @@ class ExoPlanetWindow(QDialog):
|
|
|
2242
2247
|
QMessageBox.critical(self, "TESScut Error", f"TESScut failed after {MAX_RETRIES} attempts.\n\n{de}")
|
|
2243
2248
|
self.status_label.setText("TESScut fetch failed.")
|
|
2244
2249
|
else:
|
|
2245
|
-
|
|
2250
|
+
non_blocking_sleep(2)
|
|
2246
2251
|
|
|
2247
2252
|
# ---------------- Pixel → Sky helper ----------------
|
|
2248
2253
|
|