-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Recent change to resonator analysis class breaks circle fit in 2D Measurements. #108
Comments
Hi @thilokru, I am trying to use Qkit to perform a fit. However, after applying the changes from commit c93b1c6#r115820757, I am encountering the following exception when calling the Resonator' object has no attribute '_circ_amp_gen'
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
Cell In[26], line 6
2 res = Resonator(h5d.get_filepath())
4 #res.fit_lorentzian(fit_all=True,f_min=5.667e9,f_max=5.668e9)
5 #res.fit_fano(fit_all=True)
----> 6 res.fit_circle(fit_all=True,f_max=5.668e9)
9 '''
10 res.set_x_coord(s33_data[:, 0])
11 frq_low=7.740
(...)
15 c.plotall()
16 '''
File ~/git/qkit_mod/src/qkit/analysis/resonator.py:232, in Resonator.fit_circle(self, reflection, notch, fit_all, f_min, f_max)
229 self._prepare_f_range(f_min, f_max)
231 if self._first_circle:
--> 232 self._prepare_circle()
233 self._first_circle = False
235 if self._circle_reflection:
File ~/git/qkit_mod/src/qkit/analysis/resonator.py:345, in Resonator._prepare_circle(self)
342 self._results[key] = self._hf.add_value_vector('circ_' + key, folder='analysis', x=self._x_co, unit='')
344 circ_view_amp = self._hf.add_view('circ_amp', x=self._y_co, y=self._ds_amp)
--> 345 circ_view_amp.add(x=self._frequency_co, y=self._circ_amp_gen)
346 circ_view_pha = self._hf.add_view('circ_pha', x=self._y_co, y=self._ds_pha)
347 circ_view_pha.add(x=self._frequency_co, y=self._circ_pha_gen)
AttributeError: 'Resonator' object has no attribute '_circ_amp_gen'" Thank you for any help. |
@paoloaq What qkit.cfg['circle_fit_version'] are you using? |
@thilokru I receive the same exception regardless of the circle_fit_version setting (1 or 2) |
Hi @thilokru, could you tell me from which commit the issue with the initialization of the Resonator attributes might have been introduced? Thank you so much |
I think it is the one mentioned above, but you could use |
See comment c93b1c6#r115820757 .
Setting
i=1
at the beginning of the loop fixes the problem, but this an ugly hack.@Schneider1
The text was updated successfully, but these errors were encountered: