Skip to content
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

Revise sweepformula select operation #2109

Merged
merged 38 commits into from
Oct 15, 2024
Merged

Revise sweepformula select operation #2109

merged 38 commits into from
Oct 15, 2024

Conversation

MichaelHuth
Copy link
Collaborator

@MichaelHuth MichaelHuth commented May 13, 2024

  • implementation
    • add new tag to data to skip plotting in formula plotter, skip plotting filter.ranges component
    • set data types on sub waves of combined data (multiple data sets of different type)
    • in upmost wave add custom legend text representation of filter.ranges data
    • workaround PSQ_RHEOBASE for sweepQC, ...Dashboard.ipf L342
    • proper SCI handling (setQC only)
    • add to data
    • review play around
    • add to other select dependent operations
    • add second revision sel* operations
  • docu
  • Modifying ifn SF documentation needs to wait for SweepFormula/psxKernel: Various fixes #2023
  • After documentation review from TB, the SF notebook can be updated
  • tests

close #2012

@MichaelHuth

This comment was marked as outdated.

@MichaelHuth MichaelHuth force-pushed the feature/2109-revise_sf_select branch from 7cf1688 to 34946fa Compare May 29, 2024 11:34
@MichaelHuth

This comment was marked as outdated.

@MichaelHuth MichaelHuth assigned t-b and unassigned MichaelHuth May 30, 2024
@t-b

This comment was marked as outdated.

@t-b

This comment was marked as outdated.

@t-b t-b assigned MichaelHuth and unassigned t-b and timjarsky Jun 7, 2024
@MichaelHuth MichaelHuth force-pushed the feature/2109-revise_sf_select branch 2 times, most recently from 6bc86da to eb0554d Compare June 12, 2024 17:22
@t-b

This comment was marked as outdated.

@MichaelHuth MichaelHuth force-pushed the feature/2109-revise_sf_select branch 3 times, most recently from a0964b1 to 81891f4 Compare June 19, 2024 14:41
@t-b

This comment was marked as outdated.

@t-b

This comment was marked as outdated.

@timjarsky

This comment was marked as outdated.

@MichaelHuth

This comment was marked as outdated.

@t-b

This comment was marked as outdated.

…m a graph + sweepNo

- Added SFH_GetLabNoteBooksForSweep to retrieve LNB only
- Added SFH_GetLabNoteBooksAndDFForSweep to retrieve LNB and SweepDFR

These functions abstract the differences between a graph that is a DB and a SB.
For an SB graph a valid mapIndex must be given as argument.

preparation commit for the following changes
@t-b
Copy link
Collaborator

t-b commented Oct 14, 2024

I've adapted PSX to now correctly use the LBNs with mapIndex. For that I also pulled out the earlier adapations to now have them in only one commit.

Range-diff: range-diff.txt

Will merge once CI passes.

@t-b t-b force-pushed the feature/2109-revise_sf_select branch from 5e73286 to 045a9a6 Compare October 14, 2024 19:59
MichaelHuth and others added 21 commits October 15, 2024 14:06
problem described in #2151

SF requires to retrieve the correct LNBs and sweepDFR for sweeps.
Through the analysisbrowser sweeps from multiple devices and/or
experiments can be loaded. This must be handled correctly or wrong
data is retrieved/analysed.

Thus, SF functions that retrieve sweep data are adapted to handle that
correctly. For selections a forth column was added to store the mapIndex
of the sweepMap that is unique for a sweepNo, experiment, device combination.

For graphs from SB the mapIndex is used to retrieve the correct LNB, SweepDF.

** THIS BUGFIX IS LIMITED TO SWEEP HANDLING IN SWEEPFORMULA **

Other parts of MIES may be still unaware of multiple experiment/devices in the SB.
- allows to select device and experiment
- only one of these opeations are allowed for select and they must each
yield a single result, but allow wildcards
- the remaining behavior is like selrange where the information is taken from
the outermost select only.

- Add sweepMapIndex to trace user data in CreateTiledChannelGraph
- Rewrite of selection gathering and adaptations to sweep getting to be
aware of different experiment that require to work with sweepmap indices
instead of sweep numbers.
- adaptations of all SF functions that retrieve LNB and sweepDFR to be aware
  of multiple experiments present in a sweeepbrowser that could be selected
  by select
- remove now unused and obsolete BSP_GetSweepDF function
selexpandsci: Extends the selected sweeps with all sweeps from the same
stimset cycle id

selexpandrac: Extends the selected sweeps with all sweeps from the same
repeated acquisition cycle

The operations take no arguments. The feature is enabled if they are
added to select(....)

if both are used then first SCI and then RAC is applied.
- both operations take exactly one numerical argument
that sepcifies a specific setCycleCount and/or setSweepCount

- if not used in select then the filter is ignored
both operation take exactly one numeric argument specifying the index

selRACIndex selects all selections that have a specific index within a
repeated acquisition cycle

selSCIIndex selects all selections that have a specific index within a
stimset cycle
For some cases select was returning a zero sized wave for no results.
This was unified to be a null wave and the select argument parsing was
adapted to distinguish between regular filters from sel* operations and
select arguments
- selsweeps can return a null wave that was used as default value for the
  select filter. This clash was resolved by adding a seperate flag to
  indicate if select got any sweep numbers as argument.
  The checks for the default were changed to check against the new flag
  instead.
  The flag approach also keeps the check against specifying selsweeps
  multiple time intact.
- for seldev, selexp, selsetcyclecount, selsetsweepcount, selsciindex,
  selracindex, selexpandsci, selexpandrac
… usage

In principle the sweep browser supports multiple devices/experiments.
However not all sweep browser functions imlement a suitable API for that.
SB_GetSweepIndexFromMap is such function. When running tests it asserts now
if sweep numbers appear more than once, which can happen when multiple
experiments are loaded and this function is called.
- selsetcyclecount, selsetsweepcount, selsciindex, selracindex
- selexpandsci, selexpandrac
- sometimes PS_PB6 acquires sweep 2 as full sweep if the computer is slow.
However the test checked if there are no results.

If there was a full sweep acquired it tests now against existing results.
- LNB is handed down from SF_GetSelectData
- For the displayed case the LNBs are gathered per trace with TUD data from
  CreateTiledChannelGraph
- LNB handed down from SF_GetSelectData
- Uses correct LNB now for SB case
…tilities_Logbook.ipf

- use GetHeadStageForChannel to retrieve headstage
- Add function documentation
- adapt call sites
This avoids having invalid data in there.

Missed in the initial implementation in abe808f (SF: Add select
operation to select sweeps for data, adapted data operation, 2022-02-04).
In the same spirit as d5b560f (Bugfix: SF use proper handling of
sweepMap for SB, 2024-10-04) but for PSX.

We also need to include now the experiment name in the combo key to make
it unique. And for the stats equivalence data we also include the
sweepmapindex next to the sweepNo.
@t-b t-b force-pushed the feature/2109-revise_sf_select branch from 045a9a6 to bf10c95 Compare October 15, 2024 12:12
@t-b t-b self-requested a review October 15, 2024 16:14
@t-b t-b enabled auto-merge October 15, 2024 16:15
@t-b t-b merged commit 28e1afc into main Oct 15, 2024
20 checks passed
@t-b t-b deleted the feature/2109-revise_sf_select branch October 15, 2024 23:12
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.

Extend the select operation to allow more fine grained sweep selection
3 participants