AllenInstitute / MIES

Multichannel Igor Electrophysiology Suite
https://alleninstitute.github.io/MIES/user.html
Other
21 stars 6 forks source link

SFH: Allow a single promotion of datasets to higher level for range specification #2143

Closed MichaelHuth closed 2 weeks ago

MichaelHuth commented 3 weeks ago
e.g. [dataset(1, 2), dataset(3, 4)] -> dataset([1, 3], [3, 4]) 
e.g. [dataset(1, 2, 3), dataset(4, 5, 6)] -> dataset([1, 4], [2, 5], [3, 6]) 
e.g. [dataset(1, 2), dataset(4, 5), dataset(6, 7)] -> dataset([1, 4, 6], [2, 5, 7]) 

Requirements that this is possible are:

Add this logic when ranges are resolved for constructs like

selDA=select(channels(DA), sweeps())
selAD=select(channels(AD), sweeps())

data([min(epochs(E0, $selDA)), max(epochs(E0, $selDA))], $selAD)

where epochs returns multiple datasets for > 1 sweep and/or more than one AD/DA channel.

close #2142

t-b commented 3 weeks ago

Review: e0cd5bfb0 (SFH: Introduce function SFH_MoveDatasetHigherIfCompatible, 2024-06-11)

maybe these should be switched? Same for the text branch.

14435a846 (SF: Adapt FormulaPlotter with attempted auto extension of data sets, 2024-06-12)

selAD=select(channels(AD), sweeps())
start=max(epochs(E0, $selAD))
end=max(epochs(E0, $selAD)) + 500
startEnd=[$start]

$startEnd

bugs out with 1HS (one DA/AD) and multiple sweeps

t-b commented 3 weeks ago

@timjarsky Ready to test

timjarsky commented 3 weeks ago

@MichaelHuth @t-b The following SF code works in this PR. Awesome!

rng=[(2+(max(epochs(E1, $selDA)))),(200 + max(epochs(E1,$selDA)))]

AHPdata=data($rng, $selAD)

$AHPdata

However,

$rng

returns an empty plot.

t-b commented 3 weeks ago

@timjarsky What kind of data do you have?

Here

selDA=select(channels(DA), sweeps())
selAD=select(channels(AD), sweeps())

rng=[(2+(max(epochs(E1, $selDA)))),(200 + max(epochs(E1,$selDA)))]

AHPdata=data($rng, $selAD)

$AHPdata

and

$rng

Works with three sweeps and 1HS.

timjarsky commented 3 weeks ago

C57BL6J-742780.14.03.03.zip @t-b using the dashboard, select the rheo, supra, and adaptive supra stimsets.