nirfsa module
Installation
As a prerequisite to using the nirfsa module, you must install the NI-RFSA runtime on your system. Visit ni.com/downloads to download the driver runtime for your devices.
The nimi-python modules (i.e. for NI-RFSA) can be installed with pip:
$ python -m pip install nirfsa
Usage
The following is a basic example of using the nirfsa module to open a session to an RF Signal Analyzer and perform a spectrum acquisition.
import nirfsa
# Configure the session
with nirfsa.Session(resource_name='5841', id_query=False, reset_device=False, options='Simulate=1, DriverSetup=Model:5841') as rfsa_session:
rfsa_session.acquisition_type = nirfsa.AcquisitionType.IQ
rfsa_session.reference_level = -10
rfsa_session.iq_carrier_frequency = 1e9
iq_data_array = np.zeros(1024, dtype=np.complex128)
wfm_info = rfsa_session.read_iq_single_record_into(iq_data_array)
# Perform measurements...
API Reference
- Session
- Methods
- abort
- change_external_calibration_password
- check_acquisition_status
- clear_self_calibrate_range
- close
- commit
- configure_deembedding_table_interpolation_linear
- configure_deembedding_table_interpolation_nearest
- configure_deembedding_table_interpolation_spline
- configure_digital_edge_advance_trigger
- configure_digital_edge_ref_trigger
- configure_digital_edge_start_trigger
- configure_iq_power_edge_ref_trigger
- configure_ref_clock
- configure_software_edge_advance_trigger
- configure_software_edge_ref_trigger
- configure_software_edge_start_trigger
- configure_spectrum_frequency
- create_deembedding_sparameter_table_array
- create_deembedding_sparameter_table_s2p_file
- delete_all_deembedding_tables
- delete_deembedding_table
- disable_advance_trigger
- disable_ref_trigger
- disable_start_trigger
- enable_session_access
- error_message
- fetch_iq_multi_record_into
- fetch_iq_single_record_into
- get_deembedding_sparameters
- get_ext_cal_last_date_and_time
- get_ext_cal_recommended_interval
- get_fetch_backlog
- get_frequency_response
- get_scaling_coefficients
- get_self_cal_last_date_and_time
- get_self_calibration_temperature
- get_terminal_name
- initiate
- is_self_cal_valid
- load_configurations_from_file
- lock
- perform_thermal_correction
- read_iq_single_record_into
- read_power_spectrum_into
- reset
- reset_device
- reset_with_options
- save_configurations_to_file
- self_calibrate_range
- self_test
- send_software_edge_trigger
- unlock
- Properties
- absolute_delay
- acquisition_type
- advance_trigger_terminal_name
- advance_trigger_type
- allow_more_records_than_memory
- allow_out_of_specification_user_settings
- amplitude_settling
- arm_ref_trigger_type
- attenuation
- available_paths
- available_ports
- center_frequency
- channel_coupling
- common_mode_level
- deembedding_compensation_gain
- deembedding_selected_table
- deembedding_type
- device_configuration_temperature
- device_instantaneous_bandwidth
- device_temperature
- digital_edge_advance_trigger_source
- digital_edge_arm_ref_trigger_source
- digital_edge_ref_trigger_edge
- digital_edge_ref_trigger_source
- digital_edge_start_trigger_edge
- digital_edge_start_trigger_source
- digital_gain
- digital_if_equalization_enabled
- digitizer_dither_enabled
- digitizer_sample_clock_rate
- digitizer_sample_clock_timebase_rate
- digitizer_sample_clock_timebase_source
- digitizer_temperature
- digitizer_vertical_range
- done_event_terminal_name
- downconverter_center_frequency
- downconverter_frequency_offset
- downconverter_frequency_offset_mode
- downconverter_gain
- downconverter_loop_bandwidth
- downconverter_preselector_enabled
- driver_setup
- enable_fractional_resampling
- end_of_record_event_terminal_name
- exported_advance_trigger_output_terminal
- exported_digitizer_sample_clock_output_terminal
- exported_done_event_output_terminal
- exported_end_of_record_event_output_terminal
- exported_ready_for_advance_event_output_terminal
- exported_ready_for_ref_event_output_terminal
- exported_ready_for_start_event_output_terminal
- exported_ref_clock_output_terminal
- exported_ref_clock_rate
- exported_ref_trigger_output_terminal
- exported_start_trigger_output_terminal
- external_gain
- fetch_offset
- fetch_relative_to
- fft_size
- fft_width
- fft_window_shape_factor
- fft_window_size
- fft_window_type
- fixed_group_delay_across_ports
- fpga_bitfile_path
- fpga_target_name
- fpga_temperature
- frequency_settling
- frequency_settling_units
- group_capabilities
- host_dma_buffer_size
- if_attenuation
- if_filter_bandwidth
- if_output_frequency
- if_output_power_level
- if_output_power_level_offset
- input_isolation_enabled
- input_port
- instrument_firmware_revision
- instrument_manufacturer
- instrument_model
- io_resource_descriptor
- iq_carrier_frequency
- iq_in_port_carrier_frequency
- iq_in_port_temperature
- iq_in_port_terminal_configuration
- iq_in_port_vertical_range
- iq_power_edge_ref_trigger_level
- iq_power_edge_ref_trigger_slope
- iq_power_edge_ref_trigger_source
- iq_rate
- lo2_export_enabled
- load_configurations_from_file_reset_options
- logical_name
- lo_export_enabled
- lo_frequency
- lo_frequency_step_size
- lo_injection_side
- lo_in_power
- lo_out_export_configure_from_rfsg
- lo_out_power
- lo_pll_fractional_mode_enabled
- lo_source
- lo_temperature
- lo_vco_frequency_step_size
- lo_yig_main_coil_drive
- max_device_instantaneous_bandwidth
- max_iq_rate
- mechanical_attenuation
- memory_size
- minimum_acpr
- mixer_level
- mixer_level_offset
- module_power_consumption
- module_revision
- noise_source_power_enabled
- number_of_records
- number_of_records_is_finite
- number_of_samples
- number_of_samples_is_finite
- number_of_spectral_lines
- osp_data_scaling_factor
- overflow_error_reporting
- phase_offset
- power_spectrum_units
- preselector_present
- ready_for_advance_event_terminal_name
- ready_for_ref_event_terminal_name
- ready_for_start_event_terminal_name
- records_done
- reference_level
- reference_level_headroom
- ref_clock_rate
- ref_clock_source
- ref_to_ref_trigger_holdoff
- ref_trigger_delay
- ref_trigger_minimum_quiet_time
- ref_trigger_osp_delay_enabled
- ref_trigger_pretrigger_samples
- ref_trigger_terminal_name
- ref_trigger_type
- resolution_bandwidth
- resolution_bandwidth_type
- rf_attenuation_step_size
- rf_high_pass_filtering
- rf_out_lo_export_enabled
- rf_preamp_enabled
- rf_preamp_present
- selected_path
- selected_ports
- serial_number
- signal_bandwidth
- signal_conditioning_enabled
- smooth_spectrum_enabled
- spectrum_averaging_mode
- spectrum_number_of_averages
- spectrum_osp_sampling_ratio
- spectrum_span
- start_to_ref_trigger_holdoff
- start_trigger_terminal_name
- start_trigger_type
- subspan_overlap
- supported_instrument_models
- temperature_read_interval
- thermal_correction_headroom_range
- thermal_correction_temperature_resolution
- user_source_pulse_width
- user_source_pulse_width_units
- NI-TClk Support
- Repeated Capabilities
- Enums
- AcquisitionType
- Action
- AdvanceTriggerDigitalEdgeEdge
- AdvanceTriggerType
- AllowOutOfSpecificationUserSettings
- ArmReferenceTriggerType
- CalToneMode
- CalibrateStep
- ChannelCoupling
- ConditioningCalToneMode
- DeembeddingType
- DeviceResponseType
- DigitizerDitherEnabled
- DigitizerSampleClockExportedTerminal
- DigitizerSampleClockTimebaseSource
- DownconverterFrequencyOffsetMode
- DownconverterLoopBandwidth
- DownconverterPreselectorEnabled
- EnableAttrVals
- EnableRfPreamp
- ExportOutputTerminal
ExportOutputTerminalExportOutputTerminal.DO_NOT_EXPORTExportOutputTerminal.CLK_OUTExportOutputTerminal.REF_OUTExportOutputTerminal.REF_OUT2ExportOutputTerminal.PFI0ExportOutputTerminal.PFI1ExportOutputTerminal.PXI_TRIG0ExportOutputTerminal.PXI_TRIG1ExportOutputTerminal.PXI_TRIG2ExportOutputTerminal.PXI_TRIG3ExportOutputTerminal.PXI_TRIG4ExportOutputTerminal.PXI_TRIG5ExportOutputTerminal.PXI_TRIG6ExportOutputTerminal.PXI_TRIG7ExportOutputTerminal.PXI_STARExportOutputTerminal.PXIE_DSTARCExportOutputTerminal.DIO_PFI0ExportOutputTerminal.DIO_PFI1ExportOutputTerminal.DIO_PFI2ExportOutputTerminal.DIO_PFI3ExportOutputTerminal.DIO_PFI4ExportOutputTerminal.DIO_PFI5ExportOutputTerminal.DIO_PFI6ExportOutputTerminal.DIO_PFI7
- FetchRelativeTo
- FrequencySettlingUnits
- IFattenTableSel
- IFfilter
- IFfilterSelection
IFfilterSelectionIFfilterSelection.EXT_CAL_IF_FILTER_PATH_1IFfilterSelection.EXT_CAL_IF_FILTER_PATH_2IFfilterSelection.EXT_CAL_IF_FILTER_PATH_3IFfilterSelection.EXT_CAL_IF_FILTER_PATH_4IFfilterSelection.EXT_CAL_IF_FILTER_PATH_5IFfilterSelection.EXT_CAL_IF_FILTER_PATH_6IFfilterSelection.EXT_CAL_IF_FILTER_PATH_7IFfilterSelection.EXT_CAL_IF_FILTER_PATH_8
- IfConditioningDownConversionEnabled
- InputIsolationEnabled
- InputPort
- IqInPortTerminalConfiguration
- LinearInterpolationFormat
- Lo2ExportEnabled
- LoInjection
- LoNumber
- LoOutExportConfigureFromRfsg
- LoPathSel
- LoPllFractionalModeEnabled
- LoSource
- LoYigMainCoilDrive
- LoadConfigurationResetOptions
- NoiseSourcePowerEnabled
- NotchFilterEnabled
- OutputTerm
OutputTermOutputTerm.DO_NOT_EXPORTOutputTerm.CLK_OUTOutputTerm.REF_OUTOutputTerm.REF_OUT2OutputTerm.PFI0OutputTerm.PFI1OutputTerm.PXI_TRIG0OutputTerm.PXI_TRIG1OutputTerm.PXI_TRIG2OutputTerm.PXI_TRIG3OutputTerm.PXI_TRIG4OutputTerm.PXI_TRIG5OutputTerm.PXI_TRIG6OutputTerm.PXI_TRIG7OutputTerm.PXI_STAROutputTerm.PXIE_DSTARBOutputTerm.DIO_PFI0OutputTerm.DIO_PFI1OutputTerm.DIO_PFI2OutputTerm.DIO_PFI3OutputTerm.DIO_PFI4OutputTerm.DIO_PFI5OutputTerm.DIO_PFI6OutputTerm.DIO_PFI7OutputTerm.TIMER_EVENT
- OverflowErrorReporting
- PowerSpectrumUnits
- PxiChassisClk10Source
- ReferenceClockExportedRate
- ReferenceClockExportedTerminal
- ReferenceClockSource
- ReferenceLevelDataType
- ReferenceTriggerDigitalEdgeEdge
- ReferenceTriggerIqPowerEdgeSlope
- ReferenceTriggerOspDelayEnabled
- ReferenceTriggerType
- ResetWithOptionsStepsToOmit
- RfLbSigCondPathSel
- RfOutLoExport
- RfPathSelection
- SelfCalSteps
SelfCalStepsSelfCalSteps.DIGITIZER_SELF_CALSelfCalSteps.PRESELECTOR_ALIGNMENTSelfCalSteps.OMIT_NONESelfCalSteps.GAIN_REFERENCESelfCalSteps.IF_FLATNESSSelfCalSteps.LO_SELF_CALSelfCalSteps.AMPLITUDE_ACCURACYSelfCalSteps.RESIDUAL_LO_POWERSelfCalSteps.IMAGE_SUPPRESSIONSelfCalSteps.SYNTHESIZER_ALIGNMENTSelfCalSteps.DC_OFFSET
- SelfCalibrateRangeStepsToOmit
SelfCalibrateRangeStepsToOmitSelfCalibrateRangeStepsToOmit.DIGITIZER_SELF_CALSelfCalibrateRangeStepsToOmit.PRESELECTOR_ALIGNMENTSelfCalibrateRangeStepsToOmit.OMIT_NONESelfCalibrateRangeStepsToOmit.GAIN_REFERENCESelfCalibrateRangeStepsToOmit.IF_FLATNESSSelfCalibrateRangeStepsToOmit.LO_SELF_CALSelfCalibrateRangeStepsToOmit.AMPLITUDE_ACCURACYSelfCalibrateRangeStepsToOmit.RESIDUAL_LO_POWERSelfCalibrateRangeStepsToOmit.IMAGE_SUPPRESSIONSelfCalibrateRangeStepsToOmit.SYNTHESIZER_ALIGNMENTSelfCalibrateRangeStepsToOmit.DC_OFFSET
- SelfCalibrationStep
SelfCalibrationStepSelfCalibrationStep.PRESELECTOR_ALIGNMENTSelfCalibrationStep.GAIN_REFERENCESelfCalibrationStep.IF_FLATNESSSelfCalibrationStep.DIGITIZER_SELF_CALSelfCalibrationStep.LO_SELF_CALSelfCalibrationStep.AMPLITUDE_ACCURACYSelfCalibrationStep.RESIDUAL_LO_POWERSelfCalibrationStep.IMAGE_SUPPRESSIONSelfCalibrationStep.SYNTHESIZER_ALIGNMENTSelfCalibrationStep.DC_OFFSET
- Signal
- SignalConditioningEnabled
- SmoothSpectrumEnabled
- SoftwareTriggerType
- SparameterOrientation
- SpectrumAveragingMode
- SpectrumFftWindowType
SpectrumFftWindowTypeSpectrumFftWindowType.UNIFORMSpectrumFftWindowType.HANNINGSpectrumFftWindowType.HAMMINGSpectrumFftWindowType.BLACKMAN_HARRISSpectrumFftWindowType.EXACT_BLACKMANSpectrumFftWindowType.BLACKMANSpectrumFftWindowType.FLAT_TOPSpectrumFftWindowType._4_TERM_BLACKMAN_HARRISSpectrumFftWindowType._7_TERM_BLACKMAN_HARRISSpectrumFftWindowType.LOW_SIDE_LOBESpectrumFftWindowType.GAUSSIANSpectrumFftWindowType.KAISER_BESSEL
- SpectrumResolutionBandwidthType
- StartTriggerDigitalEdgeEdge
- StartTriggerType
- StepsToOmit
- SyncRefTriggerDelayEnabled
- UserSourcePulseWidthUnits
- Exceptions and Warnings
- Examples
- gRPC Support