The attached add-in creates a JMP data table from a Touchstone file, aka, sNp data.
The importer is based on Revision 1.1 of the Touchstone file format specification.
In summary, the option line should read:
For 1-port files: # [HZ/KHZ/MHZ/GHZ] [S/Y/Z/G/H] [MA/DB/RI] [R n]
For 2-port files: # [HZ/KHZ/MHZ/GHZ] [S/Y/Z/G/H] [MA/DB/RI] [R n]
For n-port files: # [HZ/KHZ/MHZ/GHZ] [S/Y/Z/G/H] [MA/DB/RI] [R n] where the square brackets ([]) indicate optional information;
.../.../.../ means select one of the choices;
and n is replaced by a positive number.
Note: Noise parameters can be included in a Touchstone data file, however, they can only be included in 2-port network descriptions.
A special thanks to my collaborator and amazing teacher @brady_brady for help with making it robust.
/***********************************************************************************
CHANGES
Version 1.01
Written By: Stan Koprowski
DATE: June 30, 2020
Converted file name to upper case to allow file extensions to be case insensitive
Set Unit property for Frequency to unit supplied
Set Unit property for Resistance to ohms
************************************************************************************/
/***********************************************************************************
CHANGES
Version 1.1
Written By: Stan Koprowski
DATE: July 1, 2020
Added second option to import a directory of sNp files from the same folder location
Comments are prepended with source name
File are concatenated into single file.
Many rows could have missing values as the containing files may not always have the same set of columns.
************************************************************************************/
What amazing turn-around for this request !
I posted it to the site on 6/25 assuming it was like every other site where you put in suggestions … click and forget 'cause nothing will ever happen. Well, Rob at JMP grabbed this and sent it to Stan and today, 6/30, I have a working add-in to convert my files. It even has its first mod to be extension case insensitive since my first go at the add-in failed because my extensions were upper case.
Kudos to Rob and Stan for exceptional service and reaction time!!!
Hey Stan,
Thanks for the quick responses. The multi-import concatenated into a single file is great and save me tons of time.
I'm sure you're getting tired of my picky points but here is some additional feedback:
1. It looks like there is a limit to the number of files the import can do. I have run it twice on a folder with 108 files and it exceptions out after ~35 minutes. I have been able to convert 50 files at 1601 lines each (80050 lines). You can find the report it had me generate.
2. While the SW is doing the convert on a lot of file, the top title line says "(Not Responding)" which calls into question if something is wrong. Is there any way to show positive progress?
Kelly
Hi @KellyM,
I have not implemented any limits on the number of files that can be imported and concatenated.
I don't have access to your files, however, it is likely due to one of the files in the folder not conforming to the specifications.
You might want to split the folder in sets of 25-50 files and run the add-in on each set to identify which file might be causing the error.
If you can identify the file that might be causing the error I can see if I can update the code to remedy the situation.
Meanwhile, I'll take a look at the code to see if I can implement a mechanism to track the exceptions while processing the "good" files so it does not hang.
cheers,
Stan
Hey Stan,
I have batched all the files in 20 or so groups and they all come in fine. When I get up over 60 files, it takes a long time, like 35 minutes then exceptions out. Di you find the exception report I submitted?
Kelly
Hey Stan,
Here is the # of files vs convert time. It ramps up quickly.
Do you have some sort of "complete file" data reformat or check after each file import? 10 files takes 13 seconds but 20 files takes over a minute. 30 files takes 3:38. It isn't linear so something is compounding with each new file.
Thanks. I hope this makes it better for the next person.
Kelly