完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
扫一扫,分享给好友
大家好我已经设置了一个“离散”数据格式的文本文件来访问多个S2P文件。
我扫描了索引并将所有S2P文件导入ADS数据集。 我能够一次绘制所有索引或一次绘制一个索引。 但是,我无法绘制不连续的索引。 详细说明:假设我的“离散”数据格式的文本文件如下所示:begindscrdata%Filenumber Filename 1file1.s2p 2file2.s2p 3file3.s2p ...... 10file10.s2p enddscrdata将索引从1扫描到10后,我 我想在同一块情节上绘制1和3。 这可能吗。 我附上了一个屏幕截图,希望这能更好地阐明我的设置。 谢谢, 以上来自于谷歌翻译 以下为原文 Hi All I have set a text file in "discrete" data format to access mutiple S2P files. I have swept the index and brought in all the S2P files into ADS dataset. I am able to plot all the index at once or plot one index at a time. However, I am not able to plot index which are are not continous. To elaborate: Lets assume my text file in "discrete" data format looks like this: begin dscrdata % Filenumber Filename 1 file1.s2p 2 file2.s2p 3 file3.s2p ... ... 10 file10.s2p end dscrdata After sweeping index from 1 to 10, I would like to plot 1 and 3 on the same plot. Is this possible. I have attached a screen shot hoping that this will clarify my setup better. Thanks, 附件 |
|
相关推荐
11个回答
|
|
嗨sdgrant,谢谢你的回复。 您提供的建议对于少量数据文件的一次性作业非常有用。 我可能应该解释为什么我创建了精心编制的索引。 我拥有的文件数量不小。 它超过100,我最终可能会添加更多文件。 每个s2p文件对应于特定的DUT。 就我而言,它是过滤数据。 一旦我将这些数据导入ADS,它就能让我有能力搜索特定的通带和拒绝。 我最终使用ADS中的“查找”功能来获取符合我要求的文件的索引值。 虽然我能够找到索引值,但我发现无法绘制它们。 希望这有助于澄清我的要求。 谢谢,阿斯温 以上来自于谷歌翻译 以下为原文 Hi sdgrant, Thank you for the reply. The suggestion you give would be useful for one time job for small quantity data files. I probably should explain why I created the elaborate indexing. The number of files I have is not small quantity. Its more than 100 and I might end up adding more files. Each s2p file corresponds to a particular DUT. In my case it is Filter data. Once I bring in this data into ADS its gives me the power to search for a particular pas***and and rejection. I end up using the "find" function in ADS to get the index values of files that meet my requirement. While I am able to find the index values, I find it not possible to plot them. Hope this helps in clarifying my requirement. Thanks, Aswin |
|
|
|
是的,了解一些背景知识肯定有帮助,而不仅仅是对基本任务的简单描述。 要在扫描中获取特定索引(文件编号)的特定结果集,可以使用跟踪表达式后面的 [N,:: ]语法。 因此,要显示来自file3.s2p和file5.s2p的第3和第5组s参数数据,请使用以下跟踪表达式dB(S(2,1)) [2,:: ] dB(S(2) ,1)) [4,:: ]数字表示文件编号索引 - 1.“查找”功能应该给出这个N值,这样就不会与文件名编号对齐。 在内部,第一个值被索引为0,因此您始终可以向扫描添加虚拟零值以对齐主文件索引号。 此语法中的第二个值“::”表示扫描中的所有频率值。 以上来自于谷歌翻译 以下为原文 Yes, it certainly helps to know a little bit of the background and not just the simple description of the basic task. To get to a specific set of results for a particular index (Filenumber) in the sweep you can use the [N,::] syntax following the Trace Expression. So to display for example the 3rd and 5th sets of s-parameter data from file3.s2p and file5.s2p use the following Trace Expressions dB(S(2,1))[2,::] dB(S(2,1))[4,::] The number represents the Filenumber index - 1. The 'Find' function should give this N value so this will not line up with the filename number. Internally the first value is indexed as 0, so you could always add a dummy zero value to the sweep to align the main file index numbers. The second value in this syntax, the "::", represents all frequency values in the sweep. |
|
|
|
411easdd*** 发表于 2018-12-17 17:57 嗨sdgrant,谢谢你的回复。 我强调,对于dB(S(2,1))函数,第一个参数对应于“文件索引数组”,第二个参数对应于“频率”数组。 这就是我设置S参数扫描的方式。 我也明白我可以使用表达式“dB(S(2,1)[[::,]])”来绘制所有文件,或者使用表达式dB(S(2, 1)[[0,::]])。 我的要求是将我从“查找”功能得到的数组传递给图“dB(S(2,1))”函数,这样我就可以用图形方式查看“查找”功能的结果。 原因是我从“查找”函数得到的数组必然会根据我要求“查找”函数搜索的参数而变化。 例如,我会搜索特定的中心频率等。谢谢,Aswin 以上来自于谷歌翻译 以下为原文 Hi sdgrant, Thanks for the reply. I understad that, for the dB(S(2,1)) function, the first argument corresponds to "file index array" and the second argument corresponds to the "frequency" array. That is the way I have set the S-Parameter sweep. I also understand that I can plot all the files by using the expression "dB(S(2,1)[[::,::]])" or plot one file at a time using the expression dB(S(2,1)[[0,::]]). My requirement is to pass the array I get from the "find" function to the plot "dB(S(2,1))" function, so that I can graphically see the results of the "find" function. The reason is that the array I get from the "find" function is bound to vary depending on the parameter I ask the "find" function to search. For instance, I would be searching for a particular center frequency etc. Thanks, Aswin |
|
|
|
blueshine 发表于 2018-12-17 18:07 + *订阅* +我也对此可能的解决方案感兴趣。 欧洲支持放弃了我非常相似的主题(通过从find函数获得的索引重新排列数据数组)。 以上来自于谷歌翻译 以下为原文 +*subscribe*+ I'm also interested in a possible solution for this. European support gave up on my rather similar topic (re-arrange data array by indices obtained from find function). |
|
|
|
|
|
|
|
嗨aehoward,我确实探索了你建议的例子。 我面临的基本问题不是将一组S2P文件带入ADS。 问题在于显示2D数组,第一个自变量采用任意值。 在给出的示例中,绘制了所有扫描数据。 我想过滤掉一些扫描数据并绘制它们。 请查看邮件1和5,以获得有关上述声明的更多说明。 谢谢,阿斯温 以上来自于谷歌翻译 以下为原文 Hi aehoward, I did explore the example you had suggested. The basic problem I am facing is not in taking an set of S2P files into ADS. The problem is in displaying a 2D array with the first independent variable taking arbitrary values. In the examples given all the swept data is plotted. I would like to filter out some of the swept data and plot them. Please review mail 1 and 5 for more clarification on the above statement. Thanks, Aswin |
|
|
|
|
|
|
|
嗨霍华德,这是我尝试过的第一件事。 它不起作用。 :(随着时间的推移,我想我将不得不满足于一次显示一个数据。我打算设置一个带有标记的索引,可以移动来查看各种文件。可能我可以创建一个 自定义AEL将根据查找结果创建一个单独的数组是解决我的问题的一种方法。再次感谢.Aswin 以上来自于谷歌翻译 以下为原文 Hi Howard, That was the first thing I tried. It did not work. :( With the time available in hand, I think I will have to settle for displaying one data at a time. I plan to set up an index with markers that can be moved to look at the various files. May be I can create an custom AEL which will create a seperate array based on the find results is one way to solve my problem. Thanks again. Aswin |
|
|
|
|
|
|
|
blueshine 发表于 2018-12-17 19:20 嗨Aswin,我需要为我的一个项目提供类似的功能,所以我今天编写了一个自定义表达式来完成这项工作,并且也应该满足您的需求。 附有我的代码的ael文件。 这将转到+ $ HOME / hpeesof / expressions / ael / +目录。 如果您已有该文件,请将我的代码复制到您的文件中。 新函数+ Muehlhaus_extract_data +有两个参数:第一个参数是扫描数据,第二个参数是带有find函数索引的1D数组(或者在我的情况下来自sort函数)。 例如,如果您的2D扫描数据超过10个扫描值并且您调用函数Muehlhaus_extract_data(S, [0,3,5 ]),它将返回带有S参数的2D数据,用于扫描索引0和3和5 我需要1D和2D扫描的代码(扫描参数有/无频率扫描),因此代码可以处理这两种情况。 对于您的情况,如果您愿意,可以简化代码。 如果这有帮助,请告诉我! 最好的问候Volker ~~~编辑:下面的代码可能已损坏,因为论坛软件没有正确显示方括号。 代码作为附件包含在ael文件中。 ///////////////////从1D或2D扫描数据中选择子集////////////// defun Muehlhaus_extract_data(theData,selectedIndices){/ /此函数将从一维或二维扫描数据中提取一个或多个数组//使用参数theData传递扫描数据//对于2D扫描数据,第一维是参数扫描,第二维是频率//用于1D扫描 data,first dimension是一个参数扫描//参数selectedIndices包含来自find函数的索引数组//对于“手动”使用,索引也可以这样指定: [0,1,2 ] / /获取数据的维数decl DataDimension = sweep_dim(theData); decl IndexDimension = sweep_dim(selectedIndices); if(((DataDimension == 1)||(DataDimension == 2))&&(IndexDimension == 1)){//数据和索引维度有效,继续decl DataSize = 0; decl IndexSize = sweep_size(selectedIndices); decl NewData; //创建新的二维扫描以保存已排序/提取的数据//通过复制数据矩阵(或其中的一部分)//现在不关心内容,我们将在以后设置(如果(DataDimension == 1) ){DataSize = sweep_size(theData); NewData = theData [0 :: IndexSize-1 ]; } else {DataSize = sweep_size(theData [::,0 ]); NewData = theData [0 :: IndexSize-1,:: ]; } //将正确的值复制到NewData decl i; //扫描索引decl theIndex; for(i = 0; i theIndex = selectedIndices [i ]; if(DataDimension == 1){NewData [i ] = theData [theIndex ];} else {NewData [i,:: ] = theData [theIndex,:: ];};}返回NewData;} else {//数据和索引维度不是我们需要的,退出print_function_error(“Muehlhaus_extract_data”,“第一个参数(数据)必须有1或2) 维度,第二个参数(索引)必须有1维“);返回0;}} 以上来自于谷歌翻译 以下为原文 Hi Aswin, I needed similar functionality for one of my projects, so I coded a custom expression today that does the job for me, and should also work for your needs. The ael file with my code is attached. This goes to the +$HOME/hpeesof/expressions/ael/+ directory. If you already have that file, copy my code into your file. The new function +Muehlhaus_extract_data+ takes two parameters: the first parameter is your swept data, and the second parameter is the 1D array with indices from the find function (or in my case from sort function). For example, if your 2D sweep data is over 10 sweep values and you call the function Muehlhaus_extract_data(S, [0,3,5]) it will return 2D-data with S-parameters for sweep index 0 and 3 and 5. I needed the code for both 1D and 2D sweeps (sweep over parameter with/without frequency sweep), so the code can handle both cases. For you case, you could simplify the code, if you wish. Let me know if this helps or not! Best regards Volker ~~~ Edited: Code below might be corrupted because the forum software does not properly show the square brackets. Code is included as attachment in the ael file. /////////////////// select subset from 1D or 2D sweep data ////////////// defun Muehlhaus_extract_data (theData, selectedIndices) { // This function will extract one or more array from one- or two-dimensional sweep data // Sweep data is passed with parameter theData // For 2D sweep data, first dimension is a parameter sweep and second dimension is frequency // For 1D sweep data, first dimension is a parameter sweep // Parameter selectedIndices holds an array of indices that comes from the find function // For "manual" use, the indices can also be specified like this: [0,1,2] // get dimensionality ofthe data decl DataDimension = sweep_dim(theData); decl IndexDimension = sweep_dim(selectedIndices); if (((DataDimension==1)||(DataDimension==2)) && (IndexDimension==1)) { // Data and index dimension is valid, continue decl DataSize = 0; decl IndexSize = sweep_size(selectedIndices); decl NewData; // Create new 2-D sweep to hold the sorted/extracted data // by copying the Data matrix (or part of it) // Don't care about the content now, we will set that later if (DataDimension==1) { DataSize = sweep_size(theData); NewData = theData[0::IndexSize-1]; } else { DataSize = sweep_size(theData[::,0]); NewData = theData[0::IndexSize-1,::]; } // Copy the correct values into NewData decl i; // sweep index decl theIndex; for ( i=0; i if (DataDimension==1) { NewData = theData[theIndex]; } else { NewData[i,::] = theData[theIndex,::]; }; } return NewData; } else { // Data and index dimension is not what we need, quit print_function_error("Muehlhaus_extract_data", "First argument (data) must have 1 or 2 dimensions, second argument (index) must have 1 dimension"); return 0; } } 附件
|
|
|
|
lmksa 发表于 2018-12-17 19:35 嗨Volker,谢谢你的回复。 我一定会检查你的建议,并尽快回复你。 Aswin 以上来自于谷歌翻译 以下为原文 Hi Volker, Thank you for the reply. I will certainly check your suggestion and get back to you soon. Aswin |
|
|
|
只有小组成员才能发言,加入小组>>
1283 浏览 0 评论
2371 浏览 1 评论
2189 浏览 1 评论
2062 浏览 5 评论
2946 浏览 3 评论
1104浏览 1评论
关于Keysight x1149 Boundary Scan Analyzer
751浏览 0评论
N5230C用“CALC:MARK:BWID?”获取Bwid,Cent,Q,Loss失败,请问大佬们怎么解决呀
922浏览 0评论
1284浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-22 21:48 , Processed in 1.540364 second(s), Total 99, Slave 81 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号