Skip to content

Conversation

@MichaelHuth
Copy link
Collaborator

close #855

@MichaelHuth MichaelHuth self-assigned this Jun 21, 2023
@MichaelHuth MichaelHuth force-pushed the feature/1791-add_ttl_stimsets branch 4 times, most recently from a96fb77 to d1f4bef Compare June 28, 2023 02:44
@t-b
Copy link
Collaborator

t-b commented Jun 28, 2023

Its way too late here for a proper review but I think that in 5149f3d the indexing of statusTTLFiltered is wrong. It should be by active channel aka i. See how DC_ITC_MakeTTLWave does it in main.
Also the commit changing behaviour should also have the changed tests.
And every commit which adds/changes labnotebook entries (including the meaning) should raise the labnotebook version. Otherwise I don't find all the places where the LBN was changed with tools/create-changelog.sh.
2a04ea5 needs a "introduced in XXX" part of the commit message and an explanation why this was not found earlier including the consequences of the bug. And a tests which fails without that fix.

@MichaelHuth
Copy link
Collaborator Author

Its way too late here for a proper review but I think that in 5149f3d the indexing of statusTTLFiltered is wrong. It should be by active channel aka i. See how DC_ITC_MakeTTLWave does it in main.

statusTTLFiltered has NUM_DA_TTL_CHANNELS, thus indexes over the channels. Whereas in main the loop in DC_ITC_MakeTTLWave also indexed from 0 to NUM_DA_TTL_CHANNELS after the change I index over the number of active TTL channels (0 to s.numTTLEntries).
The active channel number is retrieved through the config wave by channelNumber = config[i + ttlOffset][%ChannelNumber], that corresponds to iin main.

@MichaelHuth MichaelHuth force-pushed the feature/1791-add_ttl_stimsets branch from ca2b427 to 0e41060 Compare June 29, 2023 05:16
@t-b
Copy link
Collaborator

t-b commented Jun 29, 2023

Its way too late here for a proper review but I think that in 5149f3d the indexing of statusTTLFiltered is wrong. It should be by active channel aka i. See how DC_ITC_MakeTTLWave does it in main.

statusTTLFiltered has NUM_DA_TTL_CHANNELS, thus indexes over the channels. Whereas in main the loop in DC_ITC_MakeTTLWave also indexed from 0 to NUM_DA_TTL_CHANNELS after the change I index over the number of active TTL channels (0 to s.numTTLEntries). The active channel number is retrieved through the config wave by channelNumber = config[i + ttlOffset][%ChannelNumber], that corresponds to iin main.

No, look at the code https://github.com/AllenInstitute/MIES/blob/main/Packages/MIES/MIES_DataConfigurator.ipf#L682 for ITC.

@MichaelHuth MichaelHuth force-pushed the feature/1791-add_ttl_stimsets branch 4 times, most recently from 4e671ae to 34e4c2c Compare June 30, 2023 13:18
@t-b
Copy link
Collaborator

t-b commented Jul 2, 2023

@MichaelHuth How should we proceed here?

@t-b t-b force-pushed the feature/1791-add_ttl_stimsets branch from 77c7336 to 344e5ee Compare July 3, 2023 18:21
@MichaelHuth MichaelHuth force-pushed the feature/1791-add_ttl_stimsets branch 5 times, most recently from 99dce3e to 9bfa7c4 Compare July 4, 2023 18:45
@MichaelHuth MichaelHuth mentioned this pull request Jul 4, 2023
@MichaelHuth MichaelHuth force-pushed the feature/1791-add_ttl_stimsets branch 2 times, most recently from 04d218d to 46470fc Compare July 6, 2023 03:05
@MichaelHuth
Copy link
Collaborator Author

@t-b The part of new commits after #1797
starts with 61b4c53 (Tests: Fix UnassociatedChannelsAndTTLs numRacks determination, 2023-06-28)

@MichaelHuth MichaelHuth assigned t-b and unassigned MichaelHuth Jul 6, 2023
@MichaelHuth MichaelHuth force-pushed the feature/1791-add_ttl_stimsets branch from 46470fc to e772d54 Compare July 6, 2023 13:05
- supports additionally to DA channels now also TTL channels
- adapt all occurences of EP_AddEpochs
- adapt calls in EP_SortEpochs and EP_GetEpochs
- needs to be reduced to single channel wave before calling FindIndizes as
  FindIndizes does not support chunks
- name single channel epoch wave consistently "epochInfoChannel"

Adapt test for EP_GetEpochs for assertion on invalid channel type

- TTL channels are now allowed, so we ask for an always invalid channel type
- introduce static function EP_AdaptEpochInfoChannel that adapts the
  epoch information of a single channel
- for DAC channels the hardware channel number from the config wave equals
  the gui channel number, for TTL channels the indexing is over the gui
  channel numbers.
- added early return für empty epochs in EP_FetchEpochs because the loop
  over all TTL channels in AppendLBNEpochs tries also to fetch from
  non-existing epoch channels.
- in EP_WriteEpochInfoIntoSweepSettings
- for channel 0 - 7 using the format from CreateTTLChannelLBNKey
- also add description for new entries to description file
- increase SWEEP_SETTINGS_WAVE_VERSION
- no functional change
- prepares adding a function to collect epoch info for TTL that follows a
  different logic
- it is not used
- no functional change
- as TTL stimsets do not use a scaling factor, the scale is set to 1
  for TTL channels
…hannels

- the epoch is setup the same way as the creation of the DAQDataWave
- EP_AddEpochsFromStimSetNote is used also for TTL epochs

Add epoch test for TTL channels, update TestEpochsGeneric for TTL

- The new test also enables TTL channels
- TestEpochsGeneric was adapted to also check TTL channels for epoch information
- The EpochsTight check was wrapped in a function that takes the channel type
  as argument
- previously EPOCH_SN_BL_DDAQTRAIL

The new constant name is more descriptive as we use that epoch generically to
fill the time intervall after stim sets in channels. Each channel can have a
stim set of different length or in case of OODAQ even shifted stim sets.
…I channel

- the function takes the hardware channel number and tlBit information and returns
  the GUI channel number for TTL channels
- this commit is a preparation for the following commit, where this function
  is used
- trace infos from associated channels (AD or DA), unassociated DA and TTL
  are collected and concatenated
- renamed channelNumber to hwChannelNumber from traceInfos to emphasize which
  channel number we are working with
- added for distinction guiChannelNumber variable for calls that take the GUI
  channel number
- add new field visualizeEpochs to TiledGraphSettings structure
  to prevent showing TTL epoch axes if the unsplitted TTL trace
  is shown

- epochs are only shown for TTL if splitTTLBits checkbox is activated as well
@MichaelHuth MichaelHuth force-pushed the feature/1791-add_ttl_stimsets branch from 4bdbe06 to e6d6f19 Compare July 13, 2023 13:03
@MichaelHuth MichaelHuth assigned t-b and unassigned MichaelHuth Jul 13, 2023
@t-b t-b self-requested a review July 13, 2023 14:02
@t-b t-b enabled auto-merge July 13, 2023 14:03
@t-b t-b merged commit 8fc9783 into main Jul 13, 2023
@t-b t-b deleted the feature/1791-add_ttl_stimsets branch July 13, 2023 15:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add epoch info for TTL stimsets into LBN

4 participants