Skip to content

Commit

Permalink
Update variable names in exportTemplate.py
Browse files Browse the repository at this point in the history
  • Loading branch information
proy30 committed Jan 11, 2025
1 parent 82f57ac commit 88e833d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/python/impactx/dashboard/Toolbar/exportTemplate.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ def build_distribution_list():
Generates an instance of distribution inputs
as a string for exporting purposes.
"""
distribution_name = state.selected_distribution
distribution_name = state.distribution
parameters = DistributionFunctions.convert_distribution_parameters_to_valid_type()

indentation = " " * (8 if state.selected_distribution_type == "Twiss" else 4)
indentation = " " * (8 if state.distribution_type == "Twiss" else 4)
distribution_parameters = ",\n".join(
f"{indentation}{key}={value}" for key, value in parameters.items()
)

if state.selected_distribution_type == "Twiss":
if state.distribution_type == "Twiss":
return (
f"distr = distribution.{distribution_name}(\n"
f" **twiss(\n"
Expand Down

0 comments on commit 88e833d

Please sign in to comment.