Mercurial > repos > muon-spectroscopy-computational-project > muspinsim_config
comparison muspinsim_config.xml @ 0:c70012022f0f draft
planemo upload for repository https://github.com/muon-spectroscopy-computational-project/muon-galaxy-tools/main/muspinsim_config commit d130cf2c46d933fa9d0214ddbd5ddf860f322dc4
author | muon-spectroscopy-computational-project |
---|---|
date | Thu, 25 Aug 2022 16:16:47 +0000 |
parents | |
children | 844b73d2f40c |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:c70012022f0f |
---|---|
1 <tool id="muspinsim_config" name="MuSpinSim Configure" version="@TOOL_VERSION@+galaxy@WRAPPER_VERSION@" python_template_version="3.5" profile="22.01"> | |
2 <description>define simulation parameters</description> | |
3 <macros> | |
4 <!-- version of underlying tool (PEP 440) --> | |
5 <token name="@TOOL_VERSION@">1.1.0</token> | |
6 <!-- version of this tool wrapper (integer) --> | |
7 <token name="@WRAPPER_VERSION@">0</token> | |
8 <!-- citation should be updated with every underlying tool version --> | |
9 <!-- typical fields to update are version, month, year, and doi --> | |
10 <token name="@TOOL_CITATION@"> | |
11 @software{muspinsim, | |
12 author = {Sturniolo, Simone and Liborio, Leandro and Owen, Josh and Mudaraddi, Anish and {Muon Spectroscopy Computational Project}}, | |
13 license = {MIT}, | |
14 title = {{muspinsim}}, | |
15 url = {https://github.com/muon-spectroscopy-computational-project/muspinsim}, | |
16 version = {v1.1.0}, | |
17 month = {5}, | |
18 year = {2022}, | |
19 doi = {10.5281/zenodo.6563074} | |
20 } | |
21 </token> | |
22 </macros> | |
23 <creator> | |
24 <person givenName="Anish" familyName="Mudaraddi" identifier="https://orcid.org/0000-0002-2135-2705"/> | |
25 <person givenName="Eli" familyName="Chadwick" url="https://github.com/elichad" identifier="https://orcid.org/0000-0002-0035-6475"/> | |
26 <organization url="https://muon-spectroscopy-computational-project.github.io/index.html" name="The Muon Spectroscopy Computational Project"/> | |
27 </creator> | |
28 <requirements> | |
29 <requirement type="package" version="@TOOL_VERSION@">muspinsim</requirement> | |
30 </requirements> | |
31 <command detect_errors="exit_code"><![CDATA[ | |
32 cp ${__tool_directory__}/sample_fitting_data.dat ./fitting_data.dat && | |
33 python ${__tool_directory__}/build_file.py inputs.json | |
34 ]]></command> | |
35 <configfiles> | |
36 <inputs name="inputs" filename="inputs.json" /> | |
37 </configfiles> | |
38 <inputs> | |
39 <param type="text" name="out_file_prefix" label="Name" help="A name with which to label this configuration" optional="true" value="muspinsim" /> | |
40 <section name="spins" expanded="true" title="Spins"> | |
41 <repeat name="spins" title="Spins to simulate" min="1" help="Specify the spins to be used in the system. This should include a muon (mu) and one or more electrons (e)"> | |
42 <conditional name="spin_options"> | |
43 <param name="spin_preset" type="select" value="mu" label="Species" help="Select 'custom' to define own"> | |
44 <option selected="true" value="mu">mu</option> | |
45 <option value="e">e</option> | |
46 <option value="custom">custom</option> | |
47 </param> | |
48 <when value="custom"> | |
49 <param name="spin" optional="false" type="text" label="Species name"/> | |
50 <param name="atomic_mass" optional="true" type="integer" min="0" value="" label="Atomic mass" help="Leave blank to use default mass - whole numbers only"/> | |
51 </when> | |
52 <when value="mu"/> | |
53 <when value="e"/> | |
54 </conditional> | |
55 </repeat> | |
56 </section> | |
57 <section name="interaction_params" expanded="true" title="Spin Interactions" help=""> | |
58 <repeat name="interactions" title="Interactions to simulate" help="Add couplings between spins, and/or dissipation terms. Interaction terms available: Zeeman, hyperfine, dipolar, quadrupolar or dissipation. See muspinsim docs for more info"> | |
59 <conditional name="interaction_options"> | |
60 <param name="interaction" type="select" label="Choose interaction type"> | |
61 <option value="zeeman">Zeeman</option> | |
62 <option value="hyperfine">hyperfine</option> | |
63 <option value="dipolar">dipolar</option> | |
64 <option value="quadrupolar">quadrupolar</option> | |
65 <option value="dissipation">dissipation</option> | |
66 </param> | |
67 <when value="zeeman"> | |
68 <param name="zeeman_index" type="integer" value="" label="Index of coupled spin" min="1" | |
69 help="Index refers to the order of the spins listed in 'spins' section. The first spin in the list has index 1, the second has index 2, and so on."/> | |
70 <param name="zeeman_vector" type="text" value="" label="Zeeman coupling vector" | |
71 help="Define 1X3 vector for local magnetic field coupling (T). | |
72 Allows default expressions, constants and functions (see help)"/> | |
73 </when> | |
74 <when value="hyperfine"> | |
75 <param name="hfine_index" type="integer" value="" label="Index of nuclear coupled spin" min="1" | |
76 help="Non-electronic spin - muon or otherwise. | |
77 Index refers to the order of the spins listed in 'spins' section. The first spin in the list has index 1, the second has index 2, and so on."/> | |
78 <param name="hfine_e_index" type="integer" value="" optional="true" min="1" label="Index of electronic coupled spin" | |
79 help="Optional, will use first defined electronic spin if unspecified"/> | |
80 <param name="hfine_matrix" area="true" type="text" value="" label="Hyperfine coupling tensor" | |
81 help="Define 3X3 tensor for coupling between electron and non-electron spins (in MHz). | |
82 Allows default expressions, constants and functions (see help)"> | |
83 <sanitizer> | |
84 <valid initial="string.printable"> | |
85 </valid> | |
86 </sanitizer> | |
87 </param> | |
88 </when> | |
89 <when value="dipolar"> | |
90 <param name="di_index" type="integer" value="" min="1" label="Index of 1st coupled spin" | |
91 help="Index refers to the order of the spins listed in 'spins' section. The first spin in the list has index 1, the second has index 2, and so on."/> | |
92 <param name="di_index_2" type="integer" value="" label="Index of 2nd coupled spin" | |
93 help="Index refers to the order of the spins listed in 'spins' section. The first spin in the list has index 1, the second has index 2, and so on."/> | |
94 <param name="di_vector" type="text" value="" label="Dipole coupling vector" | |
95 help="Define 1X3 vector for coupling between two spins (Angstrom). | |
96 Allows default expressions, constants and functions (see help)"/> | |
97 </when> | |
98 <when value="quadrupolar"> | |
99 <param name="quad_index" type="integer" value="" label="Index of coupled spin" | |
100 help="Index refers to the order of the spins listed in 'spins' section. The first spin in the list has index 1, the second has index 2, and so on."/> | |
101 <param name="quad_matrix" area="true" type="text" value="" label="Electric Field Gradient tensor" | |
102 help="Define 3X3 tensor (in atomic units) for quadrupolar coupling. | |
103 Allows default expressions, constants and functions (see help). | |
104 Warning: spins with zero quadrupole moment will have zero coupling regardless of the input"> | |
105 <sanitizer> | |
106 <valid initial="string.printable"> | |
107 </valid> | |
108 </sanitizer> | |
109 </param> | |
110 </when> | |
111 <when value="dissipation"> | |
112 <param name="dis_index" type="integer" value="" label="Index of spin with dissipation" | |
113 help="Index refers to the order of the spins listed in 'spins' section. The first spin in the list has index 1, the second has index 2, and so on."/> | |
114 <param name="dis_val" type="text" value="" label="Dissipation" | |
115 help="Define dissipation term (MHz). | |
116 Allows default expressions, constants and functions (see help)"/> | |
117 </when> | |
118 </conditional> | |
119 </repeat> | |
120 </section> | |
121 <section name="experiment_params" expanded="true" title="Experiment Parameters"> | |
122 <conditional name="experiment"> | |
123 <param name="experiment_preset" type="select" value='custom' display="radio" label="Experiment type" | |
124 help="Experiment preset to use. Avoided Level Crossing (ALC): sets polarization to longitudinal, x-axis to field and y-axis to integral. | |
125 Zero field: sets polarization to transverse and field to 0. Choose custom for no preset"> | |
126 <option value="alc">Avoided Level Crossing (ALC)</option> | |
127 <option value="zero_field">Zero Field</option> | |
128 <option selected="true" value="custom">Custom</option> | |
129 </param> | |
130 <when value="alc"> | |
131 <repeat name="fields" title="Fields" help="Magnetic fields"> | |
132 <param name="field" type="text" value="0" label="Field" | |
133 optional="true" help="Optional, (default is 0). | |
134 Accepts 1X3 vector, or scalar value. Scalar value means field is assumed to be aligned with z axis. | |
135 Allows default expressions, constants and functions, plus MHz, muon_gyr constants and special 'range()' function (see help section)"/> | |
136 </repeat> | |
137 </when> | |
138 <when value="zero_field"> | |
139 <param name="x_axis" type="select" value="time" display="radio" label="X axis" | |
140 help="Range to use as X axis for output file(s)"> | |
141 <option selected="true" value="time">time</option> | |
142 <option value="field">field</option> | |
143 </param> | |
144 <param name="y_axis" type="select" value="asymmetry" display="radio" label="Y axis" | |
145 help="Range to use as y axis for output file(s) | |
146 Asymmetry: use muon's polarization. | |
147 Integral: use muon's polarization integral over time. | |
148 WARNING: if integral chosen, 'time' parameter is ignored, and cannot be used as x-axis parameter "> | |
149 <option value="integral">integral</option> | |
150 <option selected="true" value="asymmetry">asymmetry</option> | |
151 </param> | |
152 </when> | |
153 <when value="custom"> | |
154 <param name="x_axis" type="select" value="time" display="radio" label="X axis" | |
155 help="Range to use as X axis for output file(s)"> | |
156 <option selected="true" value="time">time</option> | |
157 <option value="field">field</option> | |
158 </param> | |
159 <param name="y_axis" type="select" value="asymmetry" display="radio" label="Y axis" | |
160 help="Range to use as y axis for output file(s) | |
161 Asymmetry: use muon's polarization. | |
162 Integral: use muon's polarization integral over time. | |
163 WARNING: if integral chosen, 'time' parameter is ignored, and cannot be used as x-axis parameter "> | |
164 <option value="integral">integral</option> | |
165 <option selected="true" value="asymmetry">asymmetry</option> | |
166 </param> | |
167 <repeat name="fields" title="Fields" help="Magnetic fields"> | |
168 <param name="field" type="text" value="0" label="Field (T)" | |
169 optional="true" help="Optional, (default is 0). | |
170 Accepts 1X3 vector, or scalar value. Scalar value means field is assumed to be aligned with z axis. | |
171 Allows default expressions, constants and functions, plus MHz, muon_gyr constants and special 'range()' function (see help section)"/> | |
172 </repeat> | |
173 <repeat name="polarizations" title="Polarizations" help="The direction along which the muon | |
174 should be polarized when starting, as well as the one in which it will be measured. | |
175 Each entry will generate a separate calculation when muspinsim is run"> | |
176 <conditional name="polarization_options"> | |
177 <param name="polarization_preset" value="custom" type="select" display="radio" label="Polarization" | |
178 help="transverse: along x-axis, longitudinal: along z-axis, custom: define vector"> | |
179 <option value="longitudinal">longditudinal</option> | |
180 <option value="transverse">transverse</option> | |
181 <option selected="true" value="custom">custom</option> | |
182 </param> | |
183 <when value="custom"> | |
184 <param name="polarization" type="text" value="" label="Enter custom vector for polarization" | |
185 help="Accepts 1X3 vector. | |
186 Allows default expressions, constants and functions (see help section)"/> | |
187 </when> | |
188 <when value="longitudinal" /> | |
189 <when value="transverse" /> | |
190 </conditional> | |
191 </repeat> | |
192 </when> | |
193 </conditional> | |
194 <param name="average_axes" type="select" display="checkboxes" multiple="true" optional="true" value="orientation" label="Average axes" | |
195 help="Keywords that should have an average carried out over them. Each keyword ticked should have a range specified. | |
196 Keywords not ticked or set as X axis, but which have a range set, will generate separate calculations for each value in the range when muspinsim is run."> | |
197 <option selected="true" value="orientation">orientation</option> | |
198 <option value="polarization">polarization</option> | |
199 <option value="field">field</option> | |
200 <option value="time">time</option> | |
201 <option value="temperature">temperature</option> | |
202 </param> | |
203 <repeat name="orientations" title="Orientations" help="Orientations to use for crystallites - (define powder averages)"> | |
204 <conditional name="orientation_options"> | |
205 <param name="orientation_preset" type="select" display="radio" label="Orientation" optional="false" | |
206 help="Polar angles: Define two polar angles θ and ϕ, defining only the direction of the z-axis (recommended for powder averages). | |
207 Euler angles: Define 3 Euler angles defining a new frame, convention used is ZYZ by default. | |
208 Euler angles with weight: define 3 Euler angles and a weight (will be normalized automatically). | |
209 Euler angles helper function: eulrange(n). | |
210 Zaremba-Conroy-Wolfsberg helper function: zcw(n)"> | |
211 <option value="2_polar">Polar angles</option> | |
212 <option value="3_euler">Euler angles</option> | |
213 <option value="4_euler">Euler angles with weight</option> | |
214 <option value="eulrange">Euler angles helper function (eulrange(n))</option> | |
215 <option selected="true" value="zcw">Zaremba-Conroy-Wolfsberg helper function (zcw(n))</option> | |
216 </param> | |
217 <when value="eulrange"> | |
218 <param name="eul_n" type="text" value="0" label="n" | |
219 help="value for n for eulrange(n), | |
220 Allows default expressions, constants and functions. | |
221 WARNING: large values are more computationally expensive." | |
222 /> | |
223 </when> | |
224 <when value="zcw"> | |
225 <param name="zcw_n" type="text" value="0" label="n" | |
226 help="value for n for zcw(n) | |
227 Allows default expressions, constants and functions. | |
228 WARNING: large values are more computationally expensive." | |
229 /> | |
230 </when> | |
231 <when value="2_polar"> | |
232 <param name="theta" type="text" value="" label="θ (theta/inclination) angle" | |
233 help="All polar angle entries allow default expressions, constants and functions"/> | |
234 <param name="phi" type="text" value="" label="ϕ (phi/azimuth) angle" | |
235 help="All polar angle entries allow default expressions, constants and functions"/> | |
236 </when> | |
237 <when value="3_euler"> | |
238 <param name="eul_1" type="text" value="" label="Euler angle 1" | |
239 help="All Euler angle entries allow default expressions, constants and functions"/> | |
240 <param name="eul_2" type="text" value="" label="Euler angle 2" | |
241 help="All Euler angle entries allow default expressions, constants and functions"/> | |
242 <param name="eul_3" type="text" value="" label="Euler angle 3" | |
243 help="All Euler angle entries allow default expressions, constants and functions"/> | |
244 | |
245 </when> | |
246 <when value="4_euler"> | |
247 <param name="eul_1" type="text" value="" label="Euler angle 1" | |
248 help="All Euler angle entries allow default expressions and constants"/> | |
249 <param name="eul_2" type="text" value="" label="Euler angle 2" | |
250 help="All Euler angle entries allow default expressions and constants"/> | |
251 <param name="eul_3" type="text" value="" label="Euler angle 3" | |
252 help="All Euler angle entries allow default expressions and constants"/> | |
253 <param name="weight" type="float" value="0" label="Weight" | |
254 help="Allows only floating point value, weights will automatically be normalised"/> | |
255 </when> | |
256 </conditional> | |
257 </repeat> | |
258 <param name="euler_convention" type="select" display="radio" label="Euler Convention" | |
259 help="Euler angle convention to use for orientation definitions (ignored if Euler angles not defined)"> | |
260 <option selected="true" value="zyz">ZYZ</option> | |
261 <option value="zxz">ZXZ</option> | |
262 </param> | |
263 <repeat name="times" title="Time" help="A time or range of times (μs)"> | |
264 <param name="time" type="text" label="Time" | |
265 help="Either a single time value or `range` function | |
266 Allows default expressions, default constants, and special 'range()' function (see help section)" | |
267 optional="true" value="range(0, 10, 101)"/> | |
268 </repeat> | |
269 <repeat name="temperatures" title="Temperature" help="Temperature or range of temperatures (K)"> | |
270 <param name="temperature" type="text" | |
271 help="Either single value or 'range()' function | |
272 Allows default expressions, default constants, and special 'range()' function (see help section). | |
273 Warning: both density matrices and dissipative couplings for finite temperatures are only calculated approximatively, see muspinsim docs." | |
274 optional="true" value="inf"/> | |
275 </repeat> | |
276 </section> | |
277 <section name="fitting_params" expanded="true" title="Fitting Parameters"> | |
278 <conditional name="fitting_options"> | |
279 <param name="fitting" type="select" display="radio" optional="false" value="" label="Fit experimental data with simulations" | |
280 help="Fitting requires a file with data to fit. File must be given in muspinsim tool, or by manually setting filepath for keyword 'fitting_data' if running muspinsim externally"> | |
281 <option value="true">Yes</option> | |
282 <option selected="true" value="">No</option> | |
283 </param> | |
284 <when value="true"> | |
285 <param name="fitting_method" type="select" display="radio" optional="false" value="nelder-mead" label="Method to use to fit the data" | |
286 help="See the help section for a description of each method"> | |
287 <option selected="true" value="nelder-mead">Nelder-Mead</option> | |
288 <option value="lbfgs">L-BFGS</option> | |
289 </param> | |
290 <repeat name="fitting_variables" title="Variable to fit to the experimental data"> | |
291 <param name="var_name" type="text" optional="false" label="Name of the variable"/> | |
292 <param name="start_val" type="text" value="0" label="Starting value" | |
293 help="Allows default expressions, constants and functions, plus MHz, muon_gyr constants. Cannot contain names of other variables"/> | |
294 <param name="min_bound" type="text" value="-inf" label="minimum bound" | |
295 help="Allows default expressions, constants and functions, plus MHz, muon_gyr constants"/> | |
296 <param name="max_bound" type="text" value="inf" label="maximum bound" | |
297 help="Allows default expressions, constants and functions, plus MHz, muon_gyr constants"/> | |
298 </repeat> | |
299 <param name="fitting_tolerance" type="float" optional='true' value="" label="Fitting Tolerance" | |
300 help="Used as the tol parameter in Scipy's scipy.optimize.minimize method. Will use scipy defaults if left blank. | |
301 Does not accept expressions/functions/constants" | |
302 /> | |
303 </when> | |
304 <when value=""/> | |
305 </conditional> | |
306 </section> | |
307 </inputs> | |
308 <outputs> | |
309 <data format="txt" label="muspinsim input file $out_file_prefix" name="out_file" from_work_dir="outfile.in" /> | |
310 </outputs> | |
311 <tests> | |
312 <test> | |
313 <param name="out_file_prefix" value="test_1"/> | |
314 <param name="spin_preset" value="custom"/> | |
315 <param name="spin" value="H"/> | |
316 <param name="spin_preset" value="mu"/> | |
317 <param name="interaction" value="zeeman"/> | |
318 <param name="zeeman_index" value="1" /> | |
319 <param name="zeeman_vector" value="1 0 0" /> | |
320 <param name="zeeman_index" value="2" /> | |
321 <param name="zeeman_vector" value="2 0 0" /> | |
322 <output name="out_file" file="test_1.in" ftype="txt" compare="diff" /> | |
323 </test> | |
324 <test> | |
325 <param name="out_file_prefix" value="test_2"/> | |
326 <param name="spin_preset" value="e"/> | |
327 <param name="spin_preset" value="mu"/> | |
328 <param name="interaction" value="hyperfine"/> | |
329 <param name="hfine_index" value="1" /> | |
330 <param name="hfine_matrix" value="[1 0 0 sin(10) (5*2) 0 10*pi 5 cos(20)]"/> | |
331 <param name="time" value="range(0, 0.1)" /> | |
332 <param name="y_axis" value="asymmetry" /> | |
333 <param name="field" value="1.0" /> | |
334 <param name="temperature" value="1.0" /> | |
335 <output name="out_file" file="test_2.in" ftype="txt" compare="diff" /> | |
336 </test> | |
337 <test> | |
338 <param name="out_file_prefix" value="test_3"/> | |
339 <param name="spin_preset" value="custom"/> | |
340 <param name="spin" value="H"/> | |
341 <param name="spin_preset" value="mu"/> | |
342 <param name="spin_preset" value="e"/> | |
343 <param name="interaction" value="hyperfine"/> | |
344 <param name="hfine_index" value="2" /> | |
345 <param name="hfine_matrix" value="[580 5 10 5 580 9 10 9 580]"/> | |
346 <param name="interaction" value="hyperfine"/> | |
347 <param name="hfine_index" value="3" /> | |
348 <param name="hfine_matrix" value="[(300/2) 3 4*10 ], [3 15*10 6-3+2] ,[4 5 15 ]"/> | |
349 <param name="average_axes" value="polarization,temperature" /> | |
350 <param name="experiment_preset" value="alc" /> | |
351 <param name="field" value="range(1.8, 2.6, 100)" /> | |
352 <param name="orientation_preset" value="zcw" /> | |
353 <param name="zcw_n" value="20" /> | |
354 <output name="out_file" file="test_3.in" ftype="txt" compare="diff" /> | |
355 </test> | |
356 <test> | |
357 <param name="out_file_prefix" value="test_4"/> | |
358 <param name="spin_preset" value="custom"/> | |
359 <param name="spin" value="F"/> | |
360 <param name="spin_preset" value="custom"/> | |
361 <param name="spin" value="F"/> | |
362 <param name="spin_preset" value="mu"/> | |
363 <param name="interaction" value="dipolar"/> | |
364 <param name="di_index" value="1"/> | |
365 <param name="di_index_2" value="2"/> | |
366 <param name="di_vector" value="0.9 0.9 0"/> | |
367 <param name="interaction" value="dipolar"/> | |
368 <param name="di_index" value="1"/> | |
369 <param name="di_index_2" value="3"/> | |
370 <param name="di_vector" value="-0.9 -0.9 0"/> | |
371 <param name="interaction" value="dissipation"/> | |
372 <param name="dis_index" value="1"/> | |
373 <param name="dis_val" value="0.5"/> | |
374 <param name="average_axes" value="" /> | |
375 <param name="experiment_preset" value="custom" /> | |
376 <param name="field" value="1.5e-2 1.0e-2 1.0e-2"/> | |
377 <param name="field" value="0.01"/> | |
378 <param name="polarization_preset" value="custom"/> | |
379 <param name="polarization" value="1 0 0"/> | |
380 <param name="time" value="range(0,8.0,1000)"/> | |
381 <param name="time" value="range(0,1.0)"/> | |
382 <param name="orientation_preset" value="eulrange"/> | |
383 <param name="eul_n" value="10"/> | |
384 <output name="out_file" file="test_4.in" ftype="txt" compare="diff" /> | |
385 </test> | |
386 <test> | |
387 <param name="out_file_prefix" value="test_5"/> | |
388 <param name="spin_preset" value="mu"/> | |
389 <param name="interaction" value="dissipation"/> | |
390 <param name="dis_index" value="1"/> | |
391 <param name="dis_val" value="g"/> | |
392 <param name="experiment_preset" value="custom" /> | |
393 <param name="field" value="1.0/muon_gyr" /> | |
394 <param name="fitting" value="true"/> | |
395 <param name="var_name" value="g" /> | |
396 <param name="min_bound" value="0.0" /> | |
397 <param name="fitting_tolerance" value="1.0" /> | |
398 <output name="out_file" file="test_5.in" ftype="txt" compare="diff" /> | |
399 </test> | |
400 </tests> | |
401 <help><![CDATA[ | |
402 Tool to create input parameter file for Muspinsim. | |
403 | |
404 | |
405 This tool creates a structured text file with keywords and values which describe the system to model for Muspinsim. | |
406 See muspinsim docs for more information https://muon-spectroscopy-computational-project.github.io/muspinsim/input/. | |
407 | |
408 | |
409 Muspinsim allows expressions and special functions to be used when defining certain keywords. This tool also allows this. | |
410 Check the hint at the bottom of each input to see what, if any, special function or expressions can be used. | |
411 | |
412 | |
413 Default expressions include the use of the operators :code:`+ - * /` and :code:`^` for exponentiation. Expressions | |
414 should not contain whitespace. For example, use :code:`1+2` not :code:`1 + 2`. | |
415 | |
416 | |
417 Default constants include: | |
418 - :code:`pi`: ratio of a circle and its diameter | |
419 - :code:`e`: base of the natural logarithm | |
420 - :code:`deg`: conversion factor between radians and degrees, equivalent to 180/pi | |
421 - :code:`inf`: infinity | |
422 | |
423 Special constants include: | |
424 - :code:`muon_gyr`: gyromagnetic ratio of muon (135.5388 MHz/T) | |
425 - :code:`MHz`: :code:`1/(2*muon_gyr)` | |
426 | |
427 | |
428 Default functions include: | |
429 - :code:`sin(x)`: sine | |
430 - :code:`cos(x)`: cosine | |
431 - :code:`tan(x)`: tangent | |
432 - :code:`arcsin(x)`: inverse of the sine | |
433 - :code:`arccos(x)`: inverse of the cosine | |
434 - :code:`arctan(x)`: inverse of the tangent | |
435 - :code:`arctan2(y, x)`: inverse of the tangent taking two arguments as (sine, cosine) to resolve the quadrant | |
436 - :code:`exp(x)`: exponential with base e | |
437 - :code:`log(x)`: natural logarithm | |
438 - :code:`sqrt(x)`: square root | |
439 | |
440 Special functions include: | |
441 - :code:`range(x, y, z)`: get z equally spaced values between x and y | |
442 - :code:`zcw(n)`: Zaremba-Conroy-Wolfsberg helper function | |
443 - :code:`eulrange(n)`: helper function to create regular grid of n × n × n Euler angles with appropriate weights. | |
444 | |
445 | |
446 To enter vectors or matrices the following formats are accepted: | |
447 - :code:`[[1, 2, 3], [4, 5, 6], [7, 8, 9]]` | |
448 - :code:`1 2 3 4 5 6 7 8 9` | |
449 - :code:`[1 2 3] [4 5 6] [7 8 9]` | |
450 | |
451 | |
452 The fitting (function minimization) algorithms available are: | |
453 | |
454 | |
455 Nelder-Mead | |
456 - A direct search method. | |
457 - Starting with a 'simplex' of candidates, the algorithm will iteratively move the position of the worst candidate towards the optimum until all candidates converge (have values within a predefined tolerance level). | |
458 - Scipy default tolerance is :code:`1e-4` | |
459 | |
460 | |
461 L-BFGS | |
462 - Limited Memory Broyden–Fletcher–Goldfarb–Shanno algorithm. | |
463 - A second-order Quasi-Newton optimization algorithm | |
464 - Makes use of second-order derivative (Hessian Matrix) to converge on optimum. | |
465 - Scipy default tolerance is :code:`1e-5` | |
466 ]]></help> | |
467 <citations> | |
468 <citation type="bibtex"> | |
469 @article{nelder_mead_1965, | |
470 title={A Simplex Method for Function Minimization}, | |
471 volume={7}, | |
472 doi={10.1093/comjnl/7.4.308}, | |
473 number={4}, | |
474 journal={The Computer Journal}, | |
475 author={Nelder, J. A. and Mead, R.}, | |
476 year={1965}, | |
477 pages={308-313} | |
478 } | |
479 </citation> | |
480 <citation type="bibtex"> | |
481 @book{nocedal_wright_2006, | |
482 place={New York (NY)}, | |
483 title={Numerical Optimization}, | |
484 publisher={Springer}, | |
485 author={Nocedal, Jorge and Wright, Stephen J}, | |
486 year={2006} | |
487 } | |
488 </citation> | |
489 <citation type="bibtex"> | |
490 @TOOL_CITATION@ | |
491 </citation> | |
492 </citations> | |
493 </tool> |