-
Notifications
You must be signed in to change notification settings - Fork 240
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
Asaf branch #55
Asaf branch #55
Conversation
Merge 'master' branch into 'develop' branch
Ideally you wouldn't need to specify if the object is a line/surface/volume, but I didn't found a way to get this from ansys. Also some formatting fixes.
And again, formatting fixes whenever I see one
Allow for quantum analysis for only some of the modes which can now be sent as a list
Fix of Q analysis modes update, print of results is still problamatic
allows to print result and print variation to be used togther where the variation to be printed is give by an integer
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Assuming you have run this code with a=some ansys analysis to check that it doesn't introduce artifact bugs, im good to merge :) Great job
@@ -304,8 +304,8 @@ | |||
} | |||
], | |||
"source": [ | |||
"ℰ_total = eprh.calc_energy_electric(volume='AllObjects')\n", | |||
"ℰ_substr = eprh.calc_energy_electric(volume='substrate')\n", | |||
"ℰ_total = eprh.calc_energy_electric(obj='AllObjects')\n", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good change
@@ -233,18 +233,18 @@ def setup_data(self): | |||
if not self.data_dir.is_dir(): | |||
self.data_dir.mkdir(parents=True, exist_ok=True) | |||
|
|||
def calc_p_junction_single(self, mode, variation, U_E = None, U_H = None): | |||
def calc_p_junction_single(self, mode, variation, U_E=None, U_H=None): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good formatting
''' | ||
This function is used in the case of a single junction only. | ||
For multiple junctions, see `calc_p_junction`. | ||
|
||
Assumes no lumped capacitive elements. | ||
''' | ||
if U_E == None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good check update
@@ -592,15 +598,26 @@ def calc_energy_electric(self, | |||
B = vecE.conj() | |||
A = A.dot(B) | |||
A = A.real() | |||
A = A.integrate_vol(name=volume) | |||
|
|||
if obj_dims == 1: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice
''' | ||
if volume != 'Deprecated': | ||
logger.warning('The use of the "volume" argument is deprecated... use "obj" instead') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice
@@ -631,7 +633,14 @@ def analyze_variation(self, | |||
# ensuring proper matrix dimensionality when slicing | |||
junctions = (junctions,) if type(junctions) is int else junctions | |||
|
|||
modes = list(range(self.n_modes)) | |||
if modes is None: | |||
modes = list(range(self.n_modes)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice, Long desired update
@@ -645,7 +654,7 @@ def analyze_variation(self, | |||
# Get matrices | |||
PJ, SJ, Om, EJ, PHI_zpf, PJ_cap, n_zpf = self.get_epr_base_matrices( | |||
variation) | |||
freqs_hfss = self.freqs_hfss[variation].values | |||
freqs_hfss = self.freqs_hfss[variation].values[(modes)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure why brackets parans here arround modes
It only worked with the parenthesis, I think it was because it was
expecting a tuple, but it was a while ago and I simply forgot to push the
changes before there was a COVID lockdown here.
…On Sun, Oct 11, 2020 at 7:39 PM Zlatko Minev ***@***.***> wrote:
***@***.**** approved this pull request.
Assuming you have run this code with a=some ansys analysis to check that
it doesn't intrpduce artifcat bugs, im good to merge :) Great jpb
------------------------------
In _tutorial_notebooks/Tutorial 2. Field calculations - dielectric energy
participation ratios (EPRs).ipynb
<#55 (comment)>:
> @@ -304,8 +304,8 @@
}
],
"source": [
- "ℰ_total = eprh.calc_energy_electric(volume='AllObjects')\n",
- "ℰ_substr = eprh.calc_energy_electric(volume='substrate')\n",
+ "ℰ_total = eprh.calc_energy_electric(obj='AllObjects')\n",
Good change
------------------------------
In pyEPR/core_distributed_analysis.py
<#55 (comment)>:
> @@ -233,18 +233,18 @@ def setup_data(self):
if not self.data_dir.is_dir():
self.data_dir.mkdir(parents=True, exist_ok=True)
- def calc_p_junction_single(self, mode, variation, U_E = None, U_H = None):
+ def calc_p_junction_single(self, mode, variation, U_E=None, U_H=None):
Good formatting
------------------------------
In pyEPR/core_distributed_analysis.py
<#55 (comment)>:
> '''
This function is used in the case of a single junction only.
For multiple junctions, see `calc_p_junction`.
Assumes no lumped capacitive elements.
'''
- if U_E == None:
Good check update
------------------------------
In pyEPR/core_distributed_analysis.py
<#55 (comment)>:
> @@ -592,15 +598,26 @@ def calc_energy_electric(self,
B = vecE.conj()
A = A.dot(B)
A = A.real()
- A = A.integrate_vol(name=volume)
+
+ if obj_dims == 1:
Very nice
------------------------------
In pyEPR/core_distributed_analysis.py
<#55 (comment)>:
> '''
+ if volume != 'Deprecated':
+ logger.warning('The use of the "volume" argument is deprecated... use "obj" instead')
Very nice
------------------------------
In pyEPR/core_quantum_analysis.py
<#55 (comment)>:
> @@ -631,7 +633,14 @@ def analyze_variation(self,
# ensuring proper matrix dimensionality when slicing
junctions = (junctions,) if type(junctions) is int else junctions
- modes = list(range(self.n_modes))
+ if modes is None:
+ modes = list(range(self.n_modes))
nice, Long desired update
------------------------------
In pyEPR/core_quantum_analysis.py
<#55 (comment)>:
> @@ -645,7 +654,7 @@ def analyze_variation(self,
# Get matrices
PJ, SJ, Om, EJ, PHI_zpf, PJ_cap, n_zpf = self.get_epr_base_matrices(
variation)
- freqs_hfss = self.freqs_hfss[variation].values
+ freqs_hfss = self.freqs_hfss[variation].values[(modes)]
Not sure why brackets parans here arround modes
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#55 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AOD23AZFJTZFVCUEZC6PR5LSKHNURANCNFSM4SLUM3WQ>
.
|
Thank you! At the next meeting do you think you can present what these changes do? |
No description provided.