Skip to content

Add ivscc_apfrequency operation#2599

Open
MichaelHuth wants to merge 21 commits into
mainfrom
feature/2599-ivscc_apfrequency_operation
Open

Add ivscc_apfrequency operation#2599
MichaelHuth wants to merge 21 commits into
mainfrom
feature/2599-ivscc_apfrequency_operation

Conversation

@MichaelHuth

@MichaelHuth MichaelHuth commented Dec 15, 2025

Copy link
Copy Markdown
Collaborator

close #2581

  • Set the opacity of individual traces to 0.2. Leave average trace opacity at 1.
  • adapt xvalues operation to extract also from xvalues meta data
  • add support to plotter for opacity meta data
  • Support fitting the data (use the error bars of the average trace to weight the fit). Consider implementing a new operation that's passed as an optional argument into ivscc_APfrequency.
  • find out how to get automatically determined xOffset constant from e.g. exp_XOffset integrated fit func after fit -> W_fitConstants
  • ??add argument to ivscc_apfrequency that enables that all experiments/cells are fitted.
  • add argument to preparefit to limit the fitting range. For flexibility and simplicity I suggest to add this through a mask wave in fit2 then.
  • Make the fit parameters accessible with a related operation
  • ??the fit result may be based on the acquisition/sweep sequence rather than an ordered list of current intensity (x-scale values) -> 3rd avg mode?
  • add a way to expose the number and type of required coefficients to the user. Perhaps a link to the relevant Igor documentation, and/or a pop-up? -> add to help of preparefit
  • Another piece of data I'd like the operation to return is the individual and average DA scales at which a negative slope was first observed in the FI data.
  • add argument to the operation to limit the current range of the avg trace points that are fitted. The current is in pA and refers to an x-axis range. The operation crops the point range that goes into the fit automatically. The argument is like [start_pA, end_pA].
  • ?? for the single experiment f-I plots should the f-I pairs be sorted by I before displaying (prevents zig-zag connecting lines)

