Skip to content

Commit

Permalink
Fix mode selection in analyze_variation
Browse files Browse the repository at this point in the history
Addressing issue zlatko-minev#148: analyze_variation incorrectly chooses Pj, Sj, Om, PHI_zpf when passed a subset of modes
  • Loading branch information
clarayfontaine committed Apr 4, 2023
1 parent 017ea78 commit 6d323b0
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions pyEPR/core_quantum_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -664,11 +664,11 @@ def analyze_variation(self,
PJ_cap = PJ_cap[:, junctions]

if modes is not None:
freqs_hfss = freqs_hfss[range(len(self.modes[variation])), ]
PJ = PJ[range(len(modes)), :]
SJ = SJ[range(len(modes)), :]
Om = Om[range(len(modes)), :][:, range(len(modes))]
PHI_zpf = PHI_zpf[range(len(modes)), :]
freqs_hfss = freqs_hfss[variation].values[(modes)]
PJ = PJ[modes, :]
SJ = SJ[modes, :]
Om = Om[modes, :][:, modes]
PHI_zpf = PHI_zpf[modes, :]
PJ_cap = PJ_cap[:, junctions]

# Analytic 4-th order
Expand Down

0 comments on commit 6d323b0

Please sign in to comment.