-
Notifications
You must be signed in to change notification settings - Fork 1
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
Mocksim merge #18
base: main
Are you sure you want to change the base?
Mocksim merge #18
Conversation
- added main splitter - adjusted layout margins, default window size - support for more cameras (simplified code)
calibrations now know from/to coordinate system names
fix mock stage orientation bug
carry system names through calibration transforms, check when moving to target
self.suggested_corr_points.emit(result) | ||
|
||
|
||
def template_match(img, template, method): |
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.
might want to move this template matching code somewhere else
from .threadrun import runInGuiThread | ||
|
||
|
||
class CameraTransform(coorx.CompositeTransform): |
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.
feels like a duplicate of same class name in calibration.py, think about this (chris)
def set_last_object_point(self, obj_point): | ||
self.obj_point_last = obj_point | ||
|
||
def get_image_point(self): |
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.
this is a 4D "image points" (2 points)
assert len(calibrations) > 0 | ||
return calibrations | ||
|
||
def get_calibration(self, stage): |
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.
this gets the most recent calibration associated with a stage
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.
used for "move to selected" button
MockStage.close_stages() | ||
|
||
|
||
class NewScaleStage: |
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.
we should have base classes for both Stage and Camera
z += zo | ||
|
||
speed = speed or self.speed | ||
move_cmd = MoveFuture(self, pos=np.array([x, y, z]), speed=speed, accel=self.accel) |
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.
might be worth using this for the real stage? tbd
from PyQt5 import QtCore, QtWidgets | ||
|
||
|
||
def runInThread(thread, func, *args, **kwds): |
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.
not used in parallax (only in a script)
return ThreadCallFuture(thread, func, *args, **kwds)() | ||
|
||
|
||
def runInGuiThread(func, *args, **kwds): |
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.
used in mock_sim.py
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.
but only in the test script
parallax/config.py
Outdated
"calibration_path": "./calibrations", | ||
"console_history_file": "./console_history", | ||
"calibration_path": "./", | ||
"console_history_file": "./", |
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.
console_history is a file; this should be left as-is
@@ -10,8 +10,8 @@ | |||
"show_axes": True, | |||
"auto_select_corr_points": True, | |||
}, | |||
"calibration_path": "./calibrations", | |||
"console_history_file": "./console_history", | |||
"calibration_path": "./", |
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.
Do you prefer calibrations here, or was tere another reason to make this change?
@@ -69,11 +69,11 @@ def __init__(self, model): | |||
self.dropdown.activated.connect(self.handle_stage_selection) | |||
|
|||
self.settings_button = QPushButton() | |||
self.settings_button.setIcon(QIcon('../img/gear.png')) | |||
self.settings_button.setIcon(QIcon('./img/gear.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.
More robust:
os.path.join(os.path.dirname(parallax.__file__), 'img', 'gear.png'))
Aside from minor comments, your changes look good to me. |
Introduces a simulation of stage+camera for testing