TBs new todos:

  • Data on the FTP for regression tests: pr-2599/inputRegressionTest
  • C&P into Excel does not work as multiple entries are added into one cell
  • Fix else // SF_OP_IVSCCAPFREQUENCY_NONE branches and add fatal error
  • Allow to add tags to experiments in the analysis browser
    - Tags are simple strings (igor object names) separated by e.g. comma: Add input functionality to tag experiments in AB. Tags are not saved to disk (except experiment is saved), but only there while the window is open.
    - Show them in an analysis browser column
    - We expect 10 or more experiments per tag, so convenient GUI is important
    - Add select variant to select data by one of multiple tags: This new select filter should work with select itself and as additional optional argument for ivscc_apfrequency. seltag([tag1, tag2, ...]) For ivscc_apfrequency we support that the seltag is given as array [seltag([tag1, tag2, ...]), seltag([tag1, tag2, ...]), ...]. ivscc_apfrequency should create one group for every seltag in the array.
    - If no seltag is given then ivscc_apfrequency should default to create one group for every list of tags present in the experiments, create one group for experiments without tags.
    - Mention list of tags in the legend.
    - When used with ivscc_apfrequency the following special analysis is applied:
    - Support seltag in ivscc_apfrequency` so that each group of experiments from the same seltag generates:
    - single experiment f-I plot (same as now)
    - one additional f-I plot where all f-I pairs from the single experiments are concatenated (and sorted?)
    - average as before (just including data for this seltag)
    - fit as before
  • Add argument option for ivscc_apfrequency to turn off the traces for single experiment plots
    (Original text :one f-I plot in addition to the single experiment plots. Generate one average for each group and no global (over all data across groups) average anymore. Allow to turn off the single experiment plots.)
  • IVSCC apfrequency: Prep 3 of x #2706
  • getmeta
    • Tests
    • Docu
  • fit2
    • Tests
    • Docu
  • preparefit
    • Tests
    • Docu
  • ivscc_apfrequency
    • Tests
    • Docu
  • ihf docu

close #2628

@MichaelHuth MichaelHuth self-assigned this Dec 15, 2025
@MichaelHuth MichaelHuth force-pushed the feature/2599-ivscc_apfrequency_operation branch 2 times, most recently from 75c4b24 to bd0beed Compare December 17, 2025 18:15
@MichaelHuth

Copy link
Copy Markdown
Collaborator Author

@timjarsky This is a first version to play around. There are still a few things I have to add, that I discuss farther below.

ivscc_apfrequency([xaxisOffset, yaxisOffset, xAxisPercentage, yAxisPercentage]) where [] denotes that the parameters are optional.

xaxisOffset and yaxisOffset are strings that can be min, max and none.

General Plotting Behavior

The operation itself returns internally a full plotting specification that is inserted by the formula plotter at the location where the operation appears in the notebook code.

The operation creates only traces that are separated by with. This means preceding and succeeding formulas that are also separated with with go to the same subwindow.

xAxisPercentage and yAxisPercentage are treated as properties for the plot by the plotter. Specifically plot means in this context the subwindow where the traces go. Plot properties from the last formula in the with chain are applied. (i.e. there is currently no gathering of plot properties).

Thus, the plotter applies the 10% for x and y-axis when used like this, where the formula setting the plot properties is last in the chain:

1
with
ivscc_apfrequency(min, min, 10, 10)

but not for this:

ivscc_apfrequency(min, min, 10, 10)
with
1

because 1 does not include any plot properties.

Operation Arguments

Currently:

ivscc_apfrequency([xaxisOffset, yaxisOffset, xAxisPercentage, yAxisPercentage])

with xaxisOffset and yaxisOffset as min, max, none and xAxisPercentage, yAxisPercentage a number between 0 and 100.

The (later) final arguments should also expose arguments from apfrequency, so it will change to ivscc_apfrequency([xaxisOffset, yaxisOffset, xAxisPercentage, yAxisPercentage, method, level, resultType, normalize, xAxisType).

The default for xaxisOffset and yaxisOffset is min.

On the basis of the experiment avgMethodTesting2.pxp the generated code is:

sel = select(selsweeps(), selstimset("*rheo*", "*supra*"), selvis(all))
selexpAD0 = select(selexp("C57BL6J-734969.15.10A.01.nwb"), $sel, selchannels(AD0), selrange(E1))
selexpDA0 = select(selexp("C57BL6J-734969.15.10A.01.nwb"), $sel, selchannels(DA0), selrange(E1))
freq0 = apfrequency(data($selexpAD0))
current0 = max(data($selexpDA0))
currentNorm0 = $current0 - extract($current0, 0) #*1
selexpAD1 = select(selexp("C57BL6J-734969.15.10B.01.nwb"), $sel, selchannels(AD0), selrange(E1))
selexpDA1 = select(selexp("C57BL6J-734969.15.10B.01.nwb"), $sel, selchannels(DA0), selrange(E1))
freq1 = apfrequency(data($selexpAD1))
current1 = max(data($selexpDA1))
currentNorm1 = $current1 - extract($current1, 0) #*2
ivsccavg = avg([$freq0,$freq1], group)
ivscccurrentavg = avg([$currentNorm0,$currentNorm1], group)

$freq0 - extract($freq0, 0) #*3
vs
$currentNorm0
with
$freq1 - extract($freq1, 0) #*4
vs
$currentNorm1
with
$ivsccavg - extract($ivsccavg, 0) #*5
vs
$ivscccurrentavg - extract($ivscccurrentavg, 0) #*6

I added a #* to the formulas that change depending on the min, max, none setting.

#*1, #*2 and #*6 depend on the xaxisOffset argument with the following logic:

min: currentNormX = $currentX - extract($currentX, 0)
max: currentNormX = $currentX - max(flatten($currentX))
none: currentNormX = $currentX

for #*6 it is:
min: $ivscccurrentavg - extract($ivscccurrentavg, 0)
max: $ivscccurrentavg - max(flatten($ivscccurrentavg))
none: $ivscccurrentavg

#*3, #*4 and #*5 depend on the yaxisOffset argument with the following logic:

min: $freqX - extract($freqX, 0)
max: $freqX - max(flatten($freqX))
none: $freqX

for #*5 it is:
min: $ivsccavg - extract($ivsccavg, 0)
max: $ivsccavg - max(flatten($ivsccavg))
none: $ivsccavg

I need to add a flatten operation because the result in e.g. $freqX are single values in 7 datasets (for avgMethodTesting2.pxp). Thus, our max() operation would determine the max in each dataset individually, but that is not what is wanted. The flatten operation should change n datasets with a single data point to an array with n elements.

Therefore, the max argument is currently not implemented yet until I have the flatten operation implemented.

An additional task from the issue is to add a variable that contains the names of the experiments. I can create this variable in the operation and add it to the variable storage of the formula notebook. It would be available then after the operation ran.
For now I thought of $ivscc_apfrequency_explist as name and it would be a string array.

Base automatically changed from feature/2592-refactor_sf_plotter2 to main December 17, 2025 21:59
@timjarsky

This comment was marked as outdated.

@MichaelHuth

This comment was marked as outdated.

Copilot AI review requested due to automatic review settings December 18, 2025 12:35
@MichaelHuth MichaelHuth force-pushed the feature/2599-ivscc_apfrequency_operation branch from bd0beed to d228f41 Compare December 18, 2025 12:35

This comment was marked as outdated.

@MichaelHuth MichaelHuth force-pushed the feature/2599-ivscc_apfrequency_operation branch from d228f41 to 5e60339 Compare December 18, 2025 16:59
Copilot AI review requested due to automatic review settings December 19, 2025 15:53
@MichaelHuth

This comment was marked as outdated.

This comment was marked as outdated.

@MichaelHuth MichaelHuth force-pushed the feature/2599-ivscc_apfrequency_operation branch from 0b71dcf to dc98aba Compare December 19, 2025 16:04
@timjarsky

Copy link
Copy Markdown
Collaborator

@MichaelHuth

Thanks for handling the metadata management for mismatched sweep numbers across experiments.

A few points for discussion:

  1. The marker coloring makes it hard for me to evaluate the output (see plot image below). Can we use a single color for each experiment? Can the data be a single 1D wave instead of multiple x-y waves (this will enable fitting)?

  2. There are many zero-frequency measurements spread across the x-axis.

  3. The average seems more variable than the input data, perhaps because there are too many data points?

  4. I'm not sure about the utility of the negative current values with "min" and "max" (second image). The two axes options that I'm sure are needed are none (where each FI curve starts at zero current and zero frequency) and the absolute current values.

ivscc_apfrequency(none, none)
image

ivscc_apfrequency()
image

Copilot AI review requested due to automatic review settings December 20, 2025 03:25
@MichaelHuth MichaelHuth force-pushed the feature/2599-ivscc_apfrequency_operation branch from dc98aba to 79f149a Compare December 20, 2025 03:25

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 5 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread Packages/MIES/MIES_SweepFormula.ipf Outdated
Comment thread Packages/MIES/MIES_SweepFormula_Operations.ipf Outdated
Comment thread Packages/MIES/MIES_SweepFormula_Operations.ipf Outdated
Comment thread Packages/MIES/MIES_SweepFormula_Operations.ipf Outdated
Comment thread Packages/MIES/MIES_SweepFormula_Operations.ipf Outdated
@MichaelHuth

MichaelHuth commented Dec 20, 2025

Copy link
Copy Markdown
Collaborator Author

@timjarsky

  1. I changed that. There are now experiment + 1 traces with markers. The +1 trace is the average in the average color. The experiment traces use the common table for trace colors, with one color per experiment. I also added code to show the experiment name in the legend for these.
  2. I still have to look into this, why a lot of the results return a zero. Currently the standard setting of apfrequency for the internal apfrequency call are used.
  3. Yes, it looks a bit like that. I did not see that in my local testing with the three experiments though. I guess in the graphs you pasted there is for some of the average points only a single sweep for an index in the groups.
    e.g. first exp has 10 and second exp has 11 sweeps selected, then sweep data for index 10 is only present from the second experiment -> only one sweep goes into the average and then the trace point from the experiment and the trace point from the average are equal. The average is shown in front and covers the point from the experiment. You may check for the average points on the very top if there is a data point from an experiment underneath.
  4. I think it is the other way around, with none no offset is applied. min moves the trace to zero and max moves the trace such that the former maximum point is at zero.
    What I think might be unexpected with the initial formula construct is that there is an offset used per trace. Thus, when changing none -> min then each trace start is moved to zero separately and the visual relation between the traces shifts. (same applies for max)
    This per-trace behavior is the same for the xaxisOffset and yaxisOffset.
image

@MichaelHuth MichaelHuth force-pushed the feature/2599-ivscc_apfrequency_operation branch from 79f149a to 95732dc Compare December 22, 2025 14:16
@MichaelHuth

Copy link
Copy Markdown
Collaborator Author

@timjarsky
Regarding 2.: The default level for apfrequency is 0. This results in zero peaks found for sweeps where E1 does not cross the zero line and for this apfrequency returns 0 as result with the default arguments.

I have added support for the apfrequency argument block after the first four argument for ivscc_apfrequency. The arguments are now:
ivscc_apfrequency([xaxisOffset, yaxisOffset, xAxisPercentage, yAxisPercentage, method, level, resultType, normalize, xAxisType])

The last four arguments are "forwarded" to apfrequency.

@timjarsky

Copy link
Copy Markdown
Collaborator

@MichaelHuth, Are failing sweeps included or filtered out? If included, please update to use only passing sweeps.

Copilot AI review requested due to automatic review settings December 22, 2025 19:09
@MichaelHuth

Copy link
Copy Markdown
Collaborator Author

@timjarsky New version, with support for seltag.

// with avgMode bins (default)
// ivscc_apfrequency([seltag, showSingleExp, xaxisOffset, yaxisOffset, xAxisPercentage, yAxisPercentage, prepareFit([...]), avgMode, binRange, binWidth, method, level, timeFreq, normalize, xAxisType])
//
// for avgMode: bins2
// ivscc_apfrequency([seltag, showSingleExp, xaxisOffset, yaxisOffset, xAxisPercentage, yAxisPercentage, prepareFit([...]), avgMode, method, level, timeFreq, normalize, xAxisType])

// seltag: optional, single or array of seltag
// showSingleExp: optional, on or off [default: on]
// xaxisOffset: first, min, max, none [default: min]
// yaxisOffset: first, min, max, none [default: min]
// xAxisPercentage: [0, 100]
// yAxisPercentage: [0, 100]
// prepareFit: See prepareFit([...]) operation, use prepareFit() to not make any fitting
// avgMode: bins, bins2 [default: bins]
// binRange: default: [0, 1000]
// binWidth: default: 100
//
// method, level, timeFreq, normalize, xAxisType are from apfrequency() with same defaults

In AB add tags, then load sweeps in SB.

The first agument seltag select exactly that tags give:
ivscc_apfrequency(seltag(tag1)) // selects experiments with exactly and only "tag1"
ivscc_apfrequency(seltag(tag1,tag2)) // selects experiments with exactly and only "tag1, tag2"
ivscc_apfrequency([seltag(tag1), seltag(tag2)]) // selects two groups of experiments, first with exactly and only "tag1", second with exactly and only "tag2"
ivscc_apfrequency(seltag("")) // select only experiments with no tag

When seltag argument is omitted, then it looks through all experiments and creates a group for all different tags lists. So if you have "tag1", "tag2", "tag1,tag2", "" then four groups of experiments are created.

To omit seltag you start the arguments for ivscc_apfrequency with showSingleExp, e.g. ivscc_apfrequency(off, ...).

If a resulting group has only one experiment, then no average trace and no fit from the average is created.

Slight adaptation in the calculation:

  • the f-I pairs of single experiments are sorted ascending by I for the trace, that prevents the previous seen zig-zagging of the lines. Now connecting the dots with a line makes sense from an analytical point
  • when the inflection point of the frequency is determined, some experiments yield no result (i.e. the frequency slope never changes to negative). In that case the averaging yielded NaN. I zap the NaNs now and average only the results from the experiments that show the slope change.

The new concatenated data zig-zags between the result points from the single experiment., which is to be expected. I sorted these f-I pairs as well.

Here are five experiments loaded, where the first two are tagged with "tag1" and the other 3 with "tag2", the formula is ivscc_apfrequency():

image

The dashed line are the concatenated points.

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude Code Review

Claude Code Review is paused for this repository. To reconnect it, an admin of this repository's GitHub organization (or the account owner, for personal repositories) who can also manage your Claude organization's Code Review settings needs to re-link GitHub in Code Review settings. This is a one-time step.

Tip: disable this comment in your organization's Code Review settings.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 23 out of 23 changed files in this pull request and generated 8 comments.

Comment thread Packages/MIES/MIES_SweepFormula_Operations.ipf
Comment thread Packages/MIES/MIES_SweepFormula_Operations.ipf
Comment thread Packages/MIES/MIES_SweepFormula_Operations.ipf
Comment thread Packages/MIES/MIES_SweepFormula_Operations.ipf
Comment thread Packages/MIES/MIES_SweepFormula_Operations.ipf Outdated
Comment thread Packages/MIES/MIES_SweepFormula_Executor.ipf
Comment thread Packages/doc/SweepFormula.rst
Comment thread Packages/doc/SweepFormula.rst
@timjarsky

Copy link
Copy Markdown
Collaborator

Hi @MichaelHuth , I'm having difficulty getting the latest version to work. Can you share an example formula? It looks like I'm making a basic syntax mistake:

image

@MichaelHuth

Copy link
Copy Markdown
Collaborator Author

Hi @MichaelHuth , I'm having difficulty getting the latest version to work. Can you share an example formula? It looks like I'm making a basic syntax mistake:

image

The seltag opertion takes a single argument, so it is either seltag([control, test]) with a text array or [seltag([control), seltag(test)] as array of seltags. The first selects experiments that have exactly the tags "control" and "test" and creates one group for these. The second variant creates two groups, one with experiments that have exactly and only the tag "control" and a second with exactly and only the tag "test".

The second argument (ShowSingleExp) is not an operation, but either "on" or "off" as simple text argument.

I think you want something like this:
ivscc_apfrequency([seltag(control), seltag(test)], on, $xAxisOffset, $yAxisOffset, $xAxisPercent, $yAxisPercent, $pfit, bins2)

This utility function averages points from X, Y pairs with the same X,
such afterwards X, Y pairs are present for each unique X.
A subwindow was added that has a GUI to add tags to experiments.
Tags for selected experiments are shown.
Based on the tags experiments can be selected.
- sweepMap has a new column that stores the tag list (comma separated)
seltag is an operation that prepares tag information that can later be
used with select to filter sweeps from experiments by tag.
…iple inputs

The function takes a 1d wave reference wave as argument.
Null wave elements are ignored.
The sweep formula executor did not support arrays of datasets directly
until now. This functionality was always indirectly through permanent
text waves which had some severe disadvantages:

- SF wave note data like data type got lost
- the consumer had to special handle the case where it needed to
  distinguish between a text wave with data and a text wave that
  possibly refers to datasets
- the consumer had to resolve that wave
- the resulting data structure was very unintuitive

We already had one case where a "hacky" workaround was used for datasets
in arrays. For select were two data types introduced:
SF_DATATYPE_SELECT and SF_DATATYPE_SELECTCOMP, where the first tagged
the dataset wave and the second the data wave. The first data type got lost
when select was used in arrays (a feature of select).

This commit introduces explicit handling for wave reference waves in the
executor. The wave type logic was extended to handle that additional to
out and outT (numeric / text).
One key difference is, that array dimensions do not get increased
on outer arrays for wave reference waves and wave reference waves are
always 1d.
The change in this commit supports no mixed type arrays. This is added
for datasets + another type in a following commit.

The new much cleaner and non-ambiguous data structure on an example:

Formula:
[dataset(1, \"abcd\"), dataset(2, \"cdef\")]

outer array -> size 1 wave ref wave
   -> array elements -> size 2 wave ref wave - two dataset statements
      -> array element 0 -> size 2 wave ref wave - from first dataset statement
         -> element 0 -> size 1 DP wave value 1
         -> element 1 -> size 1 TEXT wave value abcd
      -> array element 1 -> size 2 wave ref wave - from second dataset statement
         -> element 0 -> size 1 DP wave value 2
         -> element 1 -> size 1 TEXT wave value cdef

Because the datasets gets directly assigned, no SF meta information
gets lost.
When mixed arrays are encountered like [text, dataset(...)] then this
was only supported before the previous commit if the other elements
are text type because datasets were stored indirectly through a
textual reference (which is type compatible).

The previous commit added direct support for wave reference waves in
the executor.
This commit adds now promotion of text and numeric types to single
element dataset, when encountered in an array where another element is
a dataset type. This allows arrays where datasets are paired with
text/numeric elements.

The logic is added as a precheck and promotion if necessary.

As explicit dataset resolution by consumers is not required anymore
these were removed in the following locations:
- Test TestOperationOrVariableInArray where datasets in arrays are
  checked
- SFH_MoveDatasetHigherIfCompatible
- SFH_GetArgumentSelect
- SFH_GetDatasetArrayAsResolvedWaverefs
This change is necessary because ivscc_apfrequency should accept arrays
of seltag specifications. If seltag returns directly a text wave the
SF executor applies array expansion to return a single text wave
including all seltag specification (possibly dimension expanded).

To distinguish each seltag specification in the array the array
expansion must be mitigated. The solution for this is to wrap the seltag
results in single datasets. An array of datasets is always 1d and never
gets expanded.

Adapted also seltag test and evaluation of seltag result in select
operation.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 23 out of 23 changed files in this pull request and generated 7 comments.

Comment on lines +1505 to +1509
static Function AB_ClearExpBrowserSelection()

WAVE expBrowserSel = GetExperimentBrowserGUISel()
expBrowserSel[][0] = expBrowserSel[p][0] & ~LISTBOX_SELECT_OR_SHIFT_SELECTION
End
Comment on lines +4449 to +4453

if(isSelected)
expBrowserSel[i][0] = expBrowserSel[i][0] | LISTBOX_SELECT_OR_SHIFT_SELECTION
endif
endfor
Comment on lines +4457 to +4463
static Function AB_ExperimentListSelectAllRows()

WAVE expBrowserSel = GetExperimentBrowserGUISel()
expBrowserSel[][0] = expBrowserSel[p][0] | LISTBOX_SELECT_OR_SHIFT_SELECTION

AB_UpdateTagList()
End
Comment thread Packages/MIES/MIES_SweepFormula_Operations.ipf
Comment thread Packages/MIES/MIES_SweepFormula_Operations.ipf
Comment thread Packages/doc/SweepFormula.rst
Comment thread Packages/doc/SweepFormula.rst

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 23 out of 23 changed files in this pull request and generated 5 comments.

Comment thread Packages/MIES/MIES_SweepFormula_Operations.ipf
Comment thread Packages/MIES/MIES_SweepFormula_Operations.ipf Outdated
Comment thread Packages/doc/SweepFormula.rst
Comment thread Packages/doc/SweepFormula.rst
argOffset += 1
endif

args.showSingleExp = SFH_GetArgumentAsText(exd, opShort, argOffset + 0, defValue = SF_OP_IVSCCAPFREQUENCY_SHOWSINGLE_ON, allowedValues = {SF_OP_IVSCCAPFREQUENCY_SHOWSINGLE_ON, SF_OP_IVSCCAPFREQUENCY_SHOWSINGLE_OFF})

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 23 out of 23 changed files in this pull request and generated 7 comments.

Comment thread Packages/MIES/MIES_SweepFormula_Operations.ipf Outdated
Comment thread Packages/MIES/MIES_SweepFormula_Operations.ipf
Comment thread Packages/MIES/MIES_SweepFormula_Executor.ipf
Comment on lines +729 to +732
Make/FREE/T/N=(DimSize(indizes, ROWS)) experiments = sweepMap[indizes[p]][%FileName]
WAVE/T unqiueExperiments = GetUniqueEntries(experiments)

return unqiueExperiments
Comment thread Packages/doc/SweepFormula.rst
Comment thread Packages/doc/SweepFormula.rst
Comment thread Packages/doc/SweepFormula.rst

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 23 out of 23 changed files in this pull request and generated 3 comments.

Comment on lines +3100 to +3104
args.showSingleExp = SFH_GetArgumentAsText(exd, opShort, argOffset + 0, defValue = SF_OP_IVSCCAPFREQUENCY_SHOWSINGLE_ON, allowedValues = {SF_OP_IVSCCAPFREQUENCY_SHOWSINGLE_ON, SF_OP_IVSCCAPFREQUENCY_SHOWSINGLE_OFF})
args.xaxisOffset = SFH_GetArgumentAsText(exd, opShort, argOffset + 1, defValue = SF_OP_IVSCCAPFREQUENCY_MIN, allowedValues = {SF_OP_IVSCCAPFREQUENCY_FIRST, SF_OP_IVSCCAPFREQUENCY_MIN, SF_OP_IVSCCAPFREQUENCY_MAX, SF_OP_IVSCCAPFREQUENCY_NONE})
args.yaxisOffset = SFH_GetArgumentAsText(exd, opShort, argOffset + 2, defValue = SF_OP_IVSCCAPFREQUENCY_MIN, allowedValues = {SF_OP_IVSCCAPFREQUENCY_FIRST, SF_OP_IVSCCAPFREQUENCY_MIN, SF_OP_IVSCCAPFREQUENCY_MAX, SF_OP_IVSCCAPFREQUENCY_NONE})
args.xAxisPercentage = SFH_GetArgumentAsNumeric(exd, opShort, argOffset + 3, defValue = 100, checkFunc = BetweenZeroAndOneHoundred)
args.yAxisPercentage = SFH_GetArgumentAsNumeric(exd, opShort, argOffset + 4, defValue = 100, checkFunc = BetweenZeroAndOneHoundred)
Comment on lines +2425 to +2428
# averaging mode: bins
ivscc_apfrequency([xaxisOffset, yaxisOffset, xAxisPercentage, yAxisPercentage, prepareFitSpec, avgMode, binRange, binWidth, method, level, timeFreq, normalize, xAxisType])
# averaging mode: bins2
ivscc_apfrequency([xaxisOffset, yaxisOffset, xAxisPercentage, yAxisPercentage, prepareFitSpec, avgMode, method, level, timeFreq, normalize, xAxisType])
Comment on lines +2523 to +2539
Implicitly created variables:
The operation `ivscc_apfrequency` creates variables in the sweepformula variable storage. These variables are available after the `ivscc_apfrequency` call.
If a variable with that name existed previously it is overwritten.

+----------------------------------------+------------------------------------------------------------------------------------------------------------------------+
| variable | description |
+========================================+========================================================================================================================+
| `ivscc_apfrequency_explist` | A string array containing the experiment list `ivscc_apfrequency` worked on |
+----------------------------------------+------------------------------------------------------------------------------------------------------------------------+
| `ivscc_apfrequency_fit` | The result of the fit. The result can be used e.g. with `getmeta` to retrieve more information from the fit. |
| | See also operation `fit2`. Note: Even if no fit is displayed as trace that can happen if the fit resulted in an error, |
| | meta information can still be retrieved. |
+----------------------------------------+------------------------------------------------------------------------------------------------------------------------+
| `ivscc_apfrequency_inflection_current` | Current from each experiment in pA, where the slope of the frequency changes from positive to negative |
+----------------------------------------+------------------------------------------------------------------------------------------------------------------------+
| `ivscc_apfrequency_inflection_freq` | Frequency from each experiment, where the slope of the frequency changes from positive to negative |
+----------------------------------------+------------------------------------------------------------------------------------------------------------------------+
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Dedicated SF operation ivscc_apfrequency Introduce plotter feature to add errorbars to traces

4 participants