-
-
Notifications
You must be signed in to change notification settings - Fork 33
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
Cedar solve #134
Cedar solve #134
Changes from all commits
c53e46b
ebb4af3
bd1558c
573dfbe
f24d82e
c5b3f08
82fbcb6
424f03d
6d24aee
544e834
e7f2dc3
9617a1c
3087351
2583394
7f50d5e
228a2f1
a7b474c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
[submodule "python/PiFinder/tetra3"] | ||
path = python/PiFinder/tetra3 | ||
url = https://github.com/esa/tetra3.git | ||
url = https://github.com/smroid/cedar-solve | ||
branch = no_big_files |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,24 +4,26 @@ | |
This module contains all the UI Module classes | ||
|
||
""" | ||
import uuid | ||
import os | ||
import time | ||
from PIL import Image, ImageDraw, ImageFont, ImageChops, ImageOps | ||
from PiFinder.ui.fonts import Fonts as fonts | ||
from PiFinder import tetra3 | ||
from numpy import ndarray | ||
|
||
from PiFinder.ui.base import UIModule | ||
from PiFinder.image_util import ( | ||
gamma_correct_high, | ||
gamma_correct_med, | ||
gamma_correct_low, | ||
subtract_background, | ||
) | ||
from PiFinder.ui.base import UIModule | ||
import numpy as np | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No need to change this now, but it reminded me to tell you that I'm planning to implement isort linting of imports at some point. I'll do a full pass on the code base and set up a pre-commit to just run and modify the files: I'll probably do this along with getting mypy up and running with very loose checking initially and then tightening it down as we update the code. |
||
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)) | ||
|
||
|
||
class UIPreview(UIModule): | ||
from PiFinder import tetra3 | ||
|
||
__title__ = "CAMERA" | ||
__button_hints__ = { | ||
"B": "Align", | ||
|
@@ -79,7 +81,7 @@ def __init__(self, *args): | |
|
||
# the centroiding returns an ndarray | ||
# so we're initialiazing one here | ||
self.star_list = ndarray((0, 2)) | ||
self.star_list = np.empty((0, 2)) | ||
self.highlight_count = 0 | ||
|
||
def set_exp(self, option): | ||
|
@@ -139,8 +141,8 @@ def draw_star_selectors(self): | |
|
||
for _i in range(self.highlight_count): | ||
raw_y, raw_x = self.star_list[_i] | ||
star_x = int(raw_x / 2) | ||
star_y = int(raw_y / 2) | ||
star_x = int(raw_x / 4) | ||
star_y = int(raw_y / 4) | ||
|
||
x_direction = 1 | ||
x_text_offset = 6 | ||
|
@@ -188,13 +190,9 @@ def update(self, force=False): | |
# Fetch Centroids before image is altered | ||
# Do this at least once to get a numpy array in | ||
# star_list | ||
if self.align_mode: | ||
cent_image_obj = image_obj.resize((256, 256)) | ||
_t = time.time() | ||
self.star_list = tetra3.get_centroids_from_image( | ||
cent_image_obj, | ||
sigma_mode="local_median_abs", | ||
filtsize=11, | ||
if self.align_mode and self.shared_state and self.shared_state.solution(): | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'll have to dig into this a bit more.... but it seems like this would only allow alignment if the solver is working (which may not be that bad an idea). Also, would a planet show up in the |
||
self.star_list = np.array( | ||
self.shared_state.solution()["matched_centroids"] | ||
) | ||
|
||
# Resize | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,4 +17,5 @@ sh==1.14.3 | |
skyfield==1.45 | ||
timezonefinder==6.1.9 | ||
tqdm==4.65.0 | ||
alpyca | ||
grpcio==1.60.0 | ||
protobuf==4.25.2 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
random.png |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd like to leave the fov_max_error parameter in here, but it can go to 1.0 rather than 0.5.