-
Notifications
You must be signed in to change notification settings - Fork 9
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
Adaptive Supra enhancements #2123
Merged
t-b
merged 47 commits into
main
from
feature/2123-dascale-adaptive-supra-threshold-reuse-fi-data
Aug 6, 2024
Merged
Adaptive Supra enhancements #2123
t-b
merged 47 commits into
main
from
feature/2123-dascale-adaptive-supra-threshold-reuse-fi-data
Aug 6, 2024
Conversation
This file contains 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
21741f8
to
85030ef
Compare
85030ef
to
c216078
Compare
c216078
to
3394779
Compare
558c93d
to
71c7091
Compare
@timjarsky Ready for a first test. |
0873c5e
to
07a83bc
Compare
aa30210
to
4035595
Compare
9715991
to
8c403a7
Compare
We can't trigger a situation where the total fit over all f-I/DaScale values fails but the fit for PSQ_DA_NUM_POINTS_LINE_FIT points passes in PSQ_DS_FitFrequencyCurrentData.
…verride active This catches test setup errors earlier and with a better error message.
Now that we also consider RhSuAdd sweeps for set QC, it does not make sense to enfore that NumSweepsWithSaturation is smaller than the sweeps in the stimset.
We now use the previous acquired (RhSuAd) sweeps for judging if we have enough passing sweeps with f-I slope QC. For this we need to store the list of passing RhSuAd sweeps together with their f-I slope QC status. Calculating the f-I slope QC for these sweeps posed the problem that we have to distinguish sweeps which are left to the maximum slope (usually smaller but not passing) to the ones to the right. We now take that into account in PSQ_DS_CalculateReachedFinalSlope. This made it also required to keep f-I slope values which stem from duplicated apfreq values. These are now added with the value -inf (PSQ_DS_SKIPPED_FI_SLOPE). These changes now can create the situation that we start a adaptive suprathreshold measurement but due to previous RhSuAd sweep already passing enough for our numSweepsWithSaturation we just repeat the last DAScale value and are done. The function PSQ_DS_GetLabnotebookData does all the heavy lifting for getting the desired labnotebook values for the RhSuAd data and the current SCI.
It now does not filter out NaN values and also allows to filter out data values like f-I slope which is calculated for two sweeps.
This does all the heavy lifting for us.
Since we now also look at RhSuAd sweeps we always have at least one sweep passing so the wave is never null.
The condition for a passing f-I slope should actually compare the DAScale values instead of the indizes.
… well This is a defense-in-depth check as fitSlope can never be smaller than NaN, but it expresses the intent better.
We can nowadays use a configuration option to achieve it, so let's just prefer that.
For PSQ_DAScale Adaptive Suprathreshold it can be the case that all sweeps pass but as we don't have enough fI slope QC passes the set still fails. Take that into account by returning an empty string when all sweeps pass.
This has the complication that we need to remove one point from the DAScale array as the slope is always between two values. Also CheckSurveyPlot needs to be revised as the plots now can not be distinguished anymore by the number of traces.
We need to take NumSweepsWithSaturation into account. We also make the fail message easier to grasp with not mentioning the exact slope percentages. And while at it we also reorder the messages to complain about not reaching futureDASCale at the end as this error is quite common.
e0f0d38
to
e6bf6b0
Compare
@timjarsky I've rebased against main so that #2213 is included here. Would be good to update the rig computer with the version from the latest CI. |
timjarsky
approved these changes
Aug 5, 2024
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.
A: No revision, but our method to determine the sweeps with saturation should change. We only want to consider sweeps with passing f-I slope and passing sweep QC which have a larger DAScale value than the maxSlope sleep.
PS_DS_AD8
). If this happens in the adaptive suprathreshold run this is equivalent to a NaN f-I slope/offset and we just try again. This is also covered in a test.Show them in one line as they need to be consecutively (with ignoring failed sweeps).Requires:
Close #2119
Close #2129
Close #2130
Close #2141
Close #2131