Clarify and document CTMU temperature calibration logic

Open Beginner friendly
#272 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
72/100
Issue type
Refactor
Clarity
Clearly specified
Activity status
Quiet
Tech stack
python
Domain
embedded-iot

Research direction

Start in pslab/sciencelab.py at ScienceLab.temperature and trace the CTMU current-selection, ADC-channel, and unit-conversion constants. Rename or centralize the calibration parameters and document each remaining constant's purpose and units without changing behavior. Done means the calibration logic is unchanged but its values and naming are clear enough to audit.

Written by the indexing model from the issue text.

Description

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
Dominant language
Python
Stars
1.6k
Forks
242
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from fossasia/pslab-python

All issues in fossasia/pslab-python

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.