-
Notifications
You must be signed in to change notification settings - Fork 38
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 settings from base classes #260
Comments
We have `Camera.set_transform` and `Camera.get_transform` methods to control the client transform. There is also a readout transform (only used by PVCamera at the moment). The transform setting exposes the merge of the those two. We want settings to be device specific stuff and not general camera stuff that should be a ABC method. This commit removes the transform setting from Camera.
I've now pushed ee7842a which removes the transform setting. I've looked a bit deeper and found that for cameras we have
|
We need to test this. Both DeepSIM and CryoSIM use this setting in the depot.conf to set the camera orientations on startup. This is essential functionality as the two cameras have different orientations, as they are separted by a mirror which flips one image relative to the other. Additionally as noted the the EMCCDs flip the image between conventional and EM readout and this needs to be taken account of. Refactoring this functionality definitely needs testing on the real systems before being merged into the main branch. |
I really don't think this is true or nor that it is what Cockpit is doing. This is about removing The effect this should have on Cockpit is that |
This sounds sensible and I do not think it is going to break any of the systems in Oxford. We lose the ability to change the transform dynamically, but this is a whole separate issue for Cockpit and not often used feature anyway. |
I also use the roi definition in the settings menu to adjust the excitation field, but I presume that would be still available as the andor camera settings defining left, top, width and height... |
Yes. I'm not proposing removing any device specific settings. Although I think it would still nice if Cockpit had some GUI to draw a ROI. |
|
I think we need to ensure there is still an easy way to define the ROI programmatically, say from depot.conf. Some have cameras which are bigger than the optical field of view so some of the camera is never used and a predefined ROI is a massive win to save doing it every time you restart. |
I've opened a cockpit issue to discuss the cockpit side details of it. |
I tested how the transform works on DeepSIM. I confirm that it does not use the settings dictionary and it uses the |
Thanks Danny, I would say I am just misremembering how it was working. Sorry for the false alarm. I suggest we pull davids code a close the issuse |
This has been discussed a few times but I can't find a specific issue about it (I've found comments of it on #92 and #161) so I'm opening one now. I believe we always agreed on this and this was just not done yet because it's not a priority. Here is it now for future records.
Some ABCs add settings, e.g.,
Camera
hastransform
,roi
, andreadout mode
andFilterWheel
hasposition
. There's two reasons why we don't want this: 1) if it is defined on the ABC then it is useful to all concrete implementations at which point we should have a specialised method for it; and 2) settings should be for device specific parameters and we run the risk of clashing with their names (see #92 and #161). This means that some settings will replicate some ABC methods but that's ok. The settings are the changes at the level of the vendor library/interface while the ABC methods just need to be more careful to not break. This is referenced on the documentation:Over time, we have removed most of those settings. I've recently also removed
"positions"
fromFilterWheel
(d5e6c39), and"readout mode"
fromCamera
(953d977).The only remaining settings I see are
"roi"
and"transform"
onCamera
. I would like to remove them and have this sorted once and for all. Questions about them:roi setting
Camera
hasset_roi
andget_roi
methods but Cockpit does not use them. Cockpit users wanting to select a ROI need to go through the camera settings menu and type in the ROI. This is terrible UI but that's what Cockpit has. @dstoychev mentioned having a patch that adds the option to draw a ROI on the camera view. This would be nice and then we could remove theroi
setting.transform setting (removed with ee7842a)
Camera
has aset_transform
method (but noget_transform
). Cockpit reads transform values for both objectives and cameras indepot.conf
and passes them toCamera.set_transform
(see both being used in https://github.com/MicronOxford/configs/blob/6bd326a93bc75b6b1f53a2fab43a1d0597b9d93d/DeepSIM/depot.conf). While it is possible to pass a transform to the camera in thedepot.conf
throughsettings
, that's an advanced and undocumented feature and I don't think anyone is using it (and if they are, they should be using thetransform
key instead ofsettings
). So I'm thinking it's safe to just remove this.The text was updated successfully, but these errors were encountered: