Skip to content

Commit

Permalink
Bump version, fixes to control
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristopherMayes committed Mar 24, 2021
1 parent fdfb17c commit 9f4a08e
Show file tree
Hide file tree
Showing 6 changed files with 507 additions and 93 deletions.
2 changes: 1 addition & 1 deletion astra/_version.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@


__version__ = '0.4.1'
__version__ = '0.4.2'
1 change: 1 addition & 0 deletions astra/astra.py
Original file line number Diff line number Diff line change
Expand Up @@ -708,6 +708,7 @@ def set_astra(astra_object, generator_input, settings, verbose=False):
astra_input = astra_object.input # legacy syntax

for k, v in settings.items():
found = False

# Check for direct settable attribute
if ':' in k:
Expand Down
5 changes: 1 addition & 4 deletions astra/control.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,13 +119,10 @@ def set_delta(self, key, item):
"""
Sets a change (delta) in the underlying attributes.
"""
delta = item - self.value
if delta == 0:
return

self.value = item
for name, attrib, f, ref in zip(self.ele_names, self.attributes, self.factors, self.reference_values):
self.ele_dict[name][attrib] += f * delta
self.ele_dict[name][attrib] = ref + f * self.value

def __setitem__(self, key, item):
"""
Expand Down
496 changes: 456 additions & 40 deletions examples/functional_astra_run.ipynb

Large diffs are not rendered by default.

94 changes: 47 additions & 47 deletions examples/simple_astra_run.ipynb

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

setup(
name='lume-astra',
version = '0.4.1',
version = '0.4.2',
packages=find_packages(),
package_dir={'xopt':'xopt'},
url='https://github.com/ChristopherMayes/lume-astra',
Expand Down

0 comments on commit 9f4a08e

Please sign in to comment.