reading s2p files in python

147 views
Skip to first unread message

Abishkozha Amangeldin

unread,
Sep 3, 2021, 3:24:15 AMSep 3
to scikit-rf
Dear communite, I have problem with reading s2p files in python. I am new user of python but my thesis work need to do code for reading s2p files. Please can you help me. I am trying to use pandas dataframe but it is not working and all information of .s2p is in one column. What about skrf im not sure understand how to use. 

Julien Hillairet

unread,
Sep 3, 2021, 7:30:06 AMSep 3
to scik...@googlegroups.com
Dear user,

You can import .s2p file using scikit-rf and get the scattering parameters like that :

import skrf as rf
ntwk = rf.Network('your_file.s2p')
s = ntwk.s


The variable s is a Numpy array of your scattering parameters, which shape is Nbf x 2 x 2, where Nbf is the number of frequency points defined in your file.

Best regards,

Julien

Le ven. 3 sept. 2021 à 09:24, Abishkozha Amangeldin <aa.bb.ii.s...@gmail.com> a écrit :
Dear communite, I have problem with reading s2p files in python. I am new user of python but my thesis work need to do code for reading s2p files. Please can you help me. I am trying to use pandas dataframe but it is not working and all information of .s2p is in one column. What about skrf im not sure understand how to use. 

--
You received this message because you are subscribed to the Google Groups "scikit-rf" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scikit-rf+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/scikit-rf/f6148d5e-47d7-4191-9d84-b85a3cf9510an%40googlegroups.com.

Abishkozha Amangeldin

unread,
Sep 3, 2021, 8:50:05 AMSep 3
to scikit-rf
Dear Julien,

Tnaks for feedback. I am trying to do dataframe from .s2p files. What i will use for this?

пятница, 3 сентября 2021 г. в 16:30:06 UTC+5, julien.h...@gmail.com:

Julien Hillairet

unread,
Sep 3, 2021, 10:44:03 AMSep 3
to scik...@googlegroups.com
you can use the "to_dataframe" method of the Network object to convert S-parameters into pandas Dataframe :

import skrf as rf
ntwk = rf.Network('your_file.s2p')
df = ntwk.to_dataframe('s')

Julien

Abishkozha Amangeldin

unread,
Sep 3, 2021, 11:26:46 AMSep 3
to scikit-rf
Dear Julien,

When i use to_dataframe i have output like thatWhatsApp Image 2021-09-03 at 20.22.49.jpeg
But my file has information like that
83a3331a-aec8-455d-a529-7b5501c2b9da.jfif
So how can i do for have freq column S11r S11i and so on.

пятница, 3 сентября 2021 г. в 19:44:03 UTC+5, julien.h...@gmail.com:

Julien Hillairet

unread,
Sep 3, 2021, 2:11:55 PMSep 3
to scik...@googlegroups.com
strange. Can you attach you .s2p file ?

Abishkozha Amangeldin

unread,
Sep 3, 2021, 3:56:37 PMSep 3
to scikit-rf
There  is no button to attach file. How can i share file to you? 

пятница, 3 сентября 2021 г. в 23:11:55 UTC+5, julien.h...@gmail.com:

Julien Hillairet

unread,
Sep 4, 2021, 1:49:14 AMSep 4
to scik...@googlegroups.com
You can copy paste the content of your file.

A few tens of line will ne sufficient.

Abishkozha Amangeldin

