Skip to content

Commit

Permalink
Merge pull request #7 from FaustinCarter/patch-v0.5.1
Browse files Browse the repository at this point in the history
Patch v0.5.1
  • Loading branch information
FaustinCarter committed Aug 20, 2021
2 parents 872605a + 249f3e4 commit 2398058
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 7 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.rst
@@ -1,3 +1,7 @@
Version 0.5.1:
* Patch bug introduced in 0.5.0 during refactor of baseline offset params
* Patch bug in inline_ground_terminated_resonator_s11 guessing where a list was compared against a numpy array

Version 0.5.0:
* Deprecated cmplxIQ module in favor of hanger_resonator module. The functions are the same, only the names have changed. The cmplxIQ module will be removed in a future version.
* Added a new inline_resonator module to fitsS21. This module has fit functions for an inline, or transmission resonator.
Expand Down
2 changes: 1 addition & 1 deletion VERSION.txt
@@ -1 +1 @@
0.5.0
0.5.1
12 changes: 7 additions & 5 deletions scraps/fitsS21/inline_ground_terminated_resonator_s11.py
Expand Up @@ -83,10 +83,12 @@ def guess(self, data, freqs=None, **kwargs):

# The magnitude is symmetric under exchange of qi and qc
# Can use the phase to lift the degeneracy
qi_qc_ratios = [
np.tan(uphase_s11[np.where(freqs == fwhm_right)])[0],
-np.tan(uphase_s11[np.where(freqs == fwhm_left)])[0],
]
qi_qc_ratios = np.array(
[
np.tan(uphase_s11[np.where(freqs == fwhm_right)])[0],
-np.tan(uphase_s11[np.where(freqs == fwhm_left)])[0],
]
)

if all(qi_qc_ratios >= 1):
qc = 2 * q0 / (1 + min_s11)
Expand Down Expand Up @@ -167,7 +169,7 @@ def inline_resonator_ground_terminated_full_guess(self, data, freqs, mask=0.05,
if fit_offset:
offset_params = self.right.guess(data, freqs, offset_mask, **kwargs)
else:
offset_params = self.right.make_params(re=0, im=0)
offset_params = self.right.make_params(re0=0, im0=0)
offset_params[f"{self.prefix}re0"].set(vary=False)
offset_params[f"{self.prefix}im0"].set(vary=False)

Expand Down
2 changes: 1 addition & 1 deletion scraps/fitsS21/inline_resonator.py
Expand Up @@ -184,7 +184,7 @@ def inline_resonator_full_guess(self, data, freqs, mask=0.05, **kwargs):
if fit_offset:
offset_params = self.right.guess(data, freqs, offset_mask, **kwargs)
else:
offset_params = self.right.make_params(re=0, im=0)
offset_params = self.right.make_params(re0=0, im0=0)
offset_params[f"{self.prefix}re0"].set(vary=False)
offset_params[f"{self.prefix}im0"].set(vary=False)

Expand Down

0 comments on commit 2398058

Please sign in to comment.