Skip to content

Commit

Permalink
Remove scaling of selected pixel
Browse files Browse the repository at this point in the history
  • Loading branch information
brickbots committed Mar 7, 2024
1 parent 8537a0f commit 75804fa
Showing 1 changed file with 12 additions and 11 deletions.
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

0 comments on commit 75804fa

Please sign in to comment.