Skip to content

Latest commit

 

History

History
133 lines (123 loc) · 97.1 KB

PROJECT_PLAN.md

File metadata and controls

133 lines (123 loc) · 97.1 KB

JoystickPushTask: Project Plan

Living project record, last consolidated 15 Nov 2026; magnet driver updated 22 Nov 2026 (status synced with git history and the 2–13 Nov session data; earlier passes 5 Nov and 21 Oct). Permanent agent instructions (safety rules, working conventions, how to maintain this file) are in CLAUDE.md at the repo root (moved there from .cursor/rules/project-workflow.mdc on 15 Nov, which now only points to it); this file holds project state, history and decisions. Migrated from the legacy .cursorrules (removed). Where this file disagrees with older notes, this file wins. Older detailed notes live in git history. The repo is public: no private chat, people's names or purchasing/admin details here.

Overview

Head-fixed mouse 1D forelimb object-push task, forked from the Mathis joystick-pull LabVIEW rig (Mathis et al. 2017). Trial: forepaw on a capacitive rest pad, then release and push a joystick-mounted object forward into a target band, then auditory cue, delay, spout extends, water. Optional later: axial resistance from a Ledex solenoid. Entry docs: README.md, RIG_INVENTORY.md, MAGNET_COMMISSIONING.md, EVENTS_LOGGER_PLAN.md, parameters/README.md.

