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

Various updates #1875

Merged
merged 7 commits into from
Sep 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified Packages/MIES/SweepFormulaHelp.ifn
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed Packages/doc/Scans/SweepFormulaDataModelNotes9.png
Binary file not shown.
Binary file removed Packages/doc/Scans/SweepFormula_data_1.png
Binary file not shown.
Binary file removed Packages/doc/Scans/SweepFormula_data_2.png
Binary file not shown.
Binary file removed Packages/doc/Scans/SweepFormula_data_3.png
Binary file not shown.
Binary file modified Packages/doc/ScreenShots/RelevantColors.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 9 additions & 2 deletions Packages/doc/SweepFormula.rst
Original file line number Diff line number Diff line change
Expand Up @@ -562,8 +562,10 @@ channels

`channels([str name]+)` converts named channels from strings to numbers.

The function accepts an arbitrary amount of channel names like `AD`, `DA` or `TTL` with a combination of numbers `AD1` or channel numbers alone like `2`.
The maximum allowed channel number is `NUM_MAX_CHANNELS` (16).
The function accepts an arbitrary amount of channel names like `AD`, `DA` or
`TTL` with a combination of numbers `AD1` or channel numbers alone like `2`.
The maximum allowed channel number is `NUM_MAX_CHANNELS` (16). For all channel
types the channel numbers as given on the DAEphys panel are accepted.
The operation returns a numeric array of `[[channelType+], [channelNumber+]]` that has as
row dimension the number of the input strings.
When called without argument all channel types / channel numbers are set by setting the
Expand Down Expand Up @@ -695,6 +697,11 @@ The returned data type is `SF_DATATYPE_SWEEP`.
// No double resolve of the same epoch name: Shows sweep data from epoch "TP" of the AD channels of all displayed sweeps.
data(["TP","TP"], select(channels(AD), sweeps()))

// extract the first pulse from TTL1 as epoch and extract the AD data
// in that range
ep = epochs(E0_PT_P0, select(channels(TTL1),sweeps()))
data($ep,select(channels(AD),sweeps()))

labnotebook
"""""""""""

Expand Down
71 changes: 0 additions & 71 deletions Packages/doc/developers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -414,77 +414,6 @@ Note that in contrast ``ED_AddEntryToLabnotebook`` is used to add specific user
and **is not suited** for setting up generic test LBN entries.
More example code can be found in ``PrepareLBN_IGNORE`` in UTF_Labnotebook.ipf.

Original Developer Docu on SweepFormula
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Notebook scans from Matthias (`ukos-git`_):

.. _ukos-git: https://github.com/ukos-git

.. figure:: Scans/SweepFormula_data_1.png
:align: center

.. figure:: Scans/SweepFormula_data_2.png
:align: center

.. figure:: Scans/SweepFormula_data_3.png
:align: center

The following information is taken from annotated excerpts from the above:

- getter functions

.. figure:: Scans/SweepFormulaDataModelNotes1.png
:align: center

- Return data array with sweep and channel information

.. figure:: Scans/SweepFormulaDataModelNotes2.png
:align: center

- Data slicing with 2d location functions

.. figure:: Scans/SweepFormulaDataModelNotes3.png
:align: center

- no comment given

.. figure:: Scans/SweepFormulaDataModelNotes4.png
:align: center

.. figure:: Scans/SweepFormulaDataModelNotes5.png
:align: center

.. figure:: Scans/SweepFormulaDataModelNotes6.png
:align: center

.. figure:: Scans/SweepFormulaDataModelNotes7.png
:align: center

- Plot

.. figure:: Scans/SweepFormulaDataModelNotes8.png
:align: center

.. figure:: Scans/SweepFormulaDataModelNotes9.png
:align: center

- Functions reducing a dimension of data

.. figure:: Scans/SweepFormulaDataModelNotes10.png
:align: center

.. figure:: Scans/SweepFormulaDataModelNotes11.png
:align: center

.. figure:: Scans/SweepFormulaDataModelNotes12.png
:align: center

.. figure:: Scans/SweepFormulaDataModelNotes13.png
:align: center

- Note on time aka xvalue concatenation logics

Adding support for new NI hardware
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,11 @@
#pragma ModuleName=MIES_RS
#endif

#include "MIES_Include"

static Function/S GetSavePath()

string folder, pathName

folder = GetFolder(FunctionPath("")) + "ScreenShots"
folder = GetFolder(FunctionPath("")) + ":ScreenShots"
CreateFolderOnDisk(folder)
pathName = GetUniqueSymbolicPath()
NewPath/O/Q $pathName, folder
Expand Down Expand Up @@ -250,25 +248,32 @@ Function CreateRelevantColorsGraph()

// headstage colors
for(i = 0; i < NUM_HEADSTAGES; i += 1)
//[s] = GetHeadstageColor(i)
sprintf str, "\\K(%d, %d , %d) Headstage %d\r", s.red, s.green, s.blue, i
[s] = GetHeadstageColor(i)
sprintf str, "\\K(%d, %d, %d) Headstage %d\r", s.red, s.green, s.blue, i
contents += str
endfor

contents += "\rTTL colors\r"
[s] = GetHeadstageColor(NUM_HEADSTAGES)
sprintf str, "\\K(%d, %d, %d) Independent\r", s.red, s.green, s.blue
contents += str

[s] = GetTraceColorForAverage()
sprintf str, "\\K(%d, %d, %d) Average\r", s.red, s.green, s.blue
contents += str

contents += "\r\\K(0, 0, 0)TTL colors:\r"

for(i = 0; i < 2; i += 1)
sprintf str, "\\K(0, 0, 0)Rack %s\r", SelectString(i, "Zero", "One")
contents += str

[s] = GetHeadstageColor(NaN, channelType = "TTL", activeChannelCount=i)
sprintf str, "\\K(%d, %d , %d) Sum\r", s.red, s.green, s.blue
[s] = GetHeadstageColor(NaN, channelType = XOP_CHANNEL_TYPE_TTL, channelNumber = i * NUM_ITC_TTL_BITS_PER_RACK, isSplitted = 0)
sprintf str, "\\K(%d, %d, %d) Sum\r", s.red, s.green, s.blue
contents += str
for(j = 0; j < 4; j += 1)
[s] = GetHeadstageColor(NaN, channelType = "TTL", activeChannelCount=i, channelSubNumber = j + 1)
sprintf str, "\\K(%d, %d , %d) Single\r", s.red, s.green, s.blue
[s] = GetHeadstageColor(NaN, channelType = XOP_CHANNEL_TYPE_TTL, channelNumber = i * NUM_ITC_TTL_BITS_PER_RACK + j, isSplitted = 1)
sprintf str, "\\K(%d, %d, %d) Single\r", s.red, s.green, s.blue
contents += str

endfor
endfor

Expand Down
Loading