@@ -89,43 +89,47 @@ def makeRecipe(stru1, stru2, datname):
8989
9090 # Vary the inner radius and thickness of the shell. Constrain the core
9191 # diameter to twice the shell radius.
92- recipe .addVar (contribution .radius , 15 )
93- recipe .addVar (contribution .thickness , 11 )
92+ recipe .add_variable (contribution .radius , 15 )
93+ recipe .add_variable (contribution .thickness , 11 )
9494 recipe .constrain (contribution .psize , "2 * radius" )
9595
9696 # Configure the fit variables
9797 # Start by configuring the scale factor and resolution factors.
9898 # We want the sum of the phase scale factors to be 1.
99- recipe .newVar ("scale_CdS" , 0.7 )
99+ recipe .create_new_variable ("scale_CdS" , 0.7 )
100100 recipe .constrain (generator_cds .scale , "scale_CdS" )
101101 recipe .constrain (generator_zns .scale , "1 - scale_CdS" )
102102 # We also want the resolution factor to be the same on each.
103103
104104 # Vary the global scale as well.
105- recipe .addVar (contribution .scale , 0.3 )
105+ recipe .add_variable (contribution .scale , 0.3 )
106106
107107 # Now we can configure the structural parameters. We tag the different
108108 # structural variables so we can easily turn them on and off in the
109109 # subsequent refinement.
110110 phase_cds = generator_cds .phase
111111 for par in phase_cds .sgpars .latpars :
112- recipe .addVar (par , name = par .name + "_cds" , tag = "lat" )
112+ recipe .add_variable (par , name = par .name + "_cds" , tag = "lat" )
113113 for par in phase_cds .sgpars .adppars :
114- recipe .addVar (par , 1 , name = par .name + "_cds" , tag = "adp" )
115- recipe .addVar (phase_cds .sgpars .xyzpars .z_1 , name = "z_1_cds" , tag = "xyz" )
114+ recipe .add_variable (par , 1 , name = par .name + "_cds" , tag = "adp" )
115+ recipe .add_variable (
116+ phase_cds .sgpars .xyzpars .z_1 , name = "z_1_cds" , tag = "xyz"
117+ )
116118 # Since we know these have stacking disorder, constrain the B33 adps for
117119 # each atom type.
118120 recipe .constrain ("B33_1_cds" , "B33_0_cds" )
119- recipe .addVar (generator_cds .delta2 , name = "delta2_cds" , value = 5 )
121+ recipe .add_variable (generator_cds .delta2 , name = "delta2_cds" , value = 5 )
120122
121123 phase_zns = generator_zns .phase
122124 for par in phase_zns .sgpars .latpars :
123- recipe .addVar (par , name = par .name + "_zns" , tag = "lat" )
125+ recipe .add_variable (par , name = par .name + "_zns" , tag = "lat" )
124126 for par in phase_zns .sgpars .adppars :
125- recipe .addVar (par , 1 , name = par .name + "_zns" , tag = "adp" )
126- recipe .addVar (phase_zns .sgpars .xyzpars .z_1 , name = "z_1_zns" , tag = "xyz" )
127+ recipe .add_variable (par , 1 , name = par .name + "_zns" , tag = "adp" )
128+ recipe .add_variable (
129+ phase_zns .sgpars .xyzpars .z_1 , name = "z_1_zns" , tag = "xyz"
130+ )
127131 recipe .constrain ("B33_1_zns" , "B33_0_zns" )
128- recipe .addVar (generator_zns .delta2 , name = "delta2_zns" , value = 2.5 )
132+ recipe .add_variable (generator_zns .delta2 , name = "delta2_zns" , value = 2.5 )
129133
130134 # Give the recipe away so it can be used!
131135 return recipe
0 commit comments