skrf.vi.vna.keysight.PNA.command

static PNA.command(get_cmd=None, set_cmd=None, doc=None, validator=None, values=False, values_container=<built-in function array>, complex_values=False)

Create a property for the instrument.

This method is used to add a property to an instrument. These properties can be read-only, write-only, read-write, and can validate values before sending to the instrument as well as validate responses from the instrument to return proper types.

Parameters:
  • get_cmd (str | None) – Command sent to the instrument to request data

  • set_cmd (str | None) – Command sent to the instrument to set data

  • doc (str | None) – The docstring for the property

  • validator (Validator | None) – The Validator that will be used to transform data to the proper format before sending and after querying

  • values (bool) – Whether or not this command is using a Sequence to set data, or expects a Sequence in response.

  • values_container (type | None) – If values is true, you set set this to the type of container the values should be returned in. For example, this is np.array by default, meaning instead of return a list, you will get a numpy array.

  • complex_values (bool) – If the values expected from the instrument are complex. If so, the values will be converted from [real[0], imag[0], real[1], imag[1], …] to [complex(real[0], imag[0]), complex(real[1], imag[1]), …]

Returns:

The property constructed from the parameters passed. Should be set to a class variable

Return type:

property