unread,
Sep 4, 2021, 2:03:37 AMSep 4
to scikit-rf
! E:\Work\LPWAVE_20160917\Cu_15_C5-1_4,6_multibias_spar_0.000_4.000.s2p
! measured on: 09/17/16 12:11:19
# GHZ S MA R 50
 1.000000000  0.9261757 -48.414  0.4070703 143.918  0.0515292  60.019  0.5959867 -179.988 
 1.094972067  0.9194027 -52.674  0.4221157 141.001  0.0553219  57.794  0.5967828 179.638 
 1.189944134  0.9128983 -56.124  0.3926298 138.131  0.0588944  55.613  0.5971081 179.524 
 1.284916201  0.9041759 -60.037  0.3972560 135.519  0.0619792  53.577  0.5964557 179.380 
 1.379888268  0.8959039 -63.729  0.3769108 132.448  0.0650918  51.360  0.6017320 179.018 
 1.474860335  0.8903954 -67.091  0.3766201 130.174  0.0679392  49.619  0.5998272 179.252 
 1.569832402  0.8820447 -70.496  0.3633019 127.454  0.0706522  47.772  0.6028396 179.180 
 1.664804469  0.8784792 -73.792  0.3603693 125.054  0.0732635  45.898  0.6022072 179.041 
 1.759776536  0.8756438 -76.823  0.3527261 122.627  0.0757807  44.354  0.6051197 178.950 
 1.854748603  0.8698845 -80.067  0.3454912 120.225  0.0779299  42.527  0.6048039 178.659 
 1.949720670  0.8660542 -83.290  0.3421681 117.934  0.0799545  40.995  0.6084812 178.552 
 2.044692737  0.8573487 -86.290  0.3319346 115.533  0.0818092  39.285  0.6104870 178.347 
 2.139664804  0.8503298 -89.223  0.3322121 113.632  0.0834690  37.992  0.6118570 178.281 
 2.234636872  0.8422625 -91.784  0.3184998 111.197  0.0852720  36.451  0.6122471 178.050 
 2.329608939  0.8373871 -94.311  0.3165329 109.478  0.0867267  35.247  0.6109904 177.863 
 2.424581006  0.8308193 -96.761  0.3058433 107.242  0.0880503  33.875  0.6111459 177.423 
 2.519553073  0.8267221 -98.842  0.3004830 105.668  0.0894340  32.831  0.6119521 177.326 
 2.614525140  0.8229184 -101.167  0.2940264 103.632  0.0906935  31.521  0.6137646 177.034 
 2.709497207  0.8194540 -103.208  0.2868949 101.904  0.0917985  30.449  0.6134888 177.140 
 2.804469274  0.8165619 -105.433  0.2832311 100.146  0.0930380  29.335  0.6151872 176.983 
 2.899441341  0.8134600 -107.423  0.2765467  98.306  0.0941654  28.187  0.6132205 176.732 
 2.994413408  0.8110560 -109.496  0.2728190  96.674  0.0950979  27.153  0.6140539 176.365 
 3.089385475  0.8054644 -111.344  0.2654356  94.965  0.0958003  26.079  0.6136083 175.932 
 3.184357542  0.8037585 -113.247  0.2620520  93.542  0.0966011  25.232  0.6161126 175.822 
 3.279329609  0.7978455 -115.078  0.2560777  91.804  0.0973552  24.219  0.6170395 175.711 
 3.374301676  0.7964011 -116.800  0.2529602  90.401  0.0982059  23.409  0.6190134 175.765 
 3.469273743  0.7909817 -118.578  0.2482849  88.746  0.0989767  22.377  0.6172430 175.635 
 3.564245810  0.7896228 -120.137  0.2448875  87.416  0.0996310  21.623  0.6168872 175.498 
 3.659217877  0.7862371 -121.778  0.2404948  85.880  0.1001342  20.670  0.6157757 174.953 
 3.754189944  0.7847962 -123.214  0.2371076  84.663  0.1006639  20.044  0.6167605 174.921 
 3.849162011  0.7812254 -124.750  0.2334051  83.247  0.1011050  19.231  0.6190475 174.681 
 3.944134078  0.7795583 -126.119  0.2305815  81.995  0.1018006  18.547  0.6196189 174.717 
 4.039106145  0.7768852 -127.612  0.2276652  80.605  0.1023844  17.731  0.6195045 174.668 
 4.134078212  0.7745542 -128.905  0.2246516  79.295  0.1028817  16.994  0.6178321 174.500 
 4.229050279  0.7737698 -130.196  0.2221443  78.069  0.1034165  16.312  0.6174840 174.068 
 4.324022346  0.7716545 -131.408  0.2187985  76.851  0.1036259  15.656  0.6165748 173.765 
 4.418994413  0.7716163 -132.627  0.2163568  75.798  0.1040533  15.120  0.6205456 173.602 
 4.513966480  0.7683455 -133.811  0.2134277  74.551  0.1043436  14.461  0.6191453 173.522 
 4.608938547  0.7680160 -135.024  0.2115273  73.492  0.1048936  13.887  0.6211462 173.651 
 4.703910615  0.7643744 -136.146  0.2089408  72.170  0.1052579  13.142  0.6200908 173.329 
 4.798882682  0.7653614 -137.174  0.2070429  71.142  0.1057142  12.586  0.6182664 173.033 
 4.893854749  0.7635691 -138.296  0.2040184  69.878  0.1056884  11.884  0.6162257 172.476 
 4.988826816  0.7631451 -139.244  0.2016645  68.973  0.1059386  11.477  0.6186236 172.315 
 5.083798883  0.7595834 -140.403  0.1993266  67.797  0.1061115  10.841  0.6207732 172.138 
 5.178770950  0.7591912 -141.299  0.1973148  66.849  0.1064434  10.382  0.6232792 172.309 
 5.273743017  0.7581512 -142.546  0.1956732  65.636  0.1067954   9.664  0.6224805 172.129 
 5.368715084  0.7577365 -143.405  0.1938077  64.663  0.1071725   9.191  0.6193649 172.121 
 5.463687151  0.7556576 -144.433  0.1917091  63.565  0.1072679   8.582  0.6190758 171.730 
 5.558659218  0.7547399 -145.230  0.1897051  62.593  0.1074166   8.100  0.6192193 171.234 
 5.653631285  0.7547547 -146.237  0.1878921  61.679  0.1075142   7.649  0.6206682 171.147 
 5.748603352  0.7526852 -147.119  0.1861283  60.703  0.1077456   7.162  0.6230571 171.232 
 5.843575419  0.7525456 -148.002  0.1849802  59.851  0.1081395   6.756  0.6237173 171.349 
 5.938547486  0.7505245 -148.839  0.1836168  58.785  0.1085446   6.148  0.6219334 171.287 
 6.033519553  0.7515059 -149.688  0.1822608  57.911  0.1087486   5.707  0.6208638 170.983 
 6.128491620  0.7507018 -150.497  0.1805623  56.913  0.1088611   5.156  0.6179007 170.442 
 6.223463687  0.7499705 -151.253  0.1787938  56.111  0.1087739   4.783  0.6190177 170.224 
 6.318435754  0.7480771 -152.064  0.1772968  55.273  0.1088673   4.357  0.6227158 170.092 
 6.413407821  0.7474098 -152.709  0.1763413  54.496  0.1092091   3.999  0.6240332 170.220 
 6.508379888  0.7470232 -153.614  0.1753855  53.492  0.1095448   3.410  0.6236485 170.246 
 6.603351955  0.7469605 -154.279  0.1742328  52.706  0.1096971   3.050  0.6205915 170.080 
 6.698324022  0.7450266 -154.968  0.1729700  51.776  0.1097668   2.533  0.6171429 169.510 
 6.793296089  0.7455357 -155.477  0.1714286  51.159  0.1096550   2.306  0.6181265 169.336 
 6.888268156  0.7453537 -156.141  0.1701057  50.386  0.1096361   1.912  0.6216371 168.851 
 6.983240223  0.7448576 -156.851  0.1691355  49.638  0.1098065   1.546  0.6234433 168.931 
 7.078212291  0.7420098 -157.481  0.1679312  48.882  0.1098295   1.157  0.6238064 169.224 
 7.173184358  0.7419749 -158.082  0.1670867  47.959  0.1100362   0.615  0.6220054 168.844 
 7.268156425  0.7428864 -158.755  0.1660969  47.134  0.1101471   0.146  0.6187764 168.499 
 7.363128492  0.7432734 -159.417  0.1646478  46.252  0.1099240  -0.357  0.6184779 167.853 
 7.458100559  0.7402598 -160.067  0.1631872  45.651  0.1096460  -0.589  0.6191155 167.635 
 7.553072626  0.7397637 -160.707  0.1623144  44.953  0.1097857  -0.931  0.6228563 167.766 
 7.648044693  0.7402514 -161.494  0.1616039  44.280  0.1099762  -1.260  0.6273746 168.096 
 7.743016760  0.7393814 -162.283  0.1613758  43.380  0.1104553  -1.823  0.6258284 167.945 
 7.837988827  0.7383390 -162.739  0.1605245  42.696  0.1104834  -2.138  0.6187761 167.992 
 7.932960894  0.7378553 -163.216  0.1596344  41.933  0.1105174  -2.521  0.6176264 167.391 
 8.027932961  0.7386072 -163.586  0.1588048  41.252  0.1105802  -2.846  0.6164396 166.676 
 8.122905028  0.7388277 -164.237  0.1577874  40.510  0.1104922  -3.280  0.6197268 166.349 
 8.217877095  0.7370905 -164.717  0.1569303  39.868  0.1105137  -3.605  0.6240068 166.328 
 8.312849162  0.7371775 -165.359  0.1565745  39.227  0.1108157  -3.947  0.6240480 166.582 
 8.407821229  0.7362644 -165.882  0.1560803  38.466  0.1110186  -4.399  0.6219214 166.701 
 8.502793296  0.7378703 -166.457  0.1553889  37.721  0.1110655  -4.823  0.6187953 166.144 
 8.597765363  0.7372580 -166.924  0.1544420  37.071  0.1109266  -5.160  0.6146452 165.635 
 8.692737430  0.7370069 -167.341  0.1532746  36.557  0.1105760  -5.353  0.6166693 165.388 
 8.787709497  0.7346623 -167.914  0.1524888  35.936  0.1105468  -5.651  0.6213757 165.199 
 8.882681564  0.7371331 -168.286  0.1523527  35.444  0.1109361  -5.853  0.6225814 165.639 
 8.977653631  0.7383603 -169.151  0.1522300  34.558  0.1113737  -6.444  0.6244875 165.773 
 9.072625698  0.7363967 -169.206  0.1513360  33.980  0.1112064  -6.720  0.6198809 165.247 
 9.167597765  0.7351587 -169.644  0.1500774  33.255  0.1107554  -7.168  0.6124695 164.739 
 9.262569832  0.7357323 -169.954  0.1488845  32.824  0.1103324  -7.329  0.6155178 164.402 
 9.357541899  0.7383655 -170.686  0.1484785  32.215  0.1104486  -7.647  0.6228001 163.967 
 9.452513966  0.7337356 -171.464  0.1476244  31.545  0.1102465  -8.021  0.6254302 164.455 
 9.547486034  0.7352309 -171.972  0.1471993  31.077  0.1103312  -8.259  0.6284037 165.020 
 9.642458101  0.7331059 -172.615  0.1470547  30.266  0.1106388  -8.805  0.6222669 165.047 
 9.737430168  0.7365997 -172.980  0.1468316  29.608  0.1108381  -9.177  0.6189044 164.744 
 9.832402235  0.7338881 -173.415  0.1458073  28.928  0.1104562  -9.592  0.6166326 163.952 
 9.927374302  0.7323511 -173.572  0.1446844  28.490  0.1099851  -9.786  0.6181926 163.315 
