ETHZ-TEC / RocketLogger

Official development repository of the RocketLogger project.
https://github.com/ETHZ-TEC/RocketLogger/wiki
BSD 3-Clause "New" or "Revised" License
14 stars 4 forks source link

Unable to Calibrate Rocketlogger with Generic SMU #80

Closed stevegtaylor closed 1 year ago

stevegtaylor commented 1 year ago

Calibrating a Rocketlogger with a generic SMU (other than Keithley 2450) generates an error in the conversion script

Traceback (most recent call last):
  File "/home/user/source/RocketLogger/script/python/./create_calibration.py", line 64, in <module>
    cal.recalibrate(CALIBRATION_SETUP_SMU2450)
  File "/home/user/source/RocketLogger/script/python/rocketlogger/calibration.py", line 552, in recalibrate
    measurement = [
  File "/home/user/source/RocketLogger/script/python/rocketlogger/calibration.py", line 553, in <listcomp>
    _extract_setpoint_measurement(
  File "/home/user/source/RocketLogger/script/python/rocketlogger/calibration.py", line 140, in _extract_setpoint_measurement
    measurement_sweep_start = np.min(measurement_sweep_bound)
  File "<__array_function__ internals>", line 180, in amin
  File "/home/user/source/RocketLogger/.venv/lib/python3.10/site-packages/numpy/core/fromnumeric.py", line 2918, in amin
    return _wrapreduction(a, np.minimum, 'min', axis, None, out,
  File "/home/user/source/RocketLogger/.venv/lib/python3.10/site-packages/numpy/core/fromnumeric.py", line 86, in _wrapreduction
    return ufunc.reduce(obj, axis, dtype, out, **passkwargs)
ValueError: zero-size array to reduction operation minimum which has no identity

@jmadden173

jmadden173 commented 1 year ago

I was a part of trying to calibrate this rocketlogger with @CSEsteve and would like to add a little bit more information. We were using v2 of the firmware and attempted to calibrate using a Keithley 2400 SMU. Since it does not have a way of inputting the number of sample points, so we tried setting the step size to get the specified number of points as specified in the calibration wiki (https://github.com/ETHZ-TEC/RocketLogger/wiki/calibration). If I recall correctly we used step of 0.099 V, 0.0198 mA, and 1.98 mA for voltage, low current, high current channels.

------- Original Message ------- On Friday, October 14th, 2022 at 4:29 PM, CSEsteve @.***> wrote:

Calibrating a Rocketlogger with a generic SMU (other than Keithley 2450) generates an error in the conversion script

Traceback (most recent call last): File "/home/user/source/RocketLogger/script/python/./create_calibration.py", line 64, in cal.recalibrate(CALIBRATION_SETUP_SMU2450) File "/home/user/source/RocketLogger/script/python/rocketlogger/calibration.py", line 552, in recalibrate measurement = [ File "/home/user/source/RocketLogger/script/python/rocketlogger/calibration.py", line 553, in _extract_setpoint_measurement( File "/home/user/source/RocketLogger/script/python/rocketlogger/calibration.py", line 140, in _extract_setpoint_measurement measurement_sweep_start = np.min(measurement_sweep_bound) File "<__array_function__ internals>", line 180, in amin File "/home/user/source/RocketLogger/.venv/lib/python3.10/site-packages/numpy/core/fromnumeric.py", line 2918, in amin return _wrapreduction(a, np.minimum, 'min', axis, None, out, File "/home/user/source/RocketLogger/.venv/lib/python3.10/site-packages/numpy/core/fromnumeric.py", line 86, in _wrapreduction return ufunc.reduce(obj, axis, dtype, out, **passkwargs) ValueError: zero-size array to reduction operation minimum which has no identity

@.***(https://github.com/jmadden173)

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>

lsigrist commented 1 year ago

Hi @CSEsteve, @jmadden173, from the information you provided, I can think two potential problems:

Measurement setup To match the predefined SMU2450 setups you should use steps of 100 mV V, 20 uA, and 2 mA (see also the definition of that specific measurement setup). Alternatively, you can specify your own calibration setup and pass that one to recalibrate. I think the RocketLoggerCalibrationSetup abstraction should allow for quite some flexibility.

Step to first/after last set-point measurement The above, however, does not explain your Python backtrace. With quite some guessing from my side, it seems that there is no large enough step before the first set-point and after the last set-point. Without a significant*) step before the first and after the last set-point measurement, the calibration sweep is not detected by the script. I suggest to check that when you trigger a calibration measurement the SMU "jumps" from a zero to the first extreme set-point on start and goes back to zero after the last set-point.

If this requirement is already satisfied in your measurements or the problem persists after doing so, it would help if you could share your calibration's measurement data for further debugging.

*) this is currently hard coded as twice the step size of the measurement sweep. This value should be reviewed, as I can think of setups with only few set-points where the sweep might not be detected (but this is likely not the problem here).

lsigrist commented 1 year ago

The latest release 2.1.0 provides improved calibration set-point detection. Therefore closing this for now. Feel free to (re-)open an issue in case of further questions.