Skip to content

Conversation

@AhmetCanSolak
Copy link
Contributor

This PR adds the camera adapter required for using prime bsi camera and the initial form of the camera gui dockable widget. Eventually, we should be able to populate the parameters on that camera dockable widget with the exposed options of the related camera adapter instance. This is currently not implemented. Before merging the PR, we should also add a demo for the prime bsi camera and test it on the automaton machine.

ieivanov added 3 commits July 8, 2022 17:23
Updated camera init to allow initialization by specific name. If name is not provided, the next available camera is opened.

Removed some properties from __init__. I think it will be better to set these after init. We should be able to open the camera without specifying too many extra parameters.

Added methods for setting the camera readout speed and gain by name, rather than by index.
def __init__(
self,
camera_name: str = None,
# TODO: create properties for these
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think these shouldn't be properties. You mentioned you don't want to change these attributes often but more like you want to set it at the beginning only. That's why I intended to have them have them as arguments here instead of properties. What do you think @ieivanov ?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, I see your point. I think we should keep the __init__ as simple as possible. We often don't know what are possible values for these properties and need to initialize the camera to find out. Also, we occasionally change them after we start up the camera - it would be inconvenient to have to unload the camera to change these properties.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's alright, as soon as these values are member attributes we can change them later anytime and we will need a camera restart method anyway which we can use to update these attributes on the lower level driver APIs. We can revisit this once this class implementation is closer to the end.


@property
def speed_gain_table(self):
return self._speed_gain_table
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

given the _speed_gain_table value won't change, I think this can be defined as a class attribute instead of property. What do you think @ieivanov ?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good! By hardcoding this table we're making this class specific to the Prime BSI Express camera, which was our original intention. At a later point we can parse this table from port_speed_gain_table['CMOS'] to make the class generalize to other PVCAM cameras.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

absolutely, or we might have separate adapters for the other PVCAM cameras. Either way will be easy to accommodate those.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants