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.
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.
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.
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.
this gets the most recent calibration associated with a stage
There was a problem hiding this comment.
used for "move to selected" button
| MockStage.close_stages() | ||
|
|
||
|
|
||
| class NewScaleStage: |
There was a problem hiding this comment.
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.
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.
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.
but only in the test script
| "calibration_path": "./calibrations", | ||
| "console_history_file": "./console_history", | ||
| "calibration_path": "./", | ||
| "console_history_file": "./", |
There was a problem hiding this comment.
console_history is a file; this should be left as-is
| }, | ||
| "calibration_path": "./calibrations", | ||
| "console_history_file": "./console_history", | ||
| "calibration_path": "./", |
There was a problem hiding this comment.
Do you prefer calibrations here, or was tere another reason to make this change?
|
|
||
| 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.
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