Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove scaling of selected pixel #152

Merged
merged 1 commit into from
Mar 7, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 12 additions & 11 deletions python/PiFinder/ui/preview.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,21 @@
This module contains all the UI Module classes

"""
import sys
import numpy as np
import time

from PIL import Image, ImageChops, ImageOps

from PiFinder.ui.fonts import Fonts as fonts
from PiFinder import utils
from PiFinder.ui.base import UIModule
from PiFinder.image_util import (
gamma_correct_high,
gamma_correct_med,
gamma_correct_low,
subtract_background,
)
import numpy as np
import time
from PIL import Image, ImageChops, ImageOps
from PiFinder.ui.fonts import Fonts as fonts
from PiFinder import utils
import sys

sys.path.append(str(utils.tetra3_dir))

Expand Down Expand Up @@ -191,9 +193,8 @@ def update(self, force=False):
# Do this at least once to get a numpy array in
# star_list
if self.align_mode and self.shared_state and self.shared_state.solution():
self.star_list = np.array(
self.shared_state.solution()["matched_centroids"]
)
matched_centroids = self.shared_state.solution()["matched_centroids"]
self.star_list = np.array(matched_centroids)

# Resize
image_obj = image_obj.resize((128, 128))
Expand Down Expand Up @@ -246,8 +247,8 @@ def key_number(self, number):
# They picked a star to align....
star_index = number - 1
if self.star_list.shape[0] > star_index:
star_cam_x = self.star_list[star_index][0] * 2
star_cam_y = self.star_list[star_index][1] * 2
star_cam_x = self.star_list[star_index][0]
star_cam_y = self.star_list[star_index][1]
self.shared_state.set_solve_pixel((star_cam_x, star_cam_y))
self.config_object.set_option(
"solve_pixel",
Expand Down
Loading