-
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
SweepFormula: Support TTL channels #1817
Comments
@t-b twist: the primary use case for TTL epochs is to use them to extract AD channel data. |
If that twist always applies it is easy to implement. |
@t-b it does always apply. So, do TTL epochs need a channel prefix so something like |
@t-b ....or maybe we need a range operation. e.g., range(channel, epoch).....data(range(TTL0, E0), select(channels(AD0), sweeps()) |
Using the patch proposed by Michael diff --git a/Packages/MIES/MIES_SweepFormula.ipf b/Packages/MIES/MIES_SweepFormula.ipf
index 23d0503f17..b088b0c7ed 100644
--- a/Packages/MIES/MIES_SweepFormula.ipf
+++ b/Packages/MIES/MIES_SweepFormula.ipf
@@ -2104,7 +2104,7 @@ static Function/WAVE SF_GetActiveChannelNumbersForSweeps(string graph, WAVE/Z ch
channelNumber = channels[j][%channelNumber]
if(IsNaN(channelType))
- settingList = "ADC;DAC;"
+ settingList = "ADC;DAC;TTL;"
else
switch(channelType)
case XOP_CHANNEL_TYPE_DAC:
@@ -2113,6 +2113,9 @@ static Function/WAVE SF_GetActiveChannelNumbersForSweeps(string graph, WAVE/Z ch
case XOP_CHANNEL_TYPE_ADC:
settingList = "ADC;"
break
+ case XOP_CHANNEL_TYPE_TTL:
+ settingList = "TTL;"
+ break
default:
sprintf msg, "Unhandled channel type %g in channels() at position %d", channelType, j
SFH_ASSERT(0, msg)
@@ -2131,6 +2134,10 @@ static Function/WAVE SF_GetActiveChannelNumbersForSweeps(string graph, WAVE/Z ch
channelType = XOP_CHANNEL_TYPE_ADC
maxChannels = NUM_AD_CHANNELS
break
+ case "TTL":
+ channelType = XOP_CHANNEL_TYPE_TTL
+ maxChannels = NUM_DA_TTL_CHANNELS
+ break
default:
SFH_ASSERT(0, "Unexpected setting entry for channel type resolution.")
break with TTL_2023_07_12_154006.zip from the issue1817 folder on the FTP. When using the SF formula
I get two ranges. The reason is that the select expression results in two matches as for TTL0 we have the same hardware channel on ITC. Maybe the returned channel numbers for select should be GUI channel numbers? |
This comment was marked as outdated.
This comment was marked as outdated.
Chat with Michael:
Function/WAVE GetDAQDataSingleColumnWaveNG(WAVE numericalValues, WAVE/T textualValues, DFREF sweepDFR, variable channelType, variable GUIchannelNumber)
End . This calls GetDAQDataSingleColumnWave always with
|
select
/data
/epochs
should also support data from TTL channels.The text was updated successfully, but these errors were encountered: