@@ -70,14 +70,14 @@ def standard_layers_problem():
7070 problem .params = [3.0 , 0.0 , 0.0 , 0.0 ]
7171 problem .bulkIn = [0.0 ]
7272 problem .bulkOut = [6.35e-06 ]
73- problem .qzshifts = [0.0 ]
73+ problem .qzshifts = []
7474 problem .scalefactors = [0.23 ]
7575 problem .domainRatio = []
7676 problem .backgroundParams = [1e-06 ]
7777 problem .resolutionParams = [0.03 ]
7878 problem .contrastBulkIns = [1 ]
7979 problem .contrastBulkOuts = [1 ]
80- problem .contrastQzshifts = [1 ]
80+ problem .contrastQzshifts = []
8181 problem .contrastScalefactors = [1 ]
8282 problem .contrastBackgrounds = [1 ]
8383 problem .contrastBackgroundActions = [1 ]
@@ -91,10 +91,10 @@ def standard_layers_problem():
9191 problem .numberOfLayers = 1
9292 problem .numberOfDomainContrasts = 0
9393 problem .fitParams = [3.0 ]
94- problem .otherParams = [0.0 , 0.0 , 0.0 , 1e-06 , 0.23 , 0.0 , 0.0 , 6.35e-06 , 0.03 ]
94+ problem .otherParams = [0.0 , 0.0 , 0.0 , 1e-06 , 0.23 , 0.0 , 6.35e-06 , 0.03 ]
9595 problem .fitLimits = [[1.0 , 5.0 ]]
96- problem .otherLimits = [[0.0 , 0.0 ], [0.0 , 0.0 ], [0.0 , 0.0 ], [1e-07 , 1e-05 ], [0.02 , 0.25 ], [- 0.0001 , 0.0001 ],
97- [0.0 , 0.0 ], [ 6.2e-06 , 6.35e-06 ], [0.01 , 0.05 ]]
96+ problem .otherLimits = [[0.0 , 0.0 ], [0.0 , 0.0 ], [0.0 , 0.0 ], [1e-07 , 1e-05 ], [0.02 , 0.25 ], [0.0 , 0.0 ],
97+ [6.2e-06 , 6.35e-06 ], [0.01 , 0.05 ]]
9898
9999 return problem
100100
@@ -110,14 +110,14 @@ def domains_problem():
110110 problem .params = [3.0 , 0.0 , 0.0 , 0.0 ]
111111 problem .bulkIn = [0.0 ]
112112 problem .bulkOut = [6.35e-06 ]
113- problem .qzshifts = [0.0 ]
113+ problem .qzshifts = []
114114 problem .scalefactors = [0.23 ]
115115 problem .domainRatio = [0.5 ]
116116 problem .backgroundParams = [1e-06 ]
117117 problem .resolutionParams = [0.03 ]
118118 problem .contrastBulkIns = [1 ]
119119 problem .contrastBulkOuts = [1 ]
120- problem .contrastQzshifts = [1 ]
120+ problem .contrastQzshifts = []
121121 problem .contrastScalefactors = [1 ]
122122 problem .contrastBackgrounds = [1 ]
123123 problem .contrastBackgroundActions = [1 ]
@@ -131,10 +131,10 @@ def domains_problem():
131131 problem .numberOfLayers = 1
132132 problem .numberOfDomainContrasts = 2
133133 problem .fitParams = [3.0 ]
134- problem .otherParams = [0.0 , 0.0 , 0.0 , 1e-06 , 0.23 , 0.0 , 0.0 , 6.35e-06 , 0.03 , 0.5 ]
134+ problem .otherParams = [0.0 , 0.0 , 0.0 , 1e-06 , 0.23 , 0.0 , 6.35e-06 , 0.03 , 0.5 ]
135135 problem .fitLimits = [[1.0 , 5.0 ]]
136- problem .otherLimits = [[0.0 , 0.0 ], [0.0 , 0.0 ], [0.0 , 0.0 ], [1e-07 , 1e-05 ], [0.02 , 0.25 ], [- 0.0001 , 0.0001 ],
137- [0.0 , 0.0 ], [ 6.2e-06 , 6.35e-06 ], [0.01 , 0.05 ], [0.4 , 0.6 ]]
136+ problem .otherLimits = [[0.0 , 0.0 ], [0.0 , 0.0 ], [0.0 , 0.0 ], [1e-07 , 1e-05 ], [0.02 , 0.25 ], [0.0 , 0.0 ],
137+ [6.2e-06 , 6.35e-06 ], [0.01 , 0.05 ], [0.4 , 0.6 ]]
138138
139139 return problem
140140
@@ -150,14 +150,14 @@ def custom_xy_problem():
150150 problem .params = [3.0 , 0.0 , 0.0 , 0.0 ]
151151 problem .bulkIn = [0.0 ]
152152 problem .bulkOut = [6.35e-06 ]
153- problem .qzshifts = [0.0 ]
153+ problem .qzshifts = []
154154 problem .scalefactors = [0.23 ]
155155 problem .domainRatio = []
156156 problem .backgroundParams = [1e-06 ]
157157 problem .resolutionParams = [0.03 ]
158158 problem .contrastBulkIns = [1 ]
159159 problem .contrastBulkOuts = [1 ]
160- problem .contrastQzshifts = [1 ]
160+ problem .contrastQzshifts = []
161161 problem .contrastScalefactors = [1 ]
162162 problem .contrastBackgrounds = [1 ]
163163 problem .contrastBackgroundActions = [1 ]
@@ -171,10 +171,10 @@ def custom_xy_problem():
171171 problem .numberOfLayers = 0
172172 problem .numberOfDomainContrasts = 0
173173 problem .fitParams = [3.0 ]
174- problem .otherParams = [0.0 , 0.0 , 0.0 , 1e-06 , 0.23 , 0.0 , 0.0 , 6.35e-06 , 0.03 ]
174+ problem .otherParams = [0.0 , 0.0 , 0.0 , 1e-06 , 0.23 , 0.0 , 6.35e-06 , 0.03 ]
175175 problem .fitLimits = [[1.0 , 5.0 ]]
176- problem .otherLimits = [[0.0 , 0.0 ], [0.0 , 0.0 ], [0.0 , 0.0 ], [1e-07 , 1e-05 ], [0.02 , 0.25 ], [- 0.0001 , 0.0001 ],
177- [0.0 , 0.0 ], [ 6.2e-06 , 6.35e-06 ], [0.01 , 0.05 ]]
176+ problem .otherLimits = [[0.0 , 0.0 ], [0.0 , 0.0 ], [0.0 , 0.0 ], [1e-07 , 1e-05 ], [0.02 , 0.25 ], [0.0 , 0.0 ],
177+ [6.2e-06 , 6.35e-06 ], [0.01 , 0.05 ]]
178178
179179 return problem
180180
@@ -192,7 +192,7 @@ def standard_layers_cells():
192192 cells .f7 = ['Substrate Roughness' , 'Test Thickness' , 'Test SLD' , 'Test Roughness' ]
193193 cells .f8 = ['Background Param 1' ]
194194 cells .f9 = ['Scalefactor 1' ]
195- cells .f10 = ['Qz shift 1' ]
195+ cells .f10 = []
196196 cells .f11 = ['SLD Air' ]
197197 cells .f12 = ['SLD D2O' ]
198198 cells .f13 = ['Resolution Param 1' ]
@@ -220,7 +220,7 @@ def domains_cells():
220220 cells .f7 = ['Substrate Roughness' , 'Test Thickness' , 'Test SLD' , 'Test Roughness' ]
221221 cells .f8 = ['Background Param 1' ]
222222 cells .f9 = ['Scalefactor 1' ]
223- cells .f10 = ['Qz shift 1' ]
223+ cells .f10 = []
224224 cells .f11 = ['SLD Air' ]
225225 cells .f12 = ['SLD D2O' ]
226226 cells .f13 = ['Resolution Param 1' ]
@@ -248,7 +248,7 @@ def custom_xy_cells():
248248 cells .f7 = ['Substrate Roughness' , 'Test Thickness' , 'Test SLD' , 'Test Roughness' ]
249249 cells .f8 = ['Background Param 1' ]
250250 cells .f9 = ['Scalefactor 1' ]
251- cells .f10 = ['Qz shift 1' ]
251+ cells .f10 = []
252252 cells .f11 = ['SLD Air' ]
253253 cells .f12 = ['SLD D2O' ]
254254 cells .f13 = ['Resolution Param 1' ]
@@ -269,7 +269,7 @@ def non_polarised_limits():
269269 limits = Limits ()
270270 limits .param = [[1.0 , 5.0 ], [0.0 , 0.0 ], [0.0 , 0.0 ], [0.0 , 0.0 ]]
271271 limits .backgroundParam = [[1e-7 , 1e-5 ]]
272- limits .qzshift = [[ - 1e-4 , 1e-4 ] ]
272+ limits .qzshift = []
273273 limits .scalefactor = [[0.02 , 0.25 ]]
274274 limits .bulkIn = [[0.0 , 0.0 ]]
275275 limits .bulkOut = [[6.2e-6 , 6.35e-6 ]]
@@ -285,7 +285,7 @@ def domains_limits():
285285 limits = Limits ()
286286 limits .param = [[1.0 , 5.0 ], [0.0 , 0.0 ], [0.0 , 0.0 ], [0.0 , 0.0 ]]
287287 limits .backgroundParam = [[1e-7 , 1e-5 ]]
288- limits .qzshift = [[ - 1e-4 , 1e-4 ] ]
288+ limits .qzshift = []
289289 limits .scalefactor = [[0.02 , 0.25 ]]
290290 limits .bulkIn = [[0.0 , 0.0 ]]
291291 limits .bulkOut = [[6.2e-6 , 6.35e-6 ]]
@@ -304,16 +304,16 @@ def non_polarised_priors():
304304 ['Test SLD' , RAT .utils .enums .Priors .Uniform , 0.0 , np .inf ],
305305 ['Test Roughness' , RAT .utils .enums .Priors .Uniform , 0.0 , np .inf ]]
306306 priors .backgroundParam = [['Background Param 1' , RAT .utils .enums .Priors .Uniform , 0.0 , np .inf ]]
307- priors .qzshift = [[ 'Qz shift 1' , RAT . utils . enums . Priors . Uniform , 0.0 , np . inf ] ]
307+ priors .qzshift = []
308308 priors .scalefactor = [['Scalefactor 1' , RAT .utils .enums .Priors .Uniform , 0.0 , np .inf ]]
309309 priors .bulkIn = [['SLD Air' , RAT .utils .enums .Priors .Uniform , 0.0 , np .inf ]]
310310 priors .bulkOut = [['SLD D2O' , RAT .utils .enums .Priors .Uniform , 0.0 , np .inf ]]
311311 priors .resolutionParam = [['Resolution Param 1' , RAT .utils .enums .Priors .Uniform , 0.0 , np .inf ]]
312312 priors .domainRatio = []
313313 priors .priorNames = ['Substrate Roughness' , 'Test Thickness' , 'Test SLD' , 'Test Roughness' , 'Background Param 1' ,
314- 'Scalefactor 1' , 'Qz shift 1' , ' SLD Air' , 'SLD D2O' , 'Resolution Param 1' ]
314+ 'Scalefactor 1' , 'SLD Air' , 'SLD D2O' , 'Resolution Param 1' ]
315315 priors .priorValues = [[1 , 0.0 , np .inf ], [1 , 0.0 , np .inf ], [1 , 0.0 , np .inf ], [1 , 0.0 , np .inf ], [1 , 0.0 , np .inf ],
316- [1 , 0.0 , np .inf ], [1 , 0.0 , np .inf ], [1 , 0.0 , np .inf ], [1 , 0.0 , np .inf ], [ 1 , 0.0 , np . inf ] ]
316+ [1 , 0.0 , np .inf ], [1 , 0.0 , np .inf ], [1 , 0.0 , np .inf ], [1 , 0.0 , np .inf ]]
317317
318318 return priors
319319
@@ -327,17 +327,16 @@ def domains_priors():
327327 ['Test SLD' , RAT .utils .enums .Priors .Uniform , 0.0 , np .inf ],
328328 ['Test Roughness' , RAT .utils .enums .Priors .Uniform , 0.0 , np .inf ]]
329329 priors .backgroundParam = [['Background Param 1' , RAT .utils .enums .Priors .Uniform , 0.0 , np .inf ]]
330- priors .qzshift = [[ 'Qz shift 1' , RAT . utils . enums . Priors . Uniform , 0.0 , np . inf ] ]
330+ priors .qzshift = []
331331 priors .scalefactor = [['Scalefactor 1' , RAT .utils .enums .Priors .Uniform , 0.0 , np .inf ]]
332332 priors .bulkIn = [['SLD Air' , RAT .utils .enums .Priors .Uniform , 0.0 , np .inf ]]
333333 priors .bulkOut = [['SLD D2O' , RAT .utils .enums .Priors .Uniform , 0.0 , np .inf ]]
334334 priors .resolutionParam = [['Resolution Param 1' , RAT .utils .enums .Priors .Uniform , 0.0 , np .inf ]]
335335 priors .domainRatio = [['Domain Ratio 1' , RAT .utils .enums .Priors .Uniform , 0.0 , np .inf ]]
336336 priors .priorNames = ['Substrate Roughness' , 'Test Thickness' , 'Test SLD' , 'Test Roughness' , 'Background Param 1' ,
337- 'Scalefactor 1' , 'Qz shift 1' , ' SLD Air' , 'SLD D2O' , 'Resolution Param 1' , 'Domain Ratio 1' ]
337+ 'Scalefactor 1' , 'SLD Air' , 'SLD D2O' , 'Resolution Param 1' , 'Domain Ratio 1' ]
338338 priors .priorValues = [[1 , 0.0 , np .inf ], [1 , 0.0 , np .inf ], [1 , 0.0 , np .inf ], [1 , 0.0 , np .inf ], [1 , 0.0 , np .inf ],
339- [1 , 0.0 , np .inf ], [1 , 0.0 , np .inf ], [1 , 0.0 , np .inf ], [1 , 0.0 , np .inf ], [1 , 0.0 , np .inf ],
340- [1 , 0.0 , np .inf ]]
339+ [1 , 0.0 , np .inf ], [1 , 0.0 , np .inf ], [1 , 0.0 , np .inf ], [1 , 0.0 , np .inf ], [1 , 0.0 , np .inf ]]
341340
342341 return priors
343342
@@ -376,7 +375,7 @@ def standard_layers_controls():
376375 controls .boundHandling = BoundHandling .Fold
377376 controls .checks .fitParam = [1 , 0 , 0 , 0 ]
378377 controls .checks .fitBackgroundParam = [0 ]
379- controls .checks .fitQzshift = [0 ]
378+ controls .checks .fitQzshift = []
380379 controls .checks .fitScalefactor = [0 ]
381380 controls .checks .fitBulkIn = [0 ]
382381 controls .checks .fitBulkOut = [0 ]
@@ -419,7 +418,7 @@ def custom_xy_controls():
419418 controls .boundHandling = BoundHandling .Fold
420419 controls .checks .fitParam = [1 , 0 , 0 , 0 ]
421420 controls .checks .fitBackgroundParam = [0 ]
422- controls .checks .fitQzshift = [0 ]
421+ controls .checks .fitQzshift = []
423422 controls .checks .fitScalefactor = [0 ]
424423 controls .checks .fitBulkIn = [0 ]
425424 controls .checks .fitBulkOut = [0 ]
@@ -435,7 +434,7 @@ def test_checks():
435434 checks = Checks ()
436435 checks .fitParam = [1 , 0 , 0 , 0 ]
437436 checks .fitBackgroundParam = [0 ]
438- checks .fitQzshift = [0 ]
437+ checks .fitQzshift = []
439438 checks .fitScalefactor = [0 ]
440439 checks .fitBulkIn = [0 ]
441440 checks .fitBulkOut = [0 ]
@@ -535,7 +534,6 @@ def check_problem_equal(actual_problem, expected_problem) -> None:
535534 for scalar_field in scalar_fields :
536535 assert getattr (actual_problem , scalar_field ) == getattr (expected_problem , scalar_field )
537536 for array_field in array_fields :
538- print (array_field )
539537 assert (getattr (actual_problem , array_field ) == getattr (expected_problem , array_field )).all ()
540538
541539 # Need to account for "NaN" entries in contrastCustomFiles field
0 commit comments