I'm trying to evaluate JMP before purchasing the software. I would like to use JMP to analyze Touchstone files. However, it is not listed as a file type. I've tried importing as a text, but the some of the columns are shifted and are not aligned. Maybe it's because I'm unfamiliar with JSL, but I've looked into the Scripting documentation but I don't see a way I can import *.snp files (where n is the number of ports) i.e. *.s2p, *.s3p, *.s4p. I would have to have a custom delimiter for every row. I've also thought about manipulating the data table after import to see if I can shift a group of cells via scripting, but I don't see the proper code to do that. If anybody has any brilliant idea as to how I can import touchstone properly, please reply. Thanks all.
Touchstone file type are described here:
http://www.vhdl.org/pub/ibis/adhoc/interconnect/touchstone_spec2_draft4.pdf (see pg. 10, "3-port and 4-port networks")
What kind of output shape do you want? I'm guessing each data table row for a s4p would have 33 numbers: 1 freq and 4x4 pairs. JSL does have text processing functions to make such transformations possible.
It looks like you managed to strip off the "!" comments and "#" header lines when you got it into JMP with the shifted columns. I assume in that case, the last column of the non-freq columns had a missing value. You could try reshaping the table in the UI as follows.
1. Use Tables > Stack and choose all the columns to put all the data into one column. 2. Delete the "label" column. 3. Select one of the missing value cells and use Rows > Row Selection > Select Matching Rows to select all the rows with missing values. 4. Use Rows > Delete Rows to delete those. 5. Add a new column and choose Initial Data Values > Sequence Data in the Column Info dialog and have it go from 1 to 33. 6. Use Tables > Split with the new column as the Split By column.
Now you have a table with 33 values per row (and unimaginative numeric column names).
If you want help with the programmatic (JSL) route instead, let me know.
You'll have to learn a little JSL to import custom formats like this, but below is a sample script that will read an s4p file (s2p would be much easier). There is plenty left for you to figure out, such parsing the extension or the parameters, but this should get you started and show what is possible.
The script basically converts a s4p file into a CSV file which JMP can import. The other way to do it would be to create a data table directly -- see the data tables chapter for the JMP Scripting Guide for that.