/*- * Copyright 2015 Diamond Light Source Ltd. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html */ package uk.ac.diamond.scisoft.xpdf; /** * Calculates elastic form factors following Waasmeier and Kirfel (1995). * <p> * An effectively static class containing the atomic incoherent scattering * factors. * <p> * Derived from Waasmeier and Kirfel, "New Analytical Scattering-Factor * Functions for Free Atoms and Ions", Acta Crystallographica, A51, 416--431 (1995) * via ESRF's DABAX files. * <p> * Contains neutral atom values only, indexed with H at 0 and Californium at 97 * * @author Timothy Spain timothy.spain@diamond.ac.uk * @since 2015-09-14 * */ public final class XPDFfofx { static int maxZ = 98; // Indices go from 0, atomic number from 1 /** * Return the array of "a" constants. * @param z * atomic number * @return the multiplicative exponential scaling constants. */ public static double[] getA(int z) { return a[Integer.min(z, maxZ)-1]; } /** * Return the array of "b" constants. * @param z * atomic number * @return the exponential width constants. */ public static double[] getB(int z) { return b[Integer.min(z, maxZ)-1]; } /** * Return the "c" constant. * @param z * atomic number * @return the additive constant. */ public static double getC(int z) { return c[Integer.min(z, maxZ)-1]; } static double[][] a = { {0.413048, 0.294953, 0.187491, 0.080701, 0.023736}, {0.732354, 0.753896, 0.283819, 0.190003, 0.039139}, {0.974637, 0.158472, 0.811855, 0.262416, 0.790108}, {1.533712, 0.638283, 0.601052, 0.106139, 1.118414}, {2.085185, 1.064580, 1.062788, 0.140515, 0.641784}, {2.657506, 1.078079, 1.490909, -4.241070, 0.713791}, {11.893780, 3.277479, 1.858092, 0.858927, 0.912985}, {2.960427, 2.508818, 0.637853, 0.722838, 1.142756}, {3.511943, 2.772244, 0.678385, 0.915159, 1.089261}, {4.183749, 2.905726, 0.520513, 1.135641, 1.228065}, {4.910127, 3.081783, 1.262067, 1.098938, 0.560991}, {4.708971, 1.194814, 1.558157, 1.170413, 3.239403}, {4.730796, 2.313951, 1.541980, 1.117564, 3.154754}, {5.275329, 3.191038, 1.511514, 1.356849, 2.519114}, {1.950541, 4.146930, 1.494560, 1.522042, 5.729711}, {6.372157, 5.154568, 1.473732, 1.635073, 1.209372}, {1.446071, 6.870609, 6.151801, 1.750347, 0.634168}, {7.188004, 6.638454, 0.454180, 1.929593, 1.523654}, {8.163991, 7.146945, 1.070140, 0.877316, 1.486434}, {8.593655, 1.477324, 1.436254, 1.182839, 7.113258}, {1.476566, 1.487278, 1.600187, 9.177463, 7.099750}, {9.818524, 1.522646, 1.703101, 1.768774, 7.082555}, {10.473575, 1.547881, 1.986381, 1.865616, 7.056250}, {11.007069, 1.555477, 2.985293, 1.347855, 7.034779}, {11.709542, 1.733414, 2.673141, 2.023368, 7.003180}, {12.311098, 1.876623, 3.066177, 2.070451, 6.975185}, {12.914510, 2.481908, 3.466894, 2.106351, 6.960892}, {13.521865, 6.947285, 3.866028, 2.135900, 4.284731}, {14.014192, 4.784577, 5.056806, 1.457971, 6.932996}, {14.741002, 6.907748, 4.642337, 2.191766, 38.424042}, {15.758946, 6.841123, 4.121016, 2.714681, 2.395246}, {16.540613, 1.567900, 3.727829, 3.345098, 6.785079}, {17.025642, 4.503441, 3.715904, 3.937200, 6.790175}, {17.354071, 4.653248, 4.259489, 4.136455, 6.749163}, {17.550570, 5.411882, 3.937180, 3.880645, 6.707793}, {17.655279, 6.848105, 4.171004, 3.446760, 6.685200}, {8.123134, 2.138042, 6.761702, 1.156051, 17.679546}, {17.730219, 9.795867, 6.099763, 2.620025, 0.600053}, {17.792040, 10.253252, 5.714949, 3.170516, 0.918251}, {17.859772, 10.911038, 5.821115, 3.512513, 0.746965}, {17.958399, 12.063054, 5.007015, 3.287667, 1.531019}, {6.236218, 17.987711, 12.973127, 3.451426, 0.210899}, {17.840963, 3.428236, 1.373012, 12.947364, 6.335469}, {6.271624, 17.906738, 14.123269, 3.746008, 0.908235}, {6.216648, 17.919739, 3.854252, 0.840326, 15.173498}, {6.121511, 4.784063, 16.631683, 4.318258, 13.246773}, {6.073874, 17.155437, 4.173344, 0.852238, 17.988686}, {6.080986, 18.019468, 4.018197, 1.303510, 17.974669}, {6.196477, 18.816183, 4.050479, 1.638929, 17.962912}, {19.325171, 6.281571, 4.498866, 1.856934, 17.917318}, {5.394956, 6.549570, 19.650681, 1.827820, 17.867832}, {6.660302, 6.940756, 19.847015, 1.557175, 17.802427}, {19.884502, 6.736593, 8.110516, 1.170953, 17.548716}, {19.978920, 11.774945, 9.332182, 1.244749, 17.737501}, {17.418674, 8.314444, 10.323193, 1.383834, 19.876251}, {19.747343, 17.368477, 10.465718, 2.592602, 11.003653}, {19.966019, 27.329655, 11.018425, 3.086696, 17.335455}, {17.355122, 43.988499, 20.546650, 3.130670, 11.353665}, {21.551311, 17.161730, 11.903859, 2.679103, 9.564197}, {17.331244, 62.783924, 12.160097, 2.663483, 22.239950}, {17.286388, 51.560162, 12.478557, 2.675515, 22.960947}, {23.700363, 23.072214, 12.777782, 2.684217, 17.204367}, {17.186195, 37.156837, 13.103387, 2.707246, 24.419271}, {24.898117, 17.104952, 13.222581, 3.266152, 48.995213}, {25.910013, 32.344139, 13.765117, 2.751404, 17.064405}, {26.671785, 88.687576, 14.065445, 2.768497, 17.067781}, {27.150190, 16.999819, 14.059334, 3.386979, 46.546471}, {28.174887, 82.493271, 14.624002, 2.802756, 17.018515}, {28.925894, 76.173798, 14.904704, 2.814812, 16.998117}, {29.676760, 65.624069, 15.160854, 2.830288, 16.997850}, {30.122866, 15.099346, 56.314899, 3.540980, 16.943729}, {30.617033, 15.145351, 54.933548, 4.096253, 16.896156}, {31.066359, 15.341823, 49.278297, 4.577665, 16.828321}, {31.507900, 15.682498, 37.960129, 4.885509, 16.792112}, {31.888456, 16.117104, 42.390297, 5.211669, 16.767591}, {32.210297, 16.678440, 48.559906, 5.455839, 16.735533}, {32.004436, 1.975454, 17.070105, 15.939454, 5.990003}, {31.273891, 18.445440, 17.063745, 5.555933, 1.575270}, {16.777390, 19.317156, 32.979683, 5.595453, 10.576854}, {16.839890, 20.023823, 28.428564, 5.881564, 4.714706}, {16.630795, 19.386616, 32.808571, 1.747191, 6.356862}, {16.419567, 32.738590, 6.530247, 2.342742, 19.916475}, {16.282274, 32.725136, 6.678302, 2.694750, 20.576559}, {16.289164, 32.807171, 21.095163, 2.505901, 7.254589}, {16.011461, 32.615547, 8.113899, 2.884082, 21.377867}, {16.070229, 32.641106, 21.489658, 2.299218, 9.480184}, {16.007385, 32.663830, 21.594351, 1.598497, 11.121192}, {32.563690, 21.396671, 11.298093, 2.834688, 15.914965}, {15.914053, 32.535042, 21.553976, 11.433394, 3.612409}, {15.784024, 32.454899, 21.849222, 4.239077, 11.736191}, {32.740208, 21.973675, 12.957398, 3.683832, 15.744058}, {15.679275, 32.824306, 13.660459, 3.687261, 22.279434}, {32.999901, 22.638077, 14.219973, 3.672950, 15.683245}, {33.281178, 23.148544, 15.153755, 3.031492, 15.704215}, {33.435162, 23.657259, 15.576339, 3.027023, 15.746100}, {15.804837, 33.480801, 24.150198, 3.655563, 15.499866}, {15.889072, 33.625286, 24.710381, 3.707139, 15.839268}, {33.794075, 25.467693, 16.048487, 3.657525, 16.008982} }; static double[][] b = { {15.569946, 32.398468, 5.711404, 61.889874, 1.334118}, {11.553918, 4.595831, 1.546299, 26.463964, 0.377523}, {4.334946, 0.342451, 97.102966, 201.363831, 1.409234}, {42.662079, 0.595420, 99.106499, 0.151340, 1.843093}, {23.494068, 1.137894, 61.238976, 0.114886, 0.399036}, {14.780758, 0.776775, 42.086842, -0.000294, 0.239535}, {0.000158, 10.232723, 30.344690, 0.656065, 0.217287}, {14.182259, 5.936858, 0.112726, 34.958481, 0.390240}, {10.687859, 4.380466, 0.093982, 27.255203, 0.313066}, {8.175457, 3.252536, 0.063295, 21.813910, 0.224952}, {3.281434, 9.119178, 0.102763, 132.013947, 0.405878}, {4.875207, 108.506081, 0.111516, 48.292408, 1.928171}, {3.628931, 43.051167, 0.095960, 108.932388, 1.555918}, {2.631338, 33.730728, 0.081119, 86.288643, 1.170087}, {0.908139, 27.044952, 0.071280, 67.520187, 1.981173}, {1.514347, 22.092527, 0.061373, 55.445175, 0.646925}, {0.052357, 1.193165, 18.343416, 46.398396, 0.401005}, {0.956221, 15.339877, 15.339862, 39.043823, 0.062409}, {12.816323, 0.808945, 210.327011, 39.597652, 0.052821}, {10.460644, 0.041891, 81.390381, 169.847839, 0.688098}, {53.131023, 0.035325, 137.319489, 9.098031, 0.602102}, {8.001879, 0.029763, 39.885422, 120.157997, 0.532405}, {7.081940, 0.026040, 31.909672, 108.022842, 0.474882}, {6.366281, 0.023987, 23.244839, 105.774498, 0.429369}, {5.597120, 0.017800, 21.788420, 89.517914, 0.383054}, {5.009415, 0.014461, 18.743040, 82.767876, 0.346506}, {4.507138, 0.009126, 16.438129, 76.987320, 0.314418}, {4.077277, 0.286763, 14.622634, 71.966080, 0.004437}, {3.738280, 0.003744, 13.034982, 72.554794, 0.265666}, {3.388232, 0.243315, 11.903689, 63.312130, 0.000397}, {3.121754, 0.226057, 12.482196, 66.203621, 0.007238}, {2.866618, 0.012198, 13.432163, 58.866047, 0.210974}, {2.597739, 0.003012, 14.272119, 50.437996, 0.193015}, {2.349787, 0.002550, 15.579460, 45.181202, 0.177432}, {2.119226, 16.557184, 0.002481, 42.164009, 0.162121}, {1.908231, 16.606236, 0.001598, 39.917473, 0.146896}, {15.142385, 33.542667, 0.129372, 224.132507, 1.713368}, {1.563060, 14.310868, 0.120574, 135.771317, 0.120574}, {1.429691, 13.132816, 0.112173, 108.197029, 0.112173}, {1.310692, 12.319285, 0.104353, 91.777542, 0.104353}, {1.211590, 12.246687, 0.098615, 75.011948, 0.098615}, {0.090780, 1.108310, 11.468720, 66.684151, 0.090780}, {1.005729, 41.901382, 119.320541, 9.781542, 0.083391}, {0.077040, 0.928222, 9.555345, 35.860680, 123.552246}, {0.070789, 0.856121, 33.889484, 121.686691, 9.029517}, {0.062549, 0.784031, 8.751391, 34.489983, 0.784031}, {0.055333, 7.896512, 28.443739, 110.376106, 0.716809}, {0.048990, 7.273646, 29.119284, 95.831207, 0.661231}, {0.042072, 6.695665, 31.009790, 103.284348, 0.610714}, {6.118104, 0.036915, 32.529045, 95.037186, 0.565651}, {33.326523, 0.030974, 5.564929, 87.130966, 0.523992}, {33.031654, 0.025750, 5.065547, 84.101616, 0.487660}, {4.628591, 0.027754, 31.849096, 84.406387, 0.463550}, {4.143356, 0.010142, 28.796200, 75.280685, 0.413616}, {0.399828, 0.016872, 25.605827, 233.339676, 3.826915}, {3.481823, 0.371224, 21.226641, 173.834274, 0.010719}, {3.197408, 0.003446, 19.955492, 141.381973, 0.341817}, {0.328369, 0.002047, 3.088196, 134.907654, 18.832960}, {2.995675, 0.312491, 17.716705, 152.192825, 0.010468}, {0.300269, 0.001320, 17.026001, 148.748993, 2.910268}, {0.286620, 0.001550, 16.223755, 143.984512, 2.796480}, {2.689539, 0.003491, 15.495437, 139.862473, 0.274536}, {0.261678, 0.001995, 14.787360, 134.816299, 2.581883}, {2.435028, 0.246961, 13.996325, 110.863091, 0.001383}, {2.373912, 0.002034, 13.481969, 125.836510, 0.236916}, {2.282593, 0.000665, 12.920230, 121.937187, 0.225531}, {2.169660, 0.215414, 12.213148, 100.506783, 0.001211}, {2.120995, 0.000640, 11.915256, 114.529938, 0.207519}, {2.046203, 0.000656, 11.465375, 111.411980, 0.199376}, {1.977630, 0.000720, 11.044622, 108.139153, 0.192110}, {1.883090, 10.342764, 0.000780, 89.559250, 0.183849}, {1.795613, 9.934469, 0.000739, 76.189705, 0.175914}, {1.708732, 9.618455, 0.000760, 66.346199, 0.168002}, {1.629485, 9.446448, 0.000898, 59.980675, 0.160798}, {1.549238, 9.233474, 0.000689, 54.516373, 0.152815}, {1.473531, 9.049695, 0.000519, 50.210201, 0.145771}, {1.353767, 81.014175, 0.128093, 7.661196, 26.659403}, {1.316992, 8.797154, 0.124741, 40.177994, 1.316997}, {0.122737, 8.621570, 1.256902, 38.008820, 0.000601}, {0.115905, 8.256927, 1.195250, 39.247227, 1.195250}, {0.110704, 7.181401, 1.119730, 90.660263, 26.014978}, {0.105499, 1.055049, 25.025890, 80.906593, 6.664449}, {0.101180, 1.002287, 25.714146, 77.057549, 6.291882}, {0.098121, 0.966265, 6.046622, 76.598068, 28.096128}, {0.092639, 0.904416, 26.543257, 68.372963, 5.499512}, {0.090437, 0.876409, 5.239687, 69.188477, 27.632641}, {0.087031, 0.840187, 4.954467, 199.805801, 26.905106}, {0.801980, 4.590666, 22.758972, 160.404388, 0.083544}, {0.080511, 0.770669, 4.352206, 21.381622, 130.500748}, {0.077067, 0.735137, 4.097976, 109.464111, 20.512138}, {0.709545, 4.050881, 19.231543, 117.255005, 0.074040}, {0.071206, 0.681177, 18.236156, 112.500038, 3.930325}, {0.657086, 3.854918, 17.435474, 109.464485, 0.068033}, {0.634999, 3.856168, 16.849735, 121.292038, 0.064857}, {0.612785, 3.792942, 16.195778, 117.757004, 0.061755}, {0.058619, 0.590160, 3.674720, 100.736191, 15.408296}, {0.055503, 0.569571, 3.615472, 97.694786, 14.754303}, {0.550447, 3.581973, 14.357388, 96.064972, 0.052450} }; static double[] c = { 0.000049, 0.000487, 0.002542, 0.002511, 0.003823, 4.297983, -11.804902, 0.027014, 0.032557, 0.025576, 0.079712, 0.126842, 0.139509, 0.145073, 0.155233, 0.154722, 0.146773, 0.265954, 0.253614, 0.196255, 0.157765, 0.102473, 0.067744, 0.065510, -0.147293, -0.304931, -0.936572, -2.762697, -3.254477, -36.915829, -0.847395, 0.018726, -2.984117, -3.160982, -2.492088, -2.810592, 1.139548, 1.140251, 1.131787, 1.124859, 1.123452, 1.108770, 1.074784, 1.043992, 0.995452, 0.883099, 0.756603, 0.603504, 0.333097, 0.119024, -0.290506, -0.806668, -0.448811, -6.065902, -2.322802, -5.183497, -21.745489, -38.386017, -3.871068, -57.189842, -45.973682, -17.452166, -31.586687, -43.505684, -26.851971, -83.279831, -41.165253, -77.135223, -70.839813, -60.313812, -51.049416, -49.719837, -44.119026, -32.864574, -37.412682, -43.677956, 4.018893, 4.050394, -6.279078, 4.076478, 4.066939, 4.049824, 4.040914, 4.046556, 3.995684, 4.020977, 4.003472, 3.981773, 3.939212, 3.922533, 3.886066, 3.854444, 3.769391, 3.664200, 3.541160, 3.390840, 3.213169, 3.005326 }; private XPDFfofx() { } }