-
Notifications
You must be signed in to change notification settings - Fork 9
PSX iterations #2427
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
t-b
wants to merge
54
commits into
main
Choose a base branch
from
feature/2427-psx-iterations
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
PSX iterations #2427
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The returned wave is the same as was passed in. Although the current code makes it clear what is input and what is output, this creates verbose code as you can't have the same wave as input (RHS) and output (LHS) of an equation. So let's drop the returned wave.
And rename them to emphasize the label component as the y data unit is only the fallback.
In e26f03a (SF: Adapt logic how x-waves are mapped to y-waves, 2022-08-19) we added code to special case x/y wave mapping. But we don't need to do that if we have single point x and y waves only.
This preserves wave metadata like units.
…s' into HEAD * bugfix/2423-sweepformula-multiple-axis-labels-for-x-axis: SF_GatherAxisLabels: Also gather the x-labels SF_FormatUnit: Factor it out SF_GatherFormulaResults: Prefer Duplicate over new Make SF_GatherFormulaResults: Skip special case for single x and y wave pairs Tests: Add TestAxisLabelGathering SF_FormulaPlotter: Move SF_CombineAxisLabels closer to its usage SF_FormulaPlotter: Generalize y axis label handling SF_GatherYUnits: Drop return value SF_CombineYUnits: Prefer TextWaveToList SF_FormulaPlotter: Factor traceCnt check out
By accepting the text wave to be pretty printed we can let the visualized data and the data copied to the clipboard differ so that the latter can be more easily C&P'ed into tab calculations like Excel/Calc.
…nto HEAD * feature/2424-easier-copy-and-paste-from-psx-to-excel: UpdateInfoButtonHelp: Set machine-readable text for C&P
We already call PSX_UpdateAllEventGraph with all flags set in PSX_PostPlot. So using PGC for each control and doing a partial update is just a waste of CPU cycles. This also fixes a bug where the Fit accepted average checkbox was checked and the restore triggered an assertion as the single event waves were not yet up-to-date.
When having a SF formula like psxStats vs [0, 1] the xWave has not the same size anymore. So we need to refetch the x-wave in this case.
Taking the start of the single event (0) does not work that well. So let's take 10% of the mean peak time instead.
Requested by Tim Jarsky.
The current algorithm for determining the left boundary for the baseline search did not take into account events which are close-by. Fix that by using the peak time of the previous event as maximum boundary.
We do override the box size for the find peak search as that is a quick fix but not that dirty. Some minor test adjustments were also required.
When the calculated average standard deviation is NaN we can still get a tau of NaN. Use the fallback value in this case.
And rename the original function to PSX_CalculateRiseTimeWrapper.
This is always zero.
…tion for accepted average fit
…al fit For the individual event decay fit. Weighted tau is computed for each event.
…events average wave
New MiES algorithmic utility for band pass filtering with Nan, Inf, and rinnging rejection and automatic order reduction
Rename it to psxDeconvBPFilter to make it clear that this is a bandpass filter, see also PSX_DeconvoluteSweepData. And also reorder the filter frequencies for the user to avoid an assertion.
Due to implementation details of how FilterIIR implements band pass filters the used order is always even. If required, odd values are increased by one so that they are even. Document that and also make them even already when we get them. We can as well adap the default value to be even already.
Define all variables at the top, reword the documentation.
When PSX_OperationSweepGathering returns 1 as error code, we wrote the code so that idx is not incremented in this case. The idea in d359a7a (PSX_Operation: Handle partial results better, 2024-02-27) was that we don't want holes in the output wave. But the code was buggy as it, after an error, would reuse the same data again, and thus error out again, and therefore ignoring all data behind the first combination with an error. Fix that by introducing separate indizes for reading and writing.
A common tweaking algorithm done by users is to find the lowest filter order which has the data from all combinations passing. As that is manually quite tedious we now do that for her. The idea is to start at some maximum order and then get he realized order for each combination. If the realized order is constant for all combinations, we are done. Otherwise we try the minimum order again and should then be finished. This is done for both sweep and deconv.
This gives better error messages.
We need to preprocess the code before we can extract the variables and the formula. Broken since 8ec6945 (SF: Add support to check also variables with the check button, 2023-03-29).
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
psxKernel
a pure data containerpsx
AddPsxIterations([iterations = 0])
operationiterations > 0