Repository navigation
Fix wrong numbers in four-point and van der Pauw files - #30
Merged
Merged
Conversation
A user with any stored section got factory defaults for every other section, not the shared settings. Storing one key was enough: ticking "Don't show this again" on the voltage warning moved the next run's data to the default folder and turned compression off. Effective settings are now the factory defaults, then the shared section, then the user's stored keys, merged per key. The machine-local keys are still applied last.
F84 Table 3 ends at S/D = 0.10, and its last row, 4.171, was returned for every smaller disc: 25 % high for a 5 mm disc on a 1.016 mm probe. A circle past the table now uses the image solution the table was computed from. Squares and rectangles used straight lines between the sparse rows of the Smits table, up to 1.6 % low, and the D/s = 40 value for anything wider. They now use the image series at every size. The printed rows agree with it to 6 parts in 10 000. A sample the probe does not fit on has no factor. It was given the value of the smallest tabulated sample.
With one function sensed, the other element of a reading is not a measurement. The rows took it for an echo of the programmed source level. On a 2420 it was not one: after the level changed it approached the setpoint by a fixed fraction per reading, 20 % of it on the first row, while the measured voltage was steady. Four-point V/I started five times too high and a 20-sample run averaged 55 % high. Four-point, source-I and source-V rows now record the level that was sent. Three more ways a row held a number that was not what it claimed: - On the F84 path the sheet resistance was rho / t, which is NaN with no thickness entered. It is F2 * V/I when there is no thickness. - With auto range off, the accuracy lookup inferred the range from the reading while the instrument sat on the range that holds the compliance value: 1 mV on the 20 V range was given the 200 mV range's specification. The lookup now takes the pinned range. - The four-point current is sourced, and its uncertainty came from the measurement table. It now comes from the source table, in the rows and in the per-spot instrument floor. An overflow reading (9.9e37) no longer yields a resistance or an uncertainty.
Two four-point files with identical headers held different numbers, one of them NaN in every row, and nothing in either said why. The header left out what decides how a row is acquired and computed. The header now records: - the averaging filter as sent: enabled, and when it is, type and count - for four-point, the method (f84 or legacy) and the inputs that choose it: diameter, geometry, temperature, dopant type; and delta mode - for resistance, the cable null subtracted from R_ohm Sweep and van der Pauw headers lose sampling_rate_hz and settling_time_s, which neither mode uses. Every footer gains end_reason. The marker above it reads "run completed" for a run that ended on a read error too. CSV floats are written with ten significant digits, as the HDF5 writer does. Six dropped the instrument's last digit, and wrote an elapsed time past 28 h to the whole second. A four-point delta run and a van der Pauw run send a repeat filter whatever the profile asks for. A moving filter would average the two polarities of one reading together.
The next reading was scheduled from when the last one came back, so the read time was added to every period: 10 Hz asked for with a 50 ms read ran at 6 Hz. It is now due one interval after the last was requested. A row's elapsed_s is the middle of the read that produced it, not the moment of the request. The VISA timeout was a flat 5 s, and 1 s per point for a sweep. Slow settings (10 PLC averaged ten times with auto-zero is 5 s a reading) timed out every read and the run ended with no rows. Both are now sized from the timing model: three readings for a sample, and every point's conversions plus its step delay for a sweep's bulk read. After a failed sweep read the instrument is sent a device clear and :ABOR, since its sweep engine may still be stepping the source. A sweep of more than 2500 points is refused before any command is sent. The trigger count cannot hold more; the instrument rejected it, kept a count of 1, and the log called the one point a completed sweep.
A run with every reading in voltage compliance finished as a normal result: 22 662 ohm/sq, homogeneous, completed, with nothing in the file to say the voltages were the limit and not the sample. Two geometries with the sense leads reversed halved the sheet resistance with every check passing, because Q took absolute values and the sum did not. A result now carries valid and invalid_reason. It is invalid when any reading was in compliance (status bit, or at 99 % of the limit) or when the readings disagree in sign. The numbers are kept for diagnosis, homogeneous is false, and the resistivities are NaN where the sheet resistance is. Rows gain a compliance column and the footer names the readings. The Qt panel, the vdp_result event, the desktop view and the run summary all say INVALID with the reason. The summary used to report such a run as not homogeneous at 0 % asymmetry. Also in the van der Pauw run: - Each raw reading is checked for overflow before averaging. One 9.9e37 among five slipped past as a mean of 2e37. - A row the file does not take ends the run as write_error. - The statistical uncertainty is taken between the two readings of each reciprocal pair. It was the scatter of all four resistances, which differ by Q on any sample that is not square: 31 % on a noiseless Q = 3 sample. - With auto range off, the instrument term uses the pinned range. - The thickness box holds 1 nm. At six decimals of a centimetre a 15 nm film was rounded to 20 nm.
A spot whose mean was NaN printed "Inter-spot RSD: nan%", and one whose SD was NaN raised "Axis limits cannot be NaN or Inf". Such a spot keeps its place on the axis and is left out of the range and of the annotation.
Switching user left the previous user's values in any tab widget the loader did not know: four-point delta mode and its settling, and the whole sweep tab. The next run used them under the new user's name. Saving the Settings dialog reloaded the stored profile into the tabs and wiped what the operator had typed there. A four-point thickness or diameter going back to 0 changes which formula the run uses. One table of setters now covers every widget gather_settings_for_mode reads, and a test fails by name for a widget that has none. - Selecting a user sets every tab widget from that user's profile. - A Settings save changes only the tab widgets whose value changed in that save. - Load Profile restores every key Save Profile writes. It dropped the F84 inputs, delta mode, the sample count and the power limits. - The cable-null label reads the value a run would apply. It showed a null after the applied value had gone back to 0, and OFF for a null stored in the profile.
Export Summary recomputed the results from the tab's widgets at export time, with the legacy formula whatever the run had used, and averaged the raw V/I of compliance rows that the run's own statistics leave out. A saved spot with no value in a column was written as a mean of 0. The export and the saved-spot table now take Rs, rho and sigma from the rows the run produced, the header from the settings the run started with, and the statistics from session.spot_stats, so compliance rows are excluded and counted and a column with no value is NaN. The summary file changes with it: a legacy run writes K, an F84 run writes its method, dimension, geometry, temperature and dopant type where the model, K and alpha were, and there are rows for the sample and excluded counts. A one-sample spot has no SD. With auto range off, the live statistics and a saved spot's use the range the run was pinned to, as the file's footer does.
The pre-run current finder of 1.13.0 was never on this branch, so a profile with fpp_autoselect_current set ran at the seed current with no word. On a 100 kOhm sample that is every row in compliance where the release dropped to 1 uA and measured it. The procedure is session/current_finder.py, Qt-free: a delta probe at the requested current, a selection in calculations.py, and a Proceed/Abort prompt through RunControl with the output off. It runs after configure and before the file is opened, so the file name and the header carry the current used. The Qt window gets its checkbox, target-figures box and dialog back; the HTTP API and the desktop app get the prompt as fpp_current_decision. The setting is off by default. Three things differ from the release: - The probe never reads the CURR element. R is the reversal-pair mean over the programmed current. The release's 1 uA re-probe divided V by that element one read after a range change. - The probe drops the first reversal pair after a range change, and the run discards three readings after the final range and level are set, so the first row is not read through the probe's leftovers. - A target the limits cannot reach asks before running, with the figures it can reach. It used to run at 90 % of compliance without asking. The selected voltage is capped at half of compliance. The header records autoselect_current, and when it is on the requested current and the target figures. A fpp_current_selected event reports the choice.
The docs described rows and headers as they were: six-digit CSV values, a current column read from the instrument, a measurement accuracy on the sourced current, F2 from tables alone, elapsed_s at the request, and van der Pauw rows without a compliance column. The changelog gains the entries for the file changes, the van der Pauw validity, the current finder and the settings fixes.
A run started from the desktop app records this version in the file header as client.version, which is how its files are told from those of the 2.0.0-1 build installed in the lab in September.
ubuntu-latest became Ubuntu 26.04, and setup-python has no 3.9 for it: the job failed before it ran a test, on every push. Python 3.9 is still tested on Windows.
…gins The test answers each prompt a fixed half second after starting a wait_for call, and asserts that the call waited. Each call first builds a server and a client. On a slow runner that took longer than the half second, the answer landed first, and the wait came back at once with nothing left to wait for: two failures in three runs on Ubuntu with Python 3.10, each taking the six tests after it down too. The delay is now four times a measured call, and at least a second.
Checked on a 2420 with its output off: - A downward sweep sent its step as a positive number. The instrument refuses that (-222) and keeps the step of its reset point count, 2500, so a 0.5 V to 0 V sweep of five points stepped by 0.2 mV. The step is now sent with the sign that leads from start to stop. - Auto delay was turned on after the sweep's step delay had been set, which replaces it with 1 ms. The header recorded the delay asked for. A sweep no longer sends :SOUR:DEL:AUTO ON. The reverse leg of an up-and-down sweep was already right: swapping start and stop keeps the point count and flips the step. The simulator now refuses what the instrument refuses (a step away from the stop value, a trigger count above 2500) and models the two delay settings replacing each other. Its sweep used the step's magnitude and the direction of the span, which is how the wrong sign went unseen. The five sweep goldens are regenerated.
A setting the instrument refuses changes nothing and says so only in its error queue, which nothing read after configuration. A 2420 asked for 100 V queues -222 for the range and for the level and stays at 0 V; the run went on from there, and its header recorded 100 V. The queue is now read once configuration is done, in every mode. If it holds anything the run ends as configure_failed, with the instrument's own messages, before the output comes on and before a file is opened. Every configure sequence a run sends was replayed on a 2420 with its output off and left the queue empty.
Offset-compensated ohms halves the reading rate, and only a resistance run uses it. The profile keeps the flag whatever mode runs, and the settings preview and the run's read timeout counted it for every mode: a four-point run on the default profile was promised 0.9 Hz where the model gives 1.8. The Qt window already cleared the flag outside resistance mode.
- The current finder checked its own choice against the warn level only. With a probe current below its 1 uA minimum, 1 uA at the compliance can exceed the power stop (1 uA at 200 V against 0.1 mW); the run started and tripped on its first row. The finder now refuses such a choice as the configure step refuses such a request. - An overflow reading (9.9e37) was multiplied by the current and tripped the stop at 1e34 W. It is a compliance row, not a power. - The runtime warning is logged once a run, not on every row.
The source current in a four-point file name is milliamps to two decimals, so a 1 uA run, the current finder's minimum, was named ..._4PP_0.00mA.csv. Below the last current that form can show, the name now gives microamps: 1.00uA.
The fpp_current_decision prompt fell through to the generic dialog, which prints the prompt's detail as JSON. It now has its own: the verdict as a title, the backend's reason, and the measured resistance, probe and suggested current, expected voltage, noise floor and significant figures against the target, with Abort and Proceed. While a run is on, the Source current field shows the current the finder selected. The field is disabled while auto-select is on, as in the Qt window, and the toggle sits next to it.
The status document's four open items are brought up to date: three are closed, by the resistivity fix of October, today's power and rate fixes, and the lab's own files, which put the rate model within 3 % on the 2420. The watchdog delay still needs the lab PC. docs/outputs.md gets an example file written by the present code, with the header keys and ten-digit rows it now has. The settings and quickstart pages describe the four-point current finder.
The status shows a van der Pauw prompt as pending a moment before the run logs it, and the test read the log as soon as the prompt appeared. It failed once in CI on an empty log.
PEEKPerformer
force-pushed
the
stack/28-lab-data-fixes
branch
from
November 16, 2026 18:33
eeef493 to
862c6ec
Compare
PEEKPerformer
force-pushed
the
stack/27-trial-fixes
branch
from
November 16, 2026 18:33
a045540 to
3f0a17b
Compare
7 of 13 tasks
The code's version was held equal to CITATION.cff, which names the last archived release. So every 2.0 development build stamped its files with a 1.x software_version, the one a different program had written, and files from the two could not be told apart by it. The version is now the code's own: constants.py and pyproject.toml, repeated in the README. The desktop app bundles this backend and carries the same build in the semver spelling, 2.0.0-4; a test holds the two together. CITATION.cff stays at the newest release with a dated changelog entry, and is checked against that.
An installed build ran its backend in the per-user application-data directory, and a profile's default data_directory is relative, so every file went to %APPDATA%\edu.uconn.adamson.resistamet\ measurement_data: hidden, outside any backup, and found by the lab only by searching the disk. The shell now owns a data folder, the directory the backend runs in. It is Documents/ResistaMet until the user picks another, which the app asks for at first launch and shows under Settings > Files & output. The choice is kept per machine in the app-data directory, beside config.json, which stays where it was. A chosen folder that cannot be used at launch is not replaced silently: the backend starts in the default and the dialog says which folder was unavailable. Changing the folder restarts the backend and is refused while a run is in progress. Files already in the old place are left there and the dialog shows their path. The folder picker is tauri-plugin-dialog, called from Rust.
The Rust shell has 33 unit tests for its decisions: which backend to launch, where data goes, when the window may close. No workflow ran them. The desktop build now does, on both platforms. Cargo.lock had gone stale, most recently when the folder picker was added on a machine without cargo. The build does not pass --locked, so it re-resolved 71 packages and built with other versions than the ones committed, without a word. The lock file is the one that build wrote, and the workflow now fails when a build changes it, uploading the file to commit.
The folder picker, tauri-plugin-dialog 2.8, needs tauri 2.12, so the lock file now holds the crate at 2.12.6 while @tauri-apps/api and the CLI were at 2.11. The CLI refuses to build across a minor version, and the build of the previous commit stopped there. Earlier builds passed only because that check read the stale lock file before cargo rewrote it.
The test averaged seven periods against a limit. On a Windows runner the first was 0.32 s and the other six were right, and the mean went over. The old scheduling made every period long, so the median tells the two apart as well and does not fail on one slow start.
PEEKPerformer
had a problem deploying
to
github-pages
November 16, 2026 20:47 — with
GitHub Actions
Failure
Owner
Author
This branch had an error being deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Lab four-point files from a 2420 held numbers that were wrong while looking fine. A review of the measurement path that followed found more of the same kind. This PR fixes them and ports the four-point current finder, which this branch never had.
validandinvalid_reasonthrough the file, the event, both UIs and the run summary. Rows gain acompliancecolumn. The statistical uncertainty comes from the reciprocal pairs.end_reason. CSV floats have ten significant digits.elapsed_sis the middle of the read, read timeouts are sized from the settings, and a sweep over 2500 points is refused before anything is sent.fpp_autoselect_current, off by default), ported from 1.13.0 to the session layer so the window, the API and the desktop app all have it. It never reads the current back from the instrument, discards readings after a range change, caps the selected voltage at half of compliance, and asks before running at a limit.configure_failed, with the instrument's messages) before the output comes on. A 2420 asked for 100 V stayed at 0 V and ran, under a header that said 100 V.0.00mA.Documents/ResistaMet. An installed build wrote to%APPDATA%\edu.uconn.adamson.resistamet\measurement_data, a hidden folder the lab found only by searching. It asks at first launch and shows the folder under Settings ▸ Files & output.2.0.0rc4, and the desktop app carries the same build as2.0.0-4. It was held equal toCITATION.cff, so 2.0 development builds stamped files with a 1.x version. The citation stays at the last release.Cargo.lock. The Tauri JavaScript packages move to 2.12 with the crate.ubuntu-latest(26.04) cannot install, and three tests that raced the run they were watching now wait for it.mainis merged in. The branch forked before 1.13.0; it now has the logo, the window icon and version 1.13.1. Take the 1.13.0 current finder out of the Qt worker #31 at the bottom of the stack takes the 1.13.0 finder out of the Qt worker so the stack applies tomain.Stack
Part 28 of 28, the last. Targets
stack/27-trial-fixes. Merge bottom-up with Rebase and merge. This PR's tree isphase0/reviewable-baseline(d67e9a6) exactly.Type of change
Hardware testing
On a Keithley 2420 (firmware C30), with the output off throughout (2026-11-16): every configure sequence in
tests/goldens/scpiwas replayed and the error queue read after each command. All 16 leave it empty. The same session established the sweep findings above, that a trigger count above 2500 is refused, that:SENS:RES:RANGis accepted in manual-range resistance, and that an out-of-range source level is refused with-222and leaves the level at 0 V. The simulator now refuses what the instrument refused.Not run on an instrument, because they need the output on and a sample:
:SENS:AVER:TCON REP.Test suite
QT_QPA_PLATFORM=offscreen pytest tests/ -vpasses locally — 4344 passed, 51 skipped, 13 xfailed (desktop 167/167)Every commit passes on its own, apart from the API, GPIB-driver and end-to-end suites, which were run on the last commit and in CI.
How to verify:
Behaviour change
I,I_setandV_sethold the programmed level; four-pointI_unc_Ais the source accuracy.elapsed_sis the middle of the read.filter.*, and for four-pointparams.method,diameter_cm,geometry,temperature_c,dopant_type,delta_mode,autoselect_current; resistance gainsparams.cable_null_ohm. Footers gainend_reason.sampling_rate_hzandsettling_time_s.compliance; the footer gainsvdp_result.valid,invalid_reason,compliance,compliance_readings.:SOUR:DEL:AUTO ON.1.00uA).software_versionin a file is the backend's own (2.0.0rc4), no longer the citation's.Checklist
README.md/ version history if user-visible