PYMEAcquire camera dtype support#1624
Conversation
|
If we are adding support for non uint16 data types then it should be across all backends (or, at the very least, we should make sure we raise an informative error if the backend doesn't support it). We should also have a mechanism for disabling un-supported backends so they don't show in the GUI (or, alternatively potentially doing type coercion - but that has some potential data loss issues). At a minimum I think it we need to build some data-type awareness into the Because (for now) it's just your special case that uses non uint16 dtypes, we might not need to worry to much about the UI, but the |
|
Suggest we also use actual numpy dtype objects rather than strings for the dtypes (we can cast in the constructor, so it will accept both) so that comparisons between, e.g. 'u2' and, 'uint16', and '<u2' etc evaluate correctly. |
|
|
||
| _min, _max = minmax_u16(dsa) | ||
| # get min and max efficiently if it is uint16 | ||
| if str(dsa.dtype) == 'uint16': |
There was a problem hiding this comment.
A bit wary about string comparisons on dtypes - maybe
| if str(dsa.dtype) == 'uint16': | |
| if dsa.dtype == np.uint16: |
|
Thanks for the comments, @David-Baddeley ! I changed the type of the I also added As an aside - if Time/Blinking series is selected we probably want to grey out 'Memory' backend in the UI unless we change its support. |
9b35037
into
python-microscopy:master
Addresses issue encountered in #1463 and #1551 , which is that PYMEAcquire currently forces uint16. This PR allows cameras to use float (e.g. reading voltages off an NIDaq for my raster scanning project) or different int bit depths. This is split out from #1551 to simplify review.
Is this a bugfix or an enhancement?
enhancement
Proposed changes:
SpoolController.HDFBackend. Note thatMemoryBackendalready takes dtype as a parameter, andClusterBackendalready handles other data types throughPZFFormat.dumps.Notes
fakeCamframes to float.FakeFloatCamera