Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Remaining driver issues found while adding parameter value types

未关闭
#8,669 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
25/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
技术栈
python
领域
testing, tooling

调研方向

The issue lists affected driver behaviors, validators, helper annotations, and tests, but does not name their source file paths. Start by locating the named drivers and tests, then compare each validator or command with the manuals cited in the issue. Done means resolving the listed items with the needed compatibility or hardware checks; the issue spans many instruments and includes behavior changes that require domain knowledge.

由索引模型根据 Issue 内容生成。

描述

While adding Parameter[<value type>, Self] annotations to the instrument drivers in #8658, a
number of driver bugs were found and fixed (see the PR and its newsfragments). The issues below
were found at the same time but are not fixed yet, mostly because they change behaviour or
validator ranges that we cannot verify without the instrument.

Missing parameter annotations are tracked separately and are not listed here.

Bugs
  • Rigol DS1074Z: trigger_level in pattern mode does not send a channel. The
    MSO1000Z/DS1000Z Programming Guide (Dec. 2015) gives the pattern trigger level per channel:
    :TRIGger:PATTern:LEVel <chan>,<level> and :TRIGger:PATTern:LEVel? <chan>, e.g.
    :TRIGger:PATTern:LEVel CHANnel2,0.16. _get_trigger_level and _set_trigger_level build
    :TRIGger:<mode>:LEVel? / :TRIGger:<mode>:LEVel <value> from trigger_mode() for every
    mode, so no channel is sent in pattern mode. The other trigger modes (edge, pulse, video) are
    fine. A fix needs a way to choose the channel, e.g. a per-channel parameter.
  • Lake Shore 325: wrong output_range label for loop 2. The Model 325 User's Manual
    (rev. 1.8) says the loop 2 RANGE is 0 = Off, 1 = On (single range voltage output, up to
    2 W), but the driver maps 1 to "Low (2.5W)", the loop 1 label. Renaming the value to
    "On" would break code that uses the old label, so this needs a deprecation path.
Non-integer values accepted for integer settings

These parameters read back an int but validate with Numbers, so a float passes validation.
Switching to Ints (as done for the Keysight PNA averages, points and active_trace in
#8658) would reject it, but is a behaviour change.

  • CopperMountain M5xxx averages: Numbers(1, 999) with set_parser=int, so
    averages(2.5) silently sets 2.
  • AimTTi PL-P curr_range: Numbers(1, 2), so curr_range(1.5) sends IRANGE<n> 1.5.
  • Rigol DG1062 burst ncycles: Numbers(1, 500000), so a non-integer number of cycles is
    sent to the instrument.
  • Keithley 7510 average_count: Numbers(1, 100), so a non-integer count is sent to the
    instrument.
  • Lake Shore 372 channel dwell, pause, curve_number and excitation_range_number:
    validated with Numbers, so non-integer values are sent in the INSET / INTYPE commands.
Validator ranges that do not match the manuals

Not changed in #8658 since there was no instrument to test against.

  • Agilent E8267C pulse_width: allows 10 to 20 ns. The Keysight E8257D/67D SCPI Command
    Reference (D model) gives 10 ns to (pulse period - 20 ns), and the *RST value of 1 us is
    outside the validator.
  • R&S RTO1000 channel impedance: Ints(1, 100000), while the R&S RTO User Manual gives a
    real value from 0.1 to 100E+3 Ohm, so fractional values are rejected.
  • Keithley 2450 nplc: allows 0.001 to 10, while the 2450 Reference Manual gives 0.01 to
    10.
  • Rigol DG1062 (checked against the DG1000Z Programming Guide):
    • Burst ncycles stops at 500 000, the limit for internal trigger. With external or manual
      trigger the guide allows up to 1 000 000.
    • Burst time_delay has no upper limit, while the guide gives at most 100 s.
    • Burst idle accepts any number, while a user-defined idle level is an integer from 0 to
      16383.
    • Burst period starts at 3 us, while the guide's minimum is just over 2 us.
    • duty_cycle allows 1 to 99 %, while the guide gives 0.001 to 99.999 % for pulse waveforms
      and a frequency-dependent range for square waveforms.
  • R&S ZNB bandwidth: the Enum stops at 1 MHz, but option R&S ZNB-K17 allows IF
    bandwidths up to 10 MHz.
  • Keysight B1517A sweep:
    • power_compliance allows up to 80 W and current_compliance up to 40 A (the widest limits
      of all module types), while the B1500 Programming Guide gives Pcomp 0.001 to 2 W for the
      HRSMU (B1517A).
    • sweep_steps uses Ints(1, 1001), while WV allows 1 to 10001 steps.
  • Lake Shore 325:
    • PID allows 0 to 1000 for P, I and D, while the manual gives 0.1 to 1000 for P and I and 0 to
      200 for D.
    • CRVHDR can only be set for user curves 21 to 35, but the driver allows setting the header of
      any curve.
Wrong type hints on helper functions
  • Galil DMC-41x3: _set_relative_position, _set_speed, _set_acceleration and
    _set_deceleration are annotated val: str but receive int.
  • QDev QDac: _getsync is annotated -> float but returns the int sync output number,
    which also prevents annotating sync as Parameter[int, Self].
Smaller issues
  • Rigol DS1074Z trigger_mode has unit="V".
  • Keysight 34980A: for a module without a driver, the fallback submodule name
    slot_<n>_<model>_no_driver includes the model string reported by the instrument. Model names
    containing - are not valid identifiers, which triggers a renaming UserWarning.
  • Rigol DS4000 and Tektronix TPS2012 have no default_terminator, unlike most other VISA
    drivers. The tests pass terminator="\n"; whether the drivers should default to it needs
    checking on hardware.
Tests
  • tests/drivers/test_agilent_e8257d.py: the hardware-only TestAgilentE8257D
    (DriverTestCase) uses a status parameter that the driver no longer has (it is now
    output_enabled), so it would fail if run against an instrument. It is always skipped in CI.
  • tests/test_channels.py: the helpers _verify_multiparam_data and _verify_array_data are
    unused.
主要语言
Python
星标
466
派生
368
平均合并
10 小时 1 分钟
30 天内合并 PR
106

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

microsoft/Qcodes 的其他 Issue

查看 microsoft/Qcodes 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。