IO
This Package provides functions and objects for input/output.
Reading and writing touchstone files is supported through the
Touchstone
class, which can be more easily used
through the Network constructor, __init__()
The general functions read()
and write()
can be used to read and write [almost] any skrf object to disk, using the
pickle
module. This should only be used for temporary storage,
because pickling is not stable over time, as skrf evolves.
touchstone (skrf.io.touchstone
)
Touchstone class and utilities
|
Class to read touchstone s-parameter files. |
general (skrf.io.general
)
General input/output functions for reading and writing skrf objects
Pickle functions
The read/write methods use the pickle module. These should only be used for temporary storage.
|
Read skrf object[s] from a pickle file. |
|
Read all skrf objects in a directory. |
|
Read all networks in a directory. |
|
Write skrf object[s] to a file. |
|
Write a dictionary of skrf objects individual files in dir. |
|
Save all skrf objects in the local namespace. |
Spreadsheets
|
Write a Network object to a spreadsheet, for your boss. |
|
Write a NetworkSet object to a spreadsheet, for your boss. |
Pandas dataframe
|
Convert one or more attributes of a network to a pandas DataFrame. |
Statistics
|
Converts Statistical file to a touchstone file. |
JSON
|
Serializes Network object by converting arrays to lists, splitting complex numbers into real and imaginary, and breaking down frequency objects into dicts. |
|
Dumps Network to JSON string. Faster than converting and saving as touchstone. Safer than pickling (no arbitrary code execution on load). :param network: |
|
Loads network object from JSON string representation. :param obj_string: str JSON string representation of a network object. :return: |
csv (skrf.io.csv
)
Functions for reading and writing standard csv files
|
Read all CSV files in a directory. |
|
Agilent-style csv file representing either scalar traces vs frequency or complex data vs. |
Reading/Writing Agilent
|
Reads data from a csv file written by an Agilient PNA. |
|
Reads a PNAX csv file, and returns a list of one-port Networks. |
|
Read a CSV file exported from an Agilent PNA in dB/deg format. |
|
Reads data from a csv file written by an Agilient PNA as a pandas DataFrame. |
Reading/Writing R&S
|
Reads data from a dat file written by a R&S ZVA in dB/deg or re/im format. |
|
Read all DAT files in a directory (from R&S ZVA). |
|
Read a dat file exported from a R&S ZVA in dB/deg or re/im format. |
Reading/Writing Anritsu VectorStar
|
Reads a vectorstar csv file, and returns a list of one-port Networks. |
|
Reads data from a csv file written by an Anritsu VectorStar. |