10.022346369  0.7331727 -174.171  0.1440431  28.083  0.1098213  -9.959  0.6227266 163.451 
10.117318436  0.7313148 -174.579  0.1438835  27.553  0.1100449 -10.229  0.6286720 163.656 
10.212290503  0.7327243 -175.062  0.1441388  26.828  0.1105440 -10.683  0.6259785 163.394 
10.307262570  0.7305578 -175.045  0.1435366  26.317  0.1104229 -10.935  0.6190794 163.386 
10.402234637  0.7336899 -175.196  0.1427779  25.766  0.1101519 -11.232  0.6155395 162.095 
10.497206704  0.7320913 -175.367  0.1417596  25.280  0.1097250 -11.468  0.6115439 161.280 
10.592178771  0.7339259 -175.810  0.1409026  24.936  0.1094103 -11.582  0.6201396 161.133 
10.687150838  0.7305347 -176.412  0.1403544  24.428  0.1092256 -11.853  0.6256666 161.134 
10.782122905  0.7316416 -176.626  0.1404887  24.016  0.1097298 -12.014  0.6257428 161.696 
10.877094972  0.7354226 -177.222  0.1400710  23.394  0.1096586 -12.402  0.6194859 161.861 
10.972067039  0.7383863 -177.284  0.1398197  23.042  0.1097661 -12.529  0.6123818 161.116 
11.067039106  0.7370595 -177.833  0.1392537  22.482  0.1095605 -12.832  0.6065164 160.265 
11.162011173  0.7327812 -177.883  0.1379179  22.048  0.1088242 -13.025  0.6157822 159.718 
11.256983240  0.7349883 -178.421  0.1369024  21.701  0.1082549 -13.159  0.6207357 159.413 
11.351955307  0.7363464 -179.423  0.1369052  21.509  0.1085267 -13.106  0.6249881 160.965 
11.446927374  0.7330109 179.844  0.1374368  20.922  0.1091734 -13.480  0.6324475 161.112 
11.541899441  0.7289955 179.879  0.1371210  20.051  0.1092067 -14.123  0.6217189 160.545 
11.636871508  0.7331814 179.629  0.1361551  19.758  0.1086504 -14.210  0.6165658 159.969 
11.731843575  0.7281973 179.179  0.1349126  19.340  0.1079616 -14.405  0.6192076 158.933 
11.826815642  0.7280421 178.647  0.1344201  19.048  0.1077822 -14.508  0.6258516 158.639 
11.921787709  0.7226194 177.778  0.1341123  18.573  0.1078228 -14.791  0.6358011 159.591 
12.016759777  0.7227981 177.354  0.1346364  18.119  0.1084345 -15.041  0.6422332 160.112 
12.111731844  0.7239898 177.164  0.1354648  17.468  0.1093406 -15.510  0.6290353 160.010 
12.206703911  0.7274776 177.605  0.1354539  17.004  0.1095415 -15.764  0.6179259 159.183 
12.301675978  0.7287683 177.985  0.1343471  16.690  0.1088832 -15.894  0.6140601 156.929 
12.396648045  0.7241038 178.775  0.1332537  16.592  0.1081792 -15.810  0.6138087 155.368 
12.491620112  0.7269243 178.137  0.1326257  16.281  0.1078196 -15.934  0.6248288 155.433 
12.586592179  0.7192806 178.085  0.1331928  15.840  0.1084633 -16.175  0.6381826 155.638 
12.681564246  0.7236715 178.213  0.1343159  15.146  0.1095480 -16.691  0.6288936 155.296 
12.776536313  0.7313584 179.380  0.1344640  14.711  0.1098537 -16.935  0.6141047 154.238 
12.871508380  0.7468394 -178.841  0.1333127  14.745  0.1090506 -16.723  0.5984581 150.518 
12.966480447  0.7505962 -177.534  0.1313026  15.160  0.1075618 -16.132  0.5919374 147.834 
13.061452514  0.7494575 -177.021  0.1289907  15.589  0.1057976 -15.501  0.6111055 146.704 
13.156424581  0.7326521 -177.686  0.1278730  15.214  0.1049946 -15.689  0.6331773 146.433 
13.251396648  0.7385795 -177.172  0.1294293  14.372  0.1064263 -16.305  0.6282840 146.391 
13.346368715  0.7772798 -176.395  0.1307389  13.410  0.1076612 -17.087  0.5905124 145.510 
13.441340782  0.8806964 -171.081  0.1318831  14.678  0.1087238 -15.637  0.5118428 137.634 
13.536312849  1.1201814 -167.524  0.1376667  18.917  0.1136373 -11.199  0.3913341 127.930 
13.631284916  1.5086866 -175.416  0.1565940  21.952  0.1294187  -7.957  0.2673362 126.241 
13.726256983  1.4188278 160.635  0.1666487  12.146  0.1378760 -17.581  0.2192221 160.710 
13.821229050  0.9920032 157.360  0.1439775   8.820  0.1193519 -20.700  0.4031770 174.046 
13.916201117  0.8353118 158.469  0.1340192   9.097  0.1112473 -20.219  0.5235825 170.412 
14.011173184  0.7622006 157.726  0.1311830   8.068  0.1090673 -21.070  0.5736670 170.522 
14.106145251  0.7302878 157.975  0.1297429   6.958  0.1080283 -22.003  0.6005100 170.236 
14.201117318  0.7393964 159.205  0.1304471   6.765  0.1087635 -22.021  0.5903611 167.614 
14.296089385  0.7576138 160.146  0.1311421   6.860  0.1094832 -21.725  0.5753592 165.924 
14.391061453  0.7557402 162.194  0.1308094   7.446  0.1094110 -20.933  0.5923437 163.847 
14.486033520  0.7518980 162.897  0.1306856   7.414  0.1095245 -20.792  0.6038231 161.842 
14.581005587  0.7368613 161.900  0.1293261   6.665  0.1085495 -21.378  0.6068471 162.702 
14.675977654  0.7209693 160.970  0.1278008   5.956  0.1073967 -21.943  0.6118398 163.501 
14.770949721  0.7217336 159.759  0.1276963   5.426  0.1074294 -22.304  0.6009994 163.192 
14.865921788  0.7306460 158.956  0.1283109   5.151  0.1080774 -22.423  0.5924792 163.408 
14.960893855  0.7341504 159.127  0.1292528   5.221  0.1090392 -22.199  0.6032304 162.470 
15.055865922  0.7338599 159.894  0.1305404   5.291  0.1102618 -21.964  0.6058959 161.557 
15.150837989  0.7244750 160.522  0.1303325   4.750  0.1102186 -22.369  0.6098811 161.959 
15.245810056  0.7185285 160.876  0.1294283   4.102  0.1096079 -22.863  0.6108934 160.914 
15.340782123  0.7197436 160.602  0.1289413   3.518  0.1093285 -23.306  0.5904114 159.964 
15.435754190  0.7179231 160.425  0.1279009   3.281  0.1085088 -23.410  0.5873908 159.345 
15.530726257  0.7220900 160.773  0.1282508   3.666  0.1089045 -22.829  0.5997957 157.771 
15.625698324  0.7230008 161.028  0.1290134   3.411  0.1097144 -22.903  0.6079412 157.194 
15.720670391  0.7223257 161.019  0.1288695   2.887  0.1096948 -23.280  0.6208486 158.295 
15.815642458  0.7208360 160.769  0.1283751   2.280  0.1094068 -23.703  0.6233464 158.589 
15.910614525  0.7181620 160.045  0.1276489   1.520  0.1089623 -24.329  0.5962265 159.062 
16.005586592  0.7187056 159.589  0.1264625   1.448  0.1080568 -24.283  0.5859562 159.281 
16.100558659  0.7187649 159.769  0.1270384   1.629  0.1086547 -23.945  0.5860280 156.630 
16.195530726  0.7253277 159.911  0.1281235   1.538  0.1096978 -23.903  0.5963872 155.691 
16.290502793  0.7224698 160.241  0.1279286   1.133  0.1096423 -24.169  0.6202912 155.507 
16.385474860  0.7195900 160.576  0.1276633   0.569  0.1095463 -24.581  0.6280846 155.752 
16.480446927  0.7185329 159.606  0.1263901  -0.275  0.1085905 -25.294  0.6128213 157.327 
16.575418994  0.7171955 158.971  0.1253383  -0.530  0.1078296 -25.420  0.6036960 158.307 
16.670391061  0.7208272 157.956  0.1254445  -0.532  0.1080046 -25.291  0.5871803 156.662 
16.765363128  0.7171738 157.875  0.1262283  -0.520  0.1088198 -25.132  0.5871452 156.253 
16.860335196  0.7186563 157.768  0.1267067  -0.585  0.1093162 -25.041  0.6168472 155.578 
16.955307263  0.7187700 157.431  0.1279701  -1.477  0.1105310 -25.796  0.6280082 155.072 
17.050279330  0.7187093 156.743  0.1267633  -2.439  0.1096343 -26.617  0.6281293 157.497 
17.145251397  0.7131313 156.220  0.1256109  -2.783  0.1087726 -26.843  0.6163757 158.512 
17.240223464  0.7153618 155.944  0.1261481  -2.733  0.1093617 -26.683  0.5906090 158.154 
17.335195531  0.7172415 155.573  0.1271688  -2.865  0.1102830 -26.687  0.5820614 157.285 
17.430167598  0.7149475 156.234  0.1283297  -2.725  0.1114412 -26.403  0.6075721 154.727 
17.525139665  0.7169551 156.088  0.1288344  -3.420  0.1120082 -26.972  0.6130563 153.235 
17.620111732  0.7127849 156.181  0.1272724  -4.076  0.1108033 -27.502  0.6305070 155.441 
17.715083799  0.7146765 155.599  0.1258450  -4.332  0.1096618 -27.631  0.6267246 156.298 
17.810055866  0.7136709 155.146  0.1257009  -4.824  0.1096499 -28.003  0.5956596 157.593 
17.905027933  0.7152641 154.920  0.1255767  -4.541  0.1097038 -27.603  0.5850097 158.036 
18.000000000  0.7143757 155.091  0.1275421  -4.710  0.1114932 -27.672  0.5920845 154.530 


