Bug: Keysight N5249A PNA-X network analyzer trace error
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 459
- Forks
- 359
- Avg merge
- 3d 6h
- Merged PRs (30d)
- 73
Description
Regardless of which qcodes release(tried with 4 different qcodes version) I use whenever I want to have trace data of network analyzer, N5249A, I get could not convert string to float: 'S21' error. My code is simple. I first set the required parameter for the network analyzer and then try to get trace data: data=qc.Measure(vna.trace).run(name='test')
my code is:
vna.sweep_mode('CONT')
vna.start(150.1e6)
vna.stop(350.1e6)
vna.power(-23)
vna.points(1601)# 1601
vna.if_bandwidth(1000)
vna.trace("S21")
data=qc.Measure(vna.trace).run(name='test')
and it returns this error:
ValueError Traceback (most recent call last)
<ipython-input-8-48831a7c8d52> in <module>
----> 1 data=qc.Measure(vna.trace).run(name='test')
2
3 # plot
4 #plot = MatPlot(data.vna_magnitude, data.vna_phase)
5 #plot.save()
~\anaconda3\envs\qcodes10\lib\site-packages\qcodes\measure.py in run(self, use_threads, quiet, station, **kwargs)
83
84 # run the measurement as if it were a Loop
---> 85 self._dummyLoop.run(use_threads=use_threads,
86 station=station, quiet=True)
87
~\anaconda3\envs\qcodes10\lib\site-packages\qcodes\loops.py in run(self, use_threads, quiet, station, progress_interval, set_active, *args, **kwargs)
745 if not quiet:
746 print(datetime.now().strftime('Started at %Y-%m-%d %H:%M:%S'))
--> 747 self._run_wrapper()
748 ds = self.data_set
749 finally:
~\anaconda3\envs\qcodes10\lib\site-packages\qcodes\loops.py in _run_wrapper(self, *args, **kwargs)
794 def _run_wrapper(self, *args, **kwargs):
795 try:
--> 796 self._run_loop(*args, **kwargs)
797 finally:
798 if hasattr(self, 'data_set'):
~\anaconda3\envs\qcodes10\lib\site-packages\qcodes\loops.py in _run_loop(self, first_delay, action_indices, loop_indices, current_values, **ignore_kwargs)
882 # log.debug('Going through callables at this sweep step.'
883 # ' Calling {}'.format(f))
--> 884 f(first_delay=delay,
885 loop_indices=new_indices,
886 current_values=new_values)
~\anaconda3\envs\qcodes10\lib\site-packages\qcodes\actions.py in __call__(self, loop_indices, **ignore_kwargs)
165 out_dict[param_id] = param_out
166
--> 167 self.store(loop_indices, out_dict)
168
169
~\anaconda3\envs\qcodes10\lib\site-packages\qcodes\data\data_set.py in store(self, loop_indices, ids_values)
404 """
405 for array_id, value in ids_values.items():
--> 406 self.arrays[array_id][loop_indices] = value
407 self.last_store = time.time()
408 if (self.write_period is not None and
~\anaconda3\envs\qcodes10\lib\site-packages\qcodes\data\data_array.py in __setitem__(self, loop_indices, value)
339 self._update_modified_range(min_li, max_li)
340
--> 341 self.ndarray.__setitem__(loop_indices, value)
342
343 def __getitem__(self, loop_indices):
ValueError: could not convert string to float: 'S21'
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the failure with the provided N5249A setup and measurement snippet, then trace the value through qcodes/measure.py and qcodes/data/data_array.py as shown in the traceback. Done means the S21 trace measurement stores numeric trace data without the string-conversion error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100