Previous
For the piezo, raw value interval is fixed as 0..typemax(Int16) and this is mapped to user specified PIEZO_RANGES value
according to the rig_key as below
PIEZO_RANGES[rig_key] = (0.0μm .. 800.0μm, 0.0V .. 10.0V)
But, in this case, there is no way to map typemin(Int16)..typemax(int16) to (-400.0μm .. 400.0μm, -10.0V .. 10.0V) which
is required for 'realm' microscope.
Now
We can specify the raw value also as
PIEZO_RANGES[rig_key] = (-32768..32767, -400.0μm .. 400.0μm, -10.0V .. 10.0V)
note : raw range typemin(Int16)..typemax(int16) doesn't work. During the waveform validity check, it need to call
width(typemin(Int16)..typemax(int16)). But, it return 0 different from expected value 65536. But, the direct
value -32768..32767 works because the eltype of this range is not the Int16 but Int64 in this case.
0..typemax(Int16)
and this is mapped to user specifiedPIEZO_RANGES
value according to therig_key
as belowPIEZO_RANGES[rig_key] = (0.0μm .. 800.0μm, 0.0V .. 10.0V)
But, in this case, there is no way to maptypemin(Int16)..typemax(int16)
to(-400.0μm .. 400.0μm, -10.0V .. 10.0V)
which is required for 'realm' microscope.PIEZO_RANGES[rig_key] = (-32768..32767, -400.0μm .. 400.0μm, -10.0V .. 10.0V)
typemin(Int16)..typemax(int16)
doesn't work. During the waveform validity check, it need to callwidth(typemin(Int16)..typemax(int16))
. But, it return0
different from expected value65536
. But, the direct value-32768..32767
works because the eltype of this range is not theInt16
butInt64
in this case.