Skip to content
This repository has been archived by the owner on Oct 11, 2021. It is now read-only.

Commit

Permalink
refactor: remove Test key from Parameters section
Browse files Browse the repository at this point in the history
Closes #397
  • Loading branch information
redeboer committed Jan 10, 2021
1 parent e1bb2db commit e2d844b
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 22 deletions.
14 changes: 0 additions & 14 deletions src/expertsystem/io/_dict/dump.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,26 +113,12 @@ def __parameters_to_dict(parameters: FitParameters) -> List[dict]:


def __parameter_to_dict(parameter: FitParameter) -> dict:
parameter_type = ""
if "_" in parameter.name:
name_prefix = parameter.name.split("_")[0]
name_prefix = name_prefix.lower()
if name_prefix == "magnitude":
parameter_type = "Magnitude"
elif name_prefix == "phase":
parameter_type = "Phase"
elif name_prefix == "strength":
parameter_type = "Strength"
elif name_prefix == "mesonradius":
parameter_type = "MesonRadius"
output_dict = {
"Name": parameter.name,
"Value": parameter.value,
}
if parameter.is_fixed:
output_dict["Fix"] = True
if parameter_type:
output_dict["Type"] = parameter_type
return output_dict


Expand Down
1 change: 0 additions & 1 deletion src/expertsystem/schemas/amplitude-model.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@
"title": "Parameter name",
"description": "Has to be a unique string that is used to identify where the parameter is used in the rest of the model"
},
"Type": { "type": "string" },
"Value": {
"type": "number",
"title": "Starting value of the fit parameter"
Expand Down
7 changes: 0 additions & 7 deletions tests/unit/io/expected_recipe.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,14 @@ Kinematics:

Parameters:
- Name: &par1 Magnitude_J/psi(1S)_to_f(0)(980)_0+gamma_1;f(0)(980)_to_pi0_0+pi0_0;
Type: Magnitude
Value: 1.0
- Name: &par2 Phase_J/psi(1S)_to_f(0)(980)_0+gamma_1;f(0)(980)_to_pi0_0+pi0_0;
Type: Phase
Value: 0.0
- Name: &par3 Magnitude_J/psi(1S)_to_f(0)(1500)_0+gamma_1;f(0)(1500)_to_pi0_0+pi0_0;
Type: Magnitude
Value: 1.0
- Name: &par4 Phase_J/psi(1S)_to_f(0)(1500)_0+gamma_1;f(0)(1500)_to_pi0_0+pi0_0;
Type: Phase
Value: 0.0
- Name: &par5 MesonRadius_J/psi(1S)
Type: MesonRadius
Value: 1.0
Fix: true
- Name: &par6 Position_f(0)(980)
Expand All @@ -35,15 +30,13 @@ Parameters:
- Name: &par8 MesonRadius_f(0)(980)
Value: 1.0
Fix: true
Type: MesonRadius
- Name: &par9 Position_f(0)(1500)
Value: 1.506
- Name: &par10 Width_f(0)(1500)
Value: 0.112
- Name: &par11 MesonRadius_f(0)(1500)
Value: 1.0
Fix: true
Type: MesonRadius

Intensity:
Class: StrengthIntensity
Expand Down

0 comments on commit e2d844b

Please sign in to comment.