Skip to content

Conversation

@cemitch99
Copy link
Owner

  • DipEdge, SoftQuad, SoftSol

  • [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

  • Remove comments from DipEdge.

  • Add solenoid.

  • [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

  • Add LinearMap element.

  • [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

  • Document reference particle argument in SoftQuad

  • Document reference particle argument in SoftSol

  • Add CFbend element.

  • [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

  • Add Buncher, Kicker, PlaneXYRot.

  • [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci


* DipEdge, SoftQuad, SoftSol

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Remove comments from DipEdge.

* Add solenoid.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Add LinearMap element.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Document reference particle argument in SoftQuad

* Document reference particle argument in SoftSol

* Add CFbend element.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Add Buncher, Kicker, PlaneXYRot.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
@cemitch99 cemitch99 self-assigned this Mar 28, 2025
@cemitch99 cemitch99 merged commit dcae328 into cemitch99:strang_splitting_test Mar 28, 2025
4 of 10 checks passed
cemitch99 pushed a commit that referenced this pull request Jun 25, 2025
* add: functionality to parse variables from input file

Only allowing int,float values at the moment. So no lists, or math expressions

* update: update delete available after loading variables

otherwise the delete button stays disabled to the user

* add: variable to reset button

Not implemented in a very robust way right now

* fix: prevent crash

For example, say lattice element #1 references a variable called 'ns'. If the lattice list is reset or elements are deleted, the variable update handler would still try to access index 1, causing an IndexError. This patch adds a guard to skip updates if the referenced lattice element index is no longer valid.

* update: parser to only load in variables which are used in the lattice configuration

* empty the variables list before loading in variables

* update: allow negative inputs with variables

* add float wrapper

* update: on_variable_change

modify docstring and set variable value to None if empty

* simplify 'process_if_variable'

* variable renames and move code block

* shorted helper function name

* add docstring to state.change('variables')

* correctly update lattice elements on variable change after element deletion

Prevents cases similar to the following: Say you add three lattice elements, the first two reference a variable named ns, the third one references a variable named ns2 in the same parameter name. If we end up deleting the second lattice element, and update the value of the ns variable, the ns2 originally from index 2 becomes ns

* add parse_variables docstring

and update var name

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* fix docstring

* move input toolbar to separate file

also need to move toolbarimport class to remove circular dependency

* move parser to separate folder

new folder name is 'dashboard_parser'

importParser renamed to parser.py
importParserHelper renamed to parser_helper.py

* move logic to ui_populator.py

* rename

* move RunToolbar to separate file

* move AnalyzeToolbar to separate file

* introduce general_toolbar.py

contain toolbar components utilized in all the routes

* strip '_toolbar' from file name

fix resulting circular import

* simplify ui_populator

break into sub functions

* update class docstring

* update docstrings

* break out populate_variables logic

* add inline comments

* relocate some code

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant