Skip to content

Clarify and document CTMU temperature calibration logic #272

@Architrb1795

Description

@Architrb1795

Background

ScienceLab.temperature (in pslab/sciencelab.py) currently contains several hardware-specific numeric
constants related to CTMU current selection, ADC channels, and unit conversions.

While refactoring to remove inline "magic numbers", it became clear that some
constants require clearer naming or documentation to avoid ambiguity.

Problem

  • Calibration logic relies on numeric values whose meaning and units are not explicit
  • Naming ambiguity between "current source" and CTMU current range/index values
  • Lack of documentation makes calibration behavior harder to audit, verify, or modify safely

This ambiguity makes the calibration logic harder to validate and reason about.

Expected Outcome

  • Calibration parameters centralized and clearly named
  • Remaining constants documented with purpose and units
  • Behavior remains identical to the current implementation

Scope

  • No behavioral change
  • Refactor and documentation only

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions