Open philipstarkey opened 5 years ago
Original comment by Chris Billington (Bitbucket: cbillington, GitHub: chrisjbillington).
One solution might be to a) save no attributes. Then we don't need to know what they are called, but the downside is they don't get saved. This is not as bad as it sounds - do you really need to know the dimensions of an image? Pixel format and binning are nice to know, but for specialy usage you will know what they are already and may have saved them as a runmanager global if they are something likely to change.
Another option is b), save all attributes, as returned by IMAQdxEnumerateAttributes2. We also don't need to know what they are called in this case, and they do get saved - but indiscriminately, and there are many of them. This is probably the solution I am leaning toward to make the code properly general
The exposure time is the only one that interacts with labscript. For this, perhaps we could rename the exposure_time attribute in labscript to trigger_width or similar (with an alias for backward compatibility), since that's what it actually is in labscript, and the only reason labscript needs to know about it since it makes the triggers. Otherwise, the user can set the exposure time by setting the appropriate attribute for the camera, and labscript doesn't need to know what the attribute is called. In the case that this corresponds to the exposure time, this is because the user has configured the camera that way - it is not something that is always true.
Removing these references to specific attributes would allow the code to be completely general.
Thoughts, @rpanderson?
Original comment by Russell Anderson (Bitbucket: rpanderson, GitHub: rpanderson).
Option (b) is good.
Regarding the exposure_time attribute: yes, labscript only needs to know about this in the context of a trigger width, but the two are not synonymous, and renaming it might cause confusion. The trigger width only corresponds to the the exposure time if the TriggerSelector, TriggerMode, and TriggerActivation attributes are set correctly.
See my comments to pull request #63.
Original report (archived issue) by Chris Billington (Bitbucket: cbillington, GitHub: chrisjbillington).
I was setting up a Point Grey Flea 3 camera with the imaqdx camera server, and a bunch of the attributes have different names than what the server assumes.
I'm not 100% sure how to go about fixing this, but I'm told perhaps some sub-part of the attribute string is universal, so perhaps the correct attribute can be found for a particular model by looking at all attributes and looking for that sub-part.
Here's the changes I had to make to get it working. The exposure time attribute has no parts of the string in common with what the server was previously assuming it to be, though I haven't confirmed I can actually change the exposure time with this attribute, haven't gotten that far yet.
Anyhow flagging this as inadequate, we need a better solution, hopefully something better than hard-coding attribute lists by camera model.