ISISNeutronMuon / ISISNeutronMuon/InstrumentScripts

SANS: Handle leading/trailing whitespace in sample position strings

Open Beginner friendly
#120 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
4
Forks
8
PR merge metrics
No merged PRs in 30d

Description

Users occasionally edit measurement scripts manually and enter sample position strings with leading or trailing whitespace, for example: " 1CB" or
"1CB ". This is easy to do inadvertently and is often intended for readability rather than representing a different sample position.

Currently, when a position string contains extra whitespace, it is not recognised as a valid sample position. The issue is only detected when the script attempts to move the sample changer. At that point, the command is silently ignored because the requested position is not found in the list of valid positions. The run continues, resulting in fewer samples being measured than expected.

This behaviour is particularly problematic for unattended, overnight measurements, where users may only discover later that part of the sample sequence was skipped.

Contributor guide

No contributing guide indexed for this repository

Research direction

Trace the SANS sample-position validation and lookup entry point; the issue does not name a file or test. Reproduce the behavior with positions such as " 1CB" and "1CB ", then verify that surrounding whitespace no longer causes a requested position to be skipped and that the existing validation coverage passes.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
tooling
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.