def _get_curve(self): x_y = self.driver.sc.fetch() meta = dict() meta["name"] = "scope_curve" meta["acquisition_type"] = self.acquisition_types[self.acquisition_type] meta["averaging"] = self.number_of_averages meta["start_time"] = self.start_time meta["record_length"] = self.record_length meta["sample_rate"] = self.sample_rate meta["coupling"] = self.ch_couplings[self.ch_coupling] meta["full_range"] = self.ch_range meta["offset"] = self.ch_offset meta["input_freq_max"] = self.ch_input_frequency_max meta["input_impedance"] = self.ch_input_impedance meta["channel"] = self.channel_idxs[self.channel_idx] meta["curve_type"] = "ScopeCurve" meta["instrument_logical_name"] = self.logical_name curve = Curve() curve.set_data(pandas.Series(x_y[1], index = x_y[0])) curve.set_params(**meta) return curve add_fields(IviScopeDriver, ShortCutScope._fields) add_fields(IviScopeDriver, ['channel_idx']) add_fields(IviScopeDriver, ShortCutScope._ch_fields) add_fields(IviScopeDriver, ["sample_modes", "acquisition_types", "ch_couplings"], add_ref=False)
meta["stop_freq"] = self.frequency_stop meta["span"] = self.span meta["bandwidth"] = self.if_bandwidth meta["sweep_time"] = self.sweep_time meta["output_port"] = self.output_port meta["input_port"] = self.input_port meta["format"] = self.formats[self.format] meta["measurement"] = self.measurement_idxs[self.measurement_idx] meta["channel"] = self.channel_idxs[self.channel_idx] meta["instrument_type"] = "NA" meta["instrument_logical_name"] = self.logical_name curve = Curve() curve.set_data(pandas.Series(x_y[1], index = x_y[0])) curve.set_params(**meta) return curve @classmethod def supported_software_modules(cls): return ['AgNA'] add_fields(IviAgNADriver, ShortCutNA._fields) add_fields(IviAgNADriver, ['channel_idx']) add_fields(IviAgNADriver, ShortCutNA._ch_fields) add_fields(IviAgNADriver, ['measurement_idx']) add_fields(IviAgNADriver, ShortCutNA._m_fields) add_fields(IviAgNADriver, ["sweep_types", "formats"], add_ref=False)
meta = dict() meta["name"] = "scope_curve" meta["acquisition_type"] = self.acquisition_types[ self.acquisition_type] meta["averaging"] = self.number_of_averages meta["start_time"] = self.start_time meta["record_length"] = self.record_length meta["sample_rate"] = self.sample_rate meta["coupling"] = self.ch_couplings[self.ch_coupling] meta["full_range"] = self.ch_range meta["offset"] = self.ch_offset meta["input_freq_max"] = self.ch_input_frequency_max meta["input_impedance"] = self.ch_input_impedance meta["channel"] = self.channel_idxs[self.channel_idx] meta["curve_type"] = "ScopeCurve" meta["instrument_logical_name"] = self.logical_name curve = Curve() curve.set_data(pandas.Series(x_y[1], index=x_y[0])) curve.set_params(**meta) return curve add_fields(IviScopeDriver, ShortCutScope._fields) add_fields(IviScopeDriver, ['channel_idx']) add_fields(IviScopeDriver, ShortCutScope._ch_fields) add_fields(IviScopeDriver, ["sample_modes", "acquisition_types", "ch_couplings"], add_ref=False)
meta["name"] = "specan_curve" meta["curve_type"] = 'SpecAnCurve' meta["trace_type"] = self.tr_types[self.tr_type] meta["averaging"] = self.number_of_sweeps meta["center_freq"] = self.frequency_center meta["start_freq"] = self.frequency_start meta["stop_freq"] = self.frequency_stop meta["span"] = self.span meta["bandwidth"] = self.resolution_bandwidth meta["sweep_time"] = self.sweep_time meta["detector_type"] = self.detector_types[self.detector_type] meta["trace"] = self.trace_idxs[self.trace_idx] meta["instrument_type"] = "SpecAn" meta["instrument_logical_name"] = self.logical_name #curve = Curve(pandas.Series(x_y[1], index = x_y[0]), meta = meta) curve = Curve() curve.set_data(pandas.Series(x_y[1], index = x_y[0])) curve.set_params(**meta) return curve add_fields(IviSpecAnDriver, ShortCutSpecAn._fields) add_fields(IviSpecAnDriver, ['trace_idx']) add_fields(IviSpecAnDriver, ShortCutSpecAn._tr_fields) add_fields(IviSpecAnDriver, ["detector_types", "tr_types"], add_ref=False) #add_fields(IviScopeDriver, [field[0] for field in ShortCutScope._channel_related_fields])