суббота, 4 сентября 2021 г. в 10:49:14 UTC+5, julien.h...@gmail.com:

Julien Hillairet

unread,
Sep 4, 2021, 2:50:59 AMSep 4
to scik...@googlegroups.com
Thank you. So it works as expected: I do see the s11, s21, s12 and s22 columns. Are you using the latest version of scikit-rf?


image.png


Abishkozha Amangeldin

unread,
Sep 4, 2021, 3:22:24 AMSep 4
to scikit-rf
It works, thank you. How can I separate the real parameters of S11 and img in different columns? And how can I write a column header for frequency? Should I use the glob command to create a data frame from many .s2p files, or do I need to create networks from files?

суббота, 4 сентября 2021 г. в 11:50:59 UTC+5, julien.h...@gmail.com:

Julien Hillairet

unread,
Sep 4, 2021, 4:08:31 AMSep 4
to scik...@googlegroups.com
Your questions are more related to pandas, for which I'm not an expert, so I can only give you a few hints, but you should definitely refer to the pandas documentation...

if you want to create new columns for real and imag parts, you can do something like this:

df['s11_re'] = df['s 11'].real
df['s11_im'] = df['s 11'].imag
etc.


Abishkozha Amangeldin

unread,
Sep 4, 2021, 6:05:25 AMSep 4
to scikit-rf
Dear Julien, thanks a lot. I wish u all the best.

суббота, 4 сентября 2021 г. в 13:08:31 UTC+5, julien.h...@gmail.com:
Reply all
Reply to author
Forward
0 new messages