1 if ( curropt->tag ==
"Volt" ) {
2 if ( ( v = curropt->value.real() ) < 1 )
3 cerr <<
"-Volt: A voltage must be specified!" << endl;
5 if ( v < 1e3 ) v *= 1e3;
9 if ( curropt->tag ==
"Amplitude" ) {
10 if ( ( v = curropt->value.real() ) < 0 ) {
11 cerr <<
"-Amplitude: A fraction must be specified!" << endl;
13 if ( v > 1 ) v /= 100;
15 jsctf[
"Amplitude_phase"] = asin(v);
18 if ( curropt->tag ==
"Cs" ) {
19 v = curropt->value.real();
20 if ( fabs(v) < 10 ) v *= 1e7;
23 if ( curropt->tag ==
"Cc" ) {
24 if ( ( v = curropt->value.real() ) < 0.1 )
25 cerr <<
"-Cc: A Cc value must be specified!" << endl;
27 if ( v < 1e3 ) v *= 1e7;
31 if ( curropt->tag ==
"alpha" ) {
32 if ( ( v = curropt->value.real() ) < 1e-10 )
33 cerr <<
"-alpha: A value must be specified!" << endl;
35 if ( v > 0.01 ) v /= 1000;
36 jsctf[
"Beam_convergence"] = v;
39 if ( curropt->tag ==
"energyspread" ) {
40 if ( ( v = curropt->value.real() ) < 1e-10 )
41 cerr <<
"-energyspread: A value must be specified!" << endl;
44 jsctf[
"Energy_spread"] = v;
47 if ( curropt->tag ==
"aperture" ) {
48 if ( ( v = curropt->value.real() ) < 1 )
49 cerr <<
"-aperture: An aperture diameter must be specified!" << endl;
51 if ( v < 1e4 ) v *= 1e4;
52 jsctf[
"Objective_aperture"] = v;
55 if ( curropt->tag ==
"focallength" ) {
56 if ( ( v = curropt->value.real() ) < 1 )
57 cerr <<
"-focallength: A focal length must be specified!" << endl;
59 if ( v < 1e3 ) v *= 1e7;
60 jsctf[
"Focal_length"] = v;
63 if ( curropt->tag ==
"slitwidth" ) {
64 if ( ( v = curropt->value.real() ) < 1 )
65 cerr <<
"-slitwidth: A slit width must be specified!" << endl;
67 jsctf[
"Slit_width"] = v;