pyGCG 0.8__tar.gz → 0.8.2__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.
- {pygcg-0.8 → pygcg-0.8.2}/PKG-INFO +1 -1
- {pygcg-0.8 → pygcg-0.8.2}/pyGCG.egg-info/PKG-INFO +1 -1
- {pygcg-0.8 → pygcg-0.8.2}/pygcg/_version.py +2 -2
- {pygcg-0.8 → pygcg-0.8.2}/pygcg/tabs/beams.py +1 -1
- {pygcg-0.8 → pygcg-0.8.2}/pygcg/tabs/spectrum.py +15 -37
- {pygcg-0.8 → pygcg-0.8.2}/.github/workflows/publish-to-pypi.yml +0 -0
- {pygcg-0.8 → pygcg-0.8.2}/.gitignore +0 -0
- {pygcg-0.8 → pygcg-0.8.2}/.pre-commit-config.yaml +0 -0
- {pygcg-0.8 → pygcg-0.8.2}/LICENCE.txt +0 -0
- {pygcg-0.8 → pygcg-0.8.2}/README.md +0 -0
- {pygcg-0.8 → pygcg-0.8.2}/pyGCG.egg-info/SOURCES.txt +0 -0
- {pygcg-0.8 → pygcg-0.8.2}/pyGCG.egg-info/dependency_links.txt +0 -0
- {pygcg-0.8 → pygcg-0.8.2}/pyGCG.egg-info/requires.txt +0 -0
- {pygcg-0.8 → pygcg-0.8.2}/pyGCG.egg-info/top_level.txt +0 -0
- {pygcg-0.8 → pygcg-0.8.2}/pygcg/GUI_main.py +0 -0
- {pygcg-0.8 → pygcg-0.8.2}/pygcg/__init__.py +0 -0
- {pygcg-0.8 → pygcg-0.8.2}/pygcg/example_config.toml +0 -0
- {pygcg-0.8 → pygcg-0.8.2}/pygcg/tabs/__init__.py +0 -0
- {pygcg-0.8 → pygcg-0.8.2}/pygcg/utils/__init__.py +0 -0
- {pygcg-0.8 → pygcg-0.8.2}/pygcg/utils/icon_checkbox.py +0 -0
- {pygcg-0.8 → pygcg-0.8.2}/pygcg/utils/misc.py +0 -0
- {pygcg-0.8 → pygcg-0.8.2}/pygcg/utils/toolbar.py +0 -0
- {pygcg-0.8 → pygcg-0.8.2}/pygcg/windows/__init__.py +0 -0
- {pygcg-0.8 → pygcg-0.8.2}/pygcg/windows/base_window.py +0 -0
- {pygcg-0.8 → pygcg-0.8.2}/pygcg/windows/comments.py +0 -0
- {pygcg-0.8 → pygcg-0.8.2}/pygcg/windows/search.py +0 -0
- {pygcg-0.8 → pygcg-0.8.2}/pygcg/windows/settings.py +0 -0
- {pygcg-0.8 → pygcg-0.8.2}/pyproject.toml +0 -0
- {pygcg-0.8 → pygcg-0.8.2}/setup.cfg +0 -0
|
@@ -29,7 +29,7 @@ class BeamFrame(ctk.CTkFrame):
|
|
|
29
29
|
def __init__(self, master, gal_id, PA, **kwargs):
|
|
30
30
|
super().__init__(master, **kwargs)
|
|
31
31
|
|
|
32
|
-
self.settings_frame = ctk.CTkFrame(self)
|
|
32
|
+
self.settings_frame = ctk.CTkFrame(self, fg_color=self._root().bg_colour_name)
|
|
33
33
|
self.settings_frame.grid(
|
|
34
34
|
row=0,
|
|
35
35
|
column=0,
|
|
@@ -53,7 +53,9 @@ class SpecFrame(ctk.CTkFrame):
|
|
|
53
53
|
self.grid_columnconfigure(1, weight=1)
|
|
54
54
|
self.grid_columnconfigure(2, weight=1)
|
|
55
55
|
|
|
56
|
-
self.plot_options_frame = ctk.CTkFrame(
|
|
56
|
+
self.plot_options_frame = ctk.CTkFrame(
|
|
57
|
+
self, fg_color=self._root().bg_colour_name
|
|
58
|
+
)
|
|
57
59
|
self.plot_options_frame.grid(row=0, column=0, columnspan=2, sticky="ew")
|
|
58
60
|
|
|
59
61
|
self.redshift_plot = RedshiftPlotFrame(self, self.gal_id)
|
|
@@ -70,7 +72,7 @@ class SpecFrame(ctk.CTkFrame):
|
|
|
70
72
|
row=0, column=1, padx=20, pady=(10, 10), sticky="w"
|
|
71
73
|
)
|
|
72
74
|
|
|
73
|
-
self.redshift_frame = ctk.CTkFrame(self)
|
|
75
|
+
self.redshift_frame = ctk.CTkFrame(self, fg_color=self._root().bg_colour_name)
|
|
74
76
|
self.redshift_frame.grid(row=2, column=2, sticky="news")
|
|
75
77
|
self.redshift_frame.columnconfigure([0, 1, 2, 3, 4, 5], weight=1)
|
|
76
78
|
self.redshift_label = ctk.CTkLabel(
|
|
@@ -987,23 +989,27 @@ class ImagesFrame(ctk.CTkFrame):
|
|
|
987
989
|
self.fig.canvas.get_tk_widget().config(bg=self._root().bg_colour_name)
|
|
988
990
|
|
|
989
991
|
def update_seg_path(self, pattern="*seg.fits"):
|
|
990
|
-
|
|
991
|
-
if len(
|
|
992
|
+
seg_paths = [str(s) for s in self._root().prep_dir.glob(pattern)]
|
|
993
|
+
if len(seg_paths) == 0:
|
|
992
994
|
print("Segmentation map not found.")
|
|
993
995
|
self.seg_path = None
|
|
994
996
|
else:
|
|
995
|
-
|
|
997
|
+
seg_paths = sorted(seg_paths, key=len)
|
|
998
|
+
self.seg_path = Path(seg_paths[0])
|
|
996
999
|
|
|
997
1000
|
def update_rgb_path(self):
|
|
998
1001
|
self.rgb_paths = []
|
|
999
1002
|
for p in self._root().filter_names:
|
|
1000
|
-
|
|
1001
|
-
|
|
1003
|
+
rgb_paths = [
|
|
1004
|
+
str(s)
|
|
1005
|
+
for s in self._root().prep_dir.glob(f"*{p.lower()}*_dr[zc]_sci.fits")
|
|
1006
|
+
]
|
|
1007
|
+
if len(rgb_paths) == 0:
|
|
1002
1008
|
print(f"{p} image not found.")
|
|
1003
1009
|
self.rgb_paths.append(None)
|
|
1004
1010
|
else:
|
|
1005
|
-
|
|
1006
|
-
self.rgb_paths.append(
|
|
1011
|
+
rgb_paths = sorted(rgb_paths, key=len)
|
|
1012
|
+
self.rgb_paths.append(Path(rgb_paths[0]))
|
|
1007
1013
|
|
|
1008
1014
|
def plot_failed(self, ax, plot_name, text=None):
|
|
1009
1015
|
for k in ["img", "marker", "text"]:
|
|
@@ -1031,34 +1037,6 @@ class ImagesFrame(ctk.CTkFrame):
|
|
|
1031
1037
|
def plot_images(self, border=5):
|
|
1032
1038
|
plot_names = self._root().filter_names[::-1] + ["rgb", "seg"]
|
|
1033
1039
|
|
|
1034
|
-
# if self.seg_path is None and all(x is None for x in self.rgb_paths):
|
|
1035
|
-
# print("No images to plot.")
|
|
1036
|
-
# missing_data_text = self._root().filter_names[::-1] + [
|
|
1037
|
-
# "No images found.",
|
|
1038
|
-
# "Segmentation map\nnot found.",
|
|
1039
|
-
# ]
|
|
1040
|
-
|
|
1041
|
-
# try:
|
|
1042
|
-
# for v in self.plotted_components.values():
|
|
1043
|
-
# v.set_visible(False)
|
|
1044
|
-
# except:
|
|
1045
|
-
# pass
|
|
1046
|
-
|
|
1047
|
-
# for a, n, t in zip(self.fig_axes, plot_names, missing_data_text):
|
|
1048
|
-
# print(t)
|
|
1049
|
-
# self.plotted_components[f"{n}_text"] = a.text(
|
|
1050
|
-
# 0.5,
|
|
1051
|
-
# 0.5,
|
|
1052
|
-
# t,
|
|
1053
|
-
# transform=a.transAxes,
|
|
1054
|
-
# ha="center",
|
|
1055
|
-
# va="center",
|
|
1056
|
-
# c=self._root().text_colour,
|
|
1057
|
-
# visible=True
|
|
1058
|
-
# )
|
|
1059
|
-
# self.pyplot_canvas.draw_idle()
|
|
1060
|
-
# return
|
|
1061
|
-
|
|
1062
1040
|
try:
|
|
1063
1041
|
with pf.open(self.seg_path) as hdul:
|
|
1064
1042
|
seg_wcs = WCS(hdul[0].header)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|