Skip to content

Commit

Permalink
refactor!: split helicity module (#87)
Browse files Browse the repository at this point in the history
* refactor!: use formulate for expressions
* refactor: expose generate_clebsch_gordan
* refactor: expose generate_kinematic_variables
* refactor: extract _state_to_str
* refactor: extract assert_two_body_decay
* refactor: hide name_generator member
* refactor: improve readability group_transitions
* refactor: make StateWithID public
* refactor: make TwoBodyDecay public
* refactor: make generate_wigner_d public
* refactor: make get_transition_label public
* refactor: move extract_ang_mom to TwoBodyDecay
* refactor: move get_helicity_info to decay
* refactor: remove __attempt_int_cast
* refactor: remove _transition_info module
* refactor: rename __register_parameter_couplings
* refactor: rename generate_amplitude_name
* refactor: rename generate_coefficient_name
* refactor: simplify __generate_intensity function
* refactor: switch to sympy.Rational
* style: improve definition order helicity module
* style: improve method order helicity.naming
* style: remove redundant pylint ignores
* style: sort kwargs attr.s
* test: write more unit tests and match with definitions
  • Loading branch information
redeboer authored Jun 22, 2021
1 parent d28271f commit 744fe62
Show file tree
Hide file tree
Showing 20 changed files with 1,092 additions and 1,044 deletions.
6 changes: 3 additions & 3 deletions docs/usage/amplitude.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"If we now use the {meth}`.HelicityAmplitudeBuilder.generate` method of this builder, we get an amplitude model without any dynamics:"
"If we now use the {meth}`.HelicityAmplitudeBuilder.formulate` method of this builder, we get an amplitude model without any dynamics:"
]
},
{
Expand All @@ -129,7 +129,7 @@
"metadata": {},
"outputs": [],
"source": [
"model_no_dynamics = model_builder.generate()"
"model_no_dynamics = model_builder.formulate()"
]
},
{
Expand Down Expand Up @@ -199,7 +199,7 @@
"metadata": {},
"outputs": [],
"source": [
"model = model_builder.generate()"
"model = model_builder.formulate()"
]
},
{
Expand Down
4 changes: 2 additions & 2 deletions docs/usage/dynamics/custom.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Now, just like in {ref}`usage/amplitude:Build SymPy expression`, it's simply a matter of plugging this builder into {meth}`.set_dynamics` and we can {meth}`~.HelicityAmplitudeBuilder.generate` a model with this custom lineshape:"
"Now, just like in {ref}`usage/amplitude:Build SymPy expression`, it's simply a matter of plugging this builder into {meth}`.set_dynamics` and we can {meth}`~.HelicityAmplitudeBuilder.formulate` a model with this custom lineshape:"
]
},
{
Expand All @@ -228,7 +228,7 @@
"source": [
"for name in reaction.get_intermediate_particles().names:\n",
" model_builder.set_dynamics(name, create_my_dynamics)\n",
"model = model_builder.generate()"
"model = model_builder.formulate()"
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion docs/usage/interactive.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@
"model_builder.set_dynamics(initial_state_particle, create_non_dynamic_with_ff)\n",
"for name in reaction.get_intermediate_particles().names:\n",
" model_builder.set_dynamics(name, create_relativistic_breit_wigner_with_ff)\n",
"model = model_builder.generate()"
"model = model_builder.formulate()"
]
},
{
Expand Down
140 changes: 0 additions & 140 deletions src/ampform/_transition_info.py

This file was deleted.

Loading

0 comments on commit 744fe62

Please sign in to comment.