Snapshot (as of the last recorded notes; details in the sections below)

  • Architecture: see "VI architecture" and "Rig and DAQ".
  • Completed (per notes): rest-pad sensor (capacitive, mains-filter sketch confirmed in mouse sessions); EVENTS logger and auto timing file; water/cue/spout reward loop with clean Normal Stop; acquisition overrun fix (a 25–30 min no-animal run with rewards and clean Stop is recorded as done under the rest-pad entry); post and platform position final (20 Oct); Ledex checkpoints 1–4; Ledex FEMM/3D force models and rig-geometry explorer; Ledex holder/link printed and mounted, Ledex-off free-movement check OK (1 Nov); push-axis volts → mm for 0–8 mm (3 Nov). Built and in use (user-reported bench tests, details in their entries): trial start at paw release (Case 5, code 6; every session since 20 Oct), velocity reward mode with the smoothed 200-sample rule (column 28, sessions since 22 Oct; 200 ms start gate skipped), go cue on P0.2 (code 7, 29 Oct), reward on touch (column 29, code 8, bench OK 4 Nov; zuchon's sessions since 4 Nov); parameter-row mapping fix (5 Nov, short bench passed; check_row_mapping.py 0 row problems on the 6–13 Nov mouse sessions checked, see "Parameter-row mapping"); repeat trials (column 31; in anaconda and blackmamba sessions since 6 Nov, rows repeat after timeouts and advance on success as designed, confirmed from EVENTS); low-lag rest-pad sketch uploaded and bench-checked (user-reported, date not recorded); 15.1 mm cube and wide-window constrainer on the rig (user-reported 15 Nov, swap date not recorded).
  • Current objectives: (1) animal-free bench test of the joystick-only mode (30th column, code 9; never run: no code 9 in any EVENTS file through 13 Nov; see "Joystick-only sessions"); (2) unpaid successes and magnet-loop misses (both still 0–2 per session in 2–13 Nov; see Known bugs); (3) bench-test training files before their first mouse session (files run with mice are in the session map; many newer files ran without a recorded bench check); (4) decide whether to gate the go cue off in touch mode; (5) analyse the 20 Oct touch-and-release sessions (rewards, release timing, chatter); (6) record the formal release-clause checklist (timeout path, Normal Stop), which was never written up although the clause runs in every session; (7) chatter check (archive/restpad_chatter.py) on a session with the low-lag sketch; (8) re-measure push volts → mm with the 15.1 mm cube and wide-window constrainer (the 3 Nov scale predates both; user judged on 15 Nov that little changed and deferred the re-measure to after the stereo calibration, which will be more precise; treat mm values as approximate until then).
  • Remaining work: lock the Ledex holder (22 Nov: the body still shifts when the coil is on; supply unplugged, tighten fasteners, do not slide the body); then Ledex bench (spring curve, release and force tests, finish Checkpoint 5); LabVIEW magnet safety (guaranteed 0 V on all exit paths, logging) before any nonzero mag; metal joystick swap (see "Metal joystick" under the Ledex section: print fit_test, then the 27 mm cube and 3.45 mm collar, fit, re-centre home, Ledex-off hand check, volts → mm); movement-timeout path in Case 1 before a nontrivial start box; DataJoint changes (Boolean ai2, sensor type per session, trial start = pad release, codes 7–9); shielding/imaging-noise check; calibration items listed under "Task design".
  • Known bugs / open issues: unpaid successes (code 4 with no cue/water codes 10–18; counted from EVENTS 22 Oct; 2–13 Nov sessions: 6 in 29 sessions, 0–1 each, after the ITI/consumption changes): 3–14 per session in every 20–21 Oct touch-and-release session (e.g. zuchon 20 Oct 150 successes / 137 paid) and 1 in zuchon 22 Oct (trial 8, 298.8 s). Most come 1.5–1.7 s after the previous cue, while the water loop is still in consumption (ITI 1500 ms < cue + water + consumption ≈ 1.7 s), so the occurrence is lost; fix by ITI ≥ 2000 ms or making Case 0 wait for the water loop. 5 of them (incl. zuchon 22 Oct trial 8, loop idle for 180 s) happened with the water loop idle: cause unknown, same class as the magnet-loop miss; inspect both Wait on Occurrence nodes. Acquisition stalls (zuchon 22 Oct: sample count frozen ~6 s at 7.6 min and again near 28 min, then caught up; trial 12 lasted 5753 ms) make make_labview_timing.py refuse the session (its first, non-robust clock fit is pulled by the stall outliers; 1980 of 2116 events flagged); robust fit in make_labview_timing.py (24 Oct, committed ad6115a): nominal-slope start + iterative refit, and the 5 % outlier gate is a warning (the 100 ms reward-matching check stays fatal); it recovered zuchon_20261022_1 (worst mismatch 5.6 ms) and zuchon_20261023_1 (90.4 ms, close to the 100 ms limit because of long stalls: treat its video sync with care); outputs on the already-good sessions are unchanged (< 0.01 ms). Magnet loop can miss a trial-start occurrence (zuchon 16 Oct after a 328 s pause; zuchon 29 Oct #1 trial 98 with the loop idle ~8 s; still 13 misses over the 2–13 Nov sessions, 0–2 per session, e.g. anaconda 6 Nov trial 189; TRIAL row and codes 20/21 drop, make_labview_timing.py refused the 16 Oct session; since the 5 Nov fix a miss no longer shifts rows); parameter-row mapping was wrong before the 5 Nov fix (Case 3 used row n+1, water row n or n+1 by timing, a magnet-loop miss shifted everything by one; see "Parameter-row mapping"; mixed-row files with mice still need a bench run of push_bench_row-mapping.txt / push_bench_repeat-trials.txt with distinct rows, since all files run with mice since 5 Nov have identical rows); home shifts ~0.06 V on ai1 with the magnet on (slot home stop is 1.15 mm on the home side of neutral); code 99 sample ~0.3 s stale; pad lead ~40 cm (target < 30 cm); deferred check of head-fixation clamp to AI GND.
  • Go cue, bench status (29 Oct): second buzzer wired (reported by user: P0.2 / terminal 49, 1 kohm series, D GND terminal 15; NI-MAX task GoCue_Dev1) and a stand-alone test VI go_cue_burst_test.vi (not in the repo) fires a burst audibly (user-reported). Chosen settings: 1 ms on / 1 ms off x 50 (nominal 100 ms). Unverified: actual burst duration (DAQmx write and Wait (ms) overhead on Windows may stretch it), whether it sounds as a tone, mouse audibility (buzzer is 2 kHz per Adafruit or 4 kHz per DigiKey, unmeasured; CBA/CaJ thresholds ~63 dB SPL at 2 kHz, ~38 dB at 4 kHz). The buzzer stops oscillating when its hole is touched or covered (restarts after the line is cycled); never cover it. Built into Push Behaviour_MCHALABI.vi (29 Oct; user reports the animal-free bench test passed and the first mouse session with it "went super well", no details recorded): third While loop (copied from the test VI) waits on a new occurrence (Generate Occurrence outside the loops, timeout 1000 ms, timed out? through Not into the Case selector); True case runs the burst (For loop N = count, write T, wait on ms, write F, wait off ms; controls on ms/off ms/count/DAQmx task name GoCue_Dev1, defaults 1/1/50) and logs EVENTS code 7 (go cue burst start, value 0); Set Occurrence sits in Case 0 in the frame that sets next state 5 (end of the home TO hold); the loop's stop reads a local of the main stop button. Still to check from the data: actual burst length, code 7 present in EVENTS once per gate pass, order 7 then 6 then 4 in hold-and-release sessions and whether go and reward cues overlap, line left LOW at startup and Stop. Purpose (28 Oct design): signal at the end of the pad hold, not on release, that the cube is pushable; burst modulation gives a different timbre from the reward cue (an active buzzer's pitch is fixed).
  • Key technical decisions: capacitive pad (Arduino Nano, 0/5 V on ai2) over FSR and other sensors; plunger linked to the joystick shaft (not a washer target); proportional Bürkert 8605 0–10 V driver (the PVA dither could not be turned off; not a binary switch); Read stays 10 samples; EVENTS file is the source of truth for trials and rewards; trial start/move time at pad release (Case 5).
  • Validation status: only items stated as bench-validated, confirmed, passed or run in the sections below are verified. Anything marked pending, built, planned, untested or uncommitted is NOT verified. Record new results in the relevant section and here.

Rig and DAQ

  • NI PCIe-6321, SCB-68A breakout (terminal map in RIG_INVENTORY.md). Saved NI-MAX tasks are incomplete; audit inline channels. NI-MAX backup: ni-max/JoystickPushTask_NIMAX_2026-08-20.nce.
  • Channels:
    • AI task joysticklickframe_push, continuous 10 kHz, order ai1 (Y = push, white, queue idx 0), ai0 (X = lateral, red, idx 1), ai2 (rest pad, RSE 0–5 V). joystick pos = Y, X, 0, rest pad (idx 3, the slot the lab DataJoint layout calls FSR).
    • AO0 MagnetPush_Dev1 (Ledex via Bürkert 8605; PVA unwired spare); AO1 LickSpout_Dev1 (Actuonix L12-30-50-12-I, 0–5 V, own 12 V PSU).
    • DO Water_Dev1 P0.0; SuccessCue_Dev1 P0.1 (terminal 17, D GND 15; Adafruit #1536 buzzer); GoCue_Dev1 P0.2 (terminal 49 through 1 kΩ, D GND 15; second #1536). P0.3–P0.7 free.
    • frame counter_Dev1 on PFI8 (ctr0); pulse out ctr1 on PFI13 at 50 Hz. Camera runs on the rig PC.
    • Rest pad terminals: +5 V terminal 8, ai2 terminal 65, AI GND terminal 64.
  • avg joystick and frame trig lick3.vi acquisition loop: Read stays 10 samples (1 kHz logged), input buffer 100000 installed, in-loop stop in Value property node deleted, stop all global (PushTask Globals.vi) drives all loops. Earlier -200279 overrun is provisionally fixed; a 25–30 min no-animal run with rewards, stopped cleanly, is recorded as done in the rest-pad entry below (an older note said still to be reported; confirm it included rewards). Do not switch Read to 100 (also in the agent rule).
  • Do not run two simultaneous AI tasks (one AI timing engine). 1 MΩ source impedance ghosts ai0 onto ai2 on this multiplexed ADC.
  • Data on the rig: C:\Users\Mathis_Lab_1\Desktop\RIG1_DATA (joystick_, REWARD_, TRIAL_, EVENTS_, TIMESTAMPS_LABVIEW_). Python 3.6.4 at C:\Users\Mathis_Lab_1\AppData\Local\Programs\Python\Python36-32\python.exe.

Current status and history (rig, sensor, mice, magnet, parameter files; last edited 22 Oct 2026)

  • Rest-pad sensor (capacitive, installed and bench-validated 14 Oct). Arduino Nano (classic ATmega328, not Nano Every) + 10×10 mm copper-tape pad under one layer of tape + 10 kΩ pot (sensitivity knob). Sketch arduino/touch_pad/touch_pad.ino, wiring and calibration in arduino/touch_pad/README.md. Output is push-pull 0 V / 5 V on D2 into ai2 (terminal 65; 5 V = touch; low impedance, no X ghosting); Nano powered from rig +5 V (terminal 8), GND to AI GND (64); unplug USB when running from the rig. rest pad threshold 2.5 V (default saved in the VI, 3fe0e0f); Case 0 starts only with pad touched AND joystick home. Re-tare the knob (hands away) after any change to the pad or its cover. Normal Stop clean; 25–30 min no-animal run done.
  • 50 Hz chatter (found in mouse session 1, 16 Oct). With the paw on the pad, ai2 toggled every ~20 ms (high ~13 ms, low ~8 ms; 10,572 touch episodes, only 87 ≥ 100 ms) whenever the knob put the threshold near the paw signal (mostly from minute 16 on, when trial starts stopped). The period drifts against the DAQ clock, so it is mains hum picked up through the mouse, not the camera pulse train. The knob cannot fix it. Sketch fix uploaded, bench-tested and reinstalled on the rig (16 Oct, ai2 ~0 / ~5 V in NI-MAX): readings averaged over exactly one mains period (20 ms, decision every 10 ms), OFF_FRACTION 0.5, touch hold 20 ms, release hold 40 ms, Serial Plotter ripple field. New timing: touch-on ~30–50 ms, release ~50–60 ms. archive/restpad_chatter.py joystick_<name> (moved from scripts/ 18 Oct) reports chatter per session (session 1 baseline: 210 chatter seconds, 0.8 % of episodes ≥ 100 ms).
  • Mains-filter sketch confirmed in mouse sessions (16 Oct, zuchon and blackmamba): 0 chatter seconds, touch episodes median 1.2–1.7 s, ≥ 99 % of episodes ≥ 100 ms (anaconda, old sketch: 210 chatter seconds, median 13 ms). Pad sensitivity, sketch and position are final. Deferred: check with the Fluke whether the metal head-fixation clamp is connected to AI GND 64; if not, add one wire clamp → 64 and compare ripple with and without (do this if chatter remains).
  • Low-lag release sketch (9 Nov; committed a3a15b3; uploaded to the rig Nano and bench-checked, user-reported 15 Nov; upload date, so which sessions used it, not recorded; release lag not measured on the rig; no chatter check from a mouse session yet). User sees a clear lag between real paw lift-off and ai2 going low. The 16 Oct sketch needed ~50–60 ms: 20 ms boxcar crossing (~15 ms), decisions only every 10 ms (0–10 ms), 40 ms release hold. Not changed by hardware (clamp-to-GND declined). The new sketch keeps the exact one-mains-period mean, but splits each reading across 2 ms bins weighted by its duration (touched readings last several ms; without the weighting, simulation showed hum-driven early releases), decides every 2 ms, has RELEASE_HOLD_MS 4 (was 40), keeps the baseline step at 10 ms, and leaves thresholds, knob and TOUCH_HOLD_MS 20 unchanged. Offline simulation (synthetic 50 Hz hum, throwaway script, not in repo): median release lag ~16–21 ms vs ~48–55 ms for the old logic; 0 false releases in 60 s of touch with hum up to the size of the touch signal at 49.5–50.5 Hz. Both sketches fail only when hum peaks would exceed the sensor's 3100-count timeout, which the real Nano reports as a fault. Next: check a mouse session with archive/restpad_chatter.py for chatter; raise RELEASE_HOLD_MS (10–20) if chatter appears. Sessions before the upload (at least up to 9 Nov) have the ~50–60 ms release lag.
  • Open items: water-drop/licking check on the rig with the spout extended; pad lead is ~40 cm plain wire (target <30 cm); shielding deferred (2-photon first, ephys uncertain; compare imaging noise with the sensor on and off at the first imaging session).
  • Data impact: joystick-file column 4 (ai2, joystick pos idx 3) is a ~0 V / ~5 V touch signal (switch lag ~30–50 ms on, ~50–60 ms off with the 16 Oct mains-filter sketch, ~15–20 ms off expected, from simulation, with the low-lag sketch now on the Nano; no force information); file layout unchanged. DataJoint must treat it as Boolean for new sessions and record the sensor type (fsr402 or capacitive) per session; no other DataJoint change needed (column renamed fsr→rest pad).
  • Rejected for good: AT42QT1010 (recalibrates after ~60 s), Omron E2K-F (too big), M12/M18 industrial sensors, load cell (fallback only), SingleTact and FlexiForce. Earlier FSR 402 history: archive/FSR_rest_pad_history.md.
  • Mice (back on water restriction Wed 14 Oct). Thu 15 Oct: ~25 min head-fixation per mouse at 4 µl rewards (habituation to the smaller volume; earlier 8 µl). Fri 16 Oct: first rest-pad hold + micro-push session for 3 mice (numbers below from the files; 4 µl rewards):
  • anaconda (02_micro_push_day1_restpad.txt: home 2.47–2.56, success < 2.47, home TO 100, ITI 2000; 29 min): 37 rewards / 161 trials (23 %), 31 of them in the first 15 min; trial starts stopped after ~20 min (old sketch, 50 Hz chatter). Home lower bound = success bound, so trials starting at ~2.47 V succeeded on noise (2 rewards with a 3 mV excursion). In 28/37 rewards the pad stayed touched during the push (other paw, or paw on cube and pad together, cube was in the middle hole).
  • zuchon (_home2p44.txt: home 2.43–2.52, success < 2.43, ITI 2000; 28 min; _2 is a 10 s false start, discard): 4 rewards / 85 trials, all four the intended sequence (pad released 150–390 ms after trial start, then push). Joystick/cube moved during the session (home drifted 2.45 → 2.47 V; needed ~40 mV push). From minute ~11 the paw never returned to the pad (no touch for the last 16 min) and kept pushing the cube (45–52 push bouts per 5 min, 197/204 outside trial windows): cube too close.
  • blackmamba (_home2p475.txt: home 2.475–2.51, success < 2.47, home TO 50, ITI 1500; final position; 34 min): 19 rewards / 250 trials (7.6 %; user recalled ~37), rising later (14 after minute 17). 12/19 rewards with the pad released first (0.1–2.8 s), 7 with the pad touched throughout (check video). 169/231 failed trials: paw rested on the pad for the whole 3 s window. 179 push bouts (median 78 mV, ≫ the 16 mV needed), only 29 inside trial windows; most outside pushes had no pad touch in the second before (paw went to the cube without a pad hold). All 250 rows of the file were used (last trial at 34.0 min).
  • Next: next session in the final position with _home2p475 settings but a longer file (≥ 500 rows; check what the VI does past the last row) and consider move time 3000 → 5000–8000 ms (pushes starting within 3 / 5 / 8 s of trial start in blackmamba: 17 / 28 / 40 trials). Check video for pad-touched successes. Water earned is small (≈ 150 / 16 / 76 µl), so supplement to the daily allowance.
  • Data issues: zuchon's magnet loop missed trial 84 (after a 328 s pause: no code 20/21, TRIAL file 84 rows vs 85 trial starts in EVENTS), so make_labview_timing.py refuses that session; anaconda and blackmamba timing files build (drift +4.5 ppm, worst mismatch 6–8 ms). Find the cause (magnet-loop Wait on Occurrence) before any nonzero mag. Joystick/cube position: 16 Oct record was 6 mm from the platform edge and 7 mm from the rest-pad edge; after the 20 Oct post/platform move and the 1 Nov Ledex mount the cube at home is 2 mm from the rest platform (3 Nov, user). Reuse the current distance on any other rig or mount. Changes made during/after it: the cube is mounted in the hole nearest the rest pad (not the middle hole) so the paw cannot touch cube and pad together; the rest pad moved slightly to the right so only the right paw can reach it. Remeasure home voltage after these moves. Stage-1 procedure, if used instead: use only deliverWater_RIG1_cue.vi (50 ms cue then water), Water on time (ms) 240 (~8 µl), extend spout to 3.0 V before the first reward and retract to 0 V at the end (that VI does not move the spout). Keep the push VI closed. Cap 25 min and the approved water limit; stop when licking fades; tally rewards. Pad-contact shaping fallbacks 01_pad_contact_shaping_50ms.txt / _250ms.txt (home TO 50 / 250 ms, otherwise identical) are untested with the capacitive pad; do a bench check first. First pilot (28 Sep) and shaping attempts showed contact activation was too rare for contingency learning.
  • Ledex 195224-230 + PVA 1.6 (0–10 V), following MAGNET_COMMISSIONING.md. Checkpoints 1–4 DONE (11 Oct). Mechanical mount (1 Nov 2026): holder, window constrainer, collar, link printed and installed; home stop is the 1D-axis constrainer (not a separate shim). Wide-window constrainer (2 Nov CAD; printed and fitted on the rig, user-reported 15 Nov, date not recorded): mechanical/joystick-1d-axis-constrainer/..._ledex_wide_window (+ make_wide_window.py) replaces the 16 mm window: home wall open over the full 26 mm cavity width from the frame top (Z 25.41) to the ceiling, socket ring closed at the bottom; the 16 mm window part is archived. rig_geometry.py updated (ARCH_HALF_W 13, new file name); static clearance check passes, the moving-parts check and the explorer/figures were not rerun (matplotlib missing). Ledex-off hand check on the 1 Nov mount (16 mm window): full return to home, no binding or collisions (Checkpoint 5 partial); repeated on the wide window and 15.1 mm cube on 15 Nov (user-reported, Ledex off, plunger linked): no collisions, no binding, full return to home, no new sideways play; maximum stroke not measured (far beyond any mouse push). ai1 volts → mm measured (3 Nov, user, current mount): home ~2.47, 2 / 4 / 6 / 8 mm = 2.425 / 2.365 / 2.305 / 2.235 V; fit 0.0295 V/mm (33.9 mm/V, R² 0.995), slightly steeper further out (0.0225 V/mm over 0–2 mm, 0.035 over 6–8 mm); details and figure in calibration/joystick-volts-mm.md. At home the cube is 2 mm from the rest platform (replaces the 16 Oct 6 mm record). Not yet measured: 10 / 15 mm. The 3 Nov scale predates the 15.1 mm cube (taller, so a higher contact point) and the wide-window constrainer: re-measure before relying on mm values. Release test, Ledex off, plunger linked (15 Nov, joystick_springtests1, push VI with a bench file, pad untouched, 0 trials; analysed by the agent with scratch scripts, not in the repo): 17 hand releases from 2–37 mm (deepest hold 1.10 V below home, about the modelled 36.3 mm slot limit); every return reached home in 22–71 ms (peak up to ~2 m/s), overshot to about −1 to −2 mm (the modelled home stop is −1.17 mm) and settled within ±3.6 mV of the session home (2.4775 V): passes the ±0.035 V criterion. Spring force not yet measured: the finger holds the mouse-side face, the cube returns toward it and drags on it for the first 10–40 ms, so the release data give only a lower bound (energy fit ≈ 1.0 gf/mm, no clear preload, with the model mass); free-segment fits are unidentifiable. Next: static spring curve with weights (thread at the cube's mid-height pulled forward over a smooth rod to a hanging cup; weights or coins weighed on the 0.01 g water-calibration balance; record ai1 per load, loading then unloading for friction), which needs neither the mass nor a force gauge; weigh the cube (slides off the shaft) to replace the solid-PLA mass assumption. Then powered hold/release and force at 5 V / 10 V; complete Checkpoint 5; LabVIEW magnet safety before any nonzero mag. Powered check (15 Nov, user-reported, NI-MAX Test Panels, no VI, no animal): coil 22 Ω across C/A (top of the 18–22 Ω band); coil now directly on C and A; Enable wire J joined to D (the D socket was full, so the clip was dropped; the supply plug is the only hardware kill, so the supply is plugged in only while ao0 is at 0 V and unplugged for any DAQ start or stop; a switch in the J line is planned). At 0 V: LED green, 0 A, cube does not move, ai1 home ≈ 2.49 V. Short pulses at 1 V and 5 V worked, and a higher resistance to pushing was felt at the cube (so the pull is toward the mouse: direction OK by feel). Problem: the whole cube vibrates whenever the coil is on (user-reported, after repositioning the parts). Cause (from the PVA 1.6 datasheet, hydraulikshop.ch/ftp/PVA_1.6_0919.pdf): the PVA adds a 100–500 Hz dither to the coil current to break valve-spool stiction; its fifth (bottom) trimmer sets only the dither frequency, so dither cannot be switched off. Checkpoint 4 did not show it because the plunger was seated (12.8 N hold). Turning the dither trimmer to its high end (≈ 500 Hz) reduced the vibration but it is still clearly felt. This is an experimental confound, not just a nuisance: mouse forepaw mechanoreceptors detect 100–1000 Hz vibration, so the animal could detect perturbation trials by vibration rather than resistance. Decision (15 Nov): replace the PVA with the Bürkert Type 8605 DIN-rail driver (316532) because the PVA dither cannot be switched off. Swapped 22 Nov (user-reported, animal-free, NI-MAX Test Panels, Dev1/ao0 only). The datasheet screw numbers do not match this unit. Silkscreen, front left to right: +24V, GND, SP-, SP+. Back left to right: V+, V-. Landed: fused Goobay 12 V+ → +24V (that screw is the 12–24 V input; the supply stays 12 V), 12 V− → GND, SCB 55 → SP-, SCB 22 → SP+, Ledex leads → V+ / V-. The old Enable lead is not connected. The 1 A fuse stays in the 12 V positive. There is no Enable input: unplug the Goobay before starting or stopping the AO task. Menu, saved through End: InP 0–10 V, CUt 2.0 %, VALV 2871 HI (1400/1500 Hz pair; VAdJ left unchanged, the display text was not read back), AdJ LO 130 mA / HI 220 mA (the valve defaults; HI could not be set to the planned 300 mA), dELY 0.0 s. Display 0.0 at a 0 V command. Burkert display current: 1 V → 138.8 mA, 5 V → 175 mA, 10 V → 220 mA. At 10 V, 4.5 V DC across V+–V-. The plunger did not move until the link was found disconnected and refitted (cone inside, slotted end toward the shaft); the user then reported the push feels stiffer with the coil on. Vibration after that reconnect was not separately recorded. Holder not locked (22 Nov, user): a modest push with the coil on shifts the Ledex and the holder, so the joystick can move the whole assembly. Next: supply unplugged, tighten the base M6 screws, the upright M4 screws and the carriage M3 screws without sliding the body along the slots, then repeat a 0 V and a 5 V push. Still open: gram-scale force, release at 0 V from a held push, home shift on ai1, heating, coil whine. PVA kept unwired as the spare. mag stays 0 until the holder is fixed and the LabVIEW magnet safety is done. Moving mass (26 Nov model, metal joystick + 27 mm cube; not built yet): effective mass at the cube 6.5 g (6.1–6.8 g over pivot depths 20.3–28.3 mm): cube 3.5 (solid PLA), plunger and link bar 2.5 (20.1 g × lever ratio 0.35²), metal joystick 0.4 (measured 1.6 g), collar 0.07. The rig's printed shaft + 15.1 mm cube gave 5.1 g (15 Nov). The cube is printed in Bambu Basic PLA, probably with sparse infill, so its real mass is likely lower.
    • Wiring (verified): 12 V Goobay + → 1 A ESKA fuse (TC-R3-32AA1 holder) → D, − → F; SCB 22 → H, 55 → G (twisted); coil on C/A (no polarity); Enable J on a wire with a clip that is clamped on the D screw to enable and removed to disable. K, M, E empty. Supply 11.91 V, LED red when disabled. Leave the supply unplugged and the clip off between tests.
    • Trimmers (left to right, from the datasheet legend): rising ramp, falling ramp, Imax (3), Imin (4), dither. Imin and Imax are ~30 turns counterclockwise (slip clutch, no hard stop); counterclockwise = minimum confirmed for Imin (≤ 0.006 A at 0 V with Enable on).
    • Coil current vs AO0 (plunger seated, cold, 2–3 s pulses, Fluke 10 A DC in series): 0.5 V 0.053, 1 V 0.074, 2 V 0.106, 3 V 0.121, 4 V 0.147, 5 V 0.180, 6 V 0.201, 8 V 0.273, 10 V 0.310 A. No sound or heat, clean release. 0.58 A cannot be exceeded at this Imax, so no command clamp is needed for current; Imax stays at minimum for now (raise clockwise in small steps only if more force is needed).
    • Pulse method used: set ao0 in NI-MAX Test Panels (Analog Output tab, Dev1/ao0, never ao1) with Enable off, clip on D for 2–3 s, unclip, back to 0 V, 10 s off. Measure H–G resistance only with the SCB end disconnected (a live ao0 makes the Ω reading fluctuate). Move the Fluke red lead back to VΩ after current tests.
    • Plunger: 60° (cone-ended) type; the cone end goes inside against the matching taper and the plain pull end protrudes (tip still protrudes when seated); never reverse it, never run it loose. Without the plunger no pull could be felt even at 10 V. Design chosen: plunger linked to the joystick shaft (see "Plunger link"); the washer target is rejected (re-checked on the measured rig, 15 Oct).
  • Datasheet (STA 20 × 40 mm pull, 30 AWG, 1491 turns; PDF and digitized 60° curves in simulations/ledex_femm/datasheet/): seated holding force 12.8 N (60°) at 0.57 A; plunger pull at 0.57 A 5.35 / 3.38 / 2.14 / 0.78 N at 1.5 / 3 / 5 / 10 mm stroke. Seated pull end is 23.81 mm beyond the body face (M14 boss 9.52 mm on the plunger side). Nothing is published for an external target.
  • Ledex force models (simulations/ledex_femm/, README there; FEMM 4.2 in C:\femm42 on the rig and under Wine on the Mac; femm_run.py runs it in parallel, calibrate.py fits it). FEMM (2D) calibrated against the datasheet curves (12 Oct): error ±15–20 % incl. a held-out curve; still 1.4–2× high beyond 8 mm stroke. One Ledex geometry for all models: simulations/ledex_femm/ledex_geometry.py (body, plunger, slot, cross hole; shared by the reference CAD, rig model, FEMM and 3D). FEMM uses axisymmetric stand-ins for the slot and cross hole (plunger force changed ≤ 2 %, calibration error 0.178 → 0.180, kept); the 3D model now uses the real slotted, cross-drilled tip (washer pull: short towers +15–25 %, tall towers −7 %). Washer forces come from the 3D model (fea3d.py, NGSolve venv /tmp/ngenv, set FEA3D_THREADS when running sweeps in parallel; sweep3d.py, incl. the offset group: tower moved vertically, half model); treat as ±40 %. Previous results are in results/*/axisym_tip/. Holder axis range 38–78 mm is one setting (HOLDER_H_RANGE in rig_geometry.py) used by the CAD, forces and explorer. Mathis 2017 gives no force at the joystick (replaced the stock ~4 N base spring to get 0.1–0.2 N = 10–20 g).
  • Rig geometry (15 Oct; rig_geometry.py, README "Rig geometry"). Built from the measured joystick component and component holder CAD (mechanical/joystick-component/, joystick-holder/); world X = push (+ away from the mouse), Z up from the breadboard, origin under the joystick axis. Since 26 Nov the model uses the metal joystick: shaft base Z 44.18 (screwed onto the stub, 1 mm above its top; the printed shaft's cone sat on the stub top at 43.18), constrainer 15.41–71.41 on the holder frame; its home-wall arch (top Z 63.41) is cut square up to the ceiling Z 68.41 in the window revision (superseded 2 Nov by the wide window, joystick-1d-axis-constrainer/make_wide_window.py), cube 117.73–144.73, push taken at Z 137.18 (fixed: the 15.1 mm cube's mid-height). Pivot assumed mid-body, 24.5 mm below the shaft base (bounds 20.3–28.3); rig check: push the cube 10 mm against a ruler, r = shaft travel at height z above the joystick base / 10, pivot depth = (93.0 r − z)/(1 − r). The shaft is in the cube's front hole (push face 2.05 mm from the axis, CUBE_HOLE in rig_geometry.py; forces recomputed 16 Oct: change < 1 %; models switched to the narrow cube 17 Oct: effective mass 4.2 g, forces unchanged). A 15 mm push tilts the shaft 7.3°; lever predicts ~0.49 V per 10 mm push, but the 3 Nov measurement gives 0.295 V per 10 mm (0.0295 V/mm), so the lever/sensor model overestimates the voltage scale by ~1.7×. The constrainer slot's home end stops the 2.74 mm arm 1.47 mm (at the cube) on the home side of the spring's neutral (1.15 mm with the 3 mm printed shaft), so the magnet pulls the handle onto that stop at home (home shifts ~0.04 V on ai1 at 0.0295 V/mm with the magnet on): move the stop to neutral (slot end Y −1.4 or a 0.6 mm shim) or record it. Lateral play in the 4 mm slot: 1.26 mm.
  • Plunger link (chosen design; plunger_link.py, rig_forces.py, README "Plunger link" and "Washer target vs plunger link"). Rigid 14 mm link (1.8 × 5 mm bar in the plunger's 2.5 × 9.5 mm tip slot) pinned through the plunger's factory 2.5/2.6 mm cross hole 4.76 mm from the tip (datasheet F34; nothing to drill; slot turned vertical, 2.5 mm × 10 mm brass/A2 pin) to a collar fork pin 6 mm off the shaft axis on the home side (collar: ring with 3.45 mm bore for the metal arm (3.7 on the rig for the printed shaft), fork, one M2 set screw on +Y; nothing may stick out on +X, it would hit the constrainer near 15 mm). Ledex body and plunger modelled from the drawing in mechanical/ledex-195224-model/ (plunger 59.7 mm long, mesh masses match the datasheet). Link height limits (metal joystick): shaft z 13.5 to 19.3 (window top); height barely changes force. Recommended: link z 16.5 above the joystick base = Ledex axis Z 60.7 (unchanged from the printed shaft's z 17.5), home stroke 3 mm at neutral = body face X −42.05; moving parts clear by ≥ 2 mm from the home stop to 15 mm (bar play 0.35–0.4 mm in the slot and fork); stroke 3.0 → 8.29 mm over 15 mm. Resistance at the cube (model rerun 26 Nov with the metal joystick, within 1.5 % of before), push 0 → 15 mm: 1 V 2.3 → 0.64, 5 V 13 → 3.8, 10 V 39 → 11, 0.58 A 124 → 39 gf (pivot bounds −7/+6 %). Washer target at its best layout (Z 57.6, 1 mm gap): 10 V 0.72 → 0.06 gf, i.e. the link is ~55× stronger. Spring: fitted, no preload (force = k × push, k adjustable); plunger friction at the cube is 1.2 / 2.3 / 3.0 gf (mu 0.15 / 0.3 / 0.4), leaving a dead band where k × push < friction. Model at mu 0.3 (6.5 g at the cube): k 0.2 gf/mm never returns (stops at +8.1 mm), 0.5 gf/mm returns in ~74 ms, 0.67 gf/mm in ~59 ms; measure the real k on the bench (gram scale). The explorer has no preload slider (removed 18 Oct). Its sliders show physical distances rather than world coordinates: stroke length (mm) (plunger stroke from seated at neutral, 0 = fully seated; link option) or distance to target (mm) (gap to the washer tower at neutral; washer option), magnet height (mm) (height distance above the pivot), and pivot depth (mm) (relative to the bottom face of the TS-1D1S00A component, 2.0–10.0 mm, default 5.77 mm). All sliders span the feasible range (recomputed from the feasibility checks; beyond a 12.5 mm stroke the pull is extrapolated) and can also be typed. Moving the pivot depth changes only the magnet-height reading and range, never the magnet position. A "set default" button resets every slider (layout, pivot, push, drive, spring, friction). A button switches all forces (readout, plots, stiffness) between gf and N (stiffness as N/m). Push at the cube runs from the home stop to 20 mm (the slot would allow ~36 mm at the cube). Explorer: figures/rig/rig_explorer.html (all parts, sliders, live forces, design map; force plots use linear gf axes, lateral Y fixed at 0).
  • Final install rules: PVA outside the mouse box; command wires 30–100 cm twisted; coil cable 1–2 m twisted and away from ai0/ai1/ai2; short pulses and long cool-downs; stop on heat, smell, binding, wrong direction or failure to release; re-check 0 V and a small command after moving anything. Random-force sessions need this proportional driver (not a binary switch).
  • Adjustable Ledex holder (15 Oct; mechanical/ledex-holder-adjustable/, generated by make_ledex_holder.py; printed and mounted 1 Nov 2026). Base with two M6 slots along X (25 mm or 1 inch grid); lengthened 75 % at the rear on 23 Nov to 84 mm (76 mm slots, 69 mm travel, nut pockets and front end unchanged, static clearances unchanged), not yet printed (the rig has the 48 mm / 33 mm travel base); upright with lateral M4 slots (±12.75 mm) and two long vertical M3 slots (axis Z 38–78, 1 mm scale), carriage on the M14 boss held by 4 × M3 above and below the case into captive nuts (adjustable from outside with the Ledex fitted); link collar (gap and stroke gauges archived in archive/ledex-gauges/, 17 Oct, and removed from the generator) and bar, fit_test (print first: holes print ~0.3–0.4 mm small, cube's 3.4 mm holes just pass the 3 mm shaft; allowances in the FIT block). Clearances to the joystick holder/constrainer: link layout ≥ 16 mm, washer layout ≥ 4.3 mm; make_ledex_holder.py check reruns the static and moving checks.
  • Metal joystick (26 Nov 2026; designed and modelled, NOT printed, fitted or tested). The printed 89 mm PLA shaft bends at low force when the link holds it at the collar, so it is being replaced by an 80 mm metal joystick (user-measured: 1.6 g, non-magnetic, base Ø6.35 × 8 mm, 2.5 mm transition, Ø2.74 mm arm, rounded tip; screwed onto the stub it stands 1 mm higher than the printed shaft). Reference model mechanical/joystick/make_joystick_metal.py (transition drawn as a 2.5 mm-tall concave arc, R 2.63; check against the part). New parts, all generated: cube joystick_handle_cube_11p5_h27_d3p1_dp8 (same footprint and top Z 144.73, 27 mm tall, Ø3.1 × 8 mm holes, 6.45 mm of arm inside; its bottom is 11.9 mm lower, so check it clears the rest platform), link collar with a 3.45 mm bore, fit_test with shaft holes 2.8–3.6. Printed shaft and 15.1 mm cube moved to archive/. Model rerun (26 Nov, real output): clearances OK (static and moving), forces within 1.5 %, home stop −1.47 mm, effective mass 6.5 g, arm bending ~0.3 mm at the cube under 40 gf (printed shaft ~4 mm). The constrainer is unchanged (1.26 mm lateral play). Next (user, on the rig): print fit_test, choose the snug cube hole and the sliding collar bore (change FIT / the cube hole and regenerate if they differ from 3.1 / 3.45), print the cube and collar, fit the joystick, measure the base bottom (expect Z 44.18) and the cube top (expect 144.73), set the collar pin 16.5 mm above the base bottom, re-centre the home boxes on the new rest voltage, Ledex-off hand check, redo volts → mm. mag stays 0.
  • Next (ai1 volts → mm done 3 Nov): optional caliper-check plunger and M14 nut; bench without mice — spring curve with a gram scale at the cube (0 / 5 / 10 / 15 mm, with and without the plunger, Ledex off; preload ≥ 2× the difference), release test 10× from 15 mm back to home within ±0.035 V on ai1, hard stop holds at 10 V with clean release at 0 V, scale force at 5 V and 10 V at a 5 mm push to calibrate the model; finish Checkpoint 5 (powered direction and release). LabVIEW magnet safety (guaranteed 0 V on every exit path, logging) still to do before any nonzero mag.
  • Rest-pad release clause (built and diagram-reviewed 19 Oct, committed 3046091; runs in every mouse session since 20 Oct and pays touch-and-release trials, but the formal animal-free checklist below was never recorded). Problem in session 1: move time started at the Case 0 pass while the paw stayed on the pad, so the mouse started many trials it never completed. Case 0 next state is now 5; new Case 5 waits for paw release only (ai2 = joystick pos idx 3 < rest pad threshold, read local variable; joystick ignored); on release it writes Tick Count → trail start (the move time clock, moved from Case 2), logs new EVENTS code 6 (paw release), then → Case 1. Case 2 keeps Set Occurrence (magnet loop: Trial # + TRIAL row) and code 3 at the start zone, so make_labview_timing.py (code 3 must equal TRIAL samples) is unaffected. Case 1 keeps the legacy start box = the "start position" (later halfway between home and end); paw re-touch does not reset. Before making the start box nontrivial, Case 1 needs a move time timeout → Case 0 (write current time to start time, log code 5, set in trigROI F), otherwise failure to reach a separated start zone would wait forever. Bench test with parameters/training/02_micro_push_day1_restpad_home2p44-2p49.txt: home 2.44–2.49 V held for 100 ms, full-range start box 0–5 V (irrelevant), success 0–2.35 V. Next: animal-free bench test (finger held on pad: no trial; lift: code 6 then trial start; lift + push: reward; movement timeout back to Case 0; Normal Stop), then record result. Data impact: code 6 marks paw release + ~50–60 ms sensor lag; code 2 values now include 5.
  • Head-fixation post moved (20 Oct). The post was raised a bit and moved back so the first two mice can reach and use the rest pad more easily, and so the body or arm does not touch the pad by accident while the mouse works the joystick. Home voltage, pad-touch behaviour and the cube/pad reach may change: remeasure home before any joystick session. Rest platform repositioned at the same time. Verdict after the 20 Oct session: fine for all 3 mice, so the post and platform position is final (no more changes).
  • Spout at Run: set Session start spout (V) = 3.0 V before Run. Day-one file holds extend and retract at 3.00 V, so the spout stays extended. Normal Stop retracts to 0 V.
  • Home voltage depends on whether the shaft and object are fitted. Remeasure before loading any file. Current release-gated day-one file: parameters/training/02_micro_push_day1_restpad_home2p44-2p49.txt: home 2.44–2.49 V, home TO 50 ms, start box 0–5 V (irrelevant), success 0–2.40 V, ITI 1500 ms, move time 3000 ms, water 130 ms (~4 ul), cue 50 ms, delay 0, consumption 1500 ms, 250 identical rows, mag=0, spout columns 0 V. Earlier 02_micro_push_day1_restpad.txt and _home2p44.txt preserve the 16 Oct settings; 02_micro_push_day1_5s_8ul.txt is the older 2.25 V FSR-era file. 02_micro_push.txt and stages 03–08 still use the 2.50 V / home TO 250 ms calibration.
  • Touch-and-release-only file (run 20 Oct with all 3 mice; user reports it went really well; numbers from the files not yet analysed, rewards/release timing/chatter still to check; file committed). parameters/training/01_pad_touch_50ms_release.txt (250 rows, 27 columns checked): home, start and end boxes all 0–5 V push and lateral, home TO 50, end TO 0, so the joystick is irrelevant; pad touch → release (Case 5, code 6) → trial start → reward as soon as Case 3 runs. Rest as the day-one file (move time 3000, ITI 1500, 130 ms water, 50 ms cue, spout columns 0 V). Expect reward ~50–60 ms after real lift-off; set Session start spout (V) 3.0 first. Bench test (finger on pad, lift: code 6, one cue and one water pulse) before a mouse; needs the release-clause VI.
  • 100 and 200 ms hold variants (21 Oct): parameters/training/01_pad_touch_100ms_release.txt and 01_pad_touch_200ms_release.txt (both committed) are identical to the 50 ms file except home TO (column 4) = 100 / 200 in all 250 rows (27 columns checked each). Run 21 Oct (anaconda 100 ms; zuchon and blackmamba 200 ms; see the session map); no separate bench test recorded.
  • Velocity reward mode (built and partly bench-tested 22 Oct on the rig, committed 0f05f87; first mouse sessions 22 Oct, see "Velocity rule revision"). Optional success rule, off when the new 28th column vel threshold = 0 (27-column files load 0). Velocity = abs(d push) + abs(d lateral) over a 50-sample lag (50 ms at 1 kHz; Feedback Node delay 50 in the middle loop, outside the case structure; velocity indicator), units V per 50 ms. Case 3 False: vel threshold added to the end-box Unbundle By Name; (velocity > thr) AND (thr > 0) is ORed onto the "dwell met" wire before the next-state case, so any single pass above threshold pays (end box still works too). Loader: exp values and exp para array clusters got vel threshold as the LAST entry (default 0), loader case 27 bundles it, Array Subset length 27 -> 28. Lag choice from data (8 mouse joystick files, 20-21 Oct, paw on pad, cube untouched, 224 min): noise 99.99th pct 7.8-8.0 mV and max 10-12 mV at every lag (10/20/30/50 ms), so a longer lag adds signal but no noise; onsets above threshold at lag 10: 0.009 V 42, 0.010 V 5, 0.011 V 1, 0.012 V 0 (lag 50: 43 / 4 / 1 / 0). A slow ~23 mV micro-push in veltest3 never paid at lag 10 (peak 0.0100) but peaks 0.0146 at lag 30 and 0.0180 at lag 50. Threshold 0.012 kept; 0.015 file is the fallback if rewards appear without touch. User-reported bench results: velocity idle ~0.000-0.008, taps above 0.012; veltest3 paid on touches; with delay 50 the micro-push paid and the user confirmed it works. Not yet checked or recorded: 27-column file giving threshold 0 and old behaviour, no-touch timeout with table vibration, sideways nudge, Normal Stop, a mouse session. Files training/02_micro_touch_velocity_200ms_thr0p012.txt / _thr0p015.txt (500 rows, 28 columns checked): home push 2.43-2.53, home TO 200, end box 0-1 V (unreachable, only velocity pays), move time 5000, water 130 ms, spout columns 0. Re-centre the home box on the measured rest voltage before a session (rest was 2.477-2.480 V on 21 Oct).
  • Reward on touch (4 Nov; VI built 4 Nov (steps 1-4, 4a/4b screenshot-reviewed, 4c not seen); animal-free bench test done 4 Nov, user reports "works all gucci" (release and touch mode, no per-step numbers recorded; EVENTS codes 7/8/6 and the held-finger no-second-reward check not independently verified from the files; go cue and reward cue sound nearly together in touch mode is an open design point; in use with zuchon since 4 Nov, code 8 only: 4, 5, 11 Nov 01_pad_touch_100ms_touch_2ul, 6, 9, 10 Nov 01_pad_touch_200ms_touch_1p5ul, every armed trial succeeded (1 unpaid, 6 Nov); the held-finger no-second-reward behaviour is not checked from the data; check_row_mapping.py 0 problems on 10 Nov). Step 3 built 4 Nov (screenshot: Select(touch mode, 8, 6) into the code input of the Log Event in Case 5 True; terminal order to be confirmed by user). Step 2 built 4 Nov (screenshot-reviewed: Index Array on the brown parameter wire with the Trial # local, Unbundle reward on touch, Not Equal To 0?, Or with the Less? output, into the inner case selector; not run). Step 1 (loader) built 4 Nov; user reports Run arrow OK, the touch file loads reward on touch 1 and vel threshold 0, a 28-column file loads 0. Optional 29th column reward on touch (0 = pay on release as now, 1 = pay once the home TO hold completes, paw still on the pad); 27- and 28-column files load 0, so existing sessions are unchanged. Touch-mode files need all 29 columns (vel threshold column 28, usually 0). VI steps, one at a time with user confirmation: (1) loader: reward on touch (DBL, default 0) as the LAST entry of the exp values and exp para array clusters, loader case 28 bundles it, Array Subset length 28 -> 29; check a 28-column file gives 0. (2) Case 5: reward on touch ≠ 0 -> Boolean touch mode, ORed onto the release condition, so in touch mode Case 5 passes at once and its existing trail start stamp and -> Case 1 run unchanged. (3) Case 5 logging: Select(touch mode, 8, 6) into the Log Event code, so new EVENTS code 8 = touch-mode pass and code 6 keeps meaning paw release (code 7 is the go cue). (4) Re-arm (revised 4 Nov after seeing Case 0; a shift register would need tunnels through every case): Boolean front-panel control rearmed (default True) with local variables. 4a: Case 0 computes rearmed OR NOT paw on rest pad each iteration and writes it back. 4b: that value is ANDed with the final gate And (dwell met AND ITI elapsed) before the Case 0 True/False selector, so the pass to Case 5 is blocked until the paw has lifted. 4c: Case 5 True tab writes rearmed = NOT touch mode, so a touch-mode pass clears it and a release-mode pass leaves it True. Release mode is unaffected. Stop with rearmed False is harmless (Case 0 sets it True at the first lift). Open point: in touch mode the go cue (code 7, set at the end of the hold) and the reward cue fire almost together; decide whether to gate the go cue off in touch mode. Bench test (animal-free) after the build: 28-column file behaves as before (lift pays, code 6); touch file pays at hold end with the finger still on (code 8, one cue, one water pulse), a held finger gets no second reward until lifted and re-held, Normal Stop clean.
  • Joystick-only sessions (5 Nov; VI built 5 Nov, steps 1-4 done by the user, Run arrow OK; Case 0 screenshot-reviewed after 2a-2c, Step 3 and Step 4 not seen by the agent; bench test PENDING, nothing verified at runtime, no mouse session: no code 9 in any EVENTS file through 13 Nov; VI committed in 07041f3, bench file renamed 86f2bc4). The step list below was the build plan; step 3 was implemented as a Case Structure on joystick only around the go-cue Set Occurrence in the Case 0 right-hand True tab (Set Occurrence in the False tab). Optional 30th column joystick only (0 = rest-pad sequence as now; 1 = joystick-only). 27- to 29-column files load 0. Mode 1: Case 0 gate = joystick in home box held home TO AND ITI elapsed (pad term and rearmed term bypassed), go-cue Set Occurrence skipped (no burst, no code 7), Case 5 passes at once, stamps trail start and logs new EVENTS code 9 (joystick-only arm), then Cases 1-4 unchanged (start box, end box / end TO, vel threshold, move time, reward columns). Column 29 is ignored in mode 1 (code 9 wins over 8/6; rearmed may still be cleared by a 29 = 1 row but Case 0 ignores it in mode 1). Restart after success or timeout needs only the joystick back home for home TO plus the ITI. Caveat: with vel threshold > 0 in mode 1, movement inside the home box just before arming is inside the 200-sample look-back and can pay at once (same class as zuchon #29). VI steps (designed from the 4 Nov Case 0 / Case 5 screenshots, one at a time with user confirmation): (1) loader: joystick only (DBL, default 0) LAST in exp values and exp para array, loader case 29 bundles it, Array Subset 29 -> 30; check a 29-column file gives 0 and the new file 1. (2) Case 0: grow the existing timeout Unbundle By Name (bottom left, on Index Array of the brown wire with Trial #) to also output joystick only, Not Equal To 0? -> joystick only; Or(paw on rest pad compare, joystick only) replaces the pad input of the And that combines it with the home-box And (LED and re-arm Not keep the raw pad wire); Or(re-arm Or output, joystick only) replaces that input of the last And before the right-hand selector. (3) Case 0 right-hand True tab: put the go-cue Set Occurrence (! node on the teal occurrence wire) in a case structure that runs only when NOT joystick only. (4) Case 5: grow the reward on touch Unbundle to also output joystick only, Not Equal To 0?, Or onto the existing Or before the inner selector; in the True tab Select(joystick only, 9, existing 8/6 Select) into the Log Event code. Bench file: parameters/push_bench_joystick-only.txt (500 rows, 30 columns checked). Bench test (animal-free) after the build: 29-column release and touch files behave as before (codes 7 then 6 / 8); joystick-only file: no pad contact at all, home 200 ms then push ≤ 2.40 V pays (code 9, no code 7, one cue, one water pulse), no push times out after 1 s (code 5) and the next trial re-arms with the joystick home and no pad touch, a finger held on the pad changes nothing, Normal Stop clean.
  • Repeat trials (5 Nov; steps 1-2 built, VI committed 63dd060; runtime logic confirmed in mouse sessions from EVENTS, 15 Nov: anaconda 6 Nov (05_narrow_zone_4p5-6p5mm_..., 444 trials, 404 repeats, only rows 1-40 used) and blackmamba 13 Nov (05_narrow_zone_4p5-7p5mm_..._repeat, 372 trials) give check_row_mapping.py 0 code-3 problems, i.e. the row repeats after every timeout and advances after every success; the formal bench file push_bench_repeat-trials.txt was never run, so a mixed file with some rows at repeat trials 0 is untested). Build notes: step 1 user-reported (loader loads 0 / 1 / 0 as expected); step 2 screenshot-reviewed (new case structure in the timeout tab, repeat trials ≠ 0 selector, trial row -> Trial # write) (Case 3 inner True tab = timeout: constant 0 next state, Log Event code 5; move time Unbundle on Index Array with trial row). Optional 31st column repeat trials (index 30; 27- to 30-column files load 0). 0 = next trial uses the next row (as now). 1 = when this row's trial times out in Case 3 (move time, code 5), the next trial uses the same row again; a success still advances. Mechanism (relies on the row-mapping fix): after arming, Trial # = trial row + 1, and the only writer is Case 5 True; in the Case 3 timeout tab, if the running row's repeat trials ≠ 0, write Trial # = trial row, so the next arming copies the same row into trial row. Only the middle loop writes Trial # and its states run one at a time, so no race; magnet and water loops read trial row and are unchanged; the Case 0 last-row gate still works. Data impact: with repeats, trial n is not row n and the front-panel Trial # shows the next row index, not a trial count; the EVENTS code 3 value is the 1-based row number (count trials from codes 6/8/9). VI steps (one at a time, user confirms each): (1) loader: repeat trials (DBL, default 0) LAST in exp values and exp para array, loader case 30 bundles it, Array Subset 30 -> 31; check a 30-column file loads 0 and push_bench_repeat-trials.txt loads 1 on row 1 and 0 on row 4. (2) Case 3 timeout tab (screenshot of Case 3 needed first): grow the Case 3 Unbundle By Name (Index Array with trial row) to also output repeat trials, Not Equal To 0? into a new Case Structure inside the timeout tab only; True tab: trial row local (read) -> Trial # local (write); False tab empty. Bench test (no animal), parameters/push_bench_repeat-trials.txt (40 rows, 31 columns checked; the row-mapping bench rows with columns 29-30 = 0 and repeat trials 0 on rows 4, 8, ..., 1 elsewhere): row 1 lift pays (code 3 = 1); row 2 lift without push times out at 2100 ms twice with code 3 = 2 both times, then lift + push pays 52 ms; row 3 lift pays; row 4 timeout (2200 ms) is followed by row 5 (code 3 = 5); then python scripts/check_row_mapping.py EVENTS_<name> parameters/push_bench_repeat-trials.txt (now follows repeats; regression run on benchtestafterfix1 unchanged, 0 problems; synthetic repeat sessions: correct one passes, column-ignored one flagged) expects 0 problems; regression: a 30-column file still advances after a timeout.
  • Parameter-row mapping (5 Nov; diagnosed from EVENTS; fix built 5 Nov in the VI, committed 924bba8; short bench run PASSED: session benchtestafterfix1, 14 trials, check_row_mapping.py 0 problems: code 3 = n, water 50 + n, even-row timeouts 2100/2302/2402/2701 ms vs 2000 + 50 n; odd trials paid, so Case 3 uses row n. Mouse sessions since 5 Nov (checked 15 Nov): code 3 = expected row on every trial of anaconda 6 Nov, blackmamba 10 and 13 Nov and zuchon 10 Nov (29-column touch file); blackmamba 10 Nov used all 500 rows and armed no 501st trial (last-row gate). Remaining problems in those sessions were magnet-loop misses (code 20 missing) and one 1035 ms timeout vs 1000 ms (blackmamba 13 Nov trial 137, likely an acquisition stall). NOT yet covered: per-row differences (every file run with mice since 5 Nov has identical rows, so water and timeout values cannot show a row offset), slow even-row successes, a > 5 min pause, a joystick-only file; screenshots of Case 0/2 not reviewed). Required: trial n (n-th arming, code 6/8/9, 1-based) uses row n everywhere (Case 0 gate, Cases 5/1/3, magnet, water). Found with the mixed file 02_mixed_touch1_cube1_..._5s_1p5ul_3ul (zuchon 29 Oct #1, 30 Oct #2); identical-row files hide it. One model fits every trial of both sessions (per-trial EVENTS replay; scripts/check_row_mapping.py reproduces it): the magnet loop is the only writer of Trial # (starts at 0, +1 within ~1 ms of the Case 2 occurrence, before its code 20 log), readers index the parameter array 0-based with a Trial # local. Hence Case 0 and Case 5 (read before Case 2) use row n, Case 3 (end box, end TO, vel threshold, move time) uses row n+1 (30 Oct #2: all 7 odd trials timed out at 5000 ms, all 7 even trials paid 4-8 ms after code 3). The water loop's parameter read is not ordered after its Wait on Occurrence: watertime came from row n when the success was < 20 ms after code 3 (66 of 69) and from row n+1 when ≥ 200 ms (27 of 27), mixed in between; this fits a read at the start of a water-loop iteration that restarts about every 100 ms (inferred; the loop's timeout and read position not yet seen). 29 Oct trial 98 has code 3 but no code 20/21 and no TRIAL row (119 code 3 vs 118 TRIAL rows): the magnet loop missed that occurrence while idle, Trial # stayed one behind, and from trial 98 Case 3 used row n, Case 0/5 row n-1, water row n-1 or n. Magnet mag/magtime row unknown (equal in all rows). Data impact: in those two sessions label trial types by the Case 3 row (behaviour), not by file row; code 15 is the water actually given. Fix design (from the data; diagram not yet inspected, may change after step 0): Trial # = trials armed so far = 0-based row index for the next trial; its only writer is the arming (Case 5 True tab: read Trial #, write it to a new indicator trial row, then write Trial # + 1); the magnet-loop increment is deleted. Case 0 and Case 5 keep their Trial # locals (they run before the arming write: row n). Every reader after arming (Cases 1-4, magnet loop, water loop) switches its local to trial row (Select Item), and the magnet and water loops read it once, after their Wait on Occurrence returns, feeding all frames from that one Index Array. trial row only changes at the next arming, which needs the Case 0 hold and ITI, so it cannot change under a loop that just woke. Occurrences are kept (no change to reward timing; lost occurrences stay a separate bug but no longer shift rows). Code 3 value = trial row + 1 (trial number). After the last row: Case 0 gate ANDs Trial # < Array Size(parameter array), so no trial is armed past the last row and the VI idles until Normal Stop (today Index Array past the end returns an all-zero cluster: home box 0-0 V, so no arming in practice, but undefined). Trial # must be 0 at each Run (check the startup frame). Alternative kept in reserve: queue/notifier payload instead of occurrence + local. Step 0 done 5 Nov (screenshots and Find > Local Variables): Trial # is a DBL indicator whose terminal is wired to a 0 constant (reset at Run, presumably; the bench test checks it via code 3 = 1 on trial 1). Its 8 original locals: water loop read outside its case structure; magnet loop read inside the False case (Index Array + Unbundle mag/magtime/light, runs after the wait, Wait on Occurrence timeout 100 ms); magnet frame 0 read -> Increment -> write (the only writer); Case 0, Case 1, Case 3 and Case 5 one read each. Water loop: Index Array + Unbundle (watertime ... spout retract) also outside its case structure (right side), same stale read; this confirms the water mechanism above. Case 2: code 3 Log Event value is a constant 0; Set Occurrence bottom left; a node on a thick blue wire top left (not part of this fix). Water-loop read after the wait: wrap the row local in a one-frame Flat Sequence and wire the Wait's timed out? wire into it (no nodes moved into the case structure). Build steps (one at a time, user confirms each; do not run the VI between steps 1 and 2): (1) DONE 5 Nov, screenshot-reviewed: front-panel copy of Trial # named trial row; Case 5 True tab: Trial # read -> trial row write and -> Increment -> Trial # write; (2) DONE 5 Nov, user-reported (Run arrow OK, Trial # now 8 locals, the only write in Case 5 True): delete the magnet-loop increment (frame 0 read, Increment, write); (3) (3a DONE 5 Nov, user-reported: Case 1, Case 3 and magnet-loop locals switched; 3b water loop DONE 5 Nov, user-reported, not screenshot-reviewed) Case 1, Case 3, magnet-loop and water-loop locals -> trial row (Select Item; Case 0 and Case 5 keep Trial #), with the flat-sequence trick in the water loop only; (4) DONE 5 Nov, user-reported, not screenshot-reviewed: Case 2 code 3 value = trial row + 1; (5) DONE 5 Nov, user-reported, not screenshot-reviewed (Array Size + Less? + extra And before the right-hand selector): Case 0 last-row gate; (6) reset Trial # at Run: the terminal already has a 0 constant, so probably nothing to do. Then the bench test. Bench test (no animal): parameters/push_bench_row-mapping.txt (40 rows, 28 columns checked; odd rows touch-and-release, pay at release; even rows home push 2.43-2.53, need push ≤ 2.40; watertime = 50 + row ms, move time = 2000 + 50 × row ms, all else equal, mag 0, magtime 25). Lift without pushing on most trials (odd rows pay at once, even rows time out at their own length), push on a few even rows, include one > 5 min pause, run past row 40 (expect no 41st arming), Normal Stop. Then python scripts/check_row_mapping.py EVENTS_<name> parameters/push_bench_row-mapping.txt: expect 0 problems and code 3 value = n for every trial. The magnet row cannot be checked from EVENTS while mag = 0 and magtime is fixed (diagram review only).
  • Velocity rule revision (analysis 22 Oct; NOT built, NOT bench-tested). Sessions zuchon_20261022_1 (33 trials, 5 code 4, 4 paid, see Known bugs) and anaconda_20261022_1 (40 trials, 1 paid), file thr0p012 (offline replay of the 50-sample raw velocity crosses 0.012 one sample before every code 4, so the replay is sample-exact). Problem: raw 1 kHz noise (SD ~0.9 mV push, ~1.0 mV lateral) makes the raw velocity noise floor 0.0077 (median of 5 s window maxima), max 0.0100, so slow or gentle touches stay under 0.012. Video (camera 1) confirmed 4 missed touches: zuchon #20 (slow push, peak 0.0110) and #23 (gentle grasp of the cube top), anaconda #1 and #16. Proposed rule: 10-sample moving average on push and lateral before the delay, look-back 200 samples, threshold 0.006, and ignore velocity until 200 ms after trial start (zuchon #29: the cube was already moving before pad release, so any look-back reaching before trial start pays it). Replay: zuchon 5 → 7 paid, anaconda 1 → 3, all current successes kept (lowest 0.0072, the fast tap #16), all failed trials without movement ≤ 0.0040; noise max 0.0045 over 5167 paw-on-pad 5 s windows from 8 sessions (20–22 Oct), so threshold / noise max = 1.34 (current rule 1.20); 0 false alarms in 20293 overlapping windows. Across all 118 min of paw-on-pad data the rule crossed 3 times, all real cube movements (2 of them also near or above the current threshold). Limits: a paw resting on the cube without moving it cannot be detected (zuchon #5 possibly); 1 kHz equivalence assumes one middle-loop iteration per sample. Do NOT load a 0.006 file on the current VI (raw noise is above 0.006, every trial would pay). VI steps (guided one at a time): Mean PtByPt (length 10) on push and lateral feeding both the subtraction and the Feedback Node; Feedback Node delay 50 → 200; in Case 3 AND the velocity term with (Tick Count − trail start) ≥ 200. Status 22 Oct (user, on the rig PC): Mean PtByPt (10) on push and lateral built and idle velocity confirmed lower; Feedback Node delay set to 200. The 200 ms start gate (step 3) was deliberately SKIPPED, so a push-signal jump just before pad release is inside the look-back and can pay without a touch (zuchon #29: paw on pad, cube looked still on both cameras, push drifted down 6 mV over 0.5 s then jumped back up 10 mV at release; ungated peak 0.0115). Replay: ungated, this was the only extra false reward among 73 trials in the two sessions. Not yet re-tested on the bench after the edits. File training/02_micro_touch_velocity_200ms_thr0p006_smooth.txt (500 rows, 28 columns checked, identical to the 0.012 file except column 28 = 0.006; ITI is still 1500 ms, see unpaid successes in Known bugs). Original plan text: a new 28-column file with 0.006 and a bench test (idle velocity below 0.0045, finger taps and slow pushes pay, table knock). Analysis scripts and figure are outside the repo (not committed).
  • Session → parameter file map (16–23 Oct; inferred 24 Oct from EVENTS/joystick data: water ms, ITI, move time, pad-hold length, push at trial arm/success, velocity replay; plus file git history and chat notes). All files are in parameters/training/ except the bench preset. 16 Oct: anaconda_1 02_micro_push_day1_restpad; zuchon_1 same (0 trials, rest 2.44 V below home); zuchon_2 (10 s false start, probable) and zuchon_3 _home2p44; blackmamba_1 _home2p475 (restored). 19 Oct: anaconda_1 (4 s, probable), anaconda_2 and zuchon_1 (1.4 min, probable) parameters/push_bench_full-system.txt (5000 ms ITI/move time, start box 2.46–2.54; most likely still loaded after the release-clause bench test; 0 rewards); zuchon_2 _home2p44-2p49_hold100_end2p35 (restored); zuchon_3 and blackmamba_1 _home2p44-2p49_hold100_end2p40 (restored). 20 Oct: anaconda_1 and blackmamba_1 _home2p44-2p49 (current, hold 50); anaconda_2, zuchon_1, blackmamba_2 01_pad_touch_50ms_release. 21 Oct: anaconda_1 01_pad_touch_100ms_release; zuchon_1, blackmamba_1 01_pad_touch_200ms_release. 22 Oct: anaconda_1, zuchon_1 02_micro_touch_velocity_200ms_thr0p012 (replay exact); blackmamba_1 _thr0p006_smooth (timeline; 1 reward, replay cannot separate 0.006 from 0.012); blackmamba_2 _thr0p006_smooth_1hr. 23 Oct: all three _thr0p006_smooth_1hr (no timeouts, rewards up to 12.7 min after release). The offline velocity replay matches the VI exactly only before the smoothing edit; after it, the VI's velocity differs from a per-sample Mean(10)/lag-200 replay (check the actual loop rate/wiring before relying on replays). LABVIEW timing files exist (24 Oct) for every 16–23 Oct session with rewards; the 7 sessions without rewards (zuchon 16 Oct _1/_2, anaconda 19 Oct _1/_2, zuchon 19 Oct _1/_2, blackmamba 20 Oct _1) get none by design. Restored files are byte-identical copies from git (34ea229, 6145cb0, 9d24808).
  • Session → parameter file map (2–13 Nov; inferred 15 Nov from EVENTS and joystick files: arming code, code 3 row values and repeats, code 15 water ms, timeout length, code 13/18 spout V, push at success; plus file dates; successes / armed trials in brackets). All in parameters/training/. Not resolvable from the data: home2p45 vs home2p46 variants from 10 Nov on (both exist), and the pad hold (home TO) of touch files. anaconda: 2 Nov 03_push_distance_200ms_home2p46-2p51_end2p43_1s_1p5ul (153/191); 3 Nov ..._end2p40_... (120/146); 4 and 5 Nov 04_broad_zone_4-8mm_..._home2p46-2p51_1s_1p5ul (193/266, 195/497); 6 Nov 05_narrow_zone_4p5-6p5mm_... (39/444, repeats on, only rows 1-40 reached); 9 Nov 04_broad_zone_..._repeat (201/463); 10, 11, 12 Nov and 13 Nov #2 05_narrow_zone_4p5-7p5mm_..._repeat (109/371, 151/361, 230/403, 224/316; 10 Nov success pushes 2.274-2.349 V rule out the 4.5-6.5 mm box); 13 Nov #1 06_spout_move_... (spout 2.0 / 1.0 V logged; 4/149 in 15 min, then back to the fixed-spout file). blackmamba: 2 Nov a 3 s velocity file with 58 ms water, probably 02_micro_touch_velocity_100ms_..._3s_home2p46-2p51_1p5ul (62/64); 3 and 5 Nov a velocity file with 58 ms water and no timeouts, so move time not identifiable (180/180, 235/235); 4 Nov 02_micro_touch_velocity_100ms_..._2s_home2p46-2p51_1p5ul (180/183); 6 and 9 Nov 03_push_distance_..._end2p43_... (148/348, 220/292); 10 Nov ..._end2p40_... (297/500, all 500 rows used); 11 and 12 Nov 04_broad_zone_..._repeat (136/304, 289/364); 13 Nov 05_narrow_zone_4p5-7p5mm_..._repeat (245/372). zuchon (joystick deliberately moved/unplugged for the touch-only sessions from 2 Nov #2 on, so its push channel reads ~1.4-1.7 V): 2 Nov #1 02_mixed_touch1_cube1_..._10s_home2p46-2p51_2ul (7/10 in 49 min); 2 Nov #2 a 01_pad_touch_*_release_3ul file (5/5); 3 Nov a 01_pad_touch_*_release_2ul file (23/23); 4, 5, 11 Nov 01_pad_touch_100ms_touch_2ul (100/100, 114/114, 46/46); 6, 9, 10 Nov 01_pad_touch_200ms_touch_1p5ul (94/94, 58/58, 101/101). Bench runs in the same folder: newparametertest* (4 Nov), benchtestafterfix* (5 Nov), spoutretracttest1-5 (13 Nov). LABVIEW timing files for these sessions were not checked.
  • Zuchon mixed touch/cube file (29 Oct; written, not bench-tested; run with zuchon 29 Oct #1 and 30 Oct #2, where the VI ran the wrong rows, see "Parameter-row mapping"). From the zuchon analysis of 26-28 Oct (PushTask_Analysis notebooks/zuchon_shaping_week26-29Oct.ipynb): hold and release are learned (28 Oct #1 touch file: 48 rewards in 11.5 min), but on the 1 h velocity file zuchon earned only 6-8 rewards per session; release-to-cube coupling fell to chance after whole touch-only sessions. Recommendation: alternate the two trial types within one file. File parameters/training/02_mixed_touch1_cube1_100ms_thr0p006_smooth_5s_1p5ul_3ul.txt (500 rows, 28 columns checked): odd rows touch-and-release (boxes 0-5 V, vel threshold 0, 58 ms water ~1.5 µl, interpolated, not weighed); even rows cube (home push 2.43-2.53, end box 0-1 V, vel threshold 0.006, move time 5000, 100 ms water ~3 µl, measured 3.2 µl); all rows home TO 100, ITI 2000 (avoids the unpaid-success bug). Replay on last week's behaviour: 14 / 7 / 20 / 38 rewards vs 9 / 6 / 7 / 8 under the 1 h rule. Before a mouse: bench-test that per-row boxes, vel threshold and watertime are applied (finger lift pays on odd rows; on even rows lift alone times out after 5 s, lift + tap pays the longer pulse) and that a timeout advances to the next row. Next steps by the notebook: 1:2, then 1:3, then cube rows only, when P(cube movement within 2 s of release) is clearly above chance; then shorten the cube window toward 2-3 s. Open questions from the notebook: why the push channel was flat on 28 Oct #1 (cube removed?), and the 28 Oct #2 video (does the paw go toward the cube after a release?).
  • Zuchon pad + velocity file (30 Oct; written, NOT bench-tested, not run). parameters/training/02_pad_velocity_100ms_thr0p006_smooth_5s_1p5ul_iti1p5.txt (500 identical rows, 28 columns checked): the cube rows of the 29 Oct mixed file only (no touch-only trials): home TO 100, home push 2.43-2.53, end push 0-1 V, �el threshold 0.006, move time 5000, 58 ms water (~1.5 µl, interpolated, not weighed), ITI 1500, consumption 1000 ms. Next: bench check, then run; compare rewards per session with the mixed file.
  • Anaconda distance-based file (30 Oct; written, NOT bench-tested; first run 30 Oct #1 failed on the home-box typo below, rerun pending). From the session_exploration notebook of PushTask_Analysis (anaconda 29 Oct #1, 199 velocity-paid rewards in 49 min, peak push median 31 mV; rewards kept at a minimum distance of 10 / 20 / 30 / 40 / 50 mV: 92 / 71 / 52 / 45 / 35 %). File parameters/training/03_push_distance_200ms_20mV_1s_1p5ul.txt (500 identical rows, 28 columns checked): vel threshold 0, home TO 200, home push 2.438-2.482 V (was mistyped 4.438-4.482 V: session anaconda_20261030_1 got 0 trial starts in 2.2 min; push rest that session median 2.441 V, 89 % of pad-on time inside 2.438-2.482), end push 0-2.41 V (no overlap with home), end TO 0, move time 1000, ITI 1500, 58 ms water (~1.5 µl, interpolated; weigh), consumption 1000 ms (water loop ≈ 1.1 s < ITI 1.5 s, addresses the busy-loop cause of unpaid successes; check in EVENTS that every code 4 has codes 10-18), other columns as the velocity files. Only velocity-paid pushes were analysed, so the real reward rate under the new rule (and within a 1 s window) is unknown. Before a session: measure rest and re-centre home / bound; bench check that a ~25 mV push pays and a touch alone does not. Next: if anaconda keeps ≥ 15 rewards / 10 min, step to 30 mV, then 40 mV.
  • Broad-zone file (4 Nov; no bench check recorded; run with anaconda 4 and 5 Nov, see the 2–13 Nov session map). parameters/training/04_broad_zone_4-8mm_hold50ms_home2p46-2p51_1s_1p5ul.txt (500 identical rows, 28 columns checked): copy of 03_push_distance_200ms_home2p46-2p51_end2p40_1s_1p5ul.txt except end push box 2.235-2.365 V (= 8 / 4 mm from the 3 Nov volts-mm calibration, where 4 mm = 2.365 V and 8 mm = 2.235 V; the calibration home was ~2.47 V, so re-centre if the rest voltage differs) and end TO (column 14) 50 ms. Pushing past 8 mm (below 2.235 V) is outside the zone. Next: measure rest voltage, bench-check that the zone pays only inside 4-8 mm.
  • Narrow-zone file (6 Nov; no bench check recorded; run with anaconda 6 Nov: 39 successes in 444 trials, repeats confirmed). parameters/training/05_narrow_zone_4p5-6p5mm_hold50ms_home2p46-2p51_1s_1p5ul.txt (500 identical rows, 31 columns checked; columns 29-31 appended as reward on touch 0, joystick only 0, repeat trials 1, so a timed-out trial repeats the same row; uses the repeat-trials VI edit, see "Repeat trials"): copy of the 04_broad_zone_4-8mm_... file except end push box 2.284-2.349 V (4.5 / 6.5 mm, linear interpolation of the 4 mm = 2.365 V and 8 mm = 2.235 V calibration points, 0.0325 V/mm, rounded to mV). Same caveat: re-centre if the rest voltage differs from the ~2.47 V calibration home. Next: bench-check the zone. This 2 mm band is centered at 5.5 mm, not on the 4–8 mm center.
  • Wider home box 2.45–2.51 (10 Nov; no bench check recorded; whether the 10–13 Nov sessions loaded a home2p45 or home2p46 copy cannot be told from EVENTS). Duplicate of every parameters/training/ file whose home push box was 2.46–2.51 V. Column 1 is 2.45; column 3 stays 2.51; the filename token is home2p45-2p51. Originals kept. The mixed file changes only its 250 cube rows (touch rows stay 0–5 V). The _end2p43_ copy now has a 20 mV gap under home (was 30 mV); the _end2p40_ copy has 50 mV. Both stay above the 10 mV minimum. push_bench_joystick-only.txt still uses 2.46–2.51 (it is not in training/). Next: load a home2p45-2p51 copy if the 2.46 lower bound is dropping holds.
  • Moving-spout copy of the 4.5–7.5 mm file (13 Nov; drinking time lengthened the same day; bench runs spoutretracttest1-5 the same day, results not recorded; run with anaconda 13 Nov #1: 4 successes in 149 trials over 15 min, spout 2.0 / 1.0 V in EVENTS, then session #2 went back to the fixed-spout file with 224/316). parameters/training/06_spout_move_narrow_zone_4p5-7p5mm_hold50ms_home2p45-2p51_1s_1p5ul_repeat.txt (500 identical rows, 31 columns checked): copy of 05_narrow_zone_4p5-7p5mm_hold50ms_home2p45-2p51_1s_1p5ul_repeat.txt with spout extend = 2.00 V and spout retract = 1.00 V (same-day tries were 1.50/0, then 1.00/0, then 1.00/0.20), spout settle = 200 ms (a starting value, not a measured travel time), consumption = 1500 ms, and ITI = 2800 ms. No retract-settle wait: extend → 200 ms settle → water 58 ms → consumption 1500 ms → retract write. Code 13 to code 18 is about 1.76 s. The ITI is the Case 0 timeout and starts with the success, in parallel with the cue. The retract write is at 1.81 s, so a 2000 ms ITI allowed the go cue 0.19 s later, during the 6 mm return (about 0.24 s at the 25 mm/s no-load speed, slower with the tube). 2800 ms leaves about 1 s after the retract write before the go cue can fire. Travel time on this rig is not measured. A 5000 ms ITI was written the same day so the post-move whine would end before the go cue, then put back to 2000: 5 s is too long for the task. The L12-I controller is not programmable; the 1–2 s whine after a large step was already heard on 12 Aug, while a 1 V step was quiet before the spout and tube were attached. Session start spout (V) = 2.0. A timeout does not move the spout. Normal Stop retracts to 0 V. A running VI keeps the file it already loaded.
  • Moving-spout block file and its bench file (16 Nov; built and validated for format only; not bench-tested, not run with a mouse). parameters/training/06_spout_blocks_2mm_3mm_narrow.txt (500 rows, 31 columns, repeat trials 1, so each block length counts rewards). Rows 1-30: the 4.5-7.5 mm file with the spout held at 2 V (extend = retract = 2.00, timing unchanged). Rows 31-60: pad + velocity (vel threshold 0.006, end box 0-1 V, end TO 0, move time 2000, from the 2 s velocity file). Rows 61-110: push ≤ 2.425 V (~2 mm), end TO 0. Rows 111-160: ≤ 2.395 V (~3 mm), end TO 0. Rows 161-500: full 4.5-7.5 mm zone, end TO 50. Rows 31-500: spout 2.00 → 1.00 V, settle 300 (400-500 ms was the first guess; 300 ms is above the ~0.26 s no-load travel for 6 mm, not measured with the tube), consumption 3500, ITI 5000 (retract write at 3.91 s, so ~1.1 s before the go cue can fire). Bench file parameters/push_bench_spout-loop.txt (43 rows: 3 / 3 / 3 / 3 / 16 rows at ITI 5000, plus 15 rows at ITI 4600). Next: run the bench file animal-free. Check codes 13/18, that no go cue or arming comes before the retract plus travel, that every code 4 is paid, and run check_row_mapping.py. This is also the first distinct-row bench check of the 5 Nov row-mapping fix. Then set Session start spout (V) = 2.0 and run with a mouse. Details in parameters/README.md.
  • Narrow-zone then 2 mm spout file (17 Nov; written and format-checked; not bench-tested, not run). parameters/training/06_spout_blocks_narrow30_then_2mm.txt (500 rows, 31 columns, repeat trials 1). Copy of 06_spout_blocks_2mm_3mm_narrow.txt with the velocity, 3 mm and later zone blocks removed. Rows 1-30: the 4.5-7.5 mm zone, spout held at 2 V (extend = retract = 2.00, settle 0, consumption 1000, ITI 1500). Rows 31-500: push ≤ 2.425 V (~2 mm, end box 0-2.425, end TO 0), spout 2.00 → 1.00 V, settle 300, consumption 5500 (was 3500), ITI 7000 (was 5000). Retract write at 5.91 s; the 7 s ITI still leaves ~1.1 s after that write. Set Session start spout (V) = 2.0.
  • Low-whine spout pair 3.5 / 2.6 V (17 Nov; files written and format-checked; bench file run at 3500 / 4300, user-reported OK, EVENTS not analysed; first mouse sessions 18 Nov). The L12-I post-move whine depends on the voltage pair; 4.0 V never whined and 3.0 V about half the time (user-reported, by ear); 3.5 V extended / 2.6 V retracted was picked as the best pair (~5.4 mm on the 6 mm/V scale). parameters/training/06_spout_blocks_narrow30_then_2mm_spout2p6-3p5.txt: the narrow30 file with rows 1-30 held at 3.5 V and rows 31-500 at 3.5 → 2.6 V, settle 300, consumption 3000, ITI 4000 (retract write at 3.41 s, ~0.59 s before the go cue can fire; return travel with the tube not measured). parameters/push_bench_spout2p6-3p5_water-loop.txt (rows at the earlier 3500 / 4300, 0.39 s margin) ran animal-free on 17 Nov, user-reported OK; 3000 / 4000 has a larger margin and was not bench-run itself. Velocity copy 06_spout_blocks_narrow30_then_velocity_spout2p6-3p5_cons4s_iti5s.txt (18 Nov): home push 2.45-2.52 V on every row (was 2.51); rows 1-30 otherwise the same zone rows; rows 31-500 paid on vel threshold 0.006 only (end box 0-1.00, end TO 0, move time 2000), consumption 4000, ITI 5000, same ~0.59 s margin; not bench-tested. 3.5 V sits ~9 mm further out than the old 2.0 V extend: check the spout-to-mouth position. Session start spout (V) = 3.5. 18 Nov sessions (file identified 19 Nov from EVENTS: timeout length, code 16→17 consumption, success → next code 7, code 15/13/18; check_row_mapping.py 0 code-3/water/timeout problems against the matching file): anaconda_1 ..._narrow30_then_2mm_spout2p6-3p5 (68 min, 130/411: 30 zone + 100 at 2 mm, reached row 131); blackmamba_1 ..._narrow30_then_velocity_..._cons4s_iti5s (35.5 min, 217/272: 30 zone + 187 velocity, reached row 218). 0 unpaid successes, 1 magnet-loop miss each. Code 18 → next code 7 on rows 31+ fell below 0.59 s on 10/100 (anaconda, min 564 ms) and 12/187 (blackmamba, min 219 ms) successes; cause not investigated. Follow-up files (19 Nov; format-checked, not bench-tested, not run): 06_spout_blocks_narrow30_then_2mm_spout2p6-3p5_cons2s_iti3s.txt (anaconda's file with rows 31-500 consumption 2000 / ITI 3000) and 06_spout_blocks_narrow30_then_zone_spout2p6-3p5_cons2s_iti3s.txt (blackmamba's file with rows 31-500 paid on the 4.5-7.5 mm zone, end TO 50, vel threshold 0, move time kept 2000, consumption 2000 / ITI 3000). Retract write at 2.41 s, same ~0.59 s margin. All-rows variant (20 Nov; format-checked, not bench-tested, not run): 06_spout_2mm_spout2p6-3p5_home2p45-2p52_move2s_cons2s_iti3s.txt, 500 identical rows of the 2 mm moving-spout row (no stationary block), home 2.45-2.52 V, move time 2000; ..._move1s_cons2s_iti3s.txt (23 Nov; format-checked, not bench-tested, not run) is the same with move time 1000; 06_spout_3p3mm_spout2p6-3p5_home2p45-2p52_move1s_cons2s_iti3s.txt (24 Nov; format-checked, not bench-tested, not run) is that move1s file with the push threshold at 2.387 V (midpoint of 2.425 and the zone's near edge 2.349; ~3.3 mm); 06_spout_broad_zone_4-8mm_hold50ms_spout2p6-3p5_home2p45-2p52_move1s_cons2s_iti3s.txt (26 Nov; format-checked, not bench-tested, not run) is that file paid on the broad zone 2.235-2.365 V with end TO 50. Next: run them; re-check the code 18 → code 7 gap in EVENTS.
  • 3 mm narrow-zone file (10 Nov; no bench check recorded; run with anaconda 10–13 Nov and blackmamba 13 Nov, home2p45 or home2p46 copy not identifiable). parameters/training/05_narrow_zone_4p5-7p5mm_hold50ms_home2p46-2p51_1s_1p5ul_repeat.txt (500 identical rows, 31 columns checked): copy of 04_broad_zone_4-8mm_hold50ms_home2p46-2p51_1s_1p5ul_repeat.txt except the end push box is 2.251–2.349 V (7.5 / 4.5 mm). That is a 3 mm band whose voltage midpoint is 2.300 V, the same as the 4–8 mm box (2.235 + 2.365) / 2. Bounds are the same 4 mm = 2.365 V / 8 mm = 2.235 V interpolation (0.0325 V/mm), rounded to mV. repeat trials stays 1. Same caveat: re-centre if the rest voltage differs from the ~2.47 V calibration home. Next: bench-check the zone. The measured 6 mm point is 2.305 V, 5 mV homeward of this midpoint.
  • 2 s velocity file (4 Nov; no bench check recorded; run with blackmamba 4 Nov). parameters/training/02_micro_touch_velocity_100ms_thr0p006_smooth_2s_home2p46-2p51_1p5ul.txt (500 identical rows, 28 columns checked): identical to the _3s_ file except move time (column 19) 3000 -> 2000 ms.
  • 1 h velocity file (9 Nov; written, NOT bench-tested, not run). parameters/training/02_micro_touch_velocity_200ms_thr0p006_smooth_1hr_home2p46-2p51_1p5ul.txt (500 identical rows, 28 columns checked): identical to 02_micro_touch_velocity_200ms_thr0p006_smooth_2s_home2p46-2p51_1p5ul.txt except move time (column 19) 2000 -> 3600000 ms.
  • Next stage plan (20 Oct): hold + easiest micro-push. Pad hold goes 50 → 100 → 200 ms over the next days (touch-and-release sessions); the micro-push stage should reward any push above noise. Current day-one file leaves a dead band (home 2.44–2.49, success < 2.40: a cube at 2.47 V needs ~70 mV, ~2 mm). Simplest: per-session file from the measured rest voltage r (home r ± 0.010, success < r − 0.020, keep ≥ 10 mV gap between home lower bound and success bound, optional end TO 10–20 ms, move time 5000); measure real 1 kHz noise from today's touch-only joystick files first (99.9th percentile; the ±0.035 V in calibration/joystick-volts-mm.md is the old live-graph value). Robust option after the release-clause bench test: Case 5 stores the push value at release as a baseline and Case 3 rewards when push < baseline − Δ (new front-panel control, e.g. 0.015 V) OR the end box; Δ = 5 V recovers the old behaviour. Drop the pad hold to 50–100 ms when the push requirement is added.
  • Success bound raised (19 Oct, committed 20 Oct); home TO back to 50 ms (20 Oct). In 02_micro_push_day1_restpad_home2p44-2p49.txt the end box is now 0.00–2.40 V (column 12; was 2.35; 250 rows, 27 columns checked). Home stays 2.44–2.49 V, move time 3000 ms, home TO 50 ms (column 4, all 250 rows; 27 columns checked). Reason: mouse zuchon rests the paw on the cube and settles at 2.37–2.40 V, so 2.35 V was just out of reach; a resting paw alone may now succeed after a trial start, so watch whether it is a deliberate push.
  • Bench presets (no animal): parameters/push_bench_full-system.txt (20 rows; home/start match training/07_expert.txt; success 0.00–2.22 V, no end dwell; 50 ms cue, 500 ms reward delay, spout 0→3 V, 185 ms water, 1500 ms consumption; set Session start spout to 0 V so motion is visible; mag=0; never use to energise the Ledex/PVA) and push_bench_full-system_nocue.txt (same, cue 0 ms; if a click is heard disconnect the buzzer from P0.1). Procedure in parameters/README.md. parameters/push_bench_wide-zone.txt is the older hand-test file.
  • Repo layout (cleaned 16 Oct). Docs describe the capacitive pad with no FSR history; old FSR bench logs are in archive/FSR_rest_pad_history.md and the old fixed ledex-holder/ is in archive/ (archive/ is for history worth keeping). Original 20 mm cube and original (arched) 1D-axis constrainer STEP/STL moved to archive/ (17 Oct); the generator scripts make_cube_11p5.py and make_ledex_window.py were deleted (the final STEP/STL models are the record); empty mechanical/laser-cut removed. Shaping fallbacks renamed parameters/training/01_pad_contact_shaping_50ms.txt / _250ms.txt (home TO 50 / 250 ms; untested with the capacitive pad). The docs website (Jupyter Book from the upstream repo: _config.yml, _toc.yml, requirements.txt, .github/workflows/publish-book.yml, docs/images/logo.png) is kept; _toc.yml lists all current docs (check on GitHub that the publish Action/Pages works). Upstream boilerplate kept (LICENSE, CONTRIBUTING.md, CONDUCT.md, media/output.png). Washer-simulation figures and data are kept on purpose (they show why the washer target was rejected). Maintenance pass 5 Nov: the 17 Oct (10 mm) and 28 Oct (14.1 mm) narrow-cube revisions moved to archive/joystick-handle-cube/, only the newest (..._h15p1_d3p3_dp4p2, 15.1 mm, 3.3 mm × 4.2 mm holes) plus make_handle_cube.py stay in mechanical/joystick-handle-cube/; rig_geometry.py CUBE_STL and the script's --check-old now point at the archived files (geometry output checked identical; results/rig/stackup.csv regenerated, it was stale since 15 Oct: slot limit 35.85 mm, 15 mm tilt 7.43°); 6 .DS_Store and 5 __pycache__/*.pyc files that were still tracked are now untracked (already in .gitignore); empty, unreferenced training/02_micro_touch_velocity_200ms_thr0p006_smooth_1hr_1ul.txt (0 bytes since it was added) deleted; README, RIG_INVENTORY.md, MAGNET_COMMISSIONING.md, EVENTS_LOGGER_PLAN.md, parameters/README.md, calibration/ and mechanical/ READMEs brought in line with this plan; order/price details removed from the public docs. All parameter files validated (consistent 27–30 columns per file, mag = 0 everywhere). mechanical/ has one README (parts table and notes) plus the Ledex holder README; per-folder READMEs removed and the mechanical/3d-print level flattened into mechanical/ on 18 Oct; the 38 mm bar handle moved to archive/joystick-handle-bar/. Joystick component model renamed mechanical/TS-1D1S00A-1294_stripped/ (files TS-1D1S00A-1294_stripped.step/.stl; rig_geometry.py updated).
  • Repo: the rig PC was re-cloned on 11 Oct because origin/master had its history rewritten (force-pushed twice); local master was reset to origin/master at 5302f6d. Always git fetch origin and check git status before committing; if it says ahead and behind, do not merge, ask first. After the 5 Nov maintenance pass, pull on the rig PC before the next LabVIEW session (files moved, nothing the VI loads was renamed).

Logging and sync

  • Joystick file: 5 doubles per 1 kHz sample. TRIAL/REWARD files unchanged. Frame count is software-polled once per loop, not hardware-aligned.
  • EVENTS logger (done, bench-validated, f9a363c; plan in EVENTS_LOGGER_PLAN.md): file EVENTS_<name>, big-endian float64, 4 per record [code, sample_index, unix_time_s, value]. Codes: 1 start, 2 state change, 3 trial start (start zone, Case 2; value = 1-based parameter row since the row-mapping fix, 0 in older sessions), 6 paw release (Case 5), 7 go cue burst, 8 touch-mode pass (Case 5, see "Reward on touch"; in mouse sessions since 4 Nov), 9 joystick-only arm (Case 5, built 5 Nov, bench test pending, see "Joystick-only sessions"), 4 success (Case 4), 5 timeout, 10–18 water-loop steps (13 = extend V, 15 = water on with ms, 18 = retract V), 20/21 magnet on/off, 90 heartbeat (1 s), 99 stop. Named queue push events, reentrant Log Event.vi, one writer loop, global sample count (reset to 0 before code 1). Known: code 99 sample is ~0.3 s stale (excluded from fits). REWARD col 0 matches code 15, not code 4. Pending tests: camera sync run, stop from inside a reward sequence.
  • Auto timing file: scripts/run_timing.bat is called by System Exec at Stop after the EVENTS Close/Release (commit 92c1cc5) and writes TIMESTAMPS_LABVIEW_<name>.npy via scripts/make_labview_timing.py (numpy only; refuses on files from different runs, empty REWARD, >5% outliers, drift ≥100 ms). Output in timing_log.txt (overwritten each session, so only the last run is kept). The trial-count check allows extra EVENTS trial starts (the last 1–2 TRIAL rows can be missing); analysis uses EVENTS (code 3 trial start, code 15 reward), while the VI still writes TRIAL/REWARD. Merge Errors for the other file closes was skipped; revisit only if "Missing session file" errors appear.
  • Video timestamps (TIMESTAMPS_VIDEO_*.npy) are absolute Unix float64 at ~100 Hz; PC Unix time is the shared clock. File creation times are not session markers.

Task design

  • Trial: forepaw on rest pad AND object in home → trial starts → push forward into target band (held for end TO) → immediate auditory cue (50 ms) → reward delay → spout extends → water → spout retracts. Overshoot is not an abort; leaving the band resets the dwell; trial ends at move time.
  • Session blocks (later): Baseline (mag=0), Random perturbation, Fixed perturbation, Washout. Perturbation = axial resistance along the push axis (Ledex mounted on the home side, attraction opposes the push), pre-scripted mag per row, force magnitudes must be varied (proportional driver).
  • Training progression (criterion on two consecutive days, change one thing at a time, ~3–6 weeks): 1) head-fix habituation with cue→water (short interval); 2) micro-push discovery; 3) proximal broad zone; 4) zone translation; 5) zone refinement; 6) delay 0/250/500/1000 ms; 7) expert stabilisation (≥80% success); 8) zero-force shadow sessions; 9) resistance pilot (separate mice), then main experiment. Optional rest-only stage as fallback.
  • Parameter files: one file per stage or mouse in parameters/training/, bench presets in parameters/ (27 base columns plus optional 28 vel threshold, 29 reward on touch, 30 joystick only, 31 repeat trials; see parameters/README.md). Loader reads cases 0–30; missing optional columns load as 0. Columns (0-based): 0,2 home push bounds (named X); 1,3 home lateral (named Y); 4 home TO; 5–8 legacy start box; 9 start TO (keep 0); 10,12 end push bounds; 11,13 end lateral; 14 end TO; 15 mag; 16 magtime; 17 watertime (130/185/240 ms → 4/6/8 µl); 18 timeout (Case 0 ITI); 19 move time; 20 light (0); 21 reward delay; 22 cue duration; 23 spout extend; 24 spout settle; 25 consumption; 26 spout retract. White/push values go in the columns named X; there is no ×2 on home X2. Do not reuse the old pull files' end voltages or magtime=100.
  • Calibrate before final numbers: volts-to-mm done 3 Nov for 0–8 mm (0.0295 V/mm, calibration/joystick-volts-mm.md; 10 mV ≈ 0.34 mm, so the 20 mV distance file asks ~0.7 mm and vel threshold 0.006 V ≈ 0.2 mm), joystick noise, water volume (calibration/water-volume.md), spout settle, spring return.
  • A fixed-spout 500 ms ITI with a 1.5 s consumption loop needs a rapid-success bench check (one cue and one water pulse per success).
  • Perturbation notes: original Mathis kick was lateral at trial start; ours is sustained axial resistance. Minimal option magtime ≈ move time; cleaner is holding mag until a trial-end occurrence (Case 4 or Case 3 timeout) and a ~100 ms movement-onset delay. Do not reuse old magtime=100 or the 2.2 V value; force-calibrate with a gauge/load cell and check heating.
  • Earlier plan (superseded by the Case 5 release clause above; kept for the replay numbers): start the trial (and move time) at pad release. Use the existing Case 1 gate: Case 0 (pad + home held home TO, ITI elapsed) → Case 1 waits while the paw is on the pad; pad released AND object in the start box (= home box, start TO 0) → Case 2 (trial start, code 3, magnet occurrence); pad released but object out of the box → Case 0. No parameter-file change. Code 2 (state 1) then marks "armed", code 3 marks release (~50–60 ms after the real lift-off). Replaying the 16 Oct data through this rule: blackmamba 83 trials / 22 rewards (27 %; 25 and 31 rewards with move time 5 / 8 s) instead of 250 / 19; zuchon 21 / 6; anaconda 28 / 15 (its pushes with the paw on the pad no longer pay). Separate ITIs after success vs timeout were considered and not needed for this. Step 1 (pending): user inspects Case 1 (what it does when its condition is false; where paw on rest pad is computed). DataJoint: trial start means pad release from that session on.
  • Future LabVIEW work: habituation mode (cue→delay→water without Case 4), rest-pad hysteresis, movement-onset-triggered or held mag, session metadata, one shared parameter typedef (the water-loop and loader clusters had mismatched element order; fixed, FP captions swapped for reward delay and spout retract).

VI architecture (Push Behaviour_MCHALABI.vi + avg joystick and frame trig lick3.vi, frame counter.vi, PushTask Globals.vi, Log Event.vi)

  • State machine in the middle While loop (state in a shift register, initial 0): Case 0 gate (object in home ROI AND rest pad ai2 > threshold, held home TO, AND timeout elapsed, AND rearmed; pad terms bypassed when joystick only), sets the go-cue occurrence (not in joystick-only mode) → Case 5 waits for paw release (passes at once in touch or joystick-only mode), stamps trail start and logs code 6 / 8 / 9 → Case 1 start ROI, Case 2 stamp trial start and set the magnet occurrence, Case 3 movement window (timeout → Case 0; end ROI held end TO, or velocity above vel threshold, → Case 4), Case 4 set the reward occurrence.
  • Parallel loops besides the water and magnet loops below: go-cue loop (occurrence → burst on GoCue_Dev1, code 7) and the EVENTS writer loop (named queue push events, heartbeat).
  • Water loop (occurrence-driven flat sequence): cue HIGH → cue wait → cue LOW → reward delay → spout extend → settle → water HIGH → watertime → water LOW → consumption → spout retract.
  • Magnet loop: occurrence → AO0 mag for magtime (plus laser counter pulse, keyed off) → reset 0.
  • Startup writes cue LOW, water LOW, magnet 0 V, spout to Session start spout (V); normal Stop propagates through stop all; Stop tests from idle, reward delay and extended spout passed.
  • Rest-pad threshold control and paw on rest pad Boolean sit before the home TO hold. Home gate and rest pad share one timer; ROI X-in-range AND Y-in-range per row.
  • Row selection (since the 5 Nov row-mapping fix): Trial # (0-based index of the next row) is written only in Case 5 True, which copies it to trial row and increments it; Cases 0/5 read Trial #, Cases 1/3 and the magnet and water loops read trial row; code 3 value = trial row + 1. repeat trials: in the Case 3 timeout tab, a nonzero repeat trials on the running row writes Trial # = trial row, so the next arming reuses that row. The VI was re-saved on 7 and 10 Nov without logic changes (user-reported). The magnet loop can miss a trial-start occurrence (zuchon 16 Oct after a 328 s pause; 29 Oct #1 trial 98 with the loop idle), which also drops a TRIAL row and codes 20/21.

Mechanics and hardware facts

  • Joystick: APEM TS-1D1S00A-1294 Hall thumbstick base (castle cap removed; printed shaft screwed onto the lever stub) in the printed component holder, 89 mm printed shaft (to be replaced by the 80 mm metal joystick, see "Metal joystick") + interchangeable tip handle: narrow rounded cube, 11.5 × 11.5 mm footprint, shaft in the front hole (replaced the 20 mm-wide cube used in session 1). Revisions: 10 mm tall (17 Oct), 14.1 mm (28 Oct), 15.1 mm with 3.3 mm × 4.2 mm holes (5 Nov, on the rig), 27 mm with 3.1 × 8 mm holes for the metal joystick (26 Nov, not printed; the only one left in mechanical/joystick-handle-cube/, older ones in archive/). On the rig now: the 15.1 mm cube and the wide-window constrainer (user-reported 15 Nov; swap date not recorded; before that the 16 mm window revision from 1 Nov, archived in the repo). The force/geometry models now use the metal joystick and 27 mm cube (26 Nov), and the push volts → mm scale (3 Nov) predates both swaps. Adjustable Ledex holder, link collar and link bar mounted 1 Nov. The bar handle is archived. CAD (STEP + STL) in mechanical/. Return-spring stiffness still to be measured (gram scale).
  • Magnet coupling: plunger linked to the shaft (see Ledex "Plunger link"). The steel washers (SFS M4 111952, M3 132845) are no longer the target.
  • Ledex 195224-230: 12 V, 7 W, 20.7 Ω, ~0.58 A nominal, pull type, mounted axially opposing the push.
  • Water: bubble-free priming before every session; calibrated pulse volumes in calibration/water-volume.md.
  • Actuonix spout: bench-tested extend/settle/water/retract; mouse-relative extend voltage and settle time still to calibrate.

Source context

  • Design authority: Weekly Update 29/06/26 (approved by the PI). Upstream: Mathis et al. 2017 (2D joystick pull).
  • Training precedent: Mathis 2017; Wagner 2020 (manipulandum troubleshooting); Roth lever-push and Linares-García 2025 (push less natural than pull). Rest pad defines a pre-contact start state, not identical posture.
  • The untouched Pull Behavior_march2020.vi hierarchy stays on the rig PC as the fallback. Keep the dated working archive through at least the first successful animal pilot.
  • Repo docs: README.md, RIG_INVENTORY.md, MAGNET_COMMISSIONING.md, EVENTS_LOGGER_PLAN.md, parameters/README.md, calibration/, simulations/ledex_femm/README.md.
  • Rig-PC Python is 3.6.4 (system numpy 1.14, no matplotlib; do not upgrade it, make_labview_timing.py depends on it; use a throwaway venv for plotting); Git for Windows 2.55 and FEMM 4.2 (C:\femm42) installed. Mac: FEMM 4.2 under Wine (prefix ~/.wine-femm, install steps in the ledex_femm README).