New to OpenCode? Start with OpenCode setup, model providers and course budget, then return here for your chosen app.
Stop re-measuring every sweep by hand to get one I–V curve
A voltage-step protocol gives you fifteen current traces. For each one you choose a baseline, subtract it, average a stretch of the step, and write down one number. Then you plot the numbers against voltage and fit a line. Nobody sees which windows you used. A clipped sweep or a gap in the data can slip into the curve without anyone noticing. I–V Review lets you set the baseline and measurement windows, shows raw and corrected traces, flags clipped and missing samples, and links every point on the I–V plot to its sweep.
You will build it with OpenCode, one request at a time, and check each number against answers computed independently. The app runs locally in your browser: one file, no installation, no upload. The recording is synthetic: 15 sweeps from a simulated whole-cell voltage-clamp experiment. One sweep is clipped and one has missing samples, on purpose. Your own permitted recording comes in at Step 16.
The real result: an app you own, and five real corrections you learn to phrase. The recorded build needed them for unreadable axes, a hidden step voltage, unreadably small plots, sweep numbers written as decimals, and a baseline window that silently crossed the voltage step.
You will finish with: an app that turns sweeps.csv (opens in a new tab) into an I–V plot with a fitted reversal potential of 0.0 mV and a slope conductance of 59.9 nS, excludes the clipped sweep with a reason, and exports every window setting with the results.
First watch the 1:53 result tour. It shows where you are going. The numbered steps below are the lesson: what to click in OpenCode, what to paste, and what must appear before you continue.
Silent, with on-screen explanations. OpenCode scenes are captures from the recorded build; app scenes operate the actual OpenCode-generated app. Captions and highlights were added afterwards. Read the transcript (opens in a new tab) · Download the movie (opens in a new tab).
Use: keep this manual beside OpenCode and your browser. Complete each Success check before continuing. Click any screenshot to enlarge it.
Files: reference kit: working app, synthetic recording, four checkpoints and the exact prompts (opens in a new tab). Extract the ZIP first: Windows right-click → Extract All; Mac double-click. Keep it beside your project.
Your personal coach: Step 4 turns your OpenCode session into a one-step-at-a-time guide. For help later, paste the complete coach brief (opens in a new tab) into your project session and tell it your step number.
Words you will meet. Whole-cell voltage clamp: the amplifier holds the cell at a chosen voltage (the command voltage) and records the current needed to keep it there. Holding potential: the resting command between steps, here −80 mV. Sweep: one recorded trace; here each sweep holds at −80 mV for 20 ms, then steps to a test voltage for 80 ms. Baseline: the current before the step; subtracting it removes the amplifier's small constant offset. Clipped: the current went beyond what the amplifier can record (here ±2000 pA), so the trace is flat and the true value is unknown. I–V curve: current (I) plotted against voltage (V). Reversal potential: the voltage at which the current changes sign. Slope conductance: how steeply the current rises with voltage; pA per mV equals nanosiemens (nS).
About the synthetic cell. It carries a K⁺ current with 140 mM K⁺ on both sides of the membrane, so the current reverses at 0 mV. Its channels are closed at −80 mV and open when the cell is depolarised (made less negative). That is why the baseline before the step contains only the amplifier offset, and why the I–V curve is straight only from about −10 mV upwards, where all channels are open.
Files for this journey
Download everything at once as the reference kit (ZIP) (opens in a new tab), or single files as you reach the step that needs them. Save each file into your project folder under exactly this name. If a file opens in the browser instead of downloading, press Ctrl+S (Mac: Command+S) to save it.
| File | First used in |
|---|---|
sweeps.csv (opens in a new tab) | Introduction |
The kit also contains the finished app, the recorded checkpoints (checkpoints/…) and the exact prompts.
1. Get OpenCode readyLink to step
Do
- Open an ordinary website. Complete your university Wi-Fi sign-in if prompted.
- Install OpenCode Desktop: follow Step 1 of Set up OpenCode in the L1 book Start With OpenCode.
- Open OpenCode. For English labels, use Settings → Preferences → Language → English. In German: Einstellungen → Präferenzen → Sprache → English.
Success: OpenCode opens. Continue to the project; choose the model in Step 3.
If different: installation or Wi-Fi failure → use the seminar recovery card.
2. Open your projectLink to step
Do
- In Finder or File Explorer, create a folder named
iv-reviewin Documents. - Copy the
datafolder from the extracted reference kit intoiv-review. It holds one CSV file (a plain-text table):sweeps.csv(opens in a new tab), 15,000 rows. - In OpenCode, click Home → Add project.
- Select your
iv-reviewfolder. Click Select folder. - Click New session.
Success: the new-session screen shows iv-review below the message box.
If different: another folder name → return Home and add the correct folder.
Why this file format: sweeps.csv (opens in a new tab) has one row per sample with four columns: sweep,time_ms,command_mV,current_pA. That is what you get when you export both recorded channels (current and command voltage) from acquisition software and stack the sweeps. Samples are 0.1 ms apart (10 kHz). A blank current means a missing sample.
3. Select a working modelLink to step
Do: click the model name below the message box. Select the model assigned for the seminar. Wait until its name appears below the box.
Success: a model name is displayed. The next step checks that it answers.
If different: no working model or access → ask the instructor to confirm the seminar connection. This recording used Space Bunny Free; free availability is not guaranteed. If a model you did not choose is shown, select yours again.
Agent control: if Plan is visible, select Build before requesting edits. In the recorded interface the agent selector is hidden and Build is the default.
4. Start your OpenCode coachLink to step
Do: copy this block, paste it into OpenCode's message box and click the upward Send arrow.
Be my patient app-building coach. I am a beginner.
We will build I–V Review in this folder, one step at a time.
Use one index.html with inline HTML, CSS and JavaScript,
no packages, server or network calls.
The data folder holds synthetic course data: sweeps.csv,
a whole-cell voltage-clamp recording (15 sweeps).
Explain in at most four short lines: Do, See, Success, If different.
Wait for my result before continuing.
Never claim to see my browser unless you actually inspected it.
Do not create files yet. Reply:
"Ready. Your project is iv-review. Next: load the sweeps."
Wait: while OpenCode works, Send turns into Stop. Continue only when Stop has disappeared.
Success: OpenCode replies Ready. Your project is iv-review. No file is created yet.
If different: an access or quota error → return to Step 3. Do not reinstall OpenCode to fix a model quota.
5. Load the sweeps: your first screenLink to step
Before any calculation, the app must read the recording and show you what is in it: how many samples each sweep has, how many are missing, and how many sit at the amplifier limit.
Do: paste this into the same session and click Send. Wait for Stop to disappear (about two minutes in the recording).
Create only index.html in this project. Build the first I–V Review screen
with inline HTML, CSS and JavaScript: no packages, server or network.
Clean light design, dark teal heading, system fonts, labelled controls.
data/sweeps.csv is large: read only its first 5 lines.
Columns: sweep,time_ms,command_mV,current_pA. One row per sample;
15 sweeps of 1000 samples, 0.1 ms apart. A blank current_pA is a
missing sample, never 0.
Add a file input labelled "Sweeps file (sweeps.csv)". Read the file
locally; never fetch. Check the header and show a clear error otherwise.
Show "15 sweeps · 1000 samples each" (counted from the file).
Table, one row per sweep: sweep, samples, missing samples, and samples
at the amplifier limit (current ≥ +2000 or ≤ −2000 pA).
Add a "Sweep" dropdown and an SVG plot of that sweep's raw current (pA)
against time (ms), with its command voltage (mV) in a small plot below.
Leave gaps where samples are missing. Label both axes of both plots.
Initially show "No recording yet. Choose sweeps.csv."
No windows or calculations yet. Save index.html, tell me how to open it, then wait.
Success: OpenCode says index.html was saved and tells you to open it.
If different: code appears only in the chat → send "Save that code as index.html in this project. Tell me the saved path." If a permission request appears, allow the file edit only when it names your project.
6. Open the app, check the samples, then fix the axesLink to step
Do
- In Finder or File Explorer, open
iv-reviewand double-clickindex.html. If a text editor opens instead, right-click → Open With → your browser. - Click Sweeps file (sweeps.csv) and choose
data/sweeps.csv.
Success: 15 sweeps · 1000 samples each. Sweep 13 has 50 missing samples. Sweep 15 has 748 samples at the amplifier limit. All other counts are 0.
- Choose Sweep 15 in the Sweep dropdown. The current rises and then runs flat at the top: that flat line is the amplifier limit, not the cell.
The counts were right first time, but the axes were hard to read: ticks at 22.48 and 49.95 ms, and a time axis from −5 to 104.9 ms. Report what you see, then ask for one change. Send:
I chose data/sweeps.csv. The table is right: sweep 13 has 50 missing
samples and sweep 15 has 748 at the limit. But the plot axes are hard
to read: ticks like 22.48, 49.95 and -191.38, and the time axis runs
from -5 to 104.9 although the sweep lasts 0 to 99.9 ms.
Use round tick values (every 20 ms on the time axis, round pA and mV
steps), start the time axis at 0 and end it at 100.
Change only the axes. Save index.html; tell me what to check, then wait.
Wait for Stop to disappear. Refresh the browser (Ctrl+R, Mac Command+R) and choose sweeps.csv again. A browser forgets the chosen file when you refresh.
Success: the time axis runs from 0 to 100 with ticks every 20 ms; current and voltage ticks are round numbers.
If different: your axes were already round → skip the correction. A missing sweep 13 count, or missing samples counted as 0 → send "Sweep 13 has 50 blank current values. Count them as missing, never as 0. Fix only that."
7. Keep your first working versionLink to step
Do: copy the whole iv-review folder beside the original. Name the copy iv-review-01-working. Continue working in the original.
Success: there are two folders. Both contain index.html and data.
If stuck: the kit's checkpoints/06-axes/index.html is the recorded working version. Copy it into a new recovery folder, add the data folder, and keep your own work.
8. Add the baseline and measurement windowsLink to step
This is the core of the method. The baseline window (5–15 ms) lies before the step, at the holding potential: its mean is the amplifier offset, about 30–35 pA here. The measurement window (70–90 ms) lies at the end of the step, where the current has settled (the steady state). Each sweep's result is the mean in the measurement window minus the baseline. Missing samples are skipped, and a clipped sweep gives no number at all.
Do: send:
The axes are readable now. Next: the analysis windows.
Add four number inputs; both ends of a window are included:
"Baseline from (ms)" 5, "Baseline to (ms)" 15,
"Measure from (ms)" 70, "Measure to (ms)" 90.
Shade and label both windows on the current plot.
For each sweep, use only non-blank samples inside a window:
baseline = mean current in the baseline window;
corrected = mean current in the measurement window minus baseline.
Step voltage = the command voltage in the measurement window.
Draw the baseline-corrected trace (teal) over the raw trace (grey).
Dropdown options read like "Sweep 13 (+20 mV)".
New table: sweep, step (mV), baseline (pA), corrected mean (pA),
samples used, status. One decimal. Status rules:
a sample at ±2000 pA in either window: "Excluded: clipped at amplifier limit";
missing samples are skipped: "OK · 50 missing samples skipped";
no valid samples in a window: "No value: no valid samples in measurement
window" (or baseline window) and "—", never 0;
command not constant in the measurement window: "Excluded: command
voltage changes in measurement window". Otherwise "OK".
Expect sweep 10: −10 mV, baseline 33.9, corrected −595.4;
sweep 13: +20 mV, 1200.9 from 151 samples; sweep 15 excluded.
Recalculate when a window changes. Keep everything else.
Save index.html; tell me what to check, then wait.
This request took about five minutes in the recording. Wait for Stop to disappear, refresh, choose sweeps.csv and select Sweep 13 (+20 mV).
Success: two shaded windows labelled Baseline and Measure. The teal corrected trace sits about 35 pA below the grey raw trace. The brief spike at 20 ms is the capacitive transient (the current that charges the membrane when the voltage jumps); both windows stay clear of it. Sweep 13 has a gap between 75 and 80 ms, inside the measurement window.
If different: no shaded windows or new table → check that OpenCode saved index.html, then refresh the correct browser tab.
9. Check the numbers, then empty the windowLink to step
Do: scroll to the table and compare these rows.
| Sweep | Step | Baseline | Corrected mean | Samples used | Status |
|---|---|---|---|---|---|
| 8 | −30.0 mV | 33.1 pA | −1315.7 pA | 201 | OK |
| 10 | −10.0 mV | 33.9 pA | −595.4 pA | 201 | OK |
| 11 | 0.0 mV | 33.6 pA | 1.4 pA | 201 | OK |
| 13 | +20.0 mV | 35.0 pA | 1200.9 pA | 151 | OK · 50 missing samples skipped |
| 15 | — | — | — | — | Excluded: clipped at amplifier limit |
Why 201 samples? From 70.0 to 90.0 ms in 0.1 ms steps, both ends included, is 201 samples. Sweep 13 loses the 50 missing ones.
Success: your table matches. Sweep 11 at 0 mV is close to zero: that is the reversal potential of this synthetic current.
If sweep 13 shows 893.4: the 50 blanks were counted as 0 → send "Sweep 13 must use only its 151 present samples (1200.9 pA). Blank currents are missing, never 0. Fix only that."
If sweep 15 shows a number: send "Sweep 15 has samples at +2000 pA in the measurement window. Exclude it with status Excluded: clipped at amplifier limit and show no number."
Now empty the window on purpose. Set Measure from (ms) to 120 and Measure to (ms) to 130. The sweeps end at 99.9 ms, so the window holds no samples.
Success: every sweep shows — and No value: no valid samples in measurement window. No 0 anywhere. Set the window back to 70 and 90; the numbers return.
If you see 0.0 or NaN: send "A measurement window with no samples must show — and No value, never 0 or NaN. Fix only that."
10. Add the I–V plotLink to step
Do: send:
The table matches: sweep 10 is −595.4 pA; sweep 13 is 1200.9 from 151 samples.
One small fix first: for the clipped sweep 15 the table shows "—" as step.
Its step (+40 mV) is known; only its current is excluded. Show +40.0 there.
Now add the I–V plot: an SVG scatter plot of corrected mean current (pA,
vertical) against step voltage (mV, horizontal), one point per sweep
that has a value. Draw both axes through zero, as in a classic I–V plot,
with round ticks every 20 mV and every 500 pA. Axis titles:
"Command voltage (mV)" and "Current (pA)".
Each point is a button (mouse and keyboard): choosing it selects that
sweep in the Sweep dropdown, redraws the trace and highlights its table row.
Draw the selected point larger.
Under the plot, list every sweep that is not plotted, with its reason, e.g.
"Sweep 15 (+40 mV): excluded, clipped at amplifier limit".
Redraw when a window changes. Keep everything else.
Save index.html; tell me what to check, then wait.
The first line reports what you checked. The "small fix" is one more observation from Step 9: the first build hid the step voltage of the excluded sweep.
Refresh, choose sweeps.csv, and click the point at −10 mV.
Success: 14 points. Clicking the −10 mV point selects Sweep 10 (−10 mV) in the dropdown. Under the plot: Sweep 15 (+40 mV): excluded, clipped at amplifier limit. Sweep 15 in the table now shows +40.0.
Read the shape. Below −60 mV the channels are closed: almost no current. Between −50 and −30 mV more and more channels open, so the inward current grows. From −20 mV upwards all are open, and the current falls on a straight line through the reversal potential. That straight part is what you fit next.
If different: the point does not change the trace → send "Clicking a point in the I–V plot must select that sweep in the Sweep dropdown and redraw its trace."
11. Fit a straight line near the reversal potentialLink to step
A least-squares line through the fully-open part of the I–V curve gives two numbers: where it crosses zero current (the reversal potential) and its slope (the slope conductance). The fit uses −10 to +40 mV. The clipped +40 mV sweep lies inside that range; it must stay out because it has no valid value.
Do: send:
The I–V plot works, and sweep 15 is listed as not plotted.
Now add a straight-line fit near the reversal potential.
Two number inputs: "Fit from (mV)" −10 and "Fit to (mV)" 40.
Use only plotted sweeps whose step voltage is in that range (ends included).
Ordinary least squares: current = slope × voltage + intercept.
Slope conductance (nS) = the slope in pA/mV.
Reversal potential (mV) = −intercept / slope, where the line crosses 0 pA.
Show: "Reversal potential 0.0 mV · Slope conductance 59.9 nS ·
fitted sweeps at −10, 0, +10, +20, +30 mV". One decimal; never "−0.0".
Draw the line across the fit range; fitted points filled, others hollow.
Fewer than 2 points: "Not enough valid points for a fit" and no line.
Always show under the plot: "Synthetic teaching data. No series-resistance,
leak or liquid-junction-potential correction."
Redraw when a window or the fit range changes. Keep everything else.
Save index.html; tell me what to check, then wait.
Why "never −0.0"? The exact fitted value here is −0.04 mV. Rounded to one decimal, a program can print "−0.0", which looks like an error.
Refresh, choose sweeps.csv.
Success: Reversal potential 0.0 mV · Slope conductance 59.9 nS · fitted sweeps at −10, 0, +10, +20, +30 mV. Five filled points; the +40 mV sweep is not among them.
Check the slope roughly by hand: from −10 mV (−595.4 pA) to +30 mV (1801.2 pA): (1801.2 − (−595.4)) ÷ 40 mV = 59.9 pA/mV, that is 59.9 nS.
If different: 53.7 nS or six fitted sweeps → the clipped sweep got into the fit; send "Sweep 15 is excluded and must not be used in the fit. Expected 5 fitted sweeps."
Keep: copy your project as iv-review-02-working. Recorded recovery file: checkpoints/09-fit/index.html.
12. Put the trace and the I–V plot side by sideLink to step
The page now works but is long. When you click a point in the I–V plot, the trace it selects is far above, out of sight. Say exactly that. Send:
The fit matches: 0.0 mV and 59.9 nS from 5 sweeps.
One problem: at a 1440-pixel-wide window the page is about 3300 pixels tall.
When I click a point in the I–V plot, the trace it selects is far above,
out of sight, so I cannot see which trace I picked.
Put the analysis windows, the Sweep dropdown and the current trace in a
left column, and the I–V plot with its fit range and result in a right
column, side by side, so both are visible together on a laptop screen.
The command-voltage plot, the table and the not-plotted list go below.
On a narrow phone screen, stack everything in one column.
Change only the layout. Save index.html; tell me what to check, then wait.
Refresh and choose sweeps.csv. In the recording, the columns appeared, but a new problem came with them:
A fix can create a new problem. Describe it just as precisely. Send:
Side by side works, but two new problems at a 1440-pixel window:
both plots shrank so much that their tick labels are unreadable, and the
"Measure to (ms)" box is cut off at the right edge of the left column.
Use more of the window width (up to about 1400 pixels).
Arrange the four window inputs as two rows: baseline from/to, then
measure from/to. Keep every plot label at least 12 pixels high
on screen at a 1440-pixel window. Change only the layout.
Save index.html; tell me what to check, then wait.
Refresh, choose sweeps.csv, click the +20 mV point.
Success: the screen looks like the picture at the top of this manual: windows and trace on the left, I–V plot and fit on the right, all labels readable. Clicking a point changes the trace beside it. The numbers are unchanged: 0.0 mV, 59.9 nS.
If different: your first layout was already readable → skip the second request. Numbers changed → send "The layout change altered the results. Restore the calculations exactly; change only the layout."
Keep: recorded recovery file checkpoints/11-layout-fix/index.html.
13. Export the results with the windowsLink to step
A number without its windows cannot be checked by anyone else. The export writes the windows, the reason for every excluded sweep, and the fit into every row.
Do: send:
The side-by-side layout is readable now.
Add an "Export CSV" button, disabled until results exist. One row per sweep:
sweep,step_mV,baseline_from_ms,baseline_to_ms,measure_from_ms,measure_to_ms,
baseline_pA,corrected_mean_pA,samples_used,missing_samples,status,reason,
in_fit,fit_from_mV,fit_to_mV,reversal_mV,slope_conductance_nS
status is "included", "excluded" or "no value". reason explains every
excluded or no-value sweep and every skipped sample, e.g.
"clipped at amplifier limit (±2000 pA)" or "50 missing samples skipped".
missing_samples counts blanks in the measurement window. in_fit: yes or no.
The fit columns repeat the current fit in every row.
Numbers with 2 decimals; an empty cell where the screen shows "—".
Quote fields correctly. File name: iv-review-results.csv.
Keep everything else. Save index.html; tell me what to check, then wait.
Refresh, choose sweeps.csv, click Export CSV. Open iv-review-results.csv from Downloads in a text editor (a spreadsheet may reformat numbers).
In the recording, every value was right, but whole numbers came out as decimals: sweep 1.00, samples 201.00. Send:
I opened iv-review-results.csv in a text editor. The values match, but
whole numbers are written with decimals: sweep "1.00", samples_used
"201.00", missing_samples "0.00". Write sweep, samples_used and
missing_samples as whole numbers (1, 201, 0). Keep 2 decimals for
currents, voltages, times and the fit results.
Change only this. Save index.html; tell me what to check, then wait.
Refresh, choose the file, export again.
Success: a header and 15 rows. Row 13 reads 13,20.00,5.00,15.00,70.00,90.00,34.96,1200.86,151,50,included,50 missing samples skipped,yes,-10.00,40.00,-0.04,59.93. Row 15 has empty current cells, excluded and clipped at amplifier limit (±2000 pA). The export keeps two decimals, so the reversal potential appears as −0.04 mV.
If different: your first export already had whole numbers → skip the correction. No reason for sweep 15 → send "Every excluded sweep needs its reason in the reason column."
Keep: recorded recovery file checkpoints/13-export-fix/index.html.
14. Make it yoursLink to step
Do: send:
The export now writes 1, 201 and 0.
Change only the visible heading to "My I–V Review".
Keep the browser title consistent.
Do not change data handling, windows, calculations, plots or export.
Save index.html and tell me which lines changed.
Refresh and choose sweeps.csv.
Success: the heading reads My I–V Review. OpenCode names two changed lines: the browser title and the heading. The fit still shows 0.0 mV and 59.9 nS.
If different: anything else changed → ask OpenCode to undo that part, or restore index.html from your latest checkpoint.
15. Leave a README and continue in a fresh sessionLink to step
Do: send:
Read index.html, then create README.md with exact instructions for
opening and using this app: the sweeps.csv columns (sweep,time_ms,
command_mV,current_pA; one row per sample), the default windows (baseline
5–15 ms, measure 70–90 ms, both ends included), how missing samples and
clipped sweeps are handled, the fit (least squares, −10 to +40 mV by
default), what the export contains, the stated limits (synthetic data;
no series-resistance, leak or liquid-junction-potential correction; the
step voltage is the command voltage, not the measured membrane potential),
and the known checks: sweep 10 −595.4 pA, sweep 13 1200.9 pA from 151
samples, sweep 15 excluded, reversal 0.0 mV, slope conductance 59.9 nS.
Record this next task: an "Amplifier limit (± pA)" input for recordings
made with other amplifier settings. Do not implement it.
Do not change index.html. Tell me which file you created, then wait.
Then click New session (the + beside the session tab). Confirm iv-review is still the project. If the button says New project, click it, select your original iv-review folder and click Select folder. Send:
Read README.md and index.html without editing.
Tell me the app's purpose, how to open it and the recorded next task.
Keep the answer to three bullets.
Success: the new session names the app's purpose, how to open it, and the Amplifier limit next task, all from your files.
If different: empty project → check the folder. Wrong facts → correct README.md before continuing; it is your memory between sessions.
16. Test a wrong baseline window, then your own permitted dataLink to step
Before you trust the app with real sweeps, try a classic mistake: a baseline window that runs across the voltage step. Set Baseline from (ms) to 15 and Baseline to (ms) to 25. The step happens at 20 ms.
The recorded build accepted it without complaint:
Every sweep says OK, yet sweep 11 at 0 mV shows −23.8 pA instead of 1.4 pA. The "baseline" now contains part of the step current. Continue in your fresh session and send:
I set the baseline window to 15–25 ms by mistake. It now includes the
voltage step at 20 ms, yet every sweep still says OK, and sweep 11 (0 mV)
shows −23.8 pA instead of 1.4 pA. A baseline must be measured before the
step, at one constant command voltage. If command_mV is not the same for
every sample in the baseline window, that sweep has no value: status
"No value: command voltage changes in baseline window", "—" in the table,
listed as not plotted, empty cells and this reason in the export.
While any sweep has this problem, show a visible warning above the table.
Setting the baseline back to 5–15 ms must restore every result.
Add one line about this rule to README.md. Change nothing else.
Save both files; tell me what to check, then wait.
Refresh, choose sweeps.csv, set the baseline to 15–25 ms again.
Success: a warning appears above the table. Every sweep shows No value: command voltage changes in baseline window, except sweep 3: its step goes to −80 mV, the holding potential, so its command never changes. The fit says Not enough valid points for a fit. Set the baseline back to 5 and 15: every result returns, including 0.0 mV and 59.9 nS.
Now your own data
- Use only data you are allowed to use. Never paste unpublished or personal data into a model without permission. The app itself runs in your browser and sends nothing; OpenCode sees only what you paste into it or ask it to read.
- Export one recording from your acquisition software as CSV with the columns
sweep,time_ms,command_mV,current_pA, one row per sample, current in pA. Work on a copy. - Choose it in the app. Set windows that fit your protocol: the baseline before the step, the measurement where the current has settled.
- Pick one sweep. Read its baseline and measured mean in your usual software and compare.
Success: your comparison matches, and every sweep is either OK or excluded for a reason you can see.
If different: your export has one column per sweep, or other units → do not rename columns by guesswork. Tell OpenCode the real layout and ask for that one adaptation, using made-up example rows rather than your real data. Check your amplifier's output range too: this version flags clipping only at ±2000 pA. With another gain, clipped sweeps can go unflagged until you build the next task in Step 18.
17. Let a colleague use itLink to step
Do: give a colleague index.html, README.md and the data folder. Ask them to follow README.md, choose sweeps.csv and tell you the reversal potential and why sweep 15 is not on the plot. Let them click without your help.
Success: they report 0.0 mV, 59.9 nS, and that sweep 15 is clipped at the amplifier limit.
If they stop: add the missing instruction to README.md. Repeat from that instruction.
18. Make your next improvementLink to step
Do: save a working checkpoint. The recorded next task is an Amplifier limit (± pA) input, so the clipping check matches your amplifier's settings. Write your request with this pattern:
Add [one behaviour] so [my user] can [purpose].
Keep [working features].
I will know it works when [visible result].
Tell me which part will change, implement only this improvement,
then wait for me to try it.
For the amplifier limit: with 2000 the example must still exclude only sweep 15; with 1500, sweep 14 (+30 mV) must be excluded too, because its raw current passes +1500 pA in the measurement window.
Success: the new behaviour works, and with the default settings the example still gives 0.0 mV and 59.9 nS. Record the next task in README.md.
If stuck: paste this into your coach chat:
I am on step [number].
I did: [exact action].
I expected: [result from the manual].
I see: [actual text/result, or describe a screenshot].
Give me one next action. Wait for my result.
What this app does not do: no series-resistance correction (with 1.8 nA through a 10 MΩ access resistance, a real membrane would sit 18 mV away from the command); no leak or capacitive-transient subtraction; no liquid-junction-potential correction; no normalisation to cell size (pA/pF); no inactivation or tail-current analysis; no statistics across cells. It plots the command voltage, not the measured membrane potential. The recording is synthetic. It is a teaching tool, not a validated analysis program.
The method behind these steps
Structure it: one row per sample, named windows, and a visible rule for every sweep that gives no number. Understand it: know why the baseline lies before the step and why only the straight part of the I–V curve is fitted; check the slope by hand. Choose tools: one offline HTML file, OpenCode as the builder, known answers as the judge. Build it: one request, one check, one checkpoint at a time, with corrections phrased as observations. Read T01-L01 · From Idea to Working Result: The Four-Quadrant Method.














