From 77f4e58ff42c4fc56d3d40d8ce5e4ca471b1acfd Mon Sep 17 00:00:00 2001 From: 8bitsam Date: Tue, 11 Jun 2024 13:59:39 -0400 Subject: [PATCH 001/104] added configs for vscode and any jetbrains IDEs to .gitignore --- .idea/.gitignore | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 .idea/.gitignore diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 00000000..13566b81 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,8 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Editor-based HTTP Client requests +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml From 49fbc23672bfaec1d34a0876e6fd48fde0e38a91 Mon Sep 17 00:00:00 2001 From: 8bitsam Date: Tue, 11 Jun 2024 14:00:42 -0400 Subject: [PATCH 002/104] Added relevant IDE config files to .gitignore --- .gitignore | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.gitignore b/.gitignore index 7a8f6d5b..3298c515 100644 --- a/.gitignore +++ b/.gitignore @@ -22,6 +22,10 @@ lib64 tags errors.err +# IDE configs +.idea +.vscode + # Installer logs pip-log.txt MANIFEST From 64da5cc28edce6a36f4744775c71f2d9bad8144c Mon Sep 17 00:00:00 2001 From: Sam Andrello Date: Tue, 16 Jul 2024 11:41:00 -0400 Subject: [PATCH 003/104] Add pyproject.toml with black config --- pyproject.toml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 pyproject.toml diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 00000000..d7351b5e --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,22 @@ +[tool.black] +line-length = 115 +include = '\.pyi?$' +exclude = ''' +/( + \.git + | \.hg + | \.mypy_cache + | \.tox + | \.venv + | \.rst + | \.txt + | _build + | buck-out + | build + | dist + + # The following are specific to Black, you probably don't want those. + | blib2to3 + | tests/data +)/ +''' \ No newline at end of file From 7ee646176877bbdba4d708e7b4b4e964323f2f82 Mon Sep 17 00:00:00 2001 From: Sam Andrello Date: Tue, 16 Jul 2024 11:43:26 -0400 Subject: [PATCH 004/104] Run black --- diffpy/__init__.py | 1 + diffpy/pdffit2/ipy_ext.py | 22 +- diffpy/pdffit2/output.py | 3 + diffpy/pdffit2/pdffit.py | 213 +++--- diffpy/pdffit2/tests/ExceptionsTest.py | 307 ++++----- diffpy/pdffit2/tests/TestPdfFit.py | 750 ++++++++++----------- diffpy/pdffit2/tests/TestPhaseFractions.py | 105 ++- diffpy/pdffit2/tests/TestShapeFactors.py | 192 +++--- diffpy/pdffit2/tests/__init__.py | 34 +- diffpy/pdffit2/tests/debug.py | 5 +- diffpy/pdffit2/tests/pdffit2testutils.py | 14 +- diffpy/pdffit2/tests/run.py | 5 +- diffpy/pdffit2/tests/rundeps.py | 3 +- diffpy/pdffit2/version.py | 20 +- 14 files changed, 758 insertions(+), 916 deletions(-) diff --git a/diffpy/__init__.py b/diffpy/__init__.py index 1a099c09..f093b937 100644 --- a/diffpy/__init__.py +++ b/diffpy/__init__.py @@ -21,6 +21,7 @@ from pkgutil import extend_path + __path__ = extend_path(__path__, __name__) diff --git a/diffpy/pdffit2/ipy_ext.py b/diffpy/pdffit2/ipy_ext.py index 13b41214..df8bc537 100644 --- a/diffpy/pdffit2/ipy_ext.py +++ b/diffpy/pdffit2/ipy_ext.py @@ -9,9 +9,10 @@ def load_ipython_extension(ipython): from diffpy.pdffit2 import PdfFit + pf = PdfFit() pdf = EasyPDFPlotting(pf) - print(' Type help(pdffit) or help(topic) for information.\n') + print(" Type help(pdffit) or help(topic) for information.\n") ns = dict(pdffit=PdfFit, pdf=pdf) pf._exportAll(ns) ipython.user_ns.update(ns) @@ -19,8 +20,7 @@ def load_ipython_extension(ipython): class EasyPDFPlotting(object): - """Convenience functions for accessing and plotting PDFfit2 data. - """ + """Convenience functions for accessing and plotting PDFfit2 data.""" def __init__(self, pdffit_instance): self._pdffit = pdffit_instance @@ -55,6 +55,7 @@ def showfit(self, offset=None): """ from matplotlib.pyplot import gca from math import floor + cr = self.r cGobs = self.Gobs cGcalc = self.Gcalc @@ -62,29 +63,32 @@ def showfit(self, offset=None): if offset is None: offset = floor(min([min(cGobs), min(cGcalc)]) - max(cGdiff)) ax = gca() - ax.plot(cr, cGobs, 'r.', cr, cGcalc, 'b-', cr, cGdiff + offset, 'g-') + ax.plot(cr, cGobs, "r.", cr, cGcalc, "b-", cr, cGdiff + offset, "g-") xl = ax.xaxis.get_label().get_text() yl = ax.yaxis.get_label().get_text() if xl == "": - ax.set_xlabel('r (A)') + ax.set_xlabel("r (A)") if yl == "": - ax.set_ylabel('G (A**-2)') + ax.set_ylabel("G (A**-2)") return def showRw(self): "Plot cumulative Rw." from matplotlib.pyplot import gca + cRw = self._asarray(self._pdffit.getcrw()) ax = gca() ax.plot(self.r, cRw) - ax.set_title('Cumulative Rw = %.4f' % cRw[-1]) - ax.set_xlabel('r') - ax.set_ylabel('Rw') + ax.set_title("Cumulative Rw = %.4f" % cRw[-1]) + ax.set_xlabel("r") + ax.set_ylabel("Rw") return @staticmethod def _asarray(x, dtype=None): import numpy + return numpy.asarray(x, dtype=dtype) + # End of class EasyPDFPlotting diff --git a/diffpy/pdffit2/output.py b/diffpy/pdffit2/output.py index 71bcfe76..6d1247cf 100644 --- a/diffpy/pdffit2/output.py +++ b/diffpy/pdffit2/output.py @@ -21,6 +21,7 @@ # create module variable stdout from sys import stdout as stdout + # silence pyflakes checker assert stdout @@ -30,9 +31,11 @@ def redirect_stdout(dst): The dst value is stored in module variable stdout. """ from diffpy.pdffit2.pdffit2 import redirect_stdout + redirect_stdout(dst) global stdout stdout = dst return + # End of file diff --git a/diffpy/pdffit2/pdffit.py b/diffpy/pdffit2/pdffit.py index a3bc2d17..e39b6694 100644 --- a/diffpy/pdffit2/pdffit.py +++ b/diffpy/pdffit2/pdffit.py @@ -31,6 +31,7 @@ # helper routines + def _format_value_std(value, stdev): """Convert value to a string with standard deviation in brackets. @@ -39,9 +40,9 @@ def _format_value_std(value, stdev): Return string. """ - if stdev > abs(value)*1e-8: + if stdev > abs(value) * 1e-8: s = "%g (%g)" % (value, stdev) - elif str(stdev) == 'nan': + elif str(stdev) == "nan": s = "%g (NaN)" % value else: s = "%g" % value @@ -63,7 +64,7 @@ def _format_bond_length(dij, ddij, ij1, symij): s0 = "%s (#%i)" % (symij[0], ij1[0]) s1 = "%s (#%i)" % (symij[1], ij1[1]) leader0 = " " + s0.ljust(w_smbidx) + " - " + s1 + " " - leader1 = leader0.ljust(w_equals) + '= ' + leader1 = leader0.ljust(w_equals) + "= " s = leader1 + _format_value_std(dij, ddij) + " A" return s @@ -111,14 +112,14 @@ class PdfFit(object): # constants and enumerators from pdffit.h: # selection of all atoms - selalias = { 'ALL' : -1 } + selalias = {"ALL": -1} # constraint type identifiers - FCON = { 'USER' : 0, 'IDENT' : 1, 'FCOMP' : 2, 'FSQR' : 3 } + FCON = {"USER": 0, "IDENT": 1, "FCOMP": 2, "FSQR": 3} # scattering type identifiers - Sctp = { 'X' : 0, 'N' : 1 } + Sctp = {"X": 0, "N": 1} def _exportAll(self, namespace): - """ _exportAll(self, namespace) --> Export all 'public' class methods + """_exportAll(self, namespace) --> Export all 'public' class methods into namespace. This function allows for a module-level PdfFit object which doesn't have @@ -129,27 +130,29 @@ def _exportAll(self, namespace): # string aliases (var = "var") for a in itertools.chain(self.selalias, self.FCON, self.Sctp): exec("%s = %r" % (a, a), namespace) - public = [ a for a in dir(self) if "__" not in a and a not in - ["_handle", "_exportAll", "selalias", "FCON", "Sctp" ] ] + public = [ + a + for a in dir(self) + if "__" not in a and a not in ["_handle", "_exportAll", "selalias", "FCON", "Sctp"] + ] for funcname in public: namespace[funcname] = getattr(self, funcname) return def intro(): - """Show introductory message. - """ + """Show introductory message.""" import re from diffpy.pdffit2 import __version__, __date__ + date = __date__[:10] - d = {'version' : __version__, 'date' : date, - 'year' : date[:4] or '2019'} + d = {"version": __version__, "date": date, "year": date[:4] or "2019"} msg = __intro_message__ % d - filler = lambda mx : (mx.group(0).rstrip(' *').ljust(77) + '*') - msg_ljust = re.sub('(?m)^(.{1,77}|.{79}.*)$', filler, msg) + filler = lambda mx: (mx.group(0).rstrip(" *").ljust(77) + "*") + msg_ljust = re.sub("(?m)^(.{1,77}|.{79}.*)$", filler, msg) print(msg_ljust, file=output.stdout) return - intro = staticmethod(intro) + intro = staticmethod(intro) def add_structure(self, stru): """add_structure(stru) --> Add new structure to PdfFit instance. @@ -160,11 +163,10 @@ def add_structure(self, stru): Raises pdffit2.structureError when stru contains unknown atom species. """ - s = stru.writeStr('pdffit') + s = stru.writeStr("pdffit") self.read_struct_string(s) return - def read_struct(self, struct): """read_struct(struct) --> Read structure from file into memory. @@ -180,7 +182,6 @@ def read_struct(self, struct): self.stru_files.append(struct) return - def read_struct_string(self, struct, name=""): """read_struct_string(struct, name = "") --> Read structure from a string into memory. @@ -197,7 +198,6 @@ def read_struct_string(self, struct, name=""): self.stru_files.append(name) return - def read_data(self, data, stype, qmax, qdamp): """read_data(data, stype, qmax, qdamp) --> Read pdf data from file into memory. @@ -214,7 +214,6 @@ def read_data(self, data, stype, qmax, qdamp): self.data_files.append(data) return - def read_data_string(self, data, stype, qmax, qdamp, name=""): """read_data_string(data, stype, qmax, qdamp, name = "") --> Read pdf data from a string into memory. @@ -226,15 +225,12 @@ def read_data_string(self, data, stype, qmax, qdamp, name=""): qdamp -- instrumental Q-resolution factor name -- tag with which to label data """ - pdffit2.read_data_string(self._handle, data, six.b(stype), qmax, - qdamp, name) + pdffit2.read_data_string(self._handle, data, six.b(stype), qmax, qdamp, name) name = data self.data_files.append(name) return - - def read_data_lists(self, stype, qmax, qdamp, r_data, Gr_data, - dGr_data = None, name = "list"): + def read_data_lists(self, stype, qmax, qdamp, r_data, Gr_data, dGr_data=None, name="list"): """read_data_lists(stype, qmax, qdamp, r_data, Gr_data, dGr_data = None, name = "list") --> Read pdf data into memory from lists. @@ -250,12 +246,10 @@ def read_data_lists(self, stype, qmax, qdamp, r_data, Gr_data, Raises: ValueError when the data lists are of different length """ - pdffit2.read_data_arrays(self._handle, six.b(stype), qmax, qdamp, - r_data, Gr_data, dGr_data, name) + pdffit2.read_data_arrays(self._handle, six.b(stype), qmax, qdamp, r_data, Gr_data, dGr_data, name) self.data_files.append(name) return - def pdfrange(self, iset, rmin, rmax): """pdfrange(iset, rmin, rmax) --> Set the range of the fit. @@ -268,15 +262,13 @@ def pdfrange(self, iset, rmin, rmax): pdffit2.pdfrange(self._handle, iset, rmin, rmax) return - def reset(self): """reset() --> Clear all stored fit, structure, and parameter data.""" self.stru_files = [] self.data_files = [] - pdffit2.reset(self._handle); + pdffit2.reset(self._handle) return - def alloc(self, stype, qmax, qdamp, rmin, rmax, bin): """alloc(stype, qmax, qdamp, rmin, rmax, bin) --> Allocate space for a PDF calculation. @@ -295,11 +287,9 @@ def alloc(self, stype, qmax, qdamp, rmin, rmax, bin): ValueError for bad input values pdffit.unassignedError when no structure has been loaded """ - pdffit2.alloc(self._handle, six.b(stype), qmax, qdamp, rmin, - rmax, bin) + pdffit2.alloc(self._handle, six.b(stype), qmax, qdamp, rmin, rmax, bin) return - def calc(self): """calc() --> Calculate the PDF of the imported structure. @@ -315,7 +305,6 @@ def calc(self): pdffit2.calc(self._handle) return - def refine(self, toler=0.00000001): """refine(toler = 0.00000001) --> Fit the theory to the imported data. @@ -335,7 +324,6 @@ def refine(self, toler=0.00000001): step += 1 return - def refine_step(self, toler=0.00000001): """refine_step(toler = 0.00000001) --> Run a single step of the fit. @@ -353,7 +341,6 @@ def refine_step(self, toler=0.00000001): self.finished = pdffit2.refine_step(self._handle, toler) return self.finished - def save_pdf(self, iset, fname): """save_pdf(iset, fname) --> Save calculated or fitted PDF to file. @@ -366,7 +353,6 @@ def save_pdf(self, iset, fname): pdffit2.save_pdf(self._handle, iset, fname) return - def save_pdf_string(self, iset): """save_pdf_string(iset) --> Save calculated or fitted PDF to string. @@ -380,7 +366,6 @@ def save_pdf_string(self, iset): pdffilestring = pdffit2.save_pdf(self._handle, iset, "") return pdffilestring - def save_dif(self, iset, fname): """save_dif(iset, fname) --> Save data and fitted PDF difference to file. @@ -394,7 +379,6 @@ def save_dif(self, iset, fname): pdffit2.save_dif(self._handle, iset, fname) return - def save_dif_string(self, iset): """save_dif_string(iset) --> Save data and fitted PDF difference to string. @@ -409,7 +393,6 @@ def save_dif_string(self, iset): diffilestring = pdffit2.save_dif(self._handle, iset, "") return diffilestring - def save_res(self, fname): """save_res(fname) --> Save fit-specific data to file. @@ -420,7 +403,6 @@ def save_res(self, fname): pdffit2.save_res(self._handle, fname) return - def save_res_string(self): """save_res_string() --> Save fit-specific data to a string. @@ -432,7 +414,6 @@ def save_res_string(self): resfilestring = pdffit2.save_res(self._handle, "") return resfilestring - def get_structure(self, ip): """get_structure(ip) --> Get a copy of specified phase data. @@ -442,12 +423,12 @@ def get_structure(self, ip): Raise pdffit2.unassignedError if phase ip is undefined. """ from diffpy.structure import PDFFitStructure + s = self.save_struct_string(ip) stru = PDFFitStructure() - stru.readStr(s, 'pdffit') + stru.readStr(s, "pdffit") return stru - def save_struct(self, ip, fname): """save_struct(ip, fname) --> Save structure resulting from fit to file. @@ -461,7 +442,6 @@ def save_struct(self, ip, fname): pdffit2.save_struct(self._handle, ip, fname) return - def save_struct_string(self, ip): """save_struct(ip) --> Save structure resulting from fit to string. @@ -475,7 +455,6 @@ def save_struct_string(self, ip): structfilestring = pdffit2.save_struct(self._handle, ip, "") return structfilestring - def show_struct(self, ip): """show_struct(ip) --> Print structure resulting from fit. @@ -486,7 +465,6 @@ def show_struct(self, ip): pdffit2.show_struct(self._handle, ip) return - def constrain(self, var, par, fcon=None): """constrain(var, par[, fcon]) --> Constrain a variable to a parameter. @@ -520,7 +498,6 @@ def constrain(self, var, par, fcon=None): pdffit2.constrain_int(self._handle, var_ref, varnc, par) return - def setpar(self, par, val): """setpar(par, val) --> Set value of constrained parameter. @@ -540,7 +517,6 @@ def setpar(self, par, val): pdffit2.setpar_RV(self._handle, par, var_ref) return - def setvar(self, var, val): """setvar(var, val) --> Set the value of a variable. @@ -552,7 +528,6 @@ def setvar(self, var, val): pdffit2.setvar(self._handle, var_ref, val) return - def getvar(self, var): """getvar(var) --> Get stored value of a variable. @@ -564,7 +539,6 @@ def getvar(self, var): retval = pdffit2.getvar(self._handle, var_ref) return retval - def getrw(self): """getrw() --> Get normalized total error of the fit rw. @@ -575,7 +549,6 @@ def getrw(self): rw = pdffit2.getrw(self._handle) return rw - def getcrw(self): """getcrw() --> Get cumulative Rw for the current dataset. @@ -591,7 +564,6 @@ def getcrw(self): crw = pdffit2.getcrw(self._handle) return crw - def getR(self): """getR() --> Get r-points used in the fit. @@ -606,7 +578,6 @@ def getR(self): R = pdffit2.getR(self._handle) return R - def getpdf_fit(self): """getpdf_fit() --> Get fitted PDF. @@ -620,7 +591,6 @@ def getpdf_fit(self): pdfdata = pdffit2.getpdf_fit(self._handle) return pdfdata - def getpdf_obs(self): """getpdf_obs() --> Get observed PDF. @@ -635,7 +605,6 @@ def getpdf_obs(self): pdfdata = pdffit2.getpdf_obs(self._handle) return pdfdata - def getpdf_diff(self): """Obtain difference between observed and fitted PDF. @@ -650,7 +619,6 @@ def getpdf_diff(self): Gdiff = pdffit2.getpdf_diff(self._handle) return Gdiff - def get_atoms(self, ip=None): """get_atoms() --> Get element symbols of all atoms in the structure. @@ -663,11 +631,12 @@ def get_atoms(self, ip=None): Returns: List of atom names in structure. """ - if ip is None: rv = pdffit2.get_atoms(self._handle) - else: rv = pdffit2.get_atoms(self._handle, ip) + if ip is None: + rv = pdffit2.get_atoms(self._handle) + else: + rv = pdffit2.get_atoms(self._handle, ip) return rv - def get_atom_types(self, ip=None): """get_atom_types() --> Ordered unique element symbols in the structure. @@ -681,11 +650,12 @@ def get_atom_types(self, ip=None): Returns: List of unique atom symbols as they occur in structure. """ - if ip is None: rv = pdffit2.get_atom_types(self._handle) - else: rv = pdffit2.get_atom_types(self._handle, ip) + if ip is None: + rv = pdffit2.get_atom_types(self._handle) + else: + rv = pdffit2.get_atom_types(self._handle, ip) return rv - def getpar(self, par): """getpar(par) --> Get value of parameter. @@ -693,7 +663,6 @@ def getpar(self, par): """ return pdffit2.getpar(self._handle, par) - def fixpar(self, par): """fixpar(par) --> Fix a parameter. @@ -707,7 +676,6 @@ def fixpar(self, par): pdffit2.fixpar(self._handle, par) return - def freepar(self, par): """freepar(par) --> Free a parameter. @@ -721,7 +689,6 @@ def freepar(self, par): pdffit2.freepar(self._handle, par) return - def setphase(self, ip): """setphase(ip) --> Switch to phase ip. @@ -735,7 +702,6 @@ def setphase(self, ip): pdffit2.setphase(self._handle, ip) return - def setdata(self, iset): """setdata(iset) --> Set the data set in focus. @@ -746,7 +712,6 @@ def setdata(self, iset): pdffit2.setdata(self._handle, iset) return - def psel(self, ip): """psel(ip) --> Include phase ip in calculation of total PDF @@ -759,7 +724,6 @@ def psel(self, ip): pdffit2.psel(self._handle, ip) return - def pdesel(self, ip): """pdesel(ip) --> Exclude phase ip from calculation of total PDF. @@ -772,7 +736,6 @@ def pdesel(self, ip): pdffit2.pdesel(self._handle, ip) return - def selectAtomType(self, ip, ijchar, symbol, flag): """Configure partial PDF - mark the specified atom type in phase ip as included or excluded as a first or second in pair for distance @@ -790,7 +753,6 @@ def selectAtomType(self, ip, ijchar, symbol, flag): pdffit2.selectAtomType(self._handle, ip, six.b(ijchar), symbol, flag) return - def selectAtomIndex(self, ip, ijchar, aidx, flag): """Configure partial PDF - mark the atom of given index in phase ip as included or excluded as a first or second in pair for distance @@ -808,7 +770,6 @@ def selectAtomIndex(self, ip, ijchar, aidx, flag): pdffit2.selectAtomIndex(self._handle, ip, six.b(ijchar), aidx, flag) return - def selectAll(self, ip, ijchar): """Configure partial PDF - include all atoms of phase ip as first or second element in pair for distance evaluation. @@ -823,7 +784,6 @@ def selectAll(self, ip, ijchar): pdffit2.selectAll(self._handle, ip, six.b(ijchar)) return - def selectNone(self, ip, ijchar): """Configure partial PDF - exclude all atoms of phase ip from first or second element of pair distance evaluation. @@ -838,7 +798,6 @@ def selectNone(self, ip, ijchar): pdffit2.selectNone(self._handle, ip, six.b(ijchar)) return - def bang(self, i, j, k): """bang(i, j, k) --> Show bond angle defined by atoms i, j, k. @@ -850,14 +809,18 @@ def bang(self, i, j, k): angle, stdev = pdffit2.bond_angle(self._handle, i, j, k) # indices should be already checked here by bond_angle atom_symbols = self.get_atoms() - leader = " %s (#%i) - %s (#%i) - %s (#%i) = " % \ - (atom_symbols[i-1], i, atom_symbols[j-1], j, - atom_symbols[k-1], k) + leader = " %s (#%i) - %s (#%i) - %s (#%i) = " % ( + atom_symbols[i - 1], + i, + atom_symbols[j - 1], + j, + atom_symbols[k - 1], + k, + ) s = leader + _format_value_std(angle, stdev) + " degrees" print(s, file=output.stdout) return - def bond_angle(self, i, j, k): """bond_angle(i, j, k) --> bond angle defined by atoms i, j, k. Angle is calculated using the shortest ji and jk lengths with @@ -873,7 +836,6 @@ def bond_angle(self, i, j, k): rv = pdffit2.bond_angle(self._handle, i, j, k) return rv - def blen(self, *args): """blen(i, j) --> Show bond length defined by atoms i and j. @@ -897,42 +859,42 @@ def blen(self, *args): pdffit.unassignedError when no structure has been loaded """ # first form - if len(args)==2: + if len(args) == 2: dij, ddij = self.bond_length_atoms(*args[0:2]) atom_symbols = self.get_atoms() ij = (args[0], args[1]) # indices were already checked in bond_length_atoms call assert (0 <= min(ij) - 1) and (max(ij) - 1 < len(atom_symbols)) - symij = ( atom_symbols[ij[0] - 1].upper(), - atom_symbols[ij[1] - 1].upper() ) + symij = (atom_symbols[ij[0] - 1].upper(), atom_symbols[ij[1] - 1].upper()) print(_format_bond_length(dij, ddij, ij, symij), file=output.stdout) # second form - elif len(args)==4: + elif len(args) == 4: a1, a2, lb, ub = args try: atom_types = self.get_atom_types() - if isinstance(a1, numbers.Integral): a1 = atom_types[a1 - 1] - if isinstance(a2, numbers.Integral): a2 = atom_types[a2 - 1] + if isinstance(a1, numbers.Integral): + a1 = atom_types[a1 - 1] + if isinstance(a2, numbers.Integral): + a2 = atom_types[a2 - 1] except IndexError: # index of non-existant atom type return # arguments are OK here, get bond length dictionary bld = pdffit2.bond_length_types(self._handle, a1, a2, lb, ub) - s = "(%s,%s) bond lengths in [%gA,%gA] for current phase :" % \ - (a1, a2, lb, ub) + s = "(%s,%s) bond lengths in [%gA,%gA] for current phase :" % (a1, a2, lb, ub) print(s, file=output.stdout) atom_symbols = self.get_atoms() - npts = len(bld['dij']) + npts = len(bld["dij"]) for idx in range(npts): - dij = bld['dij'][idx] - ddij = bld['ddij'][idx] - ij0 = bld['ij0'][idx] - ij1 = bld['ij1'][idx] + dij = bld["dij"][idx] + ddij = bld["ddij"][idx] + ij0 = bld["ij0"][idx] + ij1 = bld["ij1"][idx] symij = (atom_symbols[ij0[0]], atom_symbols[ij0[1]]) s = _format_bond_length(dij, ddij, ij1, symij) print(s, file=output.stdout) print(file=output.stdout) - if not bld['dij']: + if not bld["dij"]: print(" *** No pairs found ***", file=output.stdout) else: emsg = "blen() takes 2 or 4 arguments (%i given)" % len(args) @@ -940,7 +902,6 @@ def blen(self, *args): # done return - def bond_length_atoms(self, i, j): """bond_length_atoms(i, j) --> shortest distance between atoms i, j. Periodic boundary conditions are applied to find the shortest bond. @@ -956,7 +917,6 @@ def bond_length_atoms(self, i, j): rv = pdffit2.bond_length_atoms(self._handle, i, j) return rv - def bond_length_types(self, a1, a2, lb, ub): """bond_length_types(a1, a2, lb, ub) --> get all a1-a2 distances. @@ -978,7 +938,6 @@ def bond_length_types(self, a1, a2, lb, ub): rv = pdffit2.bond_length_types(self._handle, a1, a2, lb, ub) return rv - def show_scat(self, stype): """show_scat(stype) --> Print scattering length for all atoms in the current phase. @@ -990,7 +949,6 @@ def show_scat(self, stype): print(self.get_scat_string(stype), file=output.stdout) return - def get_scat_string(self, stype): """get_scat_string(stype) --> Get string with scattering factors of all atoms in the current phase. @@ -1004,7 +962,6 @@ def get_scat_string(self, stype): """ return pdffit2.get_scat_string(self._handle, six.b(stype)) - def get_scat(self, stype, element): """get_scat(stype, element) --> Get active scattering factor for given element. If scattering factor has been changed using @@ -1022,7 +979,6 @@ def get_scat(self, stype, element): rv = pdffit2.get_scat(self._handle, six.b(stype), element) return rv - def set_scat(self, stype, element, value): """set_scat(stype, element, value) --> Set custom scattering factor for given element. The new scattering factor applies only for the @@ -1043,7 +999,6 @@ def set_scat(self, stype, element, value): pdffit2.set_scat(self._handle, six.b(stype), element, value) return - def reset_scat(self, element): """reset_scat(stype, element) --> Reset scattering factors for given element to their standard values. The reset_scat applies @@ -1057,7 +1012,6 @@ def reset_scat(self, element): pdffit2.reset_scat(self._handle, element) return - def num_atoms(self): """num_atoms() --> Get number of atoms in current phase. @@ -1065,7 +1019,6 @@ def num_atoms(self): """ return pdffit2.num_atoms(self._handle) - def num_phases(self): """num_phases() --> Number of phases loaded in PdfFit instance. @@ -1076,7 +1029,6 @@ def num_phases(self): n = pdffit2.num_phases(self._handle) return n - def num_datasets(self): """num_datasets() --> Number of datasets loaded in PdfFit instance. @@ -1087,7 +1039,6 @@ def num_datasets(self): n = pdffit2.num_datasets(self._handle) return n - def phase_fractions(self): """phase_fractions() --> relative phase fractions for current dataset. Convert phase scale factors to relative phase fractions given the @@ -1119,30 +1070,30 @@ def lat(n): 5 <==> 'beta' 6 <==> 'gamma' """ - LatParams = { 'a':1, 'b':2, 'c':3, 'alpha':4, 'beta':5, 'gamma':6 } + LatParams = {"a": 1, "b": 2, "c": 3, "alpha": 4, "beta": 5, "gamma": 6} if isinstance(n, six.string_types): n = LatParams[n] return "lat(%i)" % n - lat = staticmethod(lat) + lat = staticmethod(lat) def x(i): """x(i) --> Get reference to x-value of atom i.""" return "x(%i)" % i - x = staticmethod(x) + x = staticmethod(x) def y(i): """y(i) --> Get reference to y-value of atom i.""" return "y(%i)" % i - y = staticmethod(y) + y = staticmethod(y) def z(i): """z(i) --> Get reference to z-value of atom i.""" return "z(%i)" % i - z = staticmethod(z) + z = staticmethod(z) def u11(i): """u11(i) --> Get reference to U(1,1) for atom i. @@ -1150,8 +1101,8 @@ def u11(i): U is the anisotropic thermal factor tensor. """ return "u11(%i)" % i - u11 = staticmethod(u11) + u11 = staticmethod(u11) def u22(i): """u22(i) --> Get reference to U(2,2) for atom i. @@ -1159,8 +1110,8 @@ def u22(i): U is the anisotropic thermal factor tensor. """ return "u22(%i)" % i - u22 = staticmethod(u22) + u22 = staticmethod(u22) def u33(i): """u33(i) --> Get reference to U(3,3) for atom i. @@ -1168,8 +1119,8 @@ def u33(i): U is the anisotropic thermal factor tensor. """ return "u33(%i)" % i - u33 = staticmethod(u33) + u33 = staticmethod(u33) def u12(i): """u12(i) --> Get reference to U(1,2) for atom i. @@ -1177,8 +1128,8 @@ def u12(i): U is the anisotropic thermal factor tensor. """ return "u12(%i)" % i - u12 = staticmethod(u12) + u12 = staticmethod(u12) def u13(i): """u13(i) --> Get reference to U(1,3) for atom i. @@ -1186,8 +1137,8 @@ def u13(i): U is the anisotropic thermal factor tensor. """ return "u13(%i)" % i - u13 = staticmethod(u13) + u13 = staticmethod(u13) def u23(i): """u23(i) --> Get reference to U(2,3) for atom i. @@ -1195,14 +1146,14 @@ def u23(i): U is the anisotropic thermal factor tensor. """ return "u23(%i)" % i - u23 = staticmethod(u23) + u23 = staticmethod(u23) def occ(i): """occ(i) --> Get reference to occupancy of atom i.""" return "occ(%i)" % i - occ = staticmethod(occ) + occ = staticmethod(occ) def pscale(): """pscale() --> Get reference to pscale. @@ -1211,8 +1162,8 @@ def pscale(): represents. """ return "pscale" - pscale = staticmethod(pscale) + pscale = staticmethod(pscale) def sratio(): """sratio() --> Get reference to sigma ratio. @@ -1221,15 +1172,14 @@ def sratio(): distances below rcut. """ return "sratio" - sratio = staticmethod(sratio) + sratio = staticmethod(sratio) def delta1(): - """delta1() --> Get reference to 1/R peak sharpening factor. - """ + """delta1() --> Get reference to 1/R peak sharpening factor.""" return "delta1" - delta1 = staticmethod(delta1) + delta1 = staticmethod(delta1) def delta2(): """delta2() --> Reference to (1/R^2) sharpening factor. @@ -1237,8 +1187,8 @@ def delta2(): The (1/R^2) peak sharpening factor. """ return "delta2" - delta2 = staticmethod(delta2) + delta2 = staticmethod(delta2) def dscale(): """dscale() --> Get reference to dscale. @@ -1246,8 +1196,8 @@ def dscale(): The data scale factor. """ return "dscale" - dscale = staticmethod(dscale) + dscale = staticmethod(dscale) def qdamp(): """qdamp() --> Get reference to qdamp. @@ -1255,8 +1205,8 @@ def qdamp(): Qdamp controls PDF damping due to instrument Q-resolution. """ return "qdamp" - qdamp = staticmethod(qdamp) + qdamp = staticmethod(qdamp) def qbroad(): """qbroad() --> Get reference to qbroad. @@ -1264,8 +1214,8 @@ def qbroad(): Quadratic peak broadening factor. """ return "qbroad" - qbroad = staticmethod(qbroad) + qbroad = staticmethod(qbroad) def spdiameter(): """spdiameter() --> Get reference to spdiameter (phase property). @@ -1274,8 +1224,8 @@ def spdiameter(): Spherical envelope is not applied when spdiameter equals 0. """ return "spdiameter" - spdiameter = staticmethod(spdiameter) + spdiameter = staticmethod(spdiameter) def stepcut(): """stepcut() --> Get reference to stepcut (phase property). @@ -1287,8 +1237,8 @@ def stepcut(): Step cutoff is not applied when stepcut equals 0. """ return "stepcut" - stepcut = staticmethod(stepcut) + stepcut = staticmethod(stepcut) def rcut(): """rcut() --> Get reference to rcut. @@ -1297,8 +1247,8 @@ def rcut(): the sigma ratio (sratio), applies. rcut cannot be refined. """ return "rcut" - rcut = staticmethod(rcut) + rcut = staticmethod(rcut) # End refinable variables. @@ -1311,7 +1261,6 @@ def __init__(self): self.intro() return - def __getRef(self, var_string): """Return the actual reference to the variable in the var_string. @@ -1328,7 +1277,7 @@ def __getRef(self, var_string): method_string, arg_string = var_string.split("(") method_string = method_string.strip() arg_int = int(arg_string.strip(")").strip()) - except ValueError: #There is no arg_string + except ValueError: # There is no arg_string method_string = var_string.strip() f = getattr(pdffit2, method_string) diff --git a/diffpy/pdffit2/tests/ExceptionsTest.py b/diffpy/pdffit2/tests/ExceptionsTest.py index a1b800a0..a88decbe 100644 --- a/diffpy/pdffit2/tests/ExceptionsTest.py +++ b/diffpy/pdffit2/tests/ExceptionsTest.py @@ -22,7 +22,6 @@ class read_structExceptions(unittest.TestCase): - def setUp(self): self.P = PdfFit() @@ -35,17 +34,15 @@ def test_IOError(self): def test_structureError(self): """raise pdffit2.structureError when structure is malformed""" - self.assertRaises(pdffit2.structureError, self.P.read_struct, - datafile("badNi.stru")) + self.assertRaises(pdffit2.structureError, self.P.read_struct, datafile("badNi.stru")) def test_structureErrorZeroVolume(self): """raise pdffit2.structureError when unit cell volume is negative""" - #I don't know how to test for this, but it's in the library code - self.assertRaises(pdffit2.structureError, - self.P.read_struct, datafile("badNiZeroVolume.stru")) + # I don't know how to test for this, but it's in the library code + self.assertRaises(pdffit2.structureError, self.P.read_struct, datafile("badNiZeroVolume.stru")) -class read_dataExceptions(unittest.TestCase): +class read_dataExceptions(unittest.TestCase): def setUp(self): self.P = PdfFit() @@ -54,16 +51,14 @@ def tearDown(self): def test_IOError(self): """raise IOError when data file does not exist""" - self.assertRaises(IOError, self.P.read_data, "Nofile.dat", - 'X', 25.0, 0.5) + self.assertRaises(IOError, self.P.read_data, "Nofile.dat", "X", 25.0, 0.5) def test_dataError(self): """raise pdffit2.dataError when data has improper spacing""" - self.assertRaises(pdffit2.dataError, self.P.read_data, - datafile("badNi.dat"), 'X', 25.0, 0.5) + self.assertRaises(pdffit2.dataError, self.P.read_data, datafile("badNi.dat"), "X", 25.0, 0.5) -class read_data_listsExceptions(unittest.TestCase): +class read_data_listsExceptions(unittest.TestCase): def setUp(self): self.P = PdfFit() self.r_data = [0.1, 0.2] @@ -76,28 +71,31 @@ def tearDown(self): def test_ValueError1(self): """raise ValueError when lists are of different length""" - self.assertRaises(ValueError, self.P.read_data_lists, 'X', self.qmax, - self.qdamp, self.r_data, self.Gr_data) + self.assertRaises( + ValueError, self.P.read_data_lists, "X", self.qmax, self.qdamp, self.r_data, self.Gr_data + ) def test_ValueError2(self): """raise ValueError when qmax < 0""" - self.assertRaises(ValueError, self.P.read_data_lists, 'X', -self.qmax, - self.qdamp, self.r_data, self.Gr_data) + self.assertRaises( + ValueError, self.P.read_data_lists, "X", -self.qmax, self.qdamp, self.r_data, self.Gr_data + ) def test_ValueError3(self): """raise ValueError when qdamp < 0""" - self.assertRaises(ValueError, self.P.read_data_lists, 'X', self.qmax, - -self.qdamp, self.r_data, self.Gr_data) + self.assertRaises( + ValueError, self.P.read_data_lists, "X", self.qmax, -self.qdamp, self.r_data, self.Gr_data + ) def test_dataError(self): """raise pdffit2.dataError when data has improper spacing""" r_data = [0.1, 0.52, 0.2] - self.assertRaises(pdffit2.dataError, self.P.read_data_lists, 'X', self.qmax, - self.qdamp, r_data, self.Gr_data) + self.assertRaises( + pdffit2.dataError, self.P.read_data_lists, "X", self.qmax, self.qdamp, r_data, self.Gr_data + ) class pdfrangeExceptions(unittest.TestCase): - def setUp(self): self.P = PdfFit() self.iset = 1 @@ -109,24 +107,20 @@ def tearDown(self): def test_ValueError1(self): """raise ValueError when iset does not exist""" - self.assertRaises(ValueError, self.P.pdfrange, self.iset, self.rmin, - self.rmax) + self.assertRaises(ValueError, self.P.pdfrange, self.iset, self.rmin, self.rmax) def test_ValueError2(self): """raise ValueError when rmax < rmin""" - self.P.read_data(datafile("Ni.dat"), 'X', 25.0, 0.5) - self.assertRaises(ValueError, self.P.pdfrange, self.iset, self.rmax, - self.rmin) + self.P.read_data(datafile("Ni.dat"), "X", 25.0, 0.5) + self.assertRaises(ValueError, self.P.pdfrange, self.iset, self.rmax, self.rmin) def test_ValueError3(self): """raise ValueError when range outside of data""" - self.P.read_data(datafile("Ni.dat"), 'X', 25.0, 0.5) - self.assertRaises(ValueError, self.P.pdfrange, self.iset, -self.rmin, - self.rmax) + self.P.read_data(datafile("Ni.dat"), "X", 25.0, 0.5) + self.assertRaises(ValueError, self.P.pdfrange, self.iset, -self.rmin, self.rmax) class allocExceptions(unittest.TestCase): - def setUp(self): self.P = PdfFit() self.qmax = 25 @@ -141,48 +135,40 @@ def tearDown(self): def test_ValueError1(self): """raise ValueError when qmax < 0""" self.P.read_struct(datafile("Ni.stru")) - self.assertRaises(ValueError, self.P.alloc, 'X', -self.qmax, self.qdamp, - self.rmin, self.rmax, self.bin) + self.assertRaises(ValueError, self.P.alloc, "X", -self.qmax, self.qdamp, self.rmin, self.rmax, self.bin) def test_ValueError2(self): """raise ValueError when qdamp < 0""" self.P.read_struct(datafile("Ni.stru")) - self.assertRaises(ValueError, self.P.alloc, 'X', self.qmax, -self.qdamp, - self.rmin, self.rmax, self.bin) + self.assertRaises(ValueError, self.P.alloc, "X", self.qmax, -self.qdamp, self.rmin, self.rmax, self.bin) def test_ValueError3(self): """raise ValueError when rmin < 0""" self.P.read_struct(datafile("Ni.stru")) - self.assertRaises(ValueError, self.P.alloc, 'X', self.qmax, self.qdamp, - -self.rmin, self.rmax, self.bin) + self.assertRaises(ValueError, self.P.alloc, "X", self.qmax, self.qdamp, -self.rmin, self.rmax, self.bin) def test_ValueError4(self): """raise ValueError when rmax < 0""" self.P.read_struct(datafile("Ni.stru")) - self.assertRaises(ValueError, self.P.alloc, 'X', self.qmax, self.qdamp, - self.rmin, -self.rmax, self.bin) + self.assertRaises(ValueError, self.P.alloc, "X", self.qmax, self.qdamp, self.rmin, -self.rmax, self.bin) def test_ValueError5(self): """raise ValueError when bin < 0""" self.P.read_struct(datafile("Ni.stru")) - self.assertRaises(ValueError, self.P.alloc, 'X', self.qmax, self.qdamp, - self.rmin, self.rmax, -self.bin) + self.assertRaises(ValueError, self.P.alloc, "X", self.qmax, self.qdamp, self.rmin, self.rmax, -self.bin) def test_ValueError6(self): """raise ValueError when rmax < rmin""" self.P.read_struct(datafile("Ni.stru")) - self.assertRaises(ValueError, self.P.alloc, 'X', self.qmax, self.qdamp, - self.rmax, self.rmin, self.bin) + self.assertRaises(ValueError, self.P.alloc, "X", self.qmax, self.qdamp, self.rmax, self.rmin, self.bin) def test_ValueError7(self): """raise ValueError when qdamp < 0""" self.P.read_struct(datafile("Ni.stru")) - self.assertRaises(ValueError, self.P.alloc, 'X', self.qmax, self.qdamp, - self.rmin, self.rmax, -self.bin) + self.assertRaises(ValueError, self.P.alloc, "X", self.qmax, self.qdamp, self.rmin, self.rmax, -self.bin) class calcExceptions(unittest.TestCase): - def setUp(self): self.P = PdfFit() self.P.read_struct(datafile("Ni.stru")) @@ -194,6 +180,7 @@ def test_unassignedError(self): """raise pdffit2.unassignedError when no space has been allocated""" self.assertRaises(pdffit2.unassignedError, self.P.calc) + # PJ 2006-03-06 # # test_calculationError raised exception, because for Qmax=0.5, rmax would @@ -207,8 +194,8 @@ def test_unassignedError(self): # self.assertRaises(pdffit2.calculationError, self.P.calc) -#class refineExceptions(unittest.TestCase): - #I'm not sure how to test these +# class refineExceptions(unittest.TestCase): +# I'm not sure how to test these # def setUp(self): # self.P = PdfFit() @@ -222,8 +209,8 @@ def test_unassignedError(self): # #self.assertRaises(pdffit2.constraintError, self.P.calc) -#class refine_stepExceptions(unittest.TestCase): - #I'm not sure how to test these +# class refine_stepExceptions(unittest.TestCase): +# I'm not sure how to test these # def setUp(self): # self.P = PdfFit() @@ -238,7 +225,6 @@ def test_unassignedError(self): class save_pdfExceptions(unittest.TestCase): - def setUp(self): self.P = PdfFit() self.strufile = "temp.pdf" @@ -249,19 +235,16 @@ def tearDown(self): def test_IOError(self): """raise IOError when structure cannot be saved""" self.P.read_struct(datafile("Ni.stru")) - self.P.alloc('X', 30.0, 0.05, 2, 10, 100) + self.P.alloc("X", 30.0, 0.05, 2, 10, 100) self.P.calc() - self.assertRaises(IOError, self.P.save_pdf, 1, - "nodir183160/"+self.strufile) + self.assertRaises(IOError, self.P.save_pdf, 1, "nodir183160/" + self.strufile) def test_unassignedError(self): """raise pdffit2.unassignedError when structure is undefined""" - self.assertRaises(pdffit2.unassignedError, self.P.save_pdf, 1, - self.strufile) + self.assertRaises(pdffit2.unassignedError, self.P.save_pdf, 1, self.strufile) class save_difExceptions(unittest.TestCase): - def setUp(self): self.P = PdfFit() self.strufile = "temp.dif" @@ -272,20 +255,17 @@ def tearDown(self): def test_IOError(self): """raise IOError when dif cannot be saved""" self.P.read_struct(datafile("Ni.stru")) - self.P.alloc('X', 30.0, 0.05, 2, 10, 100) + self.P.alloc("X", 30.0, 0.05, 2, 10, 100) self.P.calc() - self.P.read_data(datafile("Ni.dat"), 'X', 25.0, 0.5) - self.assertRaises(IOError, self.P.save_dif, 1, - "nodir183160/"+self.strufile) + self.P.read_data(datafile("Ni.dat"), "X", 25.0, 0.5) + self.assertRaises(IOError, self.P.save_dif, 1, "nodir183160/" + self.strufile) def test_unassignedError(self): """raise pdffit2.unassignedError when structure is undefined""" - self.assertRaises(pdffit2.unassignedError, self.P.save_dif, 1, - self.strufile) + self.assertRaises(pdffit2.unassignedError, self.P.save_dif, 1, self.strufile) class save_resExceptions(unittest.TestCase): - def setUp(self): self.P = PdfFit() self.resfile = "temp.res" @@ -296,22 +276,20 @@ def tearDown(self): def test_IOError(self): """raise IOError when residual file cannot be saved""" self.P.read_struct(datafile("Ni.stru")) - self.P.read_data(datafile("Ni.dat"), 'X', 30.0, 0.0) + self.P.read_data(datafile("Ni.dat"), "X", 30.0, 0.0) self.P.constrain(self.P.lat(1), 1) self.P.setpar(1, 3.0) - self.P.pdfrange(1,2.0,10.0) + self.P.pdfrange(1, 2.0, 10.0) self.P.refine_step() - self.assertRaises(IOError, self.P.save_res, - "nodir183160/"+self.resfile) + self.assertRaises(IOError, self.P.save_res, "nodir183160/" + self.resfile) def test_unassignedError(self): """raise pdffit2.unassignedError when structure is undefined""" - self.assertRaises(pdffit2.unassignedError, self.P.save_res, - self.resfile) + self.assertRaises(pdffit2.unassignedError, self.P.save_res, self.resfile) class save_structExceptions(unittest.TestCase): - #Same code as show_struct + # Same code as show_struct def setUp(self): self.P = PdfFit() @@ -323,17 +301,14 @@ def tearDown(self): def test_IOError(self): """raise IOError when structure cannot be saved""" self.P.read_struct(datafile("Ni.stru")) - self.assertRaises(IOError, self.P.save_struct, 1, - "nodir183160/"+self.strufile) + self.assertRaises(IOError, self.P.save_struct, 1, "nodir183160/" + self.strufile) def test_unassignedError(self): """raise pdffit2.unassignedError when structure is undefined""" - self.assertRaises(pdffit2.unassignedError, self.P.save_struct, 1, - self.strufile) + self.assertRaises(pdffit2.unassignedError, self.P.save_struct, 1, self.strufile) class constrainExceptions(unittest.TestCase): - def setUp(self): self.P = PdfFit() self.par = 1 @@ -346,8 +321,8 @@ def tearDown(self): def test_constraintError(self): """raise constraintError when constraint is bad""" self.P.read_struct(datafile("Ni.stru")) - self.P.read_data(datafile("Ni.dat"), 'X', 25.0, 0.0) - self.P.constrain('x(1)', 'junk+@1') + self.P.read_data(datafile("Ni.dat"), "X", 25.0, 0.0) + self.P.constrain("x(1)", "junk+@1") self.P.setpar(1, 0.01) self.assertRaises(pdffit2.constraintError, self.P.calc) self.assertRaises(pdffit2.constraintError, self.P.refine) @@ -355,33 +330,26 @@ def test_constraintError(self): def test_unassignedError(self): """raise pdffit2.unassignedError when variable is undefined""" - self.assertRaises(pdffit2.unassignedError, self.P.constrain, self.P.x(1), - self.par) + self.assertRaises(pdffit2.unassignedError, self.P.constrain, self.P.x(1), self.par) return def test_ValueError(self): """raise ValueError when a variable index does not exist""" self.P.read_struct(datafile("Ni.stru")) - self.assertRaises(ValueError, self.P.constrain, self.P.x(6), - self.par) + self.assertRaises(ValueError, self.P.constrain, self.P.x(6), self.par) return def test_constrainNonRefVar(self): "raise constraintError when attempting to constrain non-refinables" self.P.read_struct(datafile("Ni.stru")) - self.P.read_data(datafile("Ni.dat"), 'X', 25.0, 0.0) - self.assertRaises(pdffit2.constraintError, - self.P.constrain, 'rcut', '@7') - self.assertRaises(pdffit2.constraintError, - self.P.constrain, 'rcut', 13) - self.assertRaises(pdffit2.constraintError, - self.P.constrain, 'stepcut', '@17') + self.P.read_data(datafile("Ni.dat"), "X", 25.0, 0.0) + self.assertRaises(pdffit2.constraintError, self.P.constrain, "rcut", "@7") + self.assertRaises(pdffit2.constraintError, self.P.constrain, "rcut", 13) + self.assertRaises(pdffit2.constraintError, self.P.constrain, "stepcut", "@17") return - class setvarExceptions(unittest.TestCase): - def setUp(self): self.P = PdfFit() self.val = 3.0 @@ -391,18 +359,15 @@ def tearDown(self): def test_unassignedError(self): """raise pdffit2.unassignedError when variable is undefined""" - self.assertRaises(pdffit2.unassignedError, self.P.setvar, self.P.lat(1), - self.val) + self.assertRaises(pdffit2.unassignedError, self.P.setvar, self.P.lat(1), self.val) def test_ValueError(self): """raise ValueError when a variable index does not exist""" self.P.read_struct(datafile("Ni.stru")) - self.assertRaises(ValueError, self.P.setvar, self.P.lat(7), - self.val) + self.assertRaises(ValueError, self.P.setvar, self.P.lat(7), self.val) class getvarExceptions(unittest.TestCase): - def setUp(self): self.P = PdfFit() @@ -411,8 +376,7 @@ def tearDown(self): def test_unassignedError(self): """raise pdffit2.unassignedError when variable is undefined""" - self.assertRaises(pdffit2.unassignedError, self.P.getvar, - self.P.pscale()) + self.assertRaises(pdffit2.unassignedError, self.P.getvar, self.P.pscale()) def test_ValueError(self): """raise ValueError when a variable index does not exist""" @@ -421,7 +385,6 @@ def test_ValueError(self): class getRExceptions(unittest.TestCase): - def setUp(self): self.P = PdfFit() @@ -434,7 +397,6 @@ def test_unassignedError(self): class getpdf_fitExceptions(unittest.TestCase): - def setUp(self): self.P = PdfFit() @@ -447,7 +409,6 @@ def test_unassignedError(self): class getpdf_obsExceptions(unittest.TestCase): - def setUp(self): self.P = PdfFit() @@ -460,7 +421,6 @@ def test_unassignedError(self): class getpdf_diffExceptions(unittest.TestCase): - def setUp(self): self.P = PdfFit() @@ -473,7 +433,6 @@ def test_unassignedError(self): class get_atomsExceptions(unittest.TestCase): - def setUp(self): self.P = PdfFit() @@ -486,7 +445,6 @@ def test_unassignedError(self): class getparExceptions(unittest.TestCase): - def setUp(self): self.P = PdfFit() @@ -505,7 +463,6 @@ def test_unassignedError2(self): class pselExceptions(unittest.TestCase): - def setUp(self): self.P = PdfFit() self.ip = 1 @@ -523,7 +480,6 @@ def test_unassignedError2(self): class pdeselExceptions(unittest.TestCase): - def setUp(self): self.P = PdfFit() self.ip = 1 @@ -542,7 +498,6 @@ def test_unassignedError2(self): class selectAtomTypeExceptions(unittest.TestCase): - def setUp(self): self.P = PdfFit() self.iset = 1 @@ -553,32 +508,28 @@ def tearDown(self): def test_unassignedError1(self): """raise pdffit2.unassignedError when set does not exist""" - self.assertRaises(pdffit2.unassignedError, self.P.selectAtomType, - self.iset, 'i', 'Ni', True) + self.assertRaises(pdffit2.unassignedError, self.P.selectAtomType, self.iset, "i", "Ni", True) def test_unassignedError2(self): """raise pdffit2.unassignedError when set does not exist""" self.P.read_struct(datafile("Ni.stru")) # selectAtomType should pass with one phase defined - self.P.read_data(datafile("Ni.dat"), 'X', 25.0, 0.0) - self.P.selectAtomType(self.iset, 'i', 'Ni', True) - self.P.selectAtomType(self.iset, 'j', 'Ni', False) + self.P.read_data(datafile("Ni.dat"), "X", 25.0, 0.0) + self.P.selectAtomType(self.iset, "i", "Ni", True) + self.P.selectAtomType(self.iset, "j", "Ni", False) # but fail for phase 2 which is not present - self.assertRaises(pdffit2.unassignedError, self.P.selectAtomType, - 2, 'i', 'Ca', True) + self.assertRaises(pdffit2.unassignedError, self.P.selectAtomType, 2, "i", "Ca", True) def test_ijcharValueError(self): """raise ValueError when ijchar is neither 'i' nor 'j'""" self.P.read_struct(datafile("Ni.stru")) - self.P.read_data(datafile("Ni.dat"), 'X', 25.0, 0.0) - self.P.selectAtomType(self.iset, 'i', 'Ni', True) - self.P.selectAtomType(self.iset, 'j', 'Ni', True) - self.assertRaises(ValueError, self.P.selectAtomType, - self.iset, 'k', 'Ni', True) + self.P.read_data(datafile("Ni.dat"), "X", 25.0, 0.0) + self.P.selectAtomType(self.iset, "i", "Ni", True) + self.P.selectAtomType(self.iset, "j", "Ni", True) + self.assertRaises(ValueError, self.P.selectAtomType, self.iset, "k", "Ni", True) class selectAtomIndexExceptions(unittest.TestCase): - def setUp(self): self.P = PdfFit() self.iset = 1 @@ -589,30 +540,26 @@ def tearDown(self): def test_unassignedError1(self): """raise pdffit2.unassignedError when set does not exist""" - self.assertRaises(pdffit2.unassignedError, self.P.selectAtomIndex, - self.iset, 'i', self.i, True) + self.assertRaises(pdffit2.unassignedError, self.P.selectAtomIndex, self.iset, "i", self.i, True) def test_unassignedError2(self): """raise pdffit2.unassignedError when set does not exist""" self.P.read_struct(datafile("Ni.stru")) # pass for phase 1 - self.P.read_data(datafile("Ni.dat"), 'X', 25.0, 0.0) - self.P.selectAtomIndex(self.iset, 'i', 1, True) - self.P.selectAtomIndex(self.iset, 'i', 2, False) + self.P.read_data(datafile("Ni.dat"), "X", 25.0, 0.0) + self.P.selectAtomIndex(self.iset, "i", 1, True) + self.P.selectAtomIndex(self.iset, "i", 2, False) # fail for phase 2 - self.assertRaises(pdffit2.unassignedError, self.P.selectAtomIndex, - 2, 'i', 1, True) + self.assertRaises(pdffit2.unassignedError, self.P.selectAtomIndex, 2, "i", 1, True) def test_ValueError(self): """raise ValueError when selected atom does not exist""" self.P.read_struct(datafile("Ni.stru")) - self.P.read_data(datafile("Ni.dat"), 'X', 25.0, 0.0) - self.assertRaises(ValueError, self.P.selectAtomIndex, - self.iset, 'i', 6, True) + self.P.read_data(datafile("Ni.dat"), "X", 25.0, 0.0) + self.assertRaises(ValueError, self.P.selectAtomIndex, self.iset, "i", 6, True) class selectAllExceptions(unittest.TestCase): - def setUp(self): self.P = PdfFit() self.iset = 1 @@ -623,26 +570,23 @@ def tearDown(self): def test_unassignedError1(self): """raise pdffit2.unassignedError when set does not exist""" - self.assertRaises(pdffit2.unassignedError, self.P.selectAll, - self.iset, 'i') + self.assertRaises(pdffit2.unassignedError, self.P.selectAll, self.iset, "i") def test_unassignedError2(self): """raise pdffit2.unassignedError when set does not exist""" self.P.read_struct(datafile("Ni.stru")) # fail when there is no dataset - self.assertRaises(pdffit2.unassignedError, self.P.selectAll, - self.iset, 'i') + self.assertRaises(pdffit2.unassignedError, self.P.selectAll, self.iset, "i") # pass with dataset - self.P.read_data(datafile("Ni.dat"), 'X', 25.0, 0.0) - self.P.selectAll(self.iset, 'i') - self.P.selectAll(self.iset, 'j') + self.P.read_data(datafile("Ni.dat"), "X", 25.0, 0.0) + self.P.selectAll(self.iset, "i") + self.P.selectAll(self.iset, "j") # fail for phase 2 - self.assertRaises(pdffit2.unassignedError, self.P.selectAll, 2, 'i') - self.assertRaises(pdffit2.unassignedError, self.P.selectAll, 2, 'j') + self.assertRaises(pdffit2.unassignedError, self.P.selectAll, 2, "i") + self.assertRaises(pdffit2.unassignedError, self.P.selectAll, 2, "j") class selectNoneExceptions(unittest.TestCase): - def setUp(self): self.P = PdfFit() self.iset = 1 @@ -653,26 +597,23 @@ def tearDown(self): def test_unassignedError1(self): """raise pdffit2.unassignedError when set does not exist""" - self.assertRaises(pdffit2.unassignedError, self.P.selectNone, - self.iset, 'i') + self.assertRaises(pdffit2.unassignedError, self.P.selectNone, self.iset, "i") def test_unassignedError2(self): """raise pdffit2.unassignedError when set does not exist""" self.P.read_struct(datafile("Ni.stru")) # fail when there is no dataset - self.assertRaises(pdffit2.unassignedError, self.P.selectNone, - self.iset, 'i') + self.assertRaises(pdffit2.unassignedError, self.P.selectNone, self.iset, "i") # pass with dataset - self.P.read_data(datafile("Ni.dat"), 'X', 25.0, 0.0) - self.P.selectNone(self.iset, 'i') - self.P.selectNone(self.iset, 'j') + self.P.read_data(datafile("Ni.dat"), "X", 25.0, 0.0) + self.P.selectNone(self.iset, "i") + self.P.selectNone(self.iset, "j") # fail for phase 2 - self.assertRaises(pdffit2.unassignedError, self.P.selectNone, 2, 'i') - self.assertRaises(pdffit2.unassignedError, self.P.selectNone, 2, 'j') + self.assertRaises(pdffit2.unassignedError, self.P.selectNone, 2, "i") + self.assertRaises(pdffit2.unassignedError, self.P.selectNone, 2, "j") class bangExceptions(unittest.TestCase): - def setUp(self): self.P = PdfFit() self.a1 = 1 @@ -684,31 +625,26 @@ def tearDown(self): def test_unassignedError(self): """raise pdffit2.unassignedError when phase does not exist""" - self.assertRaises(pdffit2.unassignedError, self.P.bang, self.a1, - self.a2, self.a3) + self.assertRaises(pdffit2.unassignedError, self.P.bang, self.a1, self.a2, self.a3) def test_ValueError1(self): """raise ValueError when selected atom(s) does not exist""" - self.P.read_struct(datafile('Ni.stru')) - self.P.read_data(datafile("Ni.dat"), 'X', 25.0, 0.0) - self.assertRaises(ValueError, self.P.bang, 0, - self.a2, self.a3) + self.P.read_struct(datafile("Ni.stru")) + self.P.read_data(datafile("Ni.dat"), "X", 25.0, 0.0) + self.assertRaises(ValueError, self.P.bang, 0, self.a2, self.a3) def test_ValueError2(self): """raise ValueError when selected atom(s) does not exist""" - self.P.read_struct(datafile('Ni.stru')) - self.assertRaises(ValueError, self.P.bang, self.a1, - -1, self.a3) + self.P.read_struct(datafile("Ni.stru")) + self.assertRaises(ValueError, self.P.bang, self.a1, -1, self.a3) def test_ValueError3(self): """raise ValueError when selected atom(s) does not exist""" - self.P.read_struct(datafile('Ni.stru')) - self.assertRaises(ValueError, self.P.bang, self.a1, - self.a2, 6) + self.P.read_struct(datafile("Ni.stru")) + self.assertRaises(ValueError, self.P.bang, self.a1, self.a2, 6) class blenExceptions(unittest.TestCase): - def setUp(self): self.P = PdfFit() self.a1 = 1 @@ -719,27 +655,25 @@ def tearDown(self): def test_unassignedError(self): """raise pdffit2.unassignedError when no data exists""" - self.assertRaises(pdffit2.unassignedError, self.P.blen, self.a1, - self.a2) + self.assertRaises(pdffit2.unassignedError, self.P.blen, self.a1, self.a2) def test_ValueError1(self): """raise ValueError when selected atom(s) does not exist""" - self.P.read_struct(datafile('Ni.stru')) + self.P.read_struct(datafile("Ni.stru")) self.assertRaises(ValueError, self.P.blen, 0, self.a2) def test_ValueError2(self): """raise ValueError when selected atom(s) does not exist""" - self.P.read_struct(datafile('Ni.stru')) + self.P.read_struct(datafile("Ni.stru")) self.assertRaises(ValueError, self.P.blen, self.a1, 6) def test_ValueError3(self): """raise ValueError when selected atom(s) does not exist""" - self.P.read_struct(datafile('Ni.stru')) + self.P.read_struct(datafile("Ni.stru")) self.assertRaises(ValueError, self.P.blen, 0, 6) class show_scatExceptions(unittest.TestCase): - def setUp(self): self.P = PdfFit() @@ -748,11 +682,11 @@ def tearDown(self): def test_unassignedError(self): """raise pdffit2.unassignedError when phase does not exist""" - self.assertRaises(pdffit2.unassignedError, self.P.show_scat, 'X') + self.assertRaises(pdffit2.unassignedError, self.P.show_scat, "X") -#class set_scatExceptions(unittest.TestCase): - #I'm not sure how to use this function +# class set_scatExceptions(unittest.TestCase): +# I'm not sure how to use this function # def setUp(self): # self.P = PdfFit() @@ -771,7 +705,6 @@ def test_unassignedError(self): class num_atomsExceptions(unittest.TestCase): - def setUp(self): self.P = PdfFit() @@ -782,8 +715,8 @@ def test_unassignedError(self): """raise pdffit2.unassignedError when no atoms exist""" self.assertRaises(pdffit2.unassignedError, self.P.num_atoms) -class fixparExceptions(unittest.TestCase): +class fixparExceptions(unittest.TestCase): def setUp(self): self.P = PdfFit() @@ -793,12 +726,11 @@ def tearDown(self): def test_unassignedError(self): """raise pdffit2.unassignedError when parameter does not exist""" self.P.read_struct(datafile("Ni.stru")) - self.P.read_data(datafile("Ni.dat"), 'X', 25.0, 0.0) + self.P.read_data(datafile("Ni.dat"), "X", 25.0, 0.0) self.assertRaises(pdffit2.unassignedError, self.P.fixpar, 1) class freeparExceptions(unittest.TestCase): - def setUp(self): self.P = PdfFit() @@ -808,12 +740,11 @@ def tearDown(self): def test_unassignedError(self): """raise pdffit2.unassignedError when parameter does not exist""" self.P.read_struct(datafile("Ni.stru")) - self.P.read_data(datafile("Ni.dat"), 'X', 25.0, 0.0) + self.P.read_data(datafile("Ni.dat"), "X", 25.0, 0.0) self.assertRaises(pdffit2.unassignedError, self.P.freepar, 1) class setphaseExceptions(unittest.TestCase): - def setUp(self): self.P = PdfFit() @@ -823,12 +754,11 @@ def tearDown(self): def test_unassignedError(self): """raise pdffit2.unassignedError when phase does not exist""" self.P.read_struct(datafile("Ni.stru")) - self.P.read_data(datafile("Ni.dat"), 'X', 25.0, 0.0) + self.P.read_data(datafile("Ni.dat"), "X", 25.0, 0.0) self.assertRaises(pdffit2.unassignedError, self.P.setphase, 2) class setdataExceptions(unittest.TestCase): - def setUp(self): self.P = PdfFit() @@ -838,11 +768,11 @@ def tearDown(self): def test_unassignedError(self): """raise pdffit2.unassignedError when data set does not exist""" self.P.read_struct(datafile("Ni.stru")) - self.P.read_data(datafile("Ni.dat"), 'X', 25.0, 0.0) + self.P.read_data(datafile("Ni.dat"), "X", 25.0, 0.0) self.assertRaises(pdffit2.unassignedError, self.P.setdata, 2) -class getcrwExceptions(unittest.TestCase): +class getcrwExceptions(unittest.TestCase): def setUp(self): self.P = PdfFit() @@ -854,13 +784,12 @@ def test_unassignedError(self): self.assertRaises(pdffit2.unassignedError, self.P.getcrw) - -#main -if __name__ == '__main__': - #suite = unittest.makeSuite(num_atomsExceptions) - #unittest.TextTestRunner(verbosity=3).run(suite) - #testcase = calcExceptions('test_unassignedError') - #unittest.TextTestRunner(verbosity=3).run(testcase) +# main +if __name__ == "__main__": + # suite = unittest.makeSuite(num_atomsExceptions) + # unittest.TextTestRunner(verbosity=3).run(suite) + # testcase = calcExceptions('test_unassignedError') + # unittest.TextTestRunner(verbosity=3).run(testcase) unittest.main() # End of file diff --git a/diffpy/pdffit2/tests/TestPdfFit.py b/diffpy/pdffit2/tests/TestPdfFit.py index 90f1ad7c..8102b8b9 100644 --- a/diffpy/pdffit2/tests/TestPdfFit.py +++ b/diffpy/pdffit2/tests/TestPdfFit.py @@ -14,6 +14,7 @@ # ---------------------------------------------------------------------------- + class TestPdfFit(unittest.TestCase): places = 6 @@ -30,299 +31,289 @@ def test__exportAll(self): "check PdfFit._exportAll()" ns = {} self.P._exportAll(ns) - self.assertEqual('ALL', ns['ALL']) - self.assertEqual('FSQR', ns['FSQR']) - self.assertEqual('N', ns['N']) - self.assertIs('N', ns['N']) - self.assertIs(self.P.lat, ns['lat']) - self.assertEqual(self.P.reset, ns['reset']) + self.assertEqual("ALL", ns["ALL"]) + self.assertEqual("FSQR", ns["FSQR"]) + self.assertEqual("N", ns["N"]) + self.assertIs("N", ns["N"]) + self.assertIs(self.P.lat, ns["lat"]) + self.assertEqual(self.P.reset, ns["reset"]) return -# def test_intro(self): -# """check PdfFit.intro() -# """ -# return + # def test_intro(self): + # """check PdfFit.intro() + # """ + # return def test_add_structure(self): - """check PdfFit.add_structure() - """ - ni = loadStructure(datafile('Ni.stru')) + """check PdfFit.add_structure()""" + ni = loadStructure(datafile("Ni.stru")) self.P.add_structure(ni) self.assertEqual(4, self.P.num_atoms()) return -# def test_read_struct(self): -# """check PdfFit.read_struct() -# """ -# return -# -# def test_read_struct_string(self): -# """check PdfFit.read_struct_string() -# """ -# return -# -# def test_read_data(self): -# """check PdfFit.read_data() -# """ -# return + # def test_read_struct(self): + # """check PdfFit.read_struct() + # """ + # return + # + # def test_read_struct_string(self): + # """check PdfFit.read_struct_string() + # """ + # return + # + # def test_read_data(self): + # """check PdfFit.read_data() + # """ + # return def test_read_data_string(self): - """check PdfFit.read_data_string() - """ + """check PdfFit.read_data_string()""" pf = self.P - with open(datafile('300K.gr')) as fp: + with open(datafile("300K.gr")) as fp: s = fp.read() self.assertEqual([], pf.data_files) - pf.read_data_string(s, 'N', 32, 0.03, 'lmo') + pf.read_data_string(s, "N", 32, 0.03, "lmo") self.assertEqual(1, len(pf.data_files)) gobs = pf.getpdf_obs() self.assertEqual(2000, len(gobs)) self.assertEqual(0.384, gobs[-1]) - self.assertEqual(0.03, pf.getvar('qdamp')) - return - -# def test_read_data_lists(self): -# """check PdfFit.read_data_lists() -# """ -# return -# -# def test_pdfrange(self): -# """check PdfFit.pdfrange() -# """ -# return -# -# def test_reset(self): -# """check PdfFit.reset() -# """ -# return + self.assertEqual(0.03, pf.getvar("qdamp")) + return + + # def test_read_data_lists(self): + # """check PdfFit.read_data_lists() + # """ + # return + # + # def test_pdfrange(self): + # """check PdfFit.pdfrange() + # """ + # return + # + # def test_reset(self): + # """check PdfFit.reset() + # """ + # return def test_alloc(self): - """check PdfFit.alloc() - """ + """check PdfFit.alloc()""" # alloc and read_struct can be called in any order. - self.P.alloc('X', 25, 0.0, 0.01, 10, 1000) + self.P.alloc("X", 25, 0.0, 0.01, 10, 1000) # without a structure calculated PDF is all zero self.P.calc() Gzero = self.P.getpdf_fit() - self.assertEqual(1000*[0.0], Gzero) - self.P.read_struct(datafile('Ni.stru')) + self.assertEqual(1000 * [0.0], Gzero) + self.P.read_struct(datafile("Ni.stru")) self.P.calc() # check r-values r = self.P.getR() self.assertEqual(1000, len(r)) for i in range(1000): - self.assertAlmostEqual(0.01*(i + 1), r[i], self.places) + self.assertAlmostEqual(0.01 * (i + 1), r[i], self.places) Gfit_alloc_read = self.P.getpdf_fit() # now try the other order self.P.reset() - self.P.read_struct(datafile('Ni.stru')) - self.P.alloc('X', 25, 0.0, 0.01, 10, 1000) + self.P.read_struct(datafile("Ni.stru")) + self.P.alloc("X", 25, 0.0, 0.01, 10, 1000) self.P.calc() Gfit_read_alloc = self.P.getpdf_fit() # and they should be the same self.assertEqual(Gfit_read_alloc, Gfit_alloc_read) return -# def test_calc(self): -# """check PdfFit.calc() -# """ -# return -# -# def test_refine(self): -# """check PdfFit.refine() -# """ -# return -# -# def test_refine_step(self): -# """check PdfFit.refine_step() -# """ -# return -# -# def test_save_pdf(self): -# """check PdfFit.save_pdf() -# """ -# return -# -# def test_save_pdf_string(self): -# """check PdfFit.save_pdf_string() -# """ -# return -# -# def test_save_dif(self): -# """check PdfFit.save_dif() -# """ -# return -# -# def test_save_dif_string(self): -# """check PdfFit.save_dif_string() -# """ -# return -# -# def test_save_res(self): -# """check PdfFit.save_res() -# """ -# return -# -# def test_save_res_string(self): -# """check PdfFit.save_res_string() -# """ -# return + # def test_calc(self): + # """check PdfFit.calc() + # """ + # return + # + # def test_refine(self): + # """check PdfFit.refine() + # """ + # return + # + # def test_refine_step(self): + # """check PdfFit.refine_step() + # """ + # return + # + # def test_save_pdf(self): + # """check PdfFit.save_pdf() + # """ + # return + # + # def test_save_pdf_string(self): + # """check PdfFit.save_pdf_string() + # """ + # return + # + # def test_save_dif(self): + # """check PdfFit.save_dif() + # """ + # return + # + # def test_save_dif_string(self): + # """check PdfFit.save_dif_string() + # """ + # return + # + # def test_save_res(self): + # """check PdfFit.save_res() + # """ + # return + # + # def test_save_res_string(self): + # """check PdfFit.save_res_string() + # """ + # return def test_get_structure(self): - """check PdfFit.get_structure() - """ - self.P.read_struct(datafile('Ni.stru')) - self.P.read_struct(datafile('PbScW25TiO3.stru')) + """check PdfFit.get_structure()""" + self.P.read_struct(datafile("Ni.stru")) + self.P.read_struct(datafile("PbScW25TiO3.stru")) stru1 = self.P.get_structure(1) self.assertEqual(4, len(stru1)) - self.assertEqual('Ni', stru1[0].element) + self.assertEqual("Ni", stru1[0].element) stru2 = self.P.get_structure(2) self.assertEqual(56, len(stru2)) - self.assertEqual('Ti', stru2[-1].element) - return - -# def test_save_struct(self): -# """check PdfFit.save_struct() -# """ -# return -# -# def test_save_struct_string(self): -# """check PdfFit.save_struct_string() -# """ -# return -# -# def test_show_struct(self): -# """check PdfFit.show_struct() -# """ -# return -# -# def test_constrain(self): -# """check PdfFit.constrain() -# """ -# return + self.assertEqual("Ti", stru2[-1].element) + return + + # def test_save_struct(self): + # """check PdfFit.save_struct() + # """ + # return + # + # def test_save_struct_string(self): + # """check PdfFit.save_struct_string() + # """ + # return + # + # def test_show_struct(self): + # """check PdfFit.show_struct() + # """ + # return + # + # def test_constrain(self): + # """check PdfFit.constrain() + # """ + # return def test_setpar(self): - """check PdfFit.setpar() - """ + """check PdfFit.setpar()""" pf = self.P - pf.read_struct(datafile('Ni.stru')) - pf.setpar(1, 'lat(1)') + pf.read_struct(datafile("Ni.stru")) + pf.setpar(1, "lat(1)") self.assertEqual(3.52, pf.getpar(1)) pf.setpar(1, 4.0) self.assertEqual(4, pf.getpar(1)) - pf.setpar(1, pf.lat('a')) + pf.setpar(1, pf.lat("a")) self.assertEqual(3.52, pf.getpar(1)) return def test_setvar(self): - """check PdfFit.setvar() - """ + """check PdfFit.setvar()""" pf = self.P - pf.read_struct(datafile('Ni.stru')) + pf.read_struct(datafile("Ni.stru")) pf.setvar(pf.delta1, 1.2) self.assertEqual(1.2, pf.getvar(pf.delta1)) - pf.setvar('delta1', 1.7) - self.assertEqual(1.7, pf.getvar('delta1')) - return - -# def test_getvar(self): -# """check PdfFit.getvar() -# """ -# return -# -# def test_getrw(self): -# """check PdfFit.getrw() -# """ -# return -# -# def test_getR(self): -# """check PdfFit.getR() -# """ -# return -# -# def test_getpdf_fit(self): -# """check PdfFit.getpdf_fit() -# """ -# return -# -# def test_getpdf_obs(self): -# """check PdfFit.getpdf_obs() -# """ -# return -# -# def test_getpdf_diff(self): -# """check PdfFit.getpdf_diff() -# """ -# return + pf.setvar("delta1", 1.7) + self.assertEqual(1.7, pf.getvar("delta1")) + return + + # def test_getvar(self): + # """check PdfFit.getvar() + # """ + # return + # + # def test_getrw(self): + # """check PdfFit.getrw() + # """ + # return + # + # def test_getR(self): + # """check PdfFit.getR() + # """ + # return + # + # def test_getpdf_fit(self): + # """check PdfFit.getpdf_fit() + # """ + # return + # + # def test_getpdf_obs(self): + # """check PdfFit.getpdf_obs() + # """ + # return + # + # def test_getpdf_diff(self): + # """check PdfFit.getpdf_diff() + # """ + # return def test_get_atoms(self): - """check PdfFit.get_atoms() - """ - self.P.read_struct(datafile('Ni.stru')) - self.P.read_struct(datafile('PbScW25TiO3.stru')) + """check PdfFit.get_atoms()""" + self.P.read_struct(datafile("Ni.stru")) + self.P.read_struct(datafile("PbScW25TiO3.stru")) self.P.setphase(1) a1 = self.P.get_atoms() a2 = self.P.get_atoms(2) - self.assertEqual(4*['NI'], a1) - self.assertEqual(8*['PB']+24*['O']+8*['SC']+8*['W']+8*['TI'], a2) + self.assertEqual(4 * ["NI"], a1) + self.assertEqual(8 * ["PB"] + 24 * ["O"] + 8 * ["SC"] + 8 * ["W"] + 8 * ["TI"], a2) return def test_get_atom_types(self): - """check PdfFit.get_atom_types() - """ - self.P.read_struct(datafile('Ni.stru')) - self.P.read_struct(datafile('PbScW25TiO3.stru')) + """check PdfFit.get_atom_types()""" + self.P.read_struct(datafile("Ni.stru")) + self.P.read_struct(datafile("PbScW25TiO3.stru")) self.P.setphase(1) atp1 = self.P.get_atom_types() atp2 = self.P.get_atom_types(2) - self.assertEqual(['NI'], atp1) - self.assertEqual(['PB', 'O', 'SC', 'W', 'TI'], atp2) + self.assertEqual(["NI"], atp1) + self.assertEqual(["PB", "O", "SC", "W", "TI"], atp2) return def test_num_phases(self): - """check PdfFit.num_phases() - """ + """check PdfFit.num_phases()""" self.assertEqual(0, self.P.num_phases()) - self.P.read_struct(datafile('Ni.stru')) + self.P.read_struct(datafile("Ni.stru")) self.assertEqual(1, self.P.num_phases()) - self.P.read_struct(datafile('PbScW25TiO3.stru')) + self.P.read_struct(datafile("PbScW25TiO3.stru")) self.assertEqual(2, self.P.num_phases()) self.P.reset() self.assertEqual(0, self.P.num_phases()) return def test_num_datasets(self): - """check PdfFit.num_datasets() - """ + """check PdfFit.num_datasets()""" self.assertEqual(0, self.P.num_datasets()) - self.P.read_data(datafile('Ni.dat'), 'X', 25.0, 0.5) + self.P.read_data(datafile("Ni.dat"), "X", 25.0, 0.5) self.assertEqual(1, self.P.num_datasets()) # failed data should not increase num_datasets try: - self.P.read_data(datafile('badNi.dat')) + self.P.read_data(datafile("badNi.dat")) except: pass self.assertEqual(1, self.P.num_datasets()) # alloc should increase number of datasets # alloc requires a loaded structure - self.P.read_struct(datafile('Ni.stru')) - self.P.alloc('X', 30.0, 0.05, 2, 10, 100) + self.P.read_struct(datafile("Ni.stru")) + self.P.alloc("X", 30.0, 0.05, 2, 10, 100) self.assertEqual(2, self.P.num_datasets()) self.P.reset() self.assertEqual(0, self.P.num_datasets()) return def test_getcrw(self): - """check PdfFit.getcrw() - """ + """check PdfFit.getcrw()""" import numpy + self.assertEqual(0, self.P.num_datasets()) # Setting qmax=0 so that partial crw are not disturbed by # termination ripples. - self.P.read_data(datafile('Ni.dat'), 'X', 0.0, 0.0) + self.P.read_data(datafile("Ni.dat"), "X", 0.0, 0.0) # crw is empty before data refinement self.assertEqual([], self.P.getcrw()) - self.P.read_struct(datafile('Ni.stru')) + self.P.read_struct(datafile("Ni.stru")) self.P.pdfrange(1, 2, 19) self.P.refine() crw19 = numpy.array(self.P.getcrw()) @@ -334,10 +325,10 @@ def test_getcrw(self): self.assertAlmostEqual(self.P.getrw(), rw19, self.places) # renormalize cumulative Rw and compare with Rw at r=15 Gobs19 = numpy.array(self.P.getpdf_obs()) - Gnorm19 = numpy.sqrt(numpy.sum(Gobs19**2)) + Gnorm19 = numpy.sqrt(numpy.sum(Gobs19 ** 2)) r = numpy.array(self.P.getR()) idx = numpy.nonzero(r <= 15)[0] - Gnorm15 = numpy.sqrt(numpy.sum(Gobs19[idx]**2)) + Gnorm15 = numpy.sqrt(numpy.sum(Gobs19[idx] ** 2)) i15 = idx[-1] rw15 = crw19[i15] * Gnorm19 / Gnorm15 self.P.pdfrange(1, 2, r[i15] + 1e-5) @@ -346,17 +337,16 @@ def test_getcrw(self): return def test_getcrw_two_datasets(self): - """check that getcrw() and getrw() are consistent for two datasets. - """ - self.P.read_data(datafile('Ni.dat'), 'X', 25.0, 0.0) + """check that getcrw() and getrw() are consistent for two datasets.""" + self.P.read_data(datafile("Ni.dat"), "X", 25.0, 0.0) self.P.pdfrange(1, 2, 8) - self.P.read_data(datafile('300K.gr'), 'N', 32.0, 0.0) + self.P.read_data(datafile("300K.gr"), "N", 32.0, 0.0) self.P.pdfrange(2, 1, 11) - self.P.read_struct(datafile('Ni.stru')) + self.P.read_struct(datafile("Ni.stru")) # mess lattice parameters to have comparable Rw contributions - self.P.setvar('lat(1)', 3) - self.P.setvar('lat(2)', 3) - self.P.setvar('lat(3)', 3) + self.P.setvar("lat(1)", 3) + self.P.setvar("lat(2)", 3) + self.P.setvar("lat(3)", 3) self.P.refine() rwtot = self.P.getrw() self.assertTrue(rwtot > 0.0) @@ -364,72 +354,70 @@ def test_getcrw_two_datasets(self): rw1 = self.P.getcrw()[-1] self.P.setdata(2) rw2 = self.P.getcrw()[-1] - self.assertAlmostEqual(rwtot**2, rw1**2 + rw2**2, self.places) + self.assertAlmostEqual(rwtot ** 2, rw1 ** 2 + rw2 ** 2, self.places) return -# def test_getpar(self): -# """check PdfFit.getpar() -# """ -# return + # def test_getpar(self): + # """check PdfFit.getpar() + # """ + # return def test_fixpar(self): - """check PdfFit.fixpar() - """ - self.P.fixpar('all') - self.assertRaises(TypeError, self.P.fixpar, 'x') + """check PdfFit.fixpar()""" + self.P.fixpar("all") + self.assertRaises(TypeError, self.P.fixpar, "x") return def test_freepar(self): - """check PdfFit.freepar() - """ - self.P.freepar('all') - self.assertRaises(TypeError, self.P.freepar, 'x') - return - -# def test_setphase(self): -# """check PdfFit.setphase() -# """ -# return -# -# def test_setdata(self): -# """check PdfFit.setdata() -# """ -# return -# + """check PdfFit.freepar()""" + self.P.freepar("all") + self.assertRaises(TypeError, self.P.freepar, "x") + return + + # def test_setphase(self): + # """check PdfFit.setphase() + # """ + # return + # + # def test_setdata(self): + # """check PdfFit.setdata() + # """ + # return + # def test_psel(self): - """check PdfFit.psel() - """ + """check PdfFit.psel()""" + def doalloc(): - self.P.alloc('X', 30.0, 0.05, 2, 10, 100) + self.P.alloc("X", 30.0, 0.05, 2, 10, 100) return + self.assertRaises(pdffit2.unassignedError, self.P.psel, 0) self.assertRaises(pdffit2.unassignedError, self.P.psel, 1) - self.P.read_struct(datafile('Ni.stru')) + self.P.read_struct(datafile("Ni.stru")) doalloc() self.P.calc() G1 = self.P.getpdf_fit() self.P.reset() - self.P.read_struct(datafile('PbScW25TiO3.stru')) + self.P.read_struct(datafile("PbScW25TiO3.stru")) doalloc() self.P.calc() G2 = self.P.getpdf_fit() self.P.reset() - self.P.read_struct(datafile('Ni.stru')) - self.P.read_struct(datafile('PbScW25TiO3.stru')) + self.P.read_struct(datafile("Ni.stru")) + self.P.read_struct(datafile("PbScW25TiO3.stru")) doalloc() - self.P.pdesel('ALL') + self.P.pdesel("ALL") self.P.psel(1) self.P.calc() self.assertEqual(G1, self.P.getpdf_fit()) - self.P.pdesel('ALL') + self.P.pdesel("ALL") self.P.psel(2) self.P.calc() self.assertEqual(G2, self.P.getpdf_fit()) - self.P.psel('ALL') + self.P.psel("ALL") self.P.calc() Gall = self.P.getpdf_fit() - dGmax = max([abs(g1 + g2 - gall) - for g1, g2, gall in zip(G1, G2, Gall)]) + dGmax = max([abs(g1 + g2 - gall) for g1, g2, gall in zip(G1, G2, Gall)]) self.assertAlmostEqual(0, dGmax, self.places) self.assertRaises(pdffit2.unassignedError, self.P.psel, 10) self.assertRaises(pdffit2.unassignedError, self.P.psel, 0) @@ -437,67 +425,68 @@ def doalloc(): return def test_pdesel(self): - """check PdfFit.pdesel() - """ + """check PdfFit.pdesel()""" + def doalloc(): - self.P.alloc('X', 30.0, 0.05, 2, 10, 100) + self.P.alloc("X", 30.0, 0.05, 2, 10, 100) return + self.assertRaises(pdffit2.unassignedError, self.P.pdesel, 0) self.assertRaises(pdffit2.unassignedError, self.P.pdesel, 1) - self.P.read_struct(datafile('Ni.stru')) + self.P.read_struct(datafile("Ni.stru")) doalloc() self.P.calc() G1 = self.P.getpdf_fit() self.P.reset() - self.P.read_struct(datafile('PbScW25TiO3.stru')) + self.P.read_struct(datafile("PbScW25TiO3.stru")) doalloc() self.P.calc() G2 = self.P.getpdf_fit() self.P.reset() - self.P.read_struct(datafile('Ni.stru')) - self.P.read_struct(datafile('PbScW25TiO3.stru')) + self.P.read_struct(datafile("Ni.stru")) + self.P.read_struct(datafile("PbScW25TiO3.stru")) doalloc() - self.P.psel('ALL') + self.P.psel("ALL") self.P.pdesel(2) self.P.calc() self.assertEqual(G1, self.P.getpdf_fit()) - self.P.psel('ALL') + self.P.psel("ALL") self.P.pdesel(1) self.P.calc() self.assertEqual(G2, self.P.getpdf_fit()) - self.P.pdesel('ALL') + self.P.pdesel("ALL") self.P.calc() G0 = self.P.getpdf_fit() - self.assertEqual([0.0]*len(G0), G0) + self.assertEqual([0.0] * len(G0), G0) self.assertRaises(pdffit2.unassignedError, self.P.pdesel, 10) self.assertRaises(pdffit2.unassignedError, self.P.pdesel, 0) self.assertRaises(pdffit2.unassignedError, self.P.pdesel, -100) return -# -# def test_selectAtomType(self): -# """check PdfFit.selectAtomType() -# """ -# return -# -# def test_selectAtomIndex(self): -# """check PdfFit.selectAtomIndex() -# """ -# return -# -# def test_selectAll(self): -# """check PdfFit.selectAll() -# """ -# return -# -# def test_selectNone(self): -# """check PdfFit.selectNone() -# """ -# return + + # + # def test_selectAtomType(self): + # """check PdfFit.selectAtomType() + # """ + # return + # + # def test_selectAtomIndex(self): + # """check PdfFit.selectAtomIndex() + # """ + # return + # + # def test_selectAll(self): + # """check PdfFit.selectAll() + # """ + # return + # + # def test_selectNone(self): + # """check PdfFit.selectNone() + # """ + # return def test_bond_angle(self): - """check PdfFit.bond_angle() - """ - self.P.read_struct(datafile('Ni.stru')) + """check PdfFit.bond_angle()""" + self.P.read_struct(datafile("Ni.stru")) a, e = self.P.bond_angle(1, 2, 3) self.assertAlmostEqual(60.0, a, self.places) self.assertRaises(ValueError, self.P.bond_angle, 0, 1, 2) @@ -506,17 +495,16 @@ def test_bond_angle(self): def test_bang(self): "check PdfFit.bang() function" - self.P.read_struct(datafile('Ni.stru')) + self.P.read_struct(datafile("Ni.stru")) out = capture_output(self.P.bang, 1, 2, 3).strip() - self.assertTrue(out.endswith('60 degrees')) - self.assertTrue(out.startswith('NI (#1) - NI (#2) - NI (#3)')) + self.assertTrue(out.endswith("60 degrees")) + self.assertTrue(out.startswith("NI (#1) - NI (#2) - NI (#3)")) return def test_bond_length_atoms(self): - """check PdfFit.bond_length_atoms() - """ - self.P.read_struct(datafile('Ni.stru')) - self.P.read_struct(datafile('PbScW25TiO3.stru')) + """check PdfFit.bond_length_atoms()""" + self.P.read_struct(datafile("Ni.stru")) + self.P.read_struct(datafile("PbScW25TiO3.stru")) dij, ddij = self.P.bond_length_atoms(1, 5) self.assertAlmostEqual(4.03635, dij, self.places) self.P.setphase(1) @@ -524,152 +512,145 @@ def test_bond_length_atoms(self): return def test_bond_length_types(self): - """check PdfFit.bond_length_types() - """ - self.P.read_struct(datafile('Ni.stru')) - self.P.read_struct(datafile('PbScW25TiO3.stru')) - dPbO = self.P.bond_length_types('Pb', 'O', 0.1, 3.0) + """check PdfFit.bond_length_types()""" + self.P.read_struct(datafile("Ni.stru")) + self.P.read_struct(datafile("PbScW25TiO3.stru")) + dPbO = self.P.bond_length_types("Pb", "O", 0.1, 3.0) # check if keys are present - self.assertTrue('dij' in dPbO) - self.assertTrue('ddij' in dPbO) - self.assertTrue('ij0' in dPbO) - self.assertTrue('ij1' in dPbO) + self.assertTrue("dij" in dPbO) + self.assertTrue("ddij" in dPbO) + self.assertTrue("ij0" in dPbO) + self.assertTrue("ij1" in dPbO) # check if they have the same length - npts = len(dPbO['dij']) - self.assertEqual(npts, len(dPbO['ddij'])) - self.assertEqual(npts, len(dPbO['ij0'])) - self.assertEqual(npts, len(dPbO['ij1'])) + npts = len(dPbO["dij"]) + self.assertEqual(npts, len(dPbO["ddij"])) + self.assertEqual(npts, len(dPbO["ij0"])) + self.assertEqual(npts, len(dPbO["ij1"])) # 8 Pb atoms have coordination 12 in perovskite structure - self.assertEqual(8*12, len(dPbO['dij'])) + self.assertEqual(8 * 12, len(dPbO["dij"])) self.P.setphase(1) - dfcc = self.P.bond_length_types('ALL', 'ALL', 0.1, 2.6) + dfcc = self.P.bond_length_types("ALL", "ALL", 0.1, 2.6) # 4 Ni atoms with coordination 12 - self.assertEqual(4*12, len(dfcc['dij'])) + self.assertEqual(4 * 12, len(dfcc["dij"])) # invalid element - self.assertRaises(ValueError, self.P.bond_length_types, 'Ni', 'Nix', 0.1, 5.0) + self.assertRaises(ValueError, self.P.bond_length_types, "Ni", "Nix", 0.1, 5.0) # check indices ij0 - allij0 = sum(dfcc['ij0'], tuple()) + allij0 = sum(dfcc["ij0"], tuple()) self.assertEqual(0, min(allij0)) self.assertEqual(3, max(allij0)) # check indices ij1 - allij1 = sum(dfcc['ij1'], tuple()) + allij1 = sum(dfcc["ij1"], tuple()) self.assertEqual(1, min(allij1)) self.assertEqual(4, max(allij1)) # check index values - ij0check = [(i1 - 1, j1 - 1) for i1, j1 in dfcc['ij1']] - self.assertEqual(ij0check, dfcc['ij0']) + ij0check = [(i1 - 1, j1 - 1) for i1, j1 in dfcc["ij1"]] + self.assertEqual(ij0check, dfcc["ij0"]) # test valid element which is not present in the structure - dnone = self.P.bond_length_types('Ni', 'Au', 0.1, 5.0) - self.assertEqual(0, len(dnone['dij'])) - self.assertEqual(0, len(dnone['ddij'])) - self.assertEqual(0, len(dnone['ij0'])) - self.assertEqual(0, len(dnone['ij1'])) + dnone = self.P.bond_length_types("Ni", "Au", 0.1, 5.0) + self.assertEqual(0, len(dnone["dij"])) + self.assertEqual(0, len(dnone["ddij"])) + self.assertEqual(0, len(dnone["ij0"])) + self.assertEqual(0, len(dnone["ij1"])) return def test_blen(self): - """check PdfFit.blen() - """ - self.P.read_struct(datafile('PbScW25TiO3.stru')) + """check PdfFit.blen()""" + self.P.read_struct(datafile("PbScW25TiO3.stru")) blen = self.P.blen o = capture_output(blen, 1, 5).strip() - self.assertTrue(o.endswith('4.03635 A')) - self.assertTrue('PB (#1)' in o) - self.assertTrue('PB (#5)' in o) + self.assertTrue(o.endswith("4.03635 A")) + self.assertTrue("PB (#1)" in o) + self.assertTrue("PB (#5)" in o) self.assertRaises(ValueError, blen, 1, 99) self.assertRaises(ValueError, blen, 0, 1) o1 = capture_output(blen, 1, 1, 0.1, 1) - self.assertTrue('No pairs found' in o1) + self.assertTrue("No pairs found" in o1) o2 = capture_output(blen, 1, 50, 0.1, 1) - self.assertEqual('', o2) - o3 = capture_output(blen, 'Sc', 'O', 0.5, 2.3).strip() - self.assertEqual(1 + 48, len(o3.split('\n'))) + self.assertEqual("", o2) + o3 = capture_output(blen, "Sc", "O", 0.5, 2.3).strip() + self.assertEqual(1 + 48, len(o3.split("\n"))) self.assertEqual(6, o3.count("SC (#33)")) self.assertEqual(2, o3.count("O (#9)")) self.assertRaises(TypeError, blen, "Sc", "O", 0.5) return -# def test_show_scat(self): -# """check PdfFit.show_scat() -# """ -# return -# -# def test_get_scat_string(self): -# """check PdfFit.get_scat_string() -# """ -# return + # def test_show_scat(self): + # """check PdfFit.show_scat() + # """ + # return + # + # def test_get_scat_string(self): + # """check PdfFit.get_scat_string() + # """ + # return def test_get_scat(self): - """check PdfFit.get_scat() - """ + """check PdfFit.get_scat()""" # x-ray scattering factors - fPb = self.P.get_scat('X', 'Pb') + fPb = self.P.get_scat("X", "Pb") self.assertEqual(82.0, fPb) - fTi = self.P.get_scat('X', 'tI') + fTi = self.P.get_scat("X", "tI") self.assertEqual(22.0, fTi) # neutron scattering lengths - bPb = self.P.get_scat('N', 'PB') + bPb = self.P.get_scat("N", "PB") self.assertAlmostEqual(9.401, bPb, 3) - bTi = self.P.get_scat('N', 'ti') + bTi = self.P.get_scat("N", "ti") self.assertAlmostEqual(-3.370, bTi, 3) # exceptions - self.assertRaises(ValueError, self.P.get_scat, 'N', 'zz') - self.assertRaises(ValueError, self.P.get_scat, 'Z', 'Ti') + self.assertRaises(ValueError, self.P.get_scat, "N", "zz") + self.assertRaises(ValueError, self.P.get_scat, "Z", "Ti") return def test_set_scat(self): - """check PdfFit.set_scat() - """ + """check PdfFit.set_scat()""" # raises exception when no phase exists - self.assertRaises(pdffit2.unassignedError, - self.P.set_scat, 'N', 'Ti', -11) + self.assertRaises(pdffit2.unassignedError, self.P.set_scat, "N", "Ti", -11) # check if it is local to phase - fPb = self.P.get_scat('X', 'Pb') - bPb = self.P.get_scat('N', 'Pb') - self.P.read_struct(datafile('PbScW25TiO3.stru')) - self.P.set_scat('X', 'Pb', 142) - self.assertEqual(142, self.P.get_scat('X', 'Pb')) - self.assertEqual(bPb, self.P.get_scat('N', 'Pb')) - self.P.read_struct(datafile('PbScW25TiO3.stru')) - self.assertEqual(fPb, self.P.get_scat('X', 'Pb')) + fPb = self.P.get_scat("X", "Pb") + bPb = self.P.get_scat("N", "Pb") + self.P.read_struct(datafile("PbScW25TiO3.stru")) + self.P.set_scat("X", "Pb", 142) + self.assertEqual(142, self.P.get_scat("X", "Pb")) + self.assertEqual(bPb, self.P.get_scat("N", "Pb")) + self.P.read_struct(datafile("PbScW25TiO3.stru")) + self.assertEqual(fPb, self.P.get_scat("X", "Pb")) self.P.setphase(1) - self.assertEqual(142, self.P.get_scat('X', 'Pb')) + self.assertEqual(142, self.P.get_scat("X", "Pb")) self.P.setphase(2) - self.assertEqual(fPb, self.P.get_scat('X', 'Pb')) + self.assertEqual(fPb, self.P.get_scat("X", "Pb")) # check exception for invalid inputs - self.assertRaises(ValueError, self.P.set_scat, 'Z', 'C', 123) - self.assertRaises(ValueError, self.P.set_scat, 'X', 'ZZ', 123) + self.assertRaises(ValueError, self.P.set_scat, "Z", "C", 123) + self.assertRaises(ValueError, self.P.set_scat, "X", "ZZ", 123) return def test_reset_scat(self): - """check PdfFit.reset_scat() - """ + """check PdfFit.reset_scat()""" # raises exception when no phase exists - self.assertRaises(pdffit2.unassignedError, self.P.reset_scat, 'Ti') + self.assertRaises(pdffit2.unassignedError, self.P.reset_scat, "Ti") # check if it is local to phase - fPb = self.P.get_scat('X', 'Pb') - bPb = self.P.get_scat('N', 'Pb') - self.P.read_struct(datafile('PbScW25TiO3.stru')) - self.P.set_scat('X', 'Pb', 142) - self.P.read_struct(datafile('PbScW25TiO3.stru')) - self.P.set_scat('N', 'Pb', -17) + fPb = self.P.get_scat("X", "Pb") + bPb = self.P.get_scat("N", "Pb") + self.P.read_struct(datafile("PbScW25TiO3.stru")) + self.P.set_scat("X", "Pb", 142) + self.P.read_struct(datafile("PbScW25TiO3.stru")) + self.P.set_scat("N", "Pb", -17) self.P.setphase(1) - self.assertNotEqual(fPb, self.P.get_scat('X', 'Pb')) - self.P.reset_scat('Pb') - self.assertEqual(fPb, self.P.get_scat('X', 'Pb')) + self.assertNotEqual(fPb, self.P.get_scat("X", "Pb")) + self.P.reset_scat("Pb") + self.assertEqual(fPb, self.P.get_scat("X", "Pb")) self.P.setphase(2) - self.assertNotEqual(bPb, self.P.get_scat('N', 'Pb')) - self.P.reset_scat('Pb') - self.assertEqual(bPb, self.P.get_scat('N', 'Pb')) + self.assertNotEqual(bPb, self.P.get_scat("N", "Pb")) + self.P.reset_scat("Pb") + self.assertEqual(bPb, self.P.get_scat("N", "Pb")) # check exception for invalid inputs - self.assertRaises(ValueError, self.P.reset_scat, 'Zz') + self.assertRaises(ValueError, self.P.reset_scat, "Zz") return def test_num_atoms(self): - """check PdfFit.num_atoms() - """ - self.P.read_struct(datafile('Ni.stru')) + """check PdfFit.num_atoms()""" + self.P.read_struct(datafile("Ni.stru")) self.assertEqual(4, self.P.num_atoms()) - self.P.read_struct(datafile('PbScW25TiO3.stru')) + self.P.read_struct(datafile("PbScW25TiO3.stru")) self.assertEqual(56, self.P.num_atoms()) self.P.setphase(1) self.assertEqual(4, self.P.num_atoms()) @@ -678,30 +659,27 @@ def test_num_atoms(self): return def test_lat(self): - """check PdfFit.lat() - """ + """check PdfFit.lat()""" pf = self.P - pf.read_struct(datafile('Ni.stru')) - for i in ('a', 'b', 'c', 1, 2, 3): + pf.read_struct(datafile("Ni.stru")) + for i in ("a", "b", "c", 1, 2, 3): self.assertEqual(3.52, pf.getvar(pf.lat(i))) - for i in ('alpha', 'beta', 'gamma', 4, 5, 6): + for i in ("alpha", "beta", "gamma", 4, 5, 6): self.assertEqual(90, pf.getvar(pf.lat(i))) return def test_xyz(self): - """check PdfFit.x() PdfFit.y(), PdfFit.z() - """ + """check PdfFit.x() PdfFit.y(), PdfFit.z()""" pf = self.P - pf.read_struct(datafile('Ni.stru')) + pf.read_struct(datafile("Ni.stru")) self.assertEqual(0.5, pf.getvar(pf.x(3))) self.assertEqual(0, pf.getvar(pf.y(3))) self.assertEqual(0.5, pf.getvar(pf.z(3))) return def test_uij(self): - """check PdfFit.uij() - """ - ni = loadStructure(datafile('Ni.stru')) + """check PdfFit.uij()""" + ni = loadStructure(datafile("Ni.stru")) ni[2].anisotropy = True ni[2].U11, ni[2].U22, ni[2].U33 = 1, 2, 3 ni[2].U12, ni[2].U13, ni[2].U23 = 4, 5, 6 @@ -716,14 +694,14 @@ def test_uij(self): return def test_occ(self): - """check PdfFit.occ() - """ + """check PdfFit.occ()""" pf = self.P - pf.read_struct(datafile('Ni.stru')) + pf.read_struct(datafile("Ni.stru")) for i in range(1, 5): self.assertEqual(1, pf.getvar(pf.occ(i))) return + # def test_pscale(self): # """check PdfFit.pscale() # """ @@ -781,7 +759,7 @@ def test_occ(self): # End of class TestPdfFit -if __name__ == '__main__': +if __name__ == "__main__": unittest.main() # End of file diff --git a/diffpy/pdffit2/tests/TestPhaseFractions.py b/diffpy/pdffit2/tests/TestPhaseFractions.py index aa3b27e6..2bbebf76 100644 --- a/diffpy/pdffit2/tests/TestPhaseFractions.py +++ b/diffpy/pdffit2/tests/TestPhaseFractions.py @@ -16,10 +16,10 @@ class TestPhaseFractions(unittest.TestCase): def setUp(self): self.P = PdfFit() - self.P.read_struct(datafile('Ni.stru')) - self.P.read_struct(datafile('PbScW25TiO3.stru')) - self.P.alloc('X', 0.0, 0.05, 0.1, 10, 200) - self.P.alloc('N', 0.0, 0.05, 0.1, 10, 200) + self.P.read_struct(datafile("Ni.stru")) + self.P.read_struct(datafile("PbScW25TiO3.stru")) + self.P.alloc("X", 0.0, 0.05, 0.1, 10, 200) + self.P.alloc("N", 0.0, 0.05, 0.1, 10, 200) return def tearDown(self): @@ -27,83 +27,70 @@ def tearDown(self): return def test_xray_fractions(self): - """test_xray_fractions -- check phase fractions in x-ray dataset. - """ + """test_xray_fractions -- check phase fractions in x-ray dataset.""" self.P.setdata(1) ph = self.P.phase_fractions() - bb1 = 28**2 - bb2 = ((8*82 + 24*8 + 4*21 + 2*74 + 2*22) / 40.0)**2 - self.assertAlmostEqual(1.0, sum(ph['atom']), self.places) - self.assertAlmostEqual(1.0, sum(ph['cell']), self.places) - self.assertAlmostEqual(1.0, sum(ph['mass']), self.places) - self.assertAlmostEqual(bb2/bb1, - ph['atom'][0]/ph['atom'][1], self.places) - self.assertAlmostEqual(bb2/bb1 * 40.0/4.0, - ph['cell'][0]/ph['cell'][1], self.places) + bb1 = 28 ** 2 + bb2 = ((8 * 82 + 24 * 8 + 4 * 21 + 2 * 74 + 2 * 22) / 40.0) ** 2 + self.assertAlmostEqual(1.0, sum(ph["atom"]), self.places) + self.assertAlmostEqual(1.0, sum(ph["cell"]), self.places) + self.assertAlmostEqual(1.0, sum(ph["mass"]), self.places) + self.assertAlmostEqual(bb2 / bb1, ph["atom"][0] / ph["atom"][1], self.places) + self.assertAlmostEqual(bb2 / bb1 * 40.0 / 4.0, ph["cell"][0] / ph["cell"][1], self.places) mavg1 = 58.69 - mavg2 = (8*207.19 + 24*15.994 + 4*44.956 + 2*183.85 + 2*47.90)/40.0 - self.assertAlmostEqual(bb2/bb1 * mavg1/mavg2, - ph['mass'][0]/ph['mass'][1], self.places) - self.assertEqual(0.0, sum(ph['stdatom'])) - self.assertEqual(0.0, sum(ph['stdcell'])) - self.assertEqual(0.0, sum(ph['stdmass'])) + mavg2 = (8 * 207.19 + 24 * 15.994 + 4 * 44.956 + 2 * 183.85 + 2 * 47.90) / 40.0 + self.assertAlmostEqual(bb2 / bb1 * mavg1 / mavg2, ph["mass"][0] / ph["mass"][1], self.places) + self.assertEqual(0.0, sum(ph["stdatom"])) + self.assertEqual(0.0, sum(ph["stdcell"])) + self.assertEqual(0.0, sum(ph["stdmass"])) self.P.setphase(1) - self.P.setvar('pscale', 2.0) + self.P.setvar("pscale", 2.0) ph2 = self.P.phase_fractions() - self.assertAlmostEqual(1.0, sum(ph2['atom']), self.places) - self.assertAlmostEqual(1.0, sum(ph2['cell']), self.places) - self.assertAlmostEqual(1.0, sum(ph2['mass']), self.places) - self.assertAlmostEqual(2.0, ph2['atom'][0]/ph2['atom'][1] / - (ph['atom'][0]/ph['atom'][1]), self.places) - self.assertAlmostEqual(2.0, ph2['cell'][0]/ph2['cell'][1] / - (ph['cell'][0]/ph['cell'][1]), self.places) - self.assertAlmostEqual(2.0, ph2['mass'][0]/ph2['mass'][1] / - (ph['mass'][0]/ph['mass'][1]), self.places) + self.assertAlmostEqual(1.0, sum(ph2["atom"]), self.places) + self.assertAlmostEqual(1.0, sum(ph2["cell"]), self.places) + self.assertAlmostEqual(1.0, sum(ph2["mass"]), self.places) + self.assertAlmostEqual(2.0, ph2["atom"][0] / ph2["atom"][1] / (ph["atom"][0] / ph["atom"][1]), self.places) + self.assertAlmostEqual(2.0, ph2["cell"][0] / ph2["cell"][1] / (ph["cell"][0] / ph["cell"][1]), self.places) + self.assertAlmostEqual(2.0, ph2["mass"][0] / ph2["mass"][1] / (ph["mass"][0] / ph["mass"][1]), self.places) return def test_neutron_fractions(self): - """test_neutron_fractions -- check phase fractions in neutron dataset. - """ + """test_neutron_fractions -- check phase fractions in neutron dataset.""" self.P.setdata(2) ph = self.P.phase_fractions() - bb1 = 10.31**2 + bb1 = 10.31 ** 2 bPb = 9.4012 bO = 5.8054 bSc = 12.11 bW = 4.75518 bTi = -3.37013 - bb2 = ((8*bPb + 24*bO + 4*bSc + 2*bW + 2*bTi) / 40.0)**2 - self.assertAlmostEqual(1.0, sum(ph['atom']), self.places) - self.assertAlmostEqual(1.0, sum(ph['cell']), self.places) - self.assertAlmostEqual(1.0, sum(ph['mass']), self.places) - self.assertAlmostEqual(bb2/bb1, - ph['atom'][0]/ph['atom'][1], self.places) - self.assertAlmostEqual(bb2/bb1 * 40.0/4.0, - ph['cell'][0]/ph['cell'][1], self.places) + bb2 = ((8 * bPb + 24 * bO + 4 * bSc + 2 * bW + 2 * bTi) / 40.0) ** 2 + self.assertAlmostEqual(1.0, sum(ph["atom"]), self.places) + self.assertAlmostEqual(1.0, sum(ph["cell"]), self.places) + self.assertAlmostEqual(1.0, sum(ph["mass"]), self.places) + self.assertAlmostEqual(bb2 / bb1, ph["atom"][0] / ph["atom"][1], self.places) + self.assertAlmostEqual(bb2 / bb1 * 40.0 / 4.0, ph["cell"][0] / ph["cell"][1], self.places) mavg1 = 58.69 - mavg2 = (8*207.19 + 24*15.994 + 4*44.956 + 2*183.85 + 2*47.90)/40.0 - self.assertAlmostEqual(bb2/bb1 * mavg1/mavg2, - ph['mass'][0]/ph['mass'][1], self.places) - self.assertEqual(0.0, sum(ph['stdatom'])) - self.assertEqual(0.0, sum(ph['stdcell'])) - self.assertEqual(0.0, sum(ph['stdmass'])) + mavg2 = (8 * 207.19 + 24 * 15.994 + 4 * 44.956 + 2 * 183.85 + 2 * 47.90) / 40.0 + self.assertAlmostEqual(bb2 / bb1 * mavg1 / mavg2, ph["mass"][0] / ph["mass"][1], self.places) + self.assertEqual(0.0, sum(ph["stdatom"])) + self.assertEqual(0.0, sum(ph["stdcell"])) + self.assertEqual(0.0, sum(ph["stdmass"])) self.P.setphase(1) - self.P.setvar('pscale', 2.0) + self.P.setvar("pscale", 2.0) ph2 = self.P.phase_fractions() - self.assertAlmostEqual(1.0, sum(ph2['atom']), self.places) - self.assertAlmostEqual(1.0, sum(ph2['cell']), self.places) - self.assertAlmostEqual(1.0, sum(ph2['mass']), self.places) - self.assertAlmostEqual(2.0, ph2['atom'][0]/ph2['atom'][1] / - (ph['atom'][0]/ph['atom'][1]), self.places) - self.assertAlmostEqual(2.0, ph2['cell'][0]/ph2['cell'][1] / - (ph['cell'][0]/ph['cell'][1]), self.places) - self.assertAlmostEqual(2.0, ph2['mass'][0]/ph2['mass'][1] / - (ph['mass'][0]/ph['mass'][1]), self.places) + self.assertAlmostEqual(1.0, sum(ph2["atom"]), self.places) + self.assertAlmostEqual(1.0, sum(ph2["cell"]), self.places) + self.assertAlmostEqual(1.0, sum(ph2["mass"]), self.places) + self.assertAlmostEqual(2.0, ph2["atom"][0] / ph2["atom"][1] / (ph["atom"][0] / ph["atom"][1]), self.places) + self.assertAlmostEqual(2.0, ph2["cell"][0] / ph2["cell"][1] / (ph["cell"][0] / ph["cell"][1]), self.places) + self.assertAlmostEqual(2.0, ph2["mass"][0] / ph2["mass"][1] / (ph["mass"][0] / ph["mass"][1]), self.places) return + # End of class TestSphereEnvelope -if __name__ == '__main__': +if __name__ == "__main__": unittest.main() # End of file diff --git a/diffpy/pdffit2/tests/TestShapeFactors.py b/diffpy/pdffit2/tests/TestShapeFactors.py index 26e5bb46..9c870c4a 100644 --- a/diffpy/pdffit2/tests/TestShapeFactors.py +++ b/diffpy/pdffit2/tests/TestShapeFactors.py @@ -21,7 +21,7 @@ def spherefactor(r, d): Return numpy array of shape correction envelope. """ r1 = numpy.array(r) - fsph = 1.0 - 1.5*r1/d + 0.5*(r1/d)**3 + fsph = 1.0 - 1.5 * r1 / d + 0.5 * (r1 / d) ** 3 fsph[r1 > d] = 0.0 return fsph @@ -39,33 +39,29 @@ def tearDown(self): self.P = None return - def test_calculation(self): - """check calculation of sphere envelope factor - """ - self.P.read_struct(datafile('Ni.stru')) - self.P.alloc('X', 0.0, 0.05, 0.1, 10, 200) + """check calculation of sphere envelope factor""" + self.P.read_struct(datafile("Ni.stru")) + self.P.alloc("X", 0.0, 0.05, 0.1, 10, 200) self.P.calc() d = 8.0 r = numpy.array(self.P.getR()) G0 = numpy.array(self.P.getpdf_fit()) - self.P.setvar('spdiameter', d) + self.P.setvar("spdiameter", d) self.P.calc() G1 = numpy.array(self.P.getpdf_fit()) - dG = (G0*spherefactor(r, d) - G1) - msd = numpy.dot(dG, dG)/len(r) + dG = G0 * spherefactor(r, d) - G1 + msd = numpy.dot(dG, dG) / len(r) self.assertAlmostEqual(0.0, numpy.sqrt(msd), self.places) return - def test_refinement(self): - """check refinement of sphere envelope factor - """ + """check refinement of sphere envelope factor""" dcheck = 8.0 dstart = 12.0 - self.P.read_struct(datafile('Ni.stru')) - self.P.alloc('X', 0.0, 0.05, 0.1, 10, 200) - self.P.setvar('spdiameter', dcheck) + self.P.read_struct(datafile("Ni.stru")) + self.P.alloc("X", 0.0, 0.05, 0.1, 10, 200) + self.P.setvar("spdiameter", dcheck) self.P.calc() r = numpy.array(self.P.getR()) Gd8 = numpy.array(self.P.getpdf_fit()) @@ -73,65 +69,61 @@ def test_refinement(self): Gd8noise[::2] += 0.01 Gd8noise[1::2] -= 0.01 self.P.reset() - self.P.read_struct(datafile('Ni.stru')) - self.P.read_data_lists('X', 0.0, 0.05, list(r), list(Gd8noise)) - self.P.constrain('spdiameter', '@8') + self.P.read_struct(datafile("Ni.stru")) + self.P.read_data_lists("X", 0.0, 0.05, list(r), list(Gd8noise)) + self.P.constrain("spdiameter", "@8") self.P.setpar(8, dstart) self.P.refine() - dfinal = self.P.getvar('spdiameter') + dfinal = self.P.getvar("spdiameter") self.assertAlmostEqual(dcheck, dfinal, 3) return - def test_twophase_calculation(self): - """check PDF calculation for 2 phases with different spdiameters - """ + """check PDF calculation for 2 phases with different spdiameters""" d1 = 6 d2 = 9 - self.P.read_struct(datafile('Ni.stru')) - self.P.alloc('X', 0.0, 0.05, 0.1, 10, 200) - self.P.setvar('spdiameter', d1) + self.P.read_struct(datafile("Ni.stru")) + self.P.alloc("X", 0.0, 0.05, 0.1, 10, 200) + self.P.setvar("spdiameter", d1) self.P.calc() G1 = numpy.array(self.P.getpdf_fit()) self.P.reset() - self.P.read_struct(datafile('PbScW25TiO3.stru')) - self.P.alloc('X', 0.0, 0.05, 0.1, 10, 200) - self.P.setvar('spdiameter', d2) + self.P.read_struct(datafile("PbScW25TiO3.stru")) + self.P.alloc("X", 0.0, 0.05, 0.1, 10, 200) + self.P.setvar("spdiameter", d2) self.P.calc() G2 = numpy.array(self.P.getpdf_fit()) self.P.reset() - self.P.read_struct(datafile('Ni.stru')) - self.P.read_struct(datafile('PbScW25TiO3.stru')) - self.P.alloc('X', 0.0, 0.05, 0.1, 10, 200) + self.P.read_struct(datafile("Ni.stru")) + self.P.read_struct(datafile("PbScW25TiO3.stru")) + self.P.alloc("X", 0.0, 0.05, 0.1, 10, 200) self.P.setphase(1) - self.P.setvar('spdiameter', d1) + self.P.setvar("spdiameter", d1) self.P.setphase(2) - self.P.setvar('spdiameter', d2) + self.P.setvar("spdiameter", d2) self.P.calc() Gtot = numpy.array(self.P.getpdf_fit()) - dG = (G1 + G2 - Gtot) + dG = G1 + G2 - Gtot r = numpy.array(self.P.getR()) - msd = numpy.dot(dG, dG)/len(r) + msd = numpy.dot(dG, dG) / len(r) self.assertAlmostEqual(0.0, numpy.sqrt(msd), self.places) return - def test_twophase_refinement(self): - """check PDF refinement of 2 phases that have different spdiameter. - """ + """check PDF refinement of 2 phases that have different spdiameter.""" dcheck1 = 8.0 dstart1 = 8.2 dcheck2 = 6.0 dstart2 = 5.5 - self.P.read_struct(datafile('Ni.stru')) - self.P.alloc('X', 0.0, 0.05, 0.1, 10, 200) - self.P.setvar('spdiameter', dcheck1) + self.P.read_struct(datafile("Ni.stru")) + self.P.alloc("X", 0.0, 0.05, 0.1, 10, 200) + self.P.setvar("spdiameter", dcheck1) self.P.calc() G1 = numpy.array(self.P.getpdf_fit()) self.P.reset() - self.P.read_struct(datafile('PbScW25TiO3.stru')) - self.P.alloc('X', 0.0, 0.05, 0.1, 10, 200) - self.P.setvar('spdiameter', dcheck2) + self.P.read_struct(datafile("PbScW25TiO3.stru")) + self.P.alloc("X", 0.0, 0.05, 0.1, 10, 200) + self.P.setvar("spdiameter", dcheck2) self.P.calc() G2 = numpy.array(self.P.getpdf_fit()) r = numpy.array(self.P.getR()) @@ -139,48 +131,46 @@ def test_twophase_refinement(self): Gnoise[::2] += 0.01 Gnoise[1::2] -= 0.01 self.P.reset() - self.P.read_struct(datafile('Ni.stru')) - self.P.read_struct(datafile('PbScW25TiO3.stru')) - self.P.read_data_lists('X', 0.0, 0.05, list(r), list(Gnoise)) + self.P.read_struct(datafile("Ni.stru")) + self.P.read_struct(datafile("PbScW25TiO3.stru")) + self.P.read_data_lists("X", 0.0, 0.05, list(r), list(Gnoise)) self.P.setphase(1) - self.P.constrain('spdiameter', '@11') + self.P.constrain("spdiameter", "@11") self.P.setphase(2) - self.P.constrain('spdiameter', '@12') + self.P.constrain("spdiameter", "@12") self.P.setpar(11, dstart1) self.P.setpar(12, dstart2) self.P.refine() - dfinal2 = self.P.getvar('spdiameter') + dfinal2 = self.P.getvar("spdiameter") self.P.setphase(1) - dfinal1 = self.P.getvar('spdiameter') + dfinal1 = self.P.getvar("spdiameter") self.assertAlmostEqual(dcheck1, dfinal1, 3) self.assertAlmostEqual(dcheck2, dfinal2, 3) return - def test_spdiameter_io(self): - """Check reading and writing of spdiameter from structure file. - """ + """Check reading and writing of spdiameter from structure file.""" import re - self.P.read_struct(datafile('Ni.stru')) - self.assertEqual(0.0, self.P.getvar('spdiameter')) + + self.P.read_struct(datafile("Ni.stru")) + self.assertEqual(0.0, self.P.getvar("spdiameter")) # engine should not write shape factor when not defined spdnone = self.P.save_struct_string(1) - self.assertTrue(not re.search('(?m)^shape +sphere,', spdnone)) - self.P.setvar('spdiameter', 7) + self.assertTrue(not re.search("(?m)^shape +sphere,", spdnone)) + self.P.setvar("spdiameter", 7) spd7 = self.P.save_struct_string(1) # spd7 should contain shape factor data - self.assertTrue(re.search('(?m)^shape +sphere,', spd7)) + self.assertTrue(re.search("(?m)^shape +sphere,", spd7)) self.P.reset() self.P.read_struct_string(spd7) - self.assertEqual(7.0, self.P.getvar('spdiameter')) + self.assertEqual(7.0, self.P.getvar("spdiameter")) # try to read without comma - spd14 = re.sub('(?m)^shape +sphere.*$', 'shape sphere 14.00', spd7) + spd14 = re.sub("(?m)^shape +sphere.*$", "shape sphere 14.00", spd7) self.P.read_struct_string(spd14) - self.assertEqual(14.0, self.P.getvar('spdiameter')) + self.assertEqual(14.0, self.P.getvar("spdiameter")) # try to read invalid shape data - sinvalid = re.sub('(?m)^shape .*', 'shape invalid, 1', spd7) - self.assertRaises(pdffit2.structureError, - self.P.read_struct_string, sinvalid) + sinvalid = re.sub("(?m)^shape .*", "shape invalid, 1", spd7) + self.assertRaises(pdffit2.structureError, self.P.read_struct_string, sinvalid) return @@ -200,91 +190,85 @@ def tearDown(self): self.P = None return - def test_stepcut_calculation(self): - """check calculation of sphere envelope factor - """ - self.P.read_struct(datafile('Ni.stru')) - self.P.alloc('X', 0.0, 0.05, 0.1, 10, 200) + """check calculation of sphere envelope factor""" + self.P.read_struct(datafile("Ni.stru")) + self.P.alloc("X", 0.0, 0.05, 0.1, 10, 200) self.P.calc() stepcut = 8.0 r = numpy.array(self.P.getR()) G0 = numpy.array(self.P.getpdf_fit()) G0[r > stepcut] = 0.0 - self.P.setvar('stepcut', stepcut) + self.P.setvar("stepcut", stepcut) self.P.calc() G1 = numpy.array(self.P.getpdf_fit()) - dG = (G0 - G1) - msd = numpy.dot(dG, dG)/len(r) + dG = G0 - G1 + msd = numpy.dot(dG, dG) / len(r) self.assertAlmostEqual(0.0, numpy.sqrt(msd), self.places) return - def test_twophase_stepcut_calculation(self): - """check PDF calculation for 2 phases with different spdiameters - """ + """check PDF calculation for 2 phases with different spdiameters""" d1 = 6 d2 = 9 - self.P.read_struct(datafile('Ni.stru')) - self.P.alloc('X', 0.0, 0.05, 0.1, 10, 200) - self.P.setvar('stepcut', d1) + self.P.read_struct(datafile("Ni.stru")) + self.P.alloc("X", 0.0, 0.05, 0.1, 10, 200) + self.P.setvar("stepcut", d1) self.P.calc() G1 = numpy.array(self.P.getpdf_fit()) self.P.reset() - self.P.read_struct(datafile('PbScW25TiO3.stru')) - self.P.alloc('X', 0.0, 0.05, 0.1, 10, 200) - self.P.setvar('stepcut', d2) + self.P.read_struct(datafile("PbScW25TiO3.stru")) + self.P.alloc("X", 0.0, 0.05, 0.1, 10, 200) + self.P.setvar("stepcut", d2) self.P.calc() G2 = numpy.array(self.P.getpdf_fit()) self.P.reset() - self.P.read_struct(datafile('Ni.stru')) - self.P.read_struct(datafile('PbScW25TiO3.stru')) - self.P.alloc('X', 0.0, 0.05, 0.1, 10, 200) + self.P.read_struct(datafile("Ni.stru")) + self.P.read_struct(datafile("PbScW25TiO3.stru")) + self.P.alloc("X", 0.0, 0.05, 0.1, 10, 200) self.P.setphase(1) - self.P.setvar('stepcut', d1) + self.P.setvar("stepcut", d1) self.P.setphase(2) - self.P.setvar('stepcut', d2) + self.P.setvar("stepcut", d2) self.P.calc() Gtot = numpy.array(self.P.getpdf_fit()) - dG = (G1 + G2 - Gtot) + dG = G1 + G2 - Gtot r = numpy.array(self.P.getR()) - msd = numpy.dot(dG, dG)/len(r) + msd = numpy.dot(dG, dG) / len(r) self.assertAlmostEqual(0.0, numpy.sqrt(msd), self.places) # G after step should be zero self.assertTrue(numpy.all(0 == Gtot[r > max(d1, d2)])) return - def test_stepcut_io(self): - """Check reading and writing of stepcut from structure file. - """ + """Check reading and writing of stepcut from structure file.""" import re - self.P.read_struct(datafile('Ni.stru')) - self.assertEqual(0.0, self.P.getvar('stepcut')) + + self.P.read_struct(datafile("Ni.stru")) + self.assertEqual(0.0, self.P.getvar("stepcut")) # engine should not write shape factor when not defined sscnone = self.P.save_struct_string(1) - self.assertTrue(not re.search('(?m)^shape +stepcut,', sscnone)) - self.P.setvar('stepcut', 7) + self.assertTrue(not re.search("(?m)^shape +stepcut,", sscnone)) + self.P.setvar("stepcut", 7) ssc7 = self.P.save_struct_string(1) # ssc7 should contain shape factor data - self.assertTrue(re.search('(?m)^shape +stepcut,', ssc7)) + self.assertTrue(re.search("(?m)^shape +stepcut,", ssc7)) self.P.reset() self.P.read_struct_string(ssc7) - self.assertEqual(7.0, self.P.getvar('stepcut')) + self.assertEqual(7.0, self.P.getvar("stepcut")) # try to read without comma - ssc14 = re.sub('(?m)^shape +stepcut.*$', 'shape stepcut 14.00', ssc7) + ssc14 = re.sub("(?m)^shape +stepcut.*$", "shape stepcut 14.00", ssc7) self.P.read_struct_string(ssc14) - self.assertEqual(14.0, self.P.getvar('stepcut')) + self.assertEqual(14.0, self.P.getvar("stepcut")) # try to read invalid shape data - sinvalid = re.sub('(?m)^shape .*', 'shape invalid, 1', ssc7) - self.assertRaises(pdffit2.structureError, - self.P.read_struct_string, sinvalid) + sinvalid = re.sub("(?m)^shape .*", "shape invalid, 1", ssc7) + self.assertRaises(pdffit2.structureError, self.P.read_struct_string, sinvalid) return # End of class TestStepCutEnvelope -if __name__ == '__main__': +if __name__ == "__main__": unittest.main() # End of file diff --git a/diffpy/pdffit2/tests/__init__.py b/diffpy/pdffit2/tests/__init__.py index 4a21417c..8eca524f 100644 --- a/diffpy/pdffit2/tests/__init__.py +++ b/diffpy/pdffit2/tests/__init__.py @@ -18,8 +18,9 @@ import unittest -def testsuite(pattern=''): - '''Create a unit tests suite for the diffpy.pdffit2 package. + +def testsuite(pattern=""): + """Create a unit tests suite for the diffpy.pdffit2 package. Parameters ---------- @@ -32,30 +33,30 @@ def testsuite(pattern=''): ------- suite : `unittest.TestSuite` The TestSuite object containing the matching tests. - ''' + """ import re from os.path import dirname from itertools import chain from pkg_resources import resource_filename + loader = unittest.defaultTestLoader - thisdir = resource_filename(__name__, '') - depth = __name__.count('.') + 1 + thisdir = resource_filename(__name__, "") + depth = __name__.count(".") + 1 topdir = thisdir for i in range(depth): topdir = dirname(topdir) - suite_all = loader.discover(thisdir, pattern='*Test*.py', - top_level_dir=topdir) + suite_all = loader.discover(thisdir, pattern="*Test*.py", top_level_dir=topdir) # always filter the suite by pattern to test-cover the selection code. suite = unittest.TestSuite() rx = re.compile(pattern) tsuites = list(chain.from_iterable(suite_all)) tsok = all(isinstance(ts, unittest.TestSuite) for ts in tsuites) - if not tsok: # pragma: no cover + if not tsok: # pragma: no cover return suite_all tcases = chain.from_iterable(tsuites) for tc in tcases: - tcwords = tc.id().split('.') - shortname = '.'.join(tcwords[-3:]) + tcwords = tc.id().split(".") + shortname = ".".join(tcwords[-3:]) if rx.search(shortname): suite.addTest(tc) # verify all tests are found for an empty pattern. @@ -64,12 +65,12 @@ def testsuite(pattern=''): def test(): - '''Execute all unit tests for the diffpy.pdffit2 package. + """Execute all unit tests for the diffpy.pdffit2 package. Returns ------- result : `unittest.TestResult` - ''' + """ suite = testsuite() runner = unittest.TextTestRunner() result = runner.run(suite) @@ -77,17 +78,18 @@ def test(): def testdeps(): - '''Execute all unit tests for diffpy.pdffit2 and its dependencies. + """Execute all unit tests for diffpy.pdffit2 and its dependencies. Returns ------- result : `unittest.TestResult` - ''' + """ from importlib import import_module - modulenames = ''' + + modulenames = """ diffpy.pdffit2.tests diffpy.structure.tests - '''.split() + """.split() suite = unittest.TestSuite() for mname in modulenames: mod = import_module(mname) diff --git a/diffpy/pdffit2/tests/debug.py b/diffpy/pdffit2/tests/debug.py index be6e48e4..b99602d4 100644 --- a/diffpy/pdffit2/tests/debug.py +++ b/diffpy/pdffit2/tests/debug.py @@ -23,10 +23,11 @@ """ -if __name__ == '__main__': +if __name__ == "__main__": import sys from diffpy.pdffit2.tests import testsuite - pattern = sys.argv[1] if len(sys.argv) > 1 else '' + + pattern = sys.argv[1] if len(sys.argv) > 1 else "" suite = testsuite(pattern) suite.debug() diff --git a/diffpy/pdffit2/tests/pdffit2testutils.py b/diffpy/pdffit2/tests/pdffit2testutils.py index 18dabf11..c2d82948 100644 --- a/diffpy/pdffit2/tests/pdffit2testutils.py +++ b/diffpy/pdffit2/tests/pdffit2testutils.py @@ -23,22 +23,21 @@ import diffpy.pdffit2 # silence the C++ engine output -diffpy.pdffit2.redirect_stdout(open(os.path.devnull, 'w')) +diffpy.pdffit2.redirect_stdout(open(os.path.devnull, "w")) # path variables -thisfile = locals().get('__file__', 'file.py') +thisfile = locals().get("__file__", "file.py") tests_dir = os.path.dirname(os.path.abspath(thisfile)) -testdata_dir = os.path.join(tests_dir, 'testdata') +testdata_dir = os.path.join(tests_dir, "testdata") + def datafile(filename): - """prepend testdata_dir to filename. - """ + """prepend testdata_dir to filename.""" return os.path.join(testdata_dir, filename) def capture_output(f, *args, **kwargs): - """Capture output from pdffit2 engine produced in function call. - """ + """Capture output from pdffit2 engine produced in function call.""" savestdout = diffpy.pdffit2.output.stdout fp = six.StringIO() diffpy.pdffit2.redirect_stdout(fp) @@ -48,4 +47,5 @@ def capture_output(f, *args, **kwargs): diffpy.pdffit2.redirect_stdout(savestdout) return fp.getvalue() + # End of file diff --git a/diffpy/pdffit2/tests/run.py b/diffpy/pdffit2/tests/run.py index 8519454c..7eb6aadd 100644 --- a/diffpy/pdffit2/tests/run.py +++ b/diffpy/pdffit2/tests/run.py @@ -19,15 +19,18 @@ """ -if __name__ == '__main__': +if __name__ == "__main__": import sys + # show warnings by default if not sys.warnoptions: import os, warnings + warnings.simplefilter("default") # also affect subprocesses os.environ["PYTHONWARNINGS"] = "default" from diffpy.pdffit2.tests import test + # produce zero exit code for a successful test sys.exit(not test().wasSuccessful()) diff --git a/diffpy/pdffit2/tests/rundeps.py b/diffpy/pdffit2/tests/rundeps.py index 9e3c5ee9..420c4d6f 100644 --- a/diffpy/pdffit2/tests/rundeps.py +++ b/diffpy/pdffit2/tests/rundeps.py @@ -19,9 +19,10 @@ """ -if __name__ == '__main__': +if __name__ == "__main__": import sys from diffpy.pdffit2.tests import testdeps + # produce zero exit code for a successful test sys.exit(not testdeps().wasSuccessful()) diff --git a/diffpy/pdffit2/version.py b/diffpy/pdffit2/version.py index e77b09d0..098dcde1 100644 --- a/diffpy/pdffit2/version.py +++ b/diffpy/pdffit2/version.py @@ -22,7 +22,7 @@ Use `__git_commit__` instead. """ -__all__ = ['__date__', '__git_commit__', '__timestamp__', '__version__'] +__all__ = ["__date__", "__git_commit__", "__timestamp__", "__version__"] import os.path @@ -30,22 +30,22 @@ # obtain version information from the version.cfg file -cp = dict(version='', date='', commit='', timestamp='0') -fcfg = resource_filename(__name__, 'version.cfg') -if not os.path.isfile(fcfg): # pragma: no cover +cp = dict(version="", date="", commit="", timestamp="0") +fcfg = resource_filename(__name__, "version.cfg") +if not os.path.isfile(fcfg): # pragma: no cover from warnings import warn + warn('Package metadata not found, execute "./setup.py egg_info".') fcfg = os.devnull with open(fcfg) as fp: - kwords = [[w.strip() for w in line.split(' = ', 1)] - for line in fp if line[:1].isalpha() and ' = ' in line] + kwords = [[w.strip() for w in line.split(" = ", 1)] for line in fp if line[:1].isalpha() and " = " in line] assert all(w[0] in cp for w in kwords), "received unrecognized keyword" cp.update(kwords) -__version__ = cp['version'] -__date__ = cp['date'] -__git_commit__ = cp['commit'] -__timestamp__ = int(cp['timestamp']) +__version__ = cp["version"] +__date__ = cp["date"] +__git_commit__ = cp["commit"] +__timestamp__ = int(cp["timestamp"]) # TODO remove deprecated __gitsha__ in version 1.3. __gitsha__ = __git_commit__ From 18944da4b3cfd8db81e1b73d3951696805a5fb5a Mon Sep 17 00:00:00 2001 From: Sam Andrello Date: Tue, 16 Jul 2024 11:44:05 -0400 Subject: [PATCH 005/104] Run black on full package --- conda-recipe/run_test.py | 1 + examples/Ni_calculation.py | 8 +- examples/Ni_plot_pdf.py | 15 ++- examples/Ni_refinement.py | 32 ++--- setup.py | 256 +++++++++++++++++++------------------ 5 files changed, 158 insertions(+), 154 deletions(-) diff --git a/conda-recipe/run_test.py b/conda-recipe/run_test.py index f7099645..1432eed6 100644 --- a/conda-recipe/run_test.py +++ b/conda-recipe/run_test.py @@ -1,4 +1,5 @@ #!/usr/bin/env python import diffpy.pdffit2.tests + assert diffpy.pdffit2.tests.test().wasSuccessful() diff --git a/examples/Ni_calculation.py b/examples/Ni_calculation.py index bfe1e941..fd789c56 100755 --- a/examples/Ni_calculation.py +++ b/examples/Ni_calculation.py @@ -1,7 +1,7 @@ #!/usr/bin/env python -'''Calculate PDF of FCC nickel. Save data to Ni_calculation.cgr. -''' +"""Calculate PDF of FCC nickel. Save data to Ni_calculation.cgr. +""" from diffpy.pdffit2 import PdfFit @@ -11,9 +11,9 @@ # load structure file in PDFFIT or DISCUS format P.read_struct("Ni.stru") -radiation_type = 'X' # x-rays +radiation_type = "X" # x-rays qmax = 30.0 # Q-cutoff used in PDF calculation in 1/A -qdamp = 0.01 # instrument Q-resolution factor, responsible for PDF decay +qdamp = 0.01 # instrument Q-resolution factor, responsible for PDF decay rmin = 0.01 # minimum r-value rmax = 30.0 # maximum r-value npts = 3000 # number of points in the r-grid diff --git a/examples/Ni_plot_pdf.py b/examples/Ni_plot_pdf.py index f6019d2a..9b1fd4ad 100755 --- a/examples/Ni_plot_pdf.py +++ b/examples/Ni_plot_pdf.py @@ -1,8 +1,8 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -'''Calculate PDF of FCC nickel and plot it using matplotlib. -''' +"""Calculate PDF of FCC nickel and plot it using matplotlib. +""" from diffpy.pdffit2 import PdfFit @@ -12,9 +12,9 @@ # load structure file in PDFFIT or DISCUS format P.read_struct("Ni.stru") -radiation_type = 'X' # x-rays +radiation_type = "X" # x-rays qmax = 30.0 # Q-cutoff used in PDF calculation in 1/A -qdamp = 0.01 # instrument Q-resolution factor, responsible for PDF decay +qdamp = 0.01 # instrument Q-resolution factor, responsible for PDF decay rmin = 0.01 # minimum r-value rmax = 30.0 # maximum r-value npts = 3000 # number of points in the r-grid @@ -29,10 +29,11 @@ # pylab is matplotlib interface with MATLAB-like plotting commands import pylab + pylab.plot(r, G) -pylab.xlabel(u'r (Å)') -pylab.ylabel(u'G (Å$^{-2}$)') -pylab.title('x-ray PDF of nickel simulated at Qmax = %g' % qmax) +pylab.xlabel(u"r (Å)") +pylab.ylabel(u"G (Å$^{-2}$)") +pylab.title("x-ray PDF of nickel simulated at Qmax = %g" % qmax) # display plot window, this must be the last command in the script pylab.show() diff --git a/examples/Ni_refinement.py b/examples/Ni_refinement.py index 177659d2..2a467cde 100755 --- a/examples/Ni_refinement.py +++ b/examples/Ni_refinement.py @@ -1,9 +1,9 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -'''Perform simple refinement of Ni structure to the experimental x-ray PDF. +"""Perform simple refinement of Ni structure to the experimental x-ray PDF. Save fitted curve, refined structure and results summary. -''' +""" from diffpy.pdffit2 import PdfFit @@ -14,11 +14,11 @@ # Load experimental x-ray PDF data qmax = 30.0 # Q-cutoff used in PDF calculation in 1/A -qdamp = 0.01 # instrument Q-resolution factor, responsible for PDF decay -pf.read_data('Ni-xray.gr', 'X', qmax, qdamp) +qdamp = 0.01 # instrument Q-resolution factor, responsible for PDF decay +pf.read_data("Ni-xray.gr", "X", qmax, qdamp) # Load nickel structure, must be in PDFFIT or DISCUS format -pf.read_struct('Ni.stru') +pf.read_struct("Ni.stru") # Configure Refinement ------------------------------------------------------- @@ -31,12 +31,12 @@ pf.setpar(1, pf.lat(1)) # Refine phase scale factor. Right side can have formulas. -pf.constrain('pscale', '@20 * 2') +pf.constrain("pscale", "@20 * 2") pf.setpar(20, pf.getvar(pf.pscale) / 2.0) # Refine PDF damping due to instrument Q-resolution. # Left side can be also passed as a reference to PdfFit object -pf.constrain(pf.qdamp, '@21') +pf.constrain(pf.qdamp, "@21") pf.setpar(21, 0.03) # Refine sharpening factor for correlated motion of close atoms. @@ -45,9 +45,9 @@ # Set all temperature factors isotropic and equal to @4 for idx in range(1, 5): - pf.constrain(pf.u11(idx), '@4') - pf.constrain(pf.u22(idx), '@4') - pf.constrain(pf.u33(idx), '@4') + pf.constrain(pf.u11(idx), "@4") + pf.constrain(pf.u22(idx), "@4") + pf.constrain(pf.u33(idx), "@4") pf.setpar(4, pf.u11(1)) # Refine --------------------------------------------------------------------- @@ -76,13 +76,13 @@ Gdiff = pylab.array(Gobs) - pylab.array(Gfit) Gdiff_baseline = -10 -pylab.plot(r, Gobs, 'ko') -pylab.plot(r, Gfit, 'b-') -pylab.plot(r, Gdiff + Gdiff_baseline, 'r-') +pylab.plot(r, Gobs, "ko") +pylab.plot(r, Gfit, "b-") +pylab.plot(r, Gdiff + Gdiff_baseline, "r-") -pylab.xlabel(u'r (Å)') -pylab.ylabel(u'G (Å$^{-2}$)') -pylab.title('Fit of nickel to x-ray experimental PDF') +pylab.xlabel(u"r (Å)") +pylab.ylabel(u"G (Å$^{-2}$)") +pylab.title("Fit of nickel to x-ray experimental PDF") # display plot window, this must be the last command in the script pylab.show() diff --git a/setup.py b/setup.py index bb6bb72a..70e6c6d5 100755 --- a/setup.py +++ b/setup.py @@ -18,29 +18,30 @@ # Use this version when git data are not available, like in git zip archive. # Update when tagging a new release. -FALLBACK_VERSION = '1.4.2' +FALLBACK_VERSION = "1.4.2" # determine if we run with Python 3. -PY3 = (sys.version_info[0] == 3) +PY3 = sys.version_info[0] == 3 # versioncfgfile holds version data for git commit hash and date. # It must reside in the same directory as version.py. MYDIR = os.path.dirname(os.path.abspath(__file__)) -versioncfgfile = os.path.join(MYDIR, 'diffpy/pdffit2/version.cfg') -gitarchivecfgfile = os.path.join(MYDIR, '.gitarchive.cfg') +versioncfgfile = os.path.join(MYDIR, "diffpy/pdffit2/version.cfg") +gitarchivecfgfile = os.path.join(MYDIR, ".gitarchive.cfg") def gitinfo(): from subprocess import Popen, PIPE, check_output + kw = dict(stdout=PIPE, cwd=MYDIR, universal_newlines=True) - proc = Popen(['git', 'describe', '--tags', '--match=[v,V,[:digit:]]*'], **kw) + proc = Popen(["git", "describe", "--tags", "--match=[v,V,[:digit:]]*"], **kw) desc = proc.stdout.read() - proc = Popen(['git', 'log', '-1', '--format=%H %ct %ci'], **kw) + proc = Popen(["git", "log", "-1", "--format=%H %ct %ci"], **kw) glog = proc.stdout.read() rv = {} - rv['commit'], rv['timestamp'], rv['date'] = glog.strip().split(None, 2) - version = '.post'.join(desc.strip().split('-')[:2]).lstrip('vV') - rv['version'] = version + rv["commit"], rv["timestamp"], rv["date"] = glog.strip().split(None, 2) + version = ".post".join(desc.strip().split("-")[:2]).lstrip("vV") + rv["version"] = version return rv @@ -49,19 +50,19 @@ def getversioncfg(): from configparser import RawConfigParser else: from ConfigParser import RawConfigParser - vd0 = dict(version=FALLBACK_VERSION, commit='', date='', timestamp=0) + vd0 = dict(version=FALLBACK_VERSION, commit="", date="", timestamp=0) # first fetch data from gitarchivecfgfile, ignore if it is unexpanded g = vd0.copy() cp0 = RawConfigParser(vd0) cp0.read(gitarchivecfgfile) - if len(cp0.get('DEFAULT', 'commit')) > 20: + if len(cp0.get("DEFAULT", "commit")) > 20: g = cp0.defaults() - mx = re.search(r'\btag: [vV]?(\d[^,]*)', g.pop('refnames')) + mx = re.search(r"\btag: [vV]?(\d[^,]*)", g.pop("refnames")) if mx: - g['version'] = mx.group(1) + g["version"] = mx.group(1) # then try to obtain version data from git. - gitdir = os.path.join(MYDIR, '.git') - if os.path.exists(gitdir) or 'GIT_DIR' in os.environ: + gitdir = os.path.join(MYDIR, ".git") + if os.path.exists(gitdir) or "GIT_DIR" in os.environ: try: g = gitinfo() except OSError: @@ -71,40 +72,39 @@ def getversioncfg(): cp = RawConfigParser() cp.read(versioncfgfile) d = cp.defaults() - rewrite = not d or (g['commit'] and ( - g['version'] != d.get('version') or g['commit'] != d.get('commit'))) + rewrite = not d or (g["commit"] and (g["version"] != d.get("version") or g["commit"] != d.get("commit"))) if rewrite: - cp.set('DEFAULT', 'version', g['version']) - cp.set('DEFAULT', 'commit', g['commit']) - cp.set('DEFAULT', 'date', g['date']) - cp.set('DEFAULT', 'timestamp', g['timestamp']) - with open(versioncfgfile, 'w') as fp: + cp.set("DEFAULT", "version", g["version"]) + cp.set("DEFAULT", "commit", g["commit"]) + cp.set("DEFAULT", "date", g["date"]) + cp.set("DEFAULT", "timestamp", g["timestamp"]) + with open(versioncfgfile, "w") as fp: cp.write(fp) return cp + versiondata = getversioncfg() # Helper functions ----------------------------------------------------------- + def get_compiler_type(): - """find compiler used for building extensions. - """ - cc_arg = [a for a in sys.argv if a.startswith('--compiler=')] + """find compiler used for building extensions.""" + cc_arg = [a for a in sys.argv if a.startswith("--compiler=")] if cc_arg: - compiler_type = cc_arg[-1].split('=', 1)[1] + compiler_type = cc_arg[-1].split("=", 1)[1] else: from distutils.ccompiler import new_compiler + compiler_type = new_compiler().compiler_type return compiler_type def get_gsl_config(): - '''Return dictionary with paths to GSL library. - ''' - gslcfgpaths = [os.path.join(p, 'gsl-config') - for p in ([MYDIR] + os.environ['PATH'].split(os.pathsep))] + """Return dictionary with paths to GSL library.""" + gslcfgpaths = [os.path.join(p, "gsl-config") for p in ([MYDIR] + os.environ["PATH"].split(os.pathsep))] gslcfgpaths = [p for p in gslcfgpaths if os.path.isfile(p)] - rv = {'include_dirs': [], 'library_dirs': []} + rv = {"include_dirs": [], "library_dirs": []} if not gslcfgpaths: wmsg = "Cannot find gsl-config in {!r} nor in system PATH." warnings.warn(wmsg.format(MYDIR)) @@ -112,41 +112,43 @@ def get_gsl_config(): gslcfg = gslcfgpaths[0] with open(gslcfg) as fp: txt = fp.read() - mprefix = re.search('(?m)^prefix=(.+)', txt) - minclude = re.search(r'(?m)^[^#]*\s-I(\S+)', txt) - mlibpath = re.search(r'(?m)^[^#]*\s-L(\S+)', txt) + mprefix = re.search("(?m)^prefix=(.+)", txt) + minclude = re.search(r"(?m)^[^#]*\s-I(\S+)", txt) + mlibpath = re.search(r"(?m)^[^#]*\s-L(\S+)", txt) if not mprefix: emsg = "Cannot find 'prefix=' line in {}." raise RuntimeError(emsg.format(gslcfg)) p = mprefix.group(1) - inc = minclude.group(1) if minclude else (p + '/include') - lib = mlibpath.group(1) if mlibpath else (p + '/lib') - rv['include_dirs'] += [inc] - rv['library_dirs'] += [lib] + inc = minclude.group(1) if minclude else (p + "/include") + lib = mlibpath.group(1) if mlibpath else (p + "/lib") + rv["include_dirs"] += [inc] + rv["library_dirs"] += [lib] return rv + def get_gsl_config_win(): - '''Return dictionary with paths to GSL library, windwows version. - This version is installed with conda. - ''' - conda_prefix = os.environ['CONDA_PREFIX'] - inc = os.path.join(conda_prefix, 'Library', 'include') - lib = os.path.join(conda_prefix, 'Library', 'lib') - rv = {'include_dirs': [], 'library_dirs': []} - rv['include_dirs'] += [inc] - rv['library_dirs'] += [lib] + """Return dictionary with paths to GSL library, windwows version. + This version is installed with conda. + """ + conda_prefix = os.environ["CONDA_PREFIX"] + inc = os.path.join(conda_prefix, "Library", "include") + lib = os.path.join(conda_prefix, "Library", "lib") + rv = {"include_dirs": [], "library_dirs": []} + rv["include_dirs"] += [inc] + rv["library_dirs"] += [lib] return rv + # ---------------------------------------------------------------------------- # compile and link options define_macros = [] os_name = os.name -if os_name == 'nt': +if os_name == "nt": gcfg = get_gsl_config_win() else: gcfg = get_gsl_config() -include_dirs = [MYDIR] + gcfg['include_dirs'] +include_dirs = [MYDIR] + gcfg["include_dirs"] library_dirs = [] libraries = [] extra_objects = [] @@ -155,102 +157,102 @@ def get_gsl_config_win(): compiler_type = get_compiler_type() if compiler_type in ("unix", "cygwin", "mingw32"): - extra_compile_args = ['-std=c++11', '-Wall', '-Wno-write-strings', - '-O3', '-funroll-loops', '-ffast-math'] - extra_objects += ((p + '/libgsl.a') for p in gcfg['library_dirs']) + extra_compile_args = ["-std=c++11", "-Wall", "-Wno-write-strings", "-O3", "-funroll-loops", "-ffast-math"] + extra_objects += ((p + "/libgsl.a") for p in gcfg["library_dirs"]) elif compiler_type == "msvc": - define_macros += [('_USE_MATH_DEFINES', None)] - extra_compile_args = ['/EHs'] - libraries += ['gsl'] - library_dirs += gcfg['library_dirs'] + define_macros += [("_USE_MATH_DEFINES", None)] + extra_compile_args = ["/EHs"] + libraries += ["gsl"] + library_dirs += gcfg["library_dirs"] # add optimization flags for other compilers if needed # define extension here -pdffit2module = Extension('diffpy.pdffit2.pdffit2', [ - 'pdffit2module/bindings.cc', - 'pdffit2module/misc.cc', - 'pdffit2module/pdffit2module.cc', - 'pdffit2module/pyexceptions.cc', - 'libpdffit2/Atom.cc', - 'libpdffit2/LocalPeriodicTable.cc', - 'libpdffit2/OutputStreams.cc', - 'libpdffit2/PeriodicTable.cc', - 'libpdffit2/PointsInSphere.cc', - 'libpdffit2/StringUtils.cc', - 'libpdffit2/fit.cc', - 'libpdffit2/gaussj.cc', - 'libpdffit2/metric.cc', - 'libpdffit2/nrutil.cc', - 'libpdffit2/output.cc', - 'libpdffit2/parser.cc', - 'libpdffit2/pdf.cc', - 'libpdffit2/pdffit.cc', - 'libpdffit2/pdflsmin.cc', - 'libpdffit2/scatlen.cc', - 'libpdffit2/stru.cc', - ], - include_dirs = include_dirs, - libraries = libraries, - library_dirs = library_dirs, - define_macros = define_macros, - extra_compile_args = extra_compile_args, - extra_link_args = extra_link_args, - extra_objects = extra_objects, +pdffit2module = Extension( + "diffpy.pdffit2.pdffit2", + [ + "pdffit2module/bindings.cc", + "pdffit2module/misc.cc", + "pdffit2module/pdffit2module.cc", + "pdffit2module/pyexceptions.cc", + "libpdffit2/Atom.cc", + "libpdffit2/LocalPeriodicTable.cc", + "libpdffit2/OutputStreams.cc", + "libpdffit2/PeriodicTable.cc", + "libpdffit2/PointsInSphere.cc", + "libpdffit2/StringUtils.cc", + "libpdffit2/fit.cc", + "libpdffit2/gaussj.cc", + "libpdffit2/metric.cc", + "libpdffit2/nrutil.cc", + "libpdffit2/output.cc", + "libpdffit2/parser.cc", + "libpdffit2/pdf.cc", + "libpdffit2/pdffit.cc", + "libpdffit2/pdflsmin.cc", + "libpdffit2/scatlen.cc", + "libpdffit2/stru.cc", + ], + include_dirs=include_dirs, + libraries=libraries, + library_dirs=library_dirs, + define_macros=define_macros, + extra_compile_args=extra_compile_args, + extra_link_args=extra_link_args, + extra_objects=extra_objects, ) -with open(os.path.join(MYDIR, 'README.rst')) as fp: +with open(os.path.join(MYDIR, "README.rst")) as fp: long_description = fp.read() # define distribution setup_args = dict( - name = 'diffpy.pdffit2', - version = versiondata.get('DEFAULT', 'version'), - packages = find_packages(), - test_suite = 'diffpy.pdffit2.tests', - ext_modules = [pdffit2module], - include_package_data = True, - install_requires = [ - 'six', - 'diffpy.structure>=3', + name="diffpy.pdffit2", + version=versiondata.get("DEFAULT", "version"), + packages=find_packages(), + test_suite="diffpy.pdffit2.tests", + ext_modules=[pdffit2module], + include_package_data=True, + install_requires=[ + "six", + "diffpy.structure>=3", ], - zip_safe = False, - - author = 'Simon J.L. Billinge', - author_email = 'sb2896@columbia.edu', - maintainer = 'Pavol Juhas', - maintainer_email = 'pavol.juhas@gmail.com', - url = 'https://github.com/diffpy/diffpy.pdffit2', - description = 'PDFfit2 - real space structure refinement program.', - long_description = long_description, - long_description_content_type = 'text/x-rst', - license = 'BSD', - keywords = 'PDF structure refinement', - classifiers = [ + zip_safe=False, + author="Simon J.L. Billinge", + author_email="sb2896@columbia.edu", + maintainer="Pavol Juhas", + maintainer_email="pavol.juhas@gmail.com", + url="https://github.com/diffpy/diffpy.pdffit2", + description="PDFfit2 - real space structure refinement program.", + long_description=long_description, + long_description_content_type="text/x-rst", + license="BSD", + keywords="PDF structure refinement", + classifiers=[ # List of possible values at # http://pypi.python.org/pypi?:action=list_classifiers - 'Development Status :: 5 - Production/Stable', - 'Environment :: Console', - 'Intended Audience :: Science/Research', - 'License :: OSI Approved :: BSD License', - 'Operating System :: MacOS', - 'Operating System :: Microsoft :: Windows', - 'Operating System :: POSIX', - 'Programming Language :: C++', - 'Programming Language :: Python :: 2.7', - 'Programming Language :: Python :: 3.7', - 'Programming Language :: Python :: 3.8', - 'Programming Language :: Python :: 3.9', - 'Programming Language :: Python :: 3.10', - 'Programming Language :: Python :: 3.11', - 'Programming Language :: Python :: 3.12', - 'Topic :: Scientific/Engineering :: Chemistry', - 'Topic :: Scientific/Engineering :: Physics', + "Development Status :: 5 - Production/Stable", + "Environment :: Console", + "Intended Audience :: Science/Research", + "License :: OSI Approved :: BSD License", + "Operating System :: MacOS", + "Operating System :: Microsoft :: Windows", + "Operating System :: POSIX", + "Programming Language :: C++", + "Programming Language :: Python :: 2.7", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Topic :: Scientific/Engineering :: Chemistry", + "Topic :: Scientific/Engineering :: Physics", ], ) -if __name__ == '__main__': +if __name__ == "__main__": setup(**setup_args) # End of file From ff5140df48b4b5873555200143e1ac42eb53e5e7 Mon Sep 17 00:00:00 2001 From: Sam Andrello Date: Tue, 16 Jul 2024 11:45:18 -0400 Subject: [PATCH 006/104] Add flake8 config --- .flake8 | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 .flake8 diff --git a/.flake8 b/.flake8 new file mode 100644 index 00000000..076b9924 --- /dev/null +++ b/.flake8 @@ -0,0 +1,11 @@ +[flake8] +exclude = + .git, + __pycache__, + build, + dist, + doc/source/conf.py +max-line-length = 115 +# Ignore some style 'errors' produced while formatting by 'black' +# https://black.readthedocs.io/en/stable/guides/using_black_with_other_tools.html#labels-why-pycodestyle-warnings +extend-ignore = E203 \ No newline at end of file From 7d76d7dac6c324f70bc038151fbe17a37daf3e08 Mon Sep 17 00:00:00 2001 From: Sam Andrello Date: Tue, 16 Jul 2024 11:56:13 -0400 Subject: [PATCH 007/104] flake8 fixes --- diffpy/pdffit2/pdffit.py | 4 ++-- diffpy/pdffit2/tests/TestPdfFit.py | 5 ++--- diffpy/pdffit2/tests/TestPhaseFractions.py | 3 +-- diffpy/pdffit2/tests/run.py | 3 ++- examples/Ni_plot_pdf.py | 3 +-- examples/Ni_refinement.py | 4 ++-- setup.py | 2 +- 7 files changed, 11 insertions(+), 13 deletions(-) diff --git a/diffpy/pdffit2/pdffit.py b/diffpy/pdffit2/pdffit.py index e39b6694..cb4f82c9 100644 --- a/diffpy/pdffit2/pdffit.py +++ b/diffpy/pdffit2/pdffit.py @@ -29,6 +29,7 @@ from diffpy.pdffit2 import pdffit2 from diffpy.pdffit2 import output + # helper routines @@ -147,7 +148,7 @@ def intro(): date = __date__[:10] d = {"version": __version__, "date": date, "year": date[:4] or "2019"} msg = __intro_message__ % d - filler = lambda mx: (mx.group(0).rstrip(" *").ljust(77) + "*") + def filler(mx): return mx.group(0).rstrip(" *").ljust(77) + "*" msg_ljust = re.sub("(?m)^(.{1,77}|.{79}.*)$", filler, msg) print(msg_ljust, file=output.stdout) return @@ -1287,7 +1288,6 @@ def __getRef(self, var_string): retval = f(self._handle, arg_int) return retval - # End of class PdfFit diff --git a/diffpy/pdffit2/tests/TestPdfFit.py b/diffpy/pdffit2/tests/TestPdfFit.py index 8102b8b9..43dd2085 100644 --- a/diffpy/pdffit2/tests/TestPdfFit.py +++ b/diffpy/pdffit2/tests/TestPdfFit.py @@ -3,7 +3,6 @@ """Unit tests for PdfFit.py """ - import unittest from diffpy.structure import loadStructure @@ -12,11 +11,11 @@ from diffpy.pdffit2 import pdffit2 from diffpy.pdffit2.tests.pdffit2testutils import datafile, capture_output + # ---------------------------------------------------------------------------- class TestPdfFit(unittest.TestCase): - places = 6 def setUp(self): @@ -291,7 +290,7 @@ def test_num_datasets(self): # failed data should not increase num_datasets try: self.P.read_data(datafile("badNi.dat")) - except: + except (ValueError, IOError): pass self.assertEqual(1, self.P.num_datasets()) # alloc should increase number of datasets diff --git a/diffpy/pdffit2/tests/TestPhaseFractions.py b/diffpy/pdffit2/tests/TestPhaseFractions.py index 2bbebf76..0b90a703 100644 --- a/diffpy/pdffit2/tests/TestPhaseFractions.py +++ b/diffpy/pdffit2/tests/TestPhaseFractions.py @@ -3,15 +3,14 @@ """Unit tests for phase fraction calculations. """ - import unittest from diffpy.pdffit2 import PdfFit from diffpy.pdffit2.tests.pdffit2testutils import datafile + ############################################################################## class TestPhaseFractions(unittest.TestCase): - places = 4 def setUp(self): diff --git a/diffpy/pdffit2/tests/run.py b/diffpy/pdffit2/tests/run.py index 7eb6aadd..790e018d 100644 --- a/diffpy/pdffit2/tests/run.py +++ b/diffpy/pdffit2/tests/run.py @@ -24,7 +24,8 @@ # show warnings by default if not sys.warnoptions: - import os, warnings + import os + import warnings warnings.simplefilter("default") # also affect subprocesses diff --git a/examples/Ni_plot_pdf.py b/examples/Ni_plot_pdf.py index 9b1fd4ad..1f8cb97d 100755 --- a/examples/Ni_plot_pdf.py +++ b/examples/Ni_plot_pdf.py @@ -5,6 +5,7 @@ """ from diffpy.pdffit2 import PdfFit +import pylab # create new PDF calculator object P = PdfFit() @@ -28,8 +29,6 @@ G = P.getpdf_fit() # pylab is matplotlib interface with MATLAB-like plotting commands -import pylab - pylab.plot(r, G) pylab.xlabel(u"r (Å)") pylab.ylabel(u"G (Å$^{-2}$)") diff --git a/examples/Ni_refinement.py b/examples/Ni_refinement.py index 2a467cde..11f6f1ec 100755 --- a/examples/Ni_refinement.py +++ b/examples/Ni_refinement.py @@ -6,6 +6,8 @@ """ from diffpy.pdffit2 import PdfFit +import pylab + # Create new PDF calculator object. pf = PdfFit() @@ -64,8 +66,6 @@ # Plot results --------------------------------------------------------------- # pylab is matplotlib interface with MATLAB-like plotting commands -import pylab - # obtain data from PdfFit calculator object r = pf.getR() Gobs = pf.getpdf_obs() diff --git a/setup.py b/setup.py index 70e6c6d5..6a32d3b1 100755 --- a/setup.py +++ b/setup.py @@ -31,7 +31,7 @@ def gitinfo(): - from subprocess import Popen, PIPE, check_output + from subprocess import Popen, PIPE kw = dict(stdout=PIPE, cwd=MYDIR, universal_newlines=True) proc = Popen(["git", "describe", "--tags", "--match=[v,V,[:digit:]]*"], **kw) From db1e93630a83e20ea276803988792150fd24c798 Mon Sep 17 00:00:00 2001 From: Sam Andrello Date: Tue, 16 Jul 2024 12:14:06 -0400 Subject: [PATCH 008/104] add further error catching to test_num_datasets --- diffpy/pdffit2/tests/TestPdfFit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/diffpy/pdffit2/tests/TestPdfFit.py b/diffpy/pdffit2/tests/TestPdfFit.py index 43dd2085..0a7e944c 100644 --- a/diffpy/pdffit2/tests/TestPdfFit.py +++ b/diffpy/pdffit2/tests/TestPdfFit.py @@ -290,7 +290,7 @@ def test_num_datasets(self): # failed data should not increase num_datasets try: self.P.read_data(datafile("badNi.dat")) - except (ValueError, IOError): + except (RuntimeError, TypeError, NameError, ValueError, IOError): pass self.assertEqual(1, self.P.num_datasets()) # alloc should increase number of datasets From 3577bf0be3819f4677d26a0e0a8c3d82ef74d49e Mon Sep 17 00:00:00 2001 From: Sam Andrello Date: Tue, 16 Jul 2024 13:04:10 -0400 Subject: [PATCH 009/104] pre-commit fixes --- .flake8 | 2 +- .github/workflows/build.yaml | 2 +- .pre-commit-config.yaml | 43 + CHANGELOG.md | 2 +- devutils/makesdist | 38 +- diffpy/pdffit2/ipy_ext.py | 1 - diffpy/pdffit2/pdffit.py | 6 +- diffpy/pdffit2/tests/ExceptionsTest.py | 3 +- diffpy/pdffit2/tests/TestPdfFit.py | 11 +- diffpy/pdffit2/tests/TestPhaseFractions.py | 4 +- diffpy/pdffit2/tests/__init__.py | 3 +- diffpy/pdffit2/tests/debug.py | 1 + diffpy/pdffit2/tests/pdffit2testutils.py | 2 + diffpy/pdffit2/tests/rundeps.py | 1 + diffpy/pdffit2/tests/testdata/300K.gr | 14 +- diffpy/pdffit2/version.py | 1 - examples/Ni-xray.gr | 4006 ++++++++++---------- examples/Ni_plot_pdf.py | 4 +- examples/Ni_refinement.py | 4 +- pyproject.toml | 2 +- setup.py | 2 +- 21 files changed, 2102 insertions(+), 2050 deletions(-) create mode 100644 .pre-commit-config.yaml diff --git a/.flake8 b/.flake8 index 076b9924..2d2cb168 100644 --- a/.flake8 +++ b/.flake8 @@ -8,4 +8,4 @@ exclude = max-line-length = 115 # Ignore some style 'errors' produced while formatting by 'black' # https://black.readthedocs.io/en/stable/guides/using_black_with_other_tools.html#labels-why-pycodestyle-warnings -extend-ignore = E203 \ No newline at end of file +extend-ignore = E203 diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 82adbdc8..9f8369e5 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -59,7 +59,7 @@ jobs: # This step will upload tagged commits to pypi. # The pypi token must be added to GH secrets - # + # # - name: Publish package # if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') # uses: pypa/gh-action-pypi-publish@release/v1 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 00000000..377da527 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,43 @@ +default_language_version: + python: python3 +ci: + autofix_commit_msg: | + [pre-commit.ci] auto fixes from pre-commit hooks + autofix_prs: true + autoupdate_branch: 'pre-commit-autoupdate' + autoupdate_commit_msg: '[pre-commit.ci] pre-commit autoupdate' + autoupdate_schedule: monthly + skip: [no-commit-to-branch] + submodules: false +repos: + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.6.0 + hooks: + - id: check-yaml + - id: end-of-file-fixer + - id: trailing-whitespace + exclude: '\.(rst|txt)$' + - repo: https://github.com/psf/black + rev: 24.4.2 + hooks: + - id: black + - repo: https://github.com/pycqa/flake8 + rev: 7.0.0 + hooks: + - id: flake8 + - repo: https://github.com/pycqa/isort + rev: 5.13.2 + hooks: + - id: isort + args: ["--profile", "black"] + - repo: https://github.com/kynan/nbstripout + rev: 0.7.1 + hooks: + - id: nbstripout + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.4.0 + hooks: + - id: no-commit-to-branch + name: Prevent Commit to Main Branch + args: ["--branch", "main"] + #stages: [pre-commit] \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index b77944e4..b101ecc6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,5 +13,5 @@ No notable functional changes from 1.4.1 ### Deprecated ### Removed - + ### Fixed diff --git a/devutils/makesdist b/devutils/makesdist index 6aaae616..e77257ea 100755 --- a/devutils/makesdist +++ b/devutils/makesdist @@ -1,51 +1,57 @@ #!/usr/bin/env python -'''Create source distribution tar.gz archive, where each file belongs +"""Create source distribution tar.gz archive, where each file belongs to a root user and modification time is set to the git commit time. -''' +""" -import sys +import glob +import gzip import os import subprocess -import glob +import sys import tarfile -import gzip BASEDIR = os.path.dirname(os.path.dirname(os.path.realpath(__file__))) sys.path.insert(0, BASEDIR) -from setup import versiondata, FALLBACK_VERSION -timestamp = versiondata.getint('DEFAULT', 'timestamp') +from setup import FALLBACK_VERSION, versiondata -vfb = versiondata.get('DEFAULT', 'version').split('.post')[0] + '.post0' +timestamp = versiondata.getint("DEFAULT", "timestamp") + +vfb = versiondata.get("DEFAULT", "version").split(".post")[0] + ".post0" emsg = "Invalid FALLBACK_VERSION. Expected %r got %r." assert vfb == FALLBACK_VERSION, emsg % (vfb, FALLBACK_VERSION) + def inform(s): sys.stdout.write(s) sys.stdout.flush() return + inform('Run "setup.py sdist --formats=tar" ') -cmd_sdist = [sys.executable] + 'setup.py sdist --formats=tar'.split() -ec = subprocess.call(cmd_sdist, cwd=BASEDIR, stdout=open(os.devnull, 'w')) -if ec: sys.exit(ec) +cmd_sdist = [sys.executable] + "setup.py sdist --formats=tar".split() +ec = subprocess.call(cmd_sdist, cwd=BASEDIR, stdout=open(os.devnull, "w")) +if ec: + sys.exit(ec) inform("[done]\n") -tarname = max(glob.glob(BASEDIR + '/dist/*.tar'), key=os.path.getmtime) +tarname = max(glob.glob(BASEDIR + "/dist/*.tar"), key=os.path.getmtime) tfin = tarfile.open(tarname) -fpout = gzip.GzipFile(tarname + '.gz', 'w', mtime=0) -tfout = tarfile.open(fileobj=fpout, mode='w') +fpout = gzip.GzipFile(tarname + ".gz", "w", mtime=0) +tfout = tarfile.open(fileobj=fpout, mode="w") + def fixtarinfo(tinfo): tinfo.uid = tinfo.gid = 0 - tinfo.uname = tinfo.gname = 'root' + tinfo.uname = tinfo.gname = "root" tinfo.mtime = timestamp tinfo.mode &= ~0o022 return tinfo -inform('Filter %s --> %s.gz ' % (2 * (os.path.basename(tarname),))) + +inform("Filter %s --> %s.gz " % (2 * (os.path.basename(tarname),))) for ti in tfin: tfout.addfile(fixtarinfo(ti), tfin.extractfile(ti)) diff --git a/diffpy/pdffit2/ipy_ext.py b/diffpy/pdffit2/ipy_ext.py index df8bc537..dd96b7bf 100644 --- a/diffpy/pdffit2/ipy_ext.py +++ b/diffpy/pdffit2/ipy_ext.py @@ -54,7 +54,6 @@ def showfit(self, offset=None): No return value. """ from matplotlib.pyplot import gca - from math import floor cr = self.r cGobs = self.Gobs diff --git a/diffpy/pdffit2/pdffit.py b/diffpy/pdffit2/pdffit.py index cb4f82c9..43685ad1 100644 --- a/diffpy/pdffit2/pdffit.py +++ b/diffpy/pdffit2/pdffit.py @@ -148,7 +148,10 @@ def intro(): date = __date__[:10] d = {"version": __version__, "date": date, "year": date[:4] or "2019"} msg = __intro_message__ % d - def filler(mx): return mx.group(0).rstrip(" *").ljust(77) + "*" + + def filler(mx): + return mx.group(0).rstrip(" *").ljust(77) + "*" + msg_ljust = re.sub("(?m)^(.{1,77}|.{79}.*)$", filler, msg) print(msg_ljust, file=output.stdout) return @@ -1288,6 +1291,7 @@ def __getRef(self, var_string): retval = f(self._handle, arg_int) return retval + # End of class PdfFit diff --git a/diffpy/pdffit2/tests/ExceptionsTest.py b/diffpy/pdffit2/tests/ExceptionsTest.py index a88decbe..5dee1b75 100644 --- a/diffpy/pdffit2/tests/ExceptionsTest.py +++ b/diffpy/pdffit2/tests/ExceptionsTest.py @@ -16,8 +16,7 @@ import unittest -from diffpy.pdffit2 import PdfFit -from diffpy.pdffit2 import pdffit2 +from diffpy.pdffit2 import PdfFit, pdffit2 from diffpy.pdffit2.tests.pdffit2testutils import datafile diff --git a/diffpy/pdffit2/tests/TestPdfFit.py b/diffpy/pdffit2/tests/TestPdfFit.py index 0a7e944c..70712356 100644 --- a/diffpy/pdffit2/tests/TestPdfFit.py +++ b/diffpy/pdffit2/tests/TestPdfFit.py @@ -5,13 +5,10 @@ import unittest +from diffpy.pdffit2 import PdfFit, pdffit2 +from diffpy.pdffit2.tests.pdffit2testutils import capture_output, datafile from diffpy.structure import loadStructure -from diffpy.pdffit2 import PdfFit -from diffpy.pdffit2 import pdffit2 -from diffpy.pdffit2.tests.pdffit2testutils import datafile, capture_output - - # ---------------------------------------------------------------------------- @@ -324,7 +321,7 @@ def test_getcrw(self): self.assertAlmostEqual(self.P.getrw(), rw19, self.places) # renormalize cumulative Rw and compare with Rw at r=15 Gobs19 = numpy.array(self.P.getpdf_obs()) - Gnorm19 = numpy.sqrt(numpy.sum(Gobs19 ** 2)) + Gnorm19 = numpy.sqrt(numpy.sum(Gobs19**2)) r = numpy.array(self.P.getR()) idx = numpy.nonzero(r <= 15)[0] Gnorm15 = numpy.sqrt(numpy.sum(Gobs19[idx] ** 2)) @@ -353,7 +350,7 @@ def test_getcrw_two_datasets(self): rw1 = self.P.getcrw()[-1] self.P.setdata(2) rw2 = self.P.getcrw()[-1] - self.assertAlmostEqual(rwtot ** 2, rw1 ** 2 + rw2 ** 2, self.places) + self.assertAlmostEqual(rwtot**2, rw1**2 + rw2**2, self.places) return # def test_getpar(self): diff --git a/diffpy/pdffit2/tests/TestPhaseFractions.py b/diffpy/pdffit2/tests/TestPhaseFractions.py index 0b90a703..afc57c06 100644 --- a/diffpy/pdffit2/tests/TestPhaseFractions.py +++ b/diffpy/pdffit2/tests/TestPhaseFractions.py @@ -29,7 +29,7 @@ def test_xray_fractions(self): """test_xray_fractions -- check phase fractions in x-ray dataset.""" self.P.setdata(1) ph = self.P.phase_fractions() - bb1 = 28 ** 2 + bb1 = 28**2 bb2 = ((8 * 82 + 24 * 8 + 4 * 21 + 2 * 74 + 2 * 22) / 40.0) ** 2 self.assertAlmostEqual(1.0, sum(ph["atom"]), self.places) self.assertAlmostEqual(1.0, sum(ph["cell"]), self.places) @@ -57,7 +57,7 @@ def test_neutron_fractions(self): """test_neutron_fractions -- check phase fractions in neutron dataset.""" self.P.setdata(2) ph = self.P.phase_fractions() - bb1 = 10.31 ** 2 + bb1 = 10.31**2 bPb = 9.4012 bO = 5.8054 bSc = 12.11 diff --git a/diffpy/pdffit2/tests/__init__.py b/diffpy/pdffit2/tests/__init__.py index 8eca524f..e01060cf 100644 --- a/diffpy/pdffit2/tests/__init__.py +++ b/diffpy/pdffit2/tests/__init__.py @@ -35,8 +35,9 @@ def testsuite(pattern=""): The TestSuite object containing the matching tests. """ import re - from os.path import dirname from itertools import chain + from os.path import dirname + from pkg_resources import resource_filename loader = unittest.defaultTestLoader diff --git a/diffpy/pdffit2/tests/debug.py b/diffpy/pdffit2/tests/debug.py index b99602d4..83074005 100644 --- a/diffpy/pdffit2/tests/debug.py +++ b/diffpy/pdffit2/tests/debug.py @@ -25,6 +25,7 @@ if __name__ == "__main__": import sys + from diffpy.pdffit2.tests import testsuite pattern = sys.argv[1] if len(sys.argv) > 1 else "" diff --git a/diffpy/pdffit2/tests/pdffit2testutils.py b/diffpy/pdffit2/tests/pdffit2testutils.py index c2d82948..ce61aa16 100644 --- a/diffpy/pdffit2/tests/pdffit2testutils.py +++ b/diffpy/pdffit2/tests/pdffit2testutils.py @@ -19,7 +19,9 @@ import os.path + import six + import diffpy.pdffit2 # silence the C++ engine output diff --git a/diffpy/pdffit2/tests/rundeps.py b/diffpy/pdffit2/tests/rundeps.py index 420c4d6f..038475ae 100644 --- a/diffpy/pdffit2/tests/rundeps.py +++ b/diffpy/pdffit2/tests/rundeps.py @@ -21,6 +21,7 @@ if __name__ == "__main__": import sys + from diffpy.pdffit2.tests import testdeps # produce zero exit code for a successful test diff --git a/diffpy/pdffit2/tests/testdata/300K.gr b/diffpy/pdffit2/tests/testdata/300K.gr index 7a6c0968..15578911 100644 --- a/diffpy/pdffit2/tests/testdata/300K.gr +++ b/diffpy/pdffit2/tests/testdata/300K.gr @@ -1,5 +1,5 @@ History written: Fri Apr 30 13:05:36 2004 -produced by +produced by ##### Run Information runCorrection=T prep=gsas machine=npdf run=300K background=npdf_00907 @@ -27,12 +27,12 @@ density= effDensity=3.4138 ##### Banks=6 deltaQ=0.01 matchRef=0 matchScal=T matchOffset=T bank angle blendQmin blendQmax (0.0 means no info) - 1 90.0 1.62 29.42 - 2 -90.0 1.62 29.42 - 3 119.0 1.97 35.85 - 4 -119.0 1.97 35.85 - 5 148.0 2.20 40.00 - 6 -148.0 2.20 40.00 + 1 90.0 1.62 29.42 + 2 -90.0 1.62 29.42 + 3 119.0 1.97 35.85 + 4 -119.0 1.97 35.85 + 5 148.0 2.20 40.00 + 6 -148.0 2.20 40.00 ##### Program Specific Information ## Ft calcError=1 (1 for true, 0 for false) diff --git a/diffpy/pdffit2/version.py b/diffpy/pdffit2/version.py index 098dcde1..0e60302c 100644 --- a/diffpy/pdffit2/version.py +++ b/diffpy/pdffit2/version.py @@ -28,7 +28,6 @@ from pkg_resources import resource_filename - # obtain version information from the version.cfg file cp = dict(version="", date="", commit="", timestamp="0") fcfg = resource_filename(__name__, "version.cfg") diff --git a/examples/Ni-xray.gr b/examples/Ni-xray.gr index 14193844..76b7a94f 100644 --- a/examples/Ni-xray.gr +++ b/examples/Ni-xray.gr @@ -26,7 +26,7 @@ sambkgfile= num_sambkgs=1 confile= num_cons=1 conbkgfile= num_conbkgs=1 det# used xcol detcol deterrcol xmin xmax add_det mul_det add_bkg mul_bkg add_con mul_con add_conbkg mul_conbkg - 0 1 0 1 3 0.00000 35.0000 0.00000 1.00000 0.00000 0.998691 0.00000 1.00000 0.00000 1.00000 + 0 1 0 1 3 0.00000 35.0000 0.00000 1.00000 0.00000 0.998691 0.00000 1.00000 0.00000 1.00000 ##### Experiment_Setup title=Ni at 300K with MAR345 Image Plate at 6-ID-DAPS Synchrotron @@ -128,2007 +128,2007 @@ gropttype=OptFq miscdatatype=AtomASF ##### start data #F Ni_2-8.chi.gr #D Tue Feb 8 11:46:14 2005 -#C +#C #S 1 G(r) -#D +#D #L r G(r) d_r d_Gr - 1.000000e-02 -7.734561e-02 -1.381170e-02 3.134926e-02 - 2.000000e-02 -1.596764e-01 -2.762339e-02 6.045792e-02 - 3.000000e-02 -2.516875e-01 -4.143509e-02 8.526468e-02 - 4.000000e-02 -3.575096e-01 -5.524679e-02 1.040541e-01 - 5.000000e-02 -4.804651e-01 -6.905849e-02 1.155991e-01 - 6.000000e-02 -6.228668e-01 -8.287018e-02 1.192732e-01 - 7.000000e-02 -7.858705e-01 -9.668188e-02 1.151330e-01 - 8.000000e-02 -9.693874e-01 -1.104936e-01 1.039918e-01 - 9.000000e-02 -1.172061e+00 -1.243053e-01 8.755577e-02 - 1.000000e-01 -1.391306e+00 -1.381170e-01 6.884717e-02 - 1.100000e-01 -1.623409e+00 -1.519287e-01 5.341991e-02 - 1.200000e-01 -1.863680e+00 -1.657404e-01 4.979434e-02 - 1.300000e-01 -2.106649e+00 -1.795521e-01 6.017895e-02 - 1.400000e-01 -2.346295e+00 -1.933638e-01 7.640497e-02 - 1.500000e-01 -2.576293e+00 -2.071755e-01 9.161881e-02 - 1.600000e-01 -2.790268e+00 -2.209872e-01 1.024655e-01 - 1.700000e-01 -2.982047e+00 -2.347989e-01 1.074539e-01 - 1.800000e-01 -3.145891e+00 -2.486105e-01 1.062389e-01 - 1.900000e-01 -3.276707e+00 -2.624222e-01 9.942805e-02 - 2.000000e-01 -3.370223e+00 -2.762339e-01 8.860376e-02 - 2.100000e-01 -3.423130e+00 -2.900456e-01 7.650761e-02 - 2.200000e-01 -3.433181e+00 -3.038573e-01 6.719764e-02 - 2.300000e-01 -3.399254e+00 -3.176690e-01 6.493149e-02 - 2.400000e-01 -3.321377e+00 -3.314807e-01 7.061632e-02 - 2.500000e-01 -3.200715e+00 -3.452924e-01 8.074527e-02 - 2.600000e-01 -3.039527e+00 -3.591041e-01 9.101665e-02 - 2.700000e-01 -2.841094e+00 -3.729158e-01 9.850821e-02 - 2.800000e-01 -2.609626e+00 -3.867275e-01 1.017102e-01 - 2.900000e-01 -2.350147e+00 -4.005392e-01 1.002266e-01 - 3.000000e-01 -2.068363e+00 -4.143509e-01 9.462396e-02 - 3.100000e-01 -1.770519e+00 -4.281626e-01 8.640470e-02 - 3.200000e-01 -1.463237e+00 -4.419743e-01 7.800773e-02 - 3.300000e-01 -1.153355e+00 -4.557860e-01 7.249483e-02 - 3.400000e-01 -8.477479e-01 -4.695977e-01 7.224522e-02 - 3.500000e-01 -5.531450e-01 -4.834094e-01 7.713224e-02 - 3.600000e-01 -2.759477e-01 -4.972211e-01 8.467203e-02 - 3.700000e-01 -2.204310e-02 -5.110328e-01 9.195493e-02 - 3.800000e-01 2.033757e-01 -5.248445e-01 9.686320e-02 - 3.900000e-01 3.959788e-01 -5.386562e-01 9.828977e-02 - 4.000000e-01 5.524508e-01 -5.524679e-01 9.606310e-02 - 4.100000e-01 6.706182e-01 -5.662796e-01 9.087598e-02 - 4.200000e-01 7.495432e-01 -5.800913e-01 8.423689e-02 - 4.300000e-01 7.895774e-01 -5.939030e-01 7.831796e-02 - 4.400000e-01 7.923692e-01 -6.077147e-01 7.538431e-02 - 4.500000e-01 7.608195e-01 -6.215264e-01 7.662821e-02 - 4.600000e-01 6.989824e-01 -6.353381e-01 8.131523e-02 - 4.700000e-01 6.119129e-01 -6.491498e-01 8.737928e-02 - 4.800000e-01 5.054623e-01 -6.629615e-01 9.267455e-02 - 4.900000e-01 3.860302e-01 -6.767732e-01 9.569092e-02 - 5.000000e-01 2.602819e-01 -6.905849e-01 9.573000e-02 - 5.100000e-01 1.348438e-01 -7.043966e-01 9.289354e-02 - 5.200000e-01 1.599279e-02 -7.182083e-01 8.803723e-02 - 5.300000e-01 -9.064421e-02 -7.320200e-01 8.267435e-02 - 5.400000e-01 -1.803637e-01 -7.458316e-01 7.868367e-02 - 5.500000e-01 -2.496148e-01 -7.596433e-01 7.762463e-02 - 5.600000e-01 -2.961697e-01 -7.734550e-01 7.986113e-02 - 5.700000e-01 -3.192238e-01 -7.872667e-01 8.433275e-02 - 5.800000e-01 -3.194177e-01 -8.010784e-01 8.926692e-02 - 5.900000e-01 -2.987769e-01 -8.148901e-01 9.303294e-02 - 6.000000e-01 -2.605717e-01 -8.287018e-01 9.458206e-02 - 6.100000e-01 -2.091040e-01 -8.425135e-01 9.356811e-02 - 6.200000e-01 -1.494329e-01 -8.563252e-01 9.034444e-02 - 6.300000e-01 -8.705466e-02 -8.701369e-01 8.590452e-02 - 6.400000e-01 -2.755745e-02 -8.839486e-01 8.171553e-02 - 6.500000e-01 2.372868e-02 -8.977603e-01 7.931299e-02 - 6.600000e-01 6.206366e-02 -9.115720e-01 7.962749e-02 - 6.700000e-01 8.359014e-02 -9.253837e-01 8.244920e-02 - 6.800000e-01 8.556789e-02 -9.391954e-01 8.658046e-02 - 6.900000e-01 6.653458e-02 -9.530071e-01 9.051104e-02 - 7.000000e-01 2.638255e-02 -9.668188e-01 9.300732e-02 - 7.100000e-01 -3.365350e-02 -9.806305e-01 9.339048e-02 - 7.200000e-01 -1.110967e-01 -9.944422e-01 9.161189e-02 - 7.300000e-01 -2.024086e-01 -1.008254e+00 8.823550e-02 - 7.400000e-01 -3.032383e-01 -1.022066e+00 8.434109e-02 - 7.500000e-01 -4.087215e-01 -1.035877e+00 8.127899e-02 - 7.600000e-01 -5.138097e-01 -1.049689e+00 8.019975e-02 - 7.700000e-01 -6.136058e-01 -1.063501e+00 8.149425e-02 - 7.800000e-01 -7.036833e-01 -1.077312e+00 8.457797e-02 - 7.900000e-01 -7.803670e-01 -1.091124e+00 8.824255e-02 - 8.000000e-01 -8.409562e-01 -1.104936e+00 9.123004e-02 - 8.100000e-01 -8.838756e-01 -1.118747e+00 9.263856e-02 - 8.200000e-01 -9.087437e-01 -1.132559e+00 9.209884e-02 - 8.300000e-01 -9.163567e-01 -1.146371e+00 8.981209e-02 - 8.400000e-01 -9.085893e-01 -1.160183e+00 8.650416e-02 - 8.500000e-01 -8.882216e-01 -1.173994e+00 8.327654e-02 - 8.600000e-01 -8.587063e-01 -1.187806e+00 8.129051e-02 - 8.700000e-01 -8.238944e-01 -1.201618e+00 8.129498e-02 - 8.800000e-01 -7.877398e-01 -1.215429e+00 8.324441e-02 - 8.900000e-01 -7.540061e-01 -1.229241e+00 8.633665e-02 - 9.000000e-01 -7.259969e-01 -1.243053e+00 8.943578e-02 - 9.100000e-01 -7.063286e-01 -1.256864e+00 9.152907e-02 - 9.200000e-01 -6.967632e-01 -1.270676e+00 9.200378e-02 - 9.300000e-01 -6.981108e-01 -1.284488e+00 9.075509e-02 - 9.400000e-01 -7.102095e-01 -1.298300e+00 8.818933e-02 - 9.500000e-01 -7.319798e-01 -1.312111e+00 8.513983e-02 - 9.600000e-01 -7.615502e-01 -1.325923e+00 8.266016e-02 - 9.700000e-01 -7.964408e-01 -1.339735e+00 8.166394e-02 - 9.800000e-01 -8.337897e-01 -1.353546e+00 8.251468e-02 - 9.900000e-01 -8.706036e-01 -1.367358e+00 8.484194e-02 - 1.000000e-00 -9.040117e-01 -1.381170e+00 8.774748e-02 - 1.010000e+00 -9.315033e-01 -1.394981e+00 9.021996e-02 - 1.020000e+00 -9.511296e-01 -1.408793e+00 9.148261e-02 - 1.030000e+00 -9.616553e-01 -1.422605e+00 9.117828e-02 - 1.040000e+00 -9.626475e-01 -1.436417e+00 8.942710e-02 - 1.050000e+00 -9.544971e-01 -1.450228e+00 8.679399e-02 - 1.060000e+00 -9.383712e-01 -1.464040e+00 8.415952e-02 - 1.070000e+00 -9.161027e-01 -1.477852e+00 8.246149e-02 - 1.080000e+00 -8.900263e-01 -1.491663e+00 8.233013e-02 - 1.090000e+00 -8.627749e-01 -1.505475e+00 8.378993e-02 - 1.100000e+00 -8.370557e-01 -1.519287e+00 8.625490e-02 - 1.110000e+00 -8.154227e-01 -1.533098e+00 8.882170e-02 - 1.120000e+00 -8.000647e-01 -1.546910e+00 9.063428e-02 - 1.130000e+00 -7.926282e-01 -1.560722e+00 9.113887e-02 - 1.140000e+00 -7.940862e-01 -1.574533e+00 9.020245e-02 - 1.150000e+00 -8.046667e-01 -1.588345e+00 8.812929e-02 - 1.160000e+00 -8.238427e-01 -1.602157e+00 8.559113e-02 - 1.170000e+00 -8.503875e-01 -1.615969e+00 8.345275e-02 - 1.180000e+00 -8.824866e-01 -1.629780e+00 8.248185e-02 - 1.190000e+00 -9.178991e-01 -1.643592e+00 8.302436e-02 - 1.200000e+00 -9.541530e-01 -1.657404e+00 8.484068e-02 - 1.210000e+00 -9.887581e-01 -1.671215e+00 8.723378e-02 - 1.220000e+00 -1.019420e+00 -1.685027e+00 8.936506e-02 - 1.230000e+00 -1.044233e+00 -1.698839e+00 9.055378e-02 - 1.240000e+00 -1.061845e+00 -1.712650e+00 9.045794e-02 - 1.250000e+00 -1.071566e+00 -1.726462e+00 8.914106e-02 - 1.260000e+00 -1.073431e+00 -1.740274e+00 8.704942e-02 - 1.270000e+00 -1.068188e+00 -1.754086e+00 8.489959e-02 - 1.280000e+00 -1.057242e+00 -1.767897e+00 8.346229e-02 - 1.290000e+00 -1.042527e+00 -1.781709e+00 8.327095e-02 - 1.300000e+00 -1.026351e+00 -1.795521e+00 8.438368e-02 - 1.310000e+00 -1.011191e+00 -1.809332e+00 8.636090e-02 - 1.320000e+00 -9.994919e-01 -1.823144e+00 8.847613e-02 - 1.330000e+00 -9.934586e-01 -1.836956e+00 9.000844e-02 - 1.340000e+00 -9.948682e-01 -1.850767e+00 9.047021e-02 - 1.350000e+00 -1.004922e+00 -1.864579e+00 8.972635e-02 - 1.360000e+00 -1.024143e+00 -1.878391e+00 8.801881e-02 - 1.370000e+00 -1.052329e+00 -1.892203e+00 8.590676e-02 - 1.380000e+00 -1.088569e+00 -1.906014e+00 8.411382e-02 - 1.390000e+00 -1.131312e+00 -1.919826e+00 8.328369e-02 - 1.400000e+00 -1.178493e+00 -1.933638e+00 8.371558e-02 - 1.410000e+00 -1.227697e+00 -1.947449e+00 8.522786e-02 - 1.420000e+00 -1.276352e+00 -1.961261e+00 8.724927e-02 - 1.430000e+00 -1.321931e+00 -1.975073e+00 8.906920e-02 - 1.440000e+00 -1.362151e+00 -1.988884e+00 9.009276e-02 - 1.450000e+00 -1.395148e+00 -2.002696e+00 9.000846e-02 - 1.460000e+00 -1.419612e+00 -2.016508e+00 8.885776e-02 - 1.470000e+00 -1.434881e+00 -2.030319e+00 8.702023e-02 - 1.480000e+00 -1.440976e+00 -2.044131e+00 8.511516e-02 - 1.490000e+00 -1.438578e+00 -2.057943e+00 8.381334e-02 - 1.500000e+00 -1.428952e+00 -2.071755e+00 8.358812e-02 - 1.510000e+00 -1.413823e+00 -2.085566e+00 8.451113e-02 - 1.520000e+00 -1.395219e+00 -2.099378e+00 8.622309e-02 - 1.530000e+00 -1.375288e+00 -2.113190e+00 8.810063e-02 - 1.540000e+00 -1.356109e+00 -2.127001e+00 8.950526e-02 - 1.550000e+00 -1.339521e+00 -2.140813e+00 8.998983e-02 - 1.560000e+00 -1.326967e+00 -2.154625e+00 8.941412e-02 - 1.570000e+00 -1.319389e+00 -2.168436e+00 8.797326e-02 - 1.580000e+00 -1.317160e+00 -2.182248e+00 8.614643e-02 - 1.590000e+00 -1.320081e+00 -2.196060e+00 8.456224e-02 - 1.600000e+00 -1.327421e+00 -2.209872e+00 8.378773e-02 - 1.610000e+00 -1.338016e+00 -2.223683e+00 8.410190e-02 - 1.620000e+00 -1.350401e+00 -2.237495e+00 8.537324e-02 - 1.630000e+00 -1.362974e+00 -2.251307e+00 8.712414e-02 - 1.640000e+00 -1.374170e+00 -2.265118e+00 8.873653e-02 - 1.650000e+00 -1.382635e+00 -2.278930e+00 8.967598e-02 - 1.660000e+00 -1.387368e+00 -2.292742e+00 8.964903e-02 - 1.670000e+00 -1.387843e+00 -2.306553e+00 8.867411e-02 - 1.680000e+00 -1.384077e+00 -2.320365e+00 8.707293e-02 - 1.690000e+00 -1.376637e+00 -2.334177e+00 8.538419e-02 - 1.700000e+00 -1.366606e+00 -2.347989e+00 8.419842e-02 - 1.710000e+00 -1.355480e+00 -2.361800e+00 8.394229e-02 - 1.720000e+00 -1.345031e+00 -2.375612e+00 8.470005e-02 - 1.730000e+00 -1.337123e+00 -2.389424e+00 8.617890e-02 - 1.740000e+00 -1.333527e+00 -2.403235e+00 8.784186e-02 - 1.750000e+00 -1.335716e+00 -2.417047e+00 8.912123e-02 - 1.760000e+00 -1.344696e+00 -2.430859e+00 8.960623e-02 - 1.770000e+00 -1.360861e+00 -2.444670e+00 8.915473e-02 - 1.780000e+00 -1.383901e+00 -2.458482e+00 8.792463e-02 - 1.790000e+00 -1.412776e+00 -2.472294e+00 8.633026e-02 - 1.800000e+00 -1.445754e+00 -2.486105e+00 8.492298e-02 - 1.810000e+00 -1.480514e+00 -2.499917e+00 8.420620e-02 - 1.820000e+00 -1.514312e+00 -2.513729e+00 8.443860e-02 - 1.830000e+00 -1.544202e+00 -2.527541e+00 8.552365e-02 - 1.840000e+00 -1.567278e+00 -2.541352e+00 8.705601e-02 - 1.850000e+00 -1.580939e+00 -2.555164e+00 8.849338e-02 - 1.860000e+00 -1.583140e+00 -2.568976e+00 8.935436e-02 - 1.870000e+00 -1.572609e+00 -2.582787e+00 8.936496e-02 - 1.880000e+00 -1.549013e+00 -2.596599e+00 8.852906e-02 - 1.890000e+00 -1.513057e+00 -2.610411e+00 8.712423e-02 - 1.900000e+00 -1.466490e+00 -2.624222e+00 8.562504e-02 - 1.910000e+00 -1.412034e+00 -2.638034e+00 8.455578e-02 - 1.920000e+00 -1.353220e+00 -2.651846e+00 8.430059e-02 - 1.930000e+00 -1.294150e+00 -2.665658e+00 8.494598e-02 - 1.940000e+00 -1.239192e+00 -2.679469e+00 8.624521e-02 - 1.950000e+00 -1.192639e+00 -2.693281e+00 8.772760e-02 - 1.960000e+00 -1.158358e+00 -2.707093e+00 8.888395e-02 - 1.970000e+00 -1.139441e+00 -2.720904e+00 8.933725e-02 - 1.980000e+00 -1.137915e+00 -2.734716e+00 8.894918e-02 - 1.990000e+00 -1.154511e+00 -2.748528e+00 8.785320e-02 - 2.000000e+00 -1.188531e+00 -2.762339e+00 8.641699e-02 - 2.010000e+00 -1.237823e+00 -2.776151e+00 8.513478e-02 - 2.020000e+00 -1.298870e+00 -2.789963e+00 8.446166e-02 - 2.030000e+00 -1.366998e+00 -2.803775e+00 8.463800e-02 - 2.040000e+00 -1.436686e+00 -2.817586e+00 8.558855e-02 - 2.050000e+00 -1.501962e+00 -2.831398e+00 8.695755e-02 - 2.060000e+00 -1.556856e+00 -2.845210e+00 8.825708e-02 - 2.070000e+00 -1.595879e+00 -2.859021e+00 8.904528e-02 - 2.080000e+00 -1.614491e+00 -2.872833e+00 8.906364e-02 - 2.090000e+00 -1.609514e+00 -2.886645e+00 8.830655e-02 - 2.100000e+00 -1.579460e+00 -2.900456e+00 8.702107e-02 - 2.110000e+00 -1.524741e+00 -2.914268e+00 8.563829e-02 - 2.120000e+00 -1.447736e+00 -2.928080e+00 8.463963e-02 - 2.130000e+00 -1.352693e+00 -2.941891e+00 8.438444e-02 - 2.140000e+00 -1.245484e+00 -2.955703e+00 8.496517e-02 - 2.150000e+00 -1.133191e+00 -2.969515e+00 8.616936e-02 - 2.160000e+00 -1.023574e+00 -2.983327e+00 8.757206e-02 - 2.170000e+00 -9.244251e-01 -2.997138e+00 8.870195e-02 - 2.180000e+00 -8.428719e-01 -3.010950e+00 8.920000e-02 - 2.190000e+00 -7.846657e-01 -3.024762e+00 8.892219e-02 - 2.200000e+00 -7.535071e-01 -3.038573e+00 8.797447e-02 - 2.210000e+00 -7.504647e-01 -3.052385e+00 8.668116e-02 - 2.220000e+00 -7.735306e-01 -3.066197e+00 8.548894e-02 - 2.230000e+00 -8.173576e-01 -3.080008e+00 8.481846e-02 - 2.240000e+00 -8.732071e-01 -3.093820e+00 8.490579e-02 - 2.250000e+00 -9.291271e-01 -3.107632e+00 8.570642e-02 - 2.260000e+00 -9.703641e-01 -3.121444e+00 8.691730e-02 - 2.270000e+00 -9.799987e-01 -3.135255e+00 8.810312e-02 - 2.280000e+00 -9.397761e-01 -3.149067e+00 8.885701e-02 - 2.290000e+00 -8.310933e-01 -3.162879e+00 8.893019e-02 - 2.300000e+00 -6.360900e-01 -3.176690e+00 8.830113e-02 - 2.310000e+00 -3.387799e-01 -3.190502e+00 8.717917e-02 - 2.320000e+00 7.384109e-02 -3.204314e+00 8.594395e-02 - 2.330000e+00 6.107803e-01 -3.218125e+00 8.502589e-02 - 2.340000e+00 1.276191e+00 -3.231937e+00 8.475268e-02 - 2.350000e+00 2.068731e+00 -3.245749e+00 8.521931e-02 - 2.360000e+00 2.981181e+00 -3.259561e+00 8.624936e-02 - 2.370000e+00 4.000357e+00 -3.273372e+00 8.747046e-02 - 2.380000e+00 5.107337e+00 -3.287184e+00 8.845949e-02 - 2.390000e+00 6.277992e+00 -3.300996e+00 8.888735e-02 - 2.400000e+00 7.483803e+00 -3.314807e+00 8.861696e-02 - 2.410000e+00 8.692939e+00 -3.328619e+00 8.773945e-02 - 2.420000e+00 9.871525e+00 -3.342431e+00 8.654753e-02 - 2.430000e+00 1.098505e+01 -3.356242e+00 8.544831e-02 - 2.440000e+00 1.199985e+01 -3.370054e+00 8.482790e-02 - 2.450000e+00 1.288455e+01 -3.383866e+00 8.490680e-02 - 2.460000e+00 1.361146e+01 -3.397678e+00 8.565094e-02 - 2.470000e+00 1.415774e+01 -3.411489e+00 8.678792e-02 - 2.480000e+00 1.450644e+01 -3.425301e+00 8.791879e-02 - 2.490000e+00 1.464718e+01 -3.439113e+00 8.866444e-02 - 2.500000e+00 1.457658e+01 -3.452924e+00 8.878714e-02 - 2.510000e+00 1.429830e+01 -3.466736e+00 8.825730e-02 - 2.520000e+00 1.382281e+01 -3.480548e+00 8.725920e-02 - 2.530000e+00 1.316686e+01 -3.494359e+00 8.613645e-02 - 2.540000e+00 1.235258e+01 -3.508171e+00 8.528323e-02 - 2.550000e+00 1.140650e+01 -3.521983e+00 8.500491e-02 - 2.560000e+00 1.035826e+01 -3.535794e+00 8.539895e-02 - 2.570000e+00 9.239323e+00 -3.549606e+00 8.631613e-02 - 2.580000e+00 8.081607e+00 -3.563418e+00 8.742391e-02 - 2.590000e+00 6.916163e+00 -3.577230e+00 8.833600e-02 - 2.600000e+00 5.771973e+00 -3.591041e+00 8.874584e-02 - 2.610000e+00 4.674897e+00 -3.604853e+00 8.852008e-02 - 2.620000e+00 3.646830e+00 -3.618665e+00 8.773500e-02 - 2.630000e+00 2.705100e+00 -3.632476e+00 8.665363e-02 - 2.640000e+00 1.862122e+00 -3.646288e+00 8.564608e-02 - 2.650000e+00 1.125307e+00 -3.660100e+00 8.506583e-02 - 2.660000e+00 4.972252e-01 -3.673911e+00 8.511794e-02 - 2.670000e+00 -2.400927e-02 -3.687723e+00 8.577693e-02 - 2.680000e+00 -4.441723e-01 -3.701535e+00 8.679855e-02 - 2.690000e+00 -7.722150e-01 -3.715347e+00 8.781860e-02 - 2.700000e+00 -1.019459e+00 -3.729158e+00 8.848654e-02 - 2.710000e+00 -1.198748e+00 -3.742970e+00 8.857941e-02 - 2.720000e+00 -1.323610e+00 -3.756782e+00 8.806668e-02 - 2.730000e+00 -1.407472e+00 -3.770593e+00 8.711793e-02 - 2.740000e+00 -1.462967e+00 -3.784405e+00 8.605324e-02 - 2.750000e+00 -1.501372e+00 -3.798217e+00 8.524228e-02 - 2.760000e+00 -1.532185e+00 -3.812028e+00 8.497442e-02 - 2.770000e+00 -1.562860e+00 -3.825840e+00 8.534686e-02 - 2.780000e+00 -1.598702e+00 -3.839652e+00 8.622582e-02 - 2.790000e+00 -1.642903e+00 -3.853464e+00 8.730239e-02 - 2.800000e+00 -1.696711e+00 -3.867275e+00 8.821161e-02 - 2.810000e+00 -1.759700e+00 -3.881087e+00 8.865812e-02 - 2.820000e+00 -1.830120e+00 -3.894899e+00 8.850613e-02 - 2.830000e+00 -1.905285e+00 -3.908710e+00 8.781616e-02 - 2.840000e+00 -1.981979e+00 -3.922522e+00 8.682582e-02 - 2.850000e+00 -2.056843e+00 -3.936334e+00 8.587719e-02 - 2.860000e+00 -2.126718e+00 -3.950145e+00 8.530316e-02 - 2.870000e+00 -2.188935e+00 -3.963957e+00 8.530532e-02 - 2.880000e+00 -2.241518e+00 -3.977769e+00 8.587504e-02 - 2.890000e+00 -2.283314e+00 -3.991580e+00 8.679888e-02 - 2.900000e+00 -2.314031e+00 -4.005392e+00 8.774513e-02 - 2.910000e+00 -2.334204e+00 -4.019204e+00 8.838627e-02 - 2.920000e+00 -2.345096e+00 -4.033016e+00 8.850696e-02 - 2.930000e+00 -2.348533e+00 -4.046827e+00 8.806776e-02 - 2.940000e+00 -2.346723e+00 -4.060639e+00 8.721507e-02 - 2.950000e+00 -2.342043e+00 -4.074451e+00 8.623706e-02 - 2.960000e+00 -2.336835e+00 -4.088262e+00 8.547181e-02 - 2.970000e+00 -2.333219e+00 -4.102074e+00 8.518872e-02 - 2.980000e+00 -2.332935e+00 -4.115886e+00 8.548554e-02 - 2.990000e+00 -2.337236e+00 -4.129697e+00 8.624986e-02 - 3.000000e+00 -2.346817e+00 -4.143509e+00 8.720597e-02 - 3.010000e+00 -2.361806e+00 -4.157321e+00 8.802122e-02 - 3.020000e+00 -2.381792e+00 -4.171133e+00 8.842215e-02 - 3.030000e+00 -2.405909e+00 -4.184944e+00 8.828001e-02 - 3.040000e+00 -2.432939e+00 -4.198756e+00 8.764730e-02 - 3.050000e+00 -2.461444e+00 -4.212568e+00 8.674126e-02 - 3.060000e+00 -2.489911e+00 -4.226379e+00 8.587672e-02 - 3.070000e+00 -2.516886e+00 -4.240191e+00 8.536071e-02 - 3.080000e+00 -2.541103e+00 -4.254003e+00 8.537964e-02 - 3.090000e+00 -2.561584e+00 -4.267814e+00 8.592621e-02 - 3.100000e+00 -2.577712e+00 -4.281626e+00 8.680329e-02 - 3.110000e+00 -2.589266e+00 -4.295438e+00 8.770250e-02 - 3.120000e+00 -2.596420e+00 -4.309250e+00 8.831725e-02 - 3.130000e+00 -2.599709e+00 -4.323061e+00 8.844402e-02 - 3.140000e+00 -2.599957e+00 -4.336873e+00 8.804325e-02 - 3.150000e+00 -2.598188e+00 -4.350685e+00 8.724975e-02 - 3.160000e+00 -2.595516e+00 -4.364496e+00 8.633174e-02 - 3.170000e+00 -2.593021e+00 -4.378308e+00 8.560513e-02 - 3.180000e+00 -2.591636e+00 -4.392120e+00 8.532290e-02 - 3.190000e+00 -2.592035e+00 -4.405931e+00 8.557901e-02 - 3.200000e+00 -2.594543e+00 -4.419743e+00 8.627157e-02 - 3.210000e+00 -2.599066e+00 -4.433555e+00 8.714478e-02 - 3.220000e+00 -2.605049e+00 -4.447366e+00 8.788730e-02 - 3.230000e+00 -2.611468e+00 -4.461178e+00 8.824143e-02 - 3.240000e+00 -2.616842e+00 -4.474990e+00 8.808516e-02 - 3.250000e+00 -2.619286e+00 -4.488802e+00 8.746838e-02 - 3.260000e+00 -2.616581e+00 -4.502613e+00 8.659820e-02 - 3.270000e+00 -2.606259e+00 -4.516425e+00 8.577550e-02 - 3.280000e+00 -2.585719e+00 -4.530237e+00 8.529449e-02 - 3.290000e+00 -2.552333e+00 -4.544048e+00 8.533489e-02 - 3.300000e+00 -2.503569e+00 -4.557860e+00 8.589126e-02 - 3.310000e+00 -2.437100e+00 -4.571672e+00 8.677526e-02 - 3.320000e+00 -2.350917e+00 -4.585483e+00 8.768926e-02 - 3.330000e+00 -2.243420e+00 -4.599295e+00 8.833407e-02 - 3.340000e+00 -2.113503e+00 -4.613107e+00 8.850678e-02 - 3.350000e+00 -1.960618e+00 -4.626919e+00 8.816083e-02 - 3.360000e+00 -1.784825e+00 -4.640730e+00 8.741788e-02 - 3.370000e+00 -1.586825e+00 -4.654542e+00 8.653083e-02 - 3.380000e+00 -1.367979e+00 -4.668354e+00 8.580368e-02 - 3.390000e+00 -1.130302e+00 -4.682165e+00 8.548686e-02 - 3.400000e+00 -8.764571e-01 -4.695977e+00 8.568406e-02 - 3.410000e+00 -6.097196e-01 -4.709789e+00 8.631281e-02 - 3.420000e+00 -3.339377e-01 -4.723600e+00 8.713910e-02 - 3.430000e+00 -5.347346e-02 -4.737412e+00 8.786787e-02 - 3.440000e+00 2.268704e-01 -4.751224e+00 8.824708e-02 - 3.450000e+00 5.019383e-01 -4.765036e+00 8.814830e-02 - 3.460000e+00 7.663258e-01 -4.778847e+00 8.760434e-02 - 3.470000e+00 1.014500e+00 -4.792659e+00 8.679847e-02 - 3.480000e+00 1.240932e+00 -4.806471e+00 8.600717e-02 - 3.490000e+00 1.440250e+00 -4.820282e+00 8.550784e-02 - 3.500000e+00 1.607392e+00 -4.834094e+00 8.547816e-02 - 3.510000e+00 1.737778e+00 -4.847906e+00 8.592753e-02 - 3.520000e+00 1.827471e+00 -4.861717e+00 8.669413e-02 - 3.530000e+00 1.873343e+00 -4.875529e+00 8.750884e-02 - 3.540000e+00 1.873221e+00 -4.889341e+00 8.809407e-02 - 3.550000e+00 1.826015e+00 -4.903152e+00 8.825661e-02 - 3.560000e+00 1.731819e+00 -4.916964e+00 8.794676e-02 - 3.570000e+00 1.591965e+00 -4.930776e+00 8.727197e-02 - 3.580000e+00 1.409047e+00 -4.944588e+00 8.646361e-02 - 3.590000e+00 1.186882e+00 -4.958399e+00 8.580261e-02 - 3.600000e+00 9.304277e-01 -4.972211e+00 8.552186e-02 - 3.610000e+00 6.456414e-01 -4.986023e+00 8.571906e-02 - 3.620000e+00 3.392945e-01 -4.999834e+00 8.631881e-02 - 3.630000e+00 1.873856e-02 -5.013646e+00 8.710326e-02 - 3.640000e+00 -3.083619e-01 -5.027458e+00 8.779520e-02 - 3.650000e+00 -6.343206e-01 -5.041269e+00 8.815575e-02 - 3.660000e+00 -9.517301e-01 -5.055081e+00 8.806124e-02 - 3.670000e+00 -1.253756e+00 -5.068893e+00 8.754045e-02 - 3.680000e+00 -1.534413e+00 -5.082705e+00 8.676573e-02 - 3.690000e+00 -1.788795e+00 -5.096516e+00 8.599990e-02 - 3.700000e+00 -2.013266e+00 -5.110328e+00 8.550922e-02 - 3.710000e+00 -2.205580e+00 -5.124140e+00 8.546775e-02 - 3.720000e+00 -2.364928e+00 -5.137951e+00 8.589091e-02 - 3.730000e+00 -2.491921e+00 -5.151763e+00 8.663012e-02 - 3.740000e+00 -2.588479e+00 -5.165575e+00 8.743106e-02 - 3.750000e+00 -2.657671e+00 -5.179386e+00 8.802674e-02 - 3.760000e+00 -2.703479e+00 -5.193198e+00 8.822663e-02 - 3.770000e+00 -2.730520e+00 -5.207010e+00 8.797479e-02 - 3.780000e+00 -2.743737e+00 -5.220822e+00 8.736478e-02 - 3.790000e+00 -2.748083e+00 -5.234633e+00 8.660995e-02 - 3.800000e+00 -2.748209e+00 -5.248445e+00 8.597450e-02 - 3.810000e+00 -2.748188e+00 -5.262257e+00 8.568213e-02 - 3.820000e+00 -2.751276e+00 -5.276068e+00 8.583325e-02 - 3.830000e+00 -2.759752e+00 -5.289880e+00 8.636683e-02 - 3.840000e+00 -2.774817e+00 -5.303692e+00 8.708555e-02 - 3.850000e+00 -2.796588e+00 -5.317503e+00 8.773157e-02 - 3.860000e+00 -2.824158e+00 -5.331315e+00 8.807818e-02 - 3.870000e+00 -2.855748e+00 -5.345127e+00 8.800391e-02 - 3.880000e+00 -2.888908e+00 -5.358939e+00 8.752973e-02 - 3.890000e+00 -2.920779e+00 -5.372750e+00 8.681247e-02 - 3.900000e+00 -2.948371e+00 -5.386562e+00 8.609591e-02 - 3.910000e+00 -2.968861e+00 -5.400374e+00 8.562970e-02 - 3.920000e+00 -2.979857e+00 -5.414185e+00 8.557964e-02 - 3.930000e+00 -2.979632e+00 -5.427997e+00 8.596450e-02 - 3.940000e+00 -2.967290e+00 -5.441809e+00 8.664908e-02 - 3.950000e+00 -2.942857e+00 -5.455620e+00 8.739672e-02 - 3.960000e+00 -2.907272e+00 -5.469432e+00 8.795581e-02 - 3.970000e+00 -2.862300e+00 -5.483244e+00 8.814437e-02 - 3.980000e+00 -2.810334e+00 -5.497055e+00 8.790624e-02 - 3.990000e+00 -2.754132e+00 -5.510867e+00 8.732687e-02 - 4.000000e+00 -2.696475e+00 -5.524679e+00 8.660621e-02 - 4.010000e+00 -2.639789e+00 -5.538491e+00 8.599417e-02 - 4.020000e+00 -2.585754e+00 -5.552302e+00 8.570445e-02 - 4.030000e+00 -2.534926e+00 -5.566114e+00 8.583588e-02 - 4.040000e+00 -2.486404e+00 -5.579926e+00 8.633496e-02 - 4.050000e+00 -2.437580e+00 -5.593737e+00 8.701785e-02 - 4.060000e+00 -2.383991e+00 -5.607549e+00 8.764065e-02 - 4.070000e+00 -2.319291e+00 -5.621361e+00 8.798621e-02 - 4.080000e+00 -2.235371e+00 -5.635172e+00 8.793541e-02 - 4.090000e+00 -2.122615e+00 -5.648984e+00 8.750393e-02 - 4.100000e+00 -1.970297e+00 -5.662796e+00 8.683711e-02 - 4.110000e+00 -1.767102e+00 -5.676608e+00 8.616432e-02 - 4.120000e+00 -1.501749e+00 -5.690419e+00 8.572243e-02 - 4.130000e+00 -1.163683e+00 -5.704231e+00 8.567084e-02 - 4.140000e+00 -7.438005e-01 -5.718043e+00 8.603091e-02 - 4.150000e+00 -2.351580e-01 -5.731854e+00 8.667774e-02 - 4.160000e+00 3.663656e-01 -5.745666e+00 8.738832e-02 - 4.170000e+00 1.061510e+00 -5.759478e+00 8.792278e-02 - 4.180000e+00 1.847208e+00 -5.773289e+00 8.810524e-02 - 4.190000e+00 2.716329e+00 -5.787101e+00 8.787868e-02 - 4.200000e+00 3.657618e+00 -5.800913e+00 8.732138e-02 - 4.210000e+00 4.655841e+00 -5.814725e+00 8.662233e-02 - 4.220000e+00 5.692133e+00 -5.828536e+00 8.602054e-02 - 4.230000e+00 6.744555e+00 -5.842348e+00 8.572319e-02 - 4.240000e+00 7.788825e+00 -5.856160e+00 8.583002e-02 - 4.250000e+00 8.799190e+00 -5.869971e+00 8.629595e-02 - 4.260000e+00 9.749408e+00 -5.883783e+00 8.694977e-02 - 4.270000e+00 1.061379e+01 -5.897595e+00 8.755959e-02 - 4.280000e+00 1.136822e+01 -5.911406e+00 8.791545e-02 - 4.290000e+00 1.199120e+01 -5.925218e+00 8.789847e-02 - 4.300000e+00 1.246467e+01 -5.939030e+00 8.751740e-02 - 4.310000e+00 1.277484e+01 -5.952841e+00 8.690514e-02 - 4.320000e+00 1.291270e+01 -5.966653e+00 8.627632e-02 - 4.330000e+00 1.287439e+01 -5.980465e+00 8.585518e-02 - 4.340000e+00 1.266135e+01 -5.994277e+00 8.579510e-02 - 4.350000e+00 1.228021e+01 -6.008088e+00 8.612033e-02 - 4.360000e+00 1.174245e+01 -6.021900e+00 8.671645e-02 - 4.370000e+00 1.106387e+01 -6.035712e+00 8.737418e-02 - 4.380000e+00 1.026392e+01 -6.049523e+00 8.786556e-02 - 4.390000e+00 9.364814e+00 -6.063335e+00 8.802129e-02 - 4.400000e+00 8.390613e+00 -6.077147e+00 8.778446e-02 - 4.410000e+00 7.366263e+00 -6.090958e+00 8.722793e-02 - 4.420000e+00 6.316617e+00 -6.104770e+00 8.653223e-02 - 4.430000e+00 5.265521e+00 -6.118582e+00 8.592841e-02 - 4.440000e+00 4.234999e+00 -6.132394e+00 8.561983e-02 - 4.450000e+00 3.244559e+00 -6.146205e+00 8.570877e-02 - 4.460000e+00 2.310668e+00 -6.160017e+00 8.615855e-02 - 4.470000e+00 1.446384e+00 -6.173829e+00 8.680890e-02 - 4.480000e+00 6.611823e-01 -6.187640e+00 8.743706e-02 - 4.490000e+00 -3.905441e-02 -6.201452e+00 8.783681e-02 - 4.500000e+00 -6.518808e-01 -6.215264e+00 8.788586e-02 - 4.510000e+00 -1.177993e+00 -6.229075e+00 8.758252e-02 - 4.520000e+00 -1.620823e+00 -6.242887e+00 8.704418e-02 - 4.530000e+00 -1.986045e+00 -6.256699e+00 8.646856e-02 - 4.540000e+00 -2.281044e+00 -6.270511e+00 8.606669e-02 - 4.550000e+00 -2.514362e+00 -6.284322e+00 8.598740e-02 - 4.560000e+00 -2.695158e+00 -6.298134e+00 8.626153e-02 - 4.570000e+00 -2.832719e+00 -6.311946e+00 8.679056e-02 - 4.580000e+00 -2.936024e+00 -6.325757e+00 8.738503e-02 - 4.590000e+00 -3.013391e+00 -6.339569e+00 8.783451e-02 - 4.600000e+00 -3.072212e+00 -6.353381e+00 8.798044e-02 - 4.610000e+00 -3.118767e+00 -6.367192e+00 8.776777e-02 - 4.620000e+00 -3.158134e+00 -6.381004e+00 8.726241e-02 - 4.630000e+00 -3.194163e+00 -6.394816e+00 8.663102e-02 - 4.640000e+00 -3.229516e+00 -6.408627e+00 8.608727e-02 - 4.650000e+00 -3.265756e+00 -6.422439e+00 8.581849e-02 - 4.660000e+00 -3.303465e+00 -6.436251e+00 8.591708e-02 - 4.670000e+00 -3.342377e+00 -6.450063e+00 8.634536e-02 - 4.680000e+00 -3.381515e+00 -6.463874e+00 8.695011e-02 - 4.690000e+00 -3.419326e+00 -6.477686e+00 8.751985e-02 - 4.700000e+00 -3.453792e+00 -6.491498e+00 8.785941e-02 - 4.710000e+00 -3.482530e+00 -6.505309e+00 8.785407e-02 - 4.720000e+00 -3.502873e+00 -6.519121e+00 8.750507e-02 - 4.730000e+00 -3.511939e+00 -6.532933e+00 8.692868e-02 - 4.740000e+00 -3.506682e+00 -6.546744e+00 8.631937e-02 - 4.750000e+00 -3.483957e+00 -6.560556e+00 8.588540e-02 - 4.760000e+00 -3.440576e+00 -6.574368e+00 8.577557e-02 - 4.770000e+00 -3.373385e+00 -6.588180e+00 8.602434e-02 - 4.780000e+00 -3.279357e+00 -6.601991e+00 8.653953e-02 - 4.790000e+00 -3.155710e+00 -6.615803e+00 8.713833e-02 - 4.800000e+00 -3.000036e+00 -6.629615e+00 8.761468e-02 - 4.810000e+00 -2.810458e+00 -6.643426e+00 8.781026e-02 - 4.820000e+00 -2.585794e+00 -6.657238e+00 8.766528e-02 - 4.830000e+00 -2.325724e+00 -6.671050e+00 8.723634e-02 - 4.840000e+00 -2.030943e+00 -6.684861e+00 8.667774e-02 - 4.850000e+00 -1.703304e+00 -6.698673e+00 8.619059e-02 - 4.860000e+00 -1.345909e+00 -6.712485e+00 8.595303e-02 - 4.870000e+00 -9.631702e-01 -6.726297e+00 8.605479e-02 - 4.880000e+00 -5.608041e-01 -6.740108e+00 8.646303e-02 - 4.890000e+00 -1.457638e-01 -6.753920e+00 8.703493e-02 - 4.900000e+00 2.738950e-01 -6.767732e+00 8.757120e-02 - 4.910000e+00 6.892164e-01 -6.781543e+00 8.788676e-02 - 4.920000e+00 1.090608e+00 -6.795355e+00 8.787244e-02 - 4.930000e+00 1.468155e+00 -6.809167e+00 8.752974e-02 - 4.940000e+00 1.811980e+00 -6.822978e+00 8.697063e-02 - 4.950000e+00 2.112617e+00 -6.836790e+00 8.638246e-02 - 4.960000e+00 2.361395e+00 -6.850602e+00 8.596608e-02 - 4.970000e+00 2.550801e+00 -6.864413e+00 8.586518e-02 - 4.980000e+00 2.674816e+00 -6.878225e+00 8.611303e-02 - 4.990000e+00 2.729185e+00 -6.892037e+00 8.661999e-02 - 5.000000e+00 2.711627e+00 -6.905849e+00 8.720766e-02 - 5.010000e+00 2.621959e+00 -6.919660e+00 8.767376e-02 - 5.020000e+00 2.462128e+00 -6.933472e+00 8.786104e-02 - 5.030000e+00 2.236157e+00 -6.947284e+00 8.770755e-02 - 5.040000e+00 1.949990e+00 -6.961095e+00 8.726511e-02 - 5.050000e+00 1.611265e+00 -6.974907e+00 8.668269e-02 - 5.060000e+00 1.229002e+00 -6.988719e+00 8.615816e-02 - 5.070000e+00 8.132488e-01 -7.002530e+00 8.587099e-02 - 5.080000e+00 3.746712e-01 -7.016342e+00 8.591790e-02 - 5.090000e+00 -7.586038e-02 -7.030154e+00 8.627722e-02 - 5.100000e+00 -5.276906e-01 -7.043966e+00 8.681827e-02 - 5.110000e+00 -9.707736e-01 -7.057777e+00 8.735105e-02 - 5.120000e+00 -1.396027e+00 -7.071589e+00 8.769425e-02 - 5.130000e+00 -1.795627e+00 -7.085401e+00 8.773588e-02 - 5.140000e+00 -2.163237e+00 -7.099212e+00 8.746834e-02 - 5.150000e+00 -2.494151e+00 -7.113024e+00 8.698983e-02 - 5.160000e+00 -2.785361e+00 -7.126836e+00 8.647198e-02 - 5.170000e+00 -3.035536e+00 -7.140647e+00 8.610178e-02 - 5.180000e+00 -3.244924e+00 -7.154459e+00 8.601496e-02 - 5.190000e+00 -3.415178e+00 -7.168271e+00 8.624523e-02 - 5.200000e+00 -3.549129e+00 -7.182083e+00 8.671154e-02 - 5.210000e+00 -3.650505e+00 -7.195894e+00 8.724892e-02 - 5.220000e+00 -3.723620e+00 -7.209706e+00 8.766895e-02 - 5.230000e+00 -3.773049e+00 -7.223518e+00 8.782505e-02 - 5.240000e+00 -3.803304e+00 -7.237329e+00 8.766071e-02 - 5.250000e+00 -3.818524e+00 -7.251141e+00 8.722768e-02 - 5.260000e+00 -3.822194e+00 -7.264953e+00 8.667016e-02 - 5.270000e+00 -3.816918e+00 -7.278764e+00 8.617831e-02 - 5.280000e+00 -3.804229e+00 -7.292576e+00 8.592329e-02 - 5.290000e+00 -3.784477e+00 -7.306388e+00 8.599517e-02 - 5.300000e+00 -3.756772e+00 -7.320200e+00 8.636886e-02 - 5.310000e+00 -3.718998e+00 -7.334011e+00 8.691337e-02 - 5.320000e+00 -3.667897e+00 -7.347823e+00 8.744021e-02 - 5.330000e+00 -3.599214e+00 -7.361635e+00 8.776965e-02 - 5.340000e+00 -3.507905e+00 -7.375446e+00 8.779011e-02 - 5.350000e+00 -3.388388e+00 -7.389258e+00 8.749321e-02 - 5.360000e+00 -3.234838e+00 -7.403070e+00 8.697617e-02 - 5.370000e+00 -3.041515e+00 -7.416881e+00 8.641121e-02 - 5.380000e+00 -2.803099e+00 -7.430693e+00 8.598917e-02 - 5.390000e+00 -2.515036e+00 -7.444505e+00 8.585342e-02 - 5.400000e+00 -2.173860e+00 -7.458316e+00 8.604798e-02 - 5.410000e+00 -1.777503e+00 -7.472128e+00 8.650183e-02 - 5.420000e+00 -1.325552e+00 -7.485940e+00 8.705661e-02 - 5.430000e+00 -8.194596e-01 -7.499752e+00 8.752478e-02 - 5.440000e+00 -2.626892e-01 -7.513563e+00 8.775421e-02 - 5.450000e+00 3.392176e-01 -7.527375e+00 8.767696e-02 - 5.460000e+00 9.786512e-01 -7.541187e+00 8.732932e-02 - 5.470000e+00 1.646031e+00 -7.554998e+00 8.683885e-02 - 5.480000e+00 2.329988e+00 -7.568810e+00 8.638176e-02 - 5.490000e+00 3.017633e+00 -7.582622e+00 8.612218e-02 - 5.500000e+00 3.694900e+00 -7.596433e+00 8.615289e-02 - 5.510000e+00 4.346958e+00 -7.610245e+00 8.646102e-02 - 5.520000e+00 4.958674e+00 -7.624057e+00 8.693372e-02 - 5.530000e+00 5.515119e+00 -7.637869e+00 8.740100e-02 - 5.540000e+00 6.002084e+00 -7.651680e+00 8.769710e-02 - 5.550000e+00 6.406594e+00 -7.665492e+00 8.771699e-02 - 5.560000e+00 6.717406e+00 -7.679304e+00 8.745053e-02 - 5.570000e+00 6.925442e+00 -7.693115e+00 8.698579e-02 - 5.580000e+00 7.024169e+00 -7.706927e+00 8.648066e-02 - 5.590000e+00 7.009884e+00 -7.720739e+00 8.610998e-02 - 5.600000e+00 6.881897e+00 -7.734550e+00 8.600369e-02 - 5.610000e+00 6.642601e+00 -7.748362e+00 8.619864e-02 - 5.620000e+00 6.297426e+00 -7.762174e+00 8.662450e-02 - 5.630000e+00 5.854665e+00 -7.775986e+00 8.713015e-02 - 5.640000e+00 5.325193e+00 -7.789797e+00 8.753878e-02 - 5.650000e+00 4.722072e+00 -7.803609e+00 8.770900e-02 - 5.660000e+00 4.060080e+00 -7.817421e+00 8.758144e-02 - 5.670000e+00 3.355160e+00 -7.831232e+00 8.719768e-02 - 5.680000e+00 2.623839e+00 -7.845044e+00 8.668744e-02 - 5.690000e+00 1.882618e+00 -7.858856e+00 8.622663e-02 - 5.700000e+00 1.147384e+00 -7.872667e+00 8.597749e-02 - 5.710000e+00 4.328576e-01 -7.886479e+00 8.603025e-02 - 5.720000e+00 -2.478914e-01 -7.900291e+00 8.636931e-02 - 5.730000e+00 -8.838435e-01 -7.914102e+00 8.687907e-02 - 5.740000e+00 -1.466320e+00 -7.927914e+00 8.738655e-02 - 5.750000e+00 -1.989158e+00 -7.941726e+00 8.772229e-02 - 5.760000e+00 -2.448757e+00 -7.955538e+00 8.777674e-02 - 5.770000e+00 -2.844007e+00 -7.969349e+00 8.753466e-02 - 5.780000e+00 -3.176100e+00 -7.983161e+00 8.707946e-02 - 5.790000e+00 -3.448233e+00 -7.996973e+00 8.656641e-02 - 5.800000e+00 -3.665236e+00 -8.010784e+00 8.617139e-02 - 5.810000e+00 -3.833133e+00 -8.024596e+00 8.602990e-02 - 5.820000e+00 -3.958675e+00 -8.038408e+00 8.618804e-02 - 5.830000e+00 -4.048865e+00 -8.052219e+00 8.658593e-02 - 5.840000e+00 -4.110503e+00 -8.066031e+00 8.708082e-02 - 5.850000e+00 -4.149782e+00 -8.079843e+00 8.749955e-02 - 5.860000e+00 -4.171953e+00 -8.093655e+00 8.769861e-02 - 5.870000e+00 -4.181080e+00 -8.107466e+00 8.761101e-02 - 5.880000e+00 -4.179890e+00 -8.121278e+00 8.726695e-02 - 5.890000e+00 -4.169735e+00 -8.135090e+00 8.678365e-02 - 5.900000e+00 -4.150654e+00 -8.148901e+00 8.632682e-02 - 5.910000e+00 -4.121538e+00 -8.162713e+00 8.605422e-02 - 5.920000e+00 -4.080373e+00 -8.176525e+00 8.605936e-02 - 5.930000e+00 -4.024548e+00 -8.190336e+00 8.633734e-02 - 5.940000e+00 -3.951214e+00 -8.204148e+00 8.678737e-02 - 5.950000e+00 -3.857649e+00 -8.217960e+00 8.725091e-02 - 5.960000e+00 -3.741620e+00 -8.231772e+00 8.756870e-02 - 5.970000e+00 -3.601711e+00 -8.245583e+00 8.763482e-02 - 5.980000e+00 -3.437595e+00 -8.259395e+00 8.743080e-02 - 5.990000e+00 -3.250224e+00 -8.273207e+00 8.703087e-02 - 6.000000e+00 -3.041939e+00 -8.287018e+00 8.657745e-02 - 6.010000e+00 -2.816474e+00 -8.300830e+00 8.623311e-02 - 6.020000e+00 -2.578867e+00 -8.314642e+00 8.612316e-02 - 6.030000e+00 -2.335272e+00 -8.328453e+00 8.628953e-02 - 6.040000e+00 -2.092693e+00 -8.342265e+00 8.667500e-02 - 6.050000e+00 -1.858648e+00 -8.356077e+00 8.714473e-02 - 6.060000e+00 -1.640791e+00 -8.369888e+00 8.753548e-02 - 6.070000e+00 -1.446513e+00 -8.383700e+00 8.771242e-02 - 6.080000e+00 -1.282544e+00 -8.397512e+00 8.761380e-02 - 6.090000e+00 -1.154595e+00 -8.411324e+00 8.727067e-02 - 6.100000e+00 -1.067042e+00 -8.425135e+00 8.679705e-02 - 6.110000e+00 -1.022691e+00 -8.438947e+00 8.635272e-02 - 6.120000e+00 -1.022633e+00 -8.452759e+00 8.608880e-02 - 6.130000e+00 -1.066192e+00 -8.466570e+00 8.609374e-02 - 6.140000e+00 -1.150981e+00 -8.480382e+00 8.636059e-02 - 6.150000e+00 -1.273047e+00 -8.494194e+00 8.678994e-02 - 6.160000e+00 -1.427113e+00 -8.508005e+00 8.722702e-02 - 6.170000e+00 -1.606882e+00 -8.521817e+00 8.751718e-02 - 6.180000e+00 -1.805393e+00 -8.535629e+00 8.755858e-02 - 6.190000e+00 -2.015408e+00 -8.549441e+00 8.733548e-02 - 6.200000e+00 -2.229787e+00 -8.563252e+00 8.692355e-02 - 6.210000e+00 -2.441843e+00 -8.577064e+00 8.646565e-02 - 6.220000e+00 -2.645638e+00 -8.590876e+00 8.612434e-02 - 6.230000e+00 -2.836214e+00 -8.604687e+00 8.602490e-02 - 6.240000e+00 -3.009722e+00 -8.618499e+00 8.620926e-02 - 6.250000e+00 -3.163462e+00 -8.632311e+00 8.661987e-02 - 6.260000e+00 -3.295813e+00 -8.646122e+00 8.712074e-02 - 6.270000e+00 -3.406071e+00 -8.659934e+00 8.754630e-02 - 6.280000e+00 -3.494195e+00 -8.673746e+00 8.775802e-02 - 6.290000e+00 -3.560494e+00 -8.687558e+00 8.768946e-02 - 6.300000e+00 -3.605266e+00 -8.701369e+00 8.736689e-02 - 6.310000e+00 -3.628425e+00 -8.715181e+00 8.690065e-02 - 6.320000e+00 -3.629147e+00 -8.728993e+00 8.644948e-02 - 6.330000e+00 -3.605564e+00 -8.742804e+00 8.616701e-02 - 6.340000e+00 -3.554534e+00 -8.756616e+00 8.614766e-02 - 6.350000e+00 -3.471511e+00 -8.770428e+00 8.639233e-02 - 6.360000e+00 -3.350547e+00 -8.784239e+00 8.680872e-02 - 6.370000e+00 -3.184410e+00 -8.798051e+00 8.724599e-02 - 6.380000e+00 -2.964853e+00 -8.811863e+00 8.754876e-02 - 6.390000e+00 -2.683002e+00 -8.825674e+00 8.760987e-02 - 6.400000e+00 -2.329863e+00 -8.839486e+00 8.740504e-02 - 6.410000e+00 -1.896913e+00 -8.853298e+00 8.700040e-02 - 6.420000e+00 -1.376751e+00 -8.867110e+00 8.653120e-02 - 6.430000e+00 -7.637666e-01 -8.880921e+00 8.615719e-02 - 6.440000e+00 -5.478658e-02 -8.894733e+00 8.600743e-02 - 6.450000e+00 7.503419e-01 -8.908545e+00 8.613388e-02 - 6.460000e+00 1.648275e+00 -8.922356e+00 8.649247e-02 - 6.470000e+00 2.631839e+00 -8.936168e+00 8.696004e-02 - 6.480000e+00 3.689864e+00 -8.949980e+00 8.737928e-02 - 6.490000e+00 4.807217e+00 -8.963791e+00 8.761334e-02 - 6.500000e+00 5.965040e+00 -8.977603e+00 8.759051e-02 - 6.510000e+00 7.141184e+00 -8.991415e+00 8.732628e-02 - 6.520000e+00 8.310844e+00 -9.005227e+00 8.691727e-02 - 6.530000e+00 9.447355e+00 -9.019038e+00 8.650892e-02 - 6.540000e+00 1.052313e+01 -9.032850e+00 8.624585e-02 - 6.550000e+00 1.151068e+01 -9.046662e+00 8.622056e-02 - 6.560000e+00 1.238368e+01 -9.060473e+00 8.643989e-02 - 6.570000e+00 1.311803e+01 -9.074285e+00 8.682322e-02 - 6.580000e+00 1.369284e+01 -9.088097e+00 8.723311e-02 - 6.590000e+00 1.409131e+01 -9.101908e+00 8.752513e-02 - 6.600000e+00 1.430143e+01 -9.115720e+00 8.759756e-02 - 6.610000e+00 1.431653e+01 -9.129532e+00 8.742490e-02 - 6.620000e+00 1.413553e+01 -9.143344e+00 8.706581e-02 - 6.630000e+00 1.376303e+01 -9.157155e+00 8.664383e-02 - 6.640000e+00 1.320907e+01 -9.170967e+00 8.630586e-02 - 6.650000e+00 1.248876e+01 -9.184779e+00 8.617074e-02 - 6.660000e+00 1.162158e+01 -9.198590e+00 8.628606e-02 - 6.670000e+00 1.063063e+01 -9.212402e+00 8.661044e-02 - 6.680000e+00 9.541615e+00 -9.226214e+00 8.702918e-02 - 6.690000e+00 8.381888e+00 -9.240025e+00 8.739620e-02 - 6.700000e+00 7.179331e+00 -9.253837e+00 8.758517e-02 - 6.710000e+00 5.961341e+00 -9.267649e+00 8.753185e-02 - 6.720000e+00 4.753851e+00 -9.281461e+00 8.725476e-02 - 6.730000e+00 3.580485e+00 -9.295272e+00 8.684917e-02 - 6.740000e+00 2.461850e+00 -9.309084e+00 8.645577e-02 - 6.750000e+00 1.415025e+00 -9.322896e+00 8.621269e-02 - 6.760000e+00 4.532287e-01 -9.336707e+00 8.620624e-02 - 6.770000e+00 -4.142968e-01 -9.350519e+00 8.643915e-02 - 6.780000e+00 -1.182223e+00 -9.364331e+00 8.682945e-02 - 6.790000e+00 -1.848891e+00 -9.378142e+00 8.724072e-02 - 6.800000e+00 -2.415919e+00 -9.391954e+00 8.753056e-02 - 6.810000e+00 -2.887703e+00 -9.405766e+00 8.759901e-02 - 6.820000e+00 -3.270830e+00 -9.419577e+00 8.742103e-02 - 6.830000e+00 -3.573468e+00 -9.433389e+00 8.705433e-02 - 6.840000e+00 -3.804748e+00 -9.447201e+00 8.662072e-02 - 6.850000e+00 -3.974192e+00 -9.461013e+00 8.626564e-02 - 6.860000e+00 -4.091203e+00 -9.474824e+00 8.610804e-02 - 6.870000e+00 -4.164653e+00 -9.488636e+00 8.619781e-02 - 6.880000e+00 -4.202570e+00 -9.502448e+00 8.649787e-02 - 6.890000e+00 -4.211947e+00 -9.516259e+00 8.689872e-02 - 6.900000e+00 -4.198652e+00 -9.530071e+00 8.725885e-02 - 6.910000e+00 -4.167450e+00 -9.543883e+00 8.745463e-02 - 6.920000e+00 -4.122095e+00 -9.557694e+00 8.742188e-02 - 6.930000e+00 -4.065505e+00 -9.571506e+00 8.717653e-02 - 6.940000e+00 -3.999959e+00 -9.585318e+00 8.680901e-02 - 6.950000e+00 -3.927327e+00 -9.599130e+00 8.645406e-02 - 6.960000e+00 -3.849278e+00 -9.612941e+00 8.624413e-02 - 6.970000e+00 -3.767473e+00 -9.626753e+00 8.626168e-02 - 6.980000e+00 -3.683709e+00 -9.640565e+00 8.650827e-02 - 6.990000e+00 -3.600007e+00 -9.654376e+00 8.690351e-02 - 7.000000e+00 -3.518647e+00 -9.668188e+00 8.731419e-02 - 7.010000e+00 -3.442143e+00 -9.682000e+00 8.760140e-02 - 7.020000e+00 -3.373162e+00 -9.695811e+00 8.766765e-02 - 7.030000e+00 -3.314405e+00 -9.709623e+00 8.748867e-02 - 7.040000e+00 -3.268464e+00 -9.723435e+00 8.712136e-02 - 7.050000e+00 -3.237658e+00 -9.737247e+00 8.668565e-02 - 7.060000e+00 -3.223883e+00 -9.751058e+00 8.632511e-02 - 7.070000e+00 -3.228470e+00 -9.764870e+00 8.615774e-02 - 7.080000e+00 -3.252079e+00 -9.778682e+00 8.623406e-02 - 7.090000e+00 -3.294630e+00 -9.792493e+00 8.651903e-02 - 7.100000e+00 -3.355279e+00 -9.806305e+00 8.690579e-02 - 7.110000e+00 -3.432434e+00 -9.820117e+00 8.725504e-02 - 7.120000e+00 -3.523812e+00 -9.833928e+00 8.744407e-02 - 7.130000e+00 -3.626529e+00 -9.847740e+00 8.740803e-02 - 7.140000e+00 -3.737210e+00 -9.861552e+00 8.716079e-02 - 7.150000e+00 -3.852113e+00 -9.875363e+00 8.679014e-02 - 7.160000e+00 -3.967249e+00 -9.889175e+00 8.642857e-02 - 7.170000e+00 -4.078489e+00 -9.902987e+00 8.620775e-02 - 7.180000e+00 -4.181658e+00 -9.916799e+00 8.621132e-02 - 7.190000e+00 -4.272592e+00 -9.930610e+00 8.644384e-02 - 7.200000e+00 -4.347178e+00 -9.944422e+00 8.682872e-02 - 7.210000e+00 -4.401366e+00 -9.958234e+00 8.723616e-02 - 7.220000e+00 -4.431155e+00 -9.972045e+00 8.752910e-02 - 7.230000e+00 -4.432579e+00 -9.985857e+00 8.760985e-02 - 7.240000e+00 -4.401686e+00 -9.999669e+00 8.745203e-02 - 7.250000e+00 -4.334534e+00 -1.001348e+01 8.710905e-02 - 7.260000e+00 -4.227210e+00 -1.002729e+01 8.669701e-02 - 7.270000e+00 -4.075886e+00 -1.004110e+01 8.635634e-02 - 7.280000e+00 -3.876916e+00 -1.005492e+01 8.620357e-02 - 7.290000e+00 -3.626982e+00 -1.006873e+01 8.628964e-02 - 7.300000e+00 -3.323282e+00 -1.008254e+01 8.658147e-02 - 7.310000e+00 -2.963758e+00 -1.009635e+01 8.697451e-02 - 7.320000e+00 -2.547353e+00 -1.011016e+01 8.733096e-02 - 7.330000e+00 -2.074275e+00 -1.012397e+01 8.752789e-02 - 7.340000e+00 -1.546259e+00 -1.013779e+01 8.749837e-02 - 7.350000e+00 -9.667883e-01 -1.015160e+01 8.725294e-02 - 7.360000e+00 -3.412800e-01 -1.016541e+01 8.687595e-02 - 7.370000e+00 3.228177e-01 -1.017922e+01 8.649780e-02 - 7.380000e+00 1.016010e+00 -1.019303e+01 8.625065e-02 - 7.390000e+00 1.726847e+00 -1.020684e+01 8.622171e-02 - 7.400000e+00 2.442125e+00 -1.022066e+01 8.642147e-02 - 7.410000e+00 3.147204e+00 -1.023447e+01 8.677992e-02 - 7.420000e+00 3.826419e+00 -1.024828e+01 8.717238e-02 - 7.430000e+00 4.463596e+00 -1.026209e+01 8.746396e-02 - 7.440000e+00 5.042623e+00 -1.027590e+01 8.755554e-02 - 7.450000e+00 5.548071e+00 -1.028971e+01 8.741620e-02 - 7.460000e+00 5.965823e+00 -1.030353e+01 8.709278e-02 - 7.470000e+00 6.283678e+00 -1.031734e+01 8.669456e-02 - 7.480000e+00 6.491899e+00 -1.033115e+01 8.635679e-02 - 7.490000e+00 6.583679e+00 -1.034496e+01 8.619412e-02 - 7.500000e+00 6.555482e+00 -1.035877e+01 8.625962e-02 - 7.510000e+00 6.407260e+00 -1.037258e+01 8.652573e-02 - 7.520000e+00 6.142512e+00 -1.038640e+01 8.689495e-02 - 7.530000e+00 5.768195e+00 -1.040021e+01 8.723582e-02 - 7.540000e+00 5.294482e+00 -1.041402e+01 8.742941e-02 - 7.550000e+00 4.734383e+00 -1.042783e+01 8.740958e-02 - 7.560000e+00 4.103251e+00 -1.044164e+01 8.718460e-02 - 7.570000e+00 3.418196e+00 -1.045545e+01 8.683440e-02 - 7.580000e+00 2.697439e+00 -1.046927e+01 8.648406e-02 - 7.590000e+00 1.959645e+00 -1.048308e+01 8.626112e-02 - 7.600000e+00 1.223256e+00 -1.049689e+01 8.625008e-02 - 7.610000e+00 5.058789e-01 -1.051070e+01 8.646118e-02 - 7.620000e+00 -1.762705e-01 -1.052451e+01 8.682625e-02 - 7.630000e+00 -8.088206e-01 -1.053832e+01 8.722328e-02 - 7.640000e+00 -1.379593e+00 -1.055214e+01 8.751959e-02 - 7.650000e+00 -1.878834e+00 -1.056595e+01 8.761687e-02 - 7.660000e+00 -2.299321e+00 -1.057976e+01 8.748327e-02 - 7.670000e+00 -2.636371e+00 -1.059357e+01 8.716352e-02 - 7.680000e+00 -2.887729e+00 -1.060738e+01 8.676455e-02 - 7.690000e+00 -3.053399e+00 -1.062120e+01 8.642026e-02 - 7.700000e+00 -3.135390e+00 -1.063501e+01 8.624582e-02 - 7.710000e+00 -3.137448e+00 -1.064882e+01 8.629701e-02 - 7.720000e+00 -3.064754e+00 -1.066263e+01 8.655023e-02 - 7.730000e+00 -2.923640e+00 -1.067644e+01 8.691194e-02 - 7.740000e+00 -2.721321e+00 -1.069025e+01 8.725297e-02 - 7.750000e+00 -2.465665e+00 -1.070407e+01 8.745415e-02 - 7.760000e+00 -2.165005e+00 -1.071788e+01 8.744637e-02 - 7.770000e+00 -1.827993e+00 -1.073169e+01 8.723295e-02 - 7.780000e+00 -1.463495e+00 -1.074550e+01 8.688815e-02 - 7.790000e+00 -1.080518e+00 -1.075931e+01 8.653246e-02 - 7.800000e+00 -6.881554e-01 -1.077312e+01 8.629153e-02 - 7.810000e+00 -2.955460e-01 -1.078694e+01 8.625170e-02 - 7.820000e+00 8.818105e-02 -1.080075e+01 8.642853e-02 - 7.830000e+00 4.539747e-01 -1.081456e+01 8.676105e-02 - 7.840000e+00 7.929615e-01 -1.082837e+01 8.713417e-02 - 7.850000e+00 1.096579e+00 -1.084218e+01 8.741985e-02 - 7.860000e+00 1.356747e+00 -1.085599e+01 8.752100e-02 - 7.870000e+00 1.566073e+00 -1.086981e+01 8.740354e-02 - 7.880000e+00 1.718081e+00 -1.088362e+01 8.710728e-02 - 7.890000e+00 1.807461e+00 -1.089743e+01 8.673292e-02 - 7.900000e+00 1.830310e+00 -1.091124e+01 8.640862e-02 - 7.910000e+00 1.784361e+00 -1.092505e+01 8.624595e-02 - 7.920000e+00 1.669172e+00 -1.093886e+01 8.630016e-02 - 7.930000e+00 1.486265e+00 -1.095268e+01 8.655020e-02 - 7.940000e+00 1.239192e+00 -1.096649e+01 8.690681e-02 - 7.950000e+00 9.335295e-01 -1.098030e+01 8.724518e-02 - 7.960000e+00 5.767748e-01 -1.099411e+01 8.744885e-02 - 7.970000e+00 1.781685e-01 -1.100792e+01 8.744896e-02 - 7.980000e+00 -2.515741e-01 -1.102173e+01 8.724661e-02 - 7.990000e+00 -7.006017e-01 -1.103555e+01 8.691219e-02 - 8.000000e+00 -1.156323e+00 -1.104936e+01 8.656200e-02 - 8.010000e+00 -1.605844e+00 -1.106317e+01 8.631875e-02 - 8.020000e+00 -2.036420e+00 -1.107698e+01 8.626827e-02 - 8.030000e+00 -2.435906e+00 -1.109079e+01 8.642838e-02 - 8.040000e+00 -2.793178e+00 -1.110460e+01 8.674233e-02 - 8.050000e+00 -3.098512e+00 -1.111842e+01 8.709977e-02 - 8.060000e+00 -3.343890e+00 -1.113223e+01 8.737617e-02 - 8.070000e+00 -3.523241e+00 -1.114604e+01 8.747575e-02 - 8.080000e+00 -3.632589e+00 -1.115985e+01 8.736322e-02 - 8.090000e+00 -3.670114e+00 -1.117366e+01 8.707518e-02 - 8.100000e+00 -3.636133e+00 -1.118747e+01 8.670830e-02 - 8.110000e+00 -3.532999e+00 -1.120129e+01 8.638727e-02 - 8.120000e+00 -3.364936e+00 -1.121510e+01 8.622217e-02 - 8.130000e+00 -3.137818e+00 -1.122891e+01 8.626941e-02 - 8.140000e+00 -2.858915e+00 -1.124272e+01 8.651148e-02 - 8.150000e+00 -2.536611e+00 -1.125653e+01 8.686382e-02 - 8.160000e+00 -2.180124e+00 -1.127034e+01 8.720573e-02 - 8.170000e+00 -1.799223e+00 -1.128416e+01 8.742290e-02 - 8.180000e+00 -1.403965e+00 -1.129797e+01 8.744584e-02 - 8.190000e+00 -1.004458e+00 -1.131178e+01 8.727231e-02 - 8.200000e+00 -6.106442e-01 -1.132559e+01 8.696732e-02 - 8.210000e+00 -2.321136e-01 -1.133940e+01 8.664116e-02 - 8.220000e+00 1.220572e-01 -1.135322e+01 8.641148e-02 - 8.230000e+00 4.434491e-01 -1.136703e+01 8.636156e-02 - 8.240000e+00 7.244291e-01 -1.138084e+01 8.650989e-02 - 8.250000e+00 9.582697e-01 -1.139465e+01 8.680331e-02 - 8.260000e+00 1.139265e+00 -1.140846e+01 8.713658e-02 - 8.270000e+00 1.262844e+00 -1.142227e+01 8.739024e-02 - 8.280000e+00 1.325686e+00 -1.143609e+01 8.747210e-02 - 8.290000e+00 1.325830e+00 -1.144990e+01 8.734839e-02 - 8.300000e+00 1.262779e+00 -1.146371e+01 8.705530e-02 - 8.310000e+00 1.137587e+00 -1.147752e+01 8.668776e-02 - 8.320000e+00 9.529220e-01 -1.149133e+01 8.636844e-02 - 8.330000e+00 7.130975e-01 -1.150514e+01 8.620594e-02 - 8.340000e+00 4.240556e-01 -1.151896e+01 8.625642e-02 - 8.350000e+00 9.329779e-02 -1.153277e+01 8.650321e-02 - 8.360000e+00 -2.702450e-01 -1.154658e+01 8.686301e-02 - 8.370000e+00 -6.564063e-01 -1.156039e+01 8.721593e-02 - 8.380000e+00 -1.054043e+00 -1.157420e+01 8.744716e-02 - 8.390000e+00 -1.451351e+00 -1.158801e+01 8.748512e-02 - 8.400000e+00 -1.836238e+00 -1.160183e+01 8.732405e-02 - 8.410000e+00 -2.196723e+00 -1.161564e+01 8.702498e-02 - 8.420000e+00 -2.521366e+00 -1.162945e+01 8.669490e-02 - 8.430000e+00 -2.799690e+00 -1.164326e+01 8.645018e-02 - 8.440000e+00 -3.022590e+00 -1.165707e+01 8.637573e-02 - 8.450000e+00 -3.182695e+00 -1.167088e+01 8.649456e-02 - 8.460000e+00 -3.274671e+00 -1.168470e+01 8.675976e-02 - 8.470000e+00 -3.295447e+00 -1.169851e+01 8.707235e-02 - 8.480000e+00 -3.244348e+00 -1.171232e+01 8.731743e-02 - 8.490000e+00 -3.123134e+00 -1.172613e+01 8.740456e-02 - 8.500000e+00 -2.935929e+00 -1.173994e+01 8.729860e-02 - 8.510000e+00 -2.689061e+00 -1.175375e+01 8.703170e-02 - 8.520000e+00 -2.390808e+00 -1.176757e+01 8.669304e-02 - 8.530000e+00 -2.051063e+00 -1.178138e+01 8.639925e-02 - 8.540000e+00 -1.680950e+00 -1.179519e+01 8.625415e-02 - 8.550000e+00 -1.292393e+00 -1.180900e+01 8.631147e-02 - 8.560000e+00 -8.976655e-01 -1.182281e+01 8.655493e-02 - 8.570000e+00 -5.089507e-01 -1.183662e+01 8.690379e-02 - 8.580000e+00 -1.379157e-01 -1.185044e+01 8.724170e-02 - 8.590000e+00 2.046711e-01 -1.186425e+01 8.745698e-02 - 8.600000e+00 5.092724e-01 -1.187806e+01 8.747997e-02 - 8.610000e+00 7.678529e-01 -1.189187e+01 8.730537e-02 - 8.620000e+00 9.740860e-01 -1.190568e+01 8.699360e-02 - 8.630000e+00 1.123495e+00 -1.191949e+01 8.665084e-02 - 8.640000e+00 1.213531e+00 -1.193331e+01 8.639336e-02 - 8.650000e+00 1.243602e+00 -1.194712e+01 8.630718e-02 - 8.660000e+00 1.215045e+00 -1.196093e+01 8.641768e-02 - 8.670000e+00 1.131068e+00 -1.197474e+01 8.668092e-02 - 8.680000e+00 9.966652e-01 -1.198855e+01 8.700042e-02 - 8.690000e+00 8.184972e-01 -1.200236e+01 8.726226e-02 - 8.700000e+00 6.047687e-01 -1.201618e+01 8.737496e-02 - 8.710000e+00 3.650812e-01 -1.202999e+01 8.730014e-02 - 8.720000e+00 1.102728e-01 -1.204380e+01 8.706510e-02 - 8.730000e+00 -1.477617e-01 -1.205761e+01 8.675349e-02 - 8.740000e+00 -3.962768e-01 -1.207142e+01 8.647706e-02 - 8.750000e+00 -6.219127e-01 -1.208524e+01 8.633674e-02 - 8.760000e+00 -8.109697e-01 -1.209905e+01 8.638627e-02 - 8.770000e+00 -9.497260e-01 -1.211286e+01 8.661224e-02 - 8.780000e+00 -1.024799e+00 -1.212667e+01 8.693873e-02 - 8.790000e+00 -1.023552e+00 -1.214048e+01 8.725461e-02 - 8.800000e+00 -9.345354e-01 -1.215429e+01 8.745244e-02 - 8.810000e+00 -7.479563e-01 -1.216811e+01 8.746492e-02 - 8.820000e+00 -4.561570e-01 -1.218192e+01 8.728703e-02 - 8.830000e+00 -5.408176e-02 -1.219573e+01 8.697780e-02 - 8.840000e+00 4.602920e-01 -1.220954e+01 8.664106e-02 - 8.850000e+00 1.085586e+00 -1.222335e+01 8.639072e-02 - 8.860000e+00 1.816743e+00 -1.223716e+01 8.631117e-02 - 8.870000e+00 2.644869e+00 -1.225098e+01 8.642725e-02 - 8.880000e+00 3.557207e+00 -1.226479e+01 8.669538e-02 - 8.890000e+00 4.537280e+00 -1.227860e+01 8.701972e-02 - 8.900000e+00 5.565186e+00 -1.229241e+01 8.728657e-02 - 8.910000e+00 6.618072e+00 -1.230622e+01 8.740369e-02 - 8.920000e+00 7.670763e+00 -1.232003e+01 8.733101e-02 - 8.930000e+00 8.696530e+00 -1.233385e+01 8.709356e-02 - 8.940000e+00 9.667974e+00 -1.234766e+01 8.677302e-02 - 8.950000e+00 1.055799e+01 -1.236147e+01 8.648046e-02 - 8.960000e+00 1.134075e+01 -1.237528e+01 8.631808e-02 - 8.970000e+00 1.199270e+01 -1.238909e+01 8.634303e-02 - 8.980000e+00 1.249350e+01 -1.240290e+01 8.654665e-02 - 8.990000e+00 1.282679e+01 -1.241672e+01 8.685784e-02 - 9.000000e+00 1.298090e+01 -1.243053e+01 8.716892e-02 - 9.010000e+00 1.294932e+01 -1.244434e+01 8.737363e-02 - 9.020000e+00 1.273097e+01 -1.245815e+01 8.740326e-02 - 9.030000e+00 1.233022e+01 -1.247196e+01 8.724920e-02 - 9.040000e+00 1.175672e+01 -1.248577e+01 8.696564e-02 - 9.050000e+00 1.102496e+01 -1.249959e+01 8.665154e-02 - 9.060000e+00 1.015368e+01 -1.251340e+01 8.641715e-02 - 9.070000e+00 9.165054e+00 -1.252721e+01 8.634552e-02 - 9.080000e+00 8.083764e+00 -1.254102e+01 8.646260e-02 - 9.090000e+00 6.936027e+00 -1.255483e+01 8.672781e-02 - 9.100000e+00 5.748546e+00 -1.256864e+01 8.704891e-02 - 9.110000e+00 4.547501e+00 -1.258246e+01 8.731494e-02 - 9.120000e+00 3.357612e+00 -1.259627e+01 8.743453e-02 - 9.130000e+00 2.201315e+00 -1.261008e+01 8.736635e-02 - 9.140000e+00 1.098084e+00 -1.262389e+01 8.713241e-02 - 9.150000e+00 6.393724e-02 -1.263770e+01 8.681078e-02 - 9.160000e+00 -8.888679e-01 -1.265151e+01 8.650957e-02 - 9.170000e+00 -1.751948e+00 -1.266533e+01 8.633011e-02 - 9.180000e+00 -2.520712e+00 -1.267914e+01 8.633136e-02 - 9.190000e+00 -3.194120e+00 -1.269295e+01 8.650901e-02 - 9.200000e+00 -3.774287e+00 -1.270676e+01 8.679761e-02 - 9.210000e+00 -4.265986e+00 -1.272057e+01 8.709484e-02 - 9.220000e+00 -4.676078e+00 -1.273438e+01 8.729798e-02 - 9.230000e+00 -5.012897e+00 -1.274820e+01 8.733918e-02 - 9.240000e+00 -5.285654e+00 -1.276201e+01 8.720785e-02 - 9.250000e+00 -5.503858e+00 -1.277582e+01 8.695382e-02 - 9.260000e+00 -5.676820e+00 -1.278963e+01 8.667035e-02 - 9.270000e+00 -5.813222e+00 -1.280344e+01 8.646195e-02 - 9.280000e+00 -5.920798e+00 -1.281725e+01 8.640730e-02 - 9.290000e+00 -6.006108e+00 -1.283107e+01 8.653038e-02 - 9.300000e+00 -6.074419e+00 -1.284488e+01 8.679133e-02 - 9.310000e+00 -6.129667e+00 -1.285869e+01 8.710062e-02 - 9.320000e+00 -6.174503e+00 -1.287250e+01 8.735094e-02 - 9.330000e+00 -6.210392e+00 -1.288631e+01 8.745438e-02 - 9.340000e+00 -6.237755e+00 -1.290013e+01 8.737209e-02 - 9.350000e+00 -6.256124e+00 -1.291394e+01 8.712738e-02 - 9.360000e+00 -6.264304e+00 -1.292775e+01 8.679863e-02 - 9.370000e+00 -6.260523e+00 -1.294156e+01 8.649375e-02 - 9.380000e+00 -6.242561e+00 -1.295537e+01 8.631371e-02 - 9.390000e+00 -6.207852e+00 -1.296918e+01 8.631735e-02 - 9.400000e+00 -6.153565e+00 -1.298300e+01 8.650032e-02 - 9.410000e+00 -6.076659e+00 -1.299681e+01 8.679699e-02 - 9.420000e+00 -5.973936e+00 -1.301062e+01 8.710424e-02 - 9.430000e+00 -5.842086e+00 -1.302443e+01 8.731774e-02 - 9.440000e+00 -5.677740e+00 -1.303824e+01 8.736720e-02 - 9.450000e+00 -5.477554e+00 -1.305205e+01 8.723917e-02 - 9.460000e+00 -5.238312e+00 -1.306587e+01 8.698093e-02 - 9.470000e+00 -4.957070e+00 -1.307968e+01 8.668442e-02 - 9.480000e+00 -4.631329e+00 -1.309349e+01 8.645490e-02 - 9.490000e+00 -4.259246e+00 -1.310730e+01 8.637421e-02 - 9.500000e+00 -3.839860e+00 -1.312111e+01 8.647142e-02 - 9.510000e+00 -3.373332e+00 -1.313492e+01 8.671246e-02 - 9.520000e+00 -2.861170e+00 -1.314874e+01 8.701277e-02 - 9.530000e+00 -2.306436e+00 -1.316255e+01 8.726783e-02 - 9.540000e+00 -1.713899e+00 -1.317636e+01 8.738967e-02 - 9.550000e+00 -1.090124e+00 -1.319017e+01 8.733651e-02 - 9.560000e+00 -4.434820e-01 -1.320398e+01 8.712656e-02 - 9.570000e+00 2.159325e-01 -1.321779e+01 8.683195e-02 - 9.580000e+00 8.764886e-01 -1.323161e+01 8.655460e-02 - 9.590000e+00 1.525300e+00 -1.324542e+01 8.639119e-02 - 9.600000e+00 2.148600e+00 -1.325923e+01 8.639887e-02 - 9.610000e+00 2.732200e+00 -1.327304e+01 8.657453e-02 - 9.620000e+00 3.262001e+00 -1.328685e+01 8.685595e-02 - 9.630000e+00 3.724542e+00 -1.330066e+01 8.714429e-02 - 9.640000e+00 4.107565e+00 -1.331448e+01 8.733899e-02 - 9.650000e+00 4.400543e+00 -1.332829e+01 8.737213e-02 - 9.660000e+00 4.595165e+00 -1.334210e+01 8.723101e-02 - 9.670000e+00 4.685740e+00 -1.335591e+01 8.696239e-02 - 9.680000e+00 4.669497e+00 -1.336972e+01 8.665720e-02 - 9.690000e+00 4.546759e+00 -1.338353e+01 8.642001e-02 - 9.700000e+00 4.320990e+00 -1.339735e+01 8.633296e-02 - 9.710000e+00 3.998700e+00 -1.341116e+01 8.642649e-02 - 9.720000e+00 3.589214e+00 -1.342497e+01 8.666849e-02 - 9.730000e+00 3.104320e+00 -1.343878e+01 8.697614e-02 - 9.740000e+00 2.557813e+00 -1.345259e+01 8.724548e-02 - 9.750000e+00 1.964951e+00 -1.346640e+01 8.738734e-02 - 9.760000e+00 1.341861e+00 -1.348022e+01 8.735698e-02 - 9.770000e+00 7.049174e-01 -1.349403e+01 8.716823e-02 - 9.780000e+00 7.012748e-02 -1.350784e+01 8.688841e-02 - 9.790000e+00 -5.474493e-01 -1.352165e+01 8.661543e-02 - 9.800000e+00 -1.134219e+00 -1.353546e+01 8.644403e-02 - 9.810000e+00 -1.678491e+00 -1.354927e+01 8.643230e-02 - 9.820000e+00 -2.170806e+00 -1.356309e+01 8.658090e-02 - 9.830000e+00 -2.604164e+00 -1.357690e+01 8.683326e-02 - 9.840000e+00 -2.974131e+00 -1.359071e+01 8.709657e-02 - 9.850000e+00 -3.278823e+00 -1.360452e+01 8.727520e-02 - 9.860000e+00 -3.518798e+00 -1.361833e+01 8.730399e-02 - 9.870000e+00 -3.696842e+00 -1.363215e+01 8.717051e-02 - 9.880000e+00 -3.817675e+00 -1.364596e+01 8.691943e-02 - 9.890000e+00 -3.887602e+00 -1.365977e+01 8.663786e-02 - 9.900000e+00 -3.914115e+00 -1.367358e+01 8.642579e-02 - 9.910000e+00 -3.905480e+00 -1.368739e+01 8.636104e-02 - 9.920000e+00 -3.870320e+00 -1.370120e+01 8.647090e-02 - 9.930000e+00 -3.817203e+00 -1.371502e+01 8.672179e-02 - 9.940000e+00 -3.754274e+00 -1.372883e+01 8.703094e-02 - 9.950000e+00 -3.688918e+00 -1.374264e+01 8.729552e-02 - 9.960000e+00 -3.627475e+00 -1.375645e+01 8.742791e-02 - 9.970000e+00 -3.575013e+00 -1.377026e+01 8.738488e-02 - 9.980000e+00 -3.535158e+00 -1.378407e+01 8.718164e-02 - 9.990000e+00 -3.509989e+00 -1.379789e+01 8.688691e-02 - 1.000000e+01 -3.499993e+00 -1.381170e+01 8.660026e-02 - 1.001000e+01 -3.504072e+00 -1.382551e+01 8.641841e-02 - 1.002000e+01 -3.519616e+00 -1.383932e+01 8.640157e-02 - 1.003000e+01 -3.542627e+00 -1.385313e+01 8.655216e-02 - 1.004000e+01 -3.567881e+00 -1.386694e+01 8.681427e-02 - 1.005000e+01 -3.589155e+00 -1.388076e+01 8.709419e-02 - 1.006000e+01 -3.599469e+00 -1.389457e+01 8.729364e-02 - 1.007000e+01 -3.591385e+00 -1.390838e+01 8.734331e-02 - 1.008000e+01 -3.557318e+00 -1.392219e+01 8.722578e-02 - 1.009000e+01 -3.489873e+00 -1.393600e+01 8.698092e-02 - 1.010000e+01 -3.382189e+00 -1.394981e+01 8.669241e-02 - 1.011000e+01 -3.228289e+00 -1.396363e+01 8.645935e-02 - 1.012000e+01 -3.023408e+00 -1.397744e+01 8.636177e-02 - 1.013000e+01 -2.764303e+00 -1.399125e+01 8.643218e-02 - 1.014000e+01 -2.449523e+00 -1.400506e+01 8.664393e-02 - 1.015000e+01 -2.079619e+00 -1.401887e+01 8.692128e-02 - 1.016000e+01 -1.657294e+00 -1.403268e+01 8.716681e-02 - 1.017000e+01 -1.187470e+00 -1.404650e+01 8.729563e-02 - 1.018000e+01 -6.772696e-01 -1.406031e+01 8.726425e-02 - 1.019000e+01 -1.358937e-01 -1.407412e+01 8.708504e-02 - 1.020000e+01 4.255869e-01 -1.408793e+01 8.682200e-02 - 1.021000e+01 9.945439e-01 -1.410174e+01 8.656929e-02 - 1.022000e+01 1.557189e+00 -1.411555e+01 8.641868e-02 - 1.023000e+01 2.099047e+00 -1.412937e+01 8.642691e-02 - 1.024000e+01 2.605490e+00 -1.414318e+01 8.659488e-02 - 1.025000e+01 3.062306e+00 -1.415699e+01 8.686709e-02 - 1.026000e+01 3.456283e+00 -1.417080e+01 8.715138e-02 - 1.027000e+01 3.775775e+00 -1.418461e+01 8.735130e-02 - 1.028000e+01 4.011229e+00 -1.419842e+01 8.739897e-02 - 1.029000e+01 4.155640e+00 -1.421224e+01 8.727770e-02 - 1.030000e+01 4.204914e+00 -1.422605e+01 8.702751e-02 - 1.031000e+01 4.158113e+00 -1.423986e+01 8.673214e-02 - 1.032000e+01 4.017568e+00 -1.425367e+01 8.649118e-02 - 1.033000e+01 3.788855e+00 -1.426748e+01 8.638585e-02 - 1.034000e+01 3.480622e+00 -1.428129e+01 8.645047e-02 - 1.035000e+01 3.104278e+00 -1.429511e+01 8.666030e-02 - 1.036000e+01 2.673553e+00 -1.430892e+01 8.694084e-02 - 1.037000e+01 2.203951e+00 -1.432273e+01 8.719458e-02 - 1.038000e+01 1.712118e+00 -1.433654e+01 8.733498e-02 - 1.039000e+01 1.215153e+00 -1.435035e+01 8.731546e-02 - 1.040000e+01 7.298949e-01 -1.436417e+01 8.714454e-02 - 1.041000e+01 2.722260e-01 -1.437798e+01 8.688261e-02 - 1.042000e+01 -1.435834e-01 -1.439179e+01 8.662157e-02 - 1.043000e+01 -5.054535e-01 -1.440560e+01 8.645317e-02 - 1.044000e+01 -8.039674e-01 -1.441941e+01 8.643676e-02 - 1.045000e+01 -1.032717e+00 -1.443322e+01 8.657798e-02 - 1.046000e+01 -1.188507e+00 -1.444704e+01 8.682686e-02 - 1.047000e+01 -1.271401e+00 -1.446085e+01 8.709613e-02 - 1.048000e+01 -1.284622e+00 -1.447466e+01 8.729218e-02 - 1.049000e+01 -1.234299e+00 -1.448847e+01 8.734732e-02 - 1.050000e+01 -1.129080e+00 -1.450228e+01 8.724243e-02 - 1.051000e+01 -9.796357e-01 -1.451609e+01 8.701305e-02 - 1.052000e+01 -7.980667e-01 -1.452991e+01 8.673757e-02 - 1.053000e+01 -5.972583e-01 -1.454372e+01 8.651054e-02 - 1.054000e+01 -3.902032e-01 -1.455753e+01 8.640985e-02 - 1.055000e+01 -1.893300e-01 -1.457134e+01 8.646890e-02 - 1.056000e+01 -5.868969e-03 -1.458515e+01 8.666457e-02 - 1.057000e+01 1.507162e-01 -1.459896e+01 8.692576e-02 - 1.058000e+01 2.732033e-01 -1.461278e+01 8.715906e-02 - 1.059000e+01 3.569721e-01 -1.462659e+01 8.728155e-02 - 1.060000e+01 4.002350e-01 -1.464040e+01 8.724917e-02 - 1.061000e+01 4.041267e-01 -1.465421e+01 8.707157e-02 - 1.062000e+01 3.726514e-01 -1.466802e+01 8.680913e-02 - 1.063000e+01 3.124882e-01 -1.468183e+01 8.655297e-02 - 1.064000e+01 2.326669e-01 -1.469565e+01 8.639387e-02 - 1.065000e+01 1.441274e-01 -1.470946e+01 8.639026e-02 - 1.066000e+01 5.918253e-02 -1.472327e+01 8.654709e-02 - 1.067000e+01 -9.089408e-03 -1.473708e+01 8.681372e-02 - 1.068000e+01 -4.749838e-02 -1.475089e+01 8.710195e-02 - 1.069000e+01 -4.341128e-02 -1.476470e+01 8.731675e-02 - 1.070000e+01 1.459279e-02 -1.477852e+01 8.738842e-02 - 1.071000e+01 1.361100e-01 -1.479233e+01 8.729542e-02 - 1.072000e+01 3.283693e-01 -1.480614e+01 8.707112e-02 - 1.073000e+01 5.957845e-01 -1.481995e+01 8.679261e-02 - 1.074000e+01 9.396214e-01 -1.483376e+01 8.655478e-02 - 1.075000e+01 1.357797e+00 -1.484757e+01 8.643778e-02 - 1.076000e+01 1.844820e+00 -1.486139e+01 8.647898e-02 - 1.077000e+01 2.391879e+00 -1.487520e+01 8.665995e-02 - 1.078000e+01 2.987079e+00 -1.488901e+01 8.691370e-02 - 1.079000e+01 3.615810e+00 -1.490282e+01 8.714917e-02 - 1.080000e+01 4.261249e+00 -1.491663e+01 8.728329e-02 - 1.081000e+01 4.904966e+00 -1.493044e+01 8.726934e-02 - 1.082000e+01 5.527609e+00 -1.494426e+01 8.711234e-02 - 1.083000e+01 6.109646e+00 -1.495807e+01 8.686715e-02 - 1.084000e+01 6.632134e+00 -1.497188e+01 8.661987e-02 - 1.085000e+01 7.077476e+00 -1.498569e+01 8.645806e-02 - 1.086000e+01 7.430133e+00 -1.499950e+01 8.643983e-02 - 1.087000e+01 7.677269e+00 -1.501331e+01 8.657274e-02 - 1.088000e+01 7.809287e+00 -1.502713e+01 8.681111e-02 - 1.089000e+01 7.820243e+00 -1.504094e+01 8.707253e-02 - 1.090000e+01 7.708102e+00 -1.505475e+01 8.726713e-02 - 1.091000e+01 7.474844e+00 -1.506856e+01 8.732861e-02 - 1.092000e+01 7.126393e+00 -1.508237e+01 8.723654e-02 - 1.093000e+01 6.672383e+00 -1.509619e+01 8.702312e-02 - 1.094000e+01 6.125769e+00 -1.511000e+01 8.676251e-02 - 1.095000e+01 5.502291e+00 -1.512381e+01 8.654572e-02 - 1.096000e+01 4.819826e+00 -1.513762e+01 8.644903e-02 - 1.097000e+01 4.097651e+00 -1.515143e+01 8.650673e-02 - 1.098000e+01 3.355657e+00 -1.516524e+01 8.669867e-02 - 1.099000e+01 2.613538e+00 -1.517906e+01 8.695747e-02 - 1.100000e+01 1.890007e+00 -1.519287e+01 8.719265e-02 - 1.101000e+01 1.202072e+00 -1.520668e+01 8.732212e-02 - 1.102000e+01 5.644048e-01 -1.522049e+01 8.730016e-02 - 1.103000e+01 -1.117578e-02 -1.523430e+01 8.713260e-02 - 1.104000e+01 -5.160635e-01 -1.524811e+01 8.687511e-02 - 1.105000e+01 -9.450700e-01 -1.526193e+01 8.661474e-02 - 1.106000e+01 -1.296459e+00 -1.527574e+01 8.644044e-02 - 1.107000e+01 -1.571811e+00 -1.528955e+01 8.641206e-02 - 1.108000e+01 -1.775734e+00 -1.530336e+01 8.653895e-02 - 1.109000e+01 -1.915430e+00 -1.531717e+01 8.677666e-02 - 1.110000e+01 -2.000150e+00 -1.533098e+01 8.704302e-02 - 1.111000e+01 -2.040561e+00 -1.534480e+01 8.724705e-02 - 1.112000e+01 -2.048072e+00 -1.535861e+01 8.732011e-02 - 1.113000e+01 -2.034146e+00 -1.537242e+01 8.723861e-02 - 1.114000e+01 -2.009629e+00 -1.538623e+01 8.703151e-02 - 1.115000e+01 -1.984157e+00 -1.540004e+01 8.677052e-02 - 1.116000e+01 -1.965642e+00 -1.541385e+01 8.654577e-02 - 1.117000e+01 -1.959882e+00 -1.542767e+01 8.643477e-02 - 1.118000e+01 -1.970309e+00 -1.544148e+01 8.647500e-02 - 1.119000e+01 -1.997881e+00 -1.545529e+01 8.665064e-02 - 1.120000e+01 -2.041129e+00 -1.546910e+01 8.689860e-02 - 1.121000e+01 -2.096343e+00 -1.548291e+01 8.713137e-02 - 1.122000e+01 -2.157899e+00 -1.549672e+01 8.726780e-02 - 1.123000e+01 -2.218678e+00 -1.551054e+01 8.726082e-02 - 1.124000e+01 -2.270590e+00 -1.552435e+01 8.711302e-02 - 1.125000e+01 -2.305135e+00 -1.553816e+01 8.687573e-02 - 1.126000e+01 -2.313987e+00 -1.555197e+01 8.663170e-02 - 1.127000e+01 -2.289573e+00 -1.556578e+01 8.646671e-02 - 1.128000e+01 -2.225594e+00 -1.557959e+01 8.643942e-02 - 1.129000e+01 -2.117479e+00 -1.559341e+01 8.656027e-02 - 1.130000e+01 -1.962742e+00 -1.560722e+01 8.678773e-02 - 1.131000e+01 -1.761217e+00 -1.562103e+01 8.704332e-02 - 1.132000e+01 -1.515167e+00 -1.563484e+01 8.723945e-02 - 1.133000e+01 -1.229262e+00 -1.564865e+01 8.730965e-02 - 1.134000e+01 -9.104208e-01 -1.566246e+01 8.723088e-02 - 1.135000e+01 -5.675403e-01 -1.567628e+01 8.703110e-02 - 1.136000e+01 -2.111127e-01 -1.569009e+01 8.677987e-02 - 1.137000e+01 1.472366e-01 -1.570390e+01 8.656488e-02 - 1.138000e+01 4.952728e-01 -1.571771e+01 8.646148e-02 - 1.139000e+01 8.207056e-01 -1.573152e+01 8.650596e-02 - 1.140000e+01 1.111748e+00 -1.574533e+01 8.668240e-02 - 1.141000e+01 1.357647e+00 -1.575915e+01 8.692850e-02 - 1.142000e+01 1.549171e+00 -1.577296e+01 8.715797e-02 - 1.143000e+01 1.679013e+00 -1.578677e+01 8.729070e-02 - 1.144000e+01 1.742111e+00 -1.580058e+01 8.728018e-02 - 1.145000e+01 1.735857e+00 -1.581439e+01 8.712905e-02 - 1.146000e+01 1.660190e+00 -1.582820e+01 8.688833e-02 - 1.147000e+01 1.517580e+00 -1.584202e+01 8.664048e-02 - 1.148000e+01 1.312886e+00 -1.585583e+01 8.647135e-02 - 1.149000e+01 1.053117e+00 -1.586964e+01 8.644017e-02 - 1.150000e+01 7.471025e-01 -1.588345e+01 8.655827e-02 - 1.151000e+01 4.050765e-01 -1.589726e+01 8.678499e-02 - 1.152000e+01 3.822206e-02 -1.591108e+01 8.704223e-02 - 1.153000e+01 -3.418258e-01 -1.592489e+01 8.724198e-02 - 1.154000e+01 -7.234805e-01 -1.593870e+01 8.731646e-02 - 1.155000e+01 -1.095689e+00 -1.595251e+01 8.724078e-02 - 1.156000e+01 -1.448379e+00 -1.596632e+01 8.704099e-02 - 1.157000e+01 -1.772845e+00 -1.598013e+01 8.678539e-02 - 1.158000e+01 -2.062066e+00 -1.599395e+01 8.656163e-02 - 1.159000e+01 -2.310919e+00 -1.600776e+01 8.644656e-02 - 1.160000e+01 -2.516314e+00 -1.602157e+01 8.647927e-02 - 1.161000e+01 -2.677205e+00 -1.603538e+01 8.664723e-02 - 1.162000e+01 -2.794523e+00 -1.604919e+01 8.689108e-02 - 1.163000e+01 -2.870991e+00 -1.606300e+01 8.712607e-02 - 1.164000e+01 -2.910869e+00 -1.607682e+01 8.727177e-02 - 1.165000e+01 -2.919626e+00 -1.609063e+01 8.727937e-02 - 1.166000e+01 -2.903548e+00 -1.610444e+01 8.714783e-02 - 1.167000e+01 -2.869334e+00 -1.611825e+01 8.692387e-02 - 1.168000e+01 -2.823663e+00 -1.613206e+01 8.668616e-02 - 1.169000e+01 -2.772784e+00 -1.614587e+01 8.651824e-02 - 1.170000e+01 -2.722144e+00 -1.615969e+01 8.647921e-02 - 1.171000e+01 -2.676059e+00 -1.617350e+01 8.658254e-02 - 1.172000e+01 -2.637473e+00 -1.618731e+01 8.679125e-02 - 1.173000e+01 -2.607795e+00 -1.620112e+01 8.703142e-02 - 1.174000e+01 -2.586832e+00 -1.621493e+01 8.721852e-02 - 1.175000e+01 -2.572831e+00 -1.622874e+01 8.728674e-02 - 1.176000e+01 -2.562607e+00 -1.624256e+01 8.721136e-02 - 1.177000e+01 -2.551775e+00 -1.625637e+01 8.701698e-02 - 1.178000e+01 -2.535058e+00 -1.627018e+01 8.676945e-02 - 1.179000e+01 -2.506656e+00 -1.628399e+01 8.655367e-02 - 1.180000e+01 -2.460660e+00 -1.629780e+01 8.644429e-02 - 1.181000e+01 -2.391487e+00 -1.631161e+01 8.647926e-02 - 1.182000e+01 -2.294308e+00 -1.632543e+01 8.664617e-02 - 1.183000e+01 -2.165445e+00 -1.633924e+01 8.688672e-02 - 1.184000e+01 -2.002710e+00 -1.635305e+01 8.711760e-02 - 1.185000e+01 -1.805678e+00 -1.636686e+01 8.725964e-02 - 1.186000e+01 -1.575853e+00 -1.638067e+01 8.726476e-02 - 1.187000e+01 -1.316743e+00 -1.639448e+01 8.713197e-02 - 1.188000e+01 -1.033807e+00 -1.640830e+01 8.690762e-02 - 1.189000e+01 -7.343041e-01 -1.642211e+01 8.666991e-02 - 1.190000e+01 -4.270274e-01 -1.643592e+01 8.650215e-02 - 1.191000e+01 -1.219464e-01 -1.644973e+01 8.646365e-02 - 1.192000e+01 1.702256e-01 -1.646354e+01 8.656845e-02 - 1.193000e+01 4.385179e-01 -1.647735e+01 8.678025e-02 - 1.194000e+01 6.722155e-01 -1.649117e+01 8.702549e-02 - 1.195000e+01 8.613718e-01 -1.650498e+01 8.721939e-02 - 1.196000e+01 9.972917e-01 -1.651879e+01 8.729525e-02 - 1.197000e+01 1.072960e+00 -1.653260e+01 8.722691e-02 - 1.198000e+01 1.083388e+00 -1.654641e+01 8.703750e-02 - 1.199000e+01 1.025863e+00 -1.656022e+01 8.679182e-02 - 1.200000e+01 9.000883e-01 -1.657404e+01 8.657464e-02 - 1.201000e+01 7.081926e-01 -1.658785e+01 8.646157e-02 - 1.202000e+01 4.546330e-01 -1.660166e+01 8.649249e-02 - 1.203000e+01 1.459752e-01 -1.661547e+01 8.665720e-02 - 1.204000e+01 -2.094234e-01 -1.662928e+01 8.689918e-02 - 1.205000e+01 -6.018116e-01 -1.664310e+01 8.713577e-02 - 1.206000e+01 -1.020500e+00 -1.665691e+01 8.728698e-02 - 1.207000e+01 -1.454349e+00 -1.667072e+01 8.730257e-02 - 1.208000e+01 -1.892254e+00 -1.668453e+01 8.717861e-02 - 1.209000e+01 -2.323611e+00 -1.669834e+01 8.695856e-02 - 1.210000e+01 -2.738726e+00 -1.671215e+01 8.671861e-02 - 1.211000e+01 -3.129152e+00 -1.672597e+01 8.654174e-02 - 1.212000e+01 -3.487930e+00 -1.673978e+01 8.648877e-02 - 1.213000e+01 -3.809734e+00 -1.675359e+01 8.657682e-02 - 1.214000e+01 -4.090900e+00 -1.676740e+01 8.677324e-02 - 1.215000e+01 -4.329355e+00 -1.678121e+01 8.700753e-02 - 1.216000e+01 -4.524443e+00 -1.679502e+01 8.719647e-02 - 1.217000e+01 -4.676680e+00 -1.680884e+01 8.727295e-02 - 1.218000e+01 -4.787434e+00 -1.682265e+01 8.720863e-02 - 1.219000e+01 -4.858581e+00 -1.683646e+01 8.702334e-02 - 1.220000e+01 -4.892147e+00 -1.685027e+01 8.677848e-02 - 1.221000e+01 -4.889964e+00 -1.686408e+01 8.655639e-02 - 1.222000e+01 -4.853374e+00 -1.687789e+01 8.643217e-02 - 1.223000e+01 -4.782995e+00 -1.689171e+01 8.644725e-02 - 1.224000e+01 -4.678572e+00 -1.690552e+01 8.659482e-02 - 1.225000e+01 -4.538928e+00 -1.691933e+01 8.682247e-02 - 1.226000e+01 -4.362009e+00 -1.693314e+01 8.705119e-02 - 1.227000e+01 -4.145042e+00 -1.694695e+01 8.720315e-02 - 1.228000e+01 -3.884773e+00 -1.696076e+01 8.722833e-02 - 1.229000e+01 -3.577793e+00 -1.697458e+01 8.712105e-02 - 1.230000e+01 -3.220920e+00 -1.698839e+01 8.692162e-02 - 1.231000e+01 -2.811608e+00 -1.700220e+01 8.670249e-02 - 1.232000e+01 -2.348369e+00 -1.701601e+01 8.654327e-02 - 1.233000e+01 -1.831168e+00 -1.702982e+01 8.650268e-02 - 1.234000e+01 -1.261761e+00 -1.704363e+01 8.659741e-02 - 1.235000e+01 -6.439623e-01 -1.705745e+01 8.679596e-02 - 1.236000e+01 1.619533e-02 -1.707126e+01 8.702998e-02 - 1.237000e+01 7.104125e-01 -1.708507e+01 8.721853e-02 - 1.238000e+01 1.428205e+00 -1.709888e+01 8.729621e-02 - 1.239000e+01 2.157113e+00 -1.711269e+01 8.723538e-02 - 1.240000e+01 2.883035e+00 -1.712650e+01 8.705554e-02 - 1.241000e+01 3.590672e+00 -1.714032e+01 8.681702e-02 - 1.242000e+01 4.264062e+00 -1.715413e+01 8.660088e-02 - 1.243000e+01 4.887185e+00 -1.716794e+01 8.648117e-02 - 1.244000e+01 5.444599e+00 -1.718175e+01 8.649889e-02 - 1.245000e+01 5.922081e+00 -1.719556e+01 8.664741e-02 - 1.246000e+01 6.307240e+00 -1.720937e+01 8.687486e-02 - 1.247000e+01 6.590063e+00 -1.722319e+01 8.710268e-02 - 1.248000e+01 6.763375e+00 -1.723700e+01 8.725305e-02 - 1.249000e+01 6.823174e+00 -1.725081e+01 8.727533e-02 - 1.250000e+01 6.768833e+00 -1.726462e+01 8.716280e-02 - 1.251000e+01 6.603155e+00 -1.727843e+01 8.695464e-02 - 1.252000e+01 6.332272e+00 -1.729224e+01 8.672268e-02 - 1.253000e+01 5.965397e+00 -1.730606e+01 8.654691e-02 - 1.254000e+01 5.514443e+00 -1.731987e+01 8.648757e-02 - 1.255000e+01 4.993524e+00 -1.733368e+01 8.656378e-02 - 1.256000e+01 4.418364e+00 -1.734749e+01 8.674682e-02 - 1.257000e+01 3.805654e+00 -1.736130e+01 8.697064e-02 - 1.258000e+01 3.172377e+00 -1.737512e+01 8.715550e-02 - 1.259000e+01 2.535149e+00 -1.738893e+01 8.723579e-02 - 1.260000e+01 1.909600e+00 -1.740274e+01 8.718240e-02 - 1.261000e+01 1.309839e+00 -1.741655e+01 8.701253e-02 - 1.262000e+01 7.480110e-01 -1.743036e+01 8.678406e-02 - 1.263000e+01 2.339870e-01 -1.744417e+01 8.657617e-02 - 1.264000e+01 -2.248141e-01 -1.745799e+01 8.646206e-02 - 1.265000e+01 -6.234624e-01 -1.747180e+01 8.648318e-02 - 1.266000e+01 -9.594159e-01 -1.748561e+01 8.663426e-02 - 1.267000e+01 -1.232294e+00 -1.749942e+01 8.686518e-02 - 1.268000e+01 -1.443546e+00 -1.751323e+01 8.709868e-02 - 1.269000e+01 -1.596039e+00 -1.752704e+01 8.725726e-02 - 1.270000e+01 -1.693595e+00 -1.754086e+01 8.728943e-02 - 1.271000e+01 -1.740512e+00 -1.755467e+01 8.718665e-02 - 1.272000e+01 -1.741106e+00 -1.756848e+01 8.698587e-02 - 1.273000e+01 -1.699295e+00 -1.758229e+01 8.675708e-02 - 1.274000e+01 -1.618267e+00 -1.759610e+01 8.657944e-02 - 1.275000e+01 -1.500248e+00 -1.760991e+01 8.651388e-02 - 1.276000e+01 -1.346380e+00 -1.762373e+01 8.658162e-02 - 1.277000e+01 -1.156738e+00 -1.763754e+01 8.675681e-02 - 1.278000e+01 -9.304549e-01 -1.765135e+01 8.697617e-02 - 1.279000e+01 -6.659689e-01 -1.766516e+01 8.716167e-02 - 1.280000e+01 -3.613674e-01 -1.767897e+01 8.724787e-02 - 1.281000e+01 -1.479615e-02 -1.769278e+01 8.720413e-02 - 1.282000e+01 3.750883e-01 -1.770660e+01 8.704486e-02 - 1.283000e+01 8.086627e-01 -1.772041e+01 8.682463e-02 - 1.284000e+01 1.284911e+00 -1.773422e+01 8.661965e-02 - 1.285000e+01 1.801066e+00 -1.774803e+01 8.650142e-02 - 1.286000e+01 2.352344e+00 -1.776184e+01 8.651145e-02 - 1.287000e+01 2.931804e+00 -1.777565e+01 8.664630e-02 - 1.288000e+01 3.530348e+00 -1.778947e+01 8.685881e-02 - 1.289000e+01 4.136866e+00 -1.780328e+01 8.707494e-02 - 1.290000e+01 4.738538e+00 -1.781709e+01 8.721979e-02 - 1.291000e+01 5.321262e+00 -1.783090e+01 8.724332e-02 - 1.292000e+01 5.870205e+00 -1.784471e+01 8.713713e-02 - 1.293000e+01 6.370443e+00 -1.785852e+01 8.693730e-02 - 1.294000e+01 6.807651e+00 -1.787234e+01 8.671240e-02 - 1.295000e+01 7.168799e+00 -1.788615e+01 8.654021e-02 - 1.296000e+01 7.442828e+00 -1.789996e+01 8.648076e-02 - 1.297000e+01 7.621238e+00 -1.791377e+01 8.655504e-02 - 1.298000e+01 7.698580e+00 -1.792758e+01 8.673754e-02 - 1.299000e+01 7.672791e+00 -1.794139e+01 8.696542e-02 - 1.300000e+01 7.545364e+00 -1.795521e+01 8.716080e-02 - 1.301000e+01 7.321336e+00 -1.796902e+01 8.725769e-02 - 1.302000e+01 7.009091e+00 -1.798283e+01 8.722421e-02 - 1.303000e+01 6.619978e+00 -1.799664e+01 8.707300e-02 - 1.304000e+01 6.167776e+00 -1.801045e+01 8.685689e-02 - 1.305000e+01 5.668028e+00 -1.802426e+01 8.665092e-02 - 1.306000e+01 5.137281e+00 -1.803808e+01 8.652655e-02 - 1.307000e+01 4.592276e+00 -1.805189e+01 8.652657e-02 - 1.308000e+01 4.049143e+00 -1.806570e+01 8.664985e-02 - 1.309000e+01 3.522635e+00 -1.807951e+01 8.685195e-02 - 1.310000e+01 3.025452e+00 -1.809332e+01 8.706123e-02 - 1.311000e+01 2.567700e+00 -1.810714e+01 8.720411e-02 - 1.312000e+01 2.156499e+00 -1.812095e+01 8.723055e-02 - 1.313000e+01 1.795783e+00 -1.813476e+01 8.713085e-02 - 1.314000e+01 1.486275e+00 -1.814857e+01 8.693898e-02 - 1.315000e+01 1.225663e+00 -1.816238e+01 8.672112e-02 - 1.316000e+01 1.008933e+00 -1.817619e+01 8.655317e-02 - 1.317000e+01 8.288618e-01 -1.819001e+01 8.649430e-02 - 1.318000e+01 6.766120e-01 -1.820382e+01 8.656584e-02 - 1.319000e+01 5.424062e-01 -1.821763e+01 8.674359e-02 - 1.320000e+01 4.162247e-01 -1.823144e+01 8.696646e-02 - 1.321000e+01 2.884859e-01 -1.824525e+01 8.715806e-02 - 1.322000e+01 1.506670e-01 -1.825906e+01 8.725317e-02 - 1.323000e+01 -4.176142e-03 -1.827288e+01 8.721970e-02 - 1.324000e+01 -1.810185e-01 -1.828669e+01 8.706934e-02 - 1.325000e+01 -3.826260e-01 -1.830050e+01 8.685354e-02 - 1.326000e+01 -6.094786e-01 -1.831431e+01 8.664622e-02 - 1.327000e+01 -8.598531e-01 -1.832812e+01 8.651835e-02 - 1.328000e+01 -1.130056e+00 -1.834193e+01 8.651319e-02 - 1.329000e+01 -1.414786e+00 -1.835575e+01 8.663091e-02 - 1.330000e+01 -1.707590e+00 -1.836956e+01 8.682878e-02 - 1.331000e+01 -2.001388e+00 -1.838337e+01 8.703661e-02 - 1.332000e+01 -2.289020e+00 -1.839718e+01 8.718159e-02 - 1.333000e+01 -2.563773e+00 -1.841099e+01 8.721341e-02 - 1.334000e+01 -2.819863e+00 -1.842480e+01 8.712116e-02 - 1.335000e+01 -3.052826e+00 -1.843862e+01 8.693697e-02 - 1.336000e+01 -3.259805e+00 -1.845243e+01 8.672516e-02 - 1.337000e+01 -3.439707e+00 -1.846624e+01 8.656022e-02 - 1.338000e+01 -3.593226e+00 -1.848005e+01 8.650086e-02 - 1.339000e+01 -3.722743e+00 -1.849386e+01 8.656903e-02 - 1.340000e+01 -3.832096e+00 -1.850767e+01 8.674195e-02 - 1.341000e+01 -3.926265e+00 -1.852149e+01 8.696027e-02 - 1.342000e+01 -4.010981e+00 -1.853530e+01 8.714905e-02 - 1.343000e+01 -4.092286e+00 -1.854911e+01 8.724376e-02 - 1.344000e+01 -4.176105e+00 -1.856292e+01 8.721219e-02 - 1.345000e+01 -4.267821e+00 -1.857673e+01 8.706518e-02 - 1.346000e+01 -4.371916e+00 -1.859054e+01 8.685304e-02 - 1.347000e+01 -4.491687e+00 -1.860436e+01 8.664868e-02 - 1.348000e+01 -4.629050e+00 -1.861817e+01 8.652270e-02 - 1.349000e+01 -4.784448e+00 -1.863198e+01 8.651870e-02 - 1.350000e+01 -4.956864e+00 -1.864579e+01 8.663784e-02 - 1.351000e+01 -5.143928e+00 -1.865960e+01 8.683855e-02 - 1.352000e+01 -5.342101e+00 -1.867341e+01 8.705148e-02 - 1.353000e+01 -5.546924e+00 -1.868723e+01 8.720391e-02 - 1.354000e+01 -5.753306e+00 -1.870104e+01 8.724463e-02 - 1.355000e+01 -5.955817e+00 -1.871485e+01 8.716110e-02 - 1.356000e+01 -6.148971e+00 -1.872866e+01 8.698342e-02 - 1.357000e+01 -6.327478e+00 -1.874247e+01 8.677405e-02 - 1.358000e+01 -6.486436e+00 -1.875628e+01 8.660648e-02 - 1.359000e+01 -6.621461e+00 -1.877010e+01 8.653958e-02 - 1.360000e+01 -6.728749e+00 -1.878391e+01 8.659674e-02 - 1.361000e+01 -6.805065e+00 -1.879772e+01 8.675746e-02 - 1.362000e+01 -6.847679e+00 -1.881153e+01 8.696484e-02 - 1.363000e+01 -6.854252e+00 -1.882534e+01 8.714585e-02 - 1.364000e+01 -6.822699e+00 -1.883915e+01 8.723680e-02 - 1.365000e+01 -6.751047e+00 -1.885297e+01 8.720513e-02 - 1.366000e+01 -6.637312e+00 -1.886678e+01 8.706033e-02 - 1.367000e+01 -6.479411e+00 -1.888059e+01 8.685082e-02 - 1.368000e+01 -6.275138e+00 -1.889440e+01 8.664769e-02 - 1.369000e+01 -6.022197e+00 -1.890821e+01 8.652037e-02 - 1.370000e+01 -5.718318e+00 -1.892203e+01 8.651225e-02 - 1.371000e+01 -5.361436e+00 -1.893584e+01 8.662527e-02 - 1.372000e+01 -4.949941e+00 -1.894965e+01 8.681930e-02 - 1.373000e+01 -4.482964e+00 -1.896346e+01 8.702647e-02 - 1.374000e+01 -3.960701e+00 -1.897727e+01 8.717513e-02 - 1.375000e+01 -3.384724e+00 -1.899108e+01 8.721440e-02 - 1.376000e+01 -2.758268e+00 -1.900490e+01 8.713130e-02 - 1.377000e+01 -2.086466e+00 -1.901871e+01 8.695496e-02 - 1.378000e+01 -1.376492e+00 -1.903252e+01 8.674677e-02 - 1.379000e+01 -6.376060e-01 -1.904633e+01 8.657948e-02 - 1.380000e+01 1.189154e-01 -1.906014e+01 8.651187e-02 - 1.381000e+01 8.799825e-01 -1.907395e+01 8.656795e-02 - 1.382000e+01 1.631013e+00 -1.908777e+01 8.672833e-02 - 1.383000e+01 2.356368e+00 -1.910158e+01 8.693729e-02 - 1.384000e+01 3.039881e+00 -1.911539e+01 8.712256e-02 - 1.385000e+01 3.665462e+00 -1.912920e+01 8.722057e-02 - 1.386000e+01 4.217727e+00 -1.914301e+01 8.719805e-02 - 1.387000e+01 4.682640e+00 -1.915682e+01 8.706323e-02 - 1.388000e+01 5.048115e+00 -1.917064e+01 8.686301e-02 - 1.389000e+01 5.304554e+00 -1.918445e+01 8.666718e-02 - 1.390000e+01 5.445279e+00 -1.919826e+01 8.654443e-02 - 1.391000e+01 5.466843e+00 -1.921207e+01 8.653820e-02 - 1.392000e+01 5.369194e+00 -1.922588e+01 8.665117e-02 - 1.393000e+01 5.155694e+00 -1.923969e+01 8.684424e-02 - 1.394000e+01 4.832977e+00 -1.925351e+01 8.705052e-02 - 1.395000e+01 4.410678e+00 -1.926732e+01 8.719880e-02 - 1.396000e+01 3.901022e+00 -1.928113e+01 8.723803e-02 - 1.397000e+01 3.318331e+00 -1.929494e+01 8.715449e-02 - 1.398000e+01 2.678455e+00 -1.930875e+01 8.697640e-02 - 1.399000e+01 1.998167e+00 -1.932256e+01 8.676445e-02 - 1.400000e+01 1.294562e+00 -1.933638e+01 8.659131e-02 - 1.401000e+01 5.844846e-01 -1.935019e+01 8.651647e-02 - 1.402000e+01 -1.159802e-01 -1.936400e+01 8.656534e-02 - 1.403000e+01 -7.919358e-01 -1.937781e+01 8.672021e-02 - 1.404000e+01 -1.430003e+00 -1.939162e+01 8.692668e-02 - 1.405000e+01 -2.018545e+00 -1.940543e+01 8.711310e-02 - 1.406000e+01 -2.547779e+00 -1.941925e+01 8.721543e-02 - 1.407000e+01 -3.009802e+00 -1.943306e+01 8.719908e-02 - 1.408000e+01 -3.398520e+00 -1.944687e+01 8.707031e-02 - 1.409000e+01 -3.709518e+00 -1.946068e+01 8.687410e-02 - 1.410000e+01 -3.939893e+00 -1.947449e+01 8.667883e-02 - 1.411000e+01 -4.088053e+00 -1.948830e+01 8.655280e-02 - 1.412000e+01 -4.153539e+00 -1.950212e+01 8.654022e-02 - 1.413000e+01 -4.136856e+00 -1.951593e+01 8.664544e-02 - 1.414000e+01 -4.039348e+00 -1.952974e+01 8.683144e-02 - 1.415000e+01 -3.863122e+00 -1.954355e+01 8.703311e-02 - 1.416000e+01 -3.611024e+00 -1.955736e+01 8.718022e-02 - 1.417000e+01 -3.286660e+00 -1.957117e+01 8.722168e-02 - 1.418000e+01 -2.894460e+00 -1.958499e+01 8.714281e-02 - 1.419000e+01 -2.439767e+00 -1.959880e+01 8.697027e-02 - 1.420000e+01 -1.928925e+00 -1.961261e+01 8.676321e-02 - 1.421000e+01 -1.369369e+00 -1.962642e+01 8.659313e-02 - 1.422000e+01 -7.696641e-01 -1.964023e+01 8.651919e-02 - 1.423000e+01 -1.395087e-01 -1.965405e+01 8.656721e-02 - 1.424000e+01 5.103362e-01 -1.966786e+01 8.672041e-02 - 1.425000e+01 1.168189e+00 -1.968167e+01 8.692539e-02 - 1.426000e+01 1.821671e+00 -1.969548e+01 8.711108e-02 - 1.427000e+01 2.457998e+00 -1.970929e+01 8.721334e-02 - 1.428000e+01 3.064343e+00 -1.972310e+01 8.719685e-02 - 1.429000e+01 3.628244e+00 -1.973692e+01 8.706682e-02 - 1.430000e+01 4.138038e+00 -1.975073e+01 8.686730e-02 - 1.431000e+01 4.583296e+00 -1.976454e+01 8.666640e-02 - 1.432000e+01 4.955240e+00 -1.977835e+01 8.653308e-02 - 1.433000e+01 5.247099e+00 -1.979216e+01 8.651313e-02 - 1.434000e+01 5.454396e+00 -1.980597e+01 8.661301e-02 - 1.435000e+01 5.575138e+00 -1.981979e+01 8.679766e-02 - 1.436000e+01 5.609900e+00 -1.983360e+01 8.700313e-02 - 1.437000e+01 5.561781e+00 -1.984741e+01 8.715912e-02 - 1.438000e+01 5.436253e+00 -1.986122e+01 8.721313e-02 - 1.439000e+01 5.240895e+00 -1.987503e+01 8.714810e-02 - 1.440000e+01 4.985026e+00 -1.988884e+01 8.698788e-02 - 1.441000e+01 4.679273e+00 -1.990266e+01 8.678910e-02 - 1.442000e+01 4.335075e+00 -1.991647e+01 8.662183e-02 - 1.443000e+01 3.964178e+00 -1.993028e+01 8.654520e-02 - 1.444000e+01 3.578123e+00 -1.994409e+01 8.658651e-02 - 1.445000e+01 3.187783e+00 -1.995790e+01 8.673150e-02 - 1.446000e+01 2.802954e+00 -1.997171e+01 8.692952e-02 - 1.447000e+01 2.432023e+00 -1.998553e+01 8.711160e-02 - 1.448000e+01 2.081747e+00 -1.999934e+01 8.721460e-02 - 1.449000e+01 1.757120e+00 -2.001315e+01 8.720277e-02 - 1.450000e+01 1.461361e+00 -2.002696e+01 8.707979e-02 - 1.451000e+01 1.195997e+00 -2.004077e+01 8.688753e-02 - 1.452000e+01 9.610290e-01 -2.005458e+01 8.669200e-02 - 1.453000e+01 7.551803e-01 -2.006840e+01 8.656071e-02 - 1.454000e+01 5.761841e-01 -2.008221e+01 8.653907e-02 - 1.455000e+01 4.211026e-01 -2.009602e+01 8.663426e-02 - 1.456000e+01 2.866464e-01 -2.010983e+01 8.681266e-02 - 1.457000e+01 1.694743e-01 -2.012364e+01 8.701187e-02 - 1.458000e+01 6.645185e-02 -2.013745e+01 8.716272e-02 - 1.459000e+01 -2.514443e-02 -2.015127e+01 8.721308e-02 - 1.460000e+01 -1.074894e-01 -2.016508e+01 8.714545e-02 - 1.461000e+01 -1.821416e-01 -2.017889e+01 8.698281e-02 - 1.462000e+01 -2.500448e-01 -2.019270e+01 8.678086e-02 - 1.463000e+01 -3.115920e-01 -2.020651e+01 8.660920e-02 - 1.464000e+01 -3.667410e-01 -2.022032e+01 8.652729e-02 - 1.465000e+01 -4.151668e-01 -2.023414e+01 8.656352e-02 - 1.466000e+01 -4.564340e-01 -2.024795e+01 8.670512e-02 - 1.467000e+01 -4.901719e-01 -2.026176e+01 8.690285e-02 - 1.468000e+01 -5.162349e-01 -2.027557e+01 8.708850e-02 - 1.469000e+01 -5.348347e-01 -2.028938e+01 8.719871e-02 - 1.470000e+01 -5.466305e-01 -2.030319e+01 8.719651e-02 - 1.471000e+01 -5.527720e-01 -2.031701e+01 8.708366e-02 - 1.472000e+01 -5.548896e-01 -2.033082e+01 8.689996e-02 - 1.473000e+01 -5.550346e-01 -2.034463e+01 8.670973e-02 - 1.474000e+01 -5.555731e-01 -2.035844e+01 8.657974e-02 - 1.475000e+01 -5.590439e-01 -2.037225e+01 8.655587e-02 - 1.476000e+01 -5.679911e-01 -2.038607e+01 8.664678e-02 - 1.477000e+01 -5.847853e-01 -2.039988e+01 8.682083e-02 - 1.478000e+01 -6.114465e-01 -2.041369e+01 8.701749e-02 - 1.479000e+01 -6.494827e-01 -2.042750e+01 8.716862e-02 - 1.480000e+01 -6.997548e-01 -2.044131e+01 8.722207e-02 - 1.481000e+01 -7.623785e-01 -2.045512e+01 8.715926e-02 - 1.482000e+01 -8.366678e-01 -2.046894e+01 8.700137e-02 - 1.483000e+01 -9.211228e-01 -2.048275e+01 8.680223e-02 - 1.484000e+01 -1.013463e+00 -2.049656e+01 8.663007e-02 - 1.485000e+01 -1.110697e+00 -2.051037e+01 8.654393e-02 - 1.486000e+01 -1.209235e+00 -2.052418e+01 8.657293e-02 - 1.487000e+01 -1.305011e+00 -2.053799e+01 8.670590e-02 - 1.488000e+01 -1.393638e+00 -2.055181e+01 8.689546e-02 - 1.489000e+01 -1.470557e+00 -2.056562e+01 8.707496e-02 - 1.490000e+01 -1.531186e+00 -2.057943e+01 8.718178e-02 - 1.491000e+01 -1.571064e+00 -2.059324e+01 8.717868e-02 - 1.492000e+01 -1.585969e+00 -2.060705e+01 8.706638e-02 - 1.493000e+01 -1.572029e+00 -2.062086e+01 8.688319e-02 - 1.494000e+01 -1.525798e+00 -2.063468e+01 8.669216e-02 - 1.495000e+01 -1.444329e+00 -2.064849e+01 8.655945e-02 - 1.496000e+01 -1.325218e+00 -2.066230e+01 8.653123e-02 - 1.497000e+01 -1.166644e+00 -2.067611e+01 8.661736e-02 - 1.498000e+01 -9.674051e-01 -2.068992e+01 8.678785e-02 - 1.499000e+01 -7.269469e-01 -2.070373e+01 8.698363e-02 - 1.500000e+01 -4.454000e-01 -2.071755e+01 8.713743e-02 - 1.501000e+01 -1.236221e-01 -2.073136e+01 8.719695e-02 - 1.502000e+01 2.367538e-01 -2.074517e+01 8.714255e-02 - 1.503000e+01 6.332650e-01 -2.075898e+01 8.699371e-02 - 1.504000e+01 1.062564e+00 -2.077279e+01 8.680245e-02 - 1.505000e+01 1.520368e+00 -2.078660e+01 8.663558e-02 - 1.506000e+01 2.001423e+00 -2.080042e+01 8.655162e-02 - 1.507000e+01 2.499483e+00 -2.081423e+01 8.658014e-02 - 1.508000e+01 3.007331e+00 -2.082804e+01 8.671129e-02 - 1.509000e+01 3.516827e+00 -2.084185e+01 8.689934e-02 - 1.510000e+01 4.019008e+00 -2.085566e+01 8.707903e-02 - 1.511000e+01 4.504236e+00 -2.086947e+01 8.718840e-02 - 1.512000e+01 4.962400e+00 -2.088329e+01 8.719001e-02 - 1.513000e+01 5.383163e+00 -2.089710e+01 8.708351e-02 - 1.514000e+01 5.756255e+00 -2.091091e+01 8.690578e-02 - 1.515000e+01 6.071799e+00 -2.092472e+01 8.671843e-02 - 1.516000e+01 6.320652e+00 -2.093853e+01 8.658676e-02 - 1.517000e+01 6.494763e+00 -2.095234e+01 8.655692e-02 - 1.518000e+01 6.587501e+00 -2.096616e+01 8.663953e-02 - 1.519000e+01 6.593970e+00 -2.097997e+01 8.680590e-02 - 1.520000e+01 6.511261e+00 -2.099378e+01 8.699829e-02 - 1.521000e+01 6.338644e+00 -2.100759e+01 8.715026e-02 - 1.522000e+01 6.077686e+00 -2.102140e+01 8.720959e-02 - 1.523000e+01 5.732276e+00 -2.103521e+01 8.715597e-02 - 1.524000e+01 5.308559e+00 -2.104903e+01 8.700773e-02 - 1.525000e+01 4.814774e+00 -2.106284e+01 8.681567e-02 - 1.526000e+01 4.261014e+00 -2.107665e+01 8.664582e-02 - 1.527000e+01 3.658895e+00 -2.109046e+01 8.655666e-02 - 1.528000e+01 3.021173e+00 -2.110427e+01 8.657858e-02 - 1.529000e+01 2.361305e+00 -2.111808e+01 8.670310e-02 - 1.530000e+01 1.692992e+00 -2.113190e+01 8.688598e-02 - 1.531000e+01 1.029719e+00 -2.114571e+01 8.706302e-02 - 1.532000e+01 3.843055e-01 -2.115952e+01 8.717253e-02 - 1.533000e+01 -2.314983e-01 -2.117333e+01 8.717646e-02 - 1.534000e+01 -8.073607e-01 -2.118714e+01 8.707316e-02 - 1.535000e+01 -1.334647e+00 -2.120096e+01 8.689792e-02 - 1.536000e+01 -1.806617e+00 -2.121477e+01 8.671103e-02 - 1.537000e+01 -2.218534e+00 -2.122858e+01 8.657716e-02 - 1.538000e+01 -2.567686e+00 -2.124239e+01 8.654282e-02 - 1.539000e+01 -2.853326e+00 -2.125620e+01 8.661987e-02 - 1.540000e+01 -3.076533e+00 -2.127001e+01 8.678136e-02 - 1.541000e+01 -3.240015e+00 -2.128383e+01 8.697121e-02 - 1.542000e+01 -3.347861e+00 -2.129764e+01 8.712405e-02 - 1.543000e+01 -3.405258e+00 -2.131145e+01 8.718786e-02 - 1.544000e+01 -3.418200e+00 -2.132526e+01 8.714159e-02 - 1.545000e+01 -3.393192e+00 -2.133907e+01 8.700214e-02 - 1.546000e+01 -3.336974e+00 -2.135288e+01 8.681863e-02 - 1.547000e+01 -3.256275e+00 -2.136670e+01 8.665566e-02 - 1.548000e+01 -3.157593e+00 -2.138051e+01 8.657086e-02 - 1.549000e+01 -3.047040e+00 -2.139432e+01 8.659456e-02 - 1.550000e+01 -2.930208e+00 -2.140813e+01 8.671892e-02 - 1.551000e+01 -2.812102e+00 -2.142194e+01 8.690064e-02 - 1.552000e+01 -2.697099e+00 -2.143575e+01 8.707639e-02 - 1.553000e+01 -2.588949e+00 -2.144957e+01 8.718490e-02 - 1.554000e+01 -2.490803e+00 -2.146338e+01 8.718799e-02 - 1.555000e+01 -2.405253e+00 -2.147719e+01 8.708347e-02 - 1.556000e+01 -2.334388e+00 -2.149100e+01 8.690596e-02 - 1.557000e+01 -2.279846e+00 -2.150481e+01 8.671539e-02 - 1.558000e+01 -2.242860e+00 -2.151862e+01 8.657662e-02 - 1.559000e+01 -2.224294e+00 -2.153244e+01 8.653701e-02 - 1.560000e+01 -2.224665e+00 -2.154625e+01 8.660975e-02 - 1.561000e+01 -2.244148e+00 -2.156006e+01 8.676924e-02 - 1.562000e+01 -2.282567e+00 -2.157387e+01 8.696030e-02 - 1.563000e+01 -2.339377e+00 -2.158768e+01 8.711762e-02 - 1.564000e+01 -2.413641e+00 -2.160149e+01 8.718828e-02 - 1.565000e+01 -2.504009e+00 -2.161531e+01 8.714959e-02 - 1.566000e+01 -2.608694e+00 -2.162912e+01 8.701652e-02 - 1.567000e+01 -2.725478e+00 -2.164293e+01 8.683646e-02 - 1.568000e+01 -2.851718e+00 -2.165674e+01 8.667307e-02 - 1.569000e+01 -2.984382e+00 -2.167055e+01 8.658420e-02 - 1.570000e+01 -3.120107e+00 -2.168436e+01 8.660152e-02 - 1.571000e+01 -3.255281e+00 -2.169818e+01 8.671925e-02 - 1.572000e+01 -3.386141e+00 -2.171199e+01 8.689629e-02 - 1.573000e+01 -3.508893e+00 -2.172580e+01 8.707088e-02 - 1.574000e+01 -3.619842e+00 -2.173961e+01 8.718225e-02 - 1.575000e+01 -3.715524e+00 -2.175342e+01 8.719152e-02 - 1.576000e+01 -3.792840e+00 -2.176723e+01 8.709476e-02 - 1.577000e+01 -3.849176e+00 -2.178105e+01 8.692438e-02 - 1.578000e+01 -3.882504e+00 -2.179486e+01 8.673815e-02 - 1.579000e+01 -3.891464e+00 -2.180867e+01 8.659954e-02 - 1.580000e+01 -3.875416e+00 -2.182248e+01 8.655563e-02 - 1.581000e+01 -3.834455e+00 -2.183629e+01 8.662049e-02 - 1.582000e+01 -3.769399e+00 -2.185010e+01 8.677023e-02 - 1.583000e+01 -3.681745e+00 -2.186392e+01 8.695160e-02 - 1.584000e+01 -3.573588e+00 -2.187773e+01 8.710090e-02 - 1.585000e+01 -3.447530e+00 -2.189154e+01 8.716604e-02 - 1.586000e+01 -3.306553e+00 -2.190535e+01 8.712429e-02 - 1.587000e+01 -3.153896e+00 -2.191916e+01 8.698994e-02 - 1.588000e+01 -2.992916e+00 -2.193298e+01 8.680943e-02 - 1.589000e+01 -2.826957e+00 -2.194679e+01 8.664565e-02 - 1.590000e+01 -2.659230e+00 -2.196060e+01 8.655622e-02 - 1.591000e+01 -2.492706e+00 -2.197441e+01 8.657323e-02 - 1.592000e+01 -2.330024e+00 -2.198822e+01 8.669178e-02 - 1.593000e+01 -2.173434e+00 -2.200203e+01 8.687175e-02 - 1.594000e+01 -2.024744e+00 -2.201585e+01 8.705200e-02 - 1.595000e+01 -1.885313e+00 -2.202966e+01 8.717166e-02 - 1.596000e+01 -1.756044e+00 -2.204347e+01 8.719096e-02 - 1.597000e+01 -1.637404e+00 -2.205728e+01 8.710449e-02 - 1.598000e+01 -1.529458e+00 -2.207109e+01 8.694291e-02 - 1.599000e+01 -1.431911e+00 -2.208490e+01 8.676253e-02 - 1.600000e+01 -1.344145e+00 -2.209872e+01 8.662605e-02 - 1.601000e+01 -1.265271e+00 -2.211253e+01 8.658077e-02 - 1.602000e+01 -1.194158e+00 -2.212634e+01 8.664190e-02 - 1.603000e+01 -1.129475e+00 -2.214015e+01 8.678723e-02 - 1.604000e+01 -1.069708e+00 -2.215396e+01 8.696517e-02 - 1.605000e+01 -1.013175e+00 -2.216777e+01 8.711310e-02 - 1.606000e+01 -9.580365e-01 -2.218159e+01 8.717913e-02 - 1.607000e+01 -9.022976e-01 -2.219540e+01 8.713980e-02 - 1.608000e+01 -8.438092e-01 -2.220921e+01 8.700803e-02 - 1.609000e+01 -7.802728e-01 -2.222302e+01 8.682870e-02 - 1.610000e+01 -7.092517e-01 -2.223683e+01 8.666351e-02 - 1.611000e+01 -6.281935e-01 -2.225064e+01 8.656967e-02 - 1.612000e+01 -5.344664e-01 -2.226446e+01 8.657978e-02 - 1.613000e+01 -4.254127e-01 -2.227827e+01 8.669028e-02 - 1.614000e+01 -2.984207e-01 -2.229208e+01 8.686268e-02 - 1.615000e+01 -1.510139e-01 -2.230589e+01 8.703726e-02 - 1.616000e+01 1.904334e-02 -2.231970e+01 8.715393e-02 - 1.617000e+01 2.136275e-01 -2.233351e+01 8.717286e-02 - 1.618000e+01 4.341297e-01 -2.234733e+01 8.708780e-02 - 1.619000e+01 6.813283e-01 -2.236114e+01 8.692818e-02 - 1.620000e+01 9.552663e-01 -2.237495e+01 8.674911e-02 - 1.621000e+01 1.255142e+00 -2.238876e+01 8.661257e-02 - 1.622000e+01 1.579220e+00 -2.240257e+01 8.656588e-02 - 1.623000e+01 1.924770e+00 -2.241638e+01 8.662499e-02 - 1.624000e+01 2.288039e+00 -2.243020e+01 8.676888e-02 - 1.625000e+01 2.664263e+00 -2.244401e+01 8.694708e-02 - 1.626000e+01 3.047722e+00 -2.245782e+01 8.709763e-02 - 1.627000e+01 3.431836e+00 -2.247163e+01 8.716854e-02 - 1.628000e+01 3.809304e+00 -2.248544e+01 8.713550e-02 - 1.629000e+01 4.172289e+00 -2.249925e+01 8.701008e-02 - 1.630000e+01 4.512626e+00 -2.251307e+01 8.683574e-02 - 1.631000e+01 4.822073e+00 -2.252688e+01 8.667314e-02 - 1.632000e+01 5.092568e+00 -2.254069e+01 8.657922e-02 - 1.633000e+01 5.316504e+00 -2.255450e+01 8.658719e-02 - 1.634000e+01 5.487003e+00 -2.256831e+01 8.669477e-02 - 1.635000e+01 5.598176e+00 -2.258212e+01 8.686500e-02 - 1.636000e+01 5.645362e+00 -2.259594e+01 8.703936e-02 - 1.637000e+01 5.625337e+00 -2.260975e+01 8.715825e-02 - 1.638000e+01 5.536483e+00 -2.262356e+01 8.718141e-02 - 1.639000e+01 5.378903e+00 -2.263737e+01 8.710144e-02 - 1.640000e+01 5.154495e+00 -2.265118e+01 8.694617e-02 - 1.641000e+01 4.866954e+00 -2.266500e+01 8.676927e-02 - 1.642000e+01 4.521731e+00 -2.267881e+01 8.663185e-02 - 1.643000e+01 4.125925e+00 -2.269262e+01 8.658129e-02 - 1.644000e+01 3.688121e+00 -2.270643e+01 8.663452e-02 - 1.645000e+01 3.218184e+00 -2.272024e+01 8.677209e-02 - 1.646000e+01 2.727006e+00 -2.273405e+01 8.694519e-02 - 1.647000e+01 2.226214e+00 -2.274787e+01 8.709303e-02 - 1.648000e+01 1.727859e+00 -2.276168e+01 8.716397e-02 - 1.649000e+01 1.244083e+00 -2.277549e+01 8.713314e-02 - 1.650000e+01 7.867764e-01 -2.278930e+01 8.701083e-02 - 1.651000e+01 3.672473e-01 -2.280311e+01 8.683899e-02 - 1.652000e+01 -4.106897e-03 -2.281692e+01 8.667696e-02 - 1.653000e+01 -3.180983e-01 -2.283074e+01 8.658105e-02 - 1.654000e+01 -5.670198e-01 -2.284455e+01 8.658475e-02 - 1.655000e+01 -7.448772e-01 -2.285836e+01 8.668684e-02 - 1.656000e+01 -8.475763e-01 -2.287217e+01 8.685183e-02 - 1.657000e+01 -8.730600e-01 -2.288598e+01 8.702265e-02 - 1.658000e+01 -8.213907e-01 -2.289979e+01 8.714060e-02 - 1.659000e+01 -6.947757e-01 -2.291361e+01 8.716553e-02 - 1.660000e+01 -4.975349e-01 -2.292742e+01 8.708940e-02 - 1.661000e+01 -2.360089e-01 -2.294123e+01 8.693890e-02 - 1.662000e+01 8.158785e-02 -2.295504e+01 8.676641e-02 - 1.663000e+01 4.453688e-01 -2.296885e+01 8.663207e-02 - 1.664000e+01 8.440257e-01 -2.298266e+01 8.658288e-02 - 1.665000e+01 1.265123e+00 -2.299648e+01 8.663604e-02 - 1.666000e+01 1.695427e+00 -2.301029e+01 8.677288e-02 - 1.667000e+01 2.121268e+00 -2.302410e+01 8.694556e-02 - 1.668000e+01 2.528916e+00 -2.303791e+01 8.709395e-02 - 1.669000e+01 2.904967e+00 -2.305172e+01 8.716660e-02 - 1.670000e+01 3.236733e+00 -2.306553e+01 8.713823e-02 - 1.671000e+01 3.512608e+00 -2.307935e+01 8.701830e-02 - 1.672000e+01 3.722423e+00 -2.309316e+01 8.684779e-02 - 1.673000e+01 3.857756e+00 -2.310697e+01 8.668536e-02 - 1.674000e+01 3.912201e+00 -2.312078e+01 8.658717e-02 - 1.675000e+01 3.881580e+00 -2.313459e+01 8.658725e-02 - 1.676000e+01 3.764095e+00 -2.314840e+01 8.668542e-02 - 1.677000e+01 3.560410e+00 -2.316222e+01 8.684746e-02 - 1.678000e+01 3.273652e+00 -2.317603e+01 8.701727e-02 - 1.679000e+01 2.909355e+00 -2.318984e+01 8.713655e-02 - 1.680000e+01 2.475305e+00 -2.320365e+01 8.716485e-02 - 1.681000e+01 1.981337e+00 -2.321746e+01 8.709319e-02 - 1.682000e+01 1.439047e+00 -2.323127e+01 8.694702e-02 - 1.683000e+01 8.614615e-01 -2.324509e+01 8.677753e-02 - 1.684000e+01 2.626474e-01 -2.325890e+01 8.664413e-02 - 1.685000e+01 -3.427034e-01 -2.327271e+01 8.659376e-02 - 1.686000e+01 -9.397152e-01 -2.328652e+01 8.664432e-02 - 1.687000e+01 -1.513775e+00 -2.330033e+01 8.677822e-02 - 1.688000e+01 -2.050971e+00 -2.331414e+01 8.694875e-02 - 1.689000e+01 -2.538503e+00 -2.332796e+01 8.709653e-02 - 1.690000e+01 -2.965063e+00 -2.334177e+01 8.717022e-02 - 1.691000e+01 -3.321160e+00 -2.335558e+01 8.714398e-02 - 1.692000e+01 -3.599382e+00 -2.336939e+01 8.702621e-02 - 1.693000e+01 -3.794593e+00 -2.338320e+01 8.685672e-02 - 1.694000e+01 -3.904057e+00 -2.339702e+01 8.669324e-02 - 1.695000e+01 -3.927475e+00 -2.341083e+01 8.659162e-02 - 1.696000e+01 -3.866950e+00 -2.342464e+01 8.658630e-02 - 1.697000e+01 -3.726880e+00 -2.343845e+01 8.667811e-02 - 1.698000e+01 -3.513775e+00 -2.345226e+01 8.683405e-02 - 1.699000e+01 -3.236015e+00 -2.346607e+01 8.699912e-02 - 1.700000e+01 -2.903556e+00 -2.347989e+01 8.711559e-02 - 1.701000e+01 -2.527597e+00 -2.349370e+01 8.714296e-02 - 1.702000e+01 -2.120218e+00 -2.350751e+01 8.707167e-02 - 1.703000e+01 -1.694000e+00 -2.352132e+01 8.692631e-02 - 1.704000e+01 -1.261644e+00 -2.353513e+01 8.675731e-02 - 1.705000e+01 -8.356002e-01 -2.354894e+01 8.662374e-02 - 1.706000e+01 -4.277182e-01 -2.356276e+01 8.657281e-02 - 1.707000e+01 -4.892143e-02 -2.357657e+01 8.662316e-02 - 1.708000e+01 2.910743e-01 -2.359038e+01 8.675822e-02 - 1.709000e+01 5.840006e-01 -2.360419e+01 8.693214e-02 - 1.710000e+01 8.232263e-01 -2.361800e+01 8.708590e-02 - 1.711000e+01 1.003896e+00 -2.363181e+01 8.716778e-02 - 1.712000e+01 1.123014e+00 -2.364563e+01 8.715096e-02 - 1.713000e+01 1.179478e+00 -2.365944e+01 8.704241e-02 - 1.714000e+01 1.174056e+00 -2.367325e+01 8.688049e-02 - 1.715000e+01 1.109323e+00 -2.368706e+01 8.672189e-02 - 1.716000e+01 9.895443e-01 -2.370087e+01 8.662208e-02 - 1.717000e+01 8.205209e-01 -2.371468e+01 8.661594e-02 - 1.718000e+01 6.094028e-01 -2.372850e+01 8.670535e-02 - 1.719000e+01 3.644659e-01 -2.374231e+01 8.685859e-02 - 1.720000e+01 9.486754e-02 -2.375612e+01 8.702171e-02 - 1.721000e+01 -1.896189e-01 -2.376993e+01 8.713742e-02 - 1.722000e+01 -4.788820e-01 -2.378374e+01 8.716496e-02 - 1.723000e+01 -7.627576e-01 -2.379755e+01 8.709387e-02 - 1.724000e+01 -1.031315e+00 -2.381137e+01 8.694759e-02 - 1.725000e+01 -1.275137e+00 -2.382518e+01 8.677555e-02 - 1.726000e+01 -1.485587e+00 -2.383899e+01 8.663639e-02 - 1.727000e+01 -1.655059e+00 -2.385280e+01 8.657763e-02 - 1.728000e+01 -1.777198e+00 -2.386661e+01 8.661901e-02 - 1.729000e+01 -1.847091e+00 -2.388042e+01 8.674544e-02 - 1.730000e+01 -1.861422e+00 -2.389424e+01 8.691249e-02 - 1.731000e+01 -1.818574e+00 -2.390805e+01 8.706206e-02 - 1.732000e+01 -1.718697e+00 -2.392186e+01 8.714263e-02 - 1.733000e+01 -1.563709e+00 -2.393567e+01 8.712675e-02 - 1.734000e+01 -1.357258e+00 -2.394948e+01 8.702031e-02 - 1.735000e+01 -1.104620e+00 -2.396329e+01 8.686045e-02 - 1.736000e+01 -8.125520e-01 -2.397711e+01 8.670292e-02 - 1.737000e+01 -4.890906e-01 -2.399092e+01 8.660293e-02 - 1.738000e+01 -1.433124e-01 -2.400473e+01 8.659576e-02 - 1.739000e+01 2.149441e-01 -2.401854e+01 8.668431e-02 - 1.740000e+01 5.753838e-01 -2.403235e+01 8.683806e-02 - 1.741000e+01 9.275768e-01 -2.404616e+01 8.700392e-02 - 1.742000e+01 1.261287e+00 -2.405998e+01 8.712489e-02 - 1.743000e+01 1.566793e+00 -2.407379e+01 8.715968e-02 - 1.744000e+01 1.835197e+00 -2.408760e+01 8.709670e-02 - 1.745000e+01 2.058695e+00 -2.410141e+01 8.695786e-02 - 1.746000e+01 2.230823e+00 -2.411522e+01 8.679122e-02 - 1.747000e+01 2.346639e+00 -2.412903e+01 8.665454e-02 - 1.748000e+01 2.402862e+00 -2.414285e+01 8.659530e-02 - 1.749000e+01 2.397953e+00 -2.415666e+01 8.663394e-02 - 1.750000e+01 2.332120e+00 -2.417047e+01 8.675670e-02 - 1.751000e+01 2.207283e+00 -2.418428e+01 8.692050e-02 - 1.752000e+01 2.026962e+00 -2.419809e+01 8.706826e-02 - 1.753000e+01 1.796122e+00 -2.421191e+01 8.714880e-02 - 1.754000e+01 1.520973e+00 -2.422572e+01 8.713429e-02 - 1.755000e+01 1.208728e+00 -2.423953e+01 8.702966e-02 - 1.756000e+01 8.673386e-01 -2.425334e+01 8.687089e-02 - 1.757000e+01 5.052165e-01 -2.426715e+01 8.671285e-02 - 1.758000e+01 1.309496e-01 -2.428096e+01 8.661037e-02 - 1.759000e+01 -2.469724e-01 -2.429478e+01 8.659908e-02 - 1.760000e+01 -6.204145e-01 -2.430859e+01 8.668283e-02 - 1.761000e+01 -9.818255e-01 -2.432240e+01 8.683227e-02 - 1.762000e+01 -1.324432e+00 -2.433621e+01 8.699534e-02 - 1.763000e+01 -1.642390e+00 -2.435002e+01 8.711552e-02 - 1.764000e+01 -1.930898e+00 -2.436383e+01 8.715136e-02 - 1.765000e+01 -2.186256e+00 -2.437765e+01 8.709049e-02 - 1.766000e+01 -2.405888e+00 -2.439146e+01 8.695380e-02 - 1.767000e+01 -2.588317e+00 -2.440527e+01 8.678836e-02 - 1.768000e+01 -2.733104e+00 -2.441908e+01 8.665140e-02 - 1.769000e+01 -2.840752e+00 -2.443289e+01 8.659050e-02 - 1.770000e+01 -2.912593e+00 -2.444670e+01 8.662688e-02 - 1.771000e+01 -2.950643e+00 -2.446052e+01 8.674783e-02 - 1.772000e+01 -2.957458e+00 -2.447433e+01 8.691132e-02 - 1.773000e+01 -2.935981e+00 -2.448814e+01 8.706087e-02 - 1.774000e+01 -2.889393e+00 -2.450195e+01 8.714520e-02 - 1.775000e+01 -2.820974e+00 -2.451576e+01 8.713574e-02 - 1.776000e+01 -2.733977e+00 -2.452957e+01 8.703622e-02 - 1.777000e+01 -2.631524e+00 -2.454339e+01 8.688139e-02 - 1.778000e+01 -2.516520e+00 -2.455720e+01 8.672516e-02 - 1.779000e+01 -2.391589e+00 -2.457101e+01 8.662212e-02 - 1.780000e+01 -2.259035e+00 -2.458482e+01 8.660840e-02 - 1.781000e+01 -2.120827e+00 -2.459863e+01 8.668891e-02 - 1.782000e+01 -1.978597e+00 -2.461244e+01 8.683560e-02 - 1.783000e+01 -1.833662e+00 -2.462626e+01 8.699740e-02 - 1.784000e+01 -1.687057e+00 -2.464007e+01 8.711823e-02 - 1.785000e+01 -1.539578e+00 -2.465388e+01 8.715627e-02 - 1.786000e+01 -1.391838e+00 -2.466769e+01 8.709820e-02 - 1.787000e+01 -1.244314e+00 -2.468150e+01 8.696366e-02 - 1.788000e+01 -1.097405e+00 -2.469531e+01 8.679860e-02 - 1.789000e+01 -9.514796e-01 -2.470913e+01 8.665973e-02 - 1.790000e+01 -8.069198e-01 -2.472294e+01 8.659487e-02 - 1.791000e+01 -6.641559e-01 -2.473675e+01 8.662618e-02 - 1.792000e+01 -5.236915e-01 -2.475056e+01 8.674239e-02 - 1.793000e+01 -3.861179e-01 -2.476437e+01 8.690283e-02 - 1.794000e+01 -2.521187e-01 -2.477818e+01 8.705183e-02 - 1.795000e+01 -1.224641e-01 -2.479200e+01 8.713817e-02 - 1.796000e+01 2.002381e-03 -2.480581e+01 8.713247e-02 - 1.797000e+01 1.203851e-01 -2.481962e+01 8.703715e-02 - 1.798000e+01 2.317610e-01 -2.483343e+01 8.688545e-02 - 1.799000e+01 3.352080e-01 -2.484724e+01 8.673017e-02 - 1.800000e+01 4.298322e-01 -2.486105e+01 8.662547e-02 - 1.801000e+01 5.147948e-01 -2.487487e+01 8.660800e-02 - 1.802000e+01 5.893341e-01 -2.488868e+01 8.668387e-02 - 1.803000e+01 6.527827e-01 -2.490249e+01 8.682659e-02 - 1.804000e+01 7.045791e-01 -2.491630e+01 8.698645e-02 - 1.805000e+01 7.442724e-01 -2.493011e+01 8.710806e-02 - 1.806000e+01 7.715211e-01 -2.494393e+01 8.714944e-02 - 1.807000e+01 7.860873e-01 -2.495774e+01 8.709627e-02 - 1.808000e+01 7.878271e-01 -2.497155e+01 8.696669e-02 - 1.809000e+01 7.766795e-01 -2.498536e+01 8.680515e-02 - 1.810000e+01 7.526563e-01 -2.499917e+01 8.666724e-02 - 1.811000e+01 7.158358e-01 -2.501298e+01 8.660047e-02 - 1.812000e+01 6.663611e-01 -2.502680e+01 8.662762e-02 - 1.813000e+01 6.044479e-01 -2.504061e+01 8.673865e-02 - 1.814000e+01 5.303998e-01 -2.505442e+01 8.689440e-02 - 1.815000e+01 4.446352e-01 -2.506823e+01 8.704050e-02 - 1.816000e+01 3.477236e-01 -2.508204e+01 8.712634e-02 - 1.817000e+01 2.404307e-01 -2.509585e+01 8.712243e-02 - 1.818000e+01 1.237700e-01 -2.510967e+01 8.703037e-02 - 1.819000e+01 -9.416308e-04 -2.512348e+01 8.688225e-02 - 1.820000e+01 -1.320299e-01 -2.513729e+01 8.672973e-02 - 1.821000e+01 -2.674146e-01 -2.515110e+01 8.662628e-02 - 1.822000e+01 -4.045726e-01 -2.516491e+01 8.660846e-02 - 1.823000e+01 -5.405171e-01 -2.517872e+01 8.668296e-02 - 1.824000e+01 -6.717992e-01 -2.519254e+01 8.682420e-02 - 1.825000e+01 -7.945361e-01 -2.520635e+01 8.698340e-02 - 1.826000e+01 -9.044691e-01 -2.522016e+01 8.710574e-02 - 1.827000e+01 -9.970535e-01 -2.523397e+01 8.714922e-02 - 1.828000e+01 -1.067581e+00 -2.524778e+01 8.709899e-02 - 1.829000e+01 -1.111334e+00 -2.526159e+01 8.697229e-02 - 1.830000e+01 -1.123760e+00 -2.527541e+01 8.681263e-02 - 1.831000e+01 -1.100680e+00 -2.528922e+01 8.667502e-02 - 1.832000e+01 -1.038493e+00 -2.530303e+01 8.660692e-02 - 1.833000e+01 -9.343971e-01 -2.531684e+01 8.663167e-02 - 1.834000e+01 -7.865948e-01 -2.533065e+01 8.674018e-02 - 1.835000e+01 -5.944846e-01 -2.534446e+01 8.689429e-02 - 1.836000e+01 -3.588183e-01 -2.535828e+01 8.704028e-02 - 1.837000e+01 -8.181862e-02 -2.537209e+01 8.712763e-02 - 1.838000e+01 2.327552e-01 -2.538590e+01 8.712632e-02 - 1.839000e+01 5.796003e-01 -2.539971e+01 8.703698e-02 - 1.840000e+01 9.519272e-01 -2.541352e+01 8.689062e-02 - 1.841000e+01 1.341585e+00 -2.542733e+01 8.673808e-02 - 1.842000e+01 1.739249e+00 -2.544115e+01 8.663261e-02 - 1.843000e+01 2.134674e+00 -2.545496e+01 8.661124e-02 - 1.844000e+01 2.517002e+00 -2.546877e+01 8.668172e-02 - 1.845000e+01 2.875107e+00 -2.548258e+01 8.681972e-02 - 1.846000e+01 3.197976e+00 -2.549639e+01 8.697754e-02 - 1.847000e+01 3.475105e+00 -2.551020e+01 8.710080e-02 - 1.848000e+01 3.696893e+00 -2.552402e+01 8.714724e-02 - 1.849000e+01 3.855011e+00 -2.553783e+01 8.710102e-02 - 1.850000e+01 3.942748e+00 -2.555164e+01 8.697805e-02 - 1.851000e+01 3.955291e+00 -2.556545e+01 8.682055e-02 - 1.852000e+01 3.889955e+00 -2.557926e+01 8.668268e-02 - 1.853000e+01 3.746327e+00 -2.559307e+01 8.661186e-02 - 1.854000e+01 3.526329e+00 -2.560689e+01 8.663212e-02 - 1.855000e+01 3.234200e+00 -2.562070e+01 8.673571e-02 - 1.856000e+01 2.876383e+00 -2.563451e+01 8.688589e-02 - 1.857000e+01 2.461332e+00 -2.564832e+01 8.703003e-02 - 1.858000e+01 1.999250e+00 -2.566213e+01 8.711799e-02 - 1.859000e+01 1.501751e+00 -2.567595e+01 8.711936e-02 - 1.860000e+01 9.814823e-01 -2.568976e+01 8.703370e-02 - 1.861000e+01 4.517027e-01 -2.570357e+01 8.689062e-02 - 1.862000e+01 -7.414835e-02 -2.571738e+01 8.673974e-02 - 1.863000e+01 -5.828892e-01 -2.573119e+01 8.663363e-02 - 1.864000e+01 -1.062014e+00 -2.574500e+01 8.660942e-02 - 1.865000e+01 -1.500081e+00 -2.575882e+01 8.667576e-02 - 1.866000e+01 -1.887051e+00 -2.577263e+01 8.680969e-02 - 1.867000e+01 -2.214570e+00 -2.578644e+01 8.696490e-02 - 1.868000e+01 -2.476187e+00 -2.580025e+01 8.708798e-02 - 1.869000e+01 -2.667493e+00 -2.581406e+01 8.713694e-02 - 1.870000e+01 -2.786196e+00 -2.582787e+01 8.709541e-02 - 1.871000e+01 -2.832105e+00 -2.584169e+01 8.697819e-02 - 1.872000e+01 -2.807064e+00 -2.585550e+01 8.682608e-02 - 1.873000e+01 -2.714802e+00 -2.586931e+01 8.669201e-02 - 1.874000e+01 -2.560741e+00 -2.588312e+01 8.662265e-02 - 1.875000e+01 -2.351752e+00 -2.589693e+01 8.664204e-02 - 1.876000e+01 -2.095870e+00 -2.591074e+01 8.674305e-02 - 1.877000e+01 -1.802001e+00 -2.592456e+01 8.689001e-02 - 1.878000e+01 -1.479602e+00 -2.593837e+01 8.703136e-02 - 1.879000e+01 -1.138366e+00 -2.595218e+01 8.711776e-02 - 1.880000e+01 -7.879214e-01 -2.596599e+01 8.711906e-02 - 1.881000e+01 -4.375466e-01 -2.597980e+01 8.703452e-02 - 1.882000e+01 -9.591223e-02 -2.599361e+01 8.689316e-02 - 1.883000e+01 2.291400e-01 -2.600743e+01 8.674382e-02 - 1.884000e+01 5.307793e-01 -2.602124e+01 8.663848e-02 - 1.885000e+01 8.033258e-01 -2.603505e+01 8.661408e-02 - 1.886000e+01 1.042344e+00 -2.604886e+01 8.667944e-02 - 1.887000e+01 1.244694e+00 -2.606267e+01 8.681211e-02 - 1.888000e+01 1.408534e+00 -2.607648e+01 8.696633e-02 - 1.889000e+01 1.533284e+00 -2.609030e+01 8.708914e-02 - 1.890000e+01 1.619555e+00 -2.610411e+01 8.713861e-02 - 1.891000e+01 1.669032e+00 -2.611792e+01 8.709817e-02 - 1.892000e+01 1.684341e+00 -2.613173e+01 8.698215e-02 - 1.893000e+01 1.668888e+00 -2.614554e+01 8.683088e-02 - 1.894000e+01 1.626680e+00 -2.615935e+01 8.669698e-02 - 1.895000e+01 1.562134e+00 -2.617317e+01 8.662709e-02 - 1.896000e+01 1.479893e+00 -2.618698e+01 8.664556e-02 - 1.897000e+01 1.384630e+00 -2.620079e+01 8.674573e-02 - 1.898000e+01 1.280880e+00 -2.621460e+01 8.689237e-02 - 1.899000e+01 1.172869e+00 -2.622841e+01 8.703415e-02 - 1.900000e+01 1.064382e+00 -2.624222e+01 8.712155e-02 - 1.901000e+01 9.586432e-01 -2.625604e+01 8.712391e-02 - 1.902000e+01 8.582358e-01 -2.626985e+01 8.703982e-02 - 1.903000e+01 7.650479e-01 -2.628366e+01 8.689764e-02 - 1.904000e+01 6.802536e-01 -2.629747e+01 8.674590e-02 - 1.905000e+01 6.043264e-01 -2.631128e+01 8.663675e-02 - 1.906000e+01 5.370840e-01 -2.632509e+01 8.660775e-02 - 1.907000e+01 4.777607e-01 -2.633891e+01 8.666869e-02 - 1.908000e+01 4.251049e-01 -2.635272e+01 8.679810e-02 - 1.909000e+01 3.774942e-01 -2.636653e+01 8.695090e-02 - 1.910000e+01 3.330653e-01 -2.638034e+01 8.707426e-02 - 1.911000e+01 2.898492e-01 -2.639415e+01 8.712585e-02 - 1.912000e+01 2.459072e-01 -2.640797e+01 8.708827e-02 - 1.913000e+01 1.994612e-01 -2.642178e+01 8.697485e-02 - 1.914000e+01 1.490112e-01 -2.643559e+01 8.682517e-02 - 1.915000e+01 9.343576e-02 -2.644940e+01 8.669150e-02 - 1.916000e+01 3.207130e-02 -2.646321e+01 8.662080e-02 - 1.917000e+01 -3.523389e-02 -2.647702e+01 8.663819e-02 - 1.918000e+01 -1.080916e-01 -2.649084e+01 8.673807e-02 - 1.919000e+01 -1.855728e-01 -2.650465e+01 8.688609e-02 - 1.920000e+01 -2.662331e-01 -2.651846e+01 8.703131e-02 - 1.921000e+01 -3.481626e-01 -2.653227e+01 8.712394e-02 - 1.922000e+01 -4.290574e-01 -2.654608e+01 8.713244e-02 - 1.923000e+01 -5.063087e-01 -2.655989e+01 8.705411e-02 - 1.924000e+01 -5.771067e-01 -2.657371e+01 8.691603e-02 - 1.925000e+01 -6.385529e-01 -2.658752e+01 8.676580e-02 - 1.926000e+01 -6.877780e-01 -2.660133e+01 8.665529e-02 - 1.927000e+01 -7.220605e-01 -2.661514e+01 8.662258e-02 - 1.928000e+01 -7.389414e-01 -2.662895e+01 8.667855e-02 - 1.929000e+01 -7.363326e-01 -2.664276e+01 8.680308e-02 - 1.930000e+01 -7.126151e-01 -2.665658e+01 8.695223e-02 - 1.931000e+01 -6.667246e-01 -2.667039e+01 8.707374e-02 - 1.932000e+01 -5.982225e-01 -2.668420e+01 8.712516e-02 - 1.933000e+01 -5.073506e-01 -2.669801e+01 8.708834e-02 - 1.934000e+01 -3.950681e-01 -2.671182e+01 8.697554e-02 - 1.935000e+01 -2.630694e-01 -2.672563e+01 8.682530e-02 - 1.936000e+01 -1.137826e-01 -2.673945e+01 8.668935e-02 - 1.937000e+01 4.965341e-02 -2.675326e+01 8.661471e-02 - 1.938000e+01 2.234330e-01 -2.676707e+01 8.662727e-02 - 1.939000e+01 4.031503e-01 -2.678088e+01 8.672263e-02 - 1.940000e+01 5.838880e-01 -2.679469e+01 8.686764e-02 - 1.941000e+01 7.603286e-01 -2.680850e+01 8.701220e-02 - 1.942000e+01 9.268876e-01 -2.682232e+01 8.710673e-02 - 1.943000e+01 1.077867e+00 -2.683613e+01 8.711916e-02 - 1.944000e+01 1.207627e+00 -2.684994e+01 8.704579e-02 - 1.945000e+01 1.310772e+00 -2.686375e+01 8.691245e-02 - 1.946000e+01 1.382344e+00 -2.687756e+01 8.676570e-02 - 1.947000e+01 1.418029e+00 -2.689137e+01 8.665689e-02 - 1.948000e+01 1.414343e+00 -2.690519e+01 8.662421e-02 - 1.949000e+01 1.368829e+00 -2.691900e+01 8.667927e-02 - 1.950000e+01 1.280213e+00 -2.693281e+01 8.680296e-02 - 1.951000e+01 1.148547e+00 -2.694662e+01 8.695227e-02 - 1.952000e+01 9.753031e-01 -2.696043e+01 8.707545e-02 - 1.953000e+01 7.634311e-01 -2.697424e+01 8.712995e-02 - 1.954000e+01 5.173547e-01 -2.698806e+01 8.709697e-02 - 1.955000e+01 2.429157e-01 -2.700187e+01 8.698780e-02 - 1.956000e+01 -5.274497e-02 -2.701568e+01 8.684001e-02 - 1.957000e+01 -3.613665e-01 -2.702949e+01 8.670468e-02 - 1.958000e+01 -6.738055e-01 -2.704330e+01 8.662878e-02 - 1.959000e+01 -9.803250e-01 -2.705711e+01 8.663873e-02 - 1.960000e+01 -1.270927e+00 -2.707093e+01 8.673105e-02 - 1.961000e+01 -1.535714e+00 -2.708474e+01 8.687359e-02 - 1.962000e+01 -1.765271e+00 -2.709855e+01 8.701693e-02 - 1.963000e+01 -1.951044e+00 -2.711236e+01 8.711161e-02 - 1.964000e+01 -2.085707e+00 -2.712617e+01 8.712512e-02 - 1.965000e+01 -2.163487e+00 -2.713998e+01 8.705289e-02 - 1.966000e+01 -2.180452e+00 -2.715380e+01 8.691976e-02 - 1.967000e+01 -2.134721e+00 -2.716761e+01 8.677159e-02 - 1.968000e+01 -2.026606e+00 -2.718142e+01 8.665955e-02 - 1.969000e+01 -1.858664e+00 -2.719523e+01 8.662232e-02 - 1.970000e+01 -1.635658e+00 -2.720904e+01 8.667250e-02 - 1.971000e+01 -1.364429e+00 -2.722286e+01 8.679216e-02 - 1.972000e+01 -1.053676e+00 -2.723667e+01 8.693928e-02 - 1.973000e+01 -7.136597e-01 -2.725048e+01 8.706254e-02 - 1.974000e+01 -3.558338e-01 -2.726429e+01 8.711913e-02 - 1.975000e+01 7.572895e-03 -2.727810e+01 8.708940e-02 - 1.976000e+01 3.640104e-01 -2.729191e+01 8.698344e-02 - 1.977000e+01 7.010758e-01 -2.730573e+01 8.683771e-02 - 1.978000e+01 1.006975e+00 -2.731954e+01 8.670262e-02 - 1.979000e+01 1.270958e+00 -2.733335e+01 8.662514e-02 - 1.980000e+01 1.483711e+00 -2.734716e+01 8.663239e-02 - 1.981000e+01 1.637679e+00 -2.736097e+01 8.672204e-02 - 1.982000e+01 1.727326e+00 -2.737478e+01 8.686318e-02 - 1.983000e+01 1.749294e+00 -2.738860e+01 8.700723e-02 - 1.984000e+01 1.702483e+00 -2.740241e+01 8.710492e-02 - 1.985000e+01 1.588034e+00 -2.741622e+01 8.712322e-02 - 1.986000e+01 1.409227e+00 -2.743003e+01 8.705644e-02 - 1.987000e+01 1.171294e+00 -2.744384e+01 8.692811e-02 - 1.988000e+01 8.811625e-01 -2.745765e+01 8.678293e-02 - 1.989000e+01 5.471485e-01 -2.747147e+01 8.667148e-02 - 1.990000e+01 1.786013e-01 -2.748528e+01 8.663257e-02 - 1.991000e+01 -2.144701e-01 -2.749909e+01 8.667962e-02 - 1.992000e+01 -6.217781e-01 -2.751290e+01 8.679592e-02 - 1.993000e+01 -1.033127e+00 -2.752671e+01 8.694062e-02 - 1.994000e+01 -1.438757e+00 -2.754052e+01 8.706314e-02 - 1.995000e+01 -1.829651e+00 -2.755434e+01 8.712079e-02 - 1.996000e+01 -2.197791e+00 -2.756815e+01 8.709333e-02 - 1.997000e+01 -2.536358e+00 -2.758196e+01 8.698987e-02 - 1.998000e+01 -2.839868e+00 -2.759577e+01 8.684575e-02 - 1.999000e+01 -3.104253e+00 -2.760958e+01 8.671056e-02 - 2.000000e+01 -3.326870e+00 -2.762339e+01 8.663104e-02 + 1.000000e-02 -7.734561e-02 -1.381170e-02 3.134926e-02 + 2.000000e-02 -1.596764e-01 -2.762339e-02 6.045792e-02 + 3.000000e-02 -2.516875e-01 -4.143509e-02 8.526468e-02 + 4.000000e-02 -3.575096e-01 -5.524679e-02 1.040541e-01 + 5.000000e-02 -4.804651e-01 -6.905849e-02 1.155991e-01 + 6.000000e-02 -6.228668e-01 -8.287018e-02 1.192732e-01 + 7.000000e-02 -7.858705e-01 -9.668188e-02 1.151330e-01 + 8.000000e-02 -9.693874e-01 -1.104936e-01 1.039918e-01 + 9.000000e-02 -1.172061e+00 -1.243053e-01 8.755577e-02 + 1.000000e-01 -1.391306e+00 -1.381170e-01 6.884717e-02 + 1.100000e-01 -1.623409e+00 -1.519287e-01 5.341991e-02 + 1.200000e-01 -1.863680e+00 -1.657404e-01 4.979434e-02 + 1.300000e-01 -2.106649e+00 -1.795521e-01 6.017895e-02 + 1.400000e-01 -2.346295e+00 -1.933638e-01 7.640497e-02 + 1.500000e-01 -2.576293e+00 -2.071755e-01 9.161881e-02 + 1.600000e-01 -2.790268e+00 -2.209872e-01 1.024655e-01 + 1.700000e-01 -2.982047e+00 -2.347989e-01 1.074539e-01 + 1.800000e-01 -3.145891e+00 -2.486105e-01 1.062389e-01 + 1.900000e-01 -3.276707e+00 -2.624222e-01 9.942805e-02 + 2.000000e-01 -3.370223e+00 -2.762339e-01 8.860376e-02 + 2.100000e-01 -3.423130e+00 -2.900456e-01 7.650761e-02 + 2.200000e-01 -3.433181e+00 -3.038573e-01 6.719764e-02 + 2.300000e-01 -3.399254e+00 -3.176690e-01 6.493149e-02 + 2.400000e-01 -3.321377e+00 -3.314807e-01 7.061632e-02 + 2.500000e-01 -3.200715e+00 -3.452924e-01 8.074527e-02 + 2.600000e-01 -3.039527e+00 -3.591041e-01 9.101665e-02 + 2.700000e-01 -2.841094e+00 -3.729158e-01 9.850821e-02 + 2.800000e-01 -2.609626e+00 -3.867275e-01 1.017102e-01 + 2.900000e-01 -2.350147e+00 -4.005392e-01 1.002266e-01 + 3.000000e-01 -2.068363e+00 -4.143509e-01 9.462396e-02 + 3.100000e-01 -1.770519e+00 -4.281626e-01 8.640470e-02 + 3.200000e-01 -1.463237e+00 -4.419743e-01 7.800773e-02 + 3.300000e-01 -1.153355e+00 -4.557860e-01 7.249483e-02 + 3.400000e-01 -8.477479e-01 -4.695977e-01 7.224522e-02 + 3.500000e-01 -5.531450e-01 -4.834094e-01 7.713224e-02 + 3.600000e-01 -2.759477e-01 -4.972211e-01 8.467203e-02 + 3.700000e-01 -2.204310e-02 -5.110328e-01 9.195493e-02 + 3.800000e-01 2.033757e-01 -5.248445e-01 9.686320e-02 + 3.900000e-01 3.959788e-01 -5.386562e-01 9.828977e-02 + 4.000000e-01 5.524508e-01 -5.524679e-01 9.606310e-02 + 4.100000e-01 6.706182e-01 -5.662796e-01 9.087598e-02 + 4.200000e-01 7.495432e-01 -5.800913e-01 8.423689e-02 + 4.300000e-01 7.895774e-01 -5.939030e-01 7.831796e-02 + 4.400000e-01 7.923692e-01 -6.077147e-01 7.538431e-02 + 4.500000e-01 7.608195e-01 -6.215264e-01 7.662821e-02 + 4.600000e-01 6.989824e-01 -6.353381e-01 8.131523e-02 + 4.700000e-01 6.119129e-01 -6.491498e-01 8.737928e-02 + 4.800000e-01 5.054623e-01 -6.629615e-01 9.267455e-02 + 4.900000e-01 3.860302e-01 -6.767732e-01 9.569092e-02 + 5.000000e-01 2.602819e-01 -6.905849e-01 9.573000e-02 + 5.100000e-01 1.348438e-01 -7.043966e-01 9.289354e-02 + 5.200000e-01 1.599279e-02 -7.182083e-01 8.803723e-02 + 5.300000e-01 -9.064421e-02 -7.320200e-01 8.267435e-02 + 5.400000e-01 -1.803637e-01 -7.458316e-01 7.868367e-02 + 5.500000e-01 -2.496148e-01 -7.596433e-01 7.762463e-02 + 5.600000e-01 -2.961697e-01 -7.734550e-01 7.986113e-02 + 5.700000e-01 -3.192238e-01 -7.872667e-01 8.433275e-02 + 5.800000e-01 -3.194177e-01 -8.010784e-01 8.926692e-02 + 5.900000e-01 -2.987769e-01 -8.148901e-01 9.303294e-02 + 6.000000e-01 -2.605717e-01 -8.287018e-01 9.458206e-02 + 6.100000e-01 -2.091040e-01 -8.425135e-01 9.356811e-02 + 6.200000e-01 -1.494329e-01 -8.563252e-01 9.034444e-02 + 6.300000e-01 -8.705466e-02 -8.701369e-01 8.590452e-02 + 6.400000e-01 -2.755745e-02 -8.839486e-01 8.171553e-02 + 6.500000e-01 2.372868e-02 -8.977603e-01 7.931299e-02 + 6.600000e-01 6.206366e-02 -9.115720e-01 7.962749e-02 + 6.700000e-01 8.359014e-02 -9.253837e-01 8.244920e-02 + 6.800000e-01 8.556789e-02 -9.391954e-01 8.658046e-02 + 6.900000e-01 6.653458e-02 -9.530071e-01 9.051104e-02 + 7.000000e-01 2.638255e-02 -9.668188e-01 9.300732e-02 + 7.100000e-01 -3.365350e-02 -9.806305e-01 9.339048e-02 + 7.200000e-01 -1.110967e-01 -9.944422e-01 9.161189e-02 + 7.300000e-01 -2.024086e-01 -1.008254e+00 8.823550e-02 + 7.400000e-01 -3.032383e-01 -1.022066e+00 8.434109e-02 + 7.500000e-01 -4.087215e-01 -1.035877e+00 8.127899e-02 + 7.600000e-01 -5.138097e-01 -1.049689e+00 8.019975e-02 + 7.700000e-01 -6.136058e-01 -1.063501e+00 8.149425e-02 + 7.800000e-01 -7.036833e-01 -1.077312e+00 8.457797e-02 + 7.900000e-01 -7.803670e-01 -1.091124e+00 8.824255e-02 + 8.000000e-01 -8.409562e-01 -1.104936e+00 9.123004e-02 + 8.100000e-01 -8.838756e-01 -1.118747e+00 9.263856e-02 + 8.200000e-01 -9.087437e-01 -1.132559e+00 9.209884e-02 + 8.300000e-01 -9.163567e-01 -1.146371e+00 8.981209e-02 + 8.400000e-01 -9.085893e-01 -1.160183e+00 8.650416e-02 + 8.500000e-01 -8.882216e-01 -1.173994e+00 8.327654e-02 + 8.600000e-01 -8.587063e-01 -1.187806e+00 8.129051e-02 + 8.700000e-01 -8.238944e-01 -1.201618e+00 8.129498e-02 + 8.800000e-01 -7.877398e-01 -1.215429e+00 8.324441e-02 + 8.900000e-01 -7.540061e-01 -1.229241e+00 8.633665e-02 + 9.000000e-01 -7.259969e-01 -1.243053e+00 8.943578e-02 + 9.100000e-01 -7.063286e-01 -1.256864e+00 9.152907e-02 + 9.200000e-01 -6.967632e-01 -1.270676e+00 9.200378e-02 + 9.300000e-01 -6.981108e-01 -1.284488e+00 9.075509e-02 + 9.400000e-01 -7.102095e-01 -1.298300e+00 8.818933e-02 + 9.500000e-01 -7.319798e-01 -1.312111e+00 8.513983e-02 + 9.600000e-01 -7.615502e-01 -1.325923e+00 8.266016e-02 + 9.700000e-01 -7.964408e-01 -1.339735e+00 8.166394e-02 + 9.800000e-01 -8.337897e-01 -1.353546e+00 8.251468e-02 + 9.900000e-01 -8.706036e-01 -1.367358e+00 8.484194e-02 + 1.000000e-00 -9.040117e-01 -1.381170e+00 8.774748e-02 + 1.010000e+00 -9.315033e-01 -1.394981e+00 9.021996e-02 + 1.020000e+00 -9.511296e-01 -1.408793e+00 9.148261e-02 + 1.030000e+00 -9.616553e-01 -1.422605e+00 9.117828e-02 + 1.040000e+00 -9.626475e-01 -1.436417e+00 8.942710e-02 + 1.050000e+00 -9.544971e-01 -1.450228e+00 8.679399e-02 + 1.060000e+00 -9.383712e-01 -1.464040e+00 8.415952e-02 + 1.070000e+00 -9.161027e-01 -1.477852e+00 8.246149e-02 + 1.080000e+00 -8.900263e-01 -1.491663e+00 8.233013e-02 + 1.090000e+00 -8.627749e-01 -1.505475e+00 8.378993e-02 + 1.100000e+00 -8.370557e-01 -1.519287e+00 8.625490e-02 + 1.110000e+00 -8.154227e-01 -1.533098e+00 8.882170e-02 + 1.120000e+00 -8.000647e-01 -1.546910e+00 9.063428e-02 + 1.130000e+00 -7.926282e-01 -1.560722e+00 9.113887e-02 + 1.140000e+00 -7.940862e-01 -1.574533e+00 9.020245e-02 + 1.150000e+00 -8.046667e-01 -1.588345e+00 8.812929e-02 + 1.160000e+00 -8.238427e-01 -1.602157e+00 8.559113e-02 + 1.170000e+00 -8.503875e-01 -1.615969e+00 8.345275e-02 + 1.180000e+00 -8.824866e-01 -1.629780e+00 8.248185e-02 + 1.190000e+00 -9.178991e-01 -1.643592e+00 8.302436e-02 + 1.200000e+00 -9.541530e-01 -1.657404e+00 8.484068e-02 + 1.210000e+00 -9.887581e-01 -1.671215e+00 8.723378e-02 + 1.220000e+00 -1.019420e+00 -1.685027e+00 8.936506e-02 + 1.230000e+00 -1.044233e+00 -1.698839e+00 9.055378e-02 + 1.240000e+00 -1.061845e+00 -1.712650e+00 9.045794e-02 + 1.250000e+00 -1.071566e+00 -1.726462e+00 8.914106e-02 + 1.260000e+00 -1.073431e+00 -1.740274e+00 8.704942e-02 + 1.270000e+00 -1.068188e+00 -1.754086e+00 8.489959e-02 + 1.280000e+00 -1.057242e+00 -1.767897e+00 8.346229e-02 + 1.290000e+00 -1.042527e+00 -1.781709e+00 8.327095e-02 + 1.300000e+00 -1.026351e+00 -1.795521e+00 8.438368e-02 + 1.310000e+00 -1.011191e+00 -1.809332e+00 8.636090e-02 + 1.320000e+00 -9.994919e-01 -1.823144e+00 8.847613e-02 + 1.330000e+00 -9.934586e-01 -1.836956e+00 9.000844e-02 + 1.340000e+00 -9.948682e-01 -1.850767e+00 9.047021e-02 + 1.350000e+00 -1.004922e+00 -1.864579e+00 8.972635e-02 + 1.360000e+00 -1.024143e+00 -1.878391e+00 8.801881e-02 + 1.370000e+00 -1.052329e+00 -1.892203e+00 8.590676e-02 + 1.380000e+00 -1.088569e+00 -1.906014e+00 8.411382e-02 + 1.390000e+00 -1.131312e+00 -1.919826e+00 8.328369e-02 + 1.400000e+00 -1.178493e+00 -1.933638e+00 8.371558e-02 + 1.410000e+00 -1.227697e+00 -1.947449e+00 8.522786e-02 + 1.420000e+00 -1.276352e+00 -1.961261e+00 8.724927e-02 + 1.430000e+00 -1.321931e+00 -1.975073e+00 8.906920e-02 + 1.440000e+00 -1.362151e+00 -1.988884e+00 9.009276e-02 + 1.450000e+00 -1.395148e+00 -2.002696e+00 9.000846e-02 + 1.460000e+00 -1.419612e+00 -2.016508e+00 8.885776e-02 + 1.470000e+00 -1.434881e+00 -2.030319e+00 8.702023e-02 + 1.480000e+00 -1.440976e+00 -2.044131e+00 8.511516e-02 + 1.490000e+00 -1.438578e+00 -2.057943e+00 8.381334e-02 + 1.500000e+00 -1.428952e+00 -2.071755e+00 8.358812e-02 + 1.510000e+00 -1.413823e+00 -2.085566e+00 8.451113e-02 + 1.520000e+00 -1.395219e+00 -2.099378e+00 8.622309e-02 + 1.530000e+00 -1.375288e+00 -2.113190e+00 8.810063e-02 + 1.540000e+00 -1.356109e+00 -2.127001e+00 8.950526e-02 + 1.550000e+00 -1.339521e+00 -2.140813e+00 8.998983e-02 + 1.560000e+00 -1.326967e+00 -2.154625e+00 8.941412e-02 + 1.570000e+00 -1.319389e+00 -2.168436e+00 8.797326e-02 + 1.580000e+00 -1.317160e+00 -2.182248e+00 8.614643e-02 + 1.590000e+00 -1.320081e+00 -2.196060e+00 8.456224e-02 + 1.600000e+00 -1.327421e+00 -2.209872e+00 8.378773e-02 + 1.610000e+00 -1.338016e+00 -2.223683e+00 8.410190e-02 + 1.620000e+00 -1.350401e+00 -2.237495e+00 8.537324e-02 + 1.630000e+00 -1.362974e+00 -2.251307e+00 8.712414e-02 + 1.640000e+00 -1.374170e+00 -2.265118e+00 8.873653e-02 + 1.650000e+00 -1.382635e+00 -2.278930e+00 8.967598e-02 + 1.660000e+00 -1.387368e+00 -2.292742e+00 8.964903e-02 + 1.670000e+00 -1.387843e+00 -2.306553e+00 8.867411e-02 + 1.680000e+00 -1.384077e+00 -2.320365e+00 8.707293e-02 + 1.690000e+00 -1.376637e+00 -2.334177e+00 8.538419e-02 + 1.700000e+00 -1.366606e+00 -2.347989e+00 8.419842e-02 + 1.710000e+00 -1.355480e+00 -2.361800e+00 8.394229e-02 + 1.720000e+00 -1.345031e+00 -2.375612e+00 8.470005e-02 + 1.730000e+00 -1.337123e+00 -2.389424e+00 8.617890e-02 + 1.740000e+00 -1.333527e+00 -2.403235e+00 8.784186e-02 + 1.750000e+00 -1.335716e+00 -2.417047e+00 8.912123e-02 + 1.760000e+00 -1.344696e+00 -2.430859e+00 8.960623e-02 + 1.770000e+00 -1.360861e+00 -2.444670e+00 8.915473e-02 + 1.780000e+00 -1.383901e+00 -2.458482e+00 8.792463e-02 + 1.790000e+00 -1.412776e+00 -2.472294e+00 8.633026e-02 + 1.800000e+00 -1.445754e+00 -2.486105e+00 8.492298e-02 + 1.810000e+00 -1.480514e+00 -2.499917e+00 8.420620e-02 + 1.820000e+00 -1.514312e+00 -2.513729e+00 8.443860e-02 + 1.830000e+00 -1.544202e+00 -2.527541e+00 8.552365e-02 + 1.840000e+00 -1.567278e+00 -2.541352e+00 8.705601e-02 + 1.850000e+00 -1.580939e+00 -2.555164e+00 8.849338e-02 + 1.860000e+00 -1.583140e+00 -2.568976e+00 8.935436e-02 + 1.870000e+00 -1.572609e+00 -2.582787e+00 8.936496e-02 + 1.880000e+00 -1.549013e+00 -2.596599e+00 8.852906e-02 + 1.890000e+00 -1.513057e+00 -2.610411e+00 8.712423e-02 + 1.900000e+00 -1.466490e+00 -2.624222e+00 8.562504e-02 + 1.910000e+00 -1.412034e+00 -2.638034e+00 8.455578e-02 + 1.920000e+00 -1.353220e+00 -2.651846e+00 8.430059e-02 + 1.930000e+00 -1.294150e+00 -2.665658e+00 8.494598e-02 + 1.940000e+00 -1.239192e+00 -2.679469e+00 8.624521e-02 + 1.950000e+00 -1.192639e+00 -2.693281e+00 8.772760e-02 + 1.960000e+00 -1.158358e+00 -2.707093e+00 8.888395e-02 + 1.970000e+00 -1.139441e+00 -2.720904e+00 8.933725e-02 + 1.980000e+00 -1.137915e+00 -2.734716e+00 8.894918e-02 + 1.990000e+00 -1.154511e+00 -2.748528e+00 8.785320e-02 + 2.000000e+00 -1.188531e+00 -2.762339e+00 8.641699e-02 + 2.010000e+00 -1.237823e+00 -2.776151e+00 8.513478e-02 + 2.020000e+00 -1.298870e+00 -2.789963e+00 8.446166e-02 + 2.030000e+00 -1.366998e+00 -2.803775e+00 8.463800e-02 + 2.040000e+00 -1.436686e+00 -2.817586e+00 8.558855e-02 + 2.050000e+00 -1.501962e+00 -2.831398e+00 8.695755e-02 + 2.060000e+00 -1.556856e+00 -2.845210e+00 8.825708e-02 + 2.070000e+00 -1.595879e+00 -2.859021e+00 8.904528e-02 + 2.080000e+00 -1.614491e+00 -2.872833e+00 8.906364e-02 + 2.090000e+00 -1.609514e+00 -2.886645e+00 8.830655e-02 + 2.100000e+00 -1.579460e+00 -2.900456e+00 8.702107e-02 + 2.110000e+00 -1.524741e+00 -2.914268e+00 8.563829e-02 + 2.120000e+00 -1.447736e+00 -2.928080e+00 8.463963e-02 + 2.130000e+00 -1.352693e+00 -2.941891e+00 8.438444e-02 + 2.140000e+00 -1.245484e+00 -2.955703e+00 8.496517e-02 + 2.150000e+00 -1.133191e+00 -2.969515e+00 8.616936e-02 + 2.160000e+00 -1.023574e+00 -2.983327e+00 8.757206e-02 + 2.170000e+00 -9.244251e-01 -2.997138e+00 8.870195e-02 + 2.180000e+00 -8.428719e-01 -3.010950e+00 8.920000e-02 + 2.190000e+00 -7.846657e-01 -3.024762e+00 8.892219e-02 + 2.200000e+00 -7.535071e-01 -3.038573e+00 8.797447e-02 + 2.210000e+00 -7.504647e-01 -3.052385e+00 8.668116e-02 + 2.220000e+00 -7.735306e-01 -3.066197e+00 8.548894e-02 + 2.230000e+00 -8.173576e-01 -3.080008e+00 8.481846e-02 + 2.240000e+00 -8.732071e-01 -3.093820e+00 8.490579e-02 + 2.250000e+00 -9.291271e-01 -3.107632e+00 8.570642e-02 + 2.260000e+00 -9.703641e-01 -3.121444e+00 8.691730e-02 + 2.270000e+00 -9.799987e-01 -3.135255e+00 8.810312e-02 + 2.280000e+00 -9.397761e-01 -3.149067e+00 8.885701e-02 + 2.290000e+00 -8.310933e-01 -3.162879e+00 8.893019e-02 + 2.300000e+00 -6.360900e-01 -3.176690e+00 8.830113e-02 + 2.310000e+00 -3.387799e-01 -3.190502e+00 8.717917e-02 + 2.320000e+00 7.384109e-02 -3.204314e+00 8.594395e-02 + 2.330000e+00 6.107803e-01 -3.218125e+00 8.502589e-02 + 2.340000e+00 1.276191e+00 -3.231937e+00 8.475268e-02 + 2.350000e+00 2.068731e+00 -3.245749e+00 8.521931e-02 + 2.360000e+00 2.981181e+00 -3.259561e+00 8.624936e-02 + 2.370000e+00 4.000357e+00 -3.273372e+00 8.747046e-02 + 2.380000e+00 5.107337e+00 -3.287184e+00 8.845949e-02 + 2.390000e+00 6.277992e+00 -3.300996e+00 8.888735e-02 + 2.400000e+00 7.483803e+00 -3.314807e+00 8.861696e-02 + 2.410000e+00 8.692939e+00 -3.328619e+00 8.773945e-02 + 2.420000e+00 9.871525e+00 -3.342431e+00 8.654753e-02 + 2.430000e+00 1.098505e+01 -3.356242e+00 8.544831e-02 + 2.440000e+00 1.199985e+01 -3.370054e+00 8.482790e-02 + 2.450000e+00 1.288455e+01 -3.383866e+00 8.490680e-02 + 2.460000e+00 1.361146e+01 -3.397678e+00 8.565094e-02 + 2.470000e+00 1.415774e+01 -3.411489e+00 8.678792e-02 + 2.480000e+00 1.450644e+01 -3.425301e+00 8.791879e-02 + 2.490000e+00 1.464718e+01 -3.439113e+00 8.866444e-02 + 2.500000e+00 1.457658e+01 -3.452924e+00 8.878714e-02 + 2.510000e+00 1.429830e+01 -3.466736e+00 8.825730e-02 + 2.520000e+00 1.382281e+01 -3.480548e+00 8.725920e-02 + 2.530000e+00 1.316686e+01 -3.494359e+00 8.613645e-02 + 2.540000e+00 1.235258e+01 -3.508171e+00 8.528323e-02 + 2.550000e+00 1.140650e+01 -3.521983e+00 8.500491e-02 + 2.560000e+00 1.035826e+01 -3.535794e+00 8.539895e-02 + 2.570000e+00 9.239323e+00 -3.549606e+00 8.631613e-02 + 2.580000e+00 8.081607e+00 -3.563418e+00 8.742391e-02 + 2.590000e+00 6.916163e+00 -3.577230e+00 8.833600e-02 + 2.600000e+00 5.771973e+00 -3.591041e+00 8.874584e-02 + 2.610000e+00 4.674897e+00 -3.604853e+00 8.852008e-02 + 2.620000e+00 3.646830e+00 -3.618665e+00 8.773500e-02 + 2.630000e+00 2.705100e+00 -3.632476e+00 8.665363e-02 + 2.640000e+00 1.862122e+00 -3.646288e+00 8.564608e-02 + 2.650000e+00 1.125307e+00 -3.660100e+00 8.506583e-02 + 2.660000e+00 4.972252e-01 -3.673911e+00 8.511794e-02 + 2.670000e+00 -2.400927e-02 -3.687723e+00 8.577693e-02 + 2.680000e+00 -4.441723e-01 -3.701535e+00 8.679855e-02 + 2.690000e+00 -7.722150e-01 -3.715347e+00 8.781860e-02 + 2.700000e+00 -1.019459e+00 -3.729158e+00 8.848654e-02 + 2.710000e+00 -1.198748e+00 -3.742970e+00 8.857941e-02 + 2.720000e+00 -1.323610e+00 -3.756782e+00 8.806668e-02 + 2.730000e+00 -1.407472e+00 -3.770593e+00 8.711793e-02 + 2.740000e+00 -1.462967e+00 -3.784405e+00 8.605324e-02 + 2.750000e+00 -1.501372e+00 -3.798217e+00 8.524228e-02 + 2.760000e+00 -1.532185e+00 -3.812028e+00 8.497442e-02 + 2.770000e+00 -1.562860e+00 -3.825840e+00 8.534686e-02 + 2.780000e+00 -1.598702e+00 -3.839652e+00 8.622582e-02 + 2.790000e+00 -1.642903e+00 -3.853464e+00 8.730239e-02 + 2.800000e+00 -1.696711e+00 -3.867275e+00 8.821161e-02 + 2.810000e+00 -1.759700e+00 -3.881087e+00 8.865812e-02 + 2.820000e+00 -1.830120e+00 -3.894899e+00 8.850613e-02 + 2.830000e+00 -1.905285e+00 -3.908710e+00 8.781616e-02 + 2.840000e+00 -1.981979e+00 -3.922522e+00 8.682582e-02 + 2.850000e+00 -2.056843e+00 -3.936334e+00 8.587719e-02 + 2.860000e+00 -2.126718e+00 -3.950145e+00 8.530316e-02 + 2.870000e+00 -2.188935e+00 -3.963957e+00 8.530532e-02 + 2.880000e+00 -2.241518e+00 -3.977769e+00 8.587504e-02 + 2.890000e+00 -2.283314e+00 -3.991580e+00 8.679888e-02 + 2.900000e+00 -2.314031e+00 -4.005392e+00 8.774513e-02 + 2.910000e+00 -2.334204e+00 -4.019204e+00 8.838627e-02 + 2.920000e+00 -2.345096e+00 -4.033016e+00 8.850696e-02 + 2.930000e+00 -2.348533e+00 -4.046827e+00 8.806776e-02 + 2.940000e+00 -2.346723e+00 -4.060639e+00 8.721507e-02 + 2.950000e+00 -2.342043e+00 -4.074451e+00 8.623706e-02 + 2.960000e+00 -2.336835e+00 -4.088262e+00 8.547181e-02 + 2.970000e+00 -2.333219e+00 -4.102074e+00 8.518872e-02 + 2.980000e+00 -2.332935e+00 -4.115886e+00 8.548554e-02 + 2.990000e+00 -2.337236e+00 -4.129697e+00 8.624986e-02 + 3.000000e+00 -2.346817e+00 -4.143509e+00 8.720597e-02 + 3.010000e+00 -2.361806e+00 -4.157321e+00 8.802122e-02 + 3.020000e+00 -2.381792e+00 -4.171133e+00 8.842215e-02 + 3.030000e+00 -2.405909e+00 -4.184944e+00 8.828001e-02 + 3.040000e+00 -2.432939e+00 -4.198756e+00 8.764730e-02 + 3.050000e+00 -2.461444e+00 -4.212568e+00 8.674126e-02 + 3.060000e+00 -2.489911e+00 -4.226379e+00 8.587672e-02 + 3.070000e+00 -2.516886e+00 -4.240191e+00 8.536071e-02 + 3.080000e+00 -2.541103e+00 -4.254003e+00 8.537964e-02 + 3.090000e+00 -2.561584e+00 -4.267814e+00 8.592621e-02 + 3.100000e+00 -2.577712e+00 -4.281626e+00 8.680329e-02 + 3.110000e+00 -2.589266e+00 -4.295438e+00 8.770250e-02 + 3.120000e+00 -2.596420e+00 -4.309250e+00 8.831725e-02 + 3.130000e+00 -2.599709e+00 -4.323061e+00 8.844402e-02 + 3.140000e+00 -2.599957e+00 -4.336873e+00 8.804325e-02 + 3.150000e+00 -2.598188e+00 -4.350685e+00 8.724975e-02 + 3.160000e+00 -2.595516e+00 -4.364496e+00 8.633174e-02 + 3.170000e+00 -2.593021e+00 -4.378308e+00 8.560513e-02 + 3.180000e+00 -2.591636e+00 -4.392120e+00 8.532290e-02 + 3.190000e+00 -2.592035e+00 -4.405931e+00 8.557901e-02 + 3.200000e+00 -2.594543e+00 -4.419743e+00 8.627157e-02 + 3.210000e+00 -2.599066e+00 -4.433555e+00 8.714478e-02 + 3.220000e+00 -2.605049e+00 -4.447366e+00 8.788730e-02 + 3.230000e+00 -2.611468e+00 -4.461178e+00 8.824143e-02 + 3.240000e+00 -2.616842e+00 -4.474990e+00 8.808516e-02 + 3.250000e+00 -2.619286e+00 -4.488802e+00 8.746838e-02 + 3.260000e+00 -2.616581e+00 -4.502613e+00 8.659820e-02 + 3.270000e+00 -2.606259e+00 -4.516425e+00 8.577550e-02 + 3.280000e+00 -2.585719e+00 -4.530237e+00 8.529449e-02 + 3.290000e+00 -2.552333e+00 -4.544048e+00 8.533489e-02 + 3.300000e+00 -2.503569e+00 -4.557860e+00 8.589126e-02 + 3.310000e+00 -2.437100e+00 -4.571672e+00 8.677526e-02 + 3.320000e+00 -2.350917e+00 -4.585483e+00 8.768926e-02 + 3.330000e+00 -2.243420e+00 -4.599295e+00 8.833407e-02 + 3.340000e+00 -2.113503e+00 -4.613107e+00 8.850678e-02 + 3.350000e+00 -1.960618e+00 -4.626919e+00 8.816083e-02 + 3.360000e+00 -1.784825e+00 -4.640730e+00 8.741788e-02 + 3.370000e+00 -1.586825e+00 -4.654542e+00 8.653083e-02 + 3.380000e+00 -1.367979e+00 -4.668354e+00 8.580368e-02 + 3.390000e+00 -1.130302e+00 -4.682165e+00 8.548686e-02 + 3.400000e+00 -8.764571e-01 -4.695977e+00 8.568406e-02 + 3.410000e+00 -6.097196e-01 -4.709789e+00 8.631281e-02 + 3.420000e+00 -3.339377e-01 -4.723600e+00 8.713910e-02 + 3.430000e+00 -5.347346e-02 -4.737412e+00 8.786787e-02 + 3.440000e+00 2.268704e-01 -4.751224e+00 8.824708e-02 + 3.450000e+00 5.019383e-01 -4.765036e+00 8.814830e-02 + 3.460000e+00 7.663258e-01 -4.778847e+00 8.760434e-02 + 3.470000e+00 1.014500e+00 -4.792659e+00 8.679847e-02 + 3.480000e+00 1.240932e+00 -4.806471e+00 8.600717e-02 + 3.490000e+00 1.440250e+00 -4.820282e+00 8.550784e-02 + 3.500000e+00 1.607392e+00 -4.834094e+00 8.547816e-02 + 3.510000e+00 1.737778e+00 -4.847906e+00 8.592753e-02 + 3.520000e+00 1.827471e+00 -4.861717e+00 8.669413e-02 + 3.530000e+00 1.873343e+00 -4.875529e+00 8.750884e-02 + 3.540000e+00 1.873221e+00 -4.889341e+00 8.809407e-02 + 3.550000e+00 1.826015e+00 -4.903152e+00 8.825661e-02 + 3.560000e+00 1.731819e+00 -4.916964e+00 8.794676e-02 + 3.570000e+00 1.591965e+00 -4.930776e+00 8.727197e-02 + 3.580000e+00 1.409047e+00 -4.944588e+00 8.646361e-02 + 3.590000e+00 1.186882e+00 -4.958399e+00 8.580261e-02 + 3.600000e+00 9.304277e-01 -4.972211e+00 8.552186e-02 + 3.610000e+00 6.456414e-01 -4.986023e+00 8.571906e-02 + 3.620000e+00 3.392945e-01 -4.999834e+00 8.631881e-02 + 3.630000e+00 1.873856e-02 -5.013646e+00 8.710326e-02 + 3.640000e+00 -3.083619e-01 -5.027458e+00 8.779520e-02 + 3.650000e+00 -6.343206e-01 -5.041269e+00 8.815575e-02 + 3.660000e+00 -9.517301e-01 -5.055081e+00 8.806124e-02 + 3.670000e+00 -1.253756e+00 -5.068893e+00 8.754045e-02 + 3.680000e+00 -1.534413e+00 -5.082705e+00 8.676573e-02 + 3.690000e+00 -1.788795e+00 -5.096516e+00 8.599990e-02 + 3.700000e+00 -2.013266e+00 -5.110328e+00 8.550922e-02 + 3.710000e+00 -2.205580e+00 -5.124140e+00 8.546775e-02 + 3.720000e+00 -2.364928e+00 -5.137951e+00 8.589091e-02 + 3.730000e+00 -2.491921e+00 -5.151763e+00 8.663012e-02 + 3.740000e+00 -2.588479e+00 -5.165575e+00 8.743106e-02 + 3.750000e+00 -2.657671e+00 -5.179386e+00 8.802674e-02 + 3.760000e+00 -2.703479e+00 -5.193198e+00 8.822663e-02 + 3.770000e+00 -2.730520e+00 -5.207010e+00 8.797479e-02 + 3.780000e+00 -2.743737e+00 -5.220822e+00 8.736478e-02 + 3.790000e+00 -2.748083e+00 -5.234633e+00 8.660995e-02 + 3.800000e+00 -2.748209e+00 -5.248445e+00 8.597450e-02 + 3.810000e+00 -2.748188e+00 -5.262257e+00 8.568213e-02 + 3.820000e+00 -2.751276e+00 -5.276068e+00 8.583325e-02 + 3.830000e+00 -2.759752e+00 -5.289880e+00 8.636683e-02 + 3.840000e+00 -2.774817e+00 -5.303692e+00 8.708555e-02 + 3.850000e+00 -2.796588e+00 -5.317503e+00 8.773157e-02 + 3.860000e+00 -2.824158e+00 -5.331315e+00 8.807818e-02 + 3.870000e+00 -2.855748e+00 -5.345127e+00 8.800391e-02 + 3.880000e+00 -2.888908e+00 -5.358939e+00 8.752973e-02 + 3.890000e+00 -2.920779e+00 -5.372750e+00 8.681247e-02 + 3.900000e+00 -2.948371e+00 -5.386562e+00 8.609591e-02 + 3.910000e+00 -2.968861e+00 -5.400374e+00 8.562970e-02 + 3.920000e+00 -2.979857e+00 -5.414185e+00 8.557964e-02 + 3.930000e+00 -2.979632e+00 -5.427997e+00 8.596450e-02 + 3.940000e+00 -2.967290e+00 -5.441809e+00 8.664908e-02 + 3.950000e+00 -2.942857e+00 -5.455620e+00 8.739672e-02 + 3.960000e+00 -2.907272e+00 -5.469432e+00 8.795581e-02 + 3.970000e+00 -2.862300e+00 -5.483244e+00 8.814437e-02 + 3.980000e+00 -2.810334e+00 -5.497055e+00 8.790624e-02 + 3.990000e+00 -2.754132e+00 -5.510867e+00 8.732687e-02 + 4.000000e+00 -2.696475e+00 -5.524679e+00 8.660621e-02 + 4.010000e+00 -2.639789e+00 -5.538491e+00 8.599417e-02 + 4.020000e+00 -2.585754e+00 -5.552302e+00 8.570445e-02 + 4.030000e+00 -2.534926e+00 -5.566114e+00 8.583588e-02 + 4.040000e+00 -2.486404e+00 -5.579926e+00 8.633496e-02 + 4.050000e+00 -2.437580e+00 -5.593737e+00 8.701785e-02 + 4.060000e+00 -2.383991e+00 -5.607549e+00 8.764065e-02 + 4.070000e+00 -2.319291e+00 -5.621361e+00 8.798621e-02 + 4.080000e+00 -2.235371e+00 -5.635172e+00 8.793541e-02 + 4.090000e+00 -2.122615e+00 -5.648984e+00 8.750393e-02 + 4.100000e+00 -1.970297e+00 -5.662796e+00 8.683711e-02 + 4.110000e+00 -1.767102e+00 -5.676608e+00 8.616432e-02 + 4.120000e+00 -1.501749e+00 -5.690419e+00 8.572243e-02 + 4.130000e+00 -1.163683e+00 -5.704231e+00 8.567084e-02 + 4.140000e+00 -7.438005e-01 -5.718043e+00 8.603091e-02 + 4.150000e+00 -2.351580e-01 -5.731854e+00 8.667774e-02 + 4.160000e+00 3.663656e-01 -5.745666e+00 8.738832e-02 + 4.170000e+00 1.061510e+00 -5.759478e+00 8.792278e-02 + 4.180000e+00 1.847208e+00 -5.773289e+00 8.810524e-02 + 4.190000e+00 2.716329e+00 -5.787101e+00 8.787868e-02 + 4.200000e+00 3.657618e+00 -5.800913e+00 8.732138e-02 + 4.210000e+00 4.655841e+00 -5.814725e+00 8.662233e-02 + 4.220000e+00 5.692133e+00 -5.828536e+00 8.602054e-02 + 4.230000e+00 6.744555e+00 -5.842348e+00 8.572319e-02 + 4.240000e+00 7.788825e+00 -5.856160e+00 8.583002e-02 + 4.250000e+00 8.799190e+00 -5.869971e+00 8.629595e-02 + 4.260000e+00 9.749408e+00 -5.883783e+00 8.694977e-02 + 4.270000e+00 1.061379e+01 -5.897595e+00 8.755959e-02 + 4.280000e+00 1.136822e+01 -5.911406e+00 8.791545e-02 + 4.290000e+00 1.199120e+01 -5.925218e+00 8.789847e-02 + 4.300000e+00 1.246467e+01 -5.939030e+00 8.751740e-02 + 4.310000e+00 1.277484e+01 -5.952841e+00 8.690514e-02 + 4.320000e+00 1.291270e+01 -5.966653e+00 8.627632e-02 + 4.330000e+00 1.287439e+01 -5.980465e+00 8.585518e-02 + 4.340000e+00 1.266135e+01 -5.994277e+00 8.579510e-02 + 4.350000e+00 1.228021e+01 -6.008088e+00 8.612033e-02 + 4.360000e+00 1.174245e+01 -6.021900e+00 8.671645e-02 + 4.370000e+00 1.106387e+01 -6.035712e+00 8.737418e-02 + 4.380000e+00 1.026392e+01 -6.049523e+00 8.786556e-02 + 4.390000e+00 9.364814e+00 -6.063335e+00 8.802129e-02 + 4.400000e+00 8.390613e+00 -6.077147e+00 8.778446e-02 + 4.410000e+00 7.366263e+00 -6.090958e+00 8.722793e-02 + 4.420000e+00 6.316617e+00 -6.104770e+00 8.653223e-02 + 4.430000e+00 5.265521e+00 -6.118582e+00 8.592841e-02 + 4.440000e+00 4.234999e+00 -6.132394e+00 8.561983e-02 + 4.450000e+00 3.244559e+00 -6.146205e+00 8.570877e-02 + 4.460000e+00 2.310668e+00 -6.160017e+00 8.615855e-02 + 4.470000e+00 1.446384e+00 -6.173829e+00 8.680890e-02 + 4.480000e+00 6.611823e-01 -6.187640e+00 8.743706e-02 + 4.490000e+00 -3.905441e-02 -6.201452e+00 8.783681e-02 + 4.500000e+00 -6.518808e-01 -6.215264e+00 8.788586e-02 + 4.510000e+00 -1.177993e+00 -6.229075e+00 8.758252e-02 + 4.520000e+00 -1.620823e+00 -6.242887e+00 8.704418e-02 + 4.530000e+00 -1.986045e+00 -6.256699e+00 8.646856e-02 + 4.540000e+00 -2.281044e+00 -6.270511e+00 8.606669e-02 + 4.550000e+00 -2.514362e+00 -6.284322e+00 8.598740e-02 + 4.560000e+00 -2.695158e+00 -6.298134e+00 8.626153e-02 + 4.570000e+00 -2.832719e+00 -6.311946e+00 8.679056e-02 + 4.580000e+00 -2.936024e+00 -6.325757e+00 8.738503e-02 + 4.590000e+00 -3.013391e+00 -6.339569e+00 8.783451e-02 + 4.600000e+00 -3.072212e+00 -6.353381e+00 8.798044e-02 + 4.610000e+00 -3.118767e+00 -6.367192e+00 8.776777e-02 + 4.620000e+00 -3.158134e+00 -6.381004e+00 8.726241e-02 + 4.630000e+00 -3.194163e+00 -6.394816e+00 8.663102e-02 + 4.640000e+00 -3.229516e+00 -6.408627e+00 8.608727e-02 + 4.650000e+00 -3.265756e+00 -6.422439e+00 8.581849e-02 + 4.660000e+00 -3.303465e+00 -6.436251e+00 8.591708e-02 + 4.670000e+00 -3.342377e+00 -6.450063e+00 8.634536e-02 + 4.680000e+00 -3.381515e+00 -6.463874e+00 8.695011e-02 + 4.690000e+00 -3.419326e+00 -6.477686e+00 8.751985e-02 + 4.700000e+00 -3.453792e+00 -6.491498e+00 8.785941e-02 + 4.710000e+00 -3.482530e+00 -6.505309e+00 8.785407e-02 + 4.720000e+00 -3.502873e+00 -6.519121e+00 8.750507e-02 + 4.730000e+00 -3.511939e+00 -6.532933e+00 8.692868e-02 + 4.740000e+00 -3.506682e+00 -6.546744e+00 8.631937e-02 + 4.750000e+00 -3.483957e+00 -6.560556e+00 8.588540e-02 + 4.760000e+00 -3.440576e+00 -6.574368e+00 8.577557e-02 + 4.770000e+00 -3.373385e+00 -6.588180e+00 8.602434e-02 + 4.780000e+00 -3.279357e+00 -6.601991e+00 8.653953e-02 + 4.790000e+00 -3.155710e+00 -6.615803e+00 8.713833e-02 + 4.800000e+00 -3.000036e+00 -6.629615e+00 8.761468e-02 + 4.810000e+00 -2.810458e+00 -6.643426e+00 8.781026e-02 + 4.820000e+00 -2.585794e+00 -6.657238e+00 8.766528e-02 + 4.830000e+00 -2.325724e+00 -6.671050e+00 8.723634e-02 + 4.840000e+00 -2.030943e+00 -6.684861e+00 8.667774e-02 + 4.850000e+00 -1.703304e+00 -6.698673e+00 8.619059e-02 + 4.860000e+00 -1.345909e+00 -6.712485e+00 8.595303e-02 + 4.870000e+00 -9.631702e-01 -6.726297e+00 8.605479e-02 + 4.880000e+00 -5.608041e-01 -6.740108e+00 8.646303e-02 + 4.890000e+00 -1.457638e-01 -6.753920e+00 8.703493e-02 + 4.900000e+00 2.738950e-01 -6.767732e+00 8.757120e-02 + 4.910000e+00 6.892164e-01 -6.781543e+00 8.788676e-02 + 4.920000e+00 1.090608e+00 -6.795355e+00 8.787244e-02 + 4.930000e+00 1.468155e+00 -6.809167e+00 8.752974e-02 + 4.940000e+00 1.811980e+00 -6.822978e+00 8.697063e-02 + 4.950000e+00 2.112617e+00 -6.836790e+00 8.638246e-02 + 4.960000e+00 2.361395e+00 -6.850602e+00 8.596608e-02 + 4.970000e+00 2.550801e+00 -6.864413e+00 8.586518e-02 + 4.980000e+00 2.674816e+00 -6.878225e+00 8.611303e-02 + 4.990000e+00 2.729185e+00 -6.892037e+00 8.661999e-02 + 5.000000e+00 2.711627e+00 -6.905849e+00 8.720766e-02 + 5.010000e+00 2.621959e+00 -6.919660e+00 8.767376e-02 + 5.020000e+00 2.462128e+00 -6.933472e+00 8.786104e-02 + 5.030000e+00 2.236157e+00 -6.947284e+00 8.770755e-02 + 5.040000e+00 1.949990e+00 -6.961095e+00 8.726511e-02 + 5.050000e+00 1.611265e+00 -6.974907e+00 8.668269e-02 + 5.060000e+00 1.229002e+00 -6.988719e+00 8.615816e-02 + 5.070000e+00 8.132488e-01 -7.002530e+00 8.587099e-02 + 5.080000e+00 3.746712e-01 -7.016342e+00 8.591790e-02 + 5.090000e+00 -7.586038e-02 -7.030154e+00 8.627722e-02 + 5.100000e+00 -5.276906e-01 -7.043966e+00 8.681827e-02 + 5.110000e+00 -9.707736e-01 -7.057777e+00 8.735105e-02 + 5.120000e+00 -1.396027e+00 -7.071589e+00 8.769425e-02 + 5.130000e+00 -1.795627e+00 -7.085401e+00 8.773588e-02 + 5.140000e+00 -2.163237e+00 -7.099212e+00 8.746834e-02 + 5.150000e+00 -2.494151e+00 -7.113024e+00 8.698983e-02 + 5.160000e+00 -2.785361e+00 -7.126836e+00 8.647198e-02 + 5.170000e+00 -3.035536e+00 -7.140647e+00 8.610178e-02 + 5.180000e+00 -3.244924e+00 -7.154459e+00 8.601496e-02 + 5.190000e+00 -3.415178e+00 -7.168271e+00 8.624523e-02 + 5.200000e+00 -3.549129e+00 -7.182083e+00 8.671154e-02 + 5.210000e+00 -3.650505e+00 -7.195894e+00 8.724892e-02 + 5.220000e+00 -3.723620e+00 -7.209706e+00 8.766895e-02 + 5.230000e+00 -3.773049e+00 -7.223518e+00 8.782505e-02 + 5.240000e+00 -3.803304e+00 -7.237329e+00 8.766071e-02 + 5.250000e+00 -3.818524e+00 -7.251141e+00 8.722768e-02 + 5.260000e+00 -3.822194e+00 -7.264953e+00 8.667016e-02 + 5.270000e+00 -3.816918e+00 -7.278764e+00 8.617831e-02 + 5.280000e+00 -3.804229e+00 -7.292576e+00 8.592329e-02 + 5.290000e+00 -3.784477e+00 -7.306388e+00 8.599517e-02 + 5.300000e+00 -3.756772e+00 -7.320200e+00 8.636886e-02 + 5.310000e+00 -3.718998e+00 -7.334011e+00 8.691337e-02 + 5.320000e+00 -3.667897e+00 -7.347823e+00 8.744021e-02 + 5.330000e+00 -3.599214e+00 -7.361635e+00 8.776965e-02 + 5.340000e+00 -3.507905e+00 -7.375446e+00 8.779011e-02 + 5.350000e+00 -3.388388e+00 -7.389258e+00 8.749321e-02 + 5.360000e+00 -3.234838e+00 -7.403070e+00 8.697617e-02 + 5.370000e+00 -3.041515e+00 -7.416881e+00 8.641121e-02 + 5.380000e+00 -2.803099e+00 -7.430693e+00 8.598917e-02 + 5.390000e+00 -2.515036e+00 -7.444505e+00 8.585342e-02 + 5.400000e+00 -2.173860e+00 -7.458316e+00 8.604798e-02 + 5.410000e+00 -1.777503e+00 -7.472128e+00 8.650183e-02 + 5.420000e+00 -1.325552e+00 -7.485940e+00 8.705661e-02 + 5.430000e+00 -8.194596e-01 -7.499752e+00 8.752478e-02 + 5.440000e+00 -2.626892e-01 -7.513563e+00 8.775421e-02 + 5.450000e+00 3.392176e-01 -7.527375e+00 8.767696e-02 + 5.460000e+00 9.786512e-01 -7.541187e+00 8.732932e-02 + 5.470000e+00 1.646031e+00 -7.554998e+00 8.683885e-02 + 5.480000e+00 2.329988e+00 -7.568810e+00 8.638176e-02 + 5.490000e+00 3.017633e+00 -7.582622e+00 8.612218e-02 + 5.500000e+00 3.694900e+00 -7.596433e+00 8.615289e-02 + 5.510000e+00 4.346958e+00 -7.610245e+00 8.646102e-02 + 5.520000e+00 4.958674e+00 -7.624057e+00 8.693372e-02 + 5.530000e+00 5.515119e+00 -7.637869e+00 8.740100e-02 + 5.540000e+00 6.002084e+00 -7.651680e+00 8.769710e-02 + 5.550000e+00 6.406594e+00 -7.665492e+00 8.771699e-02 + 5.560000e+00 6.717406e+00 -7.679304e+00 8.745053e-02 + 5.570000e+00 6.925442e+00 -7.693115e+00 8.698579e-02 + 5.580000e+00 7.024169e+00 -7.706927e+00 8.648066e-02 + 5.590000e+00 7.009884e+00 -7.720739e+00 8.610998e-02 + 5.600000e+00 6.881897e+00 -7.734550e+00 8.600369e-02 + 5.610000e+00 6.642601e+00 -7.748362e+00 8.619864e-02 + 5.620000e+00 6.297426e+00 -7.762174e+00 8.662450e-02 + 5.630000e+00 5.854665e+00 -7.775986e+00 8.713015e-02 + 5.640000e+00 5.325193e+00 -7.789797e+00 8.753878e-02 + 5.650000e+00 4.722072e+00 -7.803609e+00 8.770900e-02 + 5.660000e+00 4.060080e+00 -7.817421e+00 8.758144e-02 + 5.670000e+00 3.355160e+00 -7.831232e+00 8.719768e-02 + 5.680000e+00 2.623839e+00 -7.845044e+00 8.668744e-02 + 5.690000e+00 1.882618e+00 -7.858856e+00 8.622663e-02 + 5.700000e+00 1.147384e+00 -7.872667e+00 8.597749e-02 + 5.710000e+00 4.328576e-01 -7.886479e+00 8.603025e-02 + 5.720000e+00 -2.478914e-01 -7.900291e+00 8.636931e-02 + 5.730000e+00 -8.838435e-01 -7.914102e+00 8.687907e-02 + 5.740000e+00 -1.466320e+00 -7.927914e+00 8.738655e-02 + 5.750000e+00 -1.989158e+00 -7.941726e+00 8.772229e-02 + 5.760000e+00 -2.448757e+00 -7.955538e+00 8.777674e-02 + 5.770000e+00 -2.844007e+00 -7.969349e+00 8.753466e-02 + 5.780000e+00 -3.176100e+00 -7.983161e+00 8.707946e-02 + 5.790000e+00 -3.448233e+00 -7.996973e+00 8.656641e-02 + 5.800000e+00 -3.665236e+00 -8.010784e+00 8.617139e-02 + 5.810000e+00 -3.833133e+00 -8.024596e+00 8.602990e-02 + 5.820000e+00 -3.958675e+00 -8.038408e+00 8.618804e-02 + 5.830000e+00 -4.048865e+00 -8.052219e+00 8.658593e-02 + 5.840000e+00 -4.110503e+00 -8.066031e+00 8.708082e-02 + 5.850000e+00 -4.149782e+00 -8.079843e+00 8.749955e-02 + 5.860000e+00 -4.171953e+00 -8.093655e+00 8.769861e-02 + 5.870000e+00 -4.181080e+00 -8.107466e+00 8.761101e-02 + 5.880000e+00 -4.179890e+00 -8.121278e+00 8.726695e-02 + 5.890000e+00 -4.169735e+00 -8.135090e+00 8.678365e-02 + 5.900000e+00 -4.150654e+00 -8.148901e+00 8.632682e-02 + 5.910000e+00 -4.121538e+00 -8.162713e+00 8.605422e-02 + 5.920000e+00 -4.080373e+00 -8.176525e+00 8.605936e-02 + 5.930000e+00 -4.024548e+00 -8.190336e+00 8.633734e-02 + 5.940000e+00 -3.951214e+00 -8.204148e+00 8.678737e-02 + 5.950000e+00 -3.857649e+00 -8.217960e+00 8.725091e-02 + 5.960000e+00 -3.741620e+00 -8.231772e+00 8.756870e-02 + 5.970000e+00 -3.601711e+00 -8.245583e+00 8.763482e-02 + 5.980000e+00 -3.437595e+00 -8.259395e+00 8.743080e-02 + 5.990000e+00 -3.250224e+00 -8.273207e+00 8.703087e-02 + 6.000000e+00 -3.041939e+00 -8.287018e+00 8.657745e-02 + 6.010000e+00 -2.816474e+00 -8.300830e+00 8.623311e-02 + 6.020000e+00 -2.578867e+00 -8.314642e+00 8.612316e-02 + 6.030000e+00 -2.335272e+00 -8.328453e+00 8.628953e-02 + 6.040000e+00 -2.092693e+00 -8.342265e+00 8.667500e-02 + 6.050000e+00 -1.858648e+00 -8.356077e+00 8.714473e-02 + 6.060000e+00 -1.640791e+00 -8.369888e+00 8.753548e-02 + 6.070000e+00 -1.446513e+00 -8.383700e+00 8.771242e-02 + 6.080000e+00 -1.282544e+00 -8.397512e+00 8.761380e-02 + 6.090000e+00 -1.154595e+00 -8.411324e+00 8.727067e-02 + 6.100000e+00 -1.067042e+00 -8.425135e+00 8.679705e-02 + 6.110000e+00 -1.022691e+00 -8.438947e+00 8.635272e-02 + 6.120000e+00 -1.022633e+00 -8.452759e+00 8.608880e-02 + 6.130000e+00 -1.066192e+00 -8.466570e+00 8.609374e-02 + 6.140000e+00 -1.150981e+00 -8.480382e+00 8.636059e-02 + 6.150000e+00 -1.273047e+00 -8.494194e+00 8.678994e-02 + 6.160000e+00 -1.427113e+00 -8.508005e+00 8.722702e-02 + 6.170000e+00 -1.606882e+00 -8.521817e+00 8.751718e-02 + 6.180000e+00 -1.805393e+00 -8.535629e+00 8.755858e-02 + 6.190000e+00 -2.015408e+00 -8.549441e+00 8.733548e-02 + 6.200000e+00 -2.229787e+00 -8.563252e+00 8.692355e-02 + 6.210000e+00 -2.441843e+00 -8.577064e+00 8.646565e-02 + 6.220000e+00 -2.645638e+00 -8.590876e+00 8.612434e-02 + 6.230000e+00 -2.836214e+00 -8.604687e+00 8.602490e-02 + 6.240000e+00 -3.009722e+00 -8.618499e+00 8.620926e-02 + 6.250000e+00 -3.163462e+00 -8.632311e+00 8.661987e-02 + 6.260000e+00 -3.295813e+00 -8.646122e+00 8.712074e-02 + 6.270000e+00 -3.406071e+00 -8.659934e+00 8.754630e-02 + 6.280000e+00 -3.494195e+00 -8.673746e+00 8.775802e-02 + 6.290000e+00 -3.560494e+00 -8.687558e+00 8.768946e-02 + 6.300000e+00 -3.605266e+00 -8.701369e+00 8.736689e-02 + 6.310000e+00 -3.628425e+00 -8.715181e+00 8.690065e-02 + 6.320000e+00 -3.629147e+00 -8.728993e+00 8.644948e-02 + 6.330000e+00 -3.605564e+00 -8.742804e+00 8.616701e-02 + 6.340000e+00 -3.554534e+00 -8.756616e+00 8.614766e-02 + 6.350000e+00 -3.471511e+00 -8.770428e+00 8.639233e-02 + 6.360000e+00 -3.350547e+00 -8.784239e+00 8.680872e-02 + 6.370000e+00 -3.184410e+00 -8.798051e+00 8.724599e-02 + 6.380000e+00 -2.964853e+00 -8.811863e+00 8.754876e-02 + 6.390000e+00 -2.683002e+00 -8.825674e+00 8.760987e-02 + 6.400000e+00 -2.329863e+00 -8.839486e+00 8.740504e-02 + 6.410000e+00 -1.896913e+00 -8.853298e+00 8.700040e-02 + 6.420000e+00 -1.376751e+00 -8.867110e+00 8.653120e-02 + 6.430000e+00 -7.637666e-01 -8.880921e+00 8.615719e-02 + 6.440000e+00 -5.478658e-02 -8.894733e+00 8.600743e-02 + 6.450000e+00 7.503419e-01 -8.908545e+00 8.613388e-02 + 6.460000e+00 1.648275e+00 -8.922356e+00 8.649247e-02 + 6.470000e+00 2.631839e+00 -8.936168e+00 8.696004e-02 + 6.480000e+00 3.689864e+00 -8.949980e+00 8.737928e-02 + 6.490000e+00 4.807217e+00 -8.963791e+00 8.761334e-02 + 6.500000e+00 5.965040e+00 -8.977603e+00 8.759051e-02 + 6.510000e+00 7.141184e+00 -8.991415e+00 8.732628e-02 + 6.520000e+00 8.310844e+00 -9.005227e+00 8.691727e-02 + 6.530000e+00 9.447355e+00 -9.019038e+00 8.650892e-02 + 6.540000e+00 1.052313e+01 -9.032850e+00 8.624585e-02 + 6.550000e+00 1.151068e+01 -9.046662e+00 8.622056e-02 + 6.560000e+00 1.238368e+01 -9.060473e+00 8.643989e-02 + 6.570000e+00 1.311803e+01 -9.074285e+00 8.682322e-02 + 6.580000e+00 1.369284e+01 -9.088097e+00 8.723311e-02 + 6.590000e+00 1.409131e+01 -9.101908e+00 8.752513e-02 + 6.600000e+00 1.430143e+01 -9.115720e+00 8.759756e-02 + 6.610000e+00 1.431653e+01 -9.129532e+00 8.742490e-02 + 6.620000e+00 1.413553e+01 -9.143344e+00 8.706581e-02 + 6.630000e+00 1.376303e+01 -9.157155e+00 8.664383e-02 + 6.640000e+00 1.320907e+01 -9.170967e+00 8.630586e-02 + 6.650000e+00 1.248876e+01 -9.184779e+00 8.617074e-02 + 6.660000e+00 1.162158e+01 -9.198590e+00 8.628606e-02 + 6.670000e+00 1.063063e+01 -9.212402e+00 8.661044e-02 + 6.680000e+00 9.541615e+00 -9.226214e+00 8.702918e-02 + 6.690000e+00 8.381888e+00 -9.240025e+00 8.739620e-02 + 6.700000e+00 7.179331e+00 -9.253837e+00 8.758517e-02 + 6.710000e+00 5.961341e+00 -9.267649e+00 8.753185e-02 + 6.720000e+00 4.753851e+00 -9.281461e+00 8.725476e-02 + 6.730000e+00 3.580485e+00 -9.295272e+00 8.684917e-02 + 6.740000e+00 2.461850e+00 -9.309084e+00 8.645577e-02 + 6.750000e+00 1.415025e+00 -9.322896e+00 8.621269e-02 + 6.760000e+00 4.532287e-01 -9.336707e+00 8.620624e-02 + 6.770000e+00 -4.142968e-01 -9.350519e+00 8.643915e-02 + 6.780000e+00 -1.182223e+00 -9.364331e+00 8.682945e-02 + 6.790000e+00 -1.848891e+00 -9.378142e+00 8.724072e-02 + 6.800000e+00 -2.415919e+00 -9.391954e+00 8.753056e-02 + 6.810000e+00 -2.887703e+00 -9.405766e+00 8.759901e-02 + 6.820000e+00 -3.270830e+00 -9.419577e+00 8.742103e-02 + 6.830000e+00 -3.573468e+00 -9.433389e+00 8.705433e-02 + 6.840000e+00 -3.804748e+00 -9.447201e+00 8.662072e-02 + 6.850000e+00 -3.974192e+00 -9.461013e+00 8.626564e-02 + 6.860000e+00 -4.091203e+00 -9.474824e+00 8.610804e-02 + 6.870000e+00 -4.164653e+00 -9.488636e+00 8.619781e-02 + 6.880000e+00 -4.202570e+00 -9.502448e+00 8.649787e-02 + 6.890000e+00 -4.211947e+00 -9.516259e+00 8.689872e-02 + 6.900000e+00 -4.198652e+00 -9.530071e+00 8.725885e-02 + 6.910000e+00 -4.167450e+00 -9.543883e+00 8.745463e-02 + 6.920000e+00 -4.122095e+00 -9.557694e+00 8.742188e-02 + 6.930000e+00 -4.065505e+00 -9.571506e+00 8.717653e-02 + 6.940000e+00 -3.999959e+00 -9.585318e+00 8.680901e-02 + 6.950000e+00 -3.927327e+00 -9.599130e+00 8.645406e-02 + 6.960000e+00 -3.849278e+00 -9.612941e+00 8.624413e-02 + 6.970000e+00 -3.767473e+00 -9.626753e+00 8.626168e-02 + 6.980000e+00 -3.683709e+00 -9.640565e+00 8.650827e-02 + 6.990000e+00 -3.600007e+00 -9.654376e+00 8.690351e-02 + 7.000000e+00 -3.518647e+00 -9.668188e+00 8.731419e-02 + 7.010000e+00 -3.442143e+00 -9.682000e+00 8.760140e-02 + 7.020000e+00 -3.373162e+00 -9.695811e+00 8.766765e-02 + 7.030000e+00 -3.314405e+00 -9.709623e+00 8.748867e-02 + 7.040000e+00 -3.268464e+00 -9.723435e+00 8.712136e-02 + 7.050000e+00 -3.237658e+00 -9.737247e+00 8.668565e-02 + 7.060000e+00 -3.223883e+00 -9.751058e+00 8.632511e-02 + 7.070000e+00 -3.228470e+00 -9.764870e+00 8.615774e-02 + 7.080000e+00 -3.252079e+00 -9.778682e+00 8.623406e-02 + 7.090000e+00 -3.294630e+00 -9.792493e+00 8.651903e-02 + 7.100000e+00 -3.355279e+00 -9.806305e+00 8.690579e-02 + 7.110000e+00 -3.432434e+00 -9.820117e+00 8.725504e-02 + 7.120000e+00 -3.523812e+00 -9.833928e+00 8.744407e-02 + 7.130000e+00 -3.626529e+00 -9.847740e+00 8.740803e-02 + 7.140000e+00 -3.737210e+00 -9.861552e+00 8.716079e-02 + 7.150000e+00 -3.852113e+00 -9.875363e+00 8.679014e-02 + 7.160000e+00 -3.967249e+00 -9.889175e+00 8.642857e-02 + 7.170000e+00 -4.078489e+00 -9.902987e+00 8.620775e-02 + 7.180000e+00 -4.181658e+00 -9.916799e+00 8.621132e-02 + 7.190000e+00 -4.272592e+00 -9.930610e+00 8.644384e-02 + 7.200000e+00 -4.347178e+00 -9.944422e+00 8.682872e-02 + 7.210000e+00 -4.401366e+00 -9.958234e+00 8.723616e-02 + 7.220000e+00 -4.431155e+00 -9.972045e+00 8.752910e-02 + 7.230000e+00 -4.432579e+00 -9.985857e+00 8.760985e-02 + 7.240000e+00 -4.401686e+00 -9.999669e+00 8.745203e-02 + 7.250000e+00 -4.334534e+00 -1.001348e+01 8.710905e-02 + 7.260000e+00 -4.227210e+00 -1.002729e+01 8.669701e-02 + 7.270000e+00 -4.075886e+00 -1.004110e+01 8.635634e-02 + 7.280000e+00 -3.876916e+00 -1.005492e+01 8.620357e-02 + 7.290000e+00 -3.626982e+00 -1.006873e+01 8.628964e-02 + 7.300000e+00 -3.323282e+00 -1.008254e+01 8.658147e-02 + 7.310000e+00 -2.963758e+00 -1.009635e+01 8.697451e-02 + 7.320000e+00 -2.547353e+00 -1.011016e+01 8.733096e-02 + 7.330000e+00 -2.074275e+00 -1.012397e+01 8.752789e-02 + 7.340000e+00 -1.546259e+00 -1.013779e+01 8.749837e-02 + 7.350000e+00 -9.667883e-01 -1.015160e+01 8.725294e-02 + 7.360000e+00 -3.412800e-01 -1.016541e+01 8.687595e-02 + 7.370000e+00 3.228177e-01 -1.017922e+01 8.649780e-02 + 7.380000e+00 1.016010e+00 -1.019303e+01 8.625065e-02 + 7.390000e+00 1.726847e+00 -1.020684e+01 8.622171e-02 + 7.400000e+00 2.442125e+00 -1.022066e+01 8.642147e-02 + 7.410000e+00 3.147204e+00 -1.023447e+01 8.677992e-02 + 7.420000e+00 3.826419e+00 -1.024828e+01 8.717238e-02 + 7.430000e+00 4.463596e+00 -1.026209e+01 8.746396e-02 + 7.440000e+00 5.042623e+00 -1.027590e+01 8.755554e-02 + 7.450000e+00 5.548071e+00 -1.028971e+01 8.741620e-02 + 7.460000e+00 5.965823e+00 -1.030353e+01 8.709278e-02 + 7.470000e+00 6.283678e+00 -1.031734e+01 8.669456e-02 + 7.480000e+00 6.491899e+00 -1.033115e+01 8.635679e-02 + 7.490000e+00 6.583679e+00 -1.034496e+01 8.619412e-02 + 7.500000e+00 6.555482e+00 -1.035877e+01 8.625962e-02 + 7.510000e+00 6.407260e+00 -1.037258e+01 8.652573e-02 + 7.520000e+00 6.142512e+00 -1.038640e+01 8.689495e-02 + 7.530000e+00 5.768195e+00 -1.040021e+01 8.723582e-02 + 7.540000e+00 5.294482e+00 -1.041402e+01 8.742941e-02 + 7.550000e+00 4.734383e+00 -1.042783e+01 8.740958e-02 + 7.560000e+00 4.103251e+00 -1.044164e+01 8.718460e-02 + 7.570000e+00 3.418196e+00 -1.045545e+01 8.683440e-02 + 7.580000e+00 2.697439e+00 -1.046927e+01 8.648406e-02 + 7.590000e+00 1.959645e+00 -1.048308e+01 8.626112e-02 + 7.600000e+00 1.223256e+00 -1.049689e+01 8.625008e-02 + 7.610000e+00 5.058789e-01 -1.051070e+01 8.646118e-02 + 7.620000e+00 -1.762705e-01 -1.052451e+01 8.682625e-02 + 7.630000e+00 -8.088206e-01 -1.053832e+01 8.722328e-02 + 7.640000e+00 -1.379593e+00 -1.055214e+01 8.751959e-02 + 7.650000e+00 -1.878834e+00 -1.056595e+01 8.761687e-02 + 7.660000e+00 -2.299321e+00 -1.057976e+01 8.748327e-02 + 7.670000e+00 -2.636371e+00 -1.059357e+01 8.716352e-02 + 7.680000e+00 -2.887729e+00 -1.060738e+01 8.676455e-02 + 7.690000e+00 -3.053399e+00 -1.062120e+01 8.642026e-02 + 7.700000e+00 -3.135390e+00 -1.063501e+01 8.624582e-02 + 7.710000e+00 -3.137448e+00 -1.064882e+01 8.629701e-02 + 7.720000e+00 -3.064754e+00 -1.066263e+01 8.655023e-02 + 7.730000e+00 -2.923640e+00 -1.067644e+01 8.691194e-02 + 7.740000e+00 -2.721321e+00 -1.069025e+01 8.725297e-02 + 7.750000e+00 -2.465665e+00 -1.070407e+01 8.745415e-02 + 7.760000e+00 -2.165005e+00 -1.071788e+01 8.744637e-02 + 7.770000e+00 -1.827993e+00 -1.073169e+01 8.723295e-02 + 7.780000e+00 -1.463495e+00 -1.074550e+01 8.688815e-02 + 7.790000e+00 -1.080518e+00 -1.075931e+01 8.653246e-02 + 7.800000e+00 -6.881554e-01 -1.077312e+01 8.629153e-02 + 7.810000e+00 -2.955460e-01 -1.078694e+01 8.625170e-02 + 7.820000e+00 8.818105e-02 -1.080075e+01 8.642853e-02 + 7.830000e+00 4.539747e-01 -1.081456e+01 8.676105e-02 + 7.840000e+00 7.929615e-01 -1.082837e+01 8.713417e-02 + 7.850000e+00 1.096579e+00 -1.084218e+01 8.741985e-02 + 7.860000e+00 1.356747e+00 -1.085599e+01 8.752100e-02 + 7.870000e+00 1.566073e+00 -1.086981e+01 8.740354e-02 + 7.880000e+00 1.718081e+00 -1.088362e+01 8.710728e-02 + 7.890000e+00 1.807461e+00 -1.089743e+01 8.673292e-02 + 7.900000e+00 1.830310e+00 -1.091124e+01 8.640862e-02 + 7.910000e+00 1.784361e+00 -1.092505e+01 8.624595e-02 + 7.920000e+00 1.669172e+00 -1.093886e+01 8.630016e-02 + 7.930000e+00 1.486265e+00 -1.095268e+01 8.655020e-02 + 7.940000e+00 1.239192e+00 -1.096649e+01 8.690681e-02 + 7.950000e+00 9.335295e-01 -1.098030e+01 8.724518e-02 + 7.960000e+00 5.767748e-01 -1.099411e+01 8.744885e-02 + 7.970000e+00 1.781685e-01 -1.100792e+01 8.744896e-02 + 7.980000e+00 -2.515741e-01 -1.102173e+01 8.724661e-02 + 7.990000e+00 -7.006017e-01 -1.103555e+01 8.691219e-02 + 8.000000e+00 -1.156323e+00 -1.104936e+01 8.656200e-02 + 8.010000e+00 -1.605844e+00 -1.106317e+01 8.631875e-02 + 8.020000e+00 -2.036420e+00 -1.107698e+01 8.626827e-02 + 8.030000e+00 -2.435906e+00 -1.109079e+01 8.642838e-02 + 8.040000e+00 -2.793178e+00 -1.110460e+01 8.674233e-02 + 8.050000e+00 -3.098512e+00 -1.111842e+01 8.709977e-02 + 8.060000e+00 -3.343890e+00 -1.113223e+01 8.737617e-02 + 8.070000e+00 -3.523241e+00 -1.114604e+01 8.747575e-02 + 8.080000e+00 -3.632589e+00 -1.115985e+01 8.736322e-02 + 8.090000e+00 -3.670114e+00 -1.117366e+01 8.707518e-02 + 8.100000e+00 -3.636133e+00 -1.118747e+01 8.670830e-02 + 8.110000e+00 -3.532999e+00 -1.120129e+01 8.638727e-02 + 8.120000e+00 -3.364936e+00 -1.121510e+01 8.622217e-02 + 8.130000e+00 -3.137818e+00 -1.122891e+01 8.626941e-02 + 8.140000e+00 -2.858915e+00 -1.124272e+01 8.651148e-02 + 8.150000e+00 -2.536611e+00 -1.125653e+01 8.686382e-02 + 8.160000e+00 -2.180124e+00 -1.127034e+01 8.720573e-02 + 8.170000e+00 -1.799223e+00 -1.128416e+01 8.742290e-02 + 8.180000e+00 -1.403965e+00 -1.129797e+01 8.744584e-02 + 8.190000e+00 -1.004458e+00 -1.131178e+01 8.727231e-02 + 8.200000e+00 -6.106442e-01 -1.132559e+01 8.696732e-02 + 8.210000e+00 -2.321136e-01 -1.133940e+01 8.664116e-02 + 8.220000e+00 1.220572e-01 -1.135322e+01 8.641148e-02 + 8.230000e+00 4.434491e-01 -1.136703e+01 8.636156e-02 + 8.240000e+00 7.244291e-01 -1.138084e+01 8.650989e-02 + 8.250000e+00 9.582697e-01 -1.139465e+01 8.680331e-02 + 8.260000e+00 1.139265e+00 -1.140846e+01 8.713658e-02 + 8.270000e+00 1.262844e+00 -1.142227e+01 8.739024e-02 + 8.280000e+00 1.325686e+00 -1.143609e+01 8.747210e-02 + 8.290000e+00 1.325830e+00 -1.144990e+01 8.734839e-02 + 8.300000e+00 1.262779e+00 -1.146371e+01 8.705530e-02 + 8.310000e+00 1.137587e+00 -1.147752e+01 8.668776e-02 + 8.320000e+00 9.529220e-01 -1.149133e+01 8.636844e-02 + 8.330000e+00 7.130975e-01 -1.150514e+01 8.620594e-02 + 8.340000e+00 4.240556e-01 -1.151896e+01 8.625642e-02 + 8.350000e+00 9.329779e-02 -1.153277e+01 8.650321e-02 + 8.360000e+00 -2.702450e-01 -1.154658e+01 8.686301e-02 + 8.370000e+00 -6.564063e-01 -1.156039e+01 8.721593e-02 + 8.380000e+00 -1.054043e+00 -1.157420e+01 8.744716e-02 + 8.390000e+00 -1.451351e+00 -1.158801e+01 8.748512e-02 + 8.400000e+00 -1.836238e+00 -1.160183e+01 8.732405e-02 + 8.410000e+00 -2.196723e+00 -1.161564e+01 8.702498e-02 + 8.420000e+00 -2.521366e+00 -1.162945e+01 8.669490e-02 + 8.430000e+00 -2.799690e+00 -1.164326e+01 8.645018e-02 + 8.440000e+00 -3.022590e+00 -1.165707e+01 8.637573e-02 + 8.450000e+00 -3.182695e+00 -1.167088e+01 8.649456e-02 + 8.460000e+00 -3.274671e+00 -1.168470e+01 8.675976e-02 + 8.470000e+00 -3.295447e+00 -1.169851e+01 8.707235e-02 + 8.480000e+00 -3.244348e+00 -1.171232e+01 8.731743e-02 + 8.490000e+00 -3.123134e+00 -1.172613e+01 8.740456e-02 + 8.500000e+00 -2.935929e+00 -1.173994e+01 8.729860e-02 + 8.510000e+00 -2.689061e+00 -1.175375e+01 8.703170e-02 + 8.520000e+00 -2.390808e+00 -1.176757e+01 8.669304e-02 + 8.530000e+00 -2.051063e+00 -1.178138e+01 8.639925e-02 + 8.540000e+00 -1.680950e+00 -1.179519e+01 8.625415e-02 + 8.550000e+00 -1.292393e+00 -1.180900e+01 8.631147e-02 + 8.560000e+00 -8.976655e-01 -1.182281e+01 8.655493e-02 + 8.570000e+00 -5.089507e-01 -1.183662e+01 8.690379e-02 + 8.580000e+00 -1.379157e-01 -1.185044e+01 8.724170e-02 + 8.590000e+00 2.046711e-01 -1.186425e+01 8.745698e-02 + 8.600000e+00 5.092724e-01 -1.187806e+01 8.747997e-02 + 8.610000e+00 7.678529e-01 -1.189187e+01 8.730537e-02 + 8.620000e+00 9.740860e-01 -1.190568e+01 8.699360e-02 + 8.630000e+00 1.123495e+00 -1.191949e+01 8.665084e-02 + 8.640000e+00 1.213531e+00 -1.193331e+01 8.639336e-02 + 8.650000e+00 1.243602e+00 -1.194712e+01 8.630718e-02 + 8.660000e+00 1.215045e+00 -1.196093e+01 8.641768e-02 + 8.670000e+00 1.131068e+00 -1.197474e+01 8.668092e-02 + 8.680000e+00 9.966652e-01 -1.198855e+01 8.700042e-02 + 8.690000e+00 8.184972e-01 -1.200236e+01 8.726226e-02 + 8.700000e+00 6.047687e-01 -1.201618e+01 8.737496e-02 + 8.710000e+00 3.650812e-01 -1.202999e+01 8.730014e-02 + 8.720000e+00 1.102728e-01 -1.204380e+01 8.706510e-02 + 8.730000e+00 -1.477617e-01 -1.205761e+01 8.675349e-02 + 8.740000e+00 -3.962768e-01 -1.207142e+01 8.647706e-02 + 8.750000e+00 -6.219127e-01 -1.208524e+01 8.633674e-02 + 8.760000e+00 -8.109697e-01 -1.209905e+01 8.638627e-02 + 8.770000e+00 -9.497260e-01 -1.211286e+01 8.661224e-02 + 8.780000e+00 -1.024799e+00 -1.212667e+01 8.693873e-02 + 8.790000e+00 -1.023552e+00 -1.214048e+01 8.725461e-02 + 8.800000e+00 -9.345354e-01 -1.215429e+01 8.745244e-02 + 8.810000e+00 -7.479563e-01 -1.216811e+01 8.746492e-02 + 8.820000e+00 -4.561570e-01 -1.218192e+01 8.728703e-02 + 8.830000e+00 -5.408176e-02 -1.219573e+01 8.697780e-02 + 8.840000e+00 4.602920e-01 -1.220954e+01 8.664106e-02 + 8.850000e+00 1.085586e+00 -1.222335e+01 8.639072e-02 + 8.860000e+00 1.816743e+00 -1.223716e+01 8.631117e-02 + 8.870000e+00 2.644869e+00 -1.225098e+01 8.642725e-02 + 8.880000e+00 3.557207e+00 -1.226479e+01 8.669538e-02 + 8.890000e+00 4.537280e+00 -1.227860e+01 8.701972e-02 + 8.900000e+00 5.565186e+00 -1.229241e+01 8.728657e-02 + 8.910000e+00 6.618072e+00 -1.230622e+01 8.740369e-02 + 8.920000e+00 7.670763e+00 -1.232003e+01 8.733101e-02 + 8.930000e+00 8.696530e+00 -1.233385e+01 8.709356e-02 + 8.940000e+00 9.667974e+00 -1.234766e+01 8.677302e-02 + 8.950000e+00 1.055799e+01 -1.236147e+01 8.648046e-02 + 8.960000e+00 1.134075e+01 -1.237528e+01 8.631808e-02 + 8.970000e+00 1.199270e+01 -1.238909e+01 8.634303e-02 + 8.980000e+00 1.249350e+01 -1.240290e+01 8.654665e-02 + 8.990000e+00 1.282679e+01 -1.241672e+01 8.685784e-02 + 9.000000e+00 1.298090e+01 -1.243053e+01 8.716892e-02 + 9.010000e+00 1.294932e+01 -1.244434e+01 8.737363e-02 + 9.020000e+00 1.273097e+01 -1.245815e+01 8.740326e-02 + 9.030000e+00 1.233022e+01 -1.247196e+01 8.724920e-02 + 9.040000e+00 1.175672e+01 -1.248577e+01 8.696564e-02 + 9.050000e+00 1.102496e+01 -1.249959e+01 8.665154e-02 + 9.060000e+00 1.015368e+01 -1.251340e+01 8.641715e-02 + 9.070000e+00 9.165054e+00 -1.252721e+01 8.634552e-02 + 9.080000e+00 8.083764e+00 -1.254102e+01 8.646260e-02 + 9.090000e+00 6.936027e+00 -1.255483e+01 8.672781e-02 + 9.100000e+00 5.748546e+00 -1.256864e+01 8.704891e-02 + 9.110000e+00 4.547501e+00 -1.258246e+01 8.731494e-02 + 9.120000e+00 3.357612e+00 -1.259627e+01 8.743453e-02 + 9.130000e+00 2.201315e+00 -1.261008e+01 8.736635e-02 + 9.140000e+00 1.098084e+00 -1.262389e+01 8.713241e-02 + 9.150000e+00 6.393724e-02 -1.263770e+01 8.681078e-02 + 9.160000e+00 -8.888679e-01 -1.265151e+01 8.650957e-02 + 9.170000e+00 -1.751948e+00 -1.266533e+01 8.633011e-02 + 9.180000e+00 -2.520712e+00 -1.267914e+01 8.633136e-02 + 9.190000e+00 -3.194120e+00 -1.269295e+01 8.650901e-02 + 9.200000e+00 -3.774287e+00 -1.270676e+01 8.679761e-02 + 9.210000e+00 -4.265986e+00 -1.272057e+01 8.709484e-02 + 9.220000e+00 -4.676078e+00 -1.273438e+01 8.729798e-02 + 9.230000e+00 -5.012897e+00 -1.274820e+01 8.733918e-02 + 9.240000e+00 -5.285654e+00 -1.276201e+01 8.720785e-02 + 9.250000e+00 -5.503858e+00 -1.277582e+01 8.695382e-02 + 9.260000e+00 -5.676820e+00 -1.278963e+01 8.667035e-02 + 9.270000e+00 -5.813222e+00 -1.280344e+01 8.646195e-02 + 9.280000e+00 -5.920798e+00 -1.281725e+01 8.640730e-02 + 9.290000e+00 -6.006108e+00 -1.283107e+01 8.653038e-02 + 9.300000e+00 -6.074419e+00 -1.284488e+01 8.679133e-02 + 9.310000e+00 -6.129667e+00 -1.285869e+01 8.710062e-02 + 9.320000e+00 -6.174503e+00 -1.287250e+01 8.735094e-02 + 9.330000e+00 -6.210392e+00 -1.288631e+01 8.745438e-02 + 9.340000e+00 -6.237755e+00 -1.290013e+01 8.737209e-02 + 9.350000e+00 -6.256124e+00 -1.291394e+01 8.712738e-02 + 9.360000e+00 -6.264304e+00 -1.292775e+01 8.679863e-02 + 9.370000e+00 -6.260523e+00 -1.294156e+01 8.649375e-02 + 9.380000e+00 -6.242561e+00 -1.295537e+01 8.631371e-02 + 9.390000e+00 -6.207852e+00 -1.296918e+01 8.631735e-02 + 9.400000e+00 -6.153565e+00 -1.298300e+01 8.650032e-02 + 9.410000e+00 -6.076659e+00 -1.299681e+01 8.679699e-02 + 9.420000e+00 -5.973936e+00 -1.301062e+01 8.710424e-02 + 9.430000e+00 -5.842086e+00 -1.302443e+01 8.731774e-02 + 9.440000e+00 -5.677740e+00 -1.303824e+01 8.736720e-02 + 9.450000e+00 -5.477554e+00 -1.305205e+01 8.723917e-02 + 9.460000e+00 -5.238312e+00 -1.306587e+01 8.698093e-02 + 9.470000e+00 -4.957070e+00 -1.307968e+01 8.668442e-02 + 9.480000e+00 -4.631329e+00 -1.309349e+01 8.645490e-02 + 9.490000e+00 -4.259246e+00 -1.310730e+01 8.637421e-02 + 9.500000e+00 -3.839860e+00 -1.312111e+01 8.647142e-02 + 9.510000e+00 -3.373332e+00 -1.313492e+01 8.671246e-02 + 9.520000e+00 -2.861170e+00 -1.314874e+01 8.701277e-02 + 9.530000e+00 -2.306436e+00 -1.316255e+01 8.726783e-02 + 9.540000e+00 -1.713899e+00 -1.317636e+01 8.738967e-02 + 9.550000e+00 -1.090124e+00 -1.319017e+01 8.733651e-02 + 9.560000e+00 -4.434820e-01 -1.320398e+01 8.712656e-02 + 9.570000e+00 2.159325e-01 -1.321779e+01 8.683195e-02 + 9.580000e+00 8.764886e-01 -1.323161e+01 8.655460e-02 + 9.590000e+00 1.525300e+00 -1.324542e+01 8.639119e-02 + 9.600000e+00 2.148600e+00 -1.325923e+01 8.639887e-02 + 9.610000e+00 2.732200e+00 -1.327304e+01 8.657453e-02 + 9.620000e+00 3.262001e+00 -1.328685e+01 8.685595e-02 + 9.630000e+00 3.724542e+00 -1.330066e+01 8.714429e-02 + 9.640000e+00 4.107565e+00 -1.331448e+01 8.733899e-02 + 9.650000e+00 4.400543e+00 -1.332829e+01 8.737213e-02 + 9.660000e+00 4.595165e+00 -1.334210e+01 8.723101e-02 + 9.670000e+00 4.685740e+00 -1.335591e+01 8.696239e-02 + 9.680000e+00 4.669497e+00 -1.336972e+01 8.665720e-02 + 9.690000e+00 4.546759e+00 -1.338353e+01 8.642001e-02 + 9.700000e+00 4.320990e+00 -1.339735e+01 8.633296e-02 + 9.710000e+00 3.998700e+00 -1.341116e+01 8.642649e-02 + 9.720000e+00 3.589214e+00 -1.342497e+01 8.666849e-02 + 9.730000e+00 3.104320e+00 -1.343878e+01 8.697614e-02 + 9.740000e+00 2.557813e+00 -1.345259e+01 8.724548e-02 + 9.750000e+00 1.964951e+00 -1.346640e+01 8.738734e-02 + 9.760000e+00 1.341861e+00 -1.348022e+01 8.735698e-02 + 9.770000e+00 7.049174e-01 -1.349403e+01 8.716823e-02 + 9.780000e+00 7.012748e-02 -1.350784e+01 8.688841e-02 + 9.790000e+00 -5.474493e-01 -1.352165e+01 8.661543e-02 + 9.800000e+00 -1.134219e+00 -1.353546e+01 8.644403e-02 + 9.810000e+00 -1.678491e+00 -1.354927e+01 8.643230e-02 + 9.820000e+00 -2.170806e+00 -1.356309e+01 8.658090e-02 + 9.830000e+00 -2.604164e+00 -1.357690e+01 8.683326e-02 + 9.840000e+00 -2.974131e+00 -1.359071e+01 8.709657e-02 + 9.850000e+00 -3.278823e+00 -1.360452e+01 8.727520e-02 + 9.860000e+00 -3.518798e+00 -1.361833e+01 8.730399e-02 + 9.870000e+00 -3.696842e+00 -1.363215e+01 8.717051e-02 + 9.880000e+00 -3.817675e+00 -1.364596e+01 8.691943e-02 + 9.890000e+00 -3.887602e+00 -1.365977e+01 8.663786e-02 + 9.900000e+00 -3.914115e+00 -1.367358e+01 8.642579e-02 + 9.910000e+00 -3.905480e+00 -1.368739e+01 8.636104e-02 + 9.920000e+00 -3.870320e+00 -1.370120e+01 8.647090e-02 + 9.930000e+00 -3.817203e+00 -1.371502e+01 8.672179e-02 + 9.940000e+00 -3.754274e+00 -1.372883e+01 8.703094e-02 + 9.950000e+00 -3.688918e+00 -1.374264e+01 8.729552e-02 + 9.960000e+00 -3.627475e+00 -1.375645e+01 8.742791e-02 + 9.970000e+00 -3.575013e+00 -1.377026e+01 8.738488e-02 + 9.980000e+00 -3.535158e+00 -1.378407e+01 8.718164e-02 + 9.990000e+00 -3.509989e+00 -1.379789e+01 8.688691e-02 + 1.000000e+01 -3.499993e+00 -1.381170e+01 8.660026e-02 + 1.001000e+01 -3.504072e+00 -1.382551e+01 8.641841e-02 + 1.002000e+01 -3.519616e+00 -1.383932e+01 8.640157e-02 + 1.003000e+01 -3.542627e+00 -1.385313e+01 8.655216e-02 + 1.004000e+01 -3.567881e+00 -1.386694e+01 8.681427e-02 + 1.005000e+01 -3.589155e+00 -1.388076e+01 8.709419e-02 + 1.006000e+01 -3.599469e+00 -1.389457e+01 8.729364e-02 + 1.007000e+01 -3.591385e+00 -1.390838e+01 8.734331e-02 + 1.008000e+01 -3.557318e+00 -1.392219e+01 8.722578e-02 + 1.009000e+01 -3.489873e+00 -1.393600e+01 8.698092e-02 + 1.010000e+01 -3.382189e+00 -1.394981e+01 8.669241e-02 + 1.011000e+01 -3.228289e+00 -1.396363e+01 8.645935e-02 + 1.012000e+01 -3.023408e+00 -1.397744e+01 8.636177e-02 + 1.013000e+01 -2.764303e+00 -1.399125e+01 8.643218e-02 + 1.014000e+01 -2.449523e+00 -1.400506e+01 8.664393e-02 + 1.015000e+01 -2.079619e+00 -1.401887e+01 8.692128e-02 + 1.016000e+01 -1.657294e+00 -1.403268e+01 8.716681e-02 + 1.017000e+01 -1.187470e+00 -1.404650e+01 8.729563e-02 + 1.018000e+01 -6.772696e-01 -1.406031e+01 8.726425e-02 + 1.019000e+01 -1.358937e-01 -1.407412e+01 8.708504e-02 + 1.020000e+01 4.255869e-01 -1.408793e+01 8.682200e-02 + 1.021000e+01 9.945439e-01 -1.410174e+01 8.656929e-02 + 1.022000e+01 1.557189e+00 -1.411555e+01 8.641868e-02 + 1.023000e+01 2.099047e+00 -1.412937e+01 8.642691e-02 + 1.024000e+01 2.605490e+00 -1.414318e+01 8.659488e-02 + 1.025000e+01 3.062306e+00 -1.415699e+01 8.686709e-02 + 1.026000e+01 3.456283e+00 -1.417080e+01 8.715138e-02 + 1.027000e+01 3.775775e+00 -1.418461e+01 8.735130e-02 + 1.028000e+01 4.011229e+00 -1.419842e+01 8.739897e-02 + 1.029000e+01 4.155640e+00 -1.421224e+01 8.727770e-02 + 1.030000e+01 4.204914e+00 -1.422605e+01 8.702751e-02 + 1.031000e+01 4.158113e+00 -1.423986e+01 8.673214e-02 + 1.032000e+01 4.017568e+00 -1.425367e+01 8.649118e-02 + 1.033000e+01 3.788855e+00 -1.426748e+01 8.638585e-02 + 1.034000e+01 3.480622e+00 -1.428129e+01 8.645047e-02 + 1.035000e+01 3.104278e+00 -1.429511e+01 8.666030e-02 + 1.036000e+01 2.673553e+00 -1.430892e+01 8.694084e-02 + 1.037000e+01 2.203951e+00 -1.432273e+01 8.719458e-02 + 1.038000e+01 1.712118e+00 -1.433654e+01 8.733498e-02 + 1.039000e+01 1.215153e+00 -1.435035e+01 8.731546e-02 + 1.040000e+01 7.298949e-01 -1.436417e+01 8.714454e-02 + 1.041000e+01 2.722260e-01 -1.437798e+01 8.688261e-02 + 1.042000e+01 -1.435834e-01 -1.439179e+01 8.662157e-02 + 1.043000e+01 -5.054535e-01 -1.440560e+01 8.645317e-02 + 1.044000e+01 -8.039674e-01 -1.441941e+01 8.643676e-02 + 1.045000e+01 -1.032717e+00 -1.443322e+01 8.657798e-02 + 1.046000e+01 -1.188507e+00 -1.444704e+01 8.682686e-02 + 1.047000e+01 -1.271401e+00 -1.446085e+01 8.709613e-02 + 1.048000e+01 -1.284622e+00 -1.447466e+01 8.729218e-02 + 1.049000e+01 -1.234299e+00 -1.448847e+01 8.734732e-02 + 1.050000e+01 -1.129080e+00 -1.450228e+01 8.724243e-02 + 1.051000e+01 -9.796357e-01 -1.451609e+01 8.701305e-02 + 1.052000e+01 -7.980667e-01 -1.452991e+01 8.673757e-02 + 1.053000e+01 -5.972583e-01 -1.454372e+01 8.651054e-02 + 1.054000e+01 -3.902032e-01 -1.455753e+01 8.640985e-02 + 1.055000e+01 -1.893300e-01 -1.457134e+01 8.646890e-02 + 1.056000e+01 -5.868969e-03 -1.458515e+01 8.666457e-02 + 1.057000e+01 1.507162e-01 -1.459896e+01 8.692576e-02 + 1.058000e+01 2.732033e-01 -1.461278e+01 8.715906e-02 + 1.059000e+01 3.569721e-01 -1.462659e+01 8.728155e-02 + 1.060000e+01 4.002350e-01 -1.464040e+01 8.724917e-02 + 1.061000e+01 4.041267e-01 -1.465421e+01 8.707157e-02 + 1.062000e+01 3.726514e-01 -1.466802e+01 8.680913e-02 + 1.063000e+01 3.124882e-01 -1.468183e+01 8.655297e-02 + 1.064000e+01 2.326669e-01 -1.469565e+01 8.639387e-02 + 1.065000e+01 1.441274e-01 -1.470946e+01 8.639026e-02 + 1.066000e+01 5.918253e-02 -1.472327e+01 8.654709e-02 + 1.067000e+01 -9.089408e-03 -1.473708e+01 8.681372e-02 + 1.068000e+01 -4.749838e-02 -1.475089e+01 8.710195e-02 + 1.069000e+01 -4.341128e-02 -1.476470e+01 8.731675e-02 + 1.070000e+01 1.459279e-02 -1.477852e+01 8.738842e-02 + 1.071000e+01 1.361100e-01 -1.479233e+01 8.729542e-02 + 1.072000e+01 3.283693e-01 -1.480614e+01 8.707112e-02 + 1.073000e+01 5.957845e-01 -1.481995e+01 8.679261e-02 + 1.074000e+01 9.396214e-01 -1.483376e+01 8.655478e-02 + 1.075000e+01 1.357797e+00 -1.484757e+01 8.643778e-02 + 1.076000e+01 1.844820e+00 -1.486139e+01 8.647898e-02 + 1.077000e+01 2.391879e+00 -1.487520e+01 8.665995e-02 + 1.078000e+01 2.987079e+00 -1.488901e+01 8.691370e-02 + 1.079000e+01 3.615810e+00 -1.490282e+01 8.714917e-02 + 1.080000e+01 4.261249e+00 -1.491663e+01 8.728329e-02 + 1.081000e+01 4.904966e+00 -1.493044e+01 8.726934e-02 + 1.082000e+01 5.527609e+00 -1.494426e+01 8.711234e-02 + 1.083000e+01 6.109646e+00 -1.495807e+01 8.686715e-02 + 1.084000e+01 6.632134e+00 -1.497188e+01 8.661987e-02 + 1.085000e+01 7.077476e+00 -1.498569e+01 8.645806e-02 + 1.086000e+01 7.430133e+00 -1.499950e+01 8.643983e-02 + 1.087000e+01 7.677269e+00 -1.501331e+01 8.657274e-02 + 1.088000e+01 7.809287e+00 -1.502713e+01 8.681111e-02 + 1.089000e+01 7.820243e+00 -1.504094e+01 8.707253e-02 + 1.090000e+01 7.708102e+00 -1.505475e+01 8.726713e-02 + 1.091000e+01 7.474844e+00 -1.506856e+01 8.732861e-02 + 1.092000e+01 7.126393e+00 -1.508237e+01 8.723654e-02 + 1.093000e+01 6.672383e+00 -1.509619e+01 8.702312e-02 + 1.094000e+01 6.125769e+00 -1.511000e+01 8.676251e-02 + 1.095000e+01 5.502291e+00 -1.512381e+01 8.654572e-02 + 1.096000e+01 4.819826e+00 -1.513762e+01 8.644903e-02 + 1.097000e+01 4.097651e+00 -1.515143e+01 8.650673e-02 + 1.098000e+01 3.355657e+00 -1.516524e+01 8.669867e-02 + 1.099000e+01 2.613538e+00 -1.517906e+01 8.695747e-02 + 1.100000e+01 1.890007e+00 -1.519287e+01 8.719265e-02 + 1.101000e+01 1.202072e+00 -1.520668e+01 8.732212e-02 + 1.102000e+01 5.644048e-01 -1.522049e+01 8.730016e-02 + 1.103000e+01 -1.117578e-02 -1.523430e+01 8.713260e-02 + 1.104000e+01 -5.160635e-01 -1.524811e+01 8.687511e-02 + 1.105000e+01 -9.450700e-01 -1.526193e+01 8.661474e-02 + 1.106000e+01 -1.296459e+00 -1.527574e+01 8.644044e-02 + 1.107000e+01 -1.571811e+00 -1.528955e+01 8.641206e-02 + 1.108000e+01 -1.775734e+00 -1.530336e+01 8.653895e-02 + 1.109000e+01 -1.915430e+00 -1.531717e+01 8.677666e-02 + 1.110000e+01 -2.000150e+00 -1.533098e+01 8.704302e-02 + 1.111000e+01 -2.040561e+00 -1.534480e+01 8.724705e-02 + 1.112000e+01 -2.048072e+00 -1.535861e+01 8.732011e-02 + 1.113000e+01 -2.034146e+00 -1.537242e+01 8.723861e-02 + 1.114000e+01 -2.009629e+00 -1.538623e+01 8.703151e-02 + 1.115000e+01 -1.984157e+00 -1.540004e+01 8.677052e-02 + 1.116000e+01 -1.965642e+00 -1.541385e+01 8.654577e-02 + 1.117000e+01 -1.959882e+00 -1.542767e+01 8.643477e-02 + 1.118000e+01 -1.970309e+00 -1.544148e+01 8.647500e-02 + 1.119000e+01 -1.997881e+00 -1.545529e+01 8.665064e-02 + 1.120000e+01 -2.041129e+00 -1.546910e+01 8.689860e-02 + 1.121000e+01 -2.096343e+00 -1.548291e+01 8.713137e-02 + 1.122000e+01 -2.157899e+00 -1.549672e+01 8.726780e-02 + 1.123000e+01 -2.218678e+00 -1.551054e+01 8.726082e-02 + 1.124000e+01 -2.270590e+00 -1.552435e+01 8.711302e-02 + 1.125000e+01 -2.305135e+00 -1.553816e+01 8.687573e-02 + 1.126000e+01 -2.313987e+00 -1.555197e+01 8.663170e-02 + 1.127000e+01 -2.289573e+00 -1.556578e+01 8.646671e-02 + 1.128000e+01 -2.225594e+00 -1.557959e+01 8.643942e-02 + 1.129000e+01 -2.117479e+00 -1.559341e+01 8.656027e-02 + 1.130000e+01 -1.962742e+00 -1.560722e+01 8.678773e-02 + 1.131000e+01 -1.761217e+00 -1.562103e+01 8.704332e-02 + 1.132000e+01 -1.515167e+00 -1.563484e+01 8.723945e-02 + 1.133000e+01 -1.229262e+00 -1.564865e+01 8.730965e-02 + 1.134000e+01 -9.104208e-01 -1.566246e+01 8.723088e-02 + 1.135000e+01 -5.675403e-01 -1.567628e+01 8.703110e-02 + 1.136000e+01 -2.111127e-01 -1.569009e+01 8.677987e-02 + 1.137000e+01 1.472366e-01 -1.570390e+01 8.656488e-02 + 1.138000e+01 4.952728e-01 -1.571771e+01 8.646148e-02 + 1.139000e+01 8.207056e-01 -1.573152e+01 8.650596e-02 + 1.140000e+01 1.111748e+00 -1.574533e+01 8.668240e-02 + 1.141000e+01 1.357647e+00 -1.575915e+01 8.692850e-02 + 1.142000e+01 1.549171e+00 -1.577296e+01 8.715797e-02 + 1.143000e+01 1.679013e+00 -1.578677e+01 8.729070e-02 + 1.144000e+01 1.742111e+00 -1.580058e+01 8.728018e-02 + 1.145000e+01 1.735857e+00 -1.581439e+01 8.712905e-02 + 1.146000e+01 1.660190e+00 -1.582820e+01 8.688833e-02 + 1.147000e+01 1.517580e+00 -1.584202e+01 8.664048e-02 + 1.148000e+01 1.312886e+00 -1.585583e+01 8.647135e-02 + 1.149000e+01 1.053117e+00 -1.586964e+01 8.644017e-02 + 1.150000e+01 7.471025e-01 -1.588345e+01 8.655827e-02 + 1.151000e+01 4.050765e-01 -1.589726e+01 8.678499e-02 + 1.152000e+01 3.822206e-02 -1.591108e+01 8.704223e-02 + 1.153000e+01 -3.418258e-01 -1.592489e+01 8.724198e-02 + 1.154000e+01 -7.234805e-01 -1.593870e+01 8.731646e-02 + 1.155000e+01 -1.095689e+00 -1.595251e+01 8.724078e-02 + 1.156000e+01 -1.448379e+00 -1.596632e+01 8.704099e-02 + 1.157000e+01 -1.772845e+00 -1.598013e+01 8.678539e-02 + 1.158000e+01 -2.062066e+00 -1.599395e+01 8.656163e-02 + 1.159000e+01 -2.310919e+00 -1.600776e+01 8.644656e-02 + 1.160000e+01 -2.516314e+00 -1.602157e+01 8.647927e-02 + 1.161000e+01 -2.677205e+00 -1.603538e+01 8.664723e-02 + 1.162000e+01 -2.794523e+00 -1.604919e+01 8.689108e-02 + 1.163000e+01 -2.870991e+00 -1.606300e+01 8.712607e-02 + 1.164000e+01 -2.910869e+00 -1.607682e+01 8.727177e-02 + 1.165000e+01 -2.919626e+00 -1.609063e+01 8.727937e-02 + 1.166000e+01 -2.903548e+00 -1.610444e+01 8.714783e-02 + 1.167000e+01 -2.869334e+00 -1.611825e+01 8.692387e-02 + 1.168000e+01 -2.823663e+00 -1.613206e+01 8.668616e-02 + 1.169000e+01 -2.772784e+00 -1.614587e+01 8.651824e-02 + 1.170000e+01 -2.722144e+00 -1.615969e+01 8.647921e-02 + 1.171000e+01 -2.676059e+00 -1.617350e+01 8.658254e-02 + 1.172000e+01 -2.637473e+00 -1.618731e+01 8.679125e-02 + 1.173000e+01 -2.607795e+00 -1.620112e+01 8.703142e-02 + 1.174000e+01 -2.586832e+00 -1.621493e+01 8.721852e-02 + 1.175000e+01 -2.572831e+00 -1.622874e+01 8.728674e-02 + 1.176000e+01 -2.562607e+00 -1.624256e+01 8.721136e-02 + 1.177000e+01 -2.551775e+00 -1.625637e+01 8.701698e-02 + 1.178000e+01 -2.535058e+00 -1.627018e+01 8.676945e-02 + 1.179000e+01 -2.506656e+00 -1.628399e+01 8.655367e-02 + 1.180000e+01 -2.460660e+00 -1.629780e+01 8.644429e-02 + 1.181000e+01 -2.391487e+00 -1.631161e+01 8.647926e-02 + 1.182000e+01 -2.294308e+00 -1.632543e+01 8.664617e-02 + 1.183000e+01 -2.165445e+00 -1.633924e+01 8.688672e-02 + 1.184000e+01 -2.002710e+00 -1.635305e+01 8.711760e-02 + 1.185000e+01 -1.805678e+00 -1.636686e+01 8.725964e-02 + 1.186000e+01 -1.575853e+00 -1.638067e+01 8.726476e-02 + 1.187000e+01 -1.316743e+00 -1.639448e+01 8.713197e-02 + 1.188000e+01 -1.033807e+00 -1.640830e+01 8.690762e-02 + 1.189000e+01 -7.343041e-01 -1.642211e+01 8.666991e-02 + 1.190000e+01 -4.270274e-01 -1.643592e+01 8.650215e-02 + 1.191000e+01 -1.219464e-01 -1.644973e+01 8.646365e-02 + 1.192000e+01 1.702256e-01 -1.646354e+01 8.656845e-02 + 1.193000e+01 4.385179e-01 -1.647735e+01 8.678025e-02 + 1.194000e+01 6.722155e-01 -1.649117e+01 8.702549e-02 + 1.195000e+01 8.613718e-01 -1.650498e+01 8.721939e-02 + 1.196000e+01 9.972917e-01 -1.651879e+01 8.729525e-02 + 1.197000e+01 1.072960e+00 -1.653260e+01 8.722691e-02 + 1.198000e+01 1.083388e+00 -1.654641e+01 8.703750e-02 + 1.199000e+01 1.025863e+00 -1.656022e+01 8.679182e-02 + 1.200000e+01 9.000883e-01 -1.657404e+01 8.657464e-02 + 1.201000e+01 7.081926e-01 -1.658785e+01 8.646157e-02 + 1.202000e+01 4.546330e-01 -1.660166e+01 8.649249e-02 + 1.203000e+01 1.459752e-01 -1.661547e+01 8.665720e-02 + 1.204000e+01 -2.094234e-01 -1.662928e+01 8.689918e-02 + 1.205000e+01 -6.018116e-01 -1.664310e+01 8.713577e-02 + 1.206000e+01 -1.020500e+00 -1.665691e+01 8.728698e-02 + 1.207000e+01 -1.454349e+00 -1.667072e+01 8.730257e-02 + 1.208000e+01 -1.892254e+00 -1.668453e+01 8.717861e-02 + 1.209000e+01 -2.323611e+00 -1.669834e+01 8.695856e-02 + 1.210000e+01 -2.738726e+00 -1.671215e+01 8.671861e-02 + 1.211000e+01 -3.129152e+00 -1.672597e+01 8.654174e-02 + 1.212000e+01 -3.487930e+00 -1.673978e+01 8.648877e-02 + 1.213000e+01 -3.809734e+00 -1.675359e+01 8.657682e-02 + 1.214000e+01 -4.090900e+00 -1.676740e+01 8.677324e-02 + 1.215000e+01 -4.329355e+00 -1.678121e+01 8.700753e-02 + 1.216000e+01 -4.524443e+00 -1.679502e+01 8.719647e-02 + 1.217000e+01 -4.676680e+00 -1.680884e+01 8.727295e-02 + 1.218000e+01 -4.787434e+00 -1.682265e+01 8.720863e-02 + 1.219000e+01 -4.858581e+00 -1.683646e+01 8.702334e-02 + 1.220000e+01 -4.892147e+00 -1.685027e+01 8.677848e-02 + 1.221000e+01 -4.889964e+00 -1.686408e+01 8.655639e-02 + 1.222000e+01 -4.853374e+00 -1.687789e+01 8.643217e-02 + 1.223000e+01 -4.782995e+00 -1.689171e+01 8.644725e-02 + 1.224000e+01 -4.678572e+00 -1.690552e+01 8.659482e-02 + 1.225000e+01 -4.538928e+00 -1.691933e+01 8.682247e-02 + 1.226000e+01 -4.362009e+00 -1.693314e+01 8.705119e-02 + 1.227000e+01 -4.145042e+00 -1.694695e+01 8.720315e-02 + 1.228000e+01 -3.884773e+00 -1.696076e+01 8.722833e-02 + 1.229000e+01 -3.577793e+00 -1.697458e+01 8.712105e-02 + 1.230000e+01 -3.220920e+00 -1.698839e+01 8.692162e-02 + 1.231000e+01 -2.811608e+00 -1.700220e+01 8.670249e-02 + 1.232000e+01 -2.348369e+00 -1.701601e+01 8.654327e-02 + 1.233000e+01 -1.831168e+00 -1.702982e+01 8.650268e-02 + 1.234000e+01 -1.261761e+00 -1.704363e+01 8.659741e-02 + 1.235000e+01 -6.439623e-01 -1.705745e+01 8.679596e-02 + 1.236000e+01 1.619533e-02 -1.707126e+01 8.702998e-02 + 1.237000e+01 7.104125e-01 -1.708507e+01 8.721853e-02 + 1.238000e+01 1.428205e+00 -1.709888e+01 8.729621e-02 + 1.239000e+01 2.157113e+00 -1.711269e+01 8.723538e-02 + 1.240000e+01 2.883035e+00 -1.712650e+01 8.705554e-02 + 1.241000e+01 3.590672e+00 -1.714032e+01 8.681702e-02 + 1.242000e+01 4.264062e+00 -1.715413e+01 8.660088e-02 + 1.243000e+01 4.887185e+00 -1.716794e+01 8.648117e-02 + 1.244000e+01 5.444599e+00 -1.718175e+01 8.649889e-02 + 1.245000e+01 5.922081e+00 -1.719556e+01 8.664741e-02 + 1.246000e+01 6.307240e+00 -1.720937e+01 8.687486e-02 + 1.247000e+01 6.590063e+00 -1.722319e+01 8.710268e-02 + 1.248000e+01 6.763375e+00 -1.723700e+01 8.725305e-02 + 1.249000e+01 6.823174e+00 -1.725081e+01 8.727533e-02 + 1.250000e+01 6.768833e+00 -1.726462e+01 8.716280e-02 + 1.251000e+01 6.603155e+00 -1.727843e+01 8.695464e-02 + 1.252000e+01 6.332272e+00 -1.729224e+01 8.672268e-02 + 1.253000e+01 5.965397e+00 -1.730606e+01 8.654691e-02 + 1.254000e+01 5.514443e+00 -1.731987e+01 8.648757e-02 + 1.255000e+01 4.993524e+00 -1.733368e+01 8.656378e-02 + 1.256000e+01 4.418364e+00 -1.734749e+01 8.674682e-02 + 1.257000e+01 3.805654e+00 -1.736130e+01 8.697064e-02 + 1.258000e+01 3.172377e+00 -1.737512e+01 8.715550e-02 + 1.259000e+01 2.535149e+00 -1.738893e+01 8.723579e-02 + 1.260000e+01 1.909600e+00 -1.740274e+01 8.718240e-02 + 1.261000e+01 1.309839e+00 -1.741655e+01 8.701253e-02 + 1.262000e+01 7.480110e-01 -1.743036e+01 8.678406e-02 + 1.263000e+01 2.339870e-01 -1.744417e+01 8.657617e-02 + 1.264000e+01 -2.248141e-01 -1.745799e+01 8.646206e-02 + 1.265000e+01 -6.234624e-01 -1.747180e+01 8.648318e-02 + 1.266000e+01 -9.594159e-01 -1.748561e+01 8.663426e-02 + 1.267000e+01 -1.232294e+00 -1.749942e+01 8.686518e-02 + 1.268000e+01 -1.443546e+00 -1.751323e+01 8.709868e-02 + 1.269000e+01 -1.596039e+00 -1.752704e+01 8.725726e-02 + 1.270000e+01 -1.693595e+00 -1.754086e+01 8.728943e-02 + 1.271000e+01 -1.740512e+00 -1.755467e+01 8.718665e-02 + 1.272000e+01 -1.741106e+00 -1.756848e+01 8.698587e-02 + 1.273000e+01 -1.699295e+00 -1.758229e+01 8.675708e-02 + 1.274000e+01 -1.618267e+00 -1.759610e+01 8.657944e-02 + 1.275000e+01 -1.500248e+00 -1.760991e+01 8.651388e-02 + 1.276000e+01 -1.346380e+00 -1.762373e+01 8.658162e-02 + 1.277000e+01 -1.156738e+00 -1.763754e+01 8.675681e-02 + 1.278000e+01 -9.304549e-01 -1.765135e+01 8.697617e-02 + 1.279000e+01 -6.659689e-01 -1.766516e+01 8.716167e-02 + 1.280000e+01 -3.613674e-01 -1.767897e+01 8.724787e-02 + 1.281000e+01 -1.479615e-02 -1.769278e+01 8.720413e-02 + 1.282000e+01 3.750883e-01 -1.770660e+01 8.704486e-02 + 1.283000e+01 8.086627e-01 -1.772041e+01 8.682463e-02 + 1.284000e+01 1.284911e+00 -1.773422e+01 8.661965e-02 + 1.285000e+01 1.801066e+00 -1.774803e+01 8.650142e-02 + 1.286000e+01 2.352344e+00 -1.776184e+01 8.651145e-02 + 1.287000e+01 2.931804e+00 -1.777565e+01 8.664630e-02 + 1.288000e+01 3.530348e+00 -1.778947e+01 8.685881e-02 + 1.289000e+01 4.136866e+00 -1.780328e+01 8.707494e-02 + 1.290000e+01 4.738538e+00 -1.781709e+01 8.721979e-02 + 1.291000e+01 5.321262e+00 -1.783090e+01 8.724332e-02 + 1.292000e+01 5.870205e+00 -1.784471e+01 8.713713e-02 + 1.293000e+01 6.370443e+00 -1.785852e+01 8.693730e-02 + 1.294000e+01 6.807651e+00 -1.787234e+01 8.671240e-02 + 1.295000e+01 7.168799e+00 -1.788615e+01 8.654021e-02 + 1.296000e+01 7.442828e+00 -1.789996e+01 8.648076e-02 + 1.297000e+01 7.621238e+00 -1.791377e+01 8.655504e-02 + 1.298000e+01 7.698580e+00 -1.792758e+01 8.673754e-02 + 1.299000e+01 7.672791e+00 -1.794139e+01 8.696542e-02 + 1.300000e+01 7.545364e+00 -1.795521e+01 8.716080e-02 + 1.301000e+01 7.321336e+00 -1.796902e+01 8.725769e-02 + 1.302000e+01 7.009091e+00 -1.798283e+01 8.722421e-02 + 1.303000e+01 6.619978e+00 -1.799664e+01 8.707300e-02 + 1.304000e+01 6.167776e+00 -1.801045e+01 8.685689e-02 + 1.305000e+01 5.668028e+00 -1.802426e+01 8.665092e-02 + 1.306000e+01 5.137281e+00 -1.803808e+01 8.652655e-02 + 1.307000e+01 4.592276e+00 -1.805189e+01 8.652657e-02 + 1.308000e+01 4.049143e+00 -1.806570e+01 8.664985e-02 + 1.309000e+01 3.522635e+00 -1.807951e+01 8.685195e-02 + 1.310000e+01 3.025452e+00 -1.809332e+01 8.706123e-02 + 1.311000e+01 2.567700e+00 -1.810714e+01 8.720411e-02 + 1.312000e+01 2.156499e+00 -1.812095e+01 8.723055e-02 + 1.313000e+01 1.795783e+00 -1.813476e+01 8.713085e-02 + 1.314000e+01 1.486275e+00 -1.814857e+01 8.693898e-02 + 1.315000e+01 1.225663e+00 -1.816238e+01 8.672112e-02 + 1.316000e+01 1.008933e+00 -1.817619e+01 8.655317e-02 + 1.317000e+01 8.288618e-01 -1.819001e+01 8.649430e-02 + 1.318000e+01 6.766120e-01 -1.820382e+01 8.656584e-02 + 1.319000e+01 5.424062e-01 -1.821763e+01 8.674359e-02 + 1.320000e+01 4.162247e-01 -1.823144e+01 8.696646e-02 + 1.321000e+01 2.884859e-01 -1.824525e+01 8.715806e-02 + 1.322000e+01 1.506670e-01 -1.825906e+01 8.725317e-02 + 1.323000e+01 -4.176142e-03 -1.827288e+01 8.721970e-02 + 1.324000e+01 -1.810185e-01 -1.828669e+01 8.706934e-02 + 1.325000e+01 -3.826260e-01 -1.830050e+01 8.685354e-02 + 1.326000e+01 -6.094786e-01 -1.831431e+01 8.664622e-02 + 1.327000e+01 -8.598531e-01 -1.832812e+01 8.651835e-02 + 1.328000e+01 -1.130056e+00 -1.834193e+01 8.651319e-02 + 1.329000e+01 -1.414786e+00 -1.835575e+01 8.663091e-02 + 1.330000e+01 -1.707590e+00 -1.836956e+01 8.682878e-02 + 1.331000e+01 -2.001388e+00 -1.838337e+01 8.703661e-02 + 1.332000e+01 -2.289020e+00 -1.839718e+01 8.718159e-02 + 1.333000e+01 -2.563773e+00 -1.841099e+01 8.721341e-02 + 1.334000e+01 -2.819863e+00 -1.842480e+01 8.712116e-02 + 1.335000e+01 -3.052826e+00 -1.843862e+01 8.693697e-02 + 1.336000e+01 -3.259805e+00 -1.845243e+01 8.672516e-02 + 1.337000e+01 -3.439707e+00 -1.846624e+01 8.656022e-02 + 1.338000e+01 -3.593226e+00 -1.848005e+01 8.650086e-02 + 1.339000e+01 -3.722743e+00 -1.849386e+01 8.656903e-02 + 1.340000e+01 -3.832096e+00 -1.850767e+01 8.674195e-02 + 1.341000e+01 -3.926265e+00 -1.852149e+01 8.696027e-02 + 1.342000e+01 -4.010981e+00 -1.853530e+01 8.714905e-02 + 1.343000e+01 -4.092286e+00 -1.854911e+01 8.724376e-02 + 1.344000e+01 -4.176105e+00 -1.856292e+01 8.721219e-02 + 1.345000e+01 -4.267821e+00 -1.857673e+01 8.706518e-02 + 1.346000e+01 -4.371916e+00 -1.859054e+01 8.685304e-02 + 1.347000e+01 -4.491687e+00 -1.860436e+01 8.664868e-02 + 1.348000e+01 -4.629050e+00 -1.861817e+01 8.652270e-02 + 1.349000e+01 -4.784448e+00 -1.863198e+01 8.651870e-02 + 1.350000e+01 -4.956864e+00 -1.864579e+01 8.663784e-02 + 1.351000e+01 -5.143928e+00 -1.865960e+01 8.683855e-02 + 1.352000e+01 -5.342101e+00 -1.867341e+01 8.705148e-02 + 1.353000e+01 -5.546924e+00 -1.868723e+01 8.720391e-02 + 1.354000e+01 -5.753306e+00 -1.870104e+01 8.724463e-02 + 1.355000e+01 -5.955817e+00 -1.871485e+01 8.716110e-02 + 1.356000e+01 -6.148971e+00 -1.872866e+01 8.698342e-02 + 1.357000e+01 -6.327478e+00 -1.874247e+01 8.677405e-02 + 1.358000e+01 -6.486436e+00 -1.875628e+01 8.660648e-02 + 1.359000e+01 -6.621461e+00 -1.877010e+01 8.653958e-02 + 1.360000e+01 -6.728749e+00 -1.878391e+01 8.659674e-02 + 1.361000e+01 -6.805065e+00 -1.879772e+01 8.675746e-02 + 1.362000e+01 -6.847679e+00 -1.881153e+01 8.696484e-02 + 1.363000e+01 -6.854252e+00 -1.882534e+01 8.714585e-02 + 1.364000e+01 -6.822699e+00 -1.883915e+01 8.723680e-02 + 1.365000e+01 -6.751047e+00 -1.885297e+01 8.720513e-02 + 1.366000e+01 -6.637312e+00 -1.886678e+01 8.706033e-02 + 1.367000e+01 -6.479411e+00 -1.888059e+01 8.685082e-02 + 1.368000e+01 -6.275138e+00 -1.889440e+01 8.664769e-02 + 1.369000e+01 -6.022197e+00 -1.890821e+01 8.652037e-02 + 1.370000e+01 -5.718318e+00 -1.892203e+01 8.651225e-02 + 1.371000e+01 -5.361436e+00 -1.893584e+01 8.662527e-02 + 1.372000e+01 -4.949941e+00 -1.894965e+01 8.681930e-02 + 1.373000e+01 -4.482964e+00 -1.896346e+01 8.702647e-02 + 1.374000e+01 -3.960701e+00 -1.897727e+01 8.717513e-02 + 1.375000e+01 -3.384724e+00 -1.899108e+01 8.721440e-02 + 1.376000e+01 -2.758268e+00 -1.900490e+01 8.713130e-02 + 1.377000e+01 -2.086466e+00 -1.901871e+01 8.695496e-02 + 1.378000e+01 -1.376492e+00 -1.903252e+01 8.674677e-02 + 1.379000e+01 -6.376060e-01 -1.904633e+01 8.657948e-02 + 1.380000e+01 1.189154e-01 -1.906014e+01 8.651187e-02 + 1.381000e+01 8.799825e-01 -1.907395e+01 8.656795e-02 + 1.382000e+01 1.631013e+00 -1.908777e+01 8.672833e-02 + 1.383000e+01 2.356368e+00 -1.910158e+01 8.693729e-02 + 1.384000e+01 3.039881e+00 -1.911539e+01 8.712256e-02 + 1.385000e+01 3.665462e+00 -1.912920e+01 8.722057e-02 + 1.386000e+01 4.217727e+00 -1.914301e+01 8.719805e-02 + 1.387000e+01 4.682640e+00 -1.915682e+01 8.706323e-02 + 1.388000e+01 5.048115e+00 -1.917064e+01 8.686301e-02 + 1.389000e+01 5.304554e+00 -1.918445e+01 8.666718e-02 + 1.390000e+01 5.445279e+00 -1.919826e+01 8.654443e-02 + 1.391000e+01 5.466843e+00 -1.921207e+01 8.653820e-02 + 1.392000e+01 5.369194e+00 -1.922588e+01 8.665117e-02 + 1.393000e+01 5.155694e+00 -1.923969e+01 8.684424e-02 + 1.394000e+01 4.832977e+00 -1.925351e+01 8.705052e-02 + 1.395000e+01 4.410678e+00 -1.926732e+01 8.719880e-02 + 1.396000e+01 3.901022e+00 -1.928113e+01 8.723803e-02 + 1.397000e+01 3.318331e+00 -1.929494e+01 8.715449e-02 + 1.398000e+01 2.678455e+00 -1.930875e+01 8.697640e-02 + 1.399000e+01 1.998167e+00 -1.932256e+01 8.676445e-02 + 1.400000e+01 1.294562e+00 -1.933638e+01 8.659131e-02 + 1.401000e+01 5.844846e-01 -1.935019e+01 8.651647e-02 + 1.402000e+01 -1.159802e-01 -1.936400e+01 8.656534e-02 + 1.403000e+01 -7.919358e-01 -1.937781e+01 8.672021e-02 + 1.404000e+01 -1.430003e+00 -1.939162e+01 8.692668e-02 + 1.405000e+01 -2.018545e+00 -1.940543e+01 8.711310e-02 + 1.406000e+01 -2.547779e+00 -1.941925e+01 8.721543e-02 + 1.407000e+01 -3.009802e+00 -1.943306e+01 8.719908e-02 + 1.408000e+01 -3.398520e+00 -1.944687e+01 8.707031e-02 + 1.409000e+01 -3.709518e+00 -1.946068e+01 8.687410e-02 + 1.410000e+01 -3.939893e+00 -1.947449e+01 8.667883e-02 + 1.411000e+01 -4.088053e+00 -1.948830e+01 8.655280e-02 + 1.412000e+01 -4.153539e+00 -1.950212e+01 8.654022e-02 + 1.413000e+01 -4.136856e+00 -1.951593e+01 8.664544e-02 + 1.414000e+01 -4.039348e+00 -1.952974e+01 8.683144e-02 + 1.415000e+01 -3.863122e+00 -1.954355e+01 8.703311e-02 + 1.416000e+01 -3.611024e+00 -1.955736e+01 8.718022e-02 + 1.417000e+01 -3.286660e+00 -1.957117e+01 8.722168e-02 + 1.418000e+01 -2.894460e+00 -1.958499e+01 8.714281e-02 + 1.419000e+01 -2.439767e+00 -1.959880e+01 8.697027e-02 + 1.420000e+01 -1.928925e+00 -1.961261e+01 8.676321e-02 + 1.421000e+01 -1.369369e+00 -1.962642e+01 8.659313e-02 + 1.422000e+01 -7.696641e-01 -1.964023e+01 8.651919e-02 + 1.423000e+01 -1.395087e-01 -1.965405e+01 8.656721e-02 + 1.424000e+01 5.103362e-01 -1.966786e+01 8.672041e-02 + 1.425000e+01 1.168189e+00 -1.968167e+01 8.692539e-02 + 1.426000e+01 1.821671e+00 -1.969548e+01 8.711108e-02 + 1.427000e+01 2.457998e+00 -1.970929e+01 8.721334e-02 + 1.428000e+01 3.064343e+00 -1.972310e+01 8.719685e-02 + 1.429000e+01 3.628244e+00 -1.973692e+01 8.706682e-02 + 1.430000e+01 4.138038e+00 -1.975073e+01 8.686730e-02 + 1.431000e+01 4.583296e+00 -1.976454e+01 8.666640e-02 + 1.432000e+01 4.955240e+00 -1.977835e+01 8.653308e-02 + 1.433000e+01 5.247099e+00 -1.979216e+01 8.651313e-02 + 1.434000e+01 5.454396e+00 -1.980597e+01 8.661301e-02 + 1.435000e+01 5.575138e+00 -1.981979e+01 8.679766e-02 + 1.436000e+01 5.609900e+00 -1.983360e+01 8.700313e-02 + 1.437000e+01 5.561781e+00 -1.984741e+01 8.715912e-02 + 1.438000e+01 5.436253e+00 -1.986122e+01 8.721313e-02 + 1.439000e+01 5.240895e+00 -1.987503e+01 8.714810e-02 + 1.440000e+01 4.985026e+00 -1.988884e+01 8.698788e-02 + 1.441000e+01 4.679273e+00 -1.990266e+01 8.678910e-02 + 1.442000e+01 4.335075e+00 -1.991647e+01 8.662183e-02 + 1.443000e+01 3.964178e+00 -1.993028e+01 8.654520e-02 + 1.444000e+01 3.578123e+00 -1.994409e+01 8.658651e-02 + 1.445000e+01 3.187783e+00 -1.995790e+01 8.673150e-02 + 1.446000e+01 2.802954e+00 -1.997171e+01 8.692952e-02 + 1.447000e+01 2.432023e+00 -1.998553e+01 8.711160e-02 + 1.448000e+01 2.081747e+00 -1.999934e+01 8.721460e-02 + 1.449000e+01 1.757120e+00 -2.001315e+01 8.720277e-02 + 1.450000e+01 1.461361e+00 -2.002696e+01 8.707979e-02 + 1.451000e+01 1.195997e+00 -2.004077e+01 8.688753e-02 + 1.452000e+01 9.610290e-01 -2.005458e+01 8.669200e-02 + 1.453000e+01 7.551803e-01 -2.006840e+01 8.656071e-02 + 1.454000e+01 5.761841e-01 -2.008221e+01 8.653907e-02 + 1.455000e+01 4.211026e-01 -2.009602e+01 8.663426e-02 + 1.456000e+01 2.866464e-01 -2.010983e+01 8.681266e-02 + 1.457000e+01 1.694743e-01 -2.012364e+01 8.701187e-02 + 1.458000e+01 6.645185e-02 -2.013745e+01 8.716272e-02 + 1.459000e+01 -2.514443e-02 -2.015127e+01 8.721308e-02 + 1.460000e+01 -1.074894e-01 -2.016508e+01 8.714545e-02 + 1.461000e+01 -1.821416e-01 -2.017889e+01 8.698281e-02 + 1.462000e+01 -2.500448e-01 -2.019270e+01 8.678086e-02 + 1.463000e+01 -3.115920e-01 -2.020651e+01 8.660920e-02 + 1.464000e+01 -3.667410e-01 -2.022032e+01 8.652729e-02 + 1.465000e+01 -4.151668e-01 -2.023414e+01 8.656352e-02 + 1.466000e+01 -4.564340e-01 -2.024795e+01 8.670512e-02 + 1.467000e+01 -4.901719e-01 -2.026176e+01 8.690285e-02 + 1.468000e+01 -5.162349e-01 -2.027557e+01 8.708850e-02 + 1.469000e+01 -5.348347e-01 -2.028938e+01 8.719871e-02 + 1.470000e+01 -5.466305e-01 -2.030319e+01 8.719651e-02 + 1.471000e+01 -5.527720e-01 -2.031701e+01 8.708366e-02 + 1.472000e+01 -5.548896e-01 -2.033082e+01 8.689996e-02 + 1.473000e+01 -5.550346e-01 -2.034463e+01 8.670973e-02 + 1.474000e+01 -5.555731e-01 -2.035844e+01 8.657974e-02 + 1.475000e+01 -5.590439e-01 -2.037225e+01 8.655587e-02 + 1.476000e+01 -5.679911e-01 -2.038607e+01 8.664678e-02 + 1.477000e+01 -5.847853e-01 -2.039988e+01 8.682083e-02 + 1.478000e+01 -6.114465e-01 -2.041369e+01 8.701749e-02 + 1.479000e+01 -6.494827e-01 -2.042750e+01 8.716862e-02 + 1.480000e+01 -6.997548e-01 -2.044131e+01 8.722207e-02 + 1.481000e+01 -7.623785e-01 -2.045512e+01 8.715926e-02 + 1.482000e+01 -8.366678e-01 -2.046894e+01 8.700137e-02 + 1.483000e+01 -9.211228e-01 -2.048275e+01 8.680223e-02 + 1.484000e+01 -1.013463e+00 -2.049656e+01 8.663007e-02 + 1.485000e+01 -1.110697e+00 -2.051037e+01 8.654393e-02 + 1.486000e+01 -1.209235e+00 -2.052418e+01 8.657293e-02 + 1.487000e+01 -1.305011e+00 -2.053799e+01 8.670590e-02 + 1.488000e+01 -1.393638e+00 -2.055181e+01 8.689546e-02 + 1.489000e+01 -1.470557e+00 -2.056562e+01 8.707496e-02 + 1.490000e+01 -1.531186e+00 -2.057943e+01 8.718178e-02 + 1.491000e+01 -1.571064e+00 -2.059324e+01 8.717868e-02 + 1.492000e+01 -1.585969e+00 -2.060705e+01 8.706638e-02 + 1.493000e+01 -1.572029e+00 -2.062086e+01 8.688319e-02 + 1.494000e+01 -1.525798e+00 -2.063468e+01 8.669216e-02 + 1.495000e+01 -1.444329e+00 -2.064849e+01 8.655945e-02 + 1.496000e+01 -1.325218e+00 -2.066230e+01 8.653123e-02 + 1.497000e+01 -1.166644e+00 -2.067611e+01 8.661736e-02 + 1.498000e+01 -9.674051e-01 -2.068992e+01 8.678785e-02 + 1.499000e+01 -7.269469e-01 -2.070373e+01 8.698363e-02 + 1.500000e+01 -4.454000e-01 -2.071755e+01 8.713743e-02 + 1.501000e+01 -1.236221e-01 -2.073136e+01 8.719695e-02 + 1.502000e+01 2.367538e-01 -2.074517e+01 8.714255e-02 + 1.503000e+01 6.332650e-01 -2.075898e+01 8.699371e-02 + 1.504000e+01 1.062564e+00 -2.077279e+01 8.680245e-02 + 1.505000e+01 1.520368e+00 -2.078660e+01 8.663558e-02 + 1.506000e+01 2.001423e+00 -2.080042e+01 8.655162e-02 + 1.507000e+01 2.499483e+00 -2.081423e+01 8.658014e-02 + 1.508000e+01 3.007331e+00 -2.082804e+01 8.671129e-02 + 1.509000e+01 3.516827e+00 -2.084185e+01 8.689934e-02 + 1.510000e+01 4.019008e+00 -2.085566e+01 8.707903e-02 + 1.511000e+01 4.504236e+00 -2.086947e+01 8.718840e-02 + 1.512000e+01 4.962400e+00 -2.088329e+01 8.719001e-02 + 1.513000e+01 5.383163e+00 -2.089710e+01 8.708351e-02 + 1.514000e+01 5.756255e+00 -2.091091e+01 8.690578e-02 + 1.515000e+01 6.071799e+00 -2.092472e+01 8.671843e-02 + 1.516000e+01 6.320652e+00 -2.093853e+01 8.658676e-02 + 1.517000e+01 6.494763e+00 -2.095234e+01 8.655692e-02 + 1.518000e+01 6.587501e+00 -2.096616e+01 8.663953e-02 + 1.519000e+01 6.593970e+00 -2.097997e+01 8.680590e-02 + 1.520000e+01 6.511261e+00 -2.099378e+01 8.699829e-02 + 1.521000e+01 6.338644e+00 -2.100759e+01 8.715026e-02 + 1.522000e+01 6.077686e+00 -2.102140e+01 8.720959e-02 + 1.523000e+01 5.732276e+00 -2.103521e+01 8.715597e-02 + 1.524000e+01 5.308559e+00 -2.104903e+01 8.700773e-02 + 1.525000e+01 4.814774e+00 -2.106284e+01 8.681567e-02 + 1.526000e+01 4.261014e+00 -2.107665e+01 8.664582e-02 + 1.527000e+01 3.658895e+00 -2.109046e+01 8.655666e-02 + 1.528000e+01 3.021173e+00 -2.110427e+01 8.657858e-02 + 1.529000e+01 2.361305e+00 -2.111808e+01 8.670310e-02 + 1.530000e+01 1.692992e+00 -2.113190e+01 8.688598e-02 + 1.531000e+01 1.029719e+00 -2.114571e+01 8.706302e-02 + 1.532000e+01 3.843055e-01 -2.115952e+01 8.717253e-02 + 1.533000e+01 -2.314983e-01 -2.117333e+01 8.717646e-02 + 1.534000e+01 -8.073607e-01 -2.118714e+01 8.707316e-02 + 1.535000e+01 -1.334647e+00 -2.120096e+01 8.689792e-02 + 1.536000e+01 -1.806617e+00 -2.121477e+01 8.671103e-02 + 1.537000e+01 -2.218534e+00 -2.122858e+01 8.657716e-02 + 1.538000e+01 -2.567686e+00 -2.124239e+01 8.654282e-02 + 1.539000e+01 -2.853326e+00 -2.125620e+01 8.661987e-02 + 1.540000e+01 -3.076533e+00 -2.127001e+01 8.678136e-02 + 1.541000e+01 -3.240015e+00 -2.128383e+01 8.697121e-02 + 1.542000e+01 -3.347861e+00 -2.129764e+01 8.712405e-02 + 1.543000e+01 -3.405258e+00 -2.131145e+01 8.718786e-02 + 1.544000e+01 -3.418200e+00 -2.132526e+01 8.714159e-02 + 1.545000e+01 -3.393192e+00 -2.133907e+01 8.700214e-02 + 1.546000e+01 -3.336974e+00 -2.135288e+01 8.681863e-02 + 1.547000e+01 -3.256275e+00 -2.136670e+01 8.665566e-02 + 1.548000e+01 -3.157593e+00 -2.138051e+01 8.657086e-02 + 1.549000e+01 -3.047040e+00 -2.139432e+01 8.659456e-02 + 1.550000e+01 -2.930208e+00 -2.140813e+01 8.671892e-02 + 1.551000e+01 -2.812102e+00 -2.142194e+01 8.690064e-02 + 1.552000e+01 -2.697099e+00 -2.143575e+01 8.707639e-02 + 1.553000e+01 -2.588949e+00 -2.144957e+01 8.718490e-02 + 1.554000e+01 -2.490803e+00 -2.146338e+01 8.718799e-02 + 1.555000e+01 -2.405253e+00 -2.147719e+01 8.708347e-02 + 1.556000e+01 -2.334388e+00 -2.149100e+01 8.690596e-02 + 1.557000e+01 -2.279846e+00 -2.150481e+01 8.671539e-02 + 1.558000e+01 -2.242860e+00 -2.151862e+01 8.657662e-02 + 1.559000e+01 -2.224294e+00 -2.153244e+01 8.653701e-02 + 1.560000e+01 -2.224665e+00 -2.154625e+01 8.660975e-02 + 1.561000e+01 -2.244148e+00 -2.156006e+01 8.676924e-02 + 1.562000e+01 -2.282567e+00 -2.157387e+01 8.696030e-02 + 1.563000e+01 -2.339377e+00 -2.158768e+01 8.711762e-02 + 1.564000e+01 -2.413641e+00 -2.160149e+01 8.718828e-02 + 1.565000e+01 -2.504009e+00 -2.161531e+01 8.714959e-02 + 1.566000e+01 -2.608694e+00 -2.162912e+01 8.701652e-02 + 1.567000e+01 -2.725478e+00 -2.164293e+01 8.683646e-02 + 1.568000e+01 -2.851718e+00 -2.165674e+01 8.667307e-02 + 1.569000e+01 -2.984382e+00 -2.167055e+01 8.658420e-02 + 1.570000e+01 -3.120107e+00 -2.168436e+01 8.660152e-02 + 1.571000e+01 -3.255281e+00 -2.169818e+01 8.671925e-02 + 1.572000e+01 -3.386141e+00 -2.171199e+01 8.689629e-02 + 1.573000e+01 -3.508893e+00 -2.172580e+01 8.707088e-02 + 1.574000e+01 -3.619842e+00 -2.173961e+01 8.718225e-02 + 1.575000e+01 -3.715524e+00 -2.175342e+01 8.719152e-02 + 1.576000e+01 -3.792840e+00 -2.176723e+01 8.709476e-02 + 1.577000e+01 -3.849176e+00 -2.178105e+01 8.692438e-02 + 1.578000e+01 -3.882504e+00 -2.179486e+01 8.673815e-02 + 1.579000e+01 -3.891464e+00 -2.180867e+01 8.659954e-02 + 1.580000e+01 -3.875416e+00 -2.182248e+01 8.655563e-02 + 1.581000e+01 -3.834455e+00 -2.183629e+01 8.662049e-02 + 1.582000e+01 -3.769399e+00 -2.185010e+01 8.677023e-02 + 1.583000e+01 -3.681745e+00 -2.186392e+01 8.695160e-02 + 1.584000e+01 -3.573588e+00 -2.187773e+01 8.710090e-02 + 1.585000e+01 -3.447530e+00 -2.189154e+01 8.716604e-02 + 1.586000e+01 -3.306553e+00 -2.190535e+01 8.712429e-02 + 1.587000e+01 -3.153896e+00 -2.191916e+01 8.698994e-02 + 1.588000e+01 -2.992916e+00 -2.193298e+01 8.680943e-02 + 1.589000e+01 -2.826957e+00 -2.194679e+01 8.664565e-02 + 1.590000e+01 -2.659230e+00 -2.196060e+01 8.655622e-02 + 1.591000e+01 -2.492706e+00 -2.197441e+01 8.657323e-02 + 1.592000e+01 -2.330024e+00 -2.198822e+01 8.669178e-02 + 1.593000e+01 -2.173434e+00 -2.200203e+01 8.687175e-02 + 1.594000e+01 -2.024744e+00 -2.201585e+01 8.705200e-02 + 1.595000e+01 -1.885313e+00 -2.202966e+01 8.717166e-02 + 1.596000e+01 -1.756044e+00 -2.204347e+01 8.719096e-02 + 1.597000e+01 -1.637404e+00 -2.205728e+01 8.710449e-02 + 1.598000e+01 -1.529458e+00 -2.207109e+01 8.694291e-02 + 1.599000e+01 -1.431911e+00 -2.208490e+01 8.676253e-02 + 1.600000e+01 -1.344145e+00 -2.209872e+01 8.662605e-02 + 1.601000e+01 -1.265271e+00 -2.211253e+01 8.658077e-02 + 1.602000e+01 -1.194158e+00 -2.212634e+01 8.664190e-02 + 1.603000e+01 -1.129475e+00 -2.214015e+01 8.678723e-02 + 1.604000e+01 -1.069708e+00 -2.215396e+01 8.696517e-02 + 1.605000e+01 -1.013175e+00 -2.216777e+01 8.711310e-02 + 1.606000e+01 -9.580365e-01 -2.218159e+01 8.717913e-02 + 1.607000e+01 -9.022976e-01 -2.219540e+01 8.713980e-02 + 1.608000e+01 -8.438092e-01 -2.220921e+01 8.700803e-02 + 1.609000e+01 -7.802728e-01 -2.222302e+01 8.682870e-02 + 1.610000e+01 -7.092517e-01 -2.223683e+01 8.666351e-02 + 1.611000e+01 -6.281935e-01 -2.225064e+01 8.656967e-02 + 1.612000e+01 -5.344664e-01 -2.226446e+01 8.657978e-02 + 1.613000e+01 -4.254127e-01 -2.227827e+01 8.669028e-02 + 1.614000e+01 -2.984207e-01 -2.229208e+01 8.686268e-02 + 1.615000e+01 -1.510139e-01 -2.230589e+01 8.703726e-02 + 1.616000e+01 1.904334e-02 -2.231970e+01 8.715393e-02 + 1.617000e+01 2.136275e-01 -2.233351e+01 8.717286e-02 + 1.618000e+01 4.341297e-01 -2.234733e+01 8.708780e-02 + 1.619000e+01 6.813283e-01 -2.236114e+01 8.692818e-02 + 1.620000e+01 9.552663e-01 -2.237495e+01 8.674911e-02 + 1.621000e+01 1.255142e+00 -2.238876e+01 8.661257e-02 + 1.622000e+01 1.579220e+00 -2.240257e+01 8.656588e-02 + 1.623000e+01 1.924770e+00 -2.241638e+01 8.662499e-02 + 1.624000e+01 2.288039e+00 -2.243020e+01 8.676888e-02 + 1.625000e+01 2.664263e+00 -2.244401e+01 8.694708e-02 + 1.626000e+01 3.047722e+00 -2.245782e+01 8.709763e-02 + 1.627000e+01 3.431836e+00 -2.247163e+01 8.716854e-02 + 1.628000e+01 3.809304e+00 -2.248544e+01 8.713550e-02 + 1.629000e+01 4.172289e+00 -2.249925e+01 8.701008e-02 + 1.630000e+01 4.512626e+00 -2.251307e+01 8.683574e-02 + 1.631000e+01 4.822073e+00 -2.252688e+01 8.667314e-02 + 1.632000e+01 5.092568e+00 -2.254069e+01 8.657922e-02 + 1.633000e+01 5.316504e+00 -2.255450e+01 8.658719e-02 + 1.634000e+01 5.487003e+00 -2.256831e+01 8.669477e-02 + 1.635000e+01 5.598176e+00 -2.258212e+01 8.686500e-02 + 1.636000e+01 5.645362e+00 -2.259594e+01 8.703936e-02 + 1.637000e+01 5.625337e+00 -2.260975e+01 8.715825e-02 + 1.638000e+01 5.536483e+00 -2.262356e+01 8.718141e-02 + 1.639000e+01 5.378903e+00 -2.263737e+01 8.710144e-02 + 1.640000e+01 5.154495e+00 -2.265118e+01 8.694617e-02 + 1.641000e+01 4.866954e+00 -2.266500e+01 8.676927e-02 + 1.642000e+01 4.521731e+00 -2.267881e+01 8.663185e-02 + 1.643000e+01 4.125925e+00 -2.269262e+01 8.658129e-02 + 1.644000e+01 3.688121e+00 -2.270643e+01 8.663452e-02 + 1.645000e+01 3.218184e+00 -2.272024e+01 8.677209e-02 + 1.646000e+01 2.727006e+00 -2.273405e+01 8.694519e-02 + 1.647000e+01 2.226214e+00 -2.274787e+01 8.709303e-02 + 1.648000e+01 1.727859e+00 -2.276168e+01 8.716397e-02 + 1.649000e+01 1.244083e+00 -2.277549e+01 8.713314e-02 + 1.650000e+01 7.867764e-01 -2.278930e+01 8.701083e-02 + 1.651000e+01 3.672473e-01 -2.280311e+01 8.683899e-02 + 1.652000e+01 -4.106897e-03 -2.281692e+01 8.667696e-02 + 1.653000e+01 -3.180983e-01 -2.283074e+01 8.658105e-02 + 1.654000e+01 -5.670198e-01 -2.284455e+01 8.658475e-02 + 1.655000e+01 -7.448772e-01 -2.285836e+01 8.668684e-02 + 1.656000e+01 -8.475763e-01 -2.287217e+01 8.685183e-02 + 1.657000e+01 -8.730600e-01 -2.288598e+01 8.702265e-02 + 1.658000e+01 -8.213907e-01 -2.289979e+01 8.714060e-02 + 1.659000e+01 -6.947757e-01 -2.291361e+01 8.716553e-02 + 1.660000e+01 -4.975349e-01 -2.292742e+01 8.708940e-02 + 1.661000e+01 -2.360089e-01 -2.294123e+01 8.693890e-02 + 1.662000e+01 8.158785e-02 -2.295504e+01 8.676641e-02 + 1.663000e+01 4.453688e-01 -2.296885e+01 8.663207e-02 + 1.664000e+01 8.440257e-01 -2.298266e+01 8.658288e-02 + 1.665000e+01 1.265123e+00 -2.299648e+01 8.663604e-02 + 1.666000e+01 1.695427e+00 -2.301029e+01 8.677288e-02 + 1.667000e+01 2.121268e+00 -2.302410e+01 8.694556e-02 + 1.668000e+01 2.528916e+00 -2.303791e+01 8.709395e-02 + 1.669000e+01 2.904967e+00 -2.305172e+01 8.716660e-02 + 1.670000e+01 3.236733e+00 -2.306553e+01 8.713823e-02 + 1.671000e+01 3.512608e+00 -2.307935e+01 8.701830e-02 + 1.672000e+01 3.722423e+00 -2.309316e+01 8.684779e-02 + 1.673000e+01 3.857756e+00 -2.310697e+01 8.668536e-02 + 1.674000e+01 3.912201e+00 -2.312078e+01 8.658717e-02 + 1.675000e+01 3.881580e+00 -2.313459e+01 8.658725e-02 + 1.676000e+01 3.764095e+00 -2.314840e+01 8.668542e-02 + 1.677000e+01 3.560410e+00 -2.316222e+01 8.684746e-02 + 1.678000e+01 3.273652e+00 -2.317603e+01 8.701727e-02 + 1.679000e+01 2.909355e+00 -2.318984e+01 8.713655e-02 + 1.680000e+01 2.475305e+00 -2.320365e+01 8.716485e-02 + 1.681000e+01 1.981337e+00 -2.321746e+01 8.709319e-02 + 1.682000e+01 1.439047e+00 -2.323127e+01 8.694702e-02 + 1.683000e+01 8.614615e-01 -2.324509e+01 8.677753e-02 + 1.684000e+01 2.626474e-01 -2.325890e+01 8.664413e-02 + 1.685000e+01 -3.427034e-01 -2.327271e+01 8.659376e-02 + 1.686000e+01 -9.397152e-01 -2.328652e+01 8.664432e-02 + 1.687000e+01 -1.513775e+00 -2.330033e+01 8.677822e-02 + 1.688000e+01 -2.050971e+00 -2.331414e+01 8.694875e-02 + 1.689000e+01 -2.538503e+00 -2.332796e+01 8.709653e-02 + 1.690000e+01 -2.965063e+00 -2.334177e+01 8.717022e-02 + 1.691000e+01 -3.321160e+00 -2.335558e+01 8.714398e-02 + 1.692000e+01 -3.599382e+00 -2.336939e+01 8.702621e-02 + 1.693000e+01 -3.794593e+00 -2.338320e+01 8.685672e-02 + 1.694000e+01 -3.904057e+00 -2.339702e+01 8.669324e-02 + 1.695000e+01 -3.927475e+00 -2.341083e+01 8.659162e-02 + 1.696000e+01 -3.866950e+00 -2.342464e+01 8.658630e-02 + 1.697000e+01 -3.726880e+00 -2.343845e+01 8.667811e-02 + 1.698000e+01 -3.513775e+00 -2.345226e+01 8.683405e-02 + 1.699000e+01 -3.236015e+00 -2.346607e+01 8.699912e-02 + 1.700000e+01 -2.903556e+00 -2.347989e+01 8.711559e-02 + 1.701000e+01 -2.527597e+00 -2.349370e+01 8.714296e-02 + 1.702000e+01 -2.120218e+00 -2.350751e+01 8.707167e-02 + 1.703000e+01 -1.694000e+00 -2.352132e+01 8.692631e-02 + 1.704000e+01 -1.261644e+00 -2.353513e+01 8.675731e-02 + 1.705000e+01 -8.356002e-01 -2.354894e+01 8.662374e-02 + 1.706000e+01 -4.277182e-01 -2.356276e+01 8.657281e-02 + 1.707000e+01 -4.892143e-02 -2.357657e+01 8.662316e-02 + 1.708000e+01 2.910743e-01 -2.359038e+01 8.675822e-02 + 1.709000e+01 5.840006e-01 -2.360419e+01 8.693214e-02 + 1.710000e+01 8.232263e-01 -2.361800e+01 8.708590e-02 + 1.711000e+01 1.003896e+00 -2.363181e+01 8.716778e-02 + 1.712000e+01 1.123014e+00 -2.364563e+01 8.715096e-02 + 1.713000e+01 1.179478e+00 -2.365944e+01 8.704241e-02 + 1.714000e+01 1.174056e+00 -2.367325e+01 8.688049e-02 + 1.715000e+01 1.109323e+00 -2.368706e+01 8.672189e-02 + 1.716000e+01 9.895443e-01 -2.370087e+01 8.662208e-02 + 1.717000e+01 8.205209e-01 -2.371468e+01 8.661594e-02 + 1.718000e+01 6.094028e-01 -2.372850e+01 8.670535e-02 + 1.719000e+01 3.644659e-01 -2.374231e+01 8.685859e-02 + 1.720000e+01 9.486754e-02 -2.375612e+01 8.702171e-02 + 1.721000e+01 -1.896189e-01 -2.376993e+01 8.713742e-02 + 1.722000e+01 -4.788820e-01 -2.378374e+01 8.716496e-02 + 1.723000e+01 -7.627576e-01 -2.379755e+01 8.709387e-02 + 1.724000e+01 -1.031315e+00 -2.381137e+01 8.694759e-02 + 1.725000e+01 -1.275137e+00 -2.382518e+01 8.677555e-02 + 1.726000e+01 -1.485587e+00 -2.383899e+01 8.663639e-02 + 1.727000e+01 -1.655059e+00 -2.385280e+01 8.657763e-02 + 1.728000e+01 -1.777198e+00 -2.386661e+01 8.661901e-02 + 1.729000e+01 -1.847091e+00 -2.388042e+01 8.674544e-02 + 1.730000e+01 -1.861422e+00 -2.389424e+01 8.691249e-02 + 1.731000e+01 -1.818574e+00 -2.390805e+01 8.706206e-02 + 1.732000e+01 -1.718697e+00 -2.392186e+01 8.714263e-02 + 1.733000e+01 -1.563709e+00 -2.393567e+01 8.712675e-02 + 1.734000e+01 -1.357258e+00 -2.394948e+01 8.702031e-02 + 1.735000e+01 -1.104620e+00 -2.396329e+01 8.686045e-02 + 1.736000e+01 -8.125520e-01 -2.397711e+01 8.670292e-02 + 1.737000e+01 -4.890906e-01 -2.399092e+01 8.660293e-02 + 1.738000e+01 -1.433124e-01 -2.400473e+01 8.659576e-02 + 1.739000e+01 2.149441e-01 -2.401854e+01 8.668431e-02 + 1.740000e+01 5.753838e-01 -2.403235e+01 8.683806e-02 + 1.741000e+01 9.275768e-01 -2.404616e+01 8.700392e-02 + 1.742000e+01 1.261287e+00 -2.405998e+01 8.712489e-02 + 1.743000e+01 1.566793e+00 -2.407379e+01 8.715968e-02 + 1.744000e+01 1.835197e+00 -2.408760e+01 8.709670e-02 + 1.745000e+01 2.058695e+00 -2.410141e+01 8.695786e-02 + 1.746000e+01 2.230823e+00 -2.411522e+01 8.679122e-02 + 1.747000e+01 2.346639e+00 -2.412903e+01 8.665454e-02 + 1.748000e+01 2.402862e+00 -2.414285e+01 8.659530e-02 + 1.749000e+01 2.397953e+00 -2.415666e+01 8.663394e-02 + 1.750000e+01 2.332120e+00 -2.417047e+01 8.675670e-02 + 1.751000e+01 2.207283e+00 -2.418428e+01 8.692050e-02 + 1.752000e+01 2.026962e+00 -2.419809e+01 8.706826e-02 + 1.753000e+01 1.796122e+00 -2.421191e+01 8.714880e-02 + 1.754000e+01 1.520973e+00 -2.422572e+01 8.713429e-02 + 1.755000e+01 1.208728e+00 -2.423953e+01 8.702966e-02 + 1.756000e+01 8.673386e-01 -2.425334e+01 8.687089e-02 + 1.757000e+01 5.052165e-01 -2.426715e+01 8.671285e-02 + 1.758000e+01 1.309496e-01 -2.428096e+01 8.661037e-02 + 1.759000e+01 -2.469724e-01 -2.429478e+01 8.659908e-02 + 1.760000e+01 -6.204145e-01 -2.430859e+01 8.668283e-02 + 1.761000e+01 -9.818255e-01 -2.432240e+01 8.683227e-02 + 1.762000e+01 -1.324432e+00 -2.433621e+01 8.699534e-02 + 1.763000e+01 -1.642390e+00 -2.435002e+01 8.711552e-02 + 1.764000e+01 -1.930898e+00 -2.436383e+01 8.715136e-02 + 1.765000e+01 -2.186256e+00 -2.437765e+01 8.709049e-02 + 1.766000e+01 -2.405888e+00 -2.439146e+01 8.695380e-02 + 1.767000e+01 -2.588317e+00 -2.440527e+01 8.678836e-02 + 1.768000e+01 -2.733104e+00 -2.441908e+01 8.665140e-02 + 1.769000e+01 -2.840752e+00 -2.443289e+01 8.659050e-02 + 1.770000e+01 -2.912593e+00 -2.444670e+01 8.662688e-02 + 1.771000e+01 -2.950643e+00 -2.446052e+01 8.674783e-02 + 1.772000e+01 -2.957458e+00 -2.447433e+01 8.691132e-02 + 1.773000e+01 -2.935981e+00 -2.448814e+01 8.706087e-02 + 1.774000e+01 -2.889393e+00 -2.450195e+01 8.714520e-02 + 1.775000e+01 -2.820974e+00 -2.451576e+01 8.713574e-02 + 1.776000e+01 -2.733977e+00 -2.452957e+01 8.703622e-02 + 1.777000e+01 -2.631524e+00 -2.454339e+01 8.688139e-02 + 1.778000e+01 -2.516520e+00 -2.455720e+01 8.672516e-02 + 1.779000e+01 -2.391589e+00 -2.457101e+01 8.662212e-02 + 1.780000e+01 -2.259035e+00 -2.458482e+01 8.660840e-02 + 1.781000e+01 -2.120827e+00 -2.459863e+01 8.668891e-02 + 1.782000e+01 -1.978597e+00 -2.461244e+01 8.683560e-02 + 1.783000e+01 -1.833662e+00 -2.462626e+01 8.699740e-02 + 1.784000e+01 -1.687057e+00 -2.464007e+01 8.711823e-02 + 1.785000e+01 -1.539578e+00 -2.465388e+01 8.715627e-02 + 1.786000e+01 -1.391838e+00 -2.466769e+01 8.709820e-02 + 1.787000e+01 -1.244314e+00 -2.468150e+01 8.696366e-02 + 1.788000e+01 -1.097405e+00 -2.469531e+01 8.679860e-02 + 1.789000e+01 -9.514796e-01 -2.470913e+01 8.665973e-02 + 1.790000e+01 -8.069198e-01 -2.472294e+01 8.659487e-02 + 1.791000e+01 -6.641559e-01 -2.473675e+01 8.662618e-02 + 1.792000e+01 -5.236915e-01 -2.475056e+01 8.674239e-02 + 1.793000e+01 -3.861179e-01 -2.476437e+01 8.690283e-02 + 1.794000e+01 -2.521187e-01 -2.477818e+01 8.705183e-02 + 1.795000e+01 -1.224641e-01 -2.479200e+01 8.713817e-02 + 1.796000e+01 2.002381e-03 -2.480581e+01 8.713247e-02 + 1.797000e+01 1.203851e-01 -2.481962e+01 8.703715e-02 + 1.798000e+01 2.317610e-01 -2.483343e+01 8.688545e-02 + 1.799000e+01 3.352080e-01 -2.484724e+01 8.673017e-02 + 1.800000e+01 4.298322e-01 -2.486105e+01 8.662547e-02 + 1.801000e+01 5.147948e-01 -2.487487e+01 8.660800e-02 + 1.802000e+01 5.893341e-01 -2.488868e+01 8.668387e-02 + 1.803000e+01 6.527827e-01 -2.490249e+01 8.682659e-02 + 1.804000e+01 7.045791e-01 -2.491630e+01 8.698645e-02 + 1.805000e+01 7.442724e-01 -2.493011e+01 8.710806e-02 + 1.806000e+01 7.715211e-01 -2.494393e+01 8.714944e-02 + 1.807000e+01 7.860873e-01 -2.495774e+01 8.709627e-02 + 1.808000e+01 7.878271e-01 -2.497155e+01 8.696669e-02 + 1.809000e+01 7.766795e-01 -2.498536e+01 8.680515e-02 + 1.810000e+01 7.526563e-01 -2.499917e+01 8.666724e-02 + 1.811000e+01 7.158358e-01 -2.501298e+01 8.660047e-02 + 1.812000e+01 6.663611e-01 -2.502680e+01 8.662762e-02 + 1.813000e+01 6.044479e-01 -2.504061e+01 8.673865e-02 + 1.814000e+01 5.303998e-01 -2.505442e+01 8.689440e-02 + 1.815000e+01 4.446352e-01 -2.506823e+01 8.704050e-02 + 1.816000e+01 3.477236e-01 -2.508204e+01 8.712634e-02 + 1.817000e+01 2.404307e-01 -2.509585e+01 8.712243e-02 + 1.818000e+01 1.237700e-01 -2.510967e+01 8.703037e-02 + 1.819000e+01 -9.416308e-04 -2.512348e+01 8.688225e-02 + 1.820000e+01 -1.320299e-01 -2.513729e+01 8.672973e-02 + 1.821000e+01 -2.674146e-01 -2.515110e+01 8.662628e-02 + 1.822000e+01 -4.045726e-01 -2.516491e+01 8.660846e-02 + 1.823000e+01 -5.405171e-01 -2.517872e+01 8.668296e-02 + 1.824000e+01 -6.717992e-01 -2.519254e+01 8.682420e-02 + 1.825000e+01 -7.945361e-01 -2.520635e+01 8.698340e-02 + 1.826000e+01 -9.044691e-01 -2.522016e+01 8.710574e-02 + 1.827000e+01 -9.970535e-01 -2.523397e+01 8.714922e-02 + 1.828000e+01 -1.067581e+00 -2.524778e+01 8.709899e-02 + 1.829000e+01 -1.111334e+00 -2.526159e+01 8.697229e-02 + 1.830000e+01 -1.123760e+00 -2.527541e+01 8.681263e-02 + 1.831000e+01 -1.100680e+00 -2.528922e+01 8.667502e-02 + 1.832000e+01 -1.038493e+00 -2.530303e+01 8.660692e-02 + 1.833000e+01 -9.343971e-01 -2.531684e+01 8.663167e-02 + 1.834000e+01 -7.865948e-01 -2.533065e+01 8.674018e-02 + 1.835000e+01 -5.944846e-01 -2.534446e+01 8.689429e-02 + 1.836000e+01 -3.588183e-01 -2.535828e+01 8.704028e-02 + 1.837000e+01 -8.181862e-02 -2.537209e+01 8.712763e-02 + 1.838000e+01 2.327552e-01 -2.538590e+01 8.712632e-02 + 1.839000e+01 5.796003e-01 -2.539971e+01 8.703698e-02 + 1.840000e+01 9.519272e-01 -2.541352e+01 8.689062e-02 + 1.841000e+01 1.341585e+00 -2.542733e+01 8.673808e-02 + 1.842000e+01 1.739249e+00 -2.544115e+01 8.663261e-02 + 1.843000e+01 2.134674e+00 -2.545496e+01 8.661124e-02 + 1.844000e+01 2.517002e+00 -2.546877e+01 8.668172e-02 + 1.845000e+01 2.875107e+00 -2.548258e+01 8.681972e-02 + 1.846000e+01 3.197976e+00 -2.549639e+01 8.697754e-02 + 1.847000e+01 3.475105e+00 -2.551020e+01 8.710080e-02 + 1.848000e+01 3.696893e+00 -2.552402e+01 8.714724e-02 + 1.849000e+01 3.855011e+00 -2.553783e+01 8.710102e-02 + 1.850000e+01 3.942748e+00 -2.555164e+01 8.697805e-02 + 1.851000e+01 3.955291e+00 -2.556545e+01 8.682055e-02 + 1.852000e+01 3.889955e+00 -2.557926e+01 8.668268e-02 + 1.853000e+01 3.746327e+00 -2.559307e+01 8.661186e-02 + 1.854000e+01 3.526329e+00 -2.560689e+01 8.663212e-02 + 1.855000e+01 3.234200e+00 -2.562070e+01 8.673571e-02 + 1.856000e+01 2.876383e+00 -2.563451e+01 8.688589e-02 + 1.857000e+01 2.461332e+00 -2.564832e+01 8.703003e-02 + 1.858000e+01 1.999250e+00 -2.566213e+01 8.711799e-02 + 1.859000e+01 1.501751e+00 -2.567595e+01 8.711936e-02 + 1.860000e+01 9.814823e-01 -2.568976e+01 8.703370e-02 + 1.861000e+01 4.517027e-01 -2.570357e+01 8.689062e-02 + 1.862000e+01 -7.414835e-02 -2.571738e+01 8.673974e-02 + 1.863000e+01 -5.828892e-01 -2.573119e+01 8.663363e-02 + 1.864000e+01 -1.062014e+00 -2.574500e+01 8.660942e-02 + 1.865000e+01 -1.500081e+00 -2.575882e+01 8.667576e-02 + 1.866000e+01 -1.887051e+00 -2.577263e+01 8.680969e-02 + 1.867000e+01 -2.214570e+00 -2.578644e+01 8.696490e-02 + 1.868000e+01 -2.476187e+00 -2.580025e+01 8.708798e-02 + 1.869000e+01 -2.667493e+00 -2.581406e+01 8.713694e-02 + 1.870000e+01 -2.786196e+00 -2.582787e+01 8.709541e-02 + 1.871000e+01 -2.832105e+00 -2.584169e+01 8.697819e-02 + 1.872000e+01 -2.807064e+00 -2.585550e+01 8.682608e-02 + 1.873000e+01 -2.714802e+00 -2.586931e+01 8.669201e-02 + 1.874000e+01 -2.560741e+00 -2.588312e+01 8.662265e-02 + 1.875000e+01 -2.351752e+00 -2.589693e+01 8.664204e-02 + 1.876000e+01 -2.095870e+00 -2.591074e+01 8.674305e-02 + 1.877000e+01 -1.802001e+00 -2.592456e+01 8.689001e-02 + 1.878000e+01 -1.479602e+00 -2.593837e+01 8.703136e-02 + 1.879000e+01 -1.138366e+00 -2.595218e+01 8.711776e-02 + 1.880000e+01 -7.879214e-01 -2.596599e+01 8.711906e-02 + 1.881000e+01 -4.375466e-01 -2.597980e+01 8.703452e-02 + 1.882000e+01 -9.591223e-02 -2.599361e+01 8.689316e-02 + 1.883000e+01 2.291400e-01 -2.600743e+01 8.674382e-02 + 1.884000e+01 5.307793e-01 -2.602124e+01 8.663848e-02 + 1.885000e+01 8.033258e-01 -2.603505e+01 8.661408e-02 + 1.886000e+01 1.042344e+00 -2.604886e+01 8.667944e-02 + 1.887000e+01 1.244694e+00 -2.606267e+01 8.681211e-02 + 1.888000e+01 1.408534e+00 -2.607648e+01 8.696633e-02 + 1.889000e+01 1.533284e+00 -2.609030e+01 8.708914e-02 + 1.890000e+01 1.619555e+00 -2.610411e+01 8.713861e-02 + 1.891000e+01 1.669032e+00 -2.611792e+01 8.709817e-02 + 1.892000e+01 1.684341e+00 -2.613173e+01 8.698215e-02 + 1.893000e+01 1.668888e+00 -2.614554e+01 8.683088e-02 + 1.894000e+01 1.626680e+00 -2.615935e+01 8.669698e-02 + 1.895000e+01 1.562134e+00 -2.617317e+01 8.662709e-02 + 1.896000e+01 1.479893e+00 -2.618698e+01 8.664556e-02 + 1.897000e+01 1.384630e+00 -2.620079e+01 8.674573e-02 + 1.898000e+01 1.280880e+00 -2.621460e+01 8.689237e-02 + 1.899000e+01 1.172869e+00 -2.622841e+01 8.703415e-02 + 1.900000e+01 1.064382e+00 -2.624222e+01 8.712155e-02 + 1.901000e+01 9.586432e-01 -2.625604e+01 8.712391e-02 + 1.902000e+01 8.582358e-01 -2.626985e+01 8.703982e-02 + 1.903000e+01 7.650479e-01 -2.628366e+01 8.689764e-02 + 1.904000e+01 6.802536e-01 -2.629747e+01 8.674590e-02 + 1.905000e+01 6.043264e-01 -2.631128e+01 8.663675e-02 + 1.906000e+01 5.370840e-01 -2.632509e+01 8.660775e-02 + 1.907000e+01 4.777607e-01 -2.633891e+01 8.666869e-02 + 1.908000e+01 4.251049e-01 -2.635272e+01 8.679810e-02 + 1.909000e+01 3.774942e-01 -2.636653e+01 8.695090e-02 + 1.910000e+01 3.330653e-01 -2.638034e+01 8.707426e-02 + 1.911000e+01 2.898492e-01 -2.639415e+01 8.712585e-02 + 1.912000e+01 2.459072e-01 -2.640797e+01 8.708827e-02 + 1.913000e+01 1.994612e-01 -2.642178e+01 8.697485e-02 + 1.914000e+01 1.490112e-01 -2.643559e+01 8.682517e-02 + 1.915000e+01 9.343576e-02 -2.644940e+01 8.669150e-02 + 1.916000e+01 3.207130e-02 -2.646321e+01 8.662080e-02 + 1.917000e+01 -3.523389e-02 -2.647702e+01 8.663819e-02 + 1.918000e+01 -1.080916e-01 -2.649084e+01 8.673807e-02 + 1.919000e+01 -1.855728e-01 -2.650465e+01 8.688609e-02 + 1.920000e+01 -2.662331e-01 -2.651846e+01 8.703131e-02 + 1.921000e+01 -3.481626e-01 -2.653227e+01 8.712394e-02 + 1.922000e+01 -4.290574e-01 -2.654608e+01 8.713244e-02 + 1.923000e+01 -5.063087e-01 -2.655989e+01 8.705411e-02 + 1.924000e+01 -5.771067e-01 -2.657371e+01 8.691603e-02 + 1.925000e+01 -6.385529e-01 -2.658752e+01 8.676580e-02 + 1.926000e+01 -6.877780e-01 -2.660133e+01 8.665529e-02 + 1.927000e+01 -7.220605e-01 -2.661514e+01 8.662258e-02 + 1.928000e+01 -7.389414e-01 -2.662895e+01 8.667855e-02 + 1.929000e+01 -7.363326e-01 -2.664276e+01 8.680308e-02 + 1.930000e+01 -7.126151e-01 -2.665658e+01 8.695223e-02 + 1.931000e+01 -6.667246e-01 -2.667039e+01 8.707374e-02 + 1.932000e+01 -5.982225e-01 -2.668420e+01 8.712516e-02 + 1.933000e+01 -5.073506e-01 -2.669801e+01 8.708834e-02 + 1.934000e+01 -3.950681e-01 -2.671182e+01 8.697554e-02 + 1.935000e+01 -2.630694e-01 -2.672563e+01 8.682530e-02 + 1.936000e+01 -1.137826e-01 -2.673945e+01 8.668935e-02 + 1.937000e+01 4.965341e-02 -2.675326e+01 8.661471e-02 + 1.938000e+01 2.234330e-01 -2.676707e+01 8.662727e-02 + 1.939000e+01 4.031503e-01 -2.678088e+01 8.672263e-02 + 1.940000e+01 5.838880e-01 -2.679469e+01 8.686764e-02 + 1.941000e+01 7.603286e-01 -2.680850e+01 8.701220e-02 + 1.942000e+01 9.268876e-01 -2.682232e+01 8.710673e-02 + 1.943000e+01 1.077867e+00 -2.683613e+01 8.711916e-02 + 1.944000e+01 1.207627e+00 -2.684994e+01 8.704579e-02 + 1.945000e+01 1.310772e+00 -2.686375e+01 8.691245e-02 + 1.946000e+01 1.382344e+00 -2.687756e+01 8.676570e-02 + 1.947000e+01 1.418029e+00 -2.689137e+01 8.665689e-02 + 1.948000e+01 1.414343e+00 -2.690519e+01 8.662421e-02 + 1.949000e+01 1.368829e+00 -2.691900e+01 8.667927e-02 + 1.950000e+01 1.280213e+00 -2.693281e+01 8.680296e-02 + 1.951000e+01 1.148547e+00 -2.694662e+01 8.695227e-02 + 1.952000e+01 9.753031e-01 -2.696043e+01 8.707545e-02 + 1.953000e+01 7.634311e-01 -2.697424e+01 8.712995e-02 + 1.954000e+01 5.173547e-01 -2.698806e+01 8.709697e-02 + 1.955000e+01 2.429157e-01 -2.700187e+01 8.698780e-02 + 1.956000e+01 -5.274497e-02 -2.701568e+01 8.684001e-02 + 1.957000e+01 -3.613665e-01 -2.702949e+01 8.670468e-02 + 1.958000e+01 -6.738055e-01 -2.704330e+01 8.662878e-02 + 1.959000e+01 -9.803250e-01 -2.705711e+01 8.663873e-02 + 1.960000e+01 -1.270927e+00 -2.707093e+01 8.673105e-02 + 1.961000e+01 -1.535714e+00 -2.708474e+01 8.687359e-02 + 1.962000e+01 -1.765271e+00 -2.709855e+01 8.701693e-02 + 1.963000e+01 -1.951044e+00 -2.711236e+01 8.711161e-02 + 1.964000e+01 -2.085707e+00 -2.712617e+01 8.712512e-02 + 1.965000e+01 -2.163487e+00 -2.713998e+01 8.705289e-02 + 1.966000e+01 -2.180452e+00 -2.715380e+01 8.691976e-02 + 1.967000e+01 -2.134721e+00 -2.716761e+01 8.677159e-02 + 1.968000e+01 -2.026606e+00 -2.718142e+01 8.665955e-02 + 1.969000e+01 -1.858664e+00 -2.719523e+01 8.662232e-02 + 1.970000e+01 -1.635658e+00 -2.720904e+01 8.667250e-02 + 1.971000e+01 -1.364429e+00 -2.722286e+01 8.679216e-02 + 1.972000e+01 -1.053676e+00 -2.723667e+01 8.693928e-02 + 1.973000e+01 -7.136597e-01 -2.725048e+01 8.706254e-02 + 1.974000e+01 -3.558338e-01 -2.726429e+01 8.711913e-02 + 1.975000e+01 7.572895e-03 -2.727810e+01 8.708940e-02 + 1.976000e+01 3.640104e-01 -2.729191e+01 8.698344e-02 + 1.977000e+01 7.010758e-01 -2.730573e+01 8.683771e-02 + 1.978000e+01 1.006975e+00 -2.731954e+01 8.670262e-02 + 1.979000e+01 1.270958e+00 -2.733335e+01 8.662514e-02 + 1.980000e+01 1.483711e+00 -2.734716e+01 8.663239e-02 + 1.981000e+01 1.637679e+00 -2.736097e+01 8.672204e-02 + 1.982000e+01 1.727326e+00 -2.737478e+01 8.686318e-02 + 1.983000e+01 1.749294e+00 -2.738860e+01 8.700723e-02 + 1.984000e+01 1.702483e+00 -2.740241e+01 8.710492e-02 + 1.985000e+01 1.588034e+00 -2.741622e+01 8.712322e-02 + 1.986000e+01 1.409227e+00 -2.743003e+01 8.705644e-02 + 1.987000e+01 1.171294e+00 -2.744384e+01 8.692811e-02 + 1.988000e+01 8.811625e-01 -2.745765e+01 8.678293e-02 + 1.989000e+01 5.471485e-01 -2.747147e+01 8.667148e-02 + 1.990000e+01 1.786013e-01 -2.748528e+01 8.663257e-02 + 1.991000e+01 -2.144701e-01 -2.749909e+01 8.667962e-02 + 1.992000e+01 -6.217781e-01 -2.751290e+01 8.679592e-02 + 1.993000e+01 -1.033127e+00 -2.752671e+01 8.694062e-02 + 1.994000e+01 -1.438757e+00 -2.754052e+01 8.706314e-02 + 1.995000e+01 -1.829651e+00 -2.755434e+01 8.712079e-02 + 1.996000e+01 -2.197791e+00 -2.756815e+01 8.709333e-02 + 1.997000e+01 -2.536358e+00 -2.758196e+01 8.698987e-02 + 1.998000e+01 -2.839868e+00 -2.759577e+01 8.684575e-02 + 1.999000e+01 -3.104253e+00 -2.760958e+01 8.671056e-02 + 2.000000e+01 -3.326870e+00 -2.762339e+01 8.663104e-02 diff --git a/examples/Ni_plot_pdf.py b/examples/Ni_plot_pdf.py index 1f8cb97d..4e61d200 100755 --- a/examples/Ni_plot_pdf.py +++ b/examples/Ni_plot_pdf.py @@ -30,8 +30,8 @@ # pylab is matplotlib interface with MATLAB-like plotting commands pylab.plot(r, G) -pylab.xlabel(u"r (Å)") -pylab.ylabel(u"G (Å$^{-2}$)") +pylab.xlabel("r (Å)") +pylab.ylabel("G (Å$^{-2}$)") pylab.title("x-ray PDF of nickel simulated at Qmax = %g" % qmax) # display plot window, this must be the last command in the script diff --git a/examples/Ni_refinement.py b/examples/Ni_refinement.py index 11f6f1ec..7c8862f6 100755 --- a/examples/Ni_refinement.py +++ b/examples/Ni_refinement.py @@ -80,8 +80,8 @@ pylab.plot(r, Gfit, "b-") pylab.plot(r, Gdiff + Gdiff_baseline, "r-") -pylab.xlabel(u"r (Å)") -pylab.ylabel(u"G (Å$^{-2}$)") +pylab.xlabel("r (Å)") +pylab.ylabel("G (Å$^{-2}$)") pylab.title("Fit of nickel to x-ray experimental PDF") # display plot window, this must be the last command in the script diff --git a/pyproject.toml b/pyproject.toml index d7351b5e..e537e24a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -19,4 +19,4 @@ exclude = ''' | blib2to3 | tests/data )/ -''' \ No newline at end of file +''' diff --git a/setup.py b/setup.py index 6a32d3b1..18e30554 100755 --- a/setup.py +++ b/setup.py @@ -31,7 +31,7 @@ def gitinfo(): - from subprocess import Popen, PIPE + from subprocess import PIPE, Popen kw = dict(stdout=PIPE, cwd=MYDIR, universal_newlines=True) proc = Popen(["git", "describe", "--tags", "--match=[v,V,[:digit:]]*"], **kw) From b634598217718a21167d4068acf24524d34d11be Mon Sep 17 00:00:00 2001 From: Sam Andrello Date: Tue, 16 Jul 2024 13:08:17 -0400 Subject: [PATCH 010/104] stages uncommented --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 377da527..14d7a2eb 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -40,4 +40,4 @@ repos: - id: no-commit-to-branch name: Prevent Commit to Main Branch args: ["--branch", "main"] - #stages: [pre-commit] \ No newline at end of file + stages: [pre-commit] \ No newline at end of file From f0920e8dbead1eb4721bea771ae196183ac08ca8 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 16 Jul 2024 17:11:49 +0000 Subject: [PATCH 011/104] [pre-commit.ci] auto fixes from pre-commit hooks --- .pre-commit-config.yaml | 2 +- diffpy/pdffit2/__init__.py | 4 ++-- diffpy/pdffit2/pdffit.py | 7 +++---- diffpy/pdffit2/tests/TestShapeFactors.py | 4 ++-- examples/Ni_plot_pdf.py | 3 ++- examples/Ni_refinement.py | 2 +- setup.py | 3 +-- 7 files changed, 12 insertions(+), 13 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 14d7a2eb..c4588061 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -40,4 +40,4 @@ repos: - id: no-commit-to-branch name: Prevent Commit to Main Branch args: ["--branch", "main"] - stages: [pre-commit] \ No newline at end of file + stages: [pre-commit] diff --git a/diffpy/pdffit2/__init__.py b/diffpy/pdffit2/__init__.py index 0f33c5c4..d0b98683 100644 --- a/diffpy/pdffit2/__init__.py +++ b/diffpy/pdffit2/__init__.py @@ -21,10 +21,10 @@ """ -from diffpy.pdffit2.version import __version__, __date__ -from diffpy.pdffit2.pdffit import PdfFit from diffpy.pdffit2.output import redirect_stdout +from diffpy.pdffit2.pdffit import PdfFit from diffpy.pdffit2.pdffit2 import is_element +from diffpy.pdffit2.version import __date__, __version__ # silence pyflakes checker assert __version__ or True diff --git a/diffpy/pdffit2/pdffit.py b/diffpy/pdffit2/pdffit.py index 43685ad1..255e8b0f 100644 --- a/diffpy/pdffit2/pdffit.py +++ b/diffpy/pdffit2/pdffit.py @@ -26,9 +26,7 @@ # Note that "import diffpy.pdffit2.output as output" would # crash with AttributeError when executed during imports of # parent packages. -from diffpy.pdffit2 import pdffit2 -from diffpy.pdffit2 import output - +from diffpy.pdffit2 import output, pdffit2 # helper routines @@ -143,7 +141,8 @@ def _exportAll(self, namespace): def intro(): """Show introductory message.""" import re - from diffpy.pdffit2 import __version__, __date__ + + from diffpy.pdffit2 import __date__, __version__ date = __date__[:10] d = {"version": __version__, "date": date, "year": date[:4] or "2019"} diff --git a/diffpy/pdffit2/tests/TestShapeFactors.py b/diffpy/pdffit2/tests/TestShapeFactors.py index 9c870c4a..1eaa9711 100644 --- a/diffpy/pdffit2/tests/TestShapeFactors.py +++ b/diffpy/pdffit2/tests/TestShapeFactors.py @@ -5,10 +5,10 @@ import unittest + import numpy -from diffpy.pdffit2 import PdfFit -from diffpy.pdffit2 import pdffit2 +from diffpy.pdffit2 import PdfFit, pdffit2 from diffpy.pdffit2.tests.pdffit2testutils import datafile diff --git a/examples/Ni_plot_pdf.py b/examples/Ni_plot_pdf.py index 4e61d200..603c65c9 100755 --- a/examples/Ni_plot_pdf.py +++ b/examples/Ni_plot_pdf.py @@ -4,9 +4,10 @@ """Calculate PDF of FCC nickel and plot it using matplotlib. """ -from diffpy.pdffit2 import PdfFit import pylab +from diffpy.pdffit2 import PdfFit + # create new PDF calculator object P = PdfFit() diff --git a/examples/Ni_refinement.py b/examples/Ni_refinement.py index 7c8862f6..665e92f4 100755 --- a/examples/Ni_refinement.py +++ b/examples/Ni_refinement.py @@ -5,9 +5,9 @@ Save fitted curve, refined structure and results summary. """ -from diffpy.pdffit2 import PdfFit import pylab +from diffpy.pdffit2 import PdfFit # Create new PDF calculator object. pf = PdfFit() diff --git a/setup.py b/setup.py index 18e30554..32800328 100755 --- a/setup.py +++ b/setup.py @@ -13,8 +13,7 @@ import sys import warnings -from setuptools import setup, find_packages -from setuptools import Extension +from setuptools import Extension, find_packages, setup # Use this version when git data are not available, like in git zip archive. # Update when tagging a new release. From 0921249f8f72aa24d9db0a0ae46969756023e553 Mon Sep 17 00:00:00 2001 From: Sam Andrello Date: Tue, 16 Jul 2024 13:21:31 -0400 Subject: [PATCH 012/104] more pep8 fixes --- .github/workflows/build.yaml | 2 +- devutils/makesdist | 4 ++-- diffpy/pdffit2/ipy_ext.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 9f8369e5..610ebbde 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -64,4 +64,4 @@ jobs: # if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') # uses: pypa/gh-action-pypi-publish@release/v1 # with: - # password: ${{ secrets.PYPI_API_TOKEN }} + # password: ${{ secrets.PYPI_API_TOKEN }} \ No newline at end of file diff --git a/devutils/makesdist b/devutils/makesdist index e77257ea..dccfaa99 100755 --- a/devutils/makesdist +++ b/devutils/makesdist @@ -11,11 +11,11 @@ import subprocess import sys import tarfile +from setup import FALLBACK_VERSION, versiondata + BASEDIR = os.path.dirname(os.path.dirname(os.path.realpath(__file__))) sys.path.insert(0, BASEDIR) -from setup import FALLBACK_VERSION, versiondata - timestamp = versiondata.getint("DEFAULT", "timestamp") vfb = versiondata.get("DEFAULT", "version").split(".post")[0] + ".post0" diff --git a/diffpy/pdffit2/ipy_ext.py b/diffpy/pdffit2/ipy_ext.py index dd96b7bf..c136bd45 100644 --- a/diffpy/pdffit2/ipy_ext.py +++ b/diffpy/pdffit2/ipy_ext.py @@ -54,6 +54,7 @@ def showfit(self, offset=None): No return value. """ from matplotlib.pyplot import gca + from math import floor cr = self.r cGobs = self.Gobs @@ -89,5 +90,4 @@ def _asarray(x, dtype=None): return numpy.asarray(x, dtype=dtype) - # End of class EasyPDFPlotting From 545cc0a3cade4cf5a0343f2ab0d43cc6c865105c Mon Sep 17 00:00:00 2001 From: Sam Andrello Date: Tue, 16 Jul 2024 13:27:02 -0400 Subject: [PATCH 013/104] black fixes --- diffpy/pdffit2/ipy_ext.py | 1 + diffpy/pdffit2/pdffit.py | 3 ++- diffpy/pdffit2/tests/TestPdfFit.py | 4 ++-- diffpy/pdffit2/tests/TestPhaseFractions.py | 4 ++-- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/diffpy/pdffit2/ipy_ext.py b/diffpy/pdffit2/ipy_ext.py index c136bd45..df8bc537 100644 --- a/diffpy/pdffit2/ipy_ext.py +++ b/diffpy/pdffit2/ipy_ext.py @@ -90,4 +90,5 @@ def _asarray(x, dtype=None): return numpy.asarray(x, dtype=dtype) + # End of class EasyPDFPlotting diff --git a/diffpy/pdffit2/pdffit.py b/diffpy/pdffit2/pdffit.py index 255e8b0f..9d0f164b 100644 --- a/diffpy/pdffit2/pdffit.py +++ b/diffpy/pdffit2/pdffit.py @@ -26,7 +26,8 @@ # Note that "import diffpy.pdffit2.output as output" would # crash with AttributeError when executed during imports of # parent packages. -from diffpy.pdffit2 import output, pdffit2 +from diffpy.pdffit2 import pdffit2 +from diffpy.pdffit2 import output # helper routines diff --git a/diffpy/pdffit2/tests/TestPdfFit.py b/diffpy/pdffit2/tests/TestPdfFit.py index 70712356..38d73f46 100644 --- a/diffpy/pdffit2/tests/TestPdfFit.py +++ b/diffpy/pdffit2/tests/TestPdfFit.py @@ -321,7 +321,7 @@ def test_getcrw(self): self.assertAlmostEqual(self.P.getrw(), rw19, self.places) # renormalize cumulative Rw and compare with Rw at r=15 Gobs19 = numpy.array(self.P.getpdf_obs()) - Gnorm19 = numpy.sqrt(numpy.sum(Gobs19**2)) + Gnorm19 = numpy.sqrt(numpy.sum(Gobs19 ** 2)) r = numpy.array(self.P.getR()) idx = numpy.nonzero(r <= 15)[0] Gnorm15 = numpy.sqrt(numpy.sum(Gobs19[idx] ** 2)) @@ -350,7 +350,7 @@ def test_getcrw_two_datasets(self): rw1 = self.P.getcrw()[-1] self.P.setdata(2) rw2 = self.P.getcrw()[-1] - self.assertAlmostEqual(rwtot**2, rw1**2 + rw2**2, self.places) + self.assertAlmostEqual(rwtot ** 2, rw1 ** 2 + rw2 ** 2, self.places) return # def test_getpar(self): diff --git a/diffpy/pdffit2/tests/TestPhaseFractions.py b/diffpy/pdffit2/tests/TestPhaseFractions.py index afc57c06..0b90a703 100644 --- a/diffpy/pdffit2/tests/TestPhaseFractions.py +++ b/diffpy/pdffit2/tests/TestPhaseFractions.py @@ -29,7 +29,7 @@ def test_xray_fractions(self): """test_xray_fractions -- check phase fractions in x-ray dataset.""" self.P.setdata(1) ph = self.P.phase_fractions() - bb1 = 28**2 + bb1 = 28 ** 2 bb2 = ((8 * 82 + 24 * 8 + 4 * 21 + 2 * 74 + 2 * 22) / 40.0) ** 2 self.assertAlmostEqual(1.0, sum(ph["atom"]), self.places) self.assertAlmostEqual(1.0, sum(ph["cell"]), self.places) @@ -57,7 +57,7 @@ def test_neutron_fractions(self): """test_neutron_fractions -- check phase fractions in neutron dataset.""" self.P.setdata(2) ph = self.P.phase_fractions() - bb1 = 10.31**2 + bb1 = 10.31 ** 2 bPb = 9.4012 bO = 5.8054 bSc = 12.11 From dcd0ee8bf1281b8326ea0930dc45e9d1a84ad293 Mon Sep 17 00:00:00 2001 From: Sam Andrello Date: Tue, 16 Jul 2024 13:27:36 -0400 Subject: [PATCH 014/104] pre-commit keep imports same to not break package --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c4588061..c8536852 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -29,7 +29,7 @@ repos: rev: 5.13.2 hooks: - id: isort - args: ["--profile", "black"] + args: ["--profile", "black", "--order-by-type"] - repo: https://github.com/kynan/nbstripout rev: 0.7.1 hooks: From 794324c2da069550abbfd85d86a3029c73523a7d Mon Sep 17 00:00:00 2001 From: Sam Andrello Date: Tue, 16 Jul 2024 13:29:59 -0400 Subject: [PATCH 015/104] fix __init__.py as was broken by pre-commit bot --- diffpy/pdffit2/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/diffpy/pdffit2/__init__.py b/diffpy/pdffit2/__init__.py index d0b98683..0f33c5c4 100644 --- a/diffpy/pdffit2/__init__.py +++ b/diffpy/pdffit2/__init__.py @@ -21,10 +21,10 @@ """ -from diffpy.pdffit2.output import redirect_stdout +from diffpy.pdffit2.version import __version__, __date__ from diffpy.pdffit2.pdffit import PdfFit +from diffpy.pdffit2.output import redirect_stdout from diffpy.pdffit2.pdffit2 import is_element -from diffpy.pdffit2.version import __date__, __version__ # silence pyflakes checker assert __version__ or True From 74a0d1c5e6f870030666f6a97d84fd0a3ed84e4b Mon Sep 17 00:00:00 2001 From: Sam Andrello Date: Tue, 16 Jul 2024 13:38:26 -0400 Subject: [PATCH 016/104] further pre-commit fixes --- .github/workflows/build.yaml | 2 +- diffpy/pdffit2/ipy_ext.py | 3 ++- diffpy/pdffit2/pdffit.py | 3 +-- diffpy/pdffit2/tests/TestPdfFit.py | 4 ++-- diffpy/pdffit2/tests/TestPhaseFractions.py | 4 ++-- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 610ebbde..9f8369e5 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -64,4 +64,4 @@ jobs: # if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') # uses: pypa/gh-action-pypi-publish@release/v1 # with: - # password: ${{ secrets.PYPI_API_TOKEN }} \ No newline at end of file + # password: ${{ secrets.PYPI_API_TOKEN }} diff --git a/diffpy/pdffit2/ipy_ext.py b/diffpy/pdffit2/ipy_ext.py index df8bc537..4546967e 100644 --- a/diffpy/pdffit2/ipy_ext.py +++ b/diffpy/pdffit2/ipy_ext.py @@ -53,9 +53,10 @@ def showfit(self, offset=None): No return value. """ - from matplotlib.pyplot import gca from math import floor + from matplotlib.pyplot import gca + cr = self.r cGobs = self.Gobs cGcalc = self.Gcalc diff --git a/diffpy/pdffit2/pdffit.py b/diffpy/pdffit2/pdffit.py index 9d0f164b..255e8b0f 100644 --- a/diffpy/pdffit2/pdffit.py +++ b/diffpy/pdffit2/pdffit.py @@ -26,8 +26,7 @@ # Note that "import diffpy.pdffit2.output as output" would # crash with AttributeError when executed during imports of # parent packages. -from diffpy.pdffit2 import pdffit2 -from diffpy.pdffit2 import output +from diffpy.pdffit2 import output, pdffit2 # helper routines diff --git a/diffpy/pdffit2/tests/TestPdfFit.py b/diffpy/pdffit2/tests/TestPdfFit.py index 38d73f46..70712356 100644 --- a/diffpy/pdffit2/tests/TestPdfFit.py +++ b/diffpy/pdffit2/tests/TestPdfFit.py @@ -321,7 +321,7 @@ def test_getcrw(self): self.assertAlmostEqual(self.P.getrw(), rw19, self.places) # renormalize cumulative Rw and compare with Rw at r=15 Gobs19 = numpy.array(self.P.getpdf_obs()) - Gnorm19 = numpy.sqrt(numpy.sum(Gobs19 ** 2)) + Gnorm19 = numpy.sqrt(numpy.sum(Gobs19**2)) r = numpy.array(self.P.getR()) idx = numpy.nonzero(r <= 15)[0] Gnorm15 = numpy.sqrt(numpy.sum(Gobs19[idx] ** 2)) @@ -350,7 +350,7 @@ def test_getcrw_two_datasets(self): rw1 = self.P.getcrw()[-1] self.P.setdata(2) rw2 = self.P.getcrw()[-1] - self.assertAlmostEqual(rwtot ** 2, rw1 ** 2 + rw2 ** 2, self.places) + self.assertAlmostEqual(rwtot**2, rw1**2 + rw2**2, self.places) return # def test_getpar(self): diff --git a/diffpy/pdffit2/tests/TestPhaseFractions.py b/diffpy/pdffit2/tests/TestPhaseFractions.py index 0b90a703..afc57c06 100644 --- a/diffpy/pdffit2/tests/TestPhaseFractions.py +++ b/diffpy/pdffit2/tests/TestPhaseFractions.py @@ -29,7 +29,7 @@ def test_xray_fractions(self): """test_xray_fractions -- check phase fractions in x-ray dataset.""" self.P.setdata(1) ph = self.P.phase_fractions() - bb1 = 28 ** 2 + bb1 = 28**2 bb2 = ((8 * 82 + 24 * 8 + 4 * 21 + 2 * 74 + 2 * 22) / 40.0) ** 2 self.assertAlmostEqual(1.0, sum(ph["atom"]), self.places) self.assertAlmostEqual(1.0, sum(ph["cell"]), self.places) @@ -57,7 +57,7 @@ def test_neutron_fractions(self): """test_neutron_fractions -- check phase fractions in neutron dataset.""" self.P.setdata(2) ph = self.P.phase_fractions() - bb1 = 10.31 ** 2 + bb1 = 10.31**2 bPb = 9.4012 bO = 5.8054 bSc = 12.11 From fe5b5b049cbb5c0c654bb48c5a68a4be75fcb19b Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 16 Jul 2024 17:38:38 +0000 Subject: [PATCH 017/104] [pre-commit.ci] auto fixes from pre-commit hooks --- diffpy/pdffit2/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/diffpy/pdffit2/__init__.py b/diffpy/pdffit2/__init__.py index 0f33c5c4..d0b98683 100644 --- a/diffpy/pdffit2/__init__.py +++ b/diffpy/pdffit2/__init__.py @@ -21,10 +21,10 @@ """ -from diffpy.pdffit2.version import __version__, __date__ -from diffpy.pdffit2.pdffit import PdfFit from diffpy.pdffit2.output import redirect_stdout +from diffpy.pdffit2.pdffit import PdfFit from diffpy.pdffit2.pdffit2 import is_element +from diffpy.pdffit2.version import __date__, __version__ # silence pyflakes checker assert __version__ or True From c9f5cd67537dd66d58a51ea51b87ab8bace448aa Mon Sep 17 00:00:00 2001 From: Sam Andrello Date: Tue, 16 Jul 2024 13:45:39 -0400 Subject: [PATCH 018/104] exclude __init__.py from pre-commit as it breaks imports --- .pre-commit-config.yaml | 3 ++- diffpy/pdffit2/__init__.py | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c8536852..41a8d7dd 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -30,6 +30,7 @@ repos: hooks: - id: isort args: ["--profile", "black", "--order-by-type"] + exclude: diffpy/pdffit2/__init__\.py$ - repo: https://github.com/kynan/nbstripout rev: 0.7.1 hooks: @@ -40,4 +41,4 @@ repos: - id: no-commit-to-branch name: Prevent Commit to Main Branch args: ["--branch", "main"] - stages: [pre-commit] + #stages: [pre-commit] diff --git a/diffpy/pdffit2/__init__.py b/diffpy/pdffit2/__init__.py index d0b98683..0f33c5c4 100644 --- a/diffpy/pdffit2/__init__.py +++ b/diffpy/pdffit2/__init__.py @@ -21,10 +21,10 @@ """ -from diffpy.pdffit2.output import redirect_stdout +from diffpy.pdffit2.version import __version__, __date__ from diffpy.pdffit2.pdffit import PdfFit +from diffpy.pdffit2.output import redirect_stdout from diffpy.pdffit2.pdffit2 import is_element -from diffpy.pdffit2.version import __date__, __version__ # silence pyflakes checker assert __version__ or True From 0efa6e0b6a2750865d6806eb4451e504c58ba093 Mon Sep 17 00:00:00 2001 From: Sam Andrello Date: Tue, 16 Jul 2024 13:45:57 -0400 Subject: [PATCH 019/104] minor fixes --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 41a8d7dd..c52e9bdf 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -41,4 +41,4 @@ repos: - id: no-commit-to-branch name: Prevent Commit to Main Branch args: ["--branch", "main"] - #stages: [pre-commit] + stages: [pre-commit] From ce3dea4d557e53bfd626a5a6e0b77e1efebf72d2 Mon Sep 17 00:00:00 2001 From: Sam Andrello Date: Tue, 16 Jul 2024 14:02:35 -0400 Subject: [PATCH 020/104] Exclude meta.yaml since hook not properly checking jinja2 --- .pre-commit-config.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c52e9bdf..0ab2ecdd 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -14,6 +14,7 @@ repos: rev: v4.6.0 hooks: - id: check-yaml + exclude: ^conda-recipe/meta\.yaml$ - id: end-of-file-fixer - id: trailing-whitespace exclude: '\.(rst|txt)$' @@ -30,7 +31,7 @@ repos: hooks: - id: isort args: ["--profile", "black", "--order-by-type"] - exclude: diffpy/pdffit2/__init__\.py$ + exclude: ^diffpy/pdffit2/__init__\.py$ - repo: https://github.com/kynan/nbstripout rev: 0.7.1 hooks: From 04f7267115f9747db4392c37a6e15b5a890ee1ea Mon Sep 17 00:00:00 2001 From: Sam Andrello Date: Mon, 22 Jul 2024 11:50:03 -0400 Subject: [PATCH 021/104] Added src directory with Python code --- src/diffpy/__init__.py | 24 + src/diffpy/pdffit2/__init__.py | 24 + src/diffpy/pdffit2/ipy_ext.py | 95 + src/diffpy/pdffit2/output.py | 41 + src/diffpy/pdffit2/pdffit.py | 1297 +++++++++++ src/diffpy/pdffit2/tests/ExceptionsTest.py | 794 +++++++ src/diffpy/pdffit2/tests/TestPdfFit.py | 761 ++++++ .../pdffit2/tests/TestPhaseFractions.py | 95 + src/diffpy/pdffit2/tests/TestShapeFactors.py | 274 +++ src/diffpy/pdffit2/tests/__init__.py | 0 src/diffpy/pdffit2/tests/conftest.py | 19 + src/diffpy/pdffit2/tests/debug.py | 35 + src/diffpy/pdffit2/tests/pdffit2testutils.py | 53 + src/diffpy/pdffit2/tests/run.py | 34 + src/diffpy/pdffit2/tests/rundeps.py | 30 + src/diffpy/pdffit2/tests/testdata/300K.gr | 2062 +++++++++++++++++ src/diffpy/pdffit2/tests/testdata/Ni.dat | 1001 ++++++++ src/diffpy/pdffit2/tests/testdata/Ni.stru | 33 + .../pdffit2/tests/testdata/PbScW25TiO3.stru | 345 +++ src/diffpy/pdffit2/tests/testdata/badNi.dat | 1001 ++++++++ src/diffpy/pdffit2/tests/testdata/badNi.stru | 32 + .../tests/testdata/badNiZeroVolume.stru | 33 + .../pdffit2/tests/testdata/noLattice.stru | 32 + src/diffpy/pdffit2/version.py | 26 + 24 files changed, 8141 insertions(+) create mode 100644 src/diffpy/__init__.py create mode 100644 src/diffpy/pdffit2/__init__.py create mode 100644 src/diffpy/pdffit2/ipy_ext.py create mode 100644 src/diffpy/pdffit2/output.py create mode 100644 src/diffpy/pdffit2/pdffit.py create mode 100644 src/diffpy/pdffit2/tests/ExceptionsTest.py create mode 100644 src/diffpy/pdffit2/tests/TestPdfFit.py create mode 100644 src/diffpy/pdffit2/tests/TestPhaseFractions.py create mode 100644 src/diffpy/pdffit2/tests/TestShapeFactors.py create mode 100644 src/diffpy/pdffit2/tests/__init__.py create mode 100644 src/diffpy/pdffit2/tests/conftest.py create mode 100644 src/diffpy/pdffit2/tests/debug.py create mode 100644 src/diffpy/pdffit2/tests/pdffit2testutils.py create mode 100644 src/diffpy/pdffit2/tests/run.py create mode 100644 src/diffpy/pdffit2/tests/rundeps.py create mode 100644 src/diffpy/pdffit2/tests/testdata/300K.gr create mode 100644 src/diffpy/pdffit2/tests/testdata/Ni.dat create mode 100644 src/diffpy/pdffit2/tests/testdata/Ni.stru create mode 100644 src/diffpy/pdffit2/tests/testdata/PbScW25TiO3.stru create mode 100644 src/diffpy/pdffit2/tests/testdata/badNi.dat create mode 100644 src/diffpy/pdffit2/tests/testdata/badNi.stru create mode 100644 src/diffpy/pdffit2/tests/testdata/badNiZeroVolume.stru create mode 100644 src/diffpy/pdffit2/tests/testdata/noLattice.stru create mode 100644 src/diffpy/pdffit2/version.py diff --git a/src/diffpy/__init__.py b/src/diffpy/__init__.py new file mode 100644 index 00000000..71428827 --- /dev/null +++ b/src/diffpy/__init__.py @@ -0,0 +1,24 @@ +#!/usr/bin/env python +############################################################################## +# +# (c) 2024 The Trustees of Columbia University in the City of New York. +# All rights reserved. +# +# File coded by: Billinge Group members and community contributors. +# +# See GitHub contributions for a more detailed list of contributors. +# https://github.com/diffpy/diffpy.pdffit2/graphs/contributors +# +# See LICENSE.rst for license information. +# +############################################################################## + +"""Blank namespace package for module diffpy.""" + + +from pkgutil import extend_path + +__path__ = extend_path(__path__, __name__) + +# End of file + diff --git a/src/diffpy/pdffit2/__init__.py b/src/diffpy/pdffit2/__init__.py new file mode 100644 index 00000000..e12b2fb9 --- /dev/null +++ b/src/diffpy/pdffit2/__init__.py @@ -0,0 +1,24 @@ +#!/usr/bin/env python +############################################################################## +# +# (c) 2024 The Trustees of Columbia University in the City of New York. +# All rights reserved. +# +# File coded by: Billinge Group members and community contributors. +# +# See GitHub contributions for a more detailed list of contributors. +# https://github.com/diffpy/diffpy.pdffit2/graphs/contributors +# +# See LICENSE.rst for license information. +# +############################################################################## + +"""PDFfit2 - real space structure refinement program.""" + +# package version +from diffpy.pdffit2.version import __version__ + +# silence the pyflakes syntax checker +assert __version__ or True + +# End of file diff --git a/src/diffpy/pdffit2/ipy_ext.py b/src/diffpy/pdffit2/ipy_ext.py new file mode 100644 index 00000000..4546967e --- /dev/null +++ b/src/diffpy/pdffit2/ipy_ext.py @@ -0,0 +1,95 @@ +#!/usr/bin/env python + +"""This module defines functions within IPython session to simulate +the old pdffit2 interactive session. + +Usage: %load_ext diffpy.pdffit2.ipy_ext +""" + + +def load_ipython_extension(ipython): + from diffpy.pdffit2 import PdfFit + + pf = PdfFit() + pdf = EasyPDFPlotting(pf) + print(" Type help(pdffit) or help(topic) for information.\n") + ns = dict(pdffit=PdfFit, pdf=pdf) + pf._exportAll(ns) + ipython.user_ns.update(ns) + return + + +class EasyPDFPlotting(object): + """Convenience functions for accessing and plotting PDFfit2 data.""" + + def __init__(self, pdffit_instance): + self._pdffit = pdffit_instance + return + + @property + def r(self): + "R-grid for PDF simulation." + return self._asarray(self._pdffit.getR(), dtype=float) + + @property + def Gobs(self): + "Observed PDF data." + return self._asarray(self._pdffit.getpdf_obs(), dtype=float) + + @property + def Gcalc(self): + "Calculated PDF data." + return self._asarray(self._pdffit.getpdf_fit()) + + @property + def Gdiff(self): + "Difference between the observed and simulated PDF." + return self.Gobs - self.Gcalc + + def showfit(self, offset=None): + """Plot observed and simulated PDFs and the difference curve. + + offset -- offset for the difference curve. + + No return value. + """ + from math import floor + + from matplotlib.pyplot import gca + + cr = self.r + cGobs = self.Gobs + cGcalc = self.Gcalc + cGdiff = self.Gdiff + if offset is None: + offset = floor(min([min(cGobs), min(cGcalc)]) - max(cGdiff)) + ax = gca() + ax.plot(cr, cGobs, "r.", cr, cGcalc, "b-", cr, cGdiff + offset, "g-") + xl = ax.xaxis.get_label().get_text() + yl = ax.yaxis.get_label().get_text() + if xl == "": + ax.set_xlabel("r (A)") + if yl == "": + ax.set_ylabel("G (A**-2)") + return + + def showRw(self): + "Plot cumulative Rw." + from matplotlib.pyplot import gca + + cRw = self._asarray(self._pdffit.getcrw()) + ax = gca() + ax.plot(self.r, cRw) + ax.set_title("Cumulative Rw = %.4f" % cRw[-1]) + ax.set_xlabel("r") + ax.set_ylabel("Rw") + return + + @staticmethod + def _asarray(x, dtype=None): + import numpy + + return numpy.asarray(x, dtype=dtype) + + +# End of class EasyPDFPlotting diff --git a/src/diffpy/pdffit2/output.py b/src/diffpy/pdffit2/output.py new file mode 100644 index 00000000..6d1247cf --- /dev/null +++ b/src/diffpy/pdffit2/output.py @@ -0,0 +1,41 @@ +#!/usr/bin/env python +############################################################################## +# +# pdffit2 by DANSE Diffraction group +# Simon J. L. Billinge +# (c) 2007 trustees of the Michigan State University. +# All rights reserved. +# +# File coded by: Pavol Juhas +# +# See AUTHORS.txt for a list of people who contributed. +# See LICENSE.txt for license information. +# +############################################################################## + +"""Take care of sending engine output to given file-like object. +The output file is stored in local module variable stdout. +""" + + +# create module variable stdout + +from sys import stdout as stdout + +# silence pyflakes checker +assert stdout + + +def redirect_stdout(dst): + """Redirect PDFfit2 standard output to a file-like object dst. + The dst value is stored in module variable stdout. + """ + from diffpy.pdffit2.pdffit2 import redirect_stdout + + redirect_stdout(dst) + global stdout + stdout = dst + return + + +# End of file diff --git a/src/diffpy/pdffit2/pdffit.py b/src/diffpy/pdffit2/pdffit.py new file mode 100644 index 00000000..255e8b0f --- /dev/null +++ b/src/diffpy/pdffit2/pdffit.py @@ -0,0 +1,1297 @@ +#!/usr/bin/env python +############################################################################## +# +# pdffit2 by DANSE Diffraction group +# Simon J. L. Billinge +# (c) 2006 trustees of the Michigan State University. +# All rights reserved. +# +# File coded by: Chris Farros, Pavol Juhas +# +# See AUTHORS.txt for a list of people who contributed. +# See LICENSE.txt for license information. +# +############################################################################## + +"""PdfFit class for fitting pdf data to a model.""" + +from __future__ import print_function + +import itertools +import numbers + +import six + +# Load pdffit2 and output modules to the current namespace. +# Note that "import diffpy.pdffit2.output as output" would +# crash with AttributeError when executed during imports of +# parent packages. +from diffpy.pdffit2 import output, pdffit2 + +# helper routines + + +def _format_value_std(value, stdev): + """Convert value to a string with standard deviation in brackets. + + value -- a number + stdev -- standard deviation. Ignored when small compared to value. + + Return string. + """ + if stdev > abs(value) * 1e-8: + s = "%g (%g)" % (value, stdev) + elif str(stdev) == "nan": + s = "%g (NaN)" % value + else: + s = "%g" % value + return s + + +def _format_bond_length(dij, ddij, ij1, symij): + """Return string with formatted bond length info for a pair of atoms. + + dij -- distance between atoms i and j + ddij -- standard deviation of dij. Ignored when small relative to dij. + ij1 -- tuple of atom indices starting at 1 + symij -- tuple of atom symbols + + Return formatted string. + """ + w_smbidx = 10 + w_equals = 30 + s0 = "%s (#%i)" % (symij[0], ij1[0]) + s1 = "%s (#%i)" % (symij[1], ij1[1]) + leader0 = " " + s0.ljust(w_smbidx) + " - " + s1 + " " + leader1 = leader0.ljust(w_equals) + "= " + s = leader1 + _format_value_std(dij, ddij) + " A" + return s + + +def _convertCallable(var): + """Convert an object to the result of its call when callable. + + var -- string or callable object that returns string + + Return var or var(). + """ + if callable(var): + rv = var() + else: + rv = var + return rv + + +# constants + +__intro_message__ = """ +****************************************************************************** +* P D F F I T Version %(version)s * +* %(date)s * +* -------------------------------------------------------------------------- * +* (c) 1998-2007 Trustees of the Michigan State University. * +* (c) 2008-%(year)s Trustees of the Columbia University * +* in the city of New York. * +* * +* Authors: * +* Thomas Proffen - Email: tproffen@lanl.gov * +* Jacques Bloch - Email: bloch@pa.msu.edu * +* Christopher Farrow - Email: clf2121@columbia.edu * +* Pavol Juhas - Email: pjuhas@bnl.gov * +* Simon Billinge - Email: sb2896@columbia.edu * +****************************************************************************** +""" + + +############################################################################## + + +class PdfFit(object): + """Create PdfFit object.""" + + # constants and enumerators from pdffit.h: + # selection of all atoms + selalias = {"ALL": -1} + # constraint type identifiers + FCON = {"USER": 0, "IDENT": 1, "FCOMP": 2, "FSQR": 3} + # scattering type identifiers + Sctp = {"X": 0, "N": 1} + + def _exportAll(self, namespace): + """_exportAll(self, namespace) --> Export all 'public' class methods + into namespace. + + This function allows for a module-level PdfFit object which doesn't have + to be referenced when calling a method. This function makes old (python) + scripts compatible with this class. At the top of the script, create a + pdffit object, and then call this method. Usually, namespace = locals(). + """ + # string aliases (var = "var") + for a in itertools.chain(self.selalias, self.FCON, self.Sctp): + exec("%s = %r" % (a, a), namespace) + public = [ + a + for a in dir(self) + if "__" not in a and a not in ["_handle", "_exportAll", "selalias", "FCON", "Sctp"] + ] + for funcname in public: + namespace[funcname] = getattr(self, funcname) + return + + def intro(): + """Show introductory message.""" + import re + + from diffpy.pdffit2 import __date__, __version__ + + date = __date__[:10] + d = {"version": __version__, "date": date, "year": date[:4] or "2019"} + msg = __intro_message__ % d + + def filler(mx): + return mx.group(0).rstrip(" *").ljust(77) + "*" + + msg_ljust = re.sub("(?m)^(.{1,77}|.{79}.*)$", filler, msg) + print(msg_ljust, file=output.stdout) + return + + intro = staticmethod(intro) + + def add_structure(self, stru): + """add_structure(stru) --> Add new structure to PdfFit instance. + + stru -- instance of Structure class from diffpy.structure. + + No return value. + Raises pdffit2.structureError when stru contains unknown + atom species. + """ + s = stru.writeStr("pdffit") + self.read_struct_string(s) + return + + def read_struct(self, struct): + """read_struct(struct) --> Read structure from file into memory. + + struct -- name of file from which to read structure + + Raises: + pdffit2.calculationError when a lattice cannot be created from the + given structure + pdffit2.structureError when a structure file is malformed + IOError when the file cannot be read from the disk + """ + pdffit2.read_struct(self._handle, struct) + self.stru_files.append(struct) + return + + def read_struct_string(self, struct, name=""): + """read_struct_string(struct, name = "") --> Read structure from + a string into memory. + + struct -- string containing the contents of the structure file + name -- tag with which to label structure + + Raises: + pdffit2.calculationError when a lattice cannot be created from the + given structure + pdffit2.structureError when a structure file is malformed + """ + pdffit2.read_struct_string(self._handle, struct) + self.stru_files.append(name) + return + + def read_data(self, data, stype, qmax, qdamp): + """read_data(data, stype, qmax, qdamp) --> Read pdf data from file into + memory. + + data -- name of file from which to read data + stype -- 'X' (xray) or 'N' (neutron) + qmax -- Q-value cutoff used in PDF calculation. + Use qmax=0 to neglect termination ripples. + qdamp -- instrumental Q-resolution factor + + Raises: IOError when the file cannot be read from disk + """ + pdffit2.read_data(self._handle, data, six.b(stype), qmax, qdamp) + self.data_files.append(data) + return + + def read_data_string(self, data, stype, qmax, qdamp, name=""): + """read_data_string(data, stype, qmax, qdamp, name = "") --> Read + pdf data from a string into memory. + + data -- string containing the contents of the data file + stype -- 'X' (xray) or 'N' (neutron) + qmax -- Q-value cutoff used in PDF calculation. + Use qmax=0 to neglect termination ripples. + qdamp -- instrumental Q-resolution factor + name -- tag with which to label data + """ + pdffit2.read_data_string(self._handle, data, six.b(stype), qmax, qdamp, name) + name = data + self.data_files.append(name) + return + + def read_data_lists(self, stype, qmax, qdamp, r_data, Gr_data, dGr_data=None, name="list"): + """read_data_lists(stype, qmax, qdamp, r_data, Gr_data, dGr_data = + None, name = "list") --> Read pdf data into memory from lists. + + All lists must be of the same length. + stype -- 'X' (xray) or 'N' (neutron) + qmax -- Q-value cutoff used in PDF calculation. + Use qmax=0 to neglect termination ripples. + qdamp -- instrumental Q-resolution factor + r_data -- list of r-values + Gr_data -- list of G(r) values + dGr_data -- list of G(r) uncertainty values + name -- tag with which to label data + + Raises: ValueError when the data lists are of different length + """ + pdffit2.read_data_arrays(self._handle, six.b(stype), qmax, qdamp, r_data, Gr_data, dGr_data, name) + self.data_files.append(name) + return + + def pdfrange(self, iset, rmin, rmax): + """pdfrange(iset, rmin, rmax) --> Set the range of the fit. + + iset -- data set to consider + rmin -- minimum r-value of fit + rmax -- maximum r-value of fit + + Raises: ValueError for bad input values + """ + pdffit2.pdfrange(self._handle, iset, rmin, rmax) + return + + def reset(self): + """reset() --> Clear all stored fit, structure, and parameter data.""" + self.stru_files = [] + self.data_files = [] + pdffit2.reset(self._handle) + return + + def alloc(self, stype, qmax, qdamp, rmin, rmax, bin): + """alloc(stype, qmax, qdamp, rmin, rmax, bin) --> Allocate space + for a PDF calculation. + + The structure from which to calculate the PDF must first be imported + with the read_struct() or read_struct_string() method. + stype -- 'X' (xray) or 'N' (neutron) + qmax -- Q-value cutoff used in PDF calculation. + Use qmax=0 to neglect termination ripples. + qdamp -- instrumental Q-resolution factor + rmin -- minimum r-value of calculation + rmax -- maximum r-value of calculation + bin -- number of data points in calculation + + Raises: + ValueError for bad input values + pdffit.unassignedError when no structure has been loaded + """ + pdffit2.alloc(self._handle, six.b(stype), qmax, qdamp, rmin, rmax, bin) + return + + def calc(self): + """calc() --> Calculate the PDF of the imported structure. + + Space for the calculation must first be allocated with the alloc() + method. + + Raises: + pdffit2.calculationError when allocated space cannot + accomodate calculation + pdffit.unassignedError when space for calculation has not been + allocated + """ + pdffit2.calc(self._handle) + return + + def refine(self, toler=0.00000001): + """refine(toler = 0.00000001) --> Fit the theory to the imported data. + + toler -- tolerance of the fit + + Raises: + pdffit2.calculationError when the model pdf cannot be calculated + pdffit2.constraintError when refinement fails due to bad + constraint + pdffit2.unassigedError when a constraint used but never initialized + using setpar() + """ + step = 0 + finished = 0 + while not finished: + finished = pdffit2.refine_step(self._handle, toler) + step += 1 + return + + def refine_step(self, toler=0.00000001): + """refine_step(toler = 0.00000001) --> Run a single step of the fit. + + toler -- tolerance of the fit + + Raises: + pdffit2.calculationError when the model pdf cannot be calculated + pdffit2.constraintError when refinement fails due to bad + constraint + pdffit2.unassigedError when a constraint used but never initialized + using setpar() + + Returns: 1 (0) if refinement is (is not) finished + """ + self.finished = pdffit2.refine_step(self._handle, toler) + return self.finished + + def save_pdf(self, iset, fname): + """save_pdf(iset, fname) --> Save calculated or fitted PDF to file. + + iset -- data set to save + + Raises: + IOError if file cannot be saved + pdffit2.unassignedError if the data set is undefined + """ + pdffit2.save_pdf(self._handle, iset, fname) + return + + def save_pdf_string(self, iset): + """save_pdf_string(iset) --> Save calculated or fitted PDF to string. + + iset -- data set to save + + Raises: + pdffit2.unassignedError if the data set is undefined + + Returns: string containing contents of save file + """ + pdffilestring = pdffit2.save_pdf(self._handle, iset, "") + return pdffilestring + + def save_dif(self, iset, fname): + """save_dif(iset, fname) --> Save data and fitted PDF difference to + file. + + iset -- data set to save + + Raises: + IOError if file cannot be saved + pdffit2.unassignedError if the data set is undefined + """ + pdffit2.save_dif(self._handle, iset, fname) + return + + def save_dif_string(self, iset): + """save_dif_string(iset) --> Save data and fitted PDF difference to + string. + + iset -- data set to save + + Raises: + pdffit2.unassignedError if the data set is undefined + + Returns: string containing contents of save file + """ + diffilestring = pdffit2.save_dif(self._handle, iset, "") + return diffilestring + + def save_res(self, fname): + """save_res(fname) --> Save fit-specific data to file. + + Raises: + IOError if file cannot be saved + pdffit2.unassignedError if there is no refinement data to save + """ + pdffit2.save_res(self._handle, fname) + return + + def save_res_string(self): + """save_res_string() --> Save fit-specific data to a string. + + Raises: + pdffit2.unassignedError if there is no refinement data to save + + Returns: string containing contents of save file + """ + resfilestring = pdffit2.save_res(self._handle, "") + return resfilestring + + def get_structure(self, ip): + """get_structure(ip) --> Get a copy of specified phase data. + + ip -- index of existing PdfFit phase starting from 1 + + Return Structure object from diffpy.structure. + Raise pdffit2.unassignedError if phase ip is undefined. + """ + from diffpy.structure import PDFFitStructure + + s = self.save_struct_string(ip) + stru = PDFFitStructure() + stru.readStr(s, "pdffit") + return stru + + def save_struct(self, ip, fname): + """save_struct(ip, fname) --> Save structure resulting from fit + to file. + + ip -- phase to save + + Raises: + IOError if file cannot be saved + pdffit2.unassignedError if the data set is undefined + """ + pdffit2.save_struct(self._handle, ip, fname) + return + + def save_struct_string(self, ip): + """save_struct(ip) --> Save structure resulting from fit to string. + + ip -- phase to save + + Raises: + pdffit2.unassignedError if phase ip is undefined. + + Returns: string containing contents of save file + """ + structfilestring = pdffit2.save_struct(self._handle, ip, "") + return structfilestring + + def show_struct(self, ip): + """show_struct(ip) --> Print structure resulting from fit. + + ip -- phase to display + + Raises: pdffit2.unassignedError if the phase is undefined + """ + pdffit2.show_struct(self._handle, ip) + return + + def constrain(self, var, par, fcon=None): + """constrain(var, par[, fcon]) --> Constrain a variable to a parameter. + + A variable can be constrained to a number or equation string. + var -- variable to constrain, such as x(1) + par -- parameter which to constrain the variable. This can be + an integer or an equation string containing a reference + to another parameter. Equation strings use standard c++ + syntax. The value of a constrained parameter is accessed + as @p in an equation string, where p is the parameter. + e.g. + >>> constrain(x(1), 1) + >>> constrain(x(2), "0.5+@1") + fcon -- 'USER', 'IDENT', 'FCOMP', or 'FSQR' + this is an optional parameter, and I don't know how it is + used! + + Raises: + pdffit2.constraintError if a constraint is bad + pdffit2.unassignedError if variable does not yet exist + ValueError if variable index does not exist (e.g. lat(7)) + """ + var_ref = self.__getRef(var) + varnc = _convertCallable(var) + if fcon: + fc = self.FCON[fcon] + pdffit2.constrain_int(self._handle, var_ref, varnc, par, fc) + elif isinstance(par, six.string_types): + pdffit2.constrain_str(self._handle, var_ref, varnc, par) + else: + pdffit2.constrain_int(self._handle, var_ref, varnc, par) + return + + def setpar(self, par, val): + """setpar(par, val) --> Set value of constrained parameter. + + val -- Either a numerical value or a reference to a variable + + Raises: + pdffit2.unassignedError when variable is yet to be assigned + """ + # people do not use parenthesis, e.g., "setpar(3, qdamp)" + # in such case val is a reference to PdfFit method + val = _convertCallable(val) + try: + val = float(val) + pdffit2.setpar_dbl(self._handle, par, val) + except ValueError: + var_ref = self.__getRef(val) + pdffit2.setpar_RV(self._handle, par, var_ref) + return + + def setvar(self, var, val): + """setvar(var, val) --> Set the value of a variable. + + Raises: + pdffit2.unassignedError if variable does not yet exist + ValueError if variable index does not exist (e.g. lat(7)) + """ + var_ref = self.__getRef(var) + pdffit2.setvar(self._handle, var_ref, val) + return + + def getvar(self, var): + """getvar(var) --> Get stored value of a variable. + + Raises: + pdffit2.unassignedError if variable does not yet exist + ValueError if variable index does not exist (e.g. lat(7)) + """ + var_ref = self.__getRef(var) + retval = pdffit2.getvar(self._handle, var_ref) + return retval + + def getrw(self): + """getrw() --> Get normalized total error of the fit rw. + + getrw calculates total fit error summed for all datasets in the fit. + + Return float. + """ + rw = pdffit2.getrw(self._handle) + return rw + + def getcrw(self): + """getcrw() --> Get cumulative Rw for the current dataset. + + Cumulative Rw is a list of Rw partial sums cost values evaluated against + observed PDF data in the error sums evaluated against + the r-points in the fit. + + Raises: pdffit2.unassignedError if no data exists + + Returns: List of crw points, equidistant in r or empty list + if the refine function has not been called yet. + """ + crw = pdffit2.getcrw(self._handle) + return crw + + def getR(self): + """getR() --> Get r-points used in the fit. + + This function should only be called after data has been loaded or + calculated. Before a refinement, the list of r-points will reflect the + data. Afterwords, they will reflect the fit range. + + Raises: pdffit2.unassignedError if no data exists + + Returns: List of equidistance r-points used in fit. + """ + R = pdffit2.getR(self._handle) + return R + + def getpdf_fit(self): + """getpdf_fit() --> Get fitted PDF. + + This function should only be called after a refinement or refinement + step has been done. + + Raises: pdffit2.unassignedError if no data exists + + Returns: List of fitted points, equidistant in r. + """ + pdfdata = pdffit2.getpdf_fit(self._handle) + return pdfdata + + def getpdf_obs(self): + """getpdf_obs() --> Get observed PDF. + + This function should only be called after data has been loaded or + calculated. Before a refinement, the list of r-points will reflect the + data. Afterwords, they will reflect the fit range. + + Raises: pdffit2.unassignedError if no data exists + + Returns: List of data points, equidistant in r. + """ + pdfdata = pdffit2.getpdf_obs(self._handle) + return pdfdata + + def getpdf_diff(self): + """Obtain difference between observed and fitted PDF. + + This function should only be called after data has been loaded or + calculated. Before a refinement, the list of r-points will reflect the + data. Afterwords, they will reflect the fit range. + + Raises: pdffit2.unassignedError if no data exists + + Returns: List of data points, equidistant in r. + """ + Gdiff = pdffit2.getpdf_diff(self._handle) + return Gdiff + + def get_atoms(self, ip=None): + """get_atoms() --> Get element symbols of all atoms in the structure. + + ip -- index of phase to get the elements from (starting from 1) + when ip is not given, use current phase + + This function should only be called after a structure has been loaded. + + Raises: pdffit2.unassignedError if no structure exists + + Returns: List of atom names in structure. + """ + if ip is None: + rv = pdffit2.get_atoms(self._handle) + else: + rv = pdffit2.get_atoms(self._handle, ip) + return rv + + def get_atom_types(self, ip=None): + """get_atom_types() --> Ordered unique element symbols in the structure. + + ip -- index of phase to get the elements from (starting from 1) + when ip is not given, use current phase + + This function should only be called after a structure has been loaded. + + Raises: + pdffit2.unassignedError if no structure exists + + Returns: List of unique atom symbols as they occur in structure. + """ + if ip is None: + rv = pdffit2.get_atom_types(self._handle) + else: + rv = pdffit2.get_atom_types(self._handle, ip) + return rv + + def getpar(self, par): + """getpar(par) --> Get value of parameter. + + Raises: ValueError if parameter does not exists + """ + return pdffit2.getpar(self._handle, par) + + def fixpar(self, par): + """fixpar(par) --> Fix a parameter. + + Fixed parameters are not fitted in a refinement. Passed parameter + can be 'ALL', in which case all parameters are fixed. + + Raises: pdffit.unassignedError when parameter has not been assigned + """ + if isinstance(par, six.string_types) and par.upper() in self.selalias: + par = self.selalias[par.upper()] + pdffit2.fixpar(self._handle, par) + return + + def freepar(self, par): + """freepar(par) --> Free a parameter. + + Freed parameters are fitted in a refinement. Passed parameter + can be 'ALL', in which case all parameters are freed. + + Raises: pdffit.unassignedError when parameter has not been assigned + """ + if isinstance(par, six.string_types) and par.upper() in self.selalias: + par = self.selalias[par.upper()] + pdffit2.freepar(self._handle, par) + return + + def setphase(self, ip): + """setphase(ip) --> Switch to phase ip. + + ip -- index of the phase starting at 1. + + All parameters assigned after this method is called refer only to the + current phase. + + Raises: pdffit.unassignedError when phase does not exist + """ + pdffit2.setphase(self._handle, ip) + return + + def setdata(self, iset): + """setdata(iset) --> Set the data set in focus. + + iset -- integer index of data set starting at 1. + + Raises: pdffit.unassignedError when data set does not exist + """ + pdffit2.setdata(self._handle, iset) + return + + def psel(self, ip): + """psel(ip) --> Include phase ip in calculation of total PDF + + psel('ALL') selects all phases for PDF calculation. + + Raises: pdffit2.unassignedError if selected phase does not exist + """ + if isinstance(ip, six.string_types) and ip.upper() in self.selalias: + ip = self.selalias[ip.upper()] + pdffit2.psel(self._handle, ip) + return + + def pdesel(self, ip): + """pdesel(ip) --> Exclude phase ip from calculation of total PDF. + + pdesel('ALL') excludes all phases from PDF calculation. + + Raises: pdffit2.unassignedError if selected phase does not exist + """ + if isinstance(ip, six.string_types) and ip.upper() in self.selalias: + ip = self.selalias[ip.upper()] + pdffit2.pdesel(self._handle, ip) + return + + def selectAtomType(self, ip, ijchar, symbol, flag): + """Configure partial PDF - mark the specified atom type in phase ip + as included or excluded as a first or second in pair for distance + evaluation. + + ip -- phase index starting at 1 + ijchar -- 'i' or 'j' for first or second in pair + symbol -- element symbol + flag -- bool flag, True for selection, False for exclusion + + Raises: + pdffit2.unassignedError if selected phase does not exist + ValueError for invalid value of ijchar + """ + pdffit2.selectAtomType(self._handle, ip, six.b(ijchar), symbol, flag) + return + + def selectAtomIndex(self, ip, ijchar, aidx, flag): + """Configure partial PDF - mark the atom of given index in phase ip + as included or excluded as a first or second in pair for distance + evaluation. + + ip -- phase index starting at 1 + ijchar -- 'i' or 'j' for first or second in pair + aidx -- integer index of atom starting at 1 + flag -- bool flag, True for selection, False for exclusion + + Raises: + pdffit2.unassignedError if selected phase does not exist + ValueError if atom index or ijchar are invalid + """ + pdffit2.selectAtomIndex(self._handle, ip, six.b(ijchar), aidx, flag) + return + + def selectAll(self, ip, ijchar): + """Configure partial PDF - include all atoms of phase ip as first or + second element in pair for distance evaluation. + + ip -- phase index starting at 1 + ijchar -- 'i' or 'j' for first or second in pair + + Raises: + pdffit2.unassignedError if selected phase does not exist + ValueError if ijchar is invalid + """ + pdffit2.selectAll(self._handle, ip, six.b(ijchar)) + return + + def selectNone(self, ip, ijchar): + """Configure partial PDF - exclude all atoms of phase ip from first + or second element of pair distance evaluation. + + ip -- phase index starting at 1 + ijchar -- 'i' or 'j' for first or second in pair + + Raises: + pdffit2.unassignedError if selected phase does not exist + ValueError if ijchar is invalid + """ + pdffit2.selectNone(self._handle, ip, six.b(ijchar)) + return + + def bang(self, i, j, k): + """bang(i, j, k) --> Show bond angle defined by atoms i, j, k. + + No return value. Use bond_angle() to get the result. + + Raises: ValueError if selected atom(s) does not exist + pdffit.unassignedError when no structure has been loaded + """ + angle, stdev = pdffit2.bond_angle(self._handle, i, j, k) + # indices should be already checked here by bond_angle + atom_symbols = self.get_atoms() + leader = " %s (#%i) - %s (#%i) - %s (#%i) = " % ( + atom_symbols[i - 1], + i, + atom_symbols[j - 1], + j, + atom_symbols[k - 1], + k, + ) + s = leader + _format_value_std(angle, stdev) + " degrees" + print(s, file=output.stdout) + return + + def bond_angle(self, i, j, k): + """bond_angle(i, j, k) --> bond angle defined by atoms i, j, k. + Angle is calculated using the shortest ji and jk lengths with + respect to periodic boundary conditions. + + i, j, k -- atom indices starting at 1 + + Return a tuple of (angle, angle_error), both values are in degrees. + + Raises: ValueError if selected atom(s) does not exist + pdffit.unassignedError when no structure has been loaded + """ + rv = pdffit2.bond_angle(self._handle, i, j, k) + return rv + + def blen(self, *args): + """blen(i, j) --> Show bond length defined by atoms i and j. + + i -- index of the first atom starting at 1 + j -- index of the second atom starting at 1 + + No return value. Use bond_length_atoms() to retrieve result. + + Second form: + + blen(a1, a2, lb, ub) --> Show sorted lengths of all a1-a2 bonds. + + a1 -- symbol of the first element in pair or "ALL" + a2 -- symbol of the second element in pair or "ALL" + lb -- lower bond length boundary + ub -- upper bond length boundary + + No return value. Use bond_length_types() to retrieve results. + + Raises: ValueError if selected atom(s) does not exist + pdffit.unassignedError when no structure has been loaded + """ + # first form + if len(args) == 2: + dij, ddij = self.bond_length_atoms(*args[0:2]) + atom_symbols = self.get_atoms() + ij = (args[0], args[1]) + # indices were already checked in bond_length_atoms call + assert (0 <= min(ij) - 1) and (max(ij) - 1 < len(atom_symbols)) + symij = (atom_symbols[ij[0] - 1].upper(), atom_symbols[ij[1] - 1].upper()) + print(_format_bond_length(dij, ddij, ij, symij), file=output.stdout) + # second form + elif len(args) == 4: + a1, a2, lb, ub = args + try: + atom_types = self.get_atom_types() + if isinstance(a1, numbers.Integral): + a1 = atom_types[a1 - 1] + if isinstance(a2, numbers.Integral): + a2 = atom_types[a2 - 1] + except IndexError: + # index of non-existant atom type + return + # arguments are OK here, get bond length dictionary + bld = pdffit2.bond_length_types(self._handle, a1, a2, lb, ub) + s = "(%s,%s) bond lengths in [%gA,%gA] for current phase :" % (a1, a2, lb, ub) + print(s, file=output.stdout) + atom_symbols = self.get_atoms() + npts = len(bld["dij"]) + for idx in range(npts): + dij = bld["dij"][idx] + ddij = bld["ddij"][idx] + ij0 = bld["ij0"][idx] + ij1 = bld["ij1"][idx] + symij = (atom_symbols[ij0[0]], atom_symbols[ij0[1]]) + s = _format_bond_length(dij, ddij, ij1, symij) + print(s, file=output.stdout) + print(file=output.stdout) + if not bld["dij"]: + print(" *** No pairs found ***", file=output.stdout) + else: + emsg = "blen() takes 2 or 4 arguments (%i given)" % len(args) + raise TypeError(emsg) + # done + return + + def bond_length_atoms(self, i, j): + """bond_length_atoms(i, j) --> shortest distance between atoms i, j. + Periodic boundary conditions are applied to find the shortest bond. + + i -- index of the first atom starting at 1 + j -- index of the second atom starting at 1 + + Return a tuple of (distance, distance_error). + + Raises: ValueError if selected atom(s) does not exist + pdffit.unassignedError when no structure has been loaded. + """ + rv = pdffit2.bond_length_atoms(self._handle, i, j) + return rv + + def bond_length_types(self, a1, a2, lb, ub): + """bond_length_types(a1, a2, lb, ub) --> get all a1-a2 distances. + + a1 -- symbol of the first element in pair or "ALL" + a2 -- symbol of the second element in pair or "ALL" + lb -- lower bond length boundary + ub -- upper bond length boundary + + Return a dictionary of distance data containing + + dij : list of bond lenghts within given bounds + ddij : list of bond legnth standard deviations + ij0 : pairs of atom indices starting from 0 + ij1 : pairs of atom indices starting from 1 + + Raises: ValueError if selected atom(s) does not exist + pdffit.unassignedError when no structure has been loaded. + """ + rv = pdffit2.bond_length_types(self._handle, a1, a2, lb, ub) + return rv + + def show_scat(self, stype): + """show_scat(stype) --> Print scattering length for all atoms in + the current phase. + + stype -- 'X' (xray) or 'N' (neutron). + + Raises: pdffit2.unassignedError if no phase exists + """ + print(self.get_scat_string(stype), file=output.stdout) + return + + def get_scat_string(self, stype): + """get_scat_string(stype) --> Get string with scattering factors + of all atoms in the current phase. + + stype -- 'X' (xray) or 'N' (neutron). + + Raises: + pdffit2.unassignedError if no phase exists + + Returns: string with all scattering factors. + """ + return pdffit2.get_scat_string(self._handle, six.b(stype)) + + def get_scat(self, stype, element): + """get_scat(stype, element) --> Get active scattering factor for + given element. If scattering factor has been changed using + set_scat the result may depend on the active phase. When no + phase has been loaded, return the standard value. + + stype -- 'X' (xray) or 'N' (neutron). + element -- case-insensitive element symbol such as "Na" or "CL" + + Return float. + + Raises: + ValueError if element is not known. + """ + rv = pdffit2.get_scat(self._handle, six.b(stype), element) + return rv + + def set_scat(self, stype, element, value): + """set_scat(stype, element, value) --> Set custom scattering factor + for given element. The new scattering factor applies only for the + current phase, in other phases it keeps its default value. + + stype -- 'X' (xray) or 'N' (neutron). + element -- case-insensitive element symbol such as "Na" or "CL" + value -- new value of scattering factor + + No return value. + + Raises: + pdffit2.unassignedError if no phase exists. + ValueError if element is not known. + + See also reset_scat, get_scat. + """ + pdffit2.set_scat(self._handle, six.b(stype), element, value) + return + + def reset_scat(self, element): + """reset_scat(stype, element) --> Reset scattering factors for + given element to their standard values. The reset_scat applies + only for the current phase. + + element -- case-insensitive element symbol such as "Na" or "CL" + Raises: + pdffit2.unassignedError if no phase exists + ValueError if element is not known. + """ + pdffit2.reset_scat(self._handle, element) + return + + def num_atoms(self): + """num_atoms() --> Get number of atoms in current phase. + + Raises: pdffit2.unassignedError if no atoms exist + """ + return pdffit2.num_atoms(self._handle) + + def num_phases(self): + """num_phases() --> Number of phases loaded in PdfFit instance. + + Use setphase to bring a specific phase in focus. + + Return integer. + """ + n = pdffit2.num_phases(self._handle) + return n + + def num_datasets(self): + """num_datasets() --> Number of datasets loaded in PdfFit instance. + + Use setdata to bring a specific dataset in focus. + + Return integer. + """ + n = pdffit2.num_datasets(self._handle) + return n + + def phase_fractions(self): + """phase_fractions() --> relative phase fractions for current dataset. + Convert phase scale factors to relative phase fractions given the + scattering type of current dataset. + + Return a dictionary of phase fractions with following keys: + + "atom" -- list of fractions normalized to atom count + "stdatom" -- errors of atom count fractions + "cell" -- list of fractions normalized to unit cell count + "stdcell" -- errors of unit cell count fractions + "mass" -- list of relative weight fractions + "stdmass" -- errors of relative weight fractions + + Raises: pdffit2.unassignedError if no dataset exists. + """ + return pdffit2.phase_fractions(self._handle) + + # Begin refinable variables. + + def lat(n): + """lat(n) --> Get reference to lattice variable n. + + n can be an integer or a string representing the lattice variable. + 1 <==> 'a' + 2 <==> 'b' + 3 <==> 'c' + 4 <==> 'alpha' + 5 <==> 'beta' + 6 <==> 'gamma' + """ + LatParams = {"a": 1, "b": 2, "c": 3, "alpha": 4, "beta": 5, "gamma": 6} + if isinstance(n, six.string_types): + n = LatParams[n] + return "lat(%i)" % n + + lat = staticmethod(lat) + + def x(i): + """x(i) --> Get reference to x-value of atom i.""" + return "x(%i)" % i + + x = staticmethod(x) + + def y(i): + """y(i) --> Get reference to y-value of atom i.""" + return "y(%i)" % i + + y = staticmethod(y) + + def z(i): + """z(i) --> Get reference to z-value of atom i.""" + return "z(%i)" % i + + z = staticmethod(z) + + def u11(i): + """u11(i) --> Get reference to U(1,1) for atom i. + + U is the anisotropic thermal factor tensor. + """ + return "u11(%i)" % i + + u11 = staticmethod(u11) + + def u22(i): + """u22(i) --> Get reference to U(2,2) for atom i. + + U is the anisotropic thermal factor tensor. + """ + return "u22(%i)" % i + + u22 = staticmethod(u22) + + def u33(i): + """u33(i) --> Get reference to U(3,3) for atom i. + + U is the anisotropic thermal factor tensor. + """ + return "u33(%i)" % i + + u33 = staticmethod(u33) + + def u12(i): + """u12(i) --> Get reference to U(1,2) for atom i. + + U is the anisotropic thermal factor tensor. + """ + return "u12(%i)" % i + + u12 = staticmethod(u12) + + def u13(i): + """u13(i) --> Get reference to U(1,3) for atom i. + + U is the anisotropic thermal factor tensor. + """ + return "u13(%i)" % i + + u13 = staticmethod(u13) + + def u23(i): + """u23(i) --> Get reference to U(2,3) for atom i. + + U is the anisotropic thermal factor tensor. + """ + return "u23(%i)" % i + + u23 = staticmethod(u23) + + def occ(i): + """occ(i) --> Get reference to occupancy of atom i.""" + return "occ(%i)" % i + + occ = staticmethod(occ) + + def pscale(): + """pscale() --> Get reference to pscale. + + pscale is the fraction of the total structure that the current phase + represents. + """ + return "pscale" + + pscale = staticmethod(pscale) + + def sratio(): + """sratio() --> Get reference to sigma ratio. + + The sigma ratio determines the reduction in the Debye-Waller factor for + distances below rcut. + """ + return "sratio" + + sratio = staticmethod(sratio) + + def delta1(): + """delta1() --> Get reference to 1/R peak sharpening factor.""" + return "delta1" + + delta1 = staticmethod(delta1) + + def delta2(): + """delta2() --> Reference to (1/R^2) sharpening factor. + The phenomenological correlation constant in the Debye-Waller factor. + The (1/R^2) peak sharpening factor. + """ + return "delta2" + + delta2 = staticmethod(delta2) + + def dscale(): + """dscale() --> Get reference to dscale. + + The data scale factor. + """ + return "dscale" + + dscale = staticmethod(dscale) + + def qdamp(): + """qdamp() --> Get reference to qdamp. + + Qdamp controls PDF damping due to instrument Q-resolution. + """ + return "qdamp" + + qdamp = staticmethod(qdamp) + + def qbroad(): + """qbroad() --> Get reference to qbroad. + + Quadratic peak broadening factor. + """ + return "qbroad" + + qbroad = staticmethod(qbroad) + + def spdiameter(): + """spdiameter() --> Get reference to spdiameter (phase property). + + Diameter value for the spherical particle PDF correction. + Spherical envelope is not applied when spdiameter equals 0. + """ + return "spdiameter" + + spdiameter = staticmethod(spdiameter) + + def stepcut(): + """stepcut() --> Get reference to stepcut (phase property). + + stepcut is cutoff radius for empirical step-function PDF envelope. + stepcut can be used to approximate loss of pair correlations + in amorphous phase. stepcut cannot be refined. + + Step cutoff is not applied when stepcut equals 0. + """ + return "stepcut" + + stepcut = staticmethod(stepcut) + + def rcut(): + """rcut() --> Get reference to rcut. + + rcut is the value of r below which peak sharpening, defined by + the sigma ratio (sratio), applies. rcut cannot be refined. + """ + return "rcut" + + rcut = staticmethod(rcut) + + # End refinable variables. + + def __init__(self): + + self.stru_files = [] + self.data_files = [] + + self._handle = pdffit2.create() + self.intro() + return + + def __getRef(self, var_string): + """Return the actual reference to the variable in the var_string. + + This function must be called before trying to actually reference an + internal variable. See the constrain method for an example. + + Raises: + pdffit2.unassignedError if variable is not yet assigned + ValueError if variable index does not exist (e.g. lat(7)) + """ + var_string = _convertCallable(var_string) + arg_int = None + try: + method_string, arg_string = var_string.split("(") + method_string = method_string.strip() + arg_int = int(arg_string.strip(")").strip()) + except ValueError: # There is no arg_string + method_string = var_string.strip() + + f = getattr(pdffit2, method_string) + if arg_int is None: + retval = f(self._handle) + else: + retval = f(self._handle, arg_int) + return retval + + +# End of class PdfFit + + +# End of file diff --git a/src/diffpy/pdffit2/tests/ExceptionsTest.py b/src/diffpy/pdffit2/tests/ExceptionsTest.py new file mode 100644 index 00000000..5dee1b75 --- /dev/null +++ b/src/diffpy/pdffit2/tests/ExceptionsTest.py @@ -0,0 +1,794 @@ +#!/usr/bin/env python +############################################################################## +# +# pdffit2 by DANSE Diffraction group +# Simon J. L. Billinge +# (c) 2006 trustees of the Michigan State University. +# All rights reserved. +# +# File coded by: Chris Farrow +# +# See AUTHORS.txt for a list of people who contributed. +# See LICENSE.txt for license information. +# +############################################################################## + + +import unittest + +from diffpy.pdffit2 import PdfFit, pdffit2 +from diffpy.pdffit2.tests.pdffit2testutils import datafile + + +class read_structExceptions(unittest.TestCase): + def setUp(self): + self.P = PdfFit() + + def tearDown(self): + del self.P + + def test_IOError(self): + """raise IOError when structure file does not exist""" + self.assertRaises(IOError, self.P.read_struct, "Nofile.stru") + + def test_structureError(self): + """raise pdffit2.structureError when structure is malformed""" + self.assertRaises(pdffit2.structureError, self.P.read_struct, datafile("badNi.stru")) + + def test_structureErrorZeroVolume(self): + """raise pdffit2.structureError when unit cell volume is negative""" + # I don't know how to test for this, but it's in the library code + self.assertRaises(pdffit2.structureError, self.P.read_struct, datafile("badNiZeroVolume.stru")) + + +class read_dataExceptions(unittest.TestCase): + def setUp(self): + self.P = PdfFit() + + def tearDown(self): + del self.P + + def test_IOError(self): + """raise IOError when data file does not exist""" + self.assertRaises(IOError, self.P.read_data, "Nofile.dat", "X", 25.0, 0.5) + + def test_dataError(self): + """raise pdffit2.dataError when data has improper spacing""" + self.assertRaises(pdffit2.dataError, self.P.read_data, datafile("badNi.dat"), "X", 25.0, 0.5) + + +class read_data_listsExceptions(unittest.TestCase): + def setUp(self): + self.P = PdfFit() + self.r_data = [0.1, 0.2] + self.Gr_data = [1, 2, 3] + self.qmax = 10 + self.qdamp = 0.5 + + def tearDown(self): + del self.P + + def test_ValueError1(self): + """raise ValueError when lists are of different length""" + self.assertRaises( + ValueError, self.P.read_data_lists, "X", self.qmax, self.qdamp, self.r_data, self.Gr_data + ) + + def test_ValueError2(self): + """raise ValueError when qmax < 0""" + self.assertRaises( + ValueError, self.P.read_data_lists, "X", -self.qmax, self.qdamp, self.r_data, self.Gr_data + ) + + def test_ValueError3(self): + """raise ValueError when qdamp < 0""" + self.assertRaises( + ValueError, self.P.read_data_lists, "X", self.qmax, -self.qdamp, self.r_data, self.Gr_data + ) + + def test_dataError(self): + """raise pdffit2.dataError when data has improper spacing""" + r_data = [0.1, 0.52, 0.2] + self.assertRaises( + pdffit2.dataError, self.P.read_data_lists, "X", self.qmax, self.qdamp, r_data, self.Gr_data + ) + + +class pdfrangeExceptions(unittest.TestCase): + def setUp(self): + self.P = PdfFit() + self.iset = 1 + self.rmin = 4.0 + self.rmax = 10.0 + + def tearDown(self): + del self.P + + def test_ValueError1(self): + """raise ValueError when iset does not exist""" + self.assertRaises(ValueError, self.P.pdfrange, self.iset, self.rmin, self.rmax) + + def test_ValueError2(self): + """raise ValueError when rmax < rmin""" + self.P.read_data(datafile("Ni.dat"), "X", 25.0, 0.5) + self.assertRaises(ValueError, self.P.pdfrange, self.iset, self.rmax, self.rmin) + + def test_ValueError3(self): + """raise ValueError when range outside of data""" + self.P.read_data(datafile("Ni.dat"), "X", 25.0, 0.5) + self.assertRaises(ValueError, self.P.pdfrange, self.iset, -self.rmin, self.rmax) + + +class allocExceptions(unittest.TestCase): + def setUp(self): + self.P = PdfFit() + self.qmax = 25 + self.qdamp = 0.5 + self.rmin = 4.0 + self.rmax = 10.0 + self.bin = 100 + + def tearDown(self): + del self.P + + def test_ValueError1(self): + """raise ValueError when qmax < 0""" + self.P.read_struct(datafile("Ni.stru")) + self.assertRaises(ValueError, self.P.alloc, "X", -self.qmax, self.qdamp, self.rmin, self.rmax, self.bin) + + def test_ValueError2(self): + """raise ValueError when qdamp < 0""" + self.P.read_struct(datafile("Ni.stru")) + self.assertRaises(ValueError, self.P.alloc, "X", self.qmax, -self.qdamp, self.rmin, self.rmax, self.bin) + + def test_ValueError3(self): + """raise ValueError when rmin < 0""" + self.P.read_struct(datafile("Ni.stru")) + self.assertRaises(ValueError, self.P.alloc, "X", self.qmax, self.qdamp, -self.rmin, self.rmax, self.bin) + + def test_ValueError4(self): + """raise ValueError when rmax < 0""" + self.P.read_struct(datafile("Ni.stru")) + self.assertRaises(ValueError, self.P.alloc, "X", self.qmax, self.qdamp, self.rmin, -self.rmax, self.bin) + + def test_ValueError5(self): + """raise ValueError when bin < 0""" + self.P.read_struct(datafile("Ni.stru")) + self.assertRaises(ValueError, self.P.alloc, "X", self.qmax, self.qdamp, self.rmin, self.rmax, -self.bin) + + def test_ValueError6(self): + """raise ValueError when rmax < rmin""" + self.P.read_struct(datafile("Ni.stru")) + self.assertRaises(ValueError, self.P.alloc, "X", self.qmax, self.qdamp, self.rmax, self.rmin, self.bin) + + def test_ValueError7(self): + """raise ValueError when qdamp < 0""" + self.P.read_struct(datafile("Ni.stru")) + self.assertRaises(ValueError, self.P.alloc, "X", self.qmax, self.qdamp, self.rmin, self.rmax, -self.bin) + + +class calcExceptions(unittest.TestCase): + def setUp(self): + self.P = PdfFit() + self.P.read_struct(datafile("Ni.stru")) + + def tearDown(self): + del self.P + + def test_unassignedError(self): + """raise pdffit2.unassignedError when no space has been allocated""" + self.assertRaises(pdffit2.unassignedError, self.P.calc) + + +# PJ 2006-03-06 +# +# test_calculationError raised exception, because for Qmax=0.5, rmax would +# increase to 4010A and this would throw exception when the size of bnd array +# would exceed MAXBND limit. However, bnd vector can now grow, thus rmax +# is not limited and the following test would hang indefinitely. + +# def test_calculationError(self): +# """raise pdffit2.calculationError when calculation cannot be done""" +# self.P.alloc('X', 0.01, 0.5, 2, 10, 100) +# self.assertRaises(pdffit2.calculationError, self.P.calc) + + +# class refineExceptions(unittest.TestCase): +# I'm not sure how to test these + +# def setUp(self): +# self.P = PdfFit() +# +# def test_calculationError(self): +# """raise pdffit2.calculationError when model pdf can't be calculated""" +# #self.assertRaises(pdffit2.calculationError, self.P.calc) +# +# def test_constraintError(self): +# """raise pdffit2.constraintError for bad constraint(s)""" +# #self.assertRaises(pdffit2.constraintError, self.P.calc) + + +# class refine_stepExceptions(unittest.TestCase): +# I'm not sure how to test these + +# def setUp(self): +# self.P = PdfFit() +# +# def test_calculationError(self): +# """raise pdffit2.calculationError when model pdf can't be calculated""" +# #self.assertRaises(pdffit2.calculationError, self.P.calc) +# +# def test_constraintError(self): +# """raise pdffit2.constraintError for bad constraint(s)""" +# #self.assertRaises(pdffit2.constraintError, self.P.calc) + + +class save_pdfExceptions(unittest.TestCase): + def setUp(self): + self.P = PdfFit() + self.strufile = "temp.pdf" + + def tearDown(self): + del self.P + + def test_IOError(self): + """raise IOError when structure cannot be saved""" + self.P.read_struct(datafile("Ni.stru")) + self.P.alloc("X", 30.0, 0.05, 2, 10, 100) + self.P.calc() + self.assertRaises(IOError, self.P.save_pdf, 1, "nodir183160/" + self.strufile) + + def test_unassignedError(self): + """raise pdffit2.unassignedError when structure is undefined""" + self.assertRaises(pdffit2.unassignedError, self.P.save_pdf, 1, self.strufile) + + +class save_difExceptions(unittest.TestCase): + def setUp(self): + self.P = PdfFit() + self.strufile = "temp.dif" + + def tearDown(self): + del self.P + + def test_IOError(self): + """raise IOError when dif cannot be saved""" + self.P.read_struct(datafile("Ni.stru")) + self.P.alloc("X", 30.0, 0.05, 2, 10, 100) + self.P.calc() + self.P.read_data(datafile("Ni.dat"), "X", 25.0, 0.5) + self.assertRaises(IOError, self.P.save_dif, 1, "nodir183160/" + self.strufile) + + def test_unassignedError(self): + """raise pdffit2.unassignedError when structure is undefined""" + self.assertRaises(pdffit2.unassignedError, self.P.save_dif, 1, self.strufile) + + +class save_resExceptions(unittest.TestCase): + def setUp(self): + self.P = PdfFit() + self.resfile = "temp.res" + + def tearDown(self): + del self.P + + def test_IOError(self): + """raise IOError when residual file cannot be saved""" + self.P.read_struct(datafile("Ni.stru")) + self.P.read_data(datafile("Ni.dat"), "X", 30.0, 0.0) + self.P.constrain(self.P.lat(1), 1) + self.P.setpar(1, 3.0) + self.P.pdfrange(1, 2.0, 10.0) + self.P.refine_step() + self.assertRaises(IOError, self.P.save_res, "nodir183160/" + self.resfile) + + def test_unassignedError(self): + """raise pdffit2.unassignedError when structure is undefined""" + self.assertRaises(pdffit2.unassignedError, self.P.save_res, self.resfile) + + +class save_structExceptions(unittest.TestCase): + # Same code as show_struct + + def setUp(self): + self.P = PdfFit() + self.strufile = "temp.stru" + + def tearDown(self): + del self.P + + def test_IOError(self): + """raise IOError when structure cannot be saved""" + self.P.read_struct(datafile("Ni.stru")) + self.assertRaises(IOError, self.P.save_struct, 1, "nodir183160/" + self.strufile) + + def test_unassignedError(self): + """raise pdffit2.unassignedError when structure is undefined""" + self.assertRaises(pdffit2.unassignedError, self.P.save_struct, 1, self.strufile) + + +class constrainExceptions(unittest.TestCase): + def setUp(self): + self.P = PdfFit() + self.par = 1 + return + + def tearDown(self): + self.P = None + return + + def test_constraintError(self): + """raise constraintError when constraint is bad""" + self.P.read_struct(datafile("Ni.stru")) + self.P.read_data(datafile("Ni.dat"), "X", 25.0, 0.0) + self.P.constrain("x(1)", "junk+@1") + self.P.setpar(1, 0.01) + self.assertRaises(pdffit2.constraintError, self.P.calc) + self.assertRaises(pdffit2.constraintError, self.P.refine) + return + + def test_unassignedError(self): + """raise pdffit2.unassignedError when variable is undefined""" + self.assertRaises(pdffit2.unassignedError, self.P.constrain, self.P.x(1), self.par) + return + + def test_ValueError(self): + """raise ValueError when a variable index does not exist""" + self.P.read_struct(datafile("Ni.stru")) + self.assertRaises(ValueError, self.P.constrain, self.P.x(6), self.par) + return + + def test_constrainNonRefVar(self): + "raise constraintError when attempting to constrain non-refinables" + self.P.read_struct(datafile("Ni.stru")) + self.P.read_data(datafile("Ni.dat"), "X", 25.0, 0.0) + self.assertRaises(pdffit2.constraintError, self.P.constrain, "rcut", "@7") + self.assertRaises(pdffit2.constraintError, self.P.constrain, "rcut", 13) + self.assertRaises(pdffit2.constraintError, self.P.constrain, "stepcut", "@17") + return + + +class setvarExceptions(unittest.TestCase): + def setUp(self): + self.P = PdfFit() + self.val = 3.0 + + def tearDown(self): + del self.P + + def test_unassignedError(self): + """raise pdffit2.unassignedError when variable is undefined""" + self.assertRaises(pdffit2.unassignedError, self.P.setvar, self.P.lat(1), self.val) + + def test_ValueError(self): + """raise ValueError when a variable index does not exist""" + self.P.read_struct(datafile("Ni.stru")) + self.assertRaises(ValueError, self.P.setvar, self.P.lat(7), self.val) + + +class getvarExceptions(unittest.TestCase): + def setUp(self): + self.P = PdfFit() + + def tearDown(self): + del self.P + + def test_unassignedError(self): + """raise pdffit2.unassignedError when variable is undefined""" + self.assertRaises(pdffit2.unassignedError, self.P.getvar, self.P.pscale()) + + def test_ValueError(self): + """raise ValueError when a variable index does not exist""" + self.P.read_struct(datafile("Ni.stru")) + self.assertRaises(ValueError, self.P.getvar, self.P.lat(7)) + + +class getRExceptions(unittest.TestCase): + def setUp(self): + self.P = PdfFit() + + def tearDown(self): + del self.P + + def test_unassignedError(self): + """raise pdffit2.unassignedError when data does not exist""" + self.assertRaises(pdffit2.unassignedError, self.P.getR) + + +class getpdf_fitExceptions(unittest.TestCase): + def setUp(self): + self.P = PdfFit() + + def tearDown(self): + del self.P + + def test_unassignedError(self): + """raise pdffit2.unassignedError when data does not exist""" + self.assertRaises(pdffit2.unassignedError, self.P.getpdf_fit) + + +class getpdf_obsExceptions(unittest.TestCase): + def setUp(self): + self.P = PdfFit() + + def tearDown(self): + del self.P + + def test_unassignedError(self): + """raise pdffit2.unassignedError when data does not exist""" + self.assertRaises(pdffit2.unassignedError, self.P.getpdf_obs) + + +class getpdf_diffExceptions(unittest.TestCase): + def setUp(self): + self.P = PdfFit() + + def tearDown(self): + del self.P + + def test_unassignedError(self): + """raise pdffit2.unassignedError when data does not exist""" + self.assertRaises(pdffit2.unassignedError, self.P.getpdf_diff) + + +class get_atomsExceptions(unittest.TestCase): + def setUp(self): + self.P = PdfFit() + + def tearDown(self): + del self.P + + def test_unassignedError(self): + """raise pdffit2.unassignedError when data does not exist""" + self.assertRaises(pdffit2.unassignedError, self.P.get_atoms) + + +class getparExceptions(unittest.TestCase): + def setUp(self): + self.P = PdfFit() + + def tearDown(self): + del self.P + + def test_unassignedError1(self): + """raise pdffit2.unassignedError when parameter does not exist""" + self.assertRaises(pdffit2.unassignedError, self.P.getpar, 1) + + def test_unassignedError2(self): + """raise pdffit2.unassignedError when parameter does not exist""" + self.P.read_struct(datafile("Ni.stru")) + self.P.constrain(self.P.lat(1), 2) + self.assertRaises(pdffit2.unassignedError, self.P.getpar, 1) + + +class pselExceptions(unittest.TestCase): + def setUp(self): + self.P = PdfFit() + self.ip = 1 + + def tearDown(self): + del self.P + + def test_unassignedError(self): + """raise pdffit2.unassignedError when phase does not exist""" + self.assertRaises(pdffit2.unassignedError, self.P.pdesel, self.ip) + + def test_unassignedError2(self): + """raise pdffit2.unassignedError when phase does not exist""" + self.assertRaises(pdffit2.unassignedError, self.P.pdesel, self.ip) + + +class pdeselExceptions(unittest.TestCase): + def setUp(self): + self.P = PdfFit() + self.ip = 1 + + def tearDown(self): + del self.P + + def test_unassignedError1(self): + """raise pdffit2.unassignedError when phase does not exist""" + self.assertRaises(pdffit2.unassignedError, self.P.pdesel, self.ip) + + def test_unassignedError2(self): + """raise pdffit2.unassignedError when phase does not exist""" + self.P.read_struct(datafile("Ni.stru")) + self.assertRaises(pdffit2.unassignedError, self.P.pdesel, self.ip) + + +class selectAtomTypeExceptions(unittest.TestCase): + def setUp(self): + self.P = PdfFit() + self.iset = 1 + self.i = 1 + + def tearDown(self): + del self.P + + def test_unassignedError1(self): + """raise pdffit2.unassignedError when set does not exist""" + self.assertRaises(pdffit2.unassignedError, self.P.selectAtomType, self.iset, "i", "Ni", True) + + def test_unassignedError2(self): + """raise pdffit2.unassignedError when set does not exist""" + self.P.read_struct(datafile("Ni.stru")) + # selectAtomType should pass with one phase defined + self.P.read_data(datafile("Ni.dat"), "X", 25.0, 0.0) + self.P.selectAtomType(self.iset, "i", "Ni", True) + self.P.selectAtomType(self.iset, "j", "Ni", False) + # but fail for phase 2 which is not present + self.assertRaises(pdffit2.unassignedError, self.P.selectAtomType, 2, "i", "Ca", True) + + def test_ijcharValueError(self): + """raise ValueError when ijchar is neither 'i' nor 'j'""" + self.P.read_struct(datafile("Ni.stru")) + self.P.read_data(datafile("Ni.dat"), "X", 25.0, 0.0) + self.P.selectAtomType(self.iset, "i", "Ni", True) + self.P.selectAtomType(self.iset, "j", "Ni", True) + self.assertRaises(ValueError, self.P.selectAtomType, self.iset, "k", "Ni", True) + + +class selectAtomIndexExceptions(unittest.TestCase): + def setUp(self): + self.P = PdfFit() + self.iset = 1 + self.i = 1 + + def tearDown(self): + del self.P + + def test_unassignedError1(self): + """raise pdffit2.unassignedError when set does not exist""" + self.assertRaises(pdffit2.unassignedError, self.P.selectAtomIndex, self.iset, "i", self.i, True) + + def test_unassignedError2(self): + """raise pdffit2.unassignedError when set does not exist""" + self.P.read_struct(datafile("Ni.stru")) + # pass for phase 1 + self.P.read_data(datafile("Ni.dat"), "X", 25.0, 0.0) + self.P.selectAtomIndex(self.iset, "i", 1, True) + self.P.selectAtomIndex(self.iset, "i", 2, False) + # fail for phase 2 + self.assertRaises(pdffit2.unassignedError, self.P.selectAtomIndex, 2, "i", 1, True) + + def test_ValueError(self): + """raise ValueError when selected atom does not exist""" + self.P.read_struct(datafile("Ni.stru")) + self.P.read_data(datafile("Ni.dat"), "X", 25.0, 0.0) + self.assertRaises(ValueError, self.P.selectAtomIndex, self.iset, "i", 6, True) + + +class selectAllExceptions(unittest.TestCase): + def setUp(self): + self.P = PdfFit() + self.iset = 1 + self.i = 1 + + def tearDown(self): + del self.P + + def test_unassignedError1(self): + """raise pdffit2.unassignedError when set does not exist""" + self.assertRaises(pdffit2.unassignedError, self.P.selectAll, self.iset, "i") + + def test_unassignedError2(self): + """raise pdffit2.unassignedError when set does not exist""" + self.P.read_struct(datafile("Ni.stru")) + # fail when there is no dataset + self.assertRaises(pdffit2.unassignedError, self.P.selectAll, self.iset, "i") + # pass with dataset + self.P.read_data(datafile("Ni.dat"), "X", 25.0, 0.0) + self.P.selectAll(self.iset, "i") + self.P.selectAll(self.iset, "j") + # fail for phase 2 + self.assertRaises(pdffit2.unassignedError, self.P.selectAll, 2, "i") + self.assertRaises(pdffit2.unassignedError, self.P.selectAll, 2, "j") + + +class selectNoneExceptions(unittest.TestCase): + def setUp(self): + self.P = PdfFit() + self.iset = 1 + self.i = 1 + + def tearDown(self): + del self.P + + def test_unassignedError1(self): + """raise pdffit2.unassignedError when set does not exist""" + self.assertRaises(pdffit2.unassignedError, self.P.selectNone, self.iset, "i") + + def test_unassignedError2(self): + """raise pdffit2.unassignedError when set does not exist""" + self.P.read_struct(datafile("Ni.stru")) + # fail when there is no dataset + self.assertRaises(pdffit2.unassignedError, self.P.selectNone, self.iset, "i") + # pass with dataset + self.P.read_data(datafile("Ni.dat"), "X", 25.0, 0.0) + self.P.selectNone(self.iset, "i") + self.P.selectNone(self.iset, "j") + # fail for phase 2 + self.assertRaises(pdffit2.unassignedError, self.P.selectNone, 2, "i") + self.assertRaises(pdffit2.unassignedError, self.P.selectNone, 2, "j") + + +class bangExceptions(unittest.TestCase): + def setUp(self): + self.P = PdfFit() + self.a1 = 1 + self.a2 = 2 + self.a3 = 3 + + def tearDown(self): + del self.P + + def test_unassignedError(self): + """raise pdffit2.unassignedError when phase does not exist""" + self.assertRaises(pdffit2.unassignedError, self.P.bang, self.a1, self.a2, self.a3) + + def test_ValueError1(self): + """raise ValueError when selected atom(s) does not exist""" + self.P.read_struct(datafile("Ni.stru")) + self.P.read_data(datafile("Ni.dat"), "X", 25.0, 0.0) + self.assertRaises(ValueError, self.P.bang, 0, self.a2, self.a3) + + def test_ValueError2(self): + """raise ValueError when selected atom(s) does not exist""" + self.P.read_struct(datafile("Ni.stru")) + self.assertRaises(ValueError, self.P.bang, self.a1, -1, self.a3) + + def test_ValueError3(self): + """raise ValueError when selected atom(s) does not exist""" + self.P.read_struct(datafile("Ni.stru")) + self.assertRaises(ValueError, self.P.bang, self.a1, self.a2, 6) + + +class blenExceptions(unittest.TestCase): + def setUp(self): + self.P = PdfFit() + self.a1 = 1 + self.a2 = 2 + + def tearDown(self): + del self.P + + def test_unassignedError(self): + """raise pdffit2.unassignedError when no data exists""" + self.assertRaises(pdffit2.unassignedError, self.P.blen, self.a1, self.a2) + + def test_ValueError1(self): + """raise ValueError when selected atom(s) does not exist""" + self.P.read_struct(datafile("Ni.stru")) + self.assertRaises(ValueError, self.P.blen, 0, self.a2) + + def test_ValueError2(self): + """raise ValueError when selected atom(s) does not exist""" + self.P.read_struct(datafile("Ni.stru")) + self.assertRaises(ValueError, self.P.blen, self.a1, 6) + + def test_ValueError3(self): + """raise ValueError when selected atom(s) does not exist""" + self.P.read_struct(datafile("Ni.stru")) + self.assertRaises(ValueError, self.P.blen, 0, 6) + + +class show_scatExceptions(unittest.TestCase): + def setUp(self): + self.P = PdfFit() + + def tearDown(self): + del self.P + + def test_unassignedError(self): + """raise pdffit2.unassignedError when phase does not exist""" + self.assertRaises(pdffit2.unassignedError, self.P.show_scat, "X") + + +# class set_scatExceptions(unittest.TestCase): +# I'm not sure how to use this function + +# def setUp(self): +# self.P = PdfFit() +# +# def test_unassignedError1(self): +# """raise pdffit2.unassignedError when phase does not exist""" +# #self.assertRaises(pdffit2.constraintError, self.P.calc) +# +# def test_unassignedError2(self): +# """raise pdffit2.unassignedError when phase does not exist""" +# #self.assertRaises(pdffit2.constraintError, self.P.calc) +# +# def test_ValueError(self): +# """raise pdffit2.unassignedError when selected atom does not exist""" +# #self.assertRaises(pdffit2.constraintError, self.P.calc) + + +class num_atomsExceptions(unittest.TestCase): + def setUp(self): + self.P = PdfFit() + + def tearDown(self): + del self.P + + def test_unassignedError(self): + """raise pdffit2.unassignedError when no atoms exist""" + self.assertRaises(pdffit2.unassignedError, self.P.num_atoms) + + +class fixparExceptions(unittest.TestCase): + def setUp(self): + self.P = PdfFit() + + def tearDown(self): + del self.P + + def test_unassignedError(self): + """raise pdffit2.unassignedError when parameter does not exist""" + self.P.read_struct(datafile("Ni.stru")) + self.P.read_data(datafile("Ni.dat"), "X", 25.0, 0.0) + self.assertRaises(pdffit2.unassignedError, self.P.fixpar, 1) + + +class freeparExceptions(unittest.TestCase): + def setUp(self): + self.P = PdfFit() + + def tearDown(self): + del self.P + + def test_unassignedError(self): + """raise pdffit2.unassignedError when parameter does not exist""" + self.P.read_struct(datafile("Ni.stru")) + self.P.read_data(datafile("Ni.dat"), "X", 25.0, 0.0) + self.assertRaises(pdffit2.unassignedError, self.P.freepar, 1) + + +class setphaseExceptions(unittest.TestCase): + def setUp(self): + self.P = PdfFit() + + def tearDown(self): + del self.P + + def test_unassignedError(self): + """raise pdffit2.unassignedError when phase does not exist""" + self.P.read_struct(datafile("Ni.stru")) + self.P.read_data(datafile("Ni.dat"), "X", 25.0, 0.0) + self.assertRaises(pdffit2.unassignedError, self.P.setphase, 2) + + +class setdataExceptions(unittest.TestCase): + def setUp(self): + self.P = PdfFit() + + def tearDown(self): + del self.P + + def test_unassignedError(self): + """raise pdffit2.unassignedError when data set does not exist""" + self.P.read_struct(datafile("Ni.stru")) + self.P.read_data(datafile("Ni.dat"), "X", 25.0, 0.0) + self.assertRaises(pdffit2.unassignedError, self.P.setdata, 2) + + +class getcrwExceptions(unittest.TestCase): + def setUp(self): + self.P = PdfFit() + + def tearDown(self): + del self.P + + def test_unassignedError(self): + """raise pdffit2.unassignedError when data does not exist""" + self.assertRaises(pdffit2.unassignedError, self.P.getcrw) + + +# main +if __name__ == "__main__": + # suite = unittest.makeSuite(num_atomsExceptions) + # unittest.TextTestRunner(verbosity=3).run(suite) + # testcase = calcExceptions('test_unassignedError') + # unittest.TextTestRunner(verbosity=3).run(testcase) + unittest.main() + +# End of file diff --git a/src/diffpy/pdffit2/tests/TestPdfFit.py b/src/diffpy/pdffit2/tests/TestPdfFit.py new file mode 100644 index 00000000..70712356 --- /dev/null +++ b/src/diffpy/pdffit2/tests/TestPdfFit.py @@ -0,0 +1,761 @@ +#!/usr/bin/env python + +"""Unit tests for PdfFit.py +""" + +import unittest + +from diffpy.pdffit2 import PdfFit, pdffit2 +from diffpy.pdffit2.tests.pdffit2testutils import capture_output, datafile +from diffpy.structure import loadStructure + +# ---------------------------------------------------------------------------- + + +class TestPdfFit(unittest.TestCase): + places = 6 + + def setUp(self): + self.P = PdfFit() + return + + def tearDown(self): + del self.P + return + + def test__exportAll(self): + "check PdfFit._exportAll()" + ns = {} + self.P._exportAll(ns) + self.assertEqual("ALL", ns["ALL"]) + self.assertEqual("FSQR", ns["FSQR"]) + self.assertEqual("N", ns["N"]) + self.assertIs("N", ns["N"]) + self.assertIs(self.P.lat, ns["lat"]) + self.assertEqual(self.P.reset, ns["reset"]) + return + + # def test_intro(self): + # """check PdfFit.intro() + # """ + # return + + def test_add_structure(self): + """check PdfFit.add_structure()""" + ni = loadStructure(datafile("Ni.stru")) + self.P.add_structure(ni) + self.assertEqual(4, self.P.num_atoms()) + return + + # def test_read_struct(self): + # """check PdfFit.read_struct() + # """ + # return + # + # def test_read_struct_string(self): + # """check PdfFit.read_struct_string() + # """ + # return + # + # def test_read_data(self): + # """check PdfFit.read_data() + # """ + # return + + def test_read_data_string(self): + """check PdfFit.read_data_string()""" + pf = self.P + with open(datafile("300K.gr")) as fp: + s = fp.read() + self.assertEqual([], pf.data_files) + pf.read_data_string(s, "N", 32, 0.03, "lmo") + self.assertEqual(1, len(pf.data_files)) + gobs = pf.getpdf_obs() + self.assertEqual(2000, len(gobs)) + self.assertEqual(0.384, gobs[-1]) + self.assertEqual(0.03, pf.getvar("qdamp")) + return + + # def test_read_data_lists(self): + # """check PdfFit.read_data_lists() + # """ + # return + # + # def test_pdfrange(self): + # """check PdfFit.pdfrange() + # """ + # return + # + # def test_reset(self): + # """check PdfFit.reset() + # """ + # return + + def test_alloc(self): + """check PdfFit.alloc()""" + # alloc and read_struct can be called in any order. + self.P.alloc("X", 25, 0.0, 0.01, 10, 1000) + # without a structure calculated PDF is all zero + self.P.calc() + Gzero = self.P.getpdf_fit() + self.assertEqual(1000 * [0.0], Gzero) + self.P.read_struct(datafile("Ni.stru")) + self.P.calc() + # check r-values + r = self.P.getR() + self.assertEqual(1000, len(r)) + for i in range(1000): + self.assertAlmostEqual(0.01 * (i + 1), r[i], self.places) + Gfit_alloc_read = self.P.getpdf_fit() + # now try the other order + self.P.reset() + self.P.read_struct(datafile("Ni.stru")) + self.P.alloc("X", 25, 0.0, 0.01, 10, 1000) + self.P.calc() + Gfit_read_alloc = self.P.getpdf_fit() + # and they should be the same + self.assertEqual(Gfit_read_alloc, Gfit_alloc_read) + return + + # def test_calc(self): + # """check PdfFit.calc() + # """ + # return + # + # def test_refine(self): + # """check PdfFit.refine() + # """ + # return + # + # def test_refine_step(self): + # """check PdfFit.refine_step() + # """ + # return + # + # def test_save_pdf(self): + # """check PdfFit.save_pdf() + # """ + # return + # + # def test_save_pdf_string(self): + # """check PdfFit.save_pdf_string() + # """ + # return + # + # def test_save_dif(self): + # """check PdfFit.save_dif() + # """ + # return + # + # def test_save_dif_string(self): + # """check PdfFit.save_dif_string() + # """ + # return + # + # def test_save_res(self): + # """check PdfFit.save_res() + # """ + # return + # + # def test_save_res_string(self): + # """check PdfFit.save_res_string() + # """ + # return + + def test_get_structure(self): + """check PdfFit.get_structure()""" + self.P.read_struct(datafile("Ni.stru")) + self.P.read_struct(datafile("PbScW25TiO3.stru")) + stru1 = self.P.get_structure(1) + self.assertEqual(4, len(stru1)) + self.assertEqual("Ni", stru1[0].element) + stru2 = self.P.get_structure(2) + self.assertEqual(56, len(stru2)) + self.assertEqual("Ti", stru2[-1].element) + return + + # def test_save_struct(self): + # """check PdfFit.save_struct() + # """ + # return + # + # def test_save_struct_string(self): + # """check PdfFit.save_struct_string() + # """ + # return + # + # def test_show_struct(self): + # """check PdfFit.show_struct() + # """ + # return + # + # def test_constrain(self): + # """check PdfFit.constrain() + # """ + # return + + def test_setpar(self): + """check PdfFit.setpar()""" + pf = self.P + pf.read_struct(datafile("Ni.stru")) + pf.setpar(1, "lat(1)") + self.assertEqual(3.52, pf.getpar(1)) + pf.setpar(1, 4.0) + self.assertEqual(4, pf.getpar(1)) + pf.setpar(1, pf.lat("a")) + self.assertEqual(3.52, pf.getpar(1)) + return + + def test_setvar(self): + """check PdfFit.setvar()""" + pf = self.P + pf.read_struct(datafile("Ni.stru")) + pf.setvar(pf.delta1, 1.2) + self.assertEqual(1.2, pf.getvar(pf.delta1)) + pf.setvar("delta1", 1.7) + self.assertEqual(1.7, pf.getvar("delta1")) + return + + # def test_getvar(self): + # """check PdfFit.getvar() + # """ + # return + # + # def test_getrw(self): + # """check PdfFit.getrw() + # """ + # return + # + # def test_getR(self): + # """check PdfFit.getR() + # """ + # return + # + # def test_getpdf_fit(self): + # """check PdfFit.getpdf_fit() + # """ + # return + # + # def test_getpdf_obs(self): + # """check PdfFit.getpdf_obs() + # """ + # return + # + # def test_getpdf_diff(self): + # """check PdfFit.getpdf_diff() + # """ + # return + + def test_get_atoms(self): + """check PdfFit.get_atoms()""" + self.P.read_struct(datafile("Ni.stru")) + self.P.read_struct(datafile("PbScW25TiO3.stru")) + self.P.setphase(1) + a1 = self.P.get_atoms() + a2 = self.P.get_atoms(2) + self.assertEqual(4 * ["NI"], a1) + self.assertEqual(8 * ["PB"] + 24 * ["O"] + 8 * ["SC"] + 8 * ["W"] + 8 * ["TI"], a2) + return + + def test_get_atom_types(self): + """check PdfFit.get_atom_types()""" + self.P.read_struct(datafile("Ni.stru")) + self.P.read_struct(datafile("PbScW25TiO3.stru")) + self.P.setphase(1) + atp1 = self.P.get_atom_types() + atp2 = self.P.get_atom_types(2) + self.assertEqual(["NI"], atp1) + self.assertEqual(["PB", "O", "SC", "W", "TI"], atp2) + return + + def test_num_phases(self): + """check PdfFit.num_phases()""" + self.assertEqual(0, self.P.num_phases()) + self.P.read_struct(datafile("Ni.stru")) + self.assertEqual(1, self.P.num_phases()) + self.P.read_struct(datafile("PbScW25TiO3.stru")) + self.assertEqual(2, self.P.num_phases()) + self.P.reset() + self.assertEqual(0, self.P.num_phases()) + return + + def test_num_datasets(self): + """check PdfFit.num_datasets()""" + self.assertEqual(0, self.P.num_datasets()) + self.P.read_data(datafile("Ni.dat"), "X", 25.0, 0.5) + self.assertEqual(1, self.P.num_datasets()) + # failed data should not increase num_datasets + try: + self.P.read_data(datafile("badNi.dat")) + except (RuntimeError, TypeError, NameError, ValueError, IOError): + pass + self.assertEqual(1, self.P.num_datasets()) + # alloc should increase number of datasets + # alloc requires a loaded structure + self.P.read_struct(datafile("Ni.stru")) + self.P.alloc("X", 30.0, 0.05, 2, 10, 100) + self.assertEqual(2, self.P.num_datasets()) + self.P.reset() + self.assertEqual(0, self.P.num_datasets()) + return + + def test_getcrw(self): + """check PdfFit.getcrw()""" + import numpy + + self.assertEqual(0, self.P.num_datasets()) + # Setting qmax=0 so that partial crw are not disturbed by + # termination ripples. + self.P.read_data(datafile("Ni.dat"), "X", 0.0, 0.0) + # crw is empty before data refinement + self.assertEqual([], self.P.getcrw()) + self.P.read_struct(datafile("Ni.stru")) + self.P.pdfrange(1, 2, 19) + self.P.refine() + crw19 = numpy.array(self.P.getcrw()) + self.assertTrue(numpy.all(crw19 >= 0.0)) + # check that crw19 is non decreasing + self.assertTrue(numpy.all(numpy.diff(crw19) >= 0.0)) + # check that crw19 and getrw give the same value + rw19 = crw19[-1] + self.assertAlmostEqual(self.P.getrw(), rw19, self.places) + # renormalize cumulative Rw and compare with Rw at r=15 + Gobs19 = numpy.array(self.P.getpdf_obs()) + Gnorm19 = numpy.sqrt(numpy.sum(Gobs19**2)) + r = numpy.array(self.P.getR()) + idx = numpy.nonzero(r <= 15)[0] + Gnorm15 = numpy.sqrt(numpy.sum(Gobs19[idx] ** 2)) + i15 = idx[-1] + rw15 = crw19[i15] * Gnorm19 / Gnorm15 + self.P.pdfrange(1, 2, r[i15] + 1e-5) + self.P.refine() + self.assertAlmostEqual(self.P.getrw(), rw15, self.places) + return + + def test_getcrw_two_datasets(self): + """check that getcrw() and getrw() are consistent for two datasets.""" + self.P.read_data(datafile("Ni.dat"), "X", 25.0, 0.0) + self.P.pdfrange(1, 2, 8) + self.P.read_data(datafile("300K.gr"), "N", 32.0, 0.0) + self.P.pdfrange(2, 1, 11) + self.P.read_struct(datafile("Ni.stru")) + # mess lattice parameters to have comparable Rw contributions + self.P.setvar("lat(1)", 3) + self.P.setvar("lat(2)", 3) + self.P.setvar("lat(3)", 3) + self.P.refine() + rwtot = self.P.getrw() + self.assertTrue(rwtot > 0.0) + self.P.setdata(1) + rw1 = self.P.getcrw()[-1] + self.P.setdata(2) + rw2 = self.P.getcrw()[-1] + self.assertAlmostEqual(rwtot**2, rw1**2 + rw2**2, self.places) + return + + # def test_getpar(self): + # """check PdfFit.getpar() + # """ + # return + + def test_fixpar(self): + """check PdfFit.fixpar()""" + self.P.fixpar("all") + self.assertRaises(TypeError, self.P.fixpar, "x") + return + + def test_freepar(self): + """check PdfFit.freepar()""" + self.P.freepar("all") + self.assertRaises(TypeError, self.P.freepar, "x") + return + + # def test_setphase(self): + # """check PdfFit.setphase() + # """ + # return + # + # def test_setdata(self): + # """check PdfFit.setdata() + # """ + # return + # + def test_psel(self): + """check PdfFit.psel()""" + + def doalloc(): + self.P.alloc("X", 30.0, 0.05, 2, 10, 100) + return + + self.assertRaises(pdffit2.unassignedError, self.P.psel, 0) + self.assertRaises(pdffit2.unassignedError, self.P.psel, 1) + self.P.read_struct(datafile("Ni.stru")) + doalloc() + self.P.calc() + G1 = self.P.getpdf_fit() + self.P.reset() + self.P.read_struct(datafile("PbScW25TiO3.stru")) + doalloc() + self.P.calc() + G2 = self.P.getpdf_fit() + self.P.reset() + self.P.read_struct(datafile("Ni.stru")) + self.P.read_struct(datafile("PbScW25TiO3.stru")) + doalloc() + self.P.pdesel("ALL") + self.P.psel(1) + self.P.calc() + self.assertEqual(G1, self.P.getpdf_fit()) + self.P.pdesel("ALL") + self.P.psel(2) + self.P.calc() + self.assertEqual(G2, self.P.getpdf_fit()) + self.P.psel("ALL") + self.P.calc() + Gall = self.P.getpdf_fit() + dGmax = max([abs(g1 + g2 - gall) for g1, g2, gall in zip(G1, G2, Gall)]) + self.assertAlmostEqual(0, dGmax, self.places) + self.assertRaises(pdffit2.unassignedError, self.P.psel, 10) + self.assertRaises(pdffit2.unassignedError, self.P.psel, 0) + self.assertRaises(pdffit2.unassignedError, self.P.psel, -100) + return + + def test_pdesel(self): + """check PdfFit.pdesel()""" + + def doalloc(): + self.P.alloc("X", 30.0, 0.05, 2, 10, 100) + return + + self.assertRaises(pdffit2.unassignedError, self.P.pdesel, 0) + self.assertRaises(pdffit2.unassignedError, self.P.pdesel, 1) + self.P.read_struct(datafile("Ni.stru")) + doalloc() + self.P.calc() + G1 = self.P.getpdf_fit() + self.P.reset() + self.P.read_struct(datafile("PbScW25TiO3.stru")) + doalloc() + self.P.calc() + G2 = self.P.getpdf_fit() + self.P.reset() + self.P.read_struct(datafile("Ni.stru")) + self.P.read_struct(datafile("PbScW25TiO3.stru")) + doalloc() + self.P.psel("ALL") + self.P.pdesel(2) + self.P.calc() + self.assertEqual(G1, self.P.getpdf_fit()) + self.P.psel("ALL") + self.P.pdesel(1) + self.P.calc() + self.assertEqual(G2, self.P.getpdf_fit()) + self.P.pdesel("ALL") + self.P.calc() + G0 = self.P.getpdf_fit() + self.assertEqual([0.0] * len(G0), G0) + self.assertRaises(pdffit2.unassignedError, self.P.pdesel, 10) + self.assertRaises(pdffit2.unassignedError, self.P.pdesel, 0) + self.assertRaises(pdffit2.unassignedError, self.P.pdesel, -100) + return + + # + # def test_selectAtomType(self): + # """check PdfFit.selectAtomType() + # """ + # return + # + # def test_selectAtomIndex(self): + # """check PdfFit.selectAtomIndex() + # """ + # return + # + # def test_selectAll(self): + # """check PdfFit.selectAll() + # """ + # return + # + # def test_selectNone(self): + # """check PdfFit.selectNone() + # """ + # return + + def test_bond_angle(self): + """check PdfFit.bond_angle()""" + self.P.read_struct(datafile("Ni.stru")) + a, e = self.P.bond_angle(1, 2, 3) + self.assertAlmostEqual(60.0, a, self.places) + self.assertRaises(ValueError, self.P.bond_angle, 0, 1, 2) + self.assertRaises(ValueError, self.P.bond_angle, 1, 2, 7) + return + + def test_bang(self): + "check PdfFit.bang() function" + self.P.read_struct(datafile("Ni.stru")) + out = capture_output(self.P.bang, 1, 2, 3).strip() + self.assertTrue(out.endswith("60 degrees")) + self.assertTrue(out.startswith("NI (#1) - NI (#2) - NI (#3)")) + return + + def test_bond_length_atoms(self): + """check PdfFit.bond_length_atoms()""" + self.P.read_struct(datafile("Ni.stru")) + self.P.read_struct(datafile("PbScW25TiO3.stru")) + dij, ddij = self.P.bond_length_atoms(1, 5) + self.assertAlmostEqual(4.03635, dij, self.places) + self.P.setphase(1) + self.assertRaises(ValueError, self.P.bond_length_atoms, 1, 5) + return + + def test_bond_length_types(self): + """check PdfFit.bond_length_types()""" + self.P.read_struct(datafile("Ni.stru")) + self.P.read_struct(datafile("PbScW25TiO3.stru")) + dPbO = self.P.bond_length_types("Pb", "O", 0.1, 3.0) + # check if keys are present + self.assertTrue("dij" in dPbO) + self.assertTrue("ddij" in dPbO) + self.assertTrue("ij0" in dPbO) + self.assertTrue("ij1" in dPbO) + # check if they have the same length + npts = len(dPbO["dij"]) + self.assertEqual(npts, len(dPbO["ddij"])) + self.assertEqual(npts, len(dPbO["ij0"])) + self.assertEqual(npts, len(dPbO["ij1"])) + # 8 Pb atoms have coordination 12 in perovskite structure + self.assertEqual(8 * 12, len(dPbO["dij"])) + self.P.setphase(1) + dfcc = self.P.bond_length_types("ALL", "ALL", 0.1, 2.6) + # 4 Ni atoms with coordination 12 + self.assertEqual(4 * 12, len(dfcc["dij"])) + # invalid element + self.assertRaises(ValueError, self.P.bond_length_types, "Ni", "Nix", 0.1, 5.0) + # check indices ij0 + allij0 = sum(dfcc["ij0"], tuple()) + self.assertEqual(0, min(allij0)) + self.assertEqual(3, max(allij0)) + # check indices ij1 + allij1 = sum(dfcc["ij1"], tuple()) + self.assertEqual(1, min(allij1)) + self.assertEqual(4, max(allij1)) + # check index values + ij0check = [(i1 - 1, j1 - 1) for i1, j1 in dfcc["ij1"]] + self.assertEqual(ij0check, dfcc["ij0"]) + # test valid element which is not present in the structure + dnone = self.P.bond_length_types("Ni", "Au", 0.1, 5.0) + self.assertEqual(0, len(dnone["dij"])) + self.assertEqual(0, len(dnone["ddij"])) + self.assertEqual(0, len(dnone["ij0"])) + self.assertEqual(0, len(dnone["ij1"])) + return + + def test_blen(self): + """check PdfFit.blen()""" + self.P.read_struct(datafile("PbScW25TiO3.stru")) + blen = self.P.blen + o = capture_output(blen, 1, 5).strip() + self.assertTrue(o.endswith("4.03635 A")) + self.assertTrue("PB (#1)" in o) + self.assertTrue("PB (#5)" in o) + self.assertRaises(ValueError, blen, 1, 99) + self.assertRaises(ValueError, blen, 0, 1) + o1 = capture_output(blen, 1, 1, 0.1, 1) + self.assertTrue("No pairs found" in o1) + o2 = capture_output(blen, 1, 50, 0.1, 1) + self.assertEqual("", o2) + o3 = capture_output(blen, "Sc", "O", 0.5, 2.3).strip() + self.assertEqual(1 + 48, len(o3.split("\n"))) + self.assertEqual(6, o3.count("SC (#33)")) + self.assertEqual(2, o3.count("O (#9)")) + self.assertRaises(TypeError, blen, "Sc", "O", 0.5) + return + + # def test_show_scat(self): + # """check PdfFit.show_scat() + # """ + # return + # + # def test_get_scat_string(self): + # """check PdfFit.get_scat_string() + # """ + # return + + def test_get_scat(self): + """check PdfFit.get_scat()""" + # x-ray scattering factors + fPb = self.P.get_scat("X", "Pb") + self.assertEqual(82.0, fPb) + fTi = self.P.get_scat("X", "tI") + self.assertEqual(22.0, fTi) + # neutron scattering lengths + bPb = self.P.get_scat("N", "PB") + self.assertAlmostEqual(9.401, bPb, 3) + bTi = self.P.get_scat("N", "ti") + self.assertAlmostEqual(-3.370, bTi, 3) + # exceptions + self.assertRaises(ValueError, self.P.get_scat, "N", "zz") + self.assertRaises(ValueError, self.P.get_scat, "Z", "Ti") + return + + def test_set_scat(self): + """check PdfFit.set_scat()""" + # raises exception when no phase exists + self.assertRaises(pdffit2.unassignedError, self.P.set_scat, "N", "Ti", -11) + # check if it is local to phase + fPb = self.P.get_scat("X", "Pb") + bPb = self.P.get_scat("N", "Pb") + self.P.read_struct(datafile("PbScW25TiO3.stru")) + self.P.set_scat("X", "Pb", 142) + self.assertEqual(142, self.P.get_scat("X", "Pb")) + self.assertEqual(bPb, self.P.get_scat("N", "Pb")) + self.P.read_struct(datafile("PbScW25TiO3.stru")) + self.assertEqual(fPb, self.P.get_scat("X", "Pb")) + self.P.setphase(1) + self.assertEqual(142, self.P.get_scat("X", "Pb")) + self.P.setphase(2) + self.assertEqual(fPb, self.P.get_scat("X", "Pb")) + # check exception for invalid inputs + self.assertRaises(ValueError, self.P.set_scat, "Z", "C", 123) + self.assertRaises(ValueError, self.P.set_scat, "X", "ZZ", 123) + return + + def test_reset_scat(self): + """check PdfFit.reset_scat()""" + # raises exception when no phase exists + self.assertRaises(pdffit2.unassignedError, self.P.reset_scat, "Ti") + # check if it is local to phase + fPb = self.P.get_scat("X", "Pb") + bPb = self.P.get_scat("N", "Pb") + self.P.read_struct(datafile("PbScW25TiO3.stru")) + self.P.set_scat("X", "Pb", 142) + self.P.read_struct(datafile("PbScW25TiO3.stru")) + self.P.set_scat("N", "Pb", -17) + self.P.setphase(1) + self.assertNotEqual(fPb, self.P.get_scat("X", "Pb")) + self.P.reset_scat("Pb") + self.assertEqual(fPb, self.P.get_scat("X", "Pb")) + self.P.setphase(2) + self.assertNotEqual(bPb, self.P.get_scat("N", "Pb")) + self.P.reset_scat("Pb") + self.assertEqual(bPb, self.P.get_scat("N", "Pb")) + # check exception for invalid inputs + self.assertRaises(ValueError, self.P.reset_scat, "Zz") + return + + def test_num_atoms(self): + """check PdfFit.num_atoms()""" + self.P.read_struct(datafile("Ni.stru")) + self.assertEqual(4, self.P.num_atoms()) + self.P.read_struct(datafile("PbScW25TiO3.stru")) + self.assertEqual(56, self.P.num_atoms()) + self.P.setphase(1) + self.assertEqual(4, self.P.num_atoms()) + self.P.setphase(2) + self.assertEqual(56, self.P.num_atoms()) + return + + def test_lat(self): + """check PdfFit.lat()""" + pf = self.P + pf.read_struct(datafile("Ni.stru")) + for i in ("a", "b", "c", 1, 2, 3): + self.assertEqual(3.52, pf.getvar(pf.lat(i))) + for i in ("alpha", "beta", "gamma", 4, 5, 6): + self.assertEqual(90, pf.getvar(pf.lat(i))) + return + + def test_xyz(self): + """check PdfFit.x() PdfFit.y(), PdfFit.z()""" + pf = self.P + pf.read_struct(datafile("Ni.stru")) + self.assertEqual(0.5, pf.getvar(pf.x(3))) + self.assertEqual(0, pf.getvar(pf.y(3))) + self.assertEqual(0.5, pf.getvar(pf.z(3))) + return + + def test_uij(self): + """check PdfFit.uij()""" + ni = loadStructure(datafile("Ni.stru")) + ni[2].anisotropy = True + ni[2].U11, ni[2].U22, ni[2].U33 = 1, 2, 3 + ni[2].U12, ni[2].U13, ni[2].U23 = 4, 5, 6 + pf = self.P + pf.add_structure(ni) + self.assertEqual(1, pf.getvar(pf.u11(3))) + self.assertEqual(2, pf.getvar(pf.u22(3))) + self.assertEqual(3, pf.getvar(pf.u33(3))) + self.assertEqual(4, pf.getvar(pf.u12(3))) + self.assertEqual(5, pf.getvar(pf.u13(3))) + self.assertEqual(6, pf.getvar(pf.u23(3))) + return + + def test_occ(self): + """check PdfFit.occ()""" + pf = self.P + pf.read_struct(datafile("Ni.stru")) + for i in range(1, 5): + self.assertEqual(1, pf.getvar(pf.occ(i))) + return + + +# def test_pscale(self): +# """check PdfFit.pscale() +# """ +# return +# +# def test_pscale(self): +# """check PdfFit.pscale() +# """ +# return +# +# def test_sratio(self): +# """check PdfFit.sratio() +# """ +# return +# +# def test_delta1(self): +# """check PdfFit.delta1() +# """ +# return +# +# def test_delta2(self): +# """check PdfFit.delta2() +# """ +# return +# +# def test_dscale(self): +# """check PdfFit.dscale() +# """ +# return +# +# def test_qdamp(self): +# """check PdfFit.qdamp() +# """ +# return +# +# def test_qbroad(self): +# """check PdfFit.qbroad() +# """ +# return +# +# def test_rcut(self): +# """check PdfFit.rcut() +# """ +# return +# +# def test___init__(self): +# """check PdfFit.__init__() +# """ +# return +# +# def test__PdfFit__getRef(self): +# """check PdfFit._PdfFit__getRef() +# """ +# return + +# End of class TestPdfFit + +if __name__ == "__main__": + unittest.main() + +# End of file diff --git a/src/diffpy/pdffit2/tests/TestPhaseFractions.py b/src/diffpy/pdffit2/tests/TestPhaseFractions.py new file mode 100644 index 00000000..afc57c06 --- /dev/null +++ b/src/diffpy/pdffit2/tests/TestPhaseFractions.py @@ -0,0 +1,95 @@ +#!/usr/bin/env python + +"""Unit tests for phase fraction calculations. +""" + +import unittest + +from diffpy.pdffit2 import PdfFit +from diffpy.pdffit2.tests.pdffit2testutils import datafile + + +############################################################################## +class TestPhaseFractions(unittest.TestCase): + places = 4 + + def setUp(self): + self.P = PdfFit() + self.P.read_struct(datafile("Ni.stru")) + self.P.read_struct(datafile("PbScW25TiO3.stru")) + self.P.alloc("X", 0.0, 0.05, 0.1, 10, 200) + self.P.alloc("N", 0.0, 0.05, 0.1, 10, 200) + return + + def tearDown(self): + del self.P + return + + def test_xray_fractions(self): + """test_xray_fractions -- check phase fractions in x-ray dataset.""" + self.P.setdata(1) + ph = self.P.phase_fractions() + bb1 = 28**2 + bb2 = ((8 * 82 + 24 * 8 + 4 * 21 + 2 * 74 + 2 * 22) / 40.0) ** 2 + self.assertAlmostEqual(1.0, sum(ph["atom"]), self.places) + self.assertAlmostEqual(1.0, sum(ph["cell"]), self.places) + self.assertAlmostEqual(1.0, sum(ph["mass"]), self.places) + self.assertAlmostEqual(bb2 / bb1, ph["atom"][0] / ph["atom"][1], self.places) + self.assertAlmostEqual(bb2 / bb1 * 40.0 / 4.0, ph["cell"][0] / ph["cell"][1], self.places) + mavg1 = 58.69 + mavg2 = (8 * 207.19 + 24 * 15.994 + 4 * 44.956 + 2 * 183.85 + 2 * 47.90) / 40.0 + self.assertAlmostEqual(bb2 / bb1 * mavg1 / mavg2, ph["mass"][0] / ph["mass"][1], self.places) + self.assertEqual(0.0, sum(ph["stdatom"])) + self.assertEqual(0.0, sum(ph["stdcell"])) + self.assertEqual(0.0, sum(ph["stdmass"])) + self.P.setphase(1) + self.P.setvar("pscale", 2.0) + ph2 = self.P.phase_fractions() + self.assertAlmostEqual(1.0, sum(ph2["atom"]), self.places) + self.assertAlmostEqual(1.0, sum(ph2["cell"]), self.places) + self.assertAlmostEqual(1.0, sum(ph2["mass"]), self.places) + self.assertAlmostEqual(2.0, ph2["atom"][0] / ph2["atom"][1] / (ph["atom"][0] / ph["atom"][1]), self.places) + self.assertAlmostEqual(2.0, ph2["cell"][0] / ph2["cell"][1] / (ph["cell"][0] / ph["cell"][1]), self.places) + self.assertAlmostEqual(2.0, ph2["mass"][0] / ph2["mass"][1] / (ph["mass"][0] / ph["mass"][1]), self.places) + return + + def test_neutron_fractions(self): + """test_neutron_fractions -- check phase fractions in neutron dataset.""" + self.P.setdata(2) + ph = self.P.phase_fractions() + bb1 = 10.31**2 + bPb = 9.4012 + bO = 5.8054 + bSc = 12.11 + bW = 4.75518 + bTi = -3.37013 + bb2 = ((8 * bPb + 24 * bO + 4 * bSc + 2 * bW + 2 * bTi) / 40.0) ** 2 + self.assertAlmostEqual(1.0, sum(ph["atom"]), self.places) + self.assertAlmostEqual(1.0, sum(ph["cell"]), self.places) + self.assertAlmostEqual(1.0, sum(ph["mass"]), self.places) + self.assertAlmostEqual(bb2 / bb1, ph["atom"][0] / ph["atom"][1], self.places) + self.assertAlmostEqual(bb2 / bb1 * 40.0 / 4.0, ph["cell"][0] / ph["cell"][1], self.places) + mavg1 = 58.69 + mavg2 = (8 * 207.19 + 24 * 15.994 + 4 * 44.956 + 2 * 183.85 + 2 * 47.90) / 40.0 + self.assertAlmostEqual(bb2 / bb1 * mavg1 / mavg2, ph["mass"][0] / ph["mass"][1], self.places) + self.assertEqual(0.0, sum(ph["stdatom"])) + self.assertEqual(0.0, sum(ph["stdcell"])) + self.assertEqual(0.0, sum(ph["stdmass"])) + self.P.setphase(1) + self.P.setvar("pscale", 2.0) + ph2 = self.P.phase_fractions() + self.assertAlmostEqual(1.0, sum(ph2["atom"]), self.places) + self.assertAlmostEqual(1.0, sum(ph2["cell"]), self.places) + self.assertAlmostEqual(1.0, sum(ph2["mass"]), self.places) + self.assertAlmostEqual(2.0, ph2["atom"][0] / ph2["atom"][1] / (ph["atom"][0] / ph["atom"][1]), self.places) + self.assertAlmostEqual(2.0, ph2["cell"][0] / ph2["cell"][1] / (ph["cell"][0] / ph["cell"][1]), self.places) + self.assertAlmostEqual(2.0, ph2["mass"][0] / ph2["mass"][1] / (ph["mass"][0] / ph["mass"][1]), self.places) + return + + +# End of class TestSphereEnvelope + +if __name__ == "__main__": + unittest.main() + +# End of file diff --git a/src/diffpy/pdffit2/tests/TestShapeFactors.py b/src/diffpy/pdffit2/tests/TestShapeFactors.py new file mode 100644 index 00000000..1eaa9711 --- /dev/null +++ b/src/diffpy/pdffit2/tests/TestShapeFactors.py @@ -0,0 +1,274 @@ +#!/usr/bin/env python + +"""Unit tests for particle shape envelope factors. +""" + + +import unittest + +import numpy + +from diffpy.pdffit2 import PdfFit, pdffit2 +from diffpy.pdffit2.tests.pdffit2testutils import datafile + + +def spherefactor(r, d): + """Calculate spherical envelope correction + + r -- PDF radius + d -- diameter of spherical particle + + Return numpy array of shape correction envelope. + """ + r1 = numpy.array(r) + fsph = 1.0 - 1.5 * r1 / d + 0.5 * (r1 / d) ** 3 + fsph[r1 > d] = 0.0 + return fsph + + +############################################################################## +class TestSphereEnvelope(unittest.TestCase): + + places = 6 + + def setUp(self): + self.P = PdfFit() + return + + def tearDown(self): + self.P = None + return + + def test_calculation(self): + """check calculation of sphere envelope factor""" + self.P.read_struct(datafile("Ni.stru")) + self.P.alloc("X", 0.0, 0.05, 0.1, 10, 200) + self.P.calc() + d = 8.0 + r = numpy.array(self.P.getR()) + G0 = numpy.array(self.P.getpdf_fit()) + self.P.setvar("spdiameter", d) + self.P.calc() + G1 = numpy.array(self.P.getpdf_fit()) + dG = G0 * spherefactor(r, d) - G1 + msd = numpy.dot(dG, dG) / len(r) + self.assertAlmostEqual(0.0, numpy.sqrt(msd), self.places) + return + + def test_refinement(self): + """check refinement of sphere envelope factor""" + dcheck = 8.0 + dstart = 12.0 + self.P.read_struct(datafile("Ni.stru")) + self.P.alloc("X", 0.0, 0.05, 0.1, 10, 200) + self.P.setvar("spdiameter", dcheck) + self.P.calc() + r = numpy.array(self.P.getR()) + Gd8 = numpy.array(self.P.getpdf_fit()) + Gd8noise = Gd8 + Gd8noise[::2] += 0.01 + Gd8noise[1::2] -= 0.01 + self.P.reset() + self.P.read_struct(datafile("Ni.stru")) + self.P.read_data_lists("X", 0.0, 0.05, list(r), list(Gd8noise)) + self.P.constrain("spdiameter", "@8") + self.P.setpar(8, dstart) + self.P.refine() + dfinal = self.P.getvar("spdiameter") + self.assertAlmostEqual(dcheck, dfinal, 3) + return + + def test_twophase_calculation(self): + """check PDF calculation for 2 phases with different spdiameters""" + d1 = 6 + d2 = 9 + self.P.read_struct(datafile("Ni.stru")) + self.P.alloc("X", 0.0, 0.05, 0.1, 10, 200) + self.P.setvar("spdiameter", d1) + self.P.calc() + G1 = numpy.array(self.P.getpdf_fit()) + self.P.reset() + self.P.read_struct(datafile("PbScW25TiO3.stru")) + self.P.alloc("X", 0.0, 0.05, 0.1, 10, 200) + self.P.setvar("spdiameter", d2) + self.P.calc() + G2 = numpy.array(self.P.getpdf_fit()) + self.P.reset() + self.P.read_struct(datafile("Ni.stru")) + self.P.read_struct(datafile("PbScW25TiO3.stru")) + self.P.alloc("X", 0.0, 0.05, 0.1, 10, 200) + self.P.setphase(1) + self.P.setvar("spdiameter", d1) + self.P.setphase(2) + self.P.setvar("spdiameter", d2) + self.P.calc() + Gtot = numpy.array(self.P.getpdf_fit()) + dG = G1 + G2 - Gtot + r = numpy.array(self.P.getR()) + msd = numpy.dot(dG, dG) / len(r) + self.assertAlmostEqual(0.0, numpy.sqrt(msd), self.places) + return + + def test_twophase_refinement(self): + """check PDF refinement of 2 phases that have different spdiameter.""" + dcheck1 = 8.0 + dstart1 = 8.2 + dcheck2 = 6.0 + dstart2 = 5.5 + self.P.read_struct(datafile("Ni.stru")) + self.P.alloc("X", 0.0, 0.05, 0.1, 10, 200) + self.P.setvar("spdiameter", dcheck1) + self.P.calc() + G1 = numpy.array(self.P.getpdf_fit()) + self.P.reset() + self.P.read_struct(datafile("PbScW25TiO3.stru")) + self.P.alloc("X", 0.0, 0.05, 0.1, 10, 200) + self.P.setvar("spdiameter", dcheck2) + self.P.calc() + G2 = numpy.array(self.P.getpdf_fit()) + r = numpy.array(self.P.getR()) + Gnoise = G1 + G2 + Gnoise[::2] += 0.01 + Gnoise[1::2] -= 0.01 + self.P.reset() + self.P.read_struct(datafile("Ni.stru")) + self.P.read_struct(datafile("PbScW25TiO3.stru")) + self.P.read_data_lists("X", 0.0, 0.05, list(r), list(Gnoise)) + self.P.setphase(1) + self.P.constrain("spdiameter", "@11") + self.P.setphase(2) + self.P.constrain("spdiameter", "@12") + self.P.setpar(11, dstart1) + self.P.setpar(12, dstart2) + self.P.refine() + dfinal2 = self.P.getvar("spdiameter") + self.P.setphase(1) + dfinal1 = self.P.getvar("spdiameter") + self.assertAlmostEqual(dcheck1, dfinal1, 3) + self.assertAlmostEqual(dcheck2, dfinal2, 3) + return + + def test_spdiameter_io(self): + """Check reading and writing of spdiameter from structure file.""" + import re + + self.P.read_struct(datafile("Ni.stru")) + self.assertEqual(0.0, self.P.getvar("spdiameter")) + # engine should not write shape factor when not defined + spdnone = self.P.save_struct_string(1) + self.assertTrue(not re.search("(?m)^shape +sphere,", spdnone)) + self.P.setvar("spdiameter", 7) + spd7 = self.P.save_struct_string(1) + # spd7 should contain shape factor data + self.assertTrue(re.search("(?m)^shape +sphere,", spd7)) + self.P.reset() + self.P.read_struct_string(spd7) + self.assertEqual(7.0, self.P.getvar("spdiameter")) + # try to read without comma + spd14 = re.sub("(?m)^shape +sphere.*$", "shape sphere 14.00", spd7) + self.P.read_struct_string(spd14) + self.assertEqual(14.0, self.P.getvar("spdiameter")) + # try to read invalid shape data + sinvalid = re.sub("(?m)^shape .*", "shape invalid, 1", spd7) + self.assertRaises(pdffit2.structureError, self.P.read_struct_string, sinvalid) + return + + +# End of class TestSphereEnvelope + + +############################################################################## +class TestStepCutEnvelope(unittest.TestCase): + + places = 6 + + def setUp(self): + self.P = PdfFit() + return + + def tearDown(self): + self.P = None + return + + def test_stepcut_calculation(self): + """check calculation of sphere envelope factor""" + self.P.read_struct(datafile("Ni.stru")) + self.P.alloc("X", 0.0, 0.05, 0.1, 10, 200) + self.P.calc() + stepcut = 8.0 + r = numpy.array(self.P.getR()) + G0 = numpy.array(self.P.getpdf_fit()) + G0[r > stepcut] = 0.0 + self.P.setvar("stepcut", stepcut) + self.P.calc() + G1 = numpy.array(self.P.getpdf_fit()) + dG = G0 - G1 + msd = numpy.dot(dG, dG) / len(r) + self.assertAlmostEqual(0.0, numpy.sqrt(msd), self.places) + return + + def test_twophase_stepcut_calculation(self): + """check PDF calculation for 2 phases with different spdiameters""" + d1 = 6 + d2 = 9 + self.P.read_struct(datafile("Ni.stru")) + self.P.alloc("X", 0.0, 0.05, 0.1, 10, 200) + self.P.setvar("stepcut", d1) + self.P.calc() + G1 = numpy.array(self.P.getpdf_fit()) + self.P.reset() + self.P.read_struct(datafile("PbScW25TiO3.stru")) + self.P.alloc("X", 0.0, 0.05, 0.1, 10, 200) + self.P.setvar("stepcut", d2) + self.P.calc() + G2 = numpy.array(self.P.getpdf_fit()) + self.P.reset() + self.P.read_struct(datafile("Ni.stru")) + self.P.read_struct(datafile("PbScW25TiO3.stru")) + self.P.alloc("X", 0.0, 0.05, 0.1, 10, 200) + self.P.setphase(1) + self.P.setvar("stepcut", d1) + self.P.setphase(2) + self.P.setvar("stepcut", d2) + self.P.calc() + Gtot = numpy.array(self.P.getpdf_fit()) + dG = G1 + G2 - Gtot + r = numpy.array(self.P.getR()) + msd = numpy.dot(dG, dG) / len(r) + self.assertAlmostEqual(0.0, numpy.sqrt(msd), self.places) + # G after step should be zero + self.assertTrue(numpy.all(0 == Gtot[r > max(d1, d2)])) + return + + def test_stepcut_io(self): + """Check reading and writing of stepcut from structure file.""" + import re + + self.P.read_struct(datafile("Ni.stru")) + self.assertEqual(0.0, self.P.getvar("stepcut")) + # engine should not write shape factor when not defined + sscnone = self.P.save_struct_string(1) + self.assertTrue(not re.search("(?m)^shape +stepcut,", sscnone)) + self.P.setvar("stepcut", 7) + ssc7 = self.P.save_struct_string(1) + # ssc7 should contain shape factor data + self.assertTrue(re.search("(?m)^shape +stepcut,", ssc7)) + self.P.reset() + self.P.read_struct_string(ssc7) + self.assertEqual(7.0, self.P.getvar("stepcut")) + # try to read without comma + ssc14 = re.sub("(?m)^shape +stepcut.*$", "shape stepcut 14.00", ssc7) + self.P.read_struct_string(ssc14) + self.assertEqual(14.0, self.P.getvar("stepcut")) + # try to read invalid shape data + sinvalid = re.sub("(?m)^shape .*", "shape invalid, 1", ssc7) + self.assertRaises(pdffit2.structureError, self.P.read_struct_string, sinvalid) + return + + +# End of class TestStepCutEnvelope + +if __name__ == "__main__": + unittest.main() + +# End of file diff --git a/src/diffpy/pdffit2/tests/__init__.py b/src/diffpy/pdffit2/tests/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/src/diffpy/pdffit2/tests/conftest.py b/src/diffpy/pdffit2/tests/conftest.py new file mode 100644 index 00000000..e3b63139 --- /dev/null +++ b/src/diffpy/pdffit2/tests/conftest.py @@ -0,0 +1,19 @@ +import json +from pathlib import Path + +import pytest + + +@pytest.fixture +def user_filesystem(tmp_path): + base_dir = Path(tmp_path) + home_dir = base_dir / "home_dir" + home_dir.mkdir(parents=True, exist_ok=True) + cwd_dir = base_dir / "cwd_dir" + cwd_dir.mkdir(parents=True, exist_ok=True) + + home_config_data = {"username": "home_username", "email": "home@email.com"} + with open(home_dir / "diffpyconfig.json", "w") as f: + json.dump(home_config_data, f) + + yield tmp_path diff --git a/src/diffpy/pdffit2/tests/debug.py b/src/diffpy/pdffit2/tests/debug.py new file mode 100644 index 00000000..3e30239f --- /dev/null +++ b/src/diffpy/pdffit2/tests/debug.py @@ -0,0 +1,35 @@ +#!/usr/bin/env python +############################################################################## +# +# (c) 2024 The Trustees of Columbia University in the City of New York. +# All rights reserved. +# +# File coded by: Billinge Group members and community contributors. +# +# See GitHub contributions for a more detailed list of contributors. +# https://github.com/diffpy/diffpy.pdffit2/graphs/contributors +# +# See LICENSE.rst for license information. +# +############################################################################## + +""" +Convenience module for debugging the unit tests using + +python -m diffpy.pdffit2.tests.debug + +Exceptions raised by failed tests or other errors are not caught. +""" + + +if __name__ == "__main__": + import sys + + from diffpy.pdffit2.tests import testsuite + + pattern = sys.argv[1] if len(sys.argv) > 1 else "" + suite = testsuite(pattern) + suite.debug() + + +# End of file diff --git a/src/diffpy/pdffit2/tests/pdffit2testutils.py b/src/diffpy/pdffit2/tests/pdffit2testutils.py new file mode 100644 index 00000000..ce61aa16 --- /dev/null +++ b/src/diffpy/pdffit2/tests/pdffit2testutils.py @@ -0,0 +1,53 @@ +#!/usr/bin/env python +############################################################################## +# +# diffpy.srreal by DANSE Diffraction group +# Simon J. L. Billinge +# (c) 2010 Trustees of the Columbia University +# in the City of New York. All rights reserved. +# +# File coded by: Pavol Juhas +# +# See AUTHORS.txt for a list of people who contributed. +# See LICENSE.txt for license information. +# +############################################################################## + +"""Helper routines for running other unit tests. +Import of this module suppresses the chatty output from the C++ extension. +""" + + +import os.path + +import six + +import diffpy.pdffit2 + +# silence the C++ engine output +diffpy.pdffit2.redirect_stdout(open(os.path.devnull, "w")) + +# path variables +thisfile = locals().get("__file__", "file.py") +tests_dir = os.path.dirname(os.path.abspath(thisfile)) +testdata_dir = os.path.join(tests_dir, "testdata") + + +def datafile(filename): + """prepend testdata_dir to filename.""" + return os.path.join(testdata_dir, filename) + + +def capture_output(f, *args, **kwargs): + """Capture output from pdffit2 engine produced in function call.""" + savestdout = diffpy.pdffit2.output.stdout + fp = six.StringIO() + diffpy.pdffit2.redirect_stdout(fp) + try: + f(*args, **kwargs) + finally: + diffpy.pdffit2.redirect_stdout(savestdout) + return fp.getvalue() + + +# End of file diff --git a/src/diffpy/pdffit2/tests/run.py b/src/diffpy/pdffit2/tests/run.py new file mode 100644 index 00000000..463f010e --- /dev/null +++ b/src/diffpy/pdffit2/tests/run.py @@ -0,0 +1,34 @@ +#!/usr/bin/env python +############################################################################## +# +# (c) 2024 The Trustees of Columbia University in the City of New York. +# All rights reserved. +# +# File coded by: Billinge Group members and community contributors. +# +# See GitHub contributions for a more detailed list of contributors. +# https://github.com/diffpy/diffpy.pdffit2/graphs/contributors +# +# See LICENSE.rst for license information. +# +############################################################################## +"""Convenience module for executing all unit tests with +python -m diffpy.pdffit2.tests.run +""" + +import sys + +import pytest + +if __name__ == "__main__": + # show output results from every test function + args = ["-v"] + # show the message output for skipped and expected failure tests + if len(sys.argv) > 1: + args.extend(sys.argv[1:]) + print("pytest arguments: {}".format(args)) + # call pytest and exit with the return code from pytest + exit_res = pytest.main(args) + sys.exit(exit_res) + +# End of file diff --git a/src/diffpy/pdffit2/tests/rundeps.py b/src/diffpy/pdffit2/tests/rundeps.py new file mode 100644 index 00000000..038475ae --- /dev/null +++ b/src/diffpy/pdffit2/tests/rundeps.py @@ -0,0 +1,30 @@ +#!/usr/bin/env python +############################################################################## +# +# diffpy.pdffit2 by DANSE Diffraction group +# Simon J. L. Billinge +# (c) 2012 Trustees of the Columbia University +# in the City of New York. All rights reserved. +# +# File coded by: Pavol Juhas +# +# See AUTHORS.txt for a list of people who contributed. +# See LICENSE.txt for license information. +# +############################################################################## + +"""Convenience module for executing unit tests for all pdffit2 dependencies + +python -m diffpy.pdffit2.tests.rundeps +""" + + +if __name__ == "__main__": + import sys + + from diffpy.pdffit2.tests import testdeps + + # produce zero exit code for a successful test + sys.exit(not testdeps().wasSuccessful()) + +# End of file diff --git a/src/diffpy/pdffit2/tests/testdata/300K.gr b/src/diffpy/pdffit2/tests/testdata/300K.gr new file mode 100644 index 00000000..15578911 --- /dev/null +++ b/src/diffpy/pdffit2/tests/testdata/300K.gr @@ -0,0 +1,2062 @@ +History written: Fri Apr 30 13:05:36 2004 +produced by +##### Run Information runCorrection=T +prep=gsas machine=npdf +run=300K background=npdf_00907 +smooth=2 smoothParam=32 32 0 backKillThresh=-1.0 +in beam: radius=0.635 height=2.54 +temp=308 runTitle=Run 1018: LMO - RT (before), HIPPO-furnace + +##### Vanadium runCorrection=T +run=npdf_00709 background=npdf_00710 +smooth=2 smoothParam=32 32 0 vanKillThresh=4.0 vBackKillThresh=-1.0 +in beam: radius=0.635 height=2.54 + +##### Container runCorrection=T +run=npdf_00917 background=npdf_00907 +smooth=2 smoothParam=32 32 0 cBackKillThresh=-1.0 +wallThick=0.023 atomDensity=0.072110 +atomic information: scattCS=5.100 absorpCS=5.080 + +##### Sample Material numElements=3 NormLaue=0.47445 +Element relAtomNum atomMass atomCoherCS atomIncoherCS atomAbsorpCS + O 0.6000 15.999 4.2320 0.0008 0.00019 + Mn 0.2000 54.931 -1.7500 0.4000 13.30000 + La 0.2000 138.905 8.5300 1.1300 8.97000 +density= effDensity=3.4138 + +##### Banks=6 deltaQ=0.01 matchRef=0 matchScal=T matchOffset=T +bank angle blendQmin blendQmax (0.0 means no info) + 1 90.0 1.62 29.42 + 2 -90.0 1.62 29.42 + 3 119.0 1.97 35.85 + 4 -119.0 1.97 35.85 + 5 148.0 2.20 40.00 + 6 -148.0 2.20 40.00 + +##### Program Specific Information +## Ft calcError=1 (1 for true, 0 for false) +numRpoints=2000 maxR=20.0 numDensity=0.0 intMaxR=1.5 +## Damp Qmin=2.0 Qmax=32 startDampQ=32 QAveMin=0.6 +dampFuncType=0 modEqn=1.0000*S(Q) +0.0000 +0.0000*Q dampExtraToZero=0 +## Blend numBanks=6 banks=1,2,3,4,5,6 +## Soqd minProcOut=0 +samPlazcek=0 vanPlazcek=0 smoothData=0 modifyData=1 +## Corps minProcOut=0 numBanksMiss=0 + +##### prepgsas prepOutput=1 numBanksMiss=0 fileExt=gsa +instParamFile=npdf_displex_757.iparm +numBanksAdd=0 +numBanksMult=6 +Bank# mulData mulBack + 1 1.0230 1.0000 + 2 1.0300 1.0000 + 3 1.0200 1.0000 + 4 0.9800 1.0000 + 5 0.9930 1.0000 + 6 0.9750 1.0000 +##### start data +#O0 rg_int sig_rg_int low_int sig_low_int rmax rhofit +#S 1 - PDF from PDFgetN +#P0 -4.09986 0.44295 0.11702 0.01370 1.50 0.0731 +#L r G(r) dr dG(r) + 0.010 0.086 0.0 0.0441 + 0.020 0.149 0.0 0.0849 + 0.030 0.169 0.0 0.1193 + 0.040 0.130 0.0 0.1448 + 0.050 0.021 0.0 0.1598 + 0.060 -0.160 0.0 0.1637 + 0.070 -0.410 0.0 0.1568 + 0.080 -0.717 0.0 0.1411 + 0.090 -1.064 0.0 0.1196 + 0.100 -1.428 0.0 0.0979 + 0.110 -1.782 0.0 0.0842 + 0.120 -2.101 0.0 0.0854 + 0.130 -2.359 0.0 0.0992 + 0.140 -2.535 0.0 0.1166 + 0.150 -2.612 0.0 0.1311 + 0.160 -2.581 0.0 0.1392 + 0.170 -2.440 0.0 0.1400 + 0.180 -2.196 0.0 0.1341 + 0.190 -1.863 0.0 0.1238 + 0.200 -1.462 0.0 0.1126 + 0.210 -1.017 0.0 0.1050 + 0.220 -0.556 0.0 0.1044 + 0.230 -0.109 0.0 0.1107 + 0.240 0.299 0.0 0.1202 + 0.250 0.643 0.0 0.1290 + 0.260 0.906 0.0 0.1341 + 0.270 1.077 0.0 0.1343 + 0.280 1.152 0.0 0.1298 + 0.290 1.134 0.0 0.1222 + 0.300 1.035 0.0 0.1143 + 0.310 0.870 0.0 0.1091 + 0.320 0.660 0.0 0.1090 + 0.330 0.426 0.0 0.1137 + 0.340 0.193 0.0 0.1209 + 0.350 -0.019 0.0 0.1275 + 0.360 -0.192 0.0 0.1313 + 0.370 -0.313 0.0 0.1313 + 0.380 -0.373 0.0 0.1276 + 0.390 -0.372 0.0 0.1217 + 0.400 -0.314 0.0 0.1156 + 0.410 -0.207 0.0 0.1119 + 0.420 -0.065 0.0 0.1121 + 0.430 0.095 0.0 0.1159 + 0.440 0.257 0.0 0.1215 + 0.450 0.404 0.0 0.1267 + 0.460 0.523 0.0 0.1295 + 0.470 0.601 0.0 0.1292 + 0.480 0.632 0.0 0.1259 + 0.490 0.614 0.0 0.1210 + 0.500 0.548 0.0 0.1163 + 0.510 0.443 0.0 0.1136 + 0.520 0.307 0.0 0.1141 + 0.530 0.152 0.0 0.1175 + 0.540 -0.007 0.0 0.1222 + 0.550 -0.158 0.0 0.1263 + 0.560 -0.290 0.0 0.1283 + 0.570 -0.393 0.0 0.1277 + 0.580 -0.461 0.0 0.1248 + 0.590 -0.493 0.0 0.1205 + 0.600 -0.490 0.0 0.1166 + 0.610 -0.458 0.0 0.1146 + 0.620 -0.404 0.0 0.1153 + 0.630 -0.338 0.0 0.1184 + 0.640 -0.271 0.0 0.1225 + 0.650 -0.214 0.0 0.1259 + 0.660 -0.176 0.0 0.1275 + 0.670 -0.163 0.0 0.1268 + 0.680 -0.180 0.0 0.1240 + 0.690 -0.228 0.0 0.1203 + 0.700 -0.306 0.0 0.1171 + 0.710 -0.409 0.0 0.1156 + 0.720 -0.529 0.0 0.1164 + 0.730 -0.659 0.0 0.1192 + 0.740 -0.789 0.0 0.1226 + 0.750 -0.910 0.0 0.1254 + 0.760 -1.015 0.0 0.1265 + 0.770 -1.097 0.0 0.1257 + 0.780 -1.153 0.0 0.1232 + 0.790 -1.181 0.0 0.1200 + 0.800 -1.185 0.0 0.1173 + 0.810 -1.166 0.0 0.1163 + 0.820 -1.132 0.0 0.1173 + 0.830 -1.088 0.0 0.1198 + 0.840 -1.043 0.0 0.1228 + 0.850 -1.002 0.0 0.1251 + 0.860 -0.973 0.0 0.1259 + 0.870 -0.958 0.0 0.1249 + 0.880 -0.961 0.0 0.1226 + 0.890 -0.982 0.0 0.1198 + 0.900 -1.018 0.0 0.1177 + 0.910 -1.066 0.0 0.1170 + 0.920 -1.122 0.0 0.1181 + 0.930 -1.179 0.0 0.1204 + 0.940 -1.232 0.0 0.1229 + 0.950 -1.277 0.0 0.1247 + 0.960 -1.308 0.0 0.1251 + 0.970 -1.324 0.0 0.1240 + 0.980 -1.325 0.0 0.1219 + 0.990 -1.311 0.0 0.1195 + 1.000 -1.287 0.0 0.1178 + 1.010 -1.255 0.0 0.1175 + 1.020 -1.222 0.0 0.1187 + 1.030 -1.192 0.0 0.1208 + 1.040 -1.170 0.0 0.1231 + 1.050 -1.161 0.0 0.1245 + 1.060 -1.165 0.0 0.1246 + 1.070 -1.185 0.0 0.1234 + 1.080 -1.217 0.0 0.1214 + 1.090 -1.260 0.0 0.1193 + 1.100 -1.309 0.0 0.1180 + 1.110 -1.358 0.0 0.1180 + 1.120 -1.401 0.0 0.1193 + 1.130 -1.432 0.0 0.1212 + 1.140 -1.448 0.0 0.1231 + 1.150 -1.443 0.0 0.1242 + 1.160 -1.417 0.0 0.1241 + 1.170 -1.371 0.0 0.1228 + 1.180 -1.307 0.0 0.1209 + 1.190 -1.230 0.0 0.1191 + 1.200 -1.147 0.0 0.1182 + 1.210 -1.065 0.0 0.1184 + 1.220 -0.992 0.0 0.1198 + 1.230 -0.934 0.0 0.1217 + 1.240 -0.898 0.0 0.1233 + 1.250 -0.888 0.0 0.1241 + 1.260 -0.905 0.0 0.1237 + 1.270 -0.950 0.0 0.1224 + 1.280 -1.019 0.0 0.1206 + 1.290 -1.106 0.0 0.1191 + 1.300 -1.205 0.0 0.1184 + 1.310 -1.306 0.0 0.1188 + 1.320 -1.400 0.0 0.1202 + 1.330 -1.479 0.0 0.1220 + 1.340 -1.534 0.0 0.1234 + 1.350 -1.562 0.0 0.1239 + 1.360 -1.557 0.0 0.1234 + 1.370 -1.519 0.0 0.1220 + 1.380 -1.452 0.0 0.1204 + 1.390 -1.360 0.0 0.1190 + 1.400 -1.251 0.0 0.1186 + 1.410 -1.133 0.0 0.1193 + 1.420 -1.017 0.0 0.1207 + 1.430 -0.913 0.0 0.1224 + 1.440 -0.830 0.0 0.1236 + 1.450 -0.775 0.0 0.1239 + 1.460 -0.755 0.0 0.1232 + 1.470 -0.770 0.0 0.1217 + 1.480 -0.822 0.0 0.1201 + 1.490 -0.906 0.0 0.1190 + 1.500 -1.017 0.0 0.1188 + 1.510 -1.147 0.0 0.1196 + 1.520 -1.285 0.0 0.1210 + 1.530 -1.422 0.0 0.1226 + 1.540 -1.548 0.0 0.1236 + 1.550 -1.653 0.0 0.1238 + 1.560 -1.730 0.0 0.1230 + 1.570 -1.774 0.0 0.1216 + 1.580 -1.781 0.0 0.1201 + 1.590 -1.753 0.0 0.1191 + 1.600 -1.691 0.0 0.1190 + 1.610 -1.600 0.0 0.1198 + 1.620 -1.487 0.0 0.1213 + 1.630 -1.360 0.0 0.1227 + 1.640 -1.227 0.0 0.1236 + 1.650 -1.097 0.0 0.1236 + 1.660 -0.977 0.0 0.1227 + 1.670 -0.876 0.0 0.1213 + 1.680 -0.797 0.0 0.1200 + 1.690 -0.747 0.0 0.1191 + 1.700 -0.727 0.0 0.1191 + 1.710 -0.739 0.0 0.1200 + 1.720 -0.782 0.0 0.1214 + 1.730 -0.858 0.0 0.1227 + 1.740 -0.964 0.0 0.1234 + 1.750 -1.099 0.0 0.1234 + 1.760 -1.262 0.0 0.1225 + 1.770 -1.452 0.0 0.1212 + 1.780 -1.668 0.0 0.1200 + 1.790 -1.908 0.0 0.1193 + 1.800 -2.171 0.0 0.1195 + 1.810 -2.456 0.0 0.1204 + 1.820 -2.758 0.0 0.1216 + 1.830 -3.075 0.0 0.1227 + 1.840 -3.401 0.0 0.1233 + 1.850 -3.730 0.0 0.1230 + 1.860 -4.053 0.0 0.1221 + 1.870 -4.362 0.0 0.1209 + 1.880 -4.647 0.0 0.1198 + 1.890 -4.897 0.0 0.1194 + 1.900 -5.103 0.0 0.1197 + 1.910 -5.256 0.0 0.1206 + 1.920 -5.349 0.0 0.1218 + 1.930 -5.378 0.0 0.1227 + 1.940 -5.342 0.0 0.1231 + 1.950 -5.241 0.0 0.1227 + 1.960 -5.081 0.0 0.1218 + 1.970 -4.869 0.0 0.1207 + 1.980 -4.618 0.0 0.1198 + 1.990 -4.340 0.0 0.1196 + 2.000 -4.050 0.0 0.1200 + 2.010 -3.762 0.0 0.1210 + 2.020 -3.493 0.0 0.1221 + 2.030 -3.253 0.0 0.1229 + 2.040 -3.056 0.0 0.1231 + 2.050 -2.907 0.0 0.1226 + 2.060 -2.811 0.0 0.1215 + 2.070 -2.769 0.0 0.1204 + 2.080 -2.778 0.0 0.1197 + 2.090 -2.831 0.0 0.1196 + 2.100 -2.918 0.0 0.1201 + 2.110 -3.029 0.0 0.1211 + 2.120 -3.150 0.0 0.1222 + 2.130 -3.270 0.0 0.1229 + 2.140 -3.377 0.0 0.1229 + 2.150 -3.460 0.0 0.1223 + 2.160 -3.511 0.0 0.1213 + 2.170 -3.525 0.0 0.1202 + 2.180 -3.499 0.0 0.1196 + 2.190 -3.432 0.0 0.1196 + 2.200 -3.327 0.0 0.1202 + 2.210 -3.188 0.0 0.1213 + 2.220 -3.019 0.0 0.1223 + 2.230 -2.825 0.0 0.1229 + 2.240 -2.613 0.0 0.1229 + 2.250 -2.385 0.0 0.1222 + 2.260 -2.145 0.0 0.1212 + 2.270 -1.895 0.0 0.1202 + 2.280 -1.633 0.0 0.1197 + 2.290 -1.359 0.0 0.1197 + 2.300 -1.069 0.0 0.1204 + 2.310 -0.761 0.0 0.1214 + 2.320 -0.431 0.0 0.1223 + 2.330 -0.077 0.0 0.1228 + 2.340 0.303 0.0 0.1227 + 2.350 0.706 0.0 0.1221 + 2.360 1.131 0.0 0.1211 + 2.370 1.571 0.0 0.1203 + 2.380 2.020 0.0 0.1198 + 2.390 2.466 0.0 0.1199 + 2.400 2.899 0.0 0.1206 + 2.410 3.309 0.0 0.1215 + 2.420 3.682 0.0 0.1223 + 2.430 4.010 0.0 0.1227 + 2.440 4.285 0.0 0.1225 + 2.450 4.501 0.0 0.1218 + 2.460 4.656 0.0 0.1210 + 2.470 4.751 0.0 0.1203 + 2.480 4.792 0.0 0.1200 + 2.490 4.788 0.0 0.1203 + 2.500 4.749 0.0 0.1210 + 2.510 4.688 0.0 0.1218 + 2.520 4.620 0.0 0.1225 + 2.530 4.558 0.0 0.1226 + 2.540 4.518 0.0 0.1223 + 2.550 4.508 0.0 0.1215 + 2.560 4.539 0.0 0.1207 + 2.570 4.615 0.0 0.1201 + 2.580 4.738 0.0 0.1200 + 2.590 4.907 0.0 0.1204 + 2.600 5.115 0.0 0.1212 + 2.610 5.354 0.0 0.1220 + 2.620 5.613 0.0 0.1226 + 2.630 5.882 0.0 0.1226 + 2.640 6.146 0.0 0.1222 + 2.650 6.395 0.0 0.1213 + 2.660 6.619 0.0 0.1205 + 2.670 6.808 0.0 0.1200 + 2.680 6.957 0.0 0.1200 + 2.690 7.063 0.0 0.1205 + 2.700 7.126 0.0 0.1214 + 2.710 7.148 0.0 0.1222 + 2.720 7.134 0.0 0.1227 + 2.730 7.090 0.0 0.1226 + 2.740 7.023 0.0 0.1221 + 2.750 6.941 0.0 0.1212 + 2.760 6.849 0.0 0.1204 + 2.770 6.754 0.0 0.1200 + 2.780 6.659 0.0 0.1201 + 2.790 6.567 0.0 0.1206 + 2.800 6.477 0.0 0.1215 + 2.810 6.388 0.0 0.1222 + 2.820 6.297 0.0 0.1226 + 2.830 6.201 0.0 0.1225 + 2.840 6.094 0.0 0.1219 + 2.850 5.972 0.0 0.1211 + 2.860 5.832 0.0 0.1204 + 2.870 5.671 0.0 0.1200 + 2.880 5.487 0.0 0.1202 + 2.890 5.281 0.0 0.1209 + 2.900 5.053 0.0 0.1217 + 2.910 4.807 0.0 0.1224 + 2.920 4.548 0.0 0.1227 + 2.930 4.279 0.0 0.1225 + 2.940 4.006 0.0 0.1218 + 2.950 3.734 0.0 0.1210 + 2.960 3.467 0.0 0.1203 + 2.970 3.208 0.0 0.1200 + 2.980 2.958 0.0 0.1202 + 2.990 2.720 0.0 0.1209 + 3.000 2.491 0.0 0.1218 + 3.010 2.269 0.0 0.1224 + 3.020 2.053 0.0 0.1227 + 3.030 1.838 0.0 0.1224 + 3.040 1.622 0.0 0.1217 + 3.050 1.402 0.0 0.1209 + 3.060 1.176 0.0 0.1202 + 3.070 0.942 0.0 0.1200 + 3.080 0.703 0.0 0.1203 + 3.090 0.459 0.0 0.1210 + 3.100 0.213 0.0 0.1218 + 3.110 -0.029 0.0 0.1224 + 3.120 -0.263 0.0 0.1226 + 3.130 -0.484 0.0 0.1223 + 3.140 -0.688 0.0 0.1216 + 3.150 -0.868 0.0 0.1208 + 3.160 -1.024 0.0 0.1202 + 3.170 -1.152 0.0 0.1201 + 3.180 -1.254 0.0 0.1204 + 3.190 -1.330 0.0 0.1211 + 3.200 -1.385 0.0 0.1218 + 3.210 -1.423 0.0 0.1223 + 3.220 -1.450 0.0 0.1224 + 3.230 -1.472 0.0 0.1220 + 3.240 -1.495 0.0 0.1214 + 3.250 -1.526 0.0 0.1206 + 3.260 -1.568 0.0 0.1202 + 3.270 -1.625 0.0 0.1201 + 3.280 -1.698 0.0 0.1205 + 3.290 -1.787 0.0 0.1212 + 3.300 -1.888 0.0 0.1220 + 3.310 -1.998 0.0 0.1224 + 3.320 -2.111 0.0 0.1224 + 3.330 -2.220 0.0 0.1219 + 3.340 -2.319 0.0 0.1212 + 3.350 -2.401 0.0 0.1205 + 3.360 -2.460 0.0 0.1201 + 3.370 -2.492 0.0 0.1201 + 3.380 -2.495 0.0 0.1206 + 3.390 -2.467 0.0 0.1213 + 3.400 -2.411 0.0 0.1220 + 3.410 -2.329 0.0 0.1224 + 3.420 -2.229 0.0 0.1223 + 3.430 -2.116 0.0 0.1219 + 3.440 -1.998 0.0 0.1212 + 3.450 -1.885 0.0 0.1205 + 3.460 -1.785 0.0 0.1202 + 3.470 -1.705 0.0 0.1202 + 3.480 -1.652 0.0 0.1207 + 3.490 -1.631 0.0 0.1214 + 3.500 -1.645 0.0 0.1220 + 3.510 -1.696 0.0 0.1223 + 3.520 -1.782 0.0 0.1222 + 3.530 -1.901 0.0 0.1217 + 3.540 -2.049 0.0 0.1211 + 3.550 -2.219 0.0 0.1205 + 3.560 -2.405 0.0 0.1203 + 3.570 -2.600 0.0 0.1204 + 3.580 -2.797 0.0 0.1209 + 3.590 -2.990 0.0 0.1215 + 3.600 -3.171 0.0 0.1220 + 3.610 -3.337 0.0 0.1223 + 3.620 -3.483 0.0 0.1221 + 3.630 -3.605 0.0 0.1216 + 3.640 -3.702 0.0 0.1210 + 3.650 -3.771 0.0 0.1205 + 3.660 -3.813 0.0 0.1204 + 3.670 -3.826 0.0 0.1206 + 3.680 -3.810 0.0 0.1211 + 3.690 -3.765 0.0 0.1217 + 3.700 -3.691 0.0 0.1221 + 3.710 -3.589 0.0 0.1222 + 3.720 -3.456 0.0 0.1219 + 3.730 -3.294 0.0 0.1214 + 3.740 -3.101 0.0 0.1209 + 3.750 -2.880 0.0 0.1205 + 3.760 -2.629 0.0 0.1205 + 3.770 -2.351 0.0 0.1208 + 3.780 -2.049 0.0 0.1213 + 3.790 -1.726 0.0 0.1219 + 3.800 -1.387 0.0 0.1222 + 3.810 -1.038 0.0 0.1222 + 3.820 -0.686 0.0 0.1219 + 3.830 -0.338 0.0 0.1213 + 3.840 -0.003 0.0 0.1208 + 3.850 0.312 0.0 0.1205 + 3.860 0.598 0.0 0.1205 + 3.870 0.848 0.0 0.1209 + 3.880 1.056 0.0 0.1215 + 3.890 1.215 0.0 0.1220 + 3.900 1.323 0.0 0.1223 + 3.910 1.377 0.0 0.1222 + 3.920 1.376 0.0 0.1218 + 3.930 1.322 0.0 0.1212 + 3.940 1.217 0.0 0.1206 + 3.950 1.065 0.0 0.1204 + 3.960 0.871 0.0 0.1205 + 3.970 0.640 0.0 0.1210 + 3.980 0.378 0.0 0.1216 + 3.990 0.091 0.0 0.1221 + 4.000 -0.215 0.0 0.1223 + 4.010 -0.536 0.0 0.1222 + 4.020 -0.866 0.0 0.1217 + 4.030 -1.203 0.0 0.1211 + 4.040 -1.543 0.0 0.1206 + 4.050 -1.884 0.0 0.1204 + 4.060 -2.224 0.0 0.1206 + 4.070 -2.562 0.0 0.1211 + 4.080 -2.896 0.0 0.1217 + 4.090 -3.225 0.0 0.1222 + 4.100 -3.547 0.0 0.1223 + 4.110 -3.859 0.0 0.1221 + 4.120 -4.159 0.0 0.1216 + 4.130 -4.443 0.0 0.1210 + 4.140 -4.707 0.0 0.1205 + 4.150 -4.946 0.0 0.1203 + 4.160 -5.155 0.0 0.1205 + 4.170 -5.329 0.0 0.1211 + 4.180 -5.463 0.0 0.1217 + 4.190 -5.552 0.0 0.1222 + 4.200 -5.595 0.0 0.1224 + 4.210 -5.588 0.0 0.1221 + 4.220 -5.529 0.0 0.1216 + 4.230 -5.421 0.0 0.1210 + 4.240 -5.265 0.0 0.1205 + 4.250 -5.064 0.0 0.1204 + 4.260 -4.824 0.0 0.1206 + 4.270 -4.551 0.0 0.1211 + 4.280 -4.251 0.0 0.1217 + 4.290 -3.932 0.0 0.1221 + 4.300 -3.602 0.0 0.1222 + 4.310 -3.268 0.0 0.1219 + 4.320 -2.936 0.0 0.1214 + 4.330 -2.613 0.0 0.1209 + 4.340 -2.302 0.0 0.1205 + 4.350 -2.007 0.0 0.1204 + 4.360 -1.729 0.0 0.1207 + 4.370 -1.469 0.0 0.1212 + 4.380 -1.226 0.0 0.1218 + 4.390 -0.996 0.0 0.1221 + 4.400 -0.779 0.0 0.1222 + 4.410 -0.569 0.0 0.1219 + 4.420 -0.365 0.0 0.1213 + 4.430 -0.162 0.0 0.1208 + 4.440 0.042 0.0 0.1205 + 4.450 0.248 0.0 0.1205 + 4.460 0.456 0.0 0.1208 + 4.470 0.667 0.0 0.1213 + 4.480 0.878 0.0 0.1218 + 4.490 1.086 0.0 0.1221 + 4.500 1.288 0.0 0.1220 + 4.510 1.481 0.0 0.1217 + 4.520 1.658 0.0 0.1212 + 4.530 1.818 0.0 0.1207 + 4.540 1.955 0.0 0.1204 + 4.550 2.067 0.0 0.1205 + 4.560 2.153 0.0 0.1208 + 4.570 2.213 0.0 0.1214 + 4.580 2.249 0.0 0.1218 + 4.590 2.262 0.0 0.1221 + 4.600 2.258 0.0 0.1220 + 4.610 2.241 0.0 0.1216 + 4.620 2.219 0.0 0.1211 + 4.630 2.198 0.0 0.1207 + 4.640 2.185 0.0 0.1204 + 4.650 2.185 0.0 0.1206 + 4.660 2.205 0.0 0.1209 + 4.670 2.249 0.0 0.1214 + 4.680 2.319 0.0 0.1219 + 4.690 2.416 0.0 0.1220 + 4.700 2.540 0.0 0.1219 + 4.710 2.688 0.0 0.1215 + 4.720 2.856 0.0 0.1210 + 4.730 3.037 0.0 0.1206 + 4.740 3.226 0.0 0.1204 + 4.750 3.413 0.0 0.1206 + 4.760 3.592 0.0 0.1210 + 4.770 3.755 0.0 0.1215 + 4.780 3.896 0.0 0.1219 + 4.790 4.007 0.0 0.1220 + 4.800 4.084 0.0 0.1219 + 4.810 4.125 0.0 0.1215 + 4.820 4.129 0.0 0.1210 + 4.830 4.094 0.0 0.1207 + 4.840 4.025 0.0 0.1206 + 4.850 3.923 0.0 0.1208 + 4.860 3.794 0.0 0.1212 + 4.870 3.642 0.0 0.1216 + 4.880 3.474 0.0 0.1219 + 4.890 3.295 0.0 0.1220 + 4.900 3.112 0.0 0.1218 + 4.910 2.928 0.0 0.1214 + 4.920 2.748 0.0 0.1210 + 4.930 2.576 0.0 0.1207 + 4.940 2.412 0.0 0.1207 + 4.950 2.258 0.0 0.1210 + 4.960 2.113 0.0 0.1214 + 4.970 1.977 0.0 0.1218 + 4.980 1.847 0.0 0.1220 + 4.990 1.720 0.0 0.1220 + 5.000 1.594 0.0 0.1217 + 5.010 1.467 0.0 0.1213 + 5.020 1.336 0.0 0.1209 + 5.030 1.199 0.0 0.1207 + 5.040 1.057 0.0 0.1208 + 5.050 0.908 0.0 0.1211 + 5.060 0.754 0.0 0.1215 + 5.070 0.597 0.0 0.1219 + 5.080 0.440 0.0 0.1220 + 5.090 0.286 0.0 0.1219 + 5.100 0.140 0.0 0.1216 + 5.110 0.005 0.0 0.1211 + 5.120 -0.113 0.0 0.1208 + 5.130 -0.212 0.0 0.1206 + 5.140 -0.288 0.0 0.1207 + 5.150 -0.338 0.0 0.1211 + 5.160 -0.360 0.0 0.1216 + 5.170 -0.356 0.0 0.1220 + 5.180 -0.325 0.0 0.1221 + 5.190 -0.270 0.0 0.1220 + 5.200 -0.195 0.0 0.1216 + 5.210 -0.104 0.0 0.1211 + 5.220 -0.003 0.0 0.1208 + 5.230 0.102 0.0 0.1207 + 5.240 0.205 0.0 0.1208 + 5.250 0.299 0.0 0.1212 + 5.260 0.378 0.0 0.1217 + 5.270 0.439 0.0 0.1220 + 5.280 0.476 0.0 0.1221 + 5.290 0.487 0.0 0.1219 + 5.300 0.472 0.0 0.1215 + 5.310 0.432 0.0 0.1210 + 5.320 0.368 0.0 0.1207 + 5.330 0.285 0.0 0.1206 + 5.340 0.188 0.0 0.1208 + 5.350 0.084 0.0 0.1212 + 5.360 -0.020 0.0 0.1217 + 5.370 -0.116 0.0 0.1220 + 5.380 -0.197 0.0 0.1220 + 5.390 -0.256 0.0 0.1218 + 5.400 -0.287 0.0 0.1214 + 5.410 -0.287 0.0 0.1209 + 5.420 -0.250 0.0 0.1206 + 5.430 -0.178 0.0 0.1206 + 5.440 -0.070 0.0 0.1208 + 5.450 0.070 0.0 0.1212 + 5.460 0.240 0.0 0.1217 + 5.470 0.433 0.0 0.1219 + 5.480 0.643 0.0 0.1219 + 5.490 0.863 0.0 0.1217 + 5.500 1.086 0.0 0.1212 + 5.510 1.306 0.0 0.1208 + 5.520 1.515 0.0 0.1206 + 5.530 1.711 0.0 0.1206 + 5.540 1.889 0.0 0.1209 + 5.550 2.048 0.0 0.1214 + 5.560 2.187 0.0 0.1218 + 5.570 2.307 0.0 0.1221 + 5.580 2.412 0.0 0.1220 + 5.590 2.504 0.0 0.1217 + 5.600 2.587 0.0 0.1213 + 5.610 2.664 0.0 0.1209 + 5.620 2.740 0.0 0.1206 + 5.630 2.817 0.0 0.1207 + 5.640 2.897 0.0 0.1210 + 5.650 2.979 0.0 0.1214 + 5.660 3.062 0.0 0.1218 + 5.670 3.144 0.0 0.1220 + 5.680 3.221 0.0 0.1219 + 5.690 3.287 0.0 0.1216 + 5.700 3.338 0.0 0.1212 + 5.710 3.366 0.0 0.1208 + 5.720 3.366 0.0 0.1206 + 5.730 3.333 0.0 0.1207 + 5.740 3.264 0.0 0.1210 + 5.750 3.156 0.0 0.1214 + 5.760 3.009 0.0 0.1218 + 5.770 2.825 0.0 0.1219 + 5.780 2.606 0.0 0.1218 + 5.790 2.357 0.0 0.1215 + 5.800 2.087 0.0 0.1211 + 5.810 1.802 0.0 0.1207 + 5.820 1.511 0.0 0.1206 + 5.830 1.222 0.0 0.1207 + 5.840 0.944 0.0 0.1210 + 5.850 0.684 0.0 0.1214 + 5.860 0.447 0.0 0.1218 + 5.870 0.238 0.0 0.1219 + 5.880 0.059 0.0 0.1217 + 5.890 -0.089 0.0 0.1214 + 5.900 -0.208 0.0 0.1210 + 5.910 -0.301 0.0 0.1207 + 5.920 -0.374 0.0 0.1206 + 5.930 -0.430 0.0 0.1208 + 5.940 -0.477 0.0 0.1212 + 5.950 -0.520 0.0 0.1216 + 5.960 -0.566 0.0 0.1219 + 5.970 -0.619 0.0 0.1219 + 5.980 -0.684 0.0 0.1217 + 5.990 -0.763 0.0 0.1214 + 6.000 -0.859 0.0 0.1210 + 6.010 -0.971 0.0 0.1207 + 6.020 -1.098 0.0 0.1207 + 6.030 -1.238 0.0 0.1209 + 6.040 -1.388 0.0 0.1212 + 6.050 -1.545 0.0 0.1216 + 6.060 -1.705 0.0 0.1219 + 6.070 -1.865 0.0 0.1220 + 6.080 -2.021 0.0 0.1217 + 6.090 -2.172 0.0 0.1214 + 6.100 -2.315 0.0 0.1210 + 6.110 -2.449 0.0 0.1207 + 6.120 -2.575 0.0 0.1207 + 6.130 -2.694 0.0 0.1209 + 6.140 -2.805 0.0 0.1213 + 6.150 -2.912 0.0 0.1217 + 6.160 -3.016 0.0 0.1219 + 6.170 -3.119 0.0 0.1219 + 6.180 -3.223 0.0 0.1217 + 6.190 -3.329 0.0 0.1213 + 6.200 -3.439 0.0 0.1210 + 6.210 -3.552 0.0 0.1208 + 6.220 -3.669 0.0 0.1208 + 6.230 -3.789 0.0 0.1211 + 6.240 -3.911 0.0 0.1214 + 6.250 -4.033 0.0 0.1217 + 6.260 -4.153 0.0 0.1219 + 6.270 -4.269 0.0 0.1218 + 6.280 -4.378 0.0 0.1216 + 6.290 -4.478 0.0 0.1213 + 6.300 -4.567 0.0 0.1210 + 6.310 -4.640 0.0 0.1208 + 6.320 -4.697 0.0 0.1209 + 6.330 -4.734 0.0 0.1212 + 6.340 -4.751 0.0 0.1215 + 6.350 -4.745 0.0 0.1218 + 6.360 -4.714 0.0 0.1219 + 6.370 -4.659 0.0 0.1218 + 6.380 -4.578 0.0 0.1215 + 6.390 -4.473 0.0 0.1211 + 6.400 -4.344 0.0 0.1209 + 6.410 -4.194 0.0 0.1208 + 6.420 -4.025 0.0 0.1209 + 6.430 -3.840 0.0 0.1212 + 6.440 -3.645 0.0 0.1215 + 6.450 -3.443 0.0 0.1218 + 6.460 -3.241 0.0 0.1219 + 6.470 -3.045 0.0 0.1217 + 6.480 -2.860 0.0 0.1214 + 6.490 -2.691 0.0 0.1211 + 6.500 -2.545 0.0 0.1208 + 6.510 -2.424 0.0 0.1208 + 6.520 -2.333 0.0 0.1210 + 6.530 -2.272 0.0 0.1213 + 6.540 -2.241 0.0 0.1217 + 6.550 -2.239 0.0 0.1219 + 6.560 -2.262 0.0 0.1219 + 6.570 -2.305 0.0 0.1216 + 6.580 -2.361 0.0 0.1213 + 6.590 -2.425 0.0 0.1209 + 6.600 -2.488 0.0 0.1207 + 6.610 -2.541 0.0 0.1207 + 6.620 -2.578 0.0 0.1209 + 6.630 -2.592 0.0 0.1213 + 6.640 -2.577 0.0 0.1216 + 6.650 -2.530 0.0 0.1219 + 6.660 -2.449 0.0 0.1218 + 6.670 -2.334 0.0 0.1216 + 6.680 -2.187 0.0 0.1213 + 6.690 -2.012 0.0 0.1209 + 6.700 -1.815 0.0 0.1207 + 6.710 -1.601 0.0 0.1207 + 6.720 -1.380 0.0 0.1209 + 6.730 -1.158 0.0 0.1213 + 6.740 -0.944 0.0 0.1216 + 6.750 -0.743 0.0 0.1218 + 6.760 -0.562 0.0 0.1218 + 6.770 -0.404 0.0 0.1216 + 6.780 -0.272 0.0 0.1212 + 6.790 -0.166 0.0 0.1209 + 6.800 -0.083 0.0 0.1208 + 6.810 -0.022 0.0 0.1208 + 6.820 0.023 0.0 0.1211 + 6.830 0.057 0.0 0.1214 + 6.840 0.088 0.0 0.1217 + 6.850 0.122 0.0 0.1218 + 6.860 0.164 0.0 0.1217 + 6.870 0.222 0.0 0.1214 + 6.880 0.299 0.0 0.1211 + 6.890 0.398 0.0 0.1208 + 6.900 0.521 0.0 0.1207 + 6.910 0.667 0.0 0.1208 + 6.920 0.835 0.0 0.1211 + 6.930 1.021 0.0 0.1215 + 6.940 1.221 0.0 0.1217 + 6.950 1.428 0.0 0.1218 + 6.960 1.636 0.0 0.1217 + 6.970 1.839 0.0 0.1214 + 6.980 2.030 0.0 0.1211 + 6.990 2.203 0.0 0.1209 + 7.000 2.353 0.0 0.1208 + 7.010 2.476 0.0 0.1209 + 7.020 2.569 0.0 0.1212 + 7.030 2.630 0.0 0.1215 + 7.040 2.660 0.0 0.1217 + 7.050 2.658 0.0 0.1217 + 7.060 2.627 0.0 0.1216 + 7.070 2.571 0.0 0.1213 + 7.080 2.493 0.0 0.1210 + 7.090 2.397 0.0 0.1207 + 7.100 2.289 0.0 0.1207 + 7.110 2.173 0.0 0.1209 + 7.120 2.053 0.0 0.1213 + 7.130 1.933 0.0 0.1216 + 7.140 1.819 0.0 0.1218 + 7.150 1.712 0.0 0.1218 + 7.160 1.615 0.0 0.1216 + 7.170 1.531 0.0 0.1213 + 7.180 1.461 0.0 0.1210 + 7.190 1.405 0.0 0.1209 + 7.200 1.366 0.0 0.1209 + 7.210 1.342 0.0 0.1211 + 7.220 1.333 0.0 0.1214 + 7.230 1.340 0.0 0.1217 + 7.240 1.363 0.0 0.1218 + 7.250 1.401 0.0 0.1218 + 7.260 1.455 0.0 0.1216 + 7.270 1.524 0.0 0.1213 + 7.280 1.608 0.0 0.1210 + 7.290 1.707 0.0 0.1208 + 7.300 1.823 0.0 0.1209 + 7.310 1.954 0.0 0.1211 + 7.320 2.099 0.0 0.1215 + 7.330 2.260 0.0 0.1217 + 7.340 2.434 0.0 0.1219 + 7.350 2.620 0.0 0.1218 + 7.360 2.816 0.0 0.1216 + 7.370 3.018 0.0 0.1213 + 7.380 3.224 0.0 0.1210 + 7.390 3.430 0.0 0.1209 + 7.400 3.631 0.0 0.1210 + 7.410 3.823 0.0 0.1213 + 7.420 4.001 0.0 0.1216 + 7.430 4.160 0.0 0.1218 + 7.440 4.297 0.0 0.1219 + 7.450 4.406 0.0 0.1218 + 7.460 4.486 0.0 0.1215 + 7.470 4.534 0.0 0.1212 + 7.480 4.550 0.0 0.1209 + 7.490 4.533 0.0 0.1208 + 7.500 4.485 0.0 0.1210 + 7.510 4.408 0.0 0.1212 + 7.520 4.306 0.0 0.1216 + 7.530 4.183 0.0 0.1218 + 7.540 4.044 0.0 0.1218 + 7.550 3.892 0.0 0.1217 + 7.560 3.733 0.0 0.1214 + 7.570 3.571 0.0 0.1211 + 7.580 3.409 0.0 0.1209 + 7.590 3.251 0.0 0.1208 + 7.600 3.097 0.0 0.1210 + 7.610 2.949 0.0 0.1213 + 7.620 2.804 0.0 0.1216 + 7.630 2.663 0.0 0.1218 + 7.640 2.523 0.0 0.1218 + 7.650 2.380 0.0 0.1216 + 7.660 2.233 0.0 0.1213 + 7.670 2.077 0.0 0.1210 + 7.680 1.911 0.0 0.1208 + 7.690 1.734 0.0 0.1208 + 7.700 1.543 0.0 0.1210 + 7.710 1.341 0.0 0.1213 + 7.720 1.128 0.0 0.1216 + 7.730 0.906 0.0 0.1218 + 7.740 0.681 0.0 0.1218 + 7.750 0.455 0.0 0.1216 + 7.760 0.234 0.0 0.1213 + 7.770 0.022 0.0 0.1209 + 7.780 -0.176 0.0 0.1208 + 7.790 -0.356 0.0 0.1208 + 7.800 -0.514 0.0 0.1210 + 7.810 -0.650 0.0 0.1213 + 7.820 -0.761 0.0 0.1216 + 7.830 -0.848 0.0 0.1218 + 7.840 -0.912 0.0 0.1217 + 7.850 -0.957 0.0 0.1215 + 7.860 -0.984 0.0 0.1212 + 7.870 -0.997 0.0 0.1209 + 7.880 -1.000 0.0 0.1208 + 7.890 -0.996 0.0 0.1208 + 7.900 -0.988 0.0 0.1210 + 7.910 -0.978 0.0 0.1213 + 7.920 -0.968 0.0 0.1216 + 7.930 -0.958 0.0 0.1217 + 7.940 -0.949 0.0 0.1217 + 7.950 -0.939 0.0 0.1214 + 7.960 -0.928 0.0 0.1211 + 7.970 -0.914 0.0 0.1209 + 7.980 -0.897 0.0 0.1207 + 7.990 -0.876 0.0 0.1208 + 8.000 -0.850 0.0 0.1211 + 8.010 -0.821 0.0 0.1214 + 8.020 -0.791 0.0 0.1217 + 8.030 -0.761 0.0 0.1218 + 8.040 -0.736 0.0 0.1217 + 8.050 -0.718 0.0 0.1215 + 8.060 -0.711 0.0 0.1211 + 8.070 -0.718 0.0 0.1209 + 8.080 -0.742 0.0 0.1208 + 8.090 -0.784 0.0 0.1209 + 8.100 -0.845 0.0 0.1211 + 8.110 -0.922 0.0 0.1214 + 8.120 -1.014 0.0 0.1217 + 8.130 -1.115 0.0 0.1218 + 8.140 -1.220 0.0 0.1216 + 8.150 -1.322 0.0 0.1214 + 8.160 -1.415 0.0 0.1211 + 8.170 -1.489 0.0 0.1208 + 8.180 -1.540 0.0 0.1208 + 8.190 -1.561 0.0 0.1209 + 8.200 -1.549 0.0 0.1212 + 8.210 -1.501 0.0 0.1215 + 8.220 -1.417 0.0 0.1217 + 8.230 -1.300 0.0 0.1218 + 8.240 -1.155 0.0 0.1217 + 8.250 -0.988 0.0 0.1214 + 8.260 -0.808 0.0 0.1211 + 8.270 -0.624 0.0 0.1209 + 8.280 -0.445 0.0 0.1209 + 8.290 -0.282 0.0 0.1210 + 8.300 -0.144 0.0 0.1213 + 8.310 -0.038 0.0 0.1216 + 8.320 0.030 0.0 0.1218 + 8.330 0.056 0.0 0.1218 + 8.340 0.039 0.0 0.1216 + 8.350 -0.020 0.0 0.1214 + 8.360 -0.119 0.0 0.1211 + 8.370 -0.253 0.0 0.1210 + 8.380 -0.415 0.0 0.1209 + 8.390 -0.598 0.0 0.1211 + 8.400 -0.794 0.0 0.1214 + 8.410 -0.996 0.0 0.1216 + 8.420 -1.195 0.0 0.1217 + 8.430 -1.387 0.0 0.1217 + 8.440 -1.565 0.0 0.1216 + 8.450 -1.725 0.0 0.1213 + 8.460 -1.864 0.0 0.1211 + 8.470 -1.980 0.0 0.1210 + 8.480 -2.073 0.0 0.1210 + 8.490 -2.143 0.0 0.1211 + 8.500 -2.189 0.0 0.1214 + 8.510 -2.213 0.0 0.1216 + 8.520 -2.215 0.0 0.1217 + 8.530 -2.196 0.0 0.1217 + 8.540 -2.156 0.0 0.1215 + 8.550 -2.096 0.0 0.1213 + 8.560 -2.016 0.0 0.1210 + 8.570 -1.916 0.0 0.1210 + 8.580 -1.798 0.0 0.1210 + 8.590 -1.664 0.0 0.1212 + 8.600 -1.516 0.0 0.1214 + 8.610 -1.358 0.0 0.1216 + 8.620 -1.194 0.0 0.1217 + 8.630 -1.030 0.0 0.1216 + 8.640 -0.872 0.0 0.1214 + 8.650 -0.728 0.0 0.1212 + 8.660 -0.604 0.0 0.1210 + 8.670 -0.508 0.0 0.1210 + 8.680 -0.446 0.0 0.1211 + 8.690 -0.423 0.0 0.1213 + 8.700 -0.442 0.0 0.1215 + 8.710 -0.505 0.0 0.1217 + 8.720 -0.611 0.0 0.1217 + 8.730 -0.758 0.0 0.1216 + 8.740 -0.941 0.0 0.1214 + 8.750 -1.154 0.0 0.1211 + 8.760 -1.387 0.0 0.1210 + 8.770 -1.633 0.0 0.1210 + 8.780 -1.883 0.0 0.1211 + 8.790 -2.127 0.0 0.1213 + 8.800 -2.357 0.0 0.1215 + 8.810 -2.568 0.0 0.1216 + 8.820 -2.753 0.0 0.1216 + 8.830 -2.911 0.0 0.1215 + 8.840 -3.041 0.0 0.1212 + 8.850 -3.144 0.0 0.1210 + 8.860 -3.222 0.0 0.1209 + 8.870 -3.280 0.0 0.1210 + 8.880 -3.323 0.0 0.1212 + 8.890 -3.357 0.0 0.1214 + 8.900 -3.384 0.0 0.1216 + 8.910 -3.411 0.0 0.1217 + 8.920 -3.438 0.0 0.1216 + 8.930 -3.467 0.0 0.1214 + 8.940 -3.498 0.0 0.1212 + 8.950 -3.529 0.0 0.1209 + 8.960 -3.554 0.0 0.1208 + 8.970 -3.571 0.0 0.1209 + 8.980 -3.574 0.0 0.1211 + 8.990 -3.556 0.0 0.1214 + 9.000 -3.515 0.0 0.1216 + 9.010 -3.445 0.0 0.1217 + 9.020 -3.346 0.0 0.1216 + 9.030 -3.215 0.0 0.1214 + 9.040 -3.055 0.0 0.1211 + 9.050 -2.869 0.0 0.1209 + 9.060 -2.661 0.0 0.1208 + 9.070 -2.438 0.0 0.1209 + 9.080 -2.207 0.0 0.1212 + 9.090 -1.976 0.0 0.1214 + 9.100 -1.752 0.0 0.1216 + 9.110 -1.542 0.0 0.1217 + 9.120 -1.351 0.0 0.1216 + 9.130 -1.183 0.0 0.1214 + 9.140 -1.041 0.0 0.1211 + 9.150 -0.925 0.0 0.1209 + 9.160 -0.835 0.0 0.1209 + 9.170 -0.768 0.0 0.1210 + 9.180 -0.720 0.0 0.1212 + 9.190 -0.688 0.0 0.1215 + 9.200 -0.666 0.0 0.1217 + 9.210 -0.651 0.0 0.1217 + 9.220 -0.638 0.0 0.1216 + 9.230 -0.626 0.0 0.1214 + 9.240 -0.611 0.0 0.1211 + 9.250 -0.593 0.0 0.1209 + 9.260 -0.572 0.0 0.1209 + 9.270 -0.546 0.0 0.1210 + 9.280 -0.518 0.0 0.1212 + 9.290 -0.487 0.0 0.1215 + 9.300 -0.453 0.0 0.1217 + 9.310 -0.416 0.0 0.1217 + 9.320 -0.372 0.0 0.1216 + 9.330 -0.320 0.0 0.1213 + 9.340 -0.255 0.0 0.1211 + 9.350 -0.172 0.0 0.1209 + 9.360 -0.066 0.0 0.1209 + 9.370 0.070 0.0 0.1211 + 9.380 0.241 0.0 0.1213 + 9.390 0.451 0.0 0.1215 + 9.400 0.704 0.0 0.1217 + 9.410 1.001 0.0 0.1217 + 9.420 1.341 0.0 0.1215 + 9.430 1.721 0.0 0.1213 + 9.440 2.135 0.0 0.1211 + 9.450 2.576 0.0 0.1210 + 9.460 3.035 0.0 0.1210 + 9.470 3.500 0.0 0.1211 + 9.480 3.959 0.0 0.1214 + 9.490 4.403 0.0 0.1216 + 9.500 4.819 0.0 0.1217 + 9.510 5.199 0.0 0.1217 + 9.520 5.536 0.0 0.1215 + 9.530 5.823 0.0 0.1213 + 9.540 6.060 0.0 0.1210 + 9.550 6.246 0.0 0.1209 + 9.560 6.384 0.0 0.1210 + 9.570 6.477 0.0 0.1211 + 9.580 6.533 0.0 0.1214 + 9.590 6.558 0.0 0.1216 + 9.600 6.558 0.0 0.1217 + 9.610 6.541 0.0 0.1216 + 9.620 6.512 0.0 0.1215 + 9.630 6.474 0.0 0.1212 + 9.640 6.430 0.0 0.1210 + 9.650 6.379 0.0 0.1210 + 9.660 6.321 0.0 0.1210 + 9.670 6.251 0.0 0.1212 + 9.680 6.166 0.0 0.1215 + 9.690 6.060 0.0 0.1216 + 9.700 5.929 0.0 0.1217 + 9.710 5.768 0.0 0.1216 + 9.720 5.574 0.0 0.1214 + 9.730 5.346 0.0 0.1212 + 9.740 5.085 0.0 0.1210 + 9.750 4.792 0.0 0.1210 + 9.760 4.472 0.0 0.1211 + 9.770 4.132 0.0 0.1213 + 9.780 3.778 0.0 0.1215 + 9.790 3.420 0.0 0.1216 + 9.800 3.065 0.0 0.1217 + 9.810 2.722 0.0 0.1216 + 9.820 2.398 0.0 0.1214 + 9.830 2.098 0.0 0.1211 + 9.840 1.826 0.0 0.1210 + 9.850 1.584 0.0 0.1210 + 9.860 1.371 0.0 0.1211 + 9.870 1.185 0.0 0.1213 + 9.880 1.021 0.0 0.1215 + 9.890 0.875 0.0 0.1217 + 9.900 0.741 0.0 0.1216 + 9.910 0.613 0.0 0.1215 + 9.920 0.485 0.0 0.1213 + 9.930 0.354 0.0 0.1211 + 9.940 0.216 0.0 0.1210 + 9.950 0.070 0.0 0.1210 + 9.960 -0.084 0.0 0.1211 + 9.970 -0.244 0.0 0.1213 + 9.980 -0.408 0.0 0.1215 + 9.990 -0.570 0.0 0.1217 + 10.000 -0.727 0.0 0.1216 + 10.010 -0.872 0.0 0.1215 + 10.020 -1.002 0.0 0.1212 + 10.030 -1.112 0.0 0.1210 + 10.040 -1.200 0.0 0.1209 + 10.050 -1.262 0.0 0.1210 + 10.060 -1.299 0.0 0.1212 + 10.070 -1.312 0.0 0.1214 + 10.080 -1.300 0.0 0.1216 + 10.090 -1.268 0.0 0.1217 + 10.100 -1.216 0.0 0.1216 + 10.110 -1.148 0.0 0.1214 + 10.120 -1.065 0.0 0.1212 + 10.130 -0.970 0.0 0.1210 + 10.140 -0.863 0.0 0.1209 + 10.150 -0.744 0.0 0.1210 + 10.160 -0.612 0.0 0.1212 + 10.170 -0.465 0.0 0.1214 + 10.180 -0.303 0.0 0.1216 + 10.190 -0.123 0.0 0.1217 + 10.200 0.075 0.0 0.1216 + 10.210 0.293 0.0 0.1214 + 10.220 0.529 0.0 0.1212 + 10.230 0.781 0.0 0.1210 + 10.240 1.044 0.0 0.1209 + 10.250 1.314 0.0 0.1210 + 10.260 1.582 0.0 0.1212 + 10.270 1.841 0.0 0.1214 + 10.280 2.081 0.0 0.1216 + 10.290 2.293 0.0 0.1217 + 10.300 2.466 0.0 0.1216 + 10.310 2.593 0.0 0.1213 + 10.320 2.666 0.0 0.1211 + 10.330 2.679 0.0 0.1209 + 10.340 2.630 0.0 0.1209 + 10.350 2.518 0.0 0.1210 + 10.360 2.343 0.0 0.1212 + 10.370 2.109 0.0 0.1215 + 10.380 1.822 0.0 0.1216 + 10.390 1.489 0.0 0.1217 + 10.400 1.119 0.0 0.1215 + 10.410 0.718 0.0 0.1213 + 10.420 0.298 0.0 0.1211 + 10.430 -0.135 0.0 0.1209 + 10.440 -0.574 0.0 0.1209 + 10.450 -1.012 0.0 0.1210 + 10.460 -1.444 0.0 0.1212 + 10.470 -1.868 0.0 0.1214 + 10.480 -2.282 0.0 0.1216 + 10.490 -2.685 0.0 0.1216 + 10.500 -3.077 0.0 0.1215 + 10.510 -3.458 0.0 0.1213 + 10.520 -3.829 0.0 0.1211 + 10.530 -4.190 0.0 0.1210 + 10.540 -4.541 0.0 0.1210 + 10.550 -4.879 0.0 0.1211 + 10.560 -5.204 0.0 0.1213 + 10.570 -5.511 0.0 0.1215 + 10.580 -5.797 0.0 0.1217 + 10.590 -6.059 0.0 0.1216 + 10.600 -6.290 0.0 0.1215 + 10.610 -6.489 0.0 0.1213 + 10.620 -6.650 0.0 0.1211 + 10.630 -6.771 0.0 0.1210 + 10.640 -6.850 0.0 0.1210 + 10.650 -6.888 0.0 0.1211 + 10.660 -6.886 0.0 0.1214 + 10.670 -6.845 0.0 0.1216 + 10.680 -6.769 0.0 0.1217 + 10.690 -6.663 0.0 0.1216 + 10.700 -6.532 0.0 0.1215 + 10.710 -6.380 0.0 0.1213 + 10.720 -6.212 0.0 0.1211 + 10.730 -6.032 0.0 0.1210 + 10.740 -5.844 0.0 0.1211 + 10.750 -5.648 0.0 0.1212 + 10.760 -5.445 0.0 0.1214 + 10.770 -5.234 0.0 0.1216 + 10.780 -5.013 0.0 0.1217 + 10.790 -4.780 0.0 0.1216 + 10.800 -4.529 0.0 0.1214 + 10.810 -4.257 0.0 0.1212 + 10.820 -3.959 0.0 0.1211 + 10.830 -3.633 0.0 0.1210 + 10.840 -3.274 0.0 0.1211 + 10.850 -2.880 0.0 0.1213 + 10.860 -2.452 0.0 0.1215 + 10.870 -1.989 0.0 0.1216 + 10.880 -1.494 0.0 0.1217 + 10.890 -0.970 0.0 0.1215 + 10.900 -0.421 0.0 0.1214 + 10.910 0.147 0.0 0.1211 + 10.920 0.727 0.0 0.1210 + 10.930 1.315 0.0 0.1210 + 10.940 1.901 0.0 0.1211 + 10.950 2.481 0.0 0.1213 + 10.960 3.047 0.0 0.1215 + 10.970 3.594 0.0 0.1217 + 10.980 4.115 0.0 0.1217 + 10.990 4.605 0.0 0.1216 + 11.000 5.060 0.0 0.1214 + 11.010 5.475 0.0 0.1212 + 11.020 5.846 0.0 0.1210 + 11.030 6.169 0.0 0.1210 + 11.040 6.441 0.0 0.1211 + 11.050 6.658 0.0 0.1213 + 11.060 6.817 0.0 0.1215 + 11.070 6.915 0.0 0.1216 + 11.080 6.950 0.0 0.1216 + 11.090 6.919 0.0 0.1215 + 11.100 6.823 0.0 0.1213 + 11.110 6.661 0.0 0.1211 + 11.120 6.434 0.0 0.1210 + 11.130 6.144 0.0 0.1210 + 11.140 5.793 0.0 0.1212 + 11.150 5.386 0.0 0.1214 + 11.160 4.929 0.0 0.1215 + 11.170 4.427 0.0 0.1216 + 11.180 3.888 0.0 0.1216 + 11.190 3.318 0.0 0.1214 + 11.200 2.725 0.0 0.1212 + 11.210 2.117 0.0 0.1211 + 11.220 1.502 0.0 0.1210 + 11.230 0.885 0.0 0.1210 + 11.240 0.272 0.0 0.1212 + 11.250 -0.330 0.0 0.1213 + 11.260 -0.918 0.0 0.1215 + 11.270 -1.488 0.0 0.1215 + 11.280 -2.037 0.0 0.1215 + 11.290 -2.563 0.0 0.1213 + 11.300 -3.065 0.0 0.1211 + 11.310 -3.539 0.0 0.1210 + 11.320 -3.986 0.0 0.1209 + 11.330 -4.404 0.0 0.1210 + 11.340 -4.791 0.0 0.1212 + 11.350 -5.146 0.0 0.1214 + 11.360 -5.467 0.0 0.1216 + 11.370 -5.752 0.0 0.1216 + 11.380 -5.999 0.0 0.1215 + 11.390 -6.206 0.0 0.1213 + 11.400 -6.371 0.0 0.1211 + 11.410 -6.493 0.0 0.1210 + 11.420 -6.571 0.0 0.1209 + 11.430 -6.605 0.0 0.1210 + 11.440 -6.595 0.0 0.1212 + 11.450 -6.543 0.0 0.1214 + 11.460 -6.450 0.0 0.1216 + 11.470 -6.319 0.0 0.1216 + 11.480 -6.154 0.0 0.1215 + 11.490 -5.958 0.0 0.1213 + 11.500 -5.735 0.0 0.1211 + 11.510 -5.488 0.0 0.1210 + 11.520 -5.222 0.0 0.1210 + 11.530 -4.940 0.0 0.1211 + 11.540 -4.646 0.0 0.1213 + 11.550 -4.342 0.0 0.1215 + 11.560 -4.031 0.0 0.1216 + 11.570 -3.713 0.0 0.1216 + 11.580 -3.391 0.0 0.1215 + 11.590 -3.064 0.0 0.1213 + 11.600 -2.734 0.0 0.1211 + 11.610 -2.399 0.0 0.1210 + 11.620 -2.062 0.0 0.1210 + 11.630 -1.720 0.0 0.1211 + 11.640 -1.375 0.0 0.1213 + 11.650 -1.026 0.0 0.1215 + 11.660 -0.673 0.0 0.1216 + 11.670 -0.319 0.0 0.1216 + 11.680 0.038 0.0 0.1215 + 11.690 0.395 0.0 0.1212 + 11.700 0.752 0.0 0.1210 + 11.710 1.106 0.0 0.1210 + 11.720 1.456 0.0 0.1210 + 11.730 1.800 0.0 0.1212 + 11.740 2.136 0.0 0.1214 + 11.750 2.461 0.0 0.1216 + 11.760 2.774 0.0 0.1217 + 11.770 3.071 0.0 0.1216 + 11.780 3.351 0.0 0.1215 + 11.790 3.611 0.0 0.1213 + 11.800 3.849 0.0 0.1211 + 11.810 4.063 0.0 0.1210 + 11.820 4.251 0.0 0.1210 + 11.830 4.411 0.0 0.1212 + 11.840 4.542 0.0 0.1214 + 11.850 4.644 0.0 0.1216 + 11.860 4.718 0.0 0.1216 + 11.870 4.763 0.0 0.1215 + 11.880 4.782 0.0 0.1214 + 11.890 4.776 0.0 0.1212 + 11.900 4.749 0.0 0.1210 + 11.910 4.704 0.0 0.1210 + 11.920 4.644 0.0 0.1211 + 11.930 4.574 0.0 0.1213 + 11.940 4.496 0.0 0.1215 + 11.950 4.416 0.0 0.1217 + 11.960 4.334 0.0 0.1217 + 11.970 4.254 0.0 0.1216 + 11.980 4.177 0.0 0.1214 + 11.990 4.102 0.0 0.1212 + 12.000 4.030 0.0 0.1211 + 12.010 3.959 0.0 0.1210 + 12.020 3.886 0.0 0.1211 + 12.030 3.809 0.0 0.1213 + 12.040 3.725 0.0 0.1215 + 12.050 3.631 0.0 0.1216 + 12.060 3.524 0.0 0.1217 + 12.070 3.403 0.0 0.1216 + 12.080 3.266 0.0 0.1214 + 12.090 3.115 0.0 0.1212 + 12.100 2.950 0.0 0.1211 + 12.110 2.775 0.0 0.1211 + 12.120 2.593 0.0 0.1212 + 12.130 2.411 0.0 0.1214 + 12.140 2.233 0.0 0.1215 + 12.150 2.066 0.0 0.1216 + 12.160 1.916 0.0 0.1216 + 12.170 1.789 0.0 0.1215 + 12.180 1.690 0.0 0.1213 + 12.190 1.622 0.0 0.1211 + 12.200 1.587 0.0 0.1210 + 12.210 1.587 0.0 0.1210 + 12.220 1.620 0.0 0.1211 + 12.230 1.684 0.0 0.1213 + 12.240 1.774 0.0 0.1215 + 12.250 1.886 0.0 0.1216 + 12.260 2.013 0.0 0.1216 + 12.270 2.150 0.0 0.1215 + 12.280 2.290 0.0 0.1213 + 12.290 2.427 0.0 0.1211 + 12.300 2.556 0.0 0.1210 + 12.310 2.673 0.0 0.1210 + 12.320 2.775 0.0 0.1212 + 12.330 2.860 0.0 0.1213 + 12.340 2.928 0.0 0.1215 + 12.350 2.979 0.0 0.1215 + 12.360 3.015 0.0 0.1215 + 12.370 3.036 0.0 0.1214 + 12.380 3.046 0.0 0.1212 + 12.390 3.045 0.0 0.1211 + 12.400 3.035 0.0 0.1210 + 12.410 3.016 0.0 0.1211 + 12.420 2.987 0.0 0.1212 + 12.430 2.947 0.0 0.1214 + 12.440 2.894 0.0 0.1215 + 12.450 2.825 0.0 0.1216 + 12.460 2.736 0.0 0.1215 + 12.470 2.625 0.0 0.1213 + 12.480 2.488 0.0 0.1211 + 12.490 2.322 0.0 0.1210 + 12.500 2.127 0.0 0.1209 + 12.510 1.901 0.0 0.1210 + 12.520 1.647 0.0 0.1212 + 12.530 1.367 0.0 0.1214 + 12.540 1.064 0.0 0.1215 + 12.550 0.745 0.0 0.1215 + 12.560 0.416 0.0 0.1214 + 12.570 0.083 0.0 0.1213 + 12.580 -0.245 0.0 0.1211 + 12.590 -0.561 0.0 0.1210 + 12.600 -0.858 0.0 0.1210 + 12.610 -1.131 0.0 0.1211 + 12.620 -1.376 0.0 0.1213 + 12.630 -1.588 0.0 0.1215 + 12.640 -1.767 0.0 0.1216 + 12.650 -1.912 0.0 0.1216 + 12.660 -2.026 0.0 0.1214 + 12.670 -2.111 0.0 0.1212 + 12.680 -2.172 0.0 0.1210 + 12.690 -2.212 0.0 0.1209 + 12.700 -2.237 0.0 0.1210 + 12.710 -2.251 0.0 0.1211 + 12.720 -2.259 0.0 0.1213 + 12.730 -2.264 0.0 0.1215 + 12.740 -2.269 0.0 0.1216 + 12.750 -2.276 0.0 0.1216 + 12.760 -2.285 0.0 0.1215 + 12.770 -2.297 0.0 0.1213 + 12.780 -2.310 0.0 0.1211 + 12.790 -2.324 0.0 0.1210 + 12.800 -2.336 0.0 0.1210 + 12.810 -2.345 0.0 0.1212 + 12.820 -2.350 0.0 0.1214 + 12.830 -2.349 0.0 0.1216 + 12.840 -2.343 0.0 0.1216 + 12.850 -2.333 0.0 0.1216 + 12.860 -2.319 0.0 0.1214 + 12.870 -2.303 0.0 0.1212 + 12.880 -2.289 0.0 0.1211 + 12.890 -2.279 0.0 0.1210 + 12.900 -2.275 0.0 0.1210 + 12.910 -2.282 0.0 0.1212 + 12.920 -2.301 0.0 0.1214 + 12.930 -2.333 0.0 0.1216 + 12.940 -2.381 0.0 0.1217 + 12.950 -2.444 0.0 0.1216 + 12.960 -2.521 0.0 0.1215 + 12.970 -2.612 0.0 0.1212 + 12.980 -2.712 0.0 0.1210 + 12.990 -2.820 0.0 0.1210 + 13.000 -2.931 0.0 0.1210 + 13.010 -3.043 0.0 0.1212 + 13.020 -3.150 0.0 0.1214 + 13.030 -3.251 0.0 0.1216 + 13.040 -3.342 0.0 0.1217 + 13.050 -3.420 0.0 0.1216 + 13.060 -3.485 0.0 0.1215 + 13.070 -3.535 0.0 0.1213 + 13.080 -3.570 0.0 0.1211 + 13.090 -3.592 0.0 0.1210 + 13.100 -3.601 0.0 0.1211 + 13.110 -3.599 0.0 0.1212 + 13.120 -3.589 0.0 0.1214 + 13.130 -3.571 0.0 0.1216 + 13.140 -3.549 0.0 0.1216 + 13.150 -3.524 0.0 0.1216 + 13.160 -3.497 0.0 0.1214 + 13.170 -3.469 0.0 0.1212 + 13.180 -3.441 0.0 0.1211 + 13.190 -3.412 0.0 0.1210 + 13.200 -3.381 0.0 0.1211 + 13.210 -3.349 0.0 0.1213 + 13.220 -3.314 0.0 0.1215 + 13.230 -3.273 0.0 0.1216 + 13.240 -3.226 0.0 0.1216 + 13.250 -3.170 0.0 0.1216 + 13.260 -3.105 0.0 0.1214 + 13.270 -3.028 0.0 0.1212 + 13.280 -2.939 0.0 0.1211 + 13.290 -2.836 0.0 0.1210 + 13.300 -2.719 0.0 0.1211 + 13.310 -2.587 0.0 0.1213 + 13.320 -2.440 0.0 0.1214 + 13.330 -2.277 0.0 0.1215 + 13.340 -2.100 0.0 0.1216 + 13.350 -1.907 0.0 0.1215 + 13.360 -1.701 0.0 0.1213 + 13.370 -1.483 0.0 0.1212 + 13.380 -1.252 0.0 0.1211 + 13.390 -1.012 0.0 0.1211 + 13.400 -0.763 0.0 0.1212 + 13.410 -0.508 0.0 0.1213 + 13.420 -0.251 0.0 0.1215 + 13.430 0.007 0.0 0.1216 + 13.440 0.261 0.0 0.1215 + 13.450 0.507 0.0 0.1214 + 13.460 0.743 0.0 0.1212 + 13.470 0.962 0.0 0.1211 + 13.480 1.162 0.0 0.1210 + 13.490 1.338 0.0 0.1210 + 13.500 1.486 0.0 0.1212 + 13.510 1.604 0.0 0.1213 + 13.520 1.689 0.0 0.1215 + 13.530 1.739 0.0 0.1216 + 13.540 1.755 0.0 0.1215 + 13.550 1.735 0.0 0.1214 + 13.560 1.682 0.0 0.1213 + 13.570 1.599 0.0 0.1212 + 13.580 1.489 0.0 0.1211 + 13.590 1.357 0.0 0.1211 + 13.600 1.208 0.0 0.1212 + 13.610 1.047 0.0 0.1213 + 13.620 0.882 0.0 0.1214 + 13.630 0.717 0.0 0.1215 + 13.640 0.559 0.0 0.1214 + 13.650 0.412 0.0 0.1213 + 13.660 0.282 0.0 0.1211 + 13.670 0.171 0.0 0.1211 + 13.680 0.081 0.0 0.1210 + 13.690 0.014 0.0 0.1211 + 13.700 -0.031 0.0 0.1213 + 13.710 -0.054 0.0 0.1214 + 13.720 -0.059 0.0 0.1215 + 13.730 -0.048 0.0 0.1215 + 13.740 -0.025 0.0 0.1214 + 13.750 0.006 0.0 0.1213 + 13.760 0.041 0.0 0.1211 + 13.770 0.075 0.0 0.1210 + 13.780 0.105 0.0 0.1210 + 13.790 0.128 0.0 0.1211 + 13.800 0.141 0.0 0.1213 + 13.810 0.143 0.0 0.1215 + 13.820 0.131 0.0 0.1216 + 13.830 0.107 0.0 0.1215 + 13.840 0.070 0.0 0.1214 + 13.850 0.021 0.0 0.1213 + 13.860 -0.039 0.0 0.1212 + 13.870 -0.109 0.0 0.1211 + 13.880 -0.187 0.0 0.1211 + 13.890 -0.273 0.0 0.1212 + 13.900 -0.364 0.0 0.1214 + 13.910 -0.461 0.0 0.1215 + 13.920 -0.564 0.0 0.1216 + 13.930 -0.671 0.0 0.1215 + 13.940 -0.782 0.0 0.1214 + 13.950 -0.897 0.0 0.1212 + 13.960 -1.017 0.0 0.1210 + 13.970 -1.138 0.0 0.1210 + 13.980 -1.261 0.0 0.1210 + 13.990 -1.381 0.0 0.1212 + 14.000 -1.497 0.0 0.1214 + 14.010 -1.605 0.0 0.1215 + 14.020 -1.699 0.0 0.1216 + 14.030 -1.774 0.0 0.1216 + 14.040 -1.825 0.0 0.1214 + 14.050 -1.846 0.0 0.1212 + 14.060 -1.830 0.0 0.1211 + 14.070 -1.775 0.0 0.1210 + 14.080 -1.674 0.0 0.1211 + 14.090 -1.526 0.0 0.1212 + 14.100 -1.330 0.0 0.1214 + 14.110 -1.085 0.0 0.1215 + 14.120 -0.795 0.0 0.1216 + 14.130 -0.463 0.0 0.1215 + 14.140 -0.094 0.0 0.1214 + 14.150 0.302 0.0 0.1212 + 14.160 0.720 0.0 0.1211 + 14.170 1.148 0.0 0.1211 + 14.180 1.579 0.0 0.1212 + 14.190 2.002 0.0 0.1213 + 14.200 2.410 0.0 0.1215 + 14.210 2.795 0.0 0.1216 + 14.220 3.150 0.0 0.1216 + 14.230 3.470 0.0 0.1215 + 14.240 3.753 0.0 0.1214 + 14.250 3.998 0.0 0.1212 + 14.260 4.203 0.0 0.1211 + 14.270 4.370 0.0 0.1211 + 14.280 4.503 0.0 0.1212 + 14.290 4.603 0.0 0.1213 + 14.300 4.674 0.0 0.1215 + 14.310 4.722 0.0 0.1216 + 14.320 4.748 0.0 0.1216 + 14.330 4.756 0.0 0.1215 + 14.340 4.750 0.0 0.1214 + 14.350 4.732 0.0 0.1212 + 14.360 4.703 0.0 0.1211 + 14.370 4.666 0.0 0.1211 + 14.380 4.622 0.0 0.1212 + 14.390 4.572 0.0 0.1213 + 14.400 4.519 0.0 0.1215 + 14.410 4.464 0.0 0.1215 + 14.420 4.410 0.0 0.1215 + 14.430 4.361 0.0 0.1215 + 14.440 4.320 0.0 0.1213 + 14.450 4.290 0.0 0.1212 + 14.460 4.276 0.0 0.1211 + 14.470 4.282 0.0 0.1211 + 14.480 4.310 0.0 0.1212 + 14.490 4.363 0.0 0.1214 + 14.500 4.442 0.0 0.1215 + 14.510 4.546 0.0 0.1216 + 14.520 4.674 0.0 0.1216 + 14.530 4.820 0.0 0.1215 + 14.540 4.980 0.0 0.1213 + 14.550 5.145 0.0 0.1211 + 14.560 5.308 0.0 0.1211 + 14.570 5.460 0.0 0.1211 + 14.580 5.591 0.0 0.1212 + 14.590 5.691 0.0 0.1213 + 14.600 5.752 0.0 0.1214 + 14.610 5.768 0.0 0.1215 + 14.620 5.734 0.0 0.1214 + 14.630 5.646 0.0 0.1213 + 14.640 5.503 0.0 0.1212 + 14.650 5.307 0.0 0.1211 + 14.660 5.063 0.0 0.1210 + 14.670 4.775 0.0 0.1211 + 14.680 4.451 0.0 0.1212 + 14.690 4.098 0.0 0.1214 + 14.700 3.724 0.0 0.1215 + 14.710 3.337 0.0 0.1215 + 14.720 2.945 0.0 0.1215 + 14.730 2.554 0.0 0.1213 + 14.740 2.166 0.0 0.1212 + 14.750 1.786 0.0 0.1211 + 14.760 1.414 0.0 0.1211 + 14.770 1.049 0.0 0.1211 + 14.780 0.689 0.0 0.1213 + 14.790 0.333 0.0 0.1214 + 14.800 -0.023 0.0 0.1215 + 14.810 -0.383 0.0 0.1215 + 14.820 -0.746 0.0 0.1215 + 14.830 -1.116 0.0 0.1213 + 14.840 -1.491 0.0 0.1212 + 14.850 -1.869 0.0 0.1211 + 14.860 -2.248 0.0 0.1211 + 14.870 -2.622 0.0 0.1211 + 14.880 -2.986 0.0 0.1213 + 14.890 -3.333 0.0 0.1214 + 14.900 -3.657 0.0 0.1215 + 14.910 -3.952 0.0 0.1215 + 14.920 -4.213 0.0 0.1214 + 14.930 -4.434 0.0 0.1213 + 14.940 -4.615 0.0 0.1212 + 14.950 -4.754 0.0 0.1211 + 14.960 -4.852 0.0 0.1211 + 14.970 -4.914 0.0 0.1212 + 14.980 -4.942 0.0 0.1213 + 14.990 -4.942 0.0 0.1215 + 15.000 -4.921 0.0 0.1215 + 15.010 -4.884 0.0 0.1215 + 15.020 -4.837 0.0 0.1214 + 15.030 -4.785 0.0 0.1213 + 15.040 -4.730 0.0 0.1211 + 15.050 -4.676 0.0 0.1211 + 15.060 -4.622 0.0 0.1211 + 15.070 -4.568 0.0 0.1212 + 15.080 -4.511 0.0 0.1213 + 15.090 -4.449 0.0 0.1215 + 15.100 -4.380 0.0 0.1215 + 15.110 -4.299 0.0 0.1215 + 15.120 -4.204 0.0 0.1214 + 15.130 -4.096 0.0 0.1212 + 15.140 -3.973 0.0 0.1211 + 15.150 -3.838 0.0 0.1211 + 15.160 -3.693 0.0 0.1211 + 15.170 -3.544 0.0 0.1213 + 15.180 -3.397 0.0 0.1214 + 15.190 -3.257 0.0 0.1215 + 15.200 -3.131 0.0 0.1215 + 15.210 -3.025 0.0 0.1215 + 15.220 -2.943 0.0 0.1213 + 15.230 -2.888 0.0 0.1212 + 15.240 -2.862 0.0 0.1211 + 15.250 -2.863 0.0 0.1211 + 15.260 -2.888 0.0 0.1212 + 15.270 -2.931 0.0 0.1213 + 15.280 -2.986 0.0 0.1215 + 15.290 -3.044 0.0 0.1216 + 15.300 -3.097 0.0 0.1216 + 15.310 -3.137 0.0 0.1215 + 15.320 -3.155 0.0 0.1213 + 15.330 -3.146 0.0 0.1212 + 15.340 -3.106 0.0 0.1211 + 15.350 -3.035 0.0 0.1211 + 15.360 -2.932 0.0 0.1212 + 15.370 -2.804 0.0 0.1213 + 15.380 -2.654 0.0 0.1215 + 15.390 -2.492 0.0 0.1216 + 15.400 -2.326 0.0 0.1216 + 15.410 -2.165 0.0 0.1215 + 15.420 -2.018 0.0 0.1213 + 15.430 -1.892 0.0 0.1212 + 15.440 -1.793 0.0 0.1211 + 15.450 -1.725 0.0 0.1211 + 15.460 -1.687 0.0 0.1212 + 15.470 -1.677 0.0 0.1214 + 15.480 -1.690 0.0 0.1215 + 15.490 -1.720 0.0 0.1216 + 15.500 -1.757 0.0 0.1216 + 15.510 -1.793 0.0 0.1215 + 15.520 -1.819 0.0 0.1213 + 15.530 -1.825 0.0 0.1212 + 15.540 -1.806 0.0 0.1211 + 15.550 -1.757 0.0 0.1211 + 15.560 -1.677 0.0 0.1212 + 15.570 -1.566 0.0 0.1214 + 15.580 -1.430 0.0 0.1215 + 15.590 -1.273 0.0 0.1216 + 15.600 -1.106 0.0 0.1215 + 15.610 -0.939 0.0 0.1214 + 15.620 -0.782 0.0 0.1213 + 15.630 -0.645 0.0 0.1211 + 15.640 -0.537 0.0 0.1211 + 15.650 -0.467 0.0 0.1211 + 15.660 -0.437 0.0 0.1212 + 15.670 -0.450 0.0 0.1214 + 15.680 -0.505 0.0 0.1215 + 15.690 -0.596 0.0 0.1216 + 15.700 -0.716 0.0 0.1215 + 15.710 -0.857 0.0 0.1214 + 15.720 -1.006 0.0 0.1212 + 15.730 -1.152 0.0 0.1211 + 15.740 -1.284 0.0 0.1210 + 15.750 -1.392 0.0 0.1211 + 15.760 -1.465 0.0 0.1212 + 15.770 -1.498 0.0 0.1214 + 15.780 -1.486 0.0 0.1215 + 15.790 -1.428 0.0 0.1215 + 15.800 -1.325 0.0 0.1215 + 15.810 -1.181 0.0 0.1213 + 15.820 -1.001 0.0 0.1212 + 15.830 -0.793 0.0 0.1211 + 15.840 -0.564 0.0 0.1210 + 15.850 -0.323 0.0 0.1211 + 15.860 -0.078 0.0 0.1212 + 15.870 0.164 0.0 0.1214 + 15.880 0.398 0.0 0.1215 + 15.890 0.619 0.0 0.1215 + 15.900 0.824 0.0 0.1214 + 15.910 1.010 0.0 0.1213 + 15.920 1.178 0.0 0.1211 + 15.930 1.328 0.0 0.1210 + 15.940 1.459 0.0 0.1210 + 15.950 1.574 0.0 0.1211 + 15.960 1.671 0.0 0.1212 + 15.970 1.752 0.0 0.1214 + 15.980 1.815 0.0 0.1215 + 15.990 1.860 0.0 0.1215 + 16.000 1.884 0.0 0.1214 + 16.010 1.885 0.0 0.1213 + 16.020 1.861 0.0 0.1212 + 16.030 1.810 0.0 0.1211 + 16.040 1.731 0.0 0.1211 + 16.050 1.623 0.0 0.1212 + 16.060 1.488 0.0 0.1213 + 16.070 1.326 0.0 0.1214 + 16.080 1.143 0.0 0.1215 + 16.090 0.942 0.0 0.1215 + 16.100 0.731 0.0 0.1214 + 16.110 0.516 0.0 0.1213 + 16.120 0.305 0.0 0.1211 + 16.130 0.106 0.0 0.1211 + 16.140 -0.075 0.0 0.1211 + 16.150 -0.230 0.0 0.1212 + 16.160 -0.355 0.0 0.1213 + 16.170 -0.444 0.0 0.1215 + 16.180 -0.496 0.0 0.1215 + 16.190 -0.510 0.0 0.1215 + 16.200 -0.484 0.0 0.1214 + 16.210 -0.421 0.0 0.1212 + 16.220 -0.323 0.0 0.1211 + 16.230 -0.192 0.0 0.1211 + 16.240 -0.032 0.0 0.1211 + 16.250 0.155 0.0 0.1212 + 16.260 0.366 0.0 0.1213 + 16.270 0.599 0.0 0.1215 + 16.280 0.852 0.0 0.1215 + 16.290 1.124 0.0 0.1215 + 16.300 1.413 0.0 0.1214 + 16.310 1.720 0.0 0.1212 + 16.320 2.042 0.0 0.1211 + 16.330 2.378 0.0 0.1211 + 16.340 2.725 0.0 0.1212 + 16.350 3.079 0.0 0.1213 + 16.360 3.437 0.0 0.1215 + 16.370 3.793 0.0 0.1216 + 16.380 4.141 0.0 0.1216 + 16.390 4.475 0.0 0.1215 + 16.400 4.786 0.0 0.1214 + 16.410 5.070 0.0 0.1212 + 16.420 5.319 0.0 0.1211 + 16.430 5.529 0.0 0.1211 + 16.440 5.696 0.0 0.1212 + 16.450 5.818 0.0 0.1213 + 16.460 5.897 0.0 0.1214 + 16.470 5.932 0.0 0.1215 + 16.480 5.929 0.0 0.1215 + 16.490 5.891 0.0 0.1215 + 16.500 5.825 0.0 0.1213 + 16.510 5.736 0.0 0.1212 + 16.520 5.630 0.0 0.1211 + 16.530 5.513 0.0 0.1211 + 16.540 5.388 0.0 0.1212 + 16.550 5.258 0.0 0.1213 + 16.560 5.123 0.0 0.1215 + 16.570 4.982 0.0 0.1215 + 16.580 4.832 0.0 0.1215 + 16.590 4.669 0.0 0.1214 + 16.600 4.487 0.0 0.1213 + 16.610 4.280 0.0 0.1212 + 16.620 4.045 0.0 0.1211 + 16.630 3.776 0.0 0.1211 + 16.640 3.472 0.0 0.1212 + 16.650 3.131 0.0 0.1214 + 16.660 2.757 0.0 0.1215 + 16.670 2.352 0.0 0.1216 + 16.680 1.925 0.0 0.1215 + 16.690 1.484 0.0 0.1214 + 16.700 1.040 0.0 0.1213 + 16.710 0.603 0.0 0.1212 + 16.720 0.185 0.0 0.1211 + 16.730 -0.203 0.0 0.1211 + 16.740 -0.553 0.0 0.1212 + 16.750 -0.856 0.0 0.1213 + 16.760 -1.110 0.0 0.1215 + 16.770 -1.313 0.0 0.1215 + 16.780 -1.465 0.0 0.1215 + 16.790 -1.573 0.0 0.1214 + 16.800 -1.643 0.0 0.1212 + 16.810 -1.684 0.0 0.1211 + 16.820 -1.705 0.0 0.1211 + 16.830 -1.716 0.0 0.1212 + 16.840 -1.727 0.0 0.1213 + 16.850 -1.746 0.0 0.1214 + 16.860 -1.778 0.0 0.1215 + 16.870 -1.826 0.0 0.1215 + 16.880 -1.892 0.0 0.1214 + 16.890 -1.972 0.0 0.1213 + 16.900 -2.062 0.0 0.1212 + 16.910 -2.154 0.0 0.1211 + 16.920 -2.241 0.0 0.1211 + 16.930 -2.313 0.0 0.1211 + 16.940 -2.362 0.0 0.1213 + 16.950 -2.379 0.0 0.1214 + 16.960 -2.360 0.0 0.1215 + 16.970 -2.299 0.0 0.1215 + 16.980 -2.197 0.0 0.1214 + 16.990 -2.055 0.0 0.1213 + 17.000 -1.878 0.0 0.1212 + 17.010 -1.673 0.0 0.1211 + 17.020 -1.449 0.0 0.1211 + 17.030 -1.216 0.0 0.1212 + 17.040 -0.985 0.0 0.1213 + 17.050 -0.766 0.0 0.1214 + 17.060 -0.568 0.0 0.1215 + 17.070 -0.398 0.0 0.1215 + 17.080 -0.261 0.0 0.1214 + 17.090 -0.159 0.0 0.1212 + 17.100 -0.093 0.0 0.1211 + 17.110 -0.060 0.0 0.1210 + 17.120 -0.056 0.0 0.1211 + 17.130 -0.073 0.0 0.1212 + 17.140 -0.105 0.0 0.1213 + 17.150 -0.146 0.0 0.1215 + 17.160 -0.187 0.0 0.1215 + 17.170 -0.223 0.0 0.1215 + 17.180 -0.250 0.0 0.1214 + 17.190 -0.266 0.0 0.1213 + 17.200 -0.270 0.0 0.1211 + 17.210 -0.264 0.0 0.1211 + 17.220 -0.252 0.0 0.1211 + 17.230 -0.237 0.0 0.1212 + 17.240 -0.226 0.0 0.1213 + 17.250 -0.225 0.0 0.1215 + 17.260 -0.238 0.0 0.1215 + 17.270 -0.270 0.0 0.1215 + 17.280 -0.325 0.0 0.1214 + 17.290 -0.405 0.0 0.1212 + 17.300 -0.509 0.0 0.1211 + 17.310 -0.636 0.0 0.1211 + 17.320 -0.782 0.0 0.1211 + 17.330 -0.943 0.0 0.1213 + 17.340 -1.114 0.0 0.1214 + 17.350 -1.289 0.0 0.1215 + 17.360 -1.462 0.0 0.1216 + 17.370 -1.629 0.0 0.1215 + 17.380 -1.783 0.0 0.1214 + 17.390 -1.923 0.0 0.1212 + 17.400 -2.046 0.0 0.1211 + 17.410 -2.151 0.0 0.1211 + 17.420 -2.237 0.0 0.1211 + 17.430 -2.307 0.0 0.1213 + 17.440 -2.360 0.0 0.1214 + 17.450 -2.399 0.0 0.1215 + 17.460 -2.425 0.0 0.1216 + 17.470 -2.439 0.0 0.1215 + 17.480 -2.441 0.0 0.1214 + 17.490 -2.431 0.0 0.1213 + 17.500 -2.407 0.0 0.1211 + 17.510 -2.369 0.0 0.1211 + 17.520 -2.313 0.0 0.1212 + 17.530 -2.239 0.0 0.1213 + 17.540 -2.145 0.0 0.1214 + 17.550 -2.031 0.0 0.1215 + 17.560 -1.896 0.0 0.1215 + 17.570 -1.743 0.0 0.1215 + 17.580 -1.575 0.0 0.1213 + 17.590 -1.397 0.0 0.1212 + 17.600 -1.216 0.0 0.1211 + 17.610 -1.038 0.0 0.1211 + 17.620 -0.873 0.0 0.1212 + 17.630 -0.727 0.0 0.1213 + 17.640 -0.610 0.0 0.1215 + 17.650 -0.528 0.0 0.1216 + 17.660 -0.486 0.0 0.1216 + 17.670 -0.488 0.0 0.1215 + 17.680 -0.536 0.0 0.1214 + 17.690 -0.628 0.0 0.1212 + 17.700 -0.761 0.0 0.1211 + 17.710 -0.930 0.0 0.1211 + 17.720 -1.127 0.0 0.1212 + 17.730 -1.343 0.0 0.1213 + 17.740 -1.570 0.0 0.1215 + 17.750 -1.797 0.0 0.1215 + 17.760 -2.015 0.0 0.1215 + 17.770 -2.217 0.0 0.1214 + 17.780 -2.396 0.0 0.1213 + 17.790 -2.547 0.0 0.1211 + 17.800 -2.666 0.0 0.1211 + 17.810 -2.754 0.0 0.1211 + 17.820 -2.810 0.0 0.1212 + 17.830 -2.837 0.0 0.1214 + 17.840 -2.839 0.0 0.1215 + 17.850 -2.819 0.0 0.1216 + 17.860 -2.781 0.0 0.1215 + 17.870 -2.730 0.0 0.1214 + 17.880 -2.668 0.0 0.1213 + 17.890 -2.599 0.0 0.1211 + 17.900 -2.522 0.0 0.1210 + 17.910 -2.438 0.0 0.1211 + 17.920 -2.346 0.0 0.1212 + 17.930 -2.244 0.0 0.1213 + 17.940 -2.130 0.0 0.1214 + 17.950 -2.001 0.0 0.1215 + 17.960 -1.855 0.0 0.1215 + 17.970 -1.690 0.0 0.1214 + 17.980 -1.505 0.0 0.1213 + 17.990 -1.302 0.0 0.1211 + 18.000 -1.080 0.0 0.1211 + 18.010 -0.845 0.0 0.1211 + 18.020 -0.598 0.0 0.1212 + 18.030 -0.344 0.0 0.1213 + 18.040 -0.090 0.0 0.1215 + 18.050 0.161 0.0 0.1215 + 18.060 0.404 0.0 0.1215 + 18.070 0.635 0.0 0.1214 + 18.080 0.849 0.0 0.1212 + 18.090 1.047 0.0 0.1211 + 18.100 1.226 0.0 0.1211 + 18.110 1.387 0.0 0.1211 + 18.120 1.532 0.0 0.1212 + 18.130 1.662 0.0 0.1214 + 18.140 1.779 0.0 0.1215 + 18.150 1.887 0.0 0.1215 + 18.160 1.987 0.0 0.1214 + 18.170 2.081 0.0 0.1213 + 18.180 2.170 0.0 0.1212 + 18.190 2.251 0.0 0.1211 + 18.200 2.325 0.0 0.1211 + 18.210 2.388 0.0 0.1212 + 18.220 2.437 0.0 0.1213 + 18.230 2.467 0.0 0.1214 + 18.240 2.475 0.0 0.1214 + 18.250 2.457 0.0 0.1215 + 18.260 2.410 0.0 0.1214 + 18.270 2.332 0.0 0.1213 + 18.280 2.224 0.0 0.1212 + 18.290 2.086 0.0 0.1211 + 18.300 1.922 0.0 0.1211 + 18.310 1.736 0.0 0.1212 + 18.320 1.534 0.0 0.1213 + 18.330 1.324 0.0 0.1214 + 18.340 1.113 0.0 0.1215 + 18.350 0.909 0.0 0.1215 + 18.360 0.719 0.0 0.1214 + 18.370 0.550 0.0 0.1213 + 18.380 0.406 0.0 0.1212 + 18.390 0.291 0.0 0.1211 + 18.400 0.207 0.0 0.1211 + 18.410 0.153 0.0 0.1212 + 18.420 0.127 0.0 0.1213 + 18.430 0.126 0.0 0.1214 + 18.440 0.145 0.0 0.1215 + 18.450 0.180 0.0 0.1215 + 18.460 0.224 0.0 0.1214 + 18.470 0.273 0.0 0.1213 + 18.480 0.323 0.0 0.1212 + 18.490 0.370 0.0 0.1212 + 18.500 0.413 0.0 0.1212 + 18.510 0.452 0.0 0.1213 + 18.520 0.486 0.0 0.1214 + 18.530 0.519 0.0 0.1215 + 18.540 0.553 0.0 0.1215 + 18.550 0.592 0.0 0.1214 + 18.560 0.640 0.0 0.1213 + 18.570 0.700 0.0 0.1212 + 18.580 0.775 0.0 0.1212 + 18.590 0.866 0.0 0.1212 + 18.600 0.973 0.0 0.1212 + 18.610 1.097 0.0 0.1213 + 18.620 1.233 0.0 0.1214 + 18.630 1.379 0.0 0.1215 + 18.640 1.530 0.0 0.1215 + 18.650 1.681 0.0 0.1215 + 18.660 1.827 0.0 0.1213 + 18.670 1.963 0.0 0.1212 + 18.680 2.085 0.0 0.1212 + 18.690 2.188 0.0 0.1212 + 18.700 2.271 0.0 0.1212 + 18.710 2.333 0.0 0.1213 + 18.720 2.374 0.0 0.1215 + 18.730 2.396 0.0 0.1215 + 18.740 2.402 0.0 0.1215 + 18.750 2.394 0.0 0.1214 + 18.760 2.376 0.0 0.1213 + 18.770 2.351 0.0 0.1212 + 18.780 2.323 0.0 0.1211 + 18.790 2.292 0.0 0.1211 + 18.800 2.261 0.0 0.1212 + 18.810 2.228 0.0 0.1214 + 18.820 2.193 0.0 0.1215 + 18.830 2.154 0.0 0.1215 + 18.840 2.106 0.0 0.1215 + 18.850 2.047 0.0 0.1214 + 18.860 1.973 0.0 0.1213 + 18.870 1.880 0.0 0.1211 + 18.880 1.767 0.0 0.1211 + 18.890 1.631 0.0 0.1211 + 18.900 1.474 0.0 0.1212 + 18.910 1.296 0.0 0.1213 + 18.920 1.100 0.0 0.1214 + 18.930 0.892 0.0 0.1215 + 18.940 0.678 0.0 0.1215 + 18.950 0.462 0.0 0.1214 + 18.960 0.254 0.0 0.1213 + 18.970 0.060 0.0 0.1212 + 18.980 -0.114 0.0 0.1211 + 18.990 -0.262 0.0 0.1212 + 19.000 -0.380 0.0 0.1213 + 19.010 -0.465 0.0 0.1214 + 19.020 -0.517 0.0 0.1215 + 19.030 -0.536 0.0 0.1215 + 19.040 -0.526 0.0 0.1214 + 19.050 -0.490 0.0 0.1213 + 19.060 -0.434 0.0 0.1212 + 19.070 -0.363 0.0 0.1211 + 19.080 -0.284 0.0 0.1211 + 19.090 -0.203 0.0 0.1211 + 19.100 -0.125 0.0 0.1212 + 19.110 -0.055 0.0 0.1214 + 19.120 0.005 0.0 0.1215 + 19.130 0.054 0.0 0.1215 + 19.140 0.090 0.0 0.1214 + 19.150 0.114 0.0 0.1213 + 19.160 0.130 0.0 0.1212 + 19.170 0.139 0.0 0.1211 + 19.180 0.146 0.0 0.1211 + 19.190 0.152 0.0 0.1212 + 19.200 0.161 0.0 0.1213 + 19.210 0.175 0.0 0.1214 + 19.220 0.195 0.0 0.1215 + 19.230 0.221 0.0 0.1215 + 19.240 0.253 0.0 0.1214 + 19.250 0.287 0.0 0.1213 + 19.260 0.321 0.0 0.1212 + 19.270 0.351 0.0 0.1211 + 19.280 0.373 0.0 0.1211 + 19.290 0.383 0.0 0.1212 + 19.300 0.377 0.0 0.1213 + 19.310 0.354 0.0 0.1214 + 19.320 0.310 0.0 0.1215 + 19.330 0.245 0.0 0.1215 + 19.340 0.160 0.0 0.1214 + 19.350 0.057 0.0 0.1213 + 19.360 -0.060 0.0 0.1212 + 19.370 -0.187 0.0 0.1211 + 19.380 -0.320 0.0 0.1211 + 19.390 -0.453 0.0 0.1212 + 19.400 -0.580 0.0 0.1213 + 19.410 -0.696 0.0 0.1214 + 19.420 -0.798 0.0 0.1215 + 19.430 -0.880 0.0 0.1215 + 19.440 -0.942 0.0 0.1214 + 19.450 -0.981 0.0 0.1213 + 19.460 -0.999 0.0 0.1211 + 19.470 -0.996 0.0 0.1211 + 19.480 -0.976 0.0 0.1211 + 19.490 -0.941 0.0 0.1212 + 19.500 -0.896 0.0 0.1213 + 19.510 -0.845 0.0 0.1214 + 19.520 -0.793 0.0 0.1215 + 19.530 -0.743 0.0 0.1215 + 19.540 -0.699 0.0 0.1214 + 19.550 -0.664 0.0 0.1213 + 19.560 -0.641 0.0 0.1212 + 19.570 -0.631 0.0 0.1211 + 19.580 -0.634 0.0 0.1211 + 19.590 -0.650 0.0 0.1212 + 19.600 -0.678 0.0 0.1214 + 19.610 -0.718 0.0 0.1215 + 19.620 -0.767 0.0 0.1215 + 19.630 -0.825 0.0 0.1215 + 19.640 -0.888 0.0 0.1214 + 19.650 -0.957 0.0 0.1213 + 19.660 -1.028 0.0 0.1212 + 19.670 -1.102 0.0 0.1211 + 19.680 -1.176 0.0 0.1212 + 19.690 -1.250 0.0 0.1213 + 19.700 -1.323 0.0 0.1214 + 19.710 -1.395 0.0 0.1215 + 19.720 -1.463 0.0 0.1215 + 19.730 -1.529 0.0 0.1215 + 19.740 -1.589 0.0 0.1214 + 19.750 -1.643 0.0 0.1213 + 19.760 -1.690 0.0 0.1212 + 19.770 -1.727 0.0 0.1212 + 19.780 -1.754 0.0 0.1212 + 19.790 -1.767 0.0 0.1213 + 19.800 -1.767 0.0 0.1214 + 19.810 -1.751 0.0 0.1215 + 19.820 -1.720 0.0 0.1215 + 19.830 -1.672 0.0 0.1215 + 19.840 -1.609 0.0 0.1213 + 19.850 -1.530 0.0 0.1212 + 19.860 -1.438 0.0 0.1211 + 19.870 -1.334 0.0 0.1211 + 19.880 -1.219 0.0 0.1212 + 19.890 -1.097 0.0 0.1213 + 19.900 -0.969 0.0 0.1214 + 19.910 -0.837 0.0 0.1215 + 19.920 -0.703 0.0 0.1215 + 19.930 -0.568 0.0 0.1214 + 19.940 -0.432 0.0 0.1213 + 19.950 -0.298 0.0 0.1212 + 19.960 -0.163 0.0 0.1211 + 19.970 -0.028 0.0 0.1211 + 19.980 0.108 0.0 0.1212 + 19.990 0.245 0.0 0.1213 + 20.000 0.384 0.0 0.1214 diff --git a/src/diffpy/pdffit2/tests/testdata/Ni.dat b/src/diffpy/pdffit2/tests/testdata/Ni.dat new file mode 100644 index 00000000..360a4d6b --- /dev/null +++ b/src/diffpy/pdffit2/tests/testdata/Ni.dat @@ -0,0 +1,1001 @@ + 1.50000 -0.539443 0.00000 1.00000 0.539443 + 1.51850 -1.03098 0.00000 1.00000 1.03098 + 1.53700 -1.43712 0.00000 1.00000 1.43712 + 1.55550 -1.73810 0.00000 1.00000 1.73810 + 1.57400 -1.93402 0.00000 1.00000 1.93402 + 1.59250 -2.04145 0.00000 1.00000 2.04145 + 1.61100 -2.08593 0.00000 1.00000 2.08593 + 1.62950 -2.09295 0.00000 1.00000 2.09295 + 1.64800 -2.08072 0.00000 1.00000 2.08072 + 1.66650 -2.05688 0.00000 1.00000 2.05688 + 1.68500 -2.02006 0.00000 1.00000 2.02006 + 1.70350 -1.96554 0.00000 1.00000 1.96554 + 1.72200 -1.89239 0.00000 1.00000 1.89239 + 1.74050 -1.80936 0.00000 1.00000 1.80936 + 1.75900 -1.73670 0.00000 1.00000 1.73670 + 1.77750 -1.70255 0.00000 1.00000 1.70255 + 1.79600 -1.73461 0.00000 1.00000 1.73461 + 1.81450 -1.84946 0.00000 1.00000 1.84946 + 1.83300 -2.04300 0.00000 1.00000 2.04300 + 1.85150 -2.28566 0.00000 1.00000 2.28566 + 1.87000 -2.52486 0.00000 1.00000 2.52486 + 1.88850 -2.69615 0.00000 1.00000 2.69615 + 1.90700 -2.74180 0.00000 1.00000 2.74180 + 1.92550 -2.63223 0.00000 1.00000 2.63223 + 1.94400 -2.38239 0.00000 1.00000 2.38239 + 1.96250 -2.05565 0.00000 1.00000 2.05565 + 1.98100 -1.75092 0.00000 1.00000 1.75092 + 1.99950 -1.57518 0.00000 1.00000 1.57518 + 2.01800 -1.60914 0.00000 1.00000 1.60914 + 2.03650 -1.87687 0.00000 1.00000 1.87687 + 2.05500 -2.33004 0.00000 1.00000 2.33004 + 2.07350 -2.85357 0.00000 1.00000 2.85357 + 2.09200 -3.29353 0.00000 1.00000 3.29353 + 2.11050 -3.50124 0.00000 1.00000 3.50124 + 2.12900 -3.38172 0.00000 1.00000 3.38172 + 2.14750 -2.93205 0.00000 1.00000 2.93205 + 2.16600 -2.25629 0.00000 1.00000 2.25629 + 2.18450 -1.54918 0.00000 1.00000 1.54918 + 2.20300 -1.04888 0.00000 1.00000 1.04888 + 2.22150 -0.968136 0.00000 1.00000 0.968136 + 2.24000 -1.42070 0.00000 1.00000 1.42070 + 2.25850 -2.36300 0.00000 1.00000 2.36300 + 2.27700 -3.56960 0.00000 1.00000 3.56960 + 2.29550 -4.65416 0.00000 1.00000 4.65416 + 2.31400 -5.13684 0.00000 1.00000 5.13684 + 2.33250 -4.54696 0.00000 1.00000 4.54696 + 2.35100 -2.53890 0.00000 1.00000 2.53890 + 2.36950 1.00656 0.00000 1.00000 -1.00656 + 2.38800 5.92223 0.00000 1.00000 -5.92223 + 2.40650 11.7527 0.00000 1.00000 -11.7527 + 2.42500 17.8143 0.00000 1.00000 -17.8143 + 2.44350 23.3057 0.00000 1.00000 -23.3057 + 2.46200 27.4478 0.00000 1.00000 -27.4478 + 2.48050 29.6246 0.00000 1.00000 -29.6246 + 2.49900 29.4986 0.00000 1.00000 -29.4986 + 2.51750 27.0749 0.00000 1.00000 -27.0749 + 2.53600 22.7028 0.00000 1.00000 -22.7028 + 2.55450 17.0112 0.00000 1.00000 -17.0112 + 2.57300 10.7932 0.00000 1.00000 -10.7932 + 2.59150 4.86134 0.00000 1.00000 -4.86134 + 2.61000 -0.0945224 0.00000 1.00000 0.0945224 + 2.62850 -3.61858 0.00000 1.00000 3.61858 + 2.64700 -5.54803 0.00000 1.00000 5.54803 + 2.66550 -6.01016 0.00000 1.00000 6.01016 + 2.68400 -5.36293 0.00000 1.00000 5.36293 + 2.70250 -4.09596 0.00000 1.00000 4.09596 + 2.72100 -2.71625 0.00000 1.00000 2.71625 + 2.73950 -1.64382 0.00000 1.00000 1.64382 + 2.75800 -1.13791 0.00000 1.00000 1.13791 + 2.77650 -1.26649 0.00000 1.00000 1.26649 + 2.79500 -1.92103 0.00000 1.00000 1.92103 + 2.81350 -2.86890 0.00000 1.00000 2.86890 + 2.83200 -3.82782 0.00000 1.00000 3.82782 + 2.85050 -4.54328 0.00000 1.00000 4.54328 + 2.86900 -4.85054 0.00000 1.00000 4.85054 + 2.88750 -4.70809 0.00000 1.00000 4.70809 + 2.90600 -4.19687 0.00000 1.00000 4.19687 + 2.92450 -3.48841 0.00000 1.00000 3.48841 + 2.94300 -2.79256 0.00000 1.00000 2.79256 + 2.96150 -2.29993 0.00000 1.00000 2.29993 + 2.98000 -2.13422 0.00000 1.00000 2.13422 + 2.99850 -2.32552 0.00000 1.00000 2.32552 + 3.01700 -2.80931 0.00000 1.00000 2.80931 + 3.03550 -3.44928 0.00000 1.00000 3.44928 + 3.05400 -4.07624 0.00000 1.00000 4.07624 + 3.07250 -4.53264 0.00000 1.00000 4.53264 + 3.09100 -4.71141 0.00000 1.00000 4.71141 + 3.10950 -4.58013 0.00000 1.00000 4.58013 + 3.12800 -4.18572 0.00000 1.00000 4.18572 + 3.14650 -3.63955 0.00000 1.00000 3.63955 + 3.16500 -3.08796 0.00000 1.00000 3.08796 + 3.18350 -2.67579 0.00000 1.00000 2.67579 + 3.20200 -2.51194 0.00000 1.00000 2.51194 + 3.22050 -2.64475 0.00000 1.00000 2.64475 + 3.23900 -3.05186 0.00000 1.00000 3.05186 + 3.25750 -3.64576 0.00000 1.00000 3.64576 + 3.27600 -4.29257 0.00000 1.00000 4.29257 + 3.29450 -4.83876 0.00000 1.00000 4.83876 + 3.31300 -5.14008 0.00000 1.00000 5.14008 + 3.33150 -5.08721 0.00000 1.00000 5.08721 + 3.35000 -4.62391 0.00000 1.00000 4.62391 + 3.36850 -3.75470 0.00000 1.00000 3.75470 + 3.38700 -2.54063 0.00000 1.00000 2.54063 + 3.40550 -1.08396 0.00000 1.00000 1.08396 + 3.42400 0.493223 0.00000 1.00000 -0.493223 + 3.44250 2.06874 0.00000 1.00000 -2.06874 + 3.46100 3.53152 0.00000 1.00000 -3.53152 + 3.47950 4.78254 0.00000 1.00000 -4.78254 + 3.49800 5.72969 0.00000 1.00000 -5.72969 + 3.51650 6.28423 0.00000 1.00000 -6.28423 + 3.53500 6.36504 0.00000 1.00000 -6.36504 + 3.55350 5.91247 0.00000 1.00000 -5.91247 + 3.57200 4.90861 0.00000 1.00000 -4.90861 + 3.59050 3.39740 0.00000 1.00000 -3.39740 + 3.60900 1.49612 0.00000 1.00000 -1.49612 + 3.62750 -0.608193 0.00000 1.00000 0.608193 + 3.64600 -2.68019 0.00000 1.00000 2.68019 + 3.66450 -4.47243 0.00000 1.00000 4.47243 + 3.68300 -5.76925 0.00000 1.00000 5.76925 + 3.70150 -6.42920 0.00000 1.00000 6.42920 + 3.72000 -6.41719 0.00000 1.00000 6.41719 + 3.73850 -5.81875 0.00000 1.00000 5.81875 + 3.75700 -4.83074 0.00000 1.00000 4.83074 + 3.77550 -3.72667 0.00000 1.00000 3.72667 + 3.79400 -2.80071 0.00000 1.00000 2.80071 + 3.81250 -2.30147 0.00000 1.00000 2.30147 + 3.83100 -2.37126 0.00000 1.00000 2.37126 + 3.84950 -3.00713 0.00000 1.00000 3.00713 + 3.86800 -4.05566 0.00000 1.00000 4.05566 + 3.88650 -5.24604 0.00000 1.00000 5.24604 + 3.90500 -6.25585 0.00000 1.00000 6.25585 + 3.92350 -6.79521 0.00000 1.00000 6.79521 + 3.94200 -6.68830 0.00000 1.00000 6.68830 + 3.96050 -5.93010 0.00000 1.00000 5.93010 + 3.97900 -4.70113 0.00000 1.00000 4.70113 + 3.99750 -3.33259 0.00000 1.00000 3.33259 + 4.01600 -2.22683 0.00000 1.00000 2.22683 + 4.03450 -1.75037 0.00000 1.00000 1.75037 + 4.05300 -2.12498 0.00000 1.00000 2.12498 + 4.07150 -3.34471 0.00000 1.00000 3.34471 + 4.09000 -5.14253 0.00000 1.00000 5.14253 + 4.10850 -7.01935 0.00000 1.00000 7.01935 + 4.12700 -8.33391 0.00000 1.00000 8.33391 + 4.14550 -8.43660 0.00000 1.00000 8.43660 + 4.16400 -6.81920 0.00000 1.00000 6.81920 + 4.18250 -3.24667 0.00000 1.00000 3.24667 + 4.20100 2.16009 0.00000 1.00000 -2.16009 + 4.21950 8.91152 0.00000 1.00000 -8.91152 + 4.23800 16.2134 0.00000 1.00000 -16.2134 + 4.25650 23.0973 0.00000 1.00000 -23.0973 + 4.27500 28.5935 0.00000 1.00000 -28.5935 + 4.29350 31.9106 0.00000 1.00000 -31.9106 + 4.31200 32.5842 0.00000 1.00000 -32.5842 + 4.33050 30.5617 0.00000 1.00000 -30.5617 + 4.34900 26.2027 0.00000 1.00000 -26.2027 + 4.36750 20.1990 0.00000 1.00000 -20.1990 + 4.38600 13.4320 0.00000 1.00000 -13.4320 + 4.40450 6.80337 0.00000 1.00000 -6.80337 + 4.42300 1.07527 0.00000 1.00000 -1.07527 + 4.44150 -3.24700 0.00000 1.00000 3.24700 + 4.46000 -5.96945 0.00000 1.00000 5.96945 + 4.47850 -7.19581 0.00000 1.00000 7.19581 + 4.49700 -7.25613 0.00000 1.00000 7.25613 + 4.51550 -6.59972 0.00000 1.00000 6.59972 + 4.53400 -5.68054 0.00000 1.00000 5.68054 + 4.55250 -4.86170 0.00000 1.00000 4.86170 + 4.57100 -4.35835 0.00000 1.00000 4.35835 + 4.58950 -4.22677 0.00000 1.00000 4.22677 + 4.60800 -4.39508 0.00000 1.00000 4.39508 + 4.62650 -4.72130 0.00000 1.00000 4.72130 + 4.64500 -5.05871 0.00000 1.00000 5.05871 + 4.66350 -5.30848 0.00000 1.00000 5.30848 + 4.68200 -5.44197 0.00000 1.00000 5.44197 + 4.70050 -5.50097 0.00000 1.00000 5.50097 + 4.71900 -5.56456 0.00000 1.00000 5.56456 + 4.73750 -5.69659 0.00000 1.00000 5.69659 + 4.75600 -5.90806 0.00000 1.00000 5.90806 + 4.77450 -6.13525 0.00000 1.00000 6.13525 + 4.79300 -6.24364 0.00000 1.00000 6.24364 + 4.81150 -6.05670 0.00000 1.00000 6.05670 + 4.83000 -5.40165 0.00000 1.00000 5.40165 + 4.84850 -4.16022 0.00000 1.00000 4.16022 + 4.86700 -2.31100 0.00000 1.00000 2.31100 + 4.88550 0.0479985 0.00000 1.00000 -0.0479985 + 4.90400 2.70271 0.00000 1.00000 -2.70271 + 4.92250 5.35252 0.00000 1.00000 -5.35252 + 4.94100 7.65960 0.00000 1.00000 -7.65960 + 4.95950 9.30734 0.00000 1.00000 -9.30734 + 4.97800 10.0558 0.00000 1.00000 -10.0558 + 4.99650 9.78268 0.00000 1.00000 -9.78268 + 5.01500 8.50309 0.00000 1.00000 -8.50309 + 5.03350 6.36470 0.00000 1.00000 -6.36470 + 5.05200 3.62252 0.00000 1.00000 -3.62252 + 5.07050 0.599290 0.00000 1.00000 -0.599290 + 5.08900 -2.36086 0.00000 1.00000 2.36086 + 5.10750 -4.93870 0.00000 1.00000 4.93870 + 5.12600 -6.88149 0.00000 1.00000 6.88149 + 5.14450 -8.03565 0.00000 1.00000 8.03565 + 5.16300 -8.36668 0.00000 1.00000 8.36668 + 5.18150 -7.96304 0.00000 1.00000 7.96304 + 5.20000 -7.02207 0.00000 1.00000 7.02207 + 5.21850 -5.81895 0.00000 1.00000 5.81895 + 5.23700 -4.66171 0.00000 1.00000 4.66171 + 5.25550 -3.83844 0.00000 1.00000 3.83844 + 5.27400 -3.56410 0.00000 1.00000 3.56410 + 5.29250 -3.93573 0.00000 1.00000 3.93573 + 5.31100 -4.90467 0.00000 1.00000 4.90467 + 5.32950 -6.27267 0.00000 1.00000 6.27267 + 5.34800 -7.71536 0.00000 1.00000 7.71536 + 5.36650 -8.83203 0.00000 1.00000 8.83203 + 5.38500 -9.21516 0.00000 1.00000 9.21516 + 5.40350 -8.52808 0.00000 1.00000 8.52808 + 5.42200 -6.57611 0.00000 1.00000 6.57611 + 5.44050 -3.35625 0.00000 1.00000 3.35625 + 5.45900 0.925287 0.00000 1.00000 -0.925287 + 5.47750 5.87209 0.00000 1.00000 -5.87209 + 5.49600 10.9500 0.00000 1.00000 -10.9500 + 5.51450 15.5640 0.00000 1.00000 -15.5640 + 5.53300 19.1477 0.00000 1.00000 -19.1477 + 5.55150 21.2490 0.00000 1.00000 -21.2490 + 5.57000 21.6003 0.00000 1.00000 -21.6003 + 5.58850 20.1588 0.00000 1.00000 -20.1588 + 5.60700 17.1124 0.00000 1.00000 -17.1124 + 5.62550 12.8494 0.00000 1.00000 -12.8494 + 5.64400 7.89927 0.00000 1.00000 -7.89927 + 5.66250 2.85190 0.00000 1.00000 -2.85190 + 5.68100 -1.72997 0.00000 1.00000 1.72997 + 5.69950 -5.39381 0.00000 1.00000 5.39381 + 5.71800 -7.86162 0.00000 1.00000 7.86162 + 5.73650 -9.06420 0.00000 1.00000 9.06420 + 5.75500 -9.13837 0.00000 1.00000 9.13837 + 5.77350 -8.38683 0.00000 1.00000 8.38683 + 5.79200 -7.20818 0.00000 1.00000 7.20818 + 5.81050 -6.01172 0.00000 1.00000 6.01172 + 5.82900 -5.13567 0.00000 1.00000 5.13567 + 5.84750 -4.78662 0.00000 1.00000 4.78662 + 5.86600 -5.01125 0.00000 1.00000 5.01125 + 5.88450 -5.70222 0.00000 1.00000 5.70222 + 5.90300 -6.63275 0.00000 1.00000 6.63275 + 5.92150 -7.51031 0.00000 1.00000 7.51031 + 5.94000 -8.03914 0.00000 1.00000 8.03914 + 5.95850 -7.98163 0.00000 1.00000 7.98163 + 5.97700 -7.20897 0.00000 1.00000 7.20897 + 5.99550 -5.73309 0.00000 1.00000 5.73309 + 6.01400 -3.71335 0.00000 1.00000 3.71335 + 6.03250 -1.43572 0.00000 1.00000 1.43572 + 6.05100 0.734316 0.00000 1.00000 -0.734316 + 6.06950 2.41816 0.00000 1.00000 -2.41816 + 6.08800 3.29880 0.00000 1.00000 -3.29880 + 6.10650 3.18922 0.00000 1.00000 -3.18922 + 6.12500 2.07961 0.00000 1.00000 -2.07961 + 6.14350 0.150522 0.00000 1.00000 -0.150522 + 6.16200 -2.25436 0.00000 1.00000 2.25436 + 6.18050 -4.69426 0.00000 1.00000 4.69426 + 6.19900 -6.72460 0.00000 1.00000 6.72460 + 6.21750 -7.99834 0.00000 1.00000 7.99834 + 6.23600 -8.35142 0.00000 1.00000 8.35142 + 6.25450 -7.84948 0.00000 1.00000 7.84948 + 6.27300 -6.78013 0.00000 1.00000 6.78013 + 6.29150 -5.58671 0.00000 1.00000 5.58671 + 6.31000 -4.75441 0.00000 1.00000 4.75441 + 6.32850 -4.67266 0.00000 1.00000 4.67266 + 6.34700 -5.50714 0.00000 1.00000 5.50714 + 6.36550 -7.11590 0.00000 1.00000 7.11590 + 6.38400 -9.03699 0.00000 1.00000 9.03699 + 6.40250 -10.5592 0.00000 1.00000 10.5592 + 6.42100 -10.8676 0.00000 1.00000 10.8676 + 6.43950 -9.23379 0.00000 1.00000 9.23379 + 6.45800 -5.20861 0.00000 1.00000 5.20861 + 6.47650 1.23011 0.00000 1.00000 -1.23011 + 6.49500 9.61241 0.00000 1.00000 -9.61241 + 6.51350 19.0142 0.00000 1.00000 -19.0142 + 6.53200 28.1967 0.00000 1.00000 -28.1967 + 6.55050 35.8243 0.00000 1.00000 -35.8243 + 6.56900 40.7166 0.00000 1.00000 -40.7166 + 6.58750 42.0833 0.00000 1.00000 -42.0833 + 6.60600 39.6873 0.00000 1.00000 -39.6873 + 6.62450 33.8989 0.00000 1.00000 -33.8989 + 6.64300 25.6256 0.00000 1.00000 -25.6256 + 6.66150 16.1324 0.00000 1.00000 -16.1324 + 6.68000 6.79125 0.00000 1.00000 -6.79125 + 6.69850 -1.18411 0.00000 1.00000 1.18411 + 6.71700 -6.95910 0.00000 1.00000 6.95910 + 6.73550 -10.2079 0.00000 1.00000 10.2079 + 6.75400 -11.1248 0.00000 1.00000 11.1248 + 6.77250 -10.3198 0.00000 1.00000 10.3198 + 6.79100 -8.62815 0.00000 1.00000 8.62815 + 6.80950 -6.88571 0.00000 1.00000 6.88571 + 6.82800 -5.72660 0.00000 1.00000 5.72660 + 6.84650 -5.45332 0.00000 1.00000 5.45332 + 6.86500 -6.00649 0.00000 1.00000 6.00649 + 6.88350 -7.03437 0.00000 1.00000 7.03437 + 6.90200 -8.03570 0.00000 1.00000 8.03570 + 6.92050 -8.53209 0.00000 1.00000 8.53209 + 6.93900 -8.22002 0.00000 1.00000 8.22002 + 6.95750 -7.06140 0.00000 1.00000 7.06140 + 6.97600 -5.29017 0.00000 1.00000 5.29017 + 6.99450 -3.33754 0.00000 1.00000 3.33754 + 7.01300 -1.70148 0.00000 1.00000 1.70148 + 7.03150 -0.800760 0.00000 1.00000 0.800760 + 7.05000 -0.856664 0.00000 1.00000 0.856664 + 7.06850 -1.83505 0.00000 1.00000 1.83505 + 7.08700 -3.46358 0.00000 1.00000 3.46358 + 7.10550 -5.31731 0.00000 1.00000 5.31731 + 7.12400 -6.94715 0.00000 1.00000 6.94715 + 7.14250 -8.01332 0.00000 1.00000 8.01332 + 7.16100 -8.38320 0.00000 1.00000 8.38320 + 7.17950 -8.16268 0.00000 1.00000 8.16268 + 7.19800 -7.64952 0.00000 1.00000 7.64952 + 7.21650 -7.22129 0.00000 1.00000 7.22129 + 7.23500 -7.19206 0.00000 1.00000 7.19206 + 7.25350 -7.68220 0.00000 1.00000 7.68220 + 7.27200 -8.54371 0.00000 1.00000 8.54371 + 7.29050 -9.36819 0.00000 1.00000 9.36819 + 7.30900 -9.58072 0.00000 1.00000 9.58072 + 7.32750 -8.59790 0.00000 1.00000 8.59790 + 7.34600 -6.00785 0.00000 1.00000 6.00785 + 7.36450 -1.72106 0.00000 1.00000 1.72106 + 7.38300 3.95269 0.00000 1.00000 -3.95269 + 7.40150 10.3276 0.00000 1.00000 -10.3276 + 7.42000 16.4640 0.00000 1.00000 -16.4640 + 7.43850 21.3618 0.00000 1.00000 -21.3618 + 7.45700 24.1782 0.00000 1.00000 -24.1782 + 7.47550 24.4162 0.00000 1.00000 -24.4162 + 7.49400 22.0356 0.00000 1.00000 -22.0356 + 7.51250 17.4573 0.00000 1.00000 -17.4573 + 7.53100 11.4623 0.00000 1.00000 -11.4623 + 7.54950 5.01118 0.00000 1.00000 -5.01118 + 7.56800 -0.965076 0.00000 1.00000 0.965076 + 7.58650 -5.75153 0.00000 1.00000 5.75153 + 7.60500 -8.96799 0.00000 1.00000 8.96799 + 7.62350 -10.5969 0.00000 1.00000 10.5969 + 7.64200 -10.9206 0.00000 1.00000 10.9206 + 7.66050 -10.3893 0.00000 1.00000 10.3893 + 7.67900 -9.46200 0.00000 1.00000 9.46200 + 7.69750 -8.46444 0.00000 1.00000 8.46444 + 7.71600 -7.50854 0.00000 1.00000 7.50854 + 7.73450 -6.49304 0.00000 1.00000 6.49304 + 7.75300 -5.18168 0.00000 1.00000 5.18168 + 7.77150 -3.32911 0.00000 1.00000 3.32911 + 7.79000 -0.811546 0.00000 1.00000 0.811546 + 7.80850 2.28073 0.00000 1.00000 -2.28073 + 7.82700 5.61902 0.00000 1.00000 -5.61902 + 7.84550 8.68909 0.00000 1.00000 -8.68909 + 7.86400 10.9073 0.00000 1.00000 -10.9073 + 7.88250 11.7676 0.00000 1.00000 -11.7676 + 7.90100 10.9777 0.00000 1.00000 -10.9777 + 7.91950 8.54633 0.00000 1.00000 -8.54633 + 7.93800 4.79627 0.00000 1.00000 -4.79627 + 7.95650 0.300695 0.00000 1.00000 -0.300695 + 7.97500 -4.24152 0.00000 1.00000 4.24152 + 7.99350 -8.15787 0.00000 1.00000 8.15787 + 8.01200 -10.9420 0.00000 1.00000 10.9420 + 8.03050 -12.3456 0.00000 1.00000 12.3456 + 8.04900 -12.4001 0.00000 1.00000 12.4001 + 8.06750 -11.3663 0.00000 1.00000 11.3663 + 8.08600 -9.63181 0.00000 1.00000 9.63181 + 8.10450 -7.58723 0.00000 1.00000 7.58723 + 8.12300 -5.52117 0.00000 1.00000 5.52117 + 8.14150 -3.56353 0.00000 1.00000 3.56353 + 8.16000 -1.69260 0.00000 1.00000 1.69260 + 8.17850 0.199827 0.00000 1.00000 -0.199827 + 8.19700 2.21044 0.00000 1.00000 -2.21044 + 8.21550 4.33057 0.00000 1.00000 -4.33057 + 8.23400 6.39218 0.00000 1.00000 -6.39218 + 8.25250 8.07555 0.00000 1.00000 -8.07555 + 8.27100 8.97896 0.00000 1.00000 -8.97896 + 8.28950 8.73073 0.00000 1.00000 -8.73073 + 8.30800 7.11016 0.00000 1.00000 -7.11016 + 8.32650 4.14151 0.00000 1.00000 -4.14151 + 8.34500 0.130936 0.00000 1.00000 -0.130936 + 8.36350 -4.36837 0.00000 1.00000 4.36837 + 8.38200 -8.65854 0.00000 1.00000 8.65854 + 8.40050 -12.0433 0.00000 1.00000 12.0433 + 8.41900 -13.9807 0.00000 1.00000 13.9807 + 8.43750 -14.2030 0.00000 1.00000 14.2030 + 8.45600 -12.7704 0.00000 1.00000 12.7704 + 8.47450 -10.0445 0.00000 1.00000 10.0445 + 8.49300 -6.58938 0.00000 1.00000 6.58938 + 8.51150 -3.02663 0.00000 1.00000 3.02663 + 8.53000 0.112114 0.00000 1.00000 -0.112114 + 8.54850 2.49566 0.00000 1.00000 -2.49566 + 8.56700 4.03580 0.00000 1.00000 -4.03580 + 8.58550 4.85377 0.00000 1.00000 -4.85377 + 8.60400 5.18537 0.00000 1.00000 -5.18537 + 8.62250 5.25808 0.00000 1.00000 -5.25808 + 8.64100 5.18193 0.00000 1.00000 -5.18193 + 8.65950 4.89182 0.00000 1.00000 -4.89182 + 8.67800 4.16349 0.00000 1.00000 -4.16349 + 8.69650 2.70252 0.00000 1.00000 -2.70252 + 8.71500 0.282220 0.00000 1.00000 -0.282220 + 8.73350 -3.11124 0.00000 1.00000 3.11124 + 8.75200 -7.17490 0.00000 1.00000 7.17490 + 8.77050 -11.2672 0.00000 1.00000 11.2672 + 8.78900 -14.4886 0.00000 1.00000 14.4886 + 8.80750 -15.8559 0.00000 1.00000 15.8559 + 8.82600 -14.5328 0.00000 1.00000 14.5328 + 8.84450 -10.0609 0.00000 1.00000 10.0609 + 8.86300 -2.52773 0.00000 1.00000 2.52773 + 8.88150 7.37428 0.00000 1.00000 -7.37428 + 8.90000 18.4240 0.00000 1.00000 -18.4240 + 8.91850 29.0726 0.00000 1.00000 -29.0726 + 8.93700 37.7295 0.00000 1.00000 -37.7295 + 8.95550 43.0717 0.00000 1.00000 -43.0717 + 8.97400 44.3044 0.00000 1.00000 -44.3044 + 8.99250 41.3154 0.00000 1.00000 -41.3154 + 9.01100 34.6857 0.00000 1.00000 -34.6857 + 9.02950 25.5570 0.00000 1.00000 -25.5570 + 9.04800 15.3859 0.00000 1.00000 -15.3859 + 9.06650 5.64529 0.00000 1.00000 -5.64529 + 9.08500 -2.45985 0.00000 1.00000 2.45985 + 9.10350 -8.19758 0.00000 1.00000 8.19758 + 9.12200 -11.3936 0.00000 1.00000 11.3936 + 9.14050 -12.3840 0.00000 1.00000 12.3840 + 9.15900 -11.8591 0.00000 1.00000 11.8591 + 9.17750 -10.6446 0.00000 1.00000 10.6446 + 9.19600 -9.48212 0.00000 1.00000 9.48212 + 9.21450 -8.86286 0.00000 1.00000 8.86286 + 9.23300 -8.95166 0.00000 1.00000 8.95166 + 9.25150 -9.60978 0.00000 1.00000 9.60978 + 9.27000 -10.4985 0.00000 1.00000 10.4985 + 9.28850 -11.2264 0.00000 1.00000 11.2264 + 9.30700 -11.4956 0.00000 1.00000 11.4956 + 9.32550 -11.2056 0.00000 1.00000 11.2056 + 9.34400 -10.4851 0.00000 1.00000 10.4851 + 9.36250 -9.64367 0.00000 1.00000 9.64367 + 9.38100 -9.05839 0.00000 1.00000 9.05839 + 9.39950 -9.03059 0.00000 1.00000 9.03059 + 9.41800 -9.65891 0.00000 1.00000 9.65891 + 9.43650 -10.7695 0.00000 1.00000 10.7695 + 9.45500 -11.9282 0.00000 1.00000 11.9282 + 9.47350 -12.5352 0.00000 1.00000 12.5352 + 9.49200 -11.9793 0.00000 1.00000 11.9793 + 9.51050 -9.80968 0.00000 1.00000 9.80968 + 9.52900 -5.88098 0.00000 1.00000 5.88098 + 9.54750 -0.429865 0.00000 1.00000 0.429865 + 9.56600 5.93738 0.00000 1.00000 -5.93738 + 9.58450 12.3467 0.00000 1.00000 -12.3467 + 9.60300 17.8253 0.00000 1.00000 -17.8253 + 9.62150 21.4983 0.00000 1.00000 -21.4983 + 9.64000 22.7684 0.00000 1.00000 -22.7684 + 9.65850 21.4353 0.00000 1.00000 -21.4353 + 9.67700 17.7297 0.00000 1.00000 -17.7297 + 9.69550 12.2556 0.00000 1.00000 -12.2556 + 9.71400 5.85940 0.00000 1.00000 -5.85940 + 9.73250 -0.539853 0.00000 1.00000 0.539853 + 9.75100 -6.11696 0.00000 1.00000 6.11696 + 9.76950 -10.2704 0.00000 1.00000 10.2704 + 9.78800 -12.6954 0.00000 1.00000 12.6954 + 9.80650 -13.3941 0.00000 1.00000 13.3941 + 9.82500 -12.6315 0.00000 1.00000 12.6315 + 9.84350 -10.8487 0.00000 1.00000 10.8487 + 9.86200 -8.55755 0.00000 1.00000 8.55755 + 9.88050 -6.24003 0.00000 1.00000 6.24003 + 9.89900 -4.27478 0.00000 1.00000 4.27478 + 9.91750 -2.90328 0.00000 1.00000 2.90328 + 9.93600 -2.23386 0.00000 1.00000 2.23386 + 9.95450 -2.27104 0.00000 1.00000 2.27104 + 9.97300 -2.95175 0.00000 1.00000 2.95175 + 9.99150 -4.17209 0.00000 1.00000 4.17209 + 10.0100 -5.79607 0.00000 1.00000 5.79607 + 10.0285 -7.64859 0.00000 1.00000 7.64859 + 10.0470 -9.50283 0.00000 1.00000 9.50283 + 10.0655 -11.0757 0.00000 1.00000 11.0757 + 10.0840 -12.0425 0.00000 1.00000 12.0425 + 10.1025 -12.0751 0.00000 1.00000 12.0751 + 10.1210 -10.9017 0.00000 1.00000 10.9017 + 10.1395 -8.37613 0.00000 1.00000 8.37613 + 10.1580 -4.54026 0.00000 1.00000 4.54026 + 10.1765 0.338357 0.00000 1.00000 -0.338357 + 10.1950 5.76996 0.00000 1.00000 -5.76996 + 10.2135 11.0939 0.00000 1.00000 -11.0939 + 10.2320 15.5741 0.00000 1.00000 -15.5741 + 10.2505 18.5225 0.00000 1.00000 -18.5225 + 10.2690 19.4270 0.00000 1.00000 -19.4270 + 10.2875 18.0567 0.00000 1.00000 -18.0567 + 10.3060 14.5227 0.00000 1.00000 -14.5227 + 10.3245 9.27796 0.00000 1.00000 -9.27796 + 10.3430 3.05599 0.00000 1.00000 -3.05599 + 10.3615 -3.24345 0.00000 1.00000 3.24345 + 10.3800 -8.70145 0.00000 1.00000 8.70145 + 10.3985 -12.5330 0.00000 1.00000 12.5330 + 10.4170 -14.2182 0.00000 1.00000 14.2182 + 10.4355 -13.5885 0.00000 1.00000 13.5885 + 10.4540 -10.8525 0.00000 1.00000 10.8525 + 10.4725 -6.55772 0.00000 1.00000 6.55772 + 10.4910 -1.49640 0.00000 1.00000 1.49640 + 10.5095 3.42852 0.00000 1.00000 -3.42852 + 10.5280 7.35363 0.00000 1.00000 -7.35363 + 10.5465 9.59717 0.00000 1.00000 -9.59717 + 10.5650 9.77054 0.00000 1.00000 -9.77054 + 10.5835 7.84234 0.00000 1.00000 -7.84234 + 10.6020 4.14584 0.00000 1.00000 -4.14584 + 10.6205 -0.671143 0.00000 1.00000 0.671143 + 10.6390 -5.74603 0.00000 1.00000 5.74603 + 10.6575 -10.1361 0.00000 1.00000 10.1361 + 10.6760 -12.9671 0.00000 1.00000 12.9671 + 10.6945 -13.5738 0.00000 1.00000 13.5738 + 10.7130 -11.6108 0.00000 1.00000 11.6108 + 10.7315 -7.11852 0.00000 1.00000 7.11852 + 10.7500 -0.532582 0.00000 1.00000 0.532582 + 10.7685 7.36496 0.00000 1.00000 -7.36496 + 10.7870 15.5502 0.00000 1.00000 -15.5502 + 10.8055 22.9046 0.00000 1.00000 -22.9046 + 10.8240 28.3836 0.00000 1.00000 -28.3836 + 10.8425 31.1819 0.00000 1.00000 -31.1819 + 10.8610 30.8667 0.00000 1.00000 -30.8667 + 10.8795 27.4544 0.00000 1.00000 -27.4544 + 10.8980 21.4174 0.00000 1.00000 -21.4174 + 10.9165 13.6149 0.00000 1.00000 -13.6149 + 10.9350 5.15717 0.00000 1.00000 -5.15717 + 10.9535 -2.77403 0.00000 1.00000 2.77403 + 10.9720 -9.11963 0.00000 1.00000 9.11963 + 10.9905 -13.1166 0.00000 1.00000 13.1166 + 11.0090 -14.4189 0.00000 1.00000 14.4189 + 11.0275 -13.1446 0.00000 1.00000 13.1446 + 11.0460 -9.84069 0.00000 1.00000 9.84069 + 11.0645 -5.37361 0.00000 1.00000 5.37361 + 11.0830 -0.766336 0.00000 1.00000 0.766336 + 11.1015 2.99059 0.00000 1.00000 -2.99059 + 11.1200 5.12102 0.00000 1.00000 -5.12102 + 11.1385 5.20555 0.00000 1.00000 -5.20555 + 11.1570 3.25580 0.00000 1.00000 -3.25580 + 11.1755 -0.295787 0.00000 1.00000 0.295787 + 11.1940 -4.68917 0.00000 1.00000 4.68917 + 11.2125 -8.99252 0.00000 1.00000 8.99252 + 11.2310 -12.2872 0.00000 1.00000 12.2872 + 11.2495 -13.8447 0.00000 1.00000 13.8447 + 11.2680 -13.2610 0.00000 1.00000 13.2610 + 11.2865 -10.5280 0.00000 1.00000 10.5280 + 11.3050 -6.02790 0.00000 1.00000 6.02790 + 11.3235 -0.457428 0.00000 1.00000 0.457428 + 11.3420 5.30272 0.00000 1.00000 -5.30272 + 11.3605 10.3468 0.00000 1.00000 -10.3468 + 11.3790 13.9003 0.00000 1.00000 -13.9003 + 11.3975 15.4459 0.00000 1.00000 -15.4459 + 11.4160 14.7993 0.00000 1.00000 -14.7993 + 11.4345 12.1251 0.00000 1.00000 -12.1251 + 11.4530 7.89515 0.00000 1.00000 -7.89515 + 11.4715 2.79743 0.00000 1.00000 -2.79743 + 11.4900 -2.38402 0.00000 1.00000 2.38402 + 11.5085 -6.89848 0.00000 1.00000 6.89848 + 11.5270 -10.1446 0.00000 1.00000 10.1446 + 11.5455 -11.7562 0.00000 1.00000 11.7562 + 11.5640 -11.6477 0.00000 1.00000 11.6477 + 11.5825 -10.0156 0.00000 1.00000 10.0156 + 11.6010 -7.29778 0.00000 1.00000 7.29778 + 11.6195 -4.09885 0.00000 1.00000 4.09885 + 11.6380 -1.08810 0.00000 1.00000 1.08810 + 11.6565 1.11439 0.00000 1.00000 -1.11439 + 11.6750 2.04788 0.00000 1.00000 -2.04788 + 11.6935 1.49867 0.00000 1.00000 -1.49867 + 11.7120 -0.451611 0.00000 1.00000 0.451611 + 11.7305 -3.42848 0.00000 1.00000 3.42848 + 11.7490 -6.82125 0.00000 1.00000 6.82125 + 11.7675 -9.88740 0.00000 1.00000 9.88740 + 11.7860 -11.8896 0.00000 1.00000 11.8896 + 11.8045 -12.2430 0.00000 1.00000 12.2430 + 11.8230 -10.6446 0.00000 1.00000 10.6446 + 11.8415 -7.15722 0.00000 1.00000 7.15722 + 11.8600 -2.22583 0.00000 1.00000 2.22583 + 11.8785 3.38458 0.00000 1.00000 -3.38458 + 11.8970 8.72108 0.00000 1.00000 -8.72108 + 11.9155 12.8213 0.00000 1.00000 -12.8213 + 11.9340 14.9032 0.00000 1.00000 -14.9032 + 11.9525 14.5281 0.00000 1.00000 -14.5281 + 11.9710 11.6999 0.00000 1.00000 -11.6999 + 11.9895 6.87776 0.00000 1.00000 -6.87776 + 12.0080 0.891504 0.00000 1.00000 -0.891504 + 12.0265 -5.22565 0.00000 1.00000 5.22565 + 12.0450 -10.4522 0.00000 1.00000 10.4522 + 12.0635 -13.9931 0.00000 1.00000 13.9931 + 12.0820 -15.4435 0.00000 1.00000 15.4435 + 12.1005 -14.8644 0.00000 1.00000 14.8644 + 12.1190 -12.7520 0.00000 1.00000 12.7520 + 12.1375 -9.90845 0.00000 1.00000 9.90845 + 12.1560 -7.24453 0.00000 1.00000 7.24453 + 12.1745 -5.56166 0.00000 1.00000 5.56166 + 12.1930 -5.36161 0.00000 1.00000 5.36161 + 12.2115 -6.72586 0.00000 1.00000 6.72586 + 12.2300 -9.28835 0.00000 1.00000 9.28835 + 12.2485 -12.3067 0.00000 1.00000 12.3067 + 12.2670 -14.8178 0.00000 1.00000 14.8178 + 12.2855 -15.8476 0.00000 1.00000 15.8476 + 12.3040 -14.6332 0.00000 1.00000 14.6332 + 12.3225 -10.8097 0.00000 1.00000 10.8097 + 12.3410 -4.52145 0.00000 1.00000 4.52145 + 12.3595 3.57058 0.00000 1.00000 -3.57058 + 12.3780 12.3893 0.00000 1.00000 -12.3893 + 12.3965 20.6314 0.00000 1.00000 -20.6314 + 12.4150 27.0092 0.00000 1.00000 -27.0092 + 12.4335 30.4959 0.00000 1.00000 -30.4959 + 12.4520 30.5247 0.00000 1.00000 -30.5247 + 12.4705 27.1034 0.00000 1.00000 -27.1034 + 12.4890 20.8197 0.00000 1.00000 -20.8197 + 12.5075 12.7348 0.00000 1.00000 -12.7348 + 12.5260 4.18409 0.00000 1.00000 -4.18409 + 12.5445 -3.47600 0.00000 1.00000 3.47600 + 12.5630 -9.12640 0.00000 1.00000 9.12640 + 12.5815 -12.0958 0.00000 1.00000 12.0958 + 12.6000 -12.2803 0.00000 1.00000 12.2803 + 12.6185 -10.1467 0.00000 1.00000 10.1467 + 12.6370 -6.61573 0.00000 1.00000 6.61573 + 12.6555 -2.84816 0.00000 1.00000 2.84816 + 12.6740 0.0234471 0.00000 1.00000 -0.0234471 + 12.6925 1.16051 0.00000 1.00000 -1.16051 + 12.7110 0.222329 0.00000 1.00000 -0.222329 + 12.7295 -2.53923 0.00000 1.00000 2.53923 + 12.7480 -6.31966 0.00000 1.00000 6.31966 + 12.7665 -9.93250 0.00000 1.00000 9.93250 + 12.7850 -12.0782 0.00000 1.00000 12.0782 + 12.8035 -11.6556 0.00000 1.00000 11.6556 + 12.8220 -8.04822 0.00000 1.00000 8.04822 + 12.8405 -1.31753 0.00000 1.00000 1.31753 + 12.8590 7.74657 0.00000 1.00000 -7.74657 + 12.8775 17.7420 0.00000 1.00000 -17.7420 + 12.8960 26.9214 0.00000 1.00000 -26.9214 + 12.9145 33.5578 0.00000 1.00000 -33.5578 + 12.9330 36.3277 0.00000 1.00000 -36.3277 + 12.9515 34.6234 0.00000 1.00000 -34.6234 + 12.9700 28.7156 0.00000 1.00000 -28.7156 + 12.9885 19.7233 0.00000 1.00000 -19.7233 + 13.0070 9.38804 0.00000 1.00000 -9.38804 + 13.0255 -0.297908 0.00000 1.00000 0.297908 + 13.0440 -7.52791 0.00000 1.00000 7.52791 + 13.0625 -11.0794 0.00000 1.00000 11.0794 + 13.0810 -10.5807 0.00000 1.00000 10.5807 + 13.0995 -6.58087 0.00000 1.00000 6.58087 + 13.1180 -0.404585 0.00000 1.00000 0.404585 + 13.1365 6.17556 0.00000 1.00000 -6.17556 + 13.1550 11.3708 0.00000 1.00000 -11.3708 + 13.1735 13.8053 0.00000 1.00000 -13.8053 + 13.1920 12.8357 0.00000 1.00000 -12.8357 + 13.2105 8.68336 0.00000 1.00000 -8.68336 + 13.2290 2.34908 0.00000 1.00000 -2.34908 + 13.2475 -4.66287 0.00000 1.00000 4.66287 + 13.2660 -10.7379 0.00000 1.00000 10.7379 + 13.2845 -14.5602 0.00000 1.00000 14.5602 + 13.3030 -15.4343 0.00000 1.00000 15.4343 + 13.3215 -13.4393 0.00000 1.00000 13.4393 + 13.3400 -9.37967 0.00000 1.00000 9.37967 + 13.3585 -4.55053 0.00000 1.00000 4.55053 + 13.3770 -0.382431 0.00000 1.00000 0.382431 + 13.3955 1.93839 0.00000 1.00000 -1.93839 + 13.4140 1.77366 0.00000 1.00000 -1.77366 + 13.4325 -0.818874 0.00000 1.00000 0.818874 + 13.4510 -5.13072 0.00000 1.00000 5.13072 + 13.4695 -10.0255 0.00000 1.00000 10.0255 + 13.4880 -14.2744 0.00000 1.00000 14.2744 + 13.5065 -16.9060 0.00000 1.00000 16.9060 + 13.5250 -17.4714 0.00000 1.00000 17.4714 + 13.5435 -16.1512 0.00000 1.00000 16.1512 + 13.5620 -13.6784 0.00000 1.00000 13.6784 + 13.5805 -11.1043 0.00000 1.00000 11.1043 + 13.5990 -9.47288 0.00000 1.00000 9.47288 + 13.6175 -9.49567 0.00000 1.00000 9.49567 + 13.6360 -11.3153 0.00000 1.00000 11.3153 + 13.6545 -14.4268 0.00000 1.00000 14.4268 + 13.6730 -17.7824 0.00000 1.00000 17.7824 + 13.6915 -20.0552 0.00000 1.00000 20.0552 + 13.7100 -19.9965 0.00000 1.00000 19.9965 + 13.7285 -16.7898 0.00000 1.00000 16.7898 + 13.7470 -10.3089 0.00000 1.00000 10.3089 + 13.7655 -1.20781 0.00000 1.00000 1.20781 + 13.7840 9.18567 0.00000 1.00000 -9.18567 + 13.8025 19.1488 0.00000 1.00000 -19.1488 + 13.8210 26.9489 0.00000 1.00000 -26.9489 + 13.8395 31.2366 0.00000 1.00000 -31.2366 + 13.8580 31.3496 0.00000 1.00000 -31.3496 + 13.8765 27.4511 0.00000 1.00000 -27.4511 + 13.8950 20.4697 0.00000 1.00000 -20.4697 + 13.9135 11.8582 0.00000 1.00000 -11.8582 + 13.9320 3.23523 0.00000 1.00000 -3.23523 + 13.9505 -3.99882 0.00000 1.00000 3.99882 + 13.9690 -8.96984 0.00000 1.00000 8.96984 + 13.9875 -11.4848 0.00000 1.00000 11.4848 + 14.0060 -11.9967 0.00000 1.00000 11.9967 + 14.0245 -11.3970 0.00000 1.00000 11.3970 + 14.0430 -10.7008 0.00000 1.00000 10.7008 + 14.0615 -10.7168 0.00000 1.00000 10.7168 + 14.0800 -11.7936 0.00000 1.00000 11.7936 + 14.0985 -13.7115 0.00000 1.00000 13.7115 + 14.1170 -15.7457 0.00000 1.00000 15.7457 + 14.1355 -16.8835 0.00000 1.00000 16.8835 + 14.1540 -16.1342 0.00000 1.00000 16.1342 + 14.1725 -12.8466 0.00000 1.00000 12.8466 + 14.1910 -6.94542 0.00000 1.00000 6.94542 + 14.2095 0.982134 0.00000 1.00000 -0.982134 + 14.2280 9.77953 0.00000 1.00000 -9.77953 + 14.2465 17.9729 0.00000 1.00000 -17.9729 + 14.2650 24.1178 0.00000 1.00000 -24.1178 + 14.2835 27.1485 0.00000 1.00000 -27.1485 + 14.3020 26.6355 0.00000 1.00000 -26.6355 + 14.3205 22.8839 0.00000 1.00000 -22.8839 + 14.3390 16.8479 0.00000 1.00000 -16.8479 + 14.3575 9.88786 0.00000 1.00000 -9.88786 + 14.3760 3.43554 0.00000 1.00000 -3.43554 + 14.3945 -1.34253 0.00000 1.00000 1.34253 + 14.4130 -3.79922 0.00000 1.00000 3.79922 + 14.4315 -3.91650 0.00000 1.00000 3.91650 + 14.4500 -2.25034 0.00000 1.00000 2.25034 + 14.4685 0.265934 0.00000 1.00000 -0.265934 + 14.4870 2.60091 0.00000 1.00000 -2.60091 + 14.5055 3.90902 0.00000 1.00000 -3.90902 + 14.5240 3.74411 0.00000 1.00000 -3.74411 + 14.5425 2.15013 0.00000 1.00000 -2.15013 + 14.5610 -0.388481 0.00000 1.00000 0.388481 + 14.5795 -3.11515 0.00000 1.00000 3.11515 + 14.5980 -5.23631 0.00000 1.00000 5.23631 + 14.6165 -6.15513 0.00000 1.00000 6.15513 + 14.6350 -5.63898 0.00000 1.00000 5.63898 + 14.6535 -3.87566 0.00000 1.00000 3.87566 + 14.6720 -1.40645 0.00000 1.00000 1.40645 + 14.6905 1.04029 0.00000 1.00000 -1.04029 + 14.7090 2.76304 0.00000 1.00000 -2.76304 + 14.7275 3.28473 0.00000 1.00000 -3.28473 + 14.7460 2.47788 0.00000 1.00000 -2.47788 + 14.7645 0.584519 0.00000 1.00000 -0.584519 + 14.7830 -1.87052 0.00000 1.00000 1.87052 + 14.8015 -4.24417 0.00000 1.00000 4.24417 + 14.8200 -5.96765 0.00000 1.00000 5.96765 + 14.8385 -6.70965 0.00000 1.00000 6.70965 + 14.8570 -6.46211 0.00000 1.00000 6.46211 + 14.8755 -5.52356 0.00000 1.00000 5.52356 + 14.8940 -4.38544 0.00000 1.00000 4.38544 + 14.9125 -3.55512 0.00000 1.00000 3.55512 + 14.9310 -3.36898 0.00000 1.00000 3.36898 + 14.9495 -3.85281 0.00000 1.00000 3.85281 + 14.9680 -4.67590 0.00000 1.00000 4.67590 + 14.9865 -5.21922 0.00000 1.00000 5.21922 + 15.0050 -4.74479 0.00000 1.00000 4.74479 + 15.0235 -2.62144 0.00000 1.00000 2.62144 + 15.0420 1.45687 0.00000 1.00000 -1.45687 + 15.0605 7.32500 0.00000 1.00000 -7.32500 + 15.0790 14.3193 0.00000 1.00000 -14.3193 + 15.0975 21.3835 0.00000 1.00000 -21.3835 + 15.1160 27.2852 0.00000 1.00000 -27.2852 + 15.1345 30.8902 0.00000 1.00000 -30.8902 + 15.1530 31.4245 0.00000 1.00000 -31.4245 + 15.1715 28.6588 0.00000 1.00000 -28.6588 + 15.1900 22.9682 0.00000 1.00000 -22.9682 + 15.2085 15.2541 0.00000 1.00000 -15.2541 + 15.2270 6.74712 0.00000 1.00000 -6.74712 + 15.2455 -1.25964 0.00000 1.00000 1.25964 + 15.2640 -7.68049 0.00000 1.00000 7.68049 + 15.2825 -11.8442 0.00000 1.00000 11.8442 + 15.3010 -13.5919 0.00000 1.00000 13.5919 + 15.3195 -13.2493 0.00000 1.00000 13.2493 + 15.3380 -11.4916 0.00000 1.00000 11.4916 + 15.3565 -9.14144 0.00000 1.00000 9.14144 + 15.3750 -6.95504 0.00000 1.00000 6.95504 + 15.3935 -5.44896 0.00000 1.00000 5.44896 + 15.4120 -4.80772 0.00000 1.00000 4.80772 + 15.4305 -4.88897 0.00000 1.00000 4.88897 + 15.4490 -5.31706 0.00000 1.00000 5.31706 + 15.4675 -5.63285 0.00000 1.00000 5.63285 + 15.4860 -5.45462 0.00000 1.00000 5.45462 + 15.5045 -4.60459 0.00000 1.00000 4.60459 + 15.5230 -3.16776 0.00000 1.00000 3.16776 + 15.5415 -1.46992 0.00000 1.00000 1.46992 + 15.5600 0.0157586 0.00000 1.00000 -0.0157586 + 15.5785 0.806047 0.00000 1.00000 -0.806047 + 15.5970 0.550242 0.00000 1.00000 -0.550242 + 15.6155 -0.861348 0.00000 1.00000 0.861348 + 15.6340 -3.25430 0.00000 1.00000 3.25430 + 15.6525 -6.20584 0.00000 1.00000 6.20584 + 15.6710 -9.14992 0.00000 1.00000 9.14992 + 15.6895 -11.5204 0.00000 1.00000 11.5204 + 15.7080 -12.8909 0.00000 1.00000 12.8909 + 15.7265 -13.0717 0.00000 1.00000 13.0717 + 15.7450 -12.1417 0.00000 1.00000 12.1417 + 15.7635 -10.4097 0.00000 1.00000 10.4097 + 15.7820 -8.32011 0.00000 1.00000 8.32011 + 15.8005 -6.33136 0.00000 1.00000 6.33136 + 15.8190 -4.80087 0.00000 1.00000 4.80087 + 15.8375 -3.90675 0.00000 1.00000 3.90675 + 15.8560 -3.62474 0.00000 1.00000 3.62474 + 15.8745 -3.76225 0.00000 1.00000 3.76225 + 15.8930 -4.03596 0.00000 1.00000 4.03596 + 15.9115 -4.16761 0.00000 1.00000 4.16761 + 15.9300 -3.96959 0.00000 1.00000 3.96959 + 15.9485 -3.39629 0.00000 1.00000 3.39629 + 15.9670 -2.54969 0.00000 1.00000 2.54969 + 15.9855 -1.64188 0.00000 1.00000 1.64188 + 16.0040 -0.928772 0.00000 1.00000 0.928772 + 16.0225 -0.634845 0.00000 1.00000 0.634845 + 16.0410 -0.888145 0.00000 1.00000 0.888145 + 16.0595 -1.67980 0.00000 1.00000 1.67980 + 16.0780 -2.85514 0.00000 1.00000 2.85514 + 16.0965 -4.13661 0.00000 1.00000 4.13661 + 16.1150 -5.17310 0.00000 1.00000 5.17310 + 16.1335 -5.60636 0.00000 1.00000 5.60636 + 16.1520 -5.14159 0.00000 1.00000 5.14159 + 16.1705 -3.60734 0.00000 1.00000 3.60734 + 16.1890 -0.992023 0.00000 1.00000 0.992023 + 16.2075 2.54958 0.00000 1.00000 -2.54958 + 16.2260 6.71807 0.00000 1.00000 -6.71807 + 16.2445 11.1120 0.00000 1.00000 -11.1120 + 16.2630 15.2812 0.00000 1.00000 -15.2812 + 16.2815 18.7822 0.00000 1.00000 -18.7822 + 16.3000 21.2269 0.00000 1.00000 -21.2269 + 16.3185 22.3212 0.00000 1.00000 -22.3212 + 16.3370 21.8912 0.00000 1.00000 -21.8912 + 16.3555 19.8991 0.00000 1.00000 -19.8991 + 16.3740 16.4493 0.00000 1.00000 -16.4493 + 16.3925 11.7863 0.00000 1.00000 -11.7863 + 16.4110 6.28331 0.00000 1.00000 -6.28331 + 16.4295 0.418687 0.00000 1.00000 -0.418687 + 16.4480 -5.25963 0.00000 1.00000 5.25963 + 16.4665 -10.1842 0.00000 1.00000 10.1842 + 16.4850 -13.8295 0.00000 1.00000 13.8295 + 16.5035 -15.7785 0.00000 1.00000 15.7785 + 16.5220 -15.7830 0.00000 1.00000 15.7830 + 16.5405 -13.8070 0.00000 1.00000 13.8070 + 16.5590 -10.0391 0.00000 1.00000 10.0391 + 16.5775 -4.87264 0.00000 1.00000 4.87264 + 16.5960 1.14589 0.00000 1.00000 -1.14589 + 16.6145 7.38649 0.00000 1.00000 -7.38649 + 16.6330 13.2091 0.00000 1.00000 -13.2091 + 16.6515 18.0296 0.00000 1.00000 -18.0296 + 16.6700 21.3708 0.00000 1.00000 -21.3708 + 16.6885 22.8991 0.00000 1.00000 -22.8991 + 16.7070 22.4456 0.00000 1.00000 -22.4456 + 16.7255 20.0158 0.00000 1.00000 -20.0158 + 16.7440 15.7881 0.00000 1.00000 -15.7881 + 16.7625 10.1035 0.00000 1.00000 -10.1035 + 16.7810 3.44424 0.00000 1.00000 -3.44424 + 16.7995 -3.59847 0.00000 1.00000 3.59847 + 16.8180 -10.3717 0.00000 1.00000 10.3717 + 16.8365 -16.2205 0.00000 1.00000 16.2205 + 16.8550 -20.5580 0.00000 1.00000 20.5580 + 16.8735 -22.9372 0.00000 1.00000 22.9372 + 16.8920 -23.1129 0.00000 1.00000 23.1129 + 16.9105 -21.0837 0.00000 1.00000 21.0837 + 16.9290 -17.1032 0.00000 1.00000 17.1032 + 16.9475 -11.6563 0.00000 1.00000 11.6563 + 16.9660 -5.39998 0.00000 1.00000 5.39998 + 16.9845 0.923758 0.00000 1.00000 -0.923758 + 17.0030 6.59122 0.00000 1.00000 -6.59122 + 17.0215 10.9979 0.00000 1.00000 -10.9979 + 17.0400 13.7383 0.00000 1.00000 -13.7383 + 17.0585 14.6477 0.00000 1.00000 -14.6477 + 17.0770 13.7998 0.00000 1.00000 -13.7998 + 17.0955 11.4638 0.00000 1.00000 -11.4638 + 17.1140 8.03578 0.00000 1.00000 -8.03578 + 17.1325 3.96378 0.00000 1.00000 -3.96378 + 17.1510 -0.316698 0.00000 1.00000 0.316698 + 17.1695 -4.42438 0.00000 1.00000 4.42438 + 17.1880 -8.04681 0.00000 1.00000 8.04681 + 17.2065 -10.9324 0.00000 1.00000 10.9324 + 17.2250 -12.8725 0.00000 1.00000 12.8725 + 17.2435 -13.6898 0.00000 1.00000 13.6898 + 17.2620 -13.2456 0.00000 1.00000 13.2456 + 17.2805 -11.4675 0.00000 1.00000 11.4675 + 17.2990 -8.39144 0.00000 1.00000 8.39144 + 17.3175 -4.20001 0.00000 1.00000 4.20001 + 17.3360 0.758004 0.00000 1.00000 -0.758004 + 17.3545 5.98116 0.00000 1.00000 -5.98116 + 17.3730 10.8661 0.00000 1.00000 -10.8661 + 17.3915 14.7906 0.00000 1.00000 -14.7906 + 17.4100 17.2137 0.00000 1.00000 -17.2137 + 17.4285 17.7745 0.00000 1.00000 -17.7745 + 17.4470 16.3661 0.00000 1.00000 -16.3661 + 17.4655 13.1690 0.00000 1.00000 -13.1690 + 17.4840 8.63053 0.00000 1.00000 -8.63053 + 17.5025 3.39246 0.00000 1.00000 -3.39246 + 17.5210 -1.82203 0.00000 1.00000 1.82203 + 17.5395 -6.33848 0.00000 1.00000 6.33848 + 17.5580 -9.64981 0.00000 1.00000 9.64981 + 17.5765 -11.4978 0.00000 1.00000 11.4978 + 17.5950 -11.9009 0.00000 1.00000 11.9009 + 17.6135 -11.1239 0.00000 1.00000 11.1239 + 17.6320 -9.59944 0.00000 1.00000 9.59944 + 17.6505 -7.81972 0.00000 1.00000 7.81972 + 17.6690 -6.22442 0.00000 1.00000 6.22442 + 17.6875 -5.11122 0.00000 1.00000 5.11122 + 17.7060 -4.58875 0.00000 1.00000 4.58875 + 17.7245 -4.58029 0.00000 1.00000 4.58029 + 17.7430 -4.87225 0.00000 1.00000 4.87225 + 17.7615 -5.18968 0.00000 1.00000 5.18968 + 17.7800 -5.27616 0.00000 1.00000 5.27616 + 17.7985 -4.95771 0.00000 1.00000 4.95771 + 17.8170 -4.17763 0.00000 1.00000 4.17763 + 17.8355 -2.99861 0.00000 1.00000 2.99861 + 17.8540 -1.57655 0.00000 1.00000 1.57655 + 17.8725 -0.115674 0.00000 1.00000 0.115674 + 17.8910 1.18232 0.00000 1.00000 -1.18232 + 17.9095 2.16253 0.00000 1.00000 -2.16253 + 17.9280 2.74507 0.00000 1.00000 -2.74507 + 17.9465 2.93310 0.00000 1.00000 -2.93310 + 17.9650 2.80225 0.00000 1.00000 -2.80225 + 17.9835 2.47685 0.00000 1.00000 -2.47685 + 18.0020 2.09940 0.00000 1.00000 -2.09940 + 18.0205 1.79907 0.00000 1.00000 -1.79907 + 18.0390 1.66403 0.00000 1.00000 -1.66403 + 18.0575 1.72260 0.00000 1.00000 -1.72260 + 18.0760 1.93703 0.00000 1.00000 -1.93703 + 18.0945 2.21113 0.00000 1.00000 -2.21113 + 18.1130 2.40837 0.00000 1.00000 -2.40837 + 18.1315 2.37442 0.00000 1.00000 -2.37442 + 18.1500 1.95988 0.00000 1.00000 -1.95988 + 18.1685 1.04724 0.00000 1.00000 -1.04724 + 18.1870 -0.426523 0.00000 1.00000 0.426523 + 18.2055 -2.45315 0.00000 1.00000 2.45315 + 18.2240 -4.90773 0.00000 1.00000 4.90773 + 18.2425 -7.52944 0.00000 1.00000 7.52944 + 18.2610 -9.92715 0.00000 1.00000 9.92715 + 18.2795 -11.6174 0.00000 1.00000 11.6174 + 18.2980 -12.0956 0.00000 1.00000 12.0956 + 18.3165 -10.9327 0.00000 1.00000 10.9327 + 18.3350 -7.88331 0.00000 1.00000 7.88331 + 18.3535 -2.98071 0.00000 1.00000 2.98071 + 18.3720 3.40650 0.00000 1.00000 -3.40650 + 18.3905 10.5811 0.00000 1.00000 -10.5811 + 18.4090 17.5968 0.00000 1.00000 -17.5968 + 18.4275 23.4036 0.00000 1.00000 -23.4036 + 18.4460 27.0310 0.00000 1.00000 -27.0310 + 18.4645 27.7731 0.00000 1.00000 -27.7731 + 18.4830 25.3345 0.00000 1.00000 -25.3345 + 18.5015 19.9052 0.00000 1.00000 -19.9052 + 18.5200 12.1472 0.00000 1.00000 -12.1472 + 18.5385 3.09099 0.00000 1.00000 -3.09099 + 18.5570 -6.03798 0.00000 1.00000 6.03798 + 18.5755 -14.0281 0.00000 1.00000 14.0281 + 18.5940 -19.8843 0.00000 1.00000 19.8843 + 18.6125 -22.9844 0.00000 1.00000 22.9844 + 18.6310 -23.1597 0.00000 1.00000 23.1597 + 18.6495 -20.6881 0.00000 1.00000 20.6881 + 18.6680 -16.2075 0.00000 1.00000 16.2075 + 18.6865 -10.5714 0.00000 1.00000 10.5714 + 18.7050 -4.68098 0.00000 1.00000 4.68098 + 18.7235 0.671251 0.00000 1.00000 -0.671251 + 18.7420 4.91529 0.00000 1.00000 -4.91529 + 18.7605 7.75797 0.00000 1.00000 -7.75797 + 18.7790 9.17588 0.00000 1.00000 -9.17588 + 18.7975 9.35965 0.00000 1.00000 -9.35965 + 18.8160 8.63035 0.00000 1.00000 -8.63035 + 18.8345 7.35145 0.00000 1.00000 -7.35145 + 18.8530 5.85510 0.00000 1.00000 -5.85510 + 18.8715 4.39513 0.00000 1.00000 -4.39513 + 18.8900 3.13002 0.00000 1.00000 -3.13002 + 18.9085 2.13168 0.00000 1.00000 -2.13168 + 18.9270 1.40976 0.00000 1.00000 -1.40976 + 18.9455 0.939913 0.00000 1.00000 -0.939913 + 18.9640 0.686429 0.00000 1.00000 -0.686429 + 18.9825 0.614229 0.00000 1.00000 -0.614229 + 19.0010 0.690570 0.00000 1.00000 -0.690570 + 19.0195 0.880032 0.00000 1.00000 -0.880032 + 19.0380 1.13788 0.00000 1.00000 -1.13788 + 19.0565 1.40627 0.00000 1.00000 -1.40627 + 19.0750 1.61604 0.00000 1.00000 -1.61604 + 19.0935 1.69418 0.00000 1.00000 -1.69418 + 19.1120 1.57467 0.00000 1.00000 -1.57467 + 19.1305 1.20912 0.00000 1.00000 -1.20912 + 19.1490 0.574418 0.00000 1.00000 -0.574418 + 19.1675 -0.322868 0.00000 1.00000 0.322868 + 19.1860 -1.44364 0.00000 1.00000 1.44364 + 19.2045 -2.71278 0.00000 1.00000 2.71278 + 19.2230 -4.01492 0.00000 1.00000 4.01492 + 19.2415 -5.19189 0.00000 1.00000 5.19189 + 19.2600 -6.04623 0.00000 1.00000 6.04623 + 19.2785 -6.35560 0.00000 1.00000 6.35560 + 19.2970 -5.90135 0.00000 1.00000 5.90135 + 19.3155 -4.51168 0.00000 1.00000 4.51168 + 19.3340 -2.11474 0.00000 1.00000 2.11474 + 19.3525 1.20914 0.00000 1.00000 -1.20914 + 19.3710 5.19105 0.00000 1.00000 -5.19105 + 19.3895 9.36912 0.00000 1.00000 -9.36912 + 19.4080 13.1271 0.00000 1.00000 -13.1271 + 19.4265 15.7779 0.00000 1.00000 -15.7779 + 19.4450 16.6827 0.00000 1.00000 -16.6827 + 19.4635 15.3867 0.00000 1.00000 -15.3867 + 19.4820 11.7418 0.00000 1.00000 -11.7418 + 19.5005 5.98757 0.00000 1.00000 -5.98757 + 19.5190 -1.23710 0.00000 1.00000 1.23710 + 19.5375 -8.96359 0.00000 1.00000 8.96359 + 19.5560 -16.0382 0.00000 1.00000 16.0382 + 19.5745 -21.3164 0.00000 1.00000 21.3164 + 19.5930 -23.8699 0.00000 1.00000 23.8699 + 19.6115 -23.1644 0.00000 1.00000 23.1644 + 19.6300 -19.1740 0.00000 1.00000 19.1740 + 19.6485 -12.4057 0.00000 1.00000 12.4057 + 19.6670 -3.82669 0.00000 1.00000 3.82669 + 19.6855 5.29471 0.00000 1.00000 -5.29471 + 19.7040 13.6058 0.00000 1.00000 -13.6058 + 19.7225 19.9014 0.00000 1.00000 -19.9014 + 19.7410 23.3260 0.00000 1.00000 -23.3260 + 19.7595 23.5068 0.00000 1.00000 -23.5068 + 19.7780 20.5929 0.00000 1.00000 -20.5929 + 19.7965 15.1973 0.00000 1.00000 -15.1973 + 19.8150 8.25741 0.00000 1.00000 -8.25741 + 19.8335 0.846490 0.00000 1.00000 -0.846490 + 19.8520 -6.02165 0.00000 1.00000 6.02165 + 19.8705 -11.5565 0.00000 1.00000 11.5565 + 19.8890 -15.2939 0.00000 1.00000 15.2939 + 19.9075 -17.1257 0.00000 1.00000 17.1257 + 19.9260 -17.2573 0.00000 1.00000 17.2573 + 19.9445 -16.1119 0.00000 1.00000 16.1119 + 19.9630 -14.2055 0.00000 1.00000 14.2055 + 19.9815 -12.0275 0.00000 1.00000 12.0275 + 20.0000 -9.95383 0.00000 1.00000 9.95383 diff --git a/src/diffpy/pdffit2/tests/testdata/Ni.stru b/src/diffpy/pdffit2/tests/testdata/Ni.stru new file mode 100644 index 00000000..b4da517c --- /dev/null +++ b/src/diffpy/pdffit2/tests/testdata/Ni.stru @@ -0,0 +1,33 @@ +title structure Ni FCC +format pdffit +scale 1.000000 +sharp 0.000000, 1.000000, 0.000000 +spcgr Fm-3m +cell 3.520000, 3.520000, 3.520000, 90.000000, 90.000000, 90.000000 +dcell 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000 +ncell 1, 1, 1, 4 +atoms +NI 0.00000000 0.00000000 0.00000000 1.0000 + 0.00000000 0.00000000 0.00000000 0.0000 + 0.00126651 0.00126651 0.00126651 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 +NI 0.00000000 0.50000000 0.50000000 1.0000 + 0.00000000 0.00000000 0.00000000 0.0000 + 0.00126651 0.00126651 0.00126651 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 +NI 0.50000000 0.00000000 0.50000000 1.0000 + 0.00000000 0.00000000 0.00000000 0.0000 + 0.00126651 0.00126651 0.00126651 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 +NI 0.50000000 0.50000000 0.00000000 1.0000 + 0.00000000 0.00000000 0.00000000 0.0000 + 0.00126651 0.00126651 0.00126651 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 diff --git a/src/diffpy/pdffit2/tests/testdata/PbScW25TiO3.stru b/src/diffpy/pdffit2/tests/testdata/PbScW25TiO3.stru new file mode 100644 index 00000000..71ba3651 --- /dev/null +++ b/src/diffpy/pdffit2/tests/testdata/PbScW25TiO3.stru @@ -0,0 +1,345 @@ +title Pb8 (Sc16/3 W8/3)0.75 (Ti8)0.25 O24, B factors from BNL2 +format pdffit +scale 1.000000 +sharp 0.000000, 1.000000, 0.000000 +spcgr Fm-3m +cell 8.072700, 8.072700, 8.072700, 90.000000, 90.000000, 90.000000 +dcell 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000 +ncell 1, 1, 1, 56 +atoms +PB 0.25000000 0.25000000 0.25000000 1.0000 + 0.00000000 0.00000000 0.00000000 0.0000 + 0.04795025 0.04795025 0.04795025 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 +PB 0.25000000 0.75000000 0.75000000 1.0000 + 0.00000000 0.00000000 0.00000000 0.0000 + 0.04795025 0.04795025 0.04795025 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 +PB 0.75000000 0.25000000 0.75000000 1.0000 + 0.00000000 0.00000000 0.00000000 0.0000 + 0.04795025 0.04795025 0.04795025 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 +PB 0.75000000 0.75000000 0.25000000 1.0000 + 0.00000000 0.00000000 0.00000000 0.0000 + 0.04795025 0.04795025 0.04795025 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 +PB 0.25000000 0.25000000 0.75000000 1.0000 + 0.00000000 0.00000000 0.00000000 0.0000 + 0.04795025 0.04795025 0.04795025 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 +PB 0.75000000 0.25000000 0.25000000 1.0000 + 0.00000000 0.00000000 0.00000000 0.0000 + 0.04795025 0.04795025 0.04795025 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 +PB 0.25000000 0.75000000 0.25000000 1.0000 + 0.00000000 0.00000000 0.00000000 0.0000 + 0.04795025 0.04795025 0.04795025 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 +PB 0.75000000 0.75000000 0.75000000 1.0000 + 0.00000000 0.00000000 0.00000000 0.0000 + 0.04795025 0.04795025 0.04795025 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 +O 0.00000000 0.00000000 0.25735000 1.0000 + 0.00000000 0.00000000 0.00000000 0.0000 + 0.02293025 0.02293025 0.02293025 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 +O 0.00000000 0.50000000 0.75735003 1.0000 + 0.00000000 0.00000000 0.00000000 0.0000 + 0.02293025 0.02293025 0.02293025 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 +O 0.50000000 0.00000000 0.75735003 1.0000 + 0.00000000 0.00000000 0.00000000 0.0000 + 0.02293025 0.02293025 0.02293025 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 +O 0.50000000 0.50000000 0.25735000 1.0000 + 0.00000000 0.00000000 0.00000000 0.0000 + 0.02293025 0.02293025 0.02293025 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 +O 0.00000000 0.00000000 0.74264997 1.0000 + 0.00000000 0.00000000 0.00000000 0.0000 + 0.02293025 0.02293025 0.02293025 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 +O 0.00000000 0.50000000 0.24265000 1.0000 + 0.00000000 0.00000000 0.00000000 0.0000 + 0.02293025 0.02293025 0.02293025 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 +O 0.50000000 0.00000000 0.24265000 1.0000 + 0.00000000 0.00000000 0.00000000 0.0000 + 0.02293025 0.02293025 0.02293025 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 +O 0.50000000 0.50000000 0.74264997 1.0000 + 0.00000000 0.00000000 0.00000000 0.0000 + 0.02293025 0.02293025 0.02293025 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 +O 0.25735000 0.00000000 0.00000000 1.0000 + 0.00000000 0.00000000 0.00000000 0.0000 + 0.02293025 0.02293025 0.02293025 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 +O 0.75735003 0.00000000 0.50000000 1.0000 + 0.00000000 0.00000000 0.00000000 0.0000 + 0.02293025 0.02293025 0.02293025 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 +O 0.75735003 0.50000000 0.00000000 1.0000 + 0.00000000 0.00000000 0.00000000 0.0000 + 0.02293025 0.02293025 0.02293025 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 +O 0.25735000 0.50000000 0.50000000 1.0000 + 0.00000000 0.00000000 0.00000000 0.0000 + 0.02293025 0.02293025 0.02293025 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 +O 0.74264997 0.00000000 0.00000000 1.0000 + 0.00000000 0.00000000 0.00000000 0.0000 + 0.02293025 0.02293025 0.02293025 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 +O 0.24265000 0.00000000 0.50000000 1.0000 + 0.00000000 0.00000000 0.00000000 0.0000 + 0.02293025 0.02293025 0.02293025 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 +O 0.24265000 0.50000000 0.00000000 1.0000 + 0.00000000 0.00000000 0.00000000 0.0000 + 0.02293025 0.02293025 0.02293025 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 +O 0.74264997 0.50000000 0.50000000 1.0000 + 0.00000000 0.00000000 0.00000000 0.0000 + 0.02293025 0.02293025 0.02293025 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 +O 0.00000000 0.25735000 0.00000000 1.0000 + 0.00000000 0.00000000 0.00000000 0.0000 + 0.02293025 0.02293025 0.02293025 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 +O 0.50000000 0.75735003 0.00000000 1.0000 + 0.00000000 0.00000000 0.00000000 0.0000 + 0.02293025 0.02293025 0.02293025 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 +O 0.00000000 0.75735003 0.50000000 1.0000 + 0.00000000 0.00000000 0.00000000 0.0000 + 0.02293025 0.02293025 0.02293025 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 +O 0.50000000 0.25735000 0.50000000 1.0000 + 0.00000000 0.00000000 0.00000000 0.0000 + 0.02293025 0.02293025 0.02293025 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 +O 0.00000000 0.74264997 0.00000000 1.0000 + 0.00000000 0.00000000 0.00000000 0.0000 + 0.02293025 0.02293025 0.02293025 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 +O 0.50000000 0.24265000 0.00000000 1.0000 + 0.00000000 0.00000000 0.00000000 0.0000 + 0.02293025 0.02293025 0.02293025 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 +O 0.00000000 0.24265000 0.50000000 1.0000 + 0.00000000 0.00000000 0.00000000 0.0000 + 0.02293025 0.02293025 0.02293025 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 +O 0.50000000 0.74264997 0.50000000 1.0000 + 0.00000000 0.00000000 0.00000000 0.0000 + 0.02293025 0.02293025 0.02293025 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 +SC 0.00000000 0.00000000 0.00000000 0.9739 + 0.00000000 0.00000000 0.00000000 0.0000 + 0.00809050 0.00809050 0.00809050 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 +SC 0.00000000 0.50000000 0.50000000 0.9739 + 0.00000000 0.00000000 0.00000000 0.0000 + 0.00809050 0.00809050 0.00809050 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 +SC 0.50000000 0.00000000 0.50000000 0.9739 + 0.00000000 0.00000000 0.00000000 0.0000 + 0.00809050 0.00809050 0.00809050 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 +SC 0.50000000 0.50000000 0.00000000 0.9739 + 0.00000000 0.00000000 0.00000000 0.0000 + 0.00809050 0.00809050 0.00809050 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 +SC 0.50000000 0.50000000 0.50000000 0.0261 + 0.00000000 0.00000000 0.00000000 0.0000 + 0.00809050 0.00809050 0.00809050 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 +SC 0.50000000 0.00000000 0.00000000 0.0261 + 0.00000000 0.00000000 0.00000000 0.0000 + 0.00809050 0.00809050 0.00809050 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 +SC 0.00000000 0.50000000 0.00000000 0.0261 + 0.00000000 0.00000000 0.00000000 0.0000 + 0.00809050 0.00809050 0.00809050 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 +SC 0.00000000 0.00000000 0.50000000 0.0261 + 0.00000000 0.00000000 0.00000000 0.0000 + 0.00809050 0.00809050 0.00809050 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 +W 0.00000000 0.00000000 0.00000000 0.0131 + 0.00000000 0.00000000 0.00000000 0.0000 + 0.00809050 0.00809050 0.00809050 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 +W 0.00000000 0.50000000 0.50000000 0.0131 + 0.00000000 0.00000000 0.00000000 0.0000 + 0.00809050 0.00809050 0.00809050 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 +W 0.50000000 0.00000000 0.50000000 0.0131 + 0.00000000 0.00000000 0.00000000 0.0000 + 0.00809050 0.00809050 0.00809050 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 +W 0.50000000 0.50000000 0.00000000 0.0131 + 0.00000000 0.00000000 0.00000000 0.0000 + 0.00809050 0.00809050 0.00809050 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 +W 0.50000000 0.50000000 0.50000000 0.4869 + 0.00000000 0.00000000 0.00000000 0.0000 + 0.00809050 0.00809050 0.00809050 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 +W 0.50000000 0.00000000 0.00000000 0.4869 + 0.00000000 0.00000000 0.00000000 0.0000 + 0.00809050 0.00809050 0.00809050 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 +W 0.00000000 0.50000000 0.00000000 0.4869 + 0.00000000 0.00000000 0.00000000 0.0000 + 0.00809050 0.00809050 0.00809050 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 +W 0.00000000 0.00000000 0.50000000 0.4869 + 0.00000000 0.00000000 0.00000000 0.0000 + 0.00809050 0.00809050 0.00809050 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 +TI 0.00000000 0.00000000 0.00000000 0.0131 + 0.00000000 0.00000000 0.00000000 0.0000 + 0.00809050 0.00809050 0.00809050 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 +TI 0.00000000 0.50000000 0.50000000 0.0131 + 0.00000000 0.00000000 0.00000000 0.0000 + 0.00809050 0.00809050 0.00809050 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 +TI 0.50000000 0.00000000 0.50000000 0.0131 + 0.00000000 0.00000000 0.00000000 0.0000 + 0.00809050 0.00809050 0.00809050 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 +TI 0.50000000 0.50000000 0.00000000 0.0131 + 0.00000000 0.00000000 0.00000000 0.0000 + 0.00809050 0.00809050 0.00809050 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 +TI 0.50000000 0.50000000 0.50000000 0.4869 + 0.00000000 0.00000000 0.00000000 0.0000 + 0.00809050 0.00809050 0.00809050 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 +TI 0.50000000 0.00000000 0.00000000 0.4869 + 0.00000000 0.00000000 0.00000000 0.0000 + 0.00809050 0.00809050 0.00809050 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 +TI 0.00000000 0.50000000 0.00000000 0.4869 + 0.00000000 0.00000000 0.00000000 0.0000 + 0.00809050 0.00809050 0.00809050 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 +TI 0.00000000 0.00000000 0.50000000 0.4869 + 0.00000000 0.00000000 0.00000000 0.0000 + 0.00809050 0.00809050 0.00809050 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 diff --git a/src/diffpy/pdffit2/tests/testdata/badNi.dat b/src/diffpy/pdffit2/tests/testdata/badNi.dat new file mode 100644 index 00000000..ef5b7007 --- /dev/null +++ b/src/diffpy/pdffit2/tests/testdata/badNi.dat @@ -0,0 +1,1001 @@ + 1.50000 -0.539443 0.00000 1.00000 0.539443 + 1.51850 -1.03098 0.00000 1.00000 1.03098 + 1.53700 -1.43712 0.00000 1.00000 1.43712 + 1.55550 -1.73810 0.00000 1.00000 1.73810 + 1.57400 -1.93402 0.00000 1.00000 1.93402 + 1.59250 -2.04145 0.00000 1.00000 2.04145 + 1.61100 -2.08593 0.00000 1.00000 2.08593 + 1.62950 -2.09295 0.00000 1.00000 2.09295 + 1.64800 -2.08072 0.00000 1.00000 2.08072 + 1.66650 -2.05688 0.00000 1.00000 2.05688 + 1.68500 -2.02006 0.00000 1.00000 2.02006 + 1.70350 -1.96554 0.00000 1.00000 1.96554 + 1.72200 -1.89239 0.00000 1.00000 1.89239 + 1.74050 -1.80936 0.00000 1.00000 1.80936 + 1.75900 -1.73670 0.00000 1.00000 1.73670 + 1.77750 -1.70255 0.00000 1.00000 1.70255 + 1.79600 -1.73461 0.00000 1.00000 1.73461 + 1.81450 -1.84946 0.00000 1.00000 1.84946 + 1.83300 -2.04300 0.00000 1.00000 2.04300 + 1.85150 -2.28566 0.00000 1.00000 2.28566 + 1.87000 -2.52486 0.00000 1.00000 2.52486 + 1.88850 -2.69615 0.00000 1.00000 2.69615 + 1.92700 -2.74180 0.00000 1.00000 2.74180 + 1.92550 -2.63223 0.00000 1.00000 2.63223 + 1.94400 -2.38239 0.00000 1.00000 2.38239 + 1.96250 -2.05565 0.00000 1.00000 2.05565 + 1.98100 -1.75092 0.00000 1.00000 1.75092 + 1.99950 -1.57518 0.00000 1.00000 1.57518 + 2.01800 -1.60914 0.00000 1.00000 1.60914 + 2.03650 -1.87687 0.00000 1.00000 1.87687 + 2.05500 -2.33004 0.00000 1.00000 2.33004 + 2.07350 -2.85357 0.00000 1.00000 2.85357 + 2.09200 -3.29353 0.00000 1.00000 3.29353 + 2.11050 -3.50124 0.00000 1.00000 3.50124 + 2.12900 -3.38172 0.00000 1.00000 3.38172 + 2.14750 -2.93205 0.00000 1.00000 2.93205 + 2.16600 -2.25629 0.00000 1.00000 2.25629 + 2.18450 -1.54918 0.00000 1.00000 1.54918 + 2.20300 -1.04888 0.00000 1.00000 1.04888 + 2.22150 -0.968136 0.00000 1.00000 0.968136 + 2.24000 -1.42070 0.00000 1.00000 1.42070 + 2.25850 -2.36300 0.00000 1.00000 2.36300 + 2.27700 -3.56960 0.00000 1.00000 3.56960 + 2.29550 -4.65416 0.00000 1.00000 4.65416 + 2.31400 -5.13684 0.00000 1.00000 5.13684 + 2.33250 -4.54696 0.00000 1.00000 4.54696 + 2.35100 -2.53890 0.00000 1.00000 2.53890 + 2.36950 1.00656 0.00000 1.00000 -1.00656 + 2.38800 5.92223 0.00000 1.00000 -5.92223 + 2.40650 11.7527 0.00000 1.00000 -11.7527 + 2.42500 17.8143 0.00000 1.00000 -17.8143 + 2.44350 23.3057 0.00000 1.00000 -23.3057 + 2.46200 27.4478 0.00000 1.00000 -27.4478 + 2.48050 29.6246 0.00000 1.00000 -29.6246 + 2.49900 29.4986 0.00000 1.00000 -29.4986 + 2.51750 27.0749 0.00000 1.00000 -27.0749 + 2.53600 22.7028 0.00000 1.00000 -22.7028 + 2.55450 17.0112 0.00000 1.00000 -17.0112 + 2.57300 10.7932 0.00000 1.00000 -10.7932 + 2.59150 4.86134 0.00000 1.00000 -4.86134 + 2.61000 -0.0945224 0.00000 1.00000 0.0945224 + 2.62850 -3.61858 0.00000 1.00000 3.61858 + 2.64700 -5.54803 0.00000 1.00000 5.54803 + 2.66550 -6.01016 0.00000 1.00000 6.01016 + 2.68400 -5.36293 0.00000 1.00000 5.36293 + 2.70250 -4.09596 0.00000 1.00000 4.09596 + 2.72100 -2.71625 0.00000 1.00000 2.71625 + 2.73950 -1.64382 0.00000 1.00000 1.64382 + 2.75800 -1.13791 0.00000 1.00000 1.13791 + 2.77650 -1.26649 0.00000 1.00000 1.26649 + 2.79500 -1.92103 0.00000 1.00000 1.92103 + 2.81350 -2.86890 0.00000 1.00000 2.86890 + 2.83200 -3.82782 0.00000 1.00000 3.82782 + 2.85050 -4.54328 0.00000 1.00000 4.54328 + 2.86900 -4.85054 0.00000 1.00000 4.85054 + 2.88750 -4.70809 0.00000 1.00000 4.70809 + 2.90600 -4.19687 0.00000 1.00000 4.19687 + 2.92450 -3.48841 0.00000 1.00000 3.48841 + 2.94300 -2.79256 0.00000 1.00000 2.79256 + 2.96150 -2.29993 0.00000 1.00000 2.29993 + 2.98000 -2.13422 0.00000 1.00000 2.13422 + 2.99850 -2.32552 0.00000 1.00000 2.32552 + 3.01700 -2.80931 0.00000 1.00000 2.80931 + 3.03550 -3.44928 0.00000 1.00000 3.44928 + 3.05400 -4.07624 0.00000 1.00000 4.07624 + 3.07250 -4.53264 0.00000 1.00000 4.53264 + 3.09100 -4.71141 0.00000 1.00000 4.71141 + 3.10950 -4.58013 0.00000 1.00000 4.58013 + 3.12800 -4.18572 0.00000 1.00000 4.18572 + 3.14650 -3.63955 0.00000 1.00000 3.63955 + 3.16500 -3.08796 0.00000 1.00000 3.08796 + 3.18350 -2.67579 0.00000 1.00000 2.67579 + 3.20200 -2.51194 0.00000 1.00000 2.51194 + 3.22050 -2.64475 0.00000 1.00000 2.64475 + 3.23900 -3.05186 0.00000 1.00000 3.05186 + 3.25750 -3.64576 0.00000 1.00000 3.64576 + 3.27600 -4.29257 0.00000 1.00000 4.29257 + 3.29450 -4.83876 0.00000 1.00000 4.83876 + 3.31300 -5.14008 0.00000 1.00000 5.14008 + 3.33150 -5.08721 0.00000 1.00000 5.08721 + 3.35000 -4.62391 0.00000 1.00000 4.62391 + 3.36850 -3.75470 0.00000 1.00000 3.75470 + 3.38700 -2.54063 0.00000 1.00000 2.54063 + 3.40550 -1.08396 0.00000 1.00000 1.08396 + 3.42400 0.493223 0.00000 1.00000 -0.493223 + 3.44250 2.06874 0.00000 1.00000 -2.06874 + 3.46100 3.53152 0.00000 1.00000 -3.53152 + 3.47950 4.78254 0.00000 1.00000 -4.78254 + 3.49800 5.72969 0.00000 1.00000 -5.72969 + 3.51650 6.28423 0.00000 1.00000 -6.28423 + 3.53500 6.36504 0.00000 1.00000 -6.36504 + 3.55350 5.91247 0.00000 1.00000 -5.91247 + 3.57200 4.90861 0.00000 1.00000 -4.90861 + 3.59050 3.39740 0.00000 1.00000 -3.39740 + 3.60900 1.49612 0.00000 1.00000 -1.49612 + 3.62750 -0.608193 0.00000 1.00000 0.608193 + 3.64600 -2.68019 0.00000 1.00000 2.68019 + 3.66450 -4.47243 0.00000 1.00000 4.47243 + 3.68300 -5.76925 0.00000 1.00000 5.76925 + 3.70150 -6.42920 0.00000 1.00000 6.42920 + 3.72000 -6.41719 0.00000 1.00000 6.41719 + 3.73850 -5.81875 0.00000 1.00000 5.81875 + 3.75700 -4.83074 0.00000 1.00000 4.83074 + 3.77550 -3.72667 0.00000 1.00000 3.72667 + 3.79400 -2.80071 0.00000 1.00000 2.80071 + 3.81250 -2.30147 0.00000 1.00000 2.30147 + 3.83100 -2.37126 0.00000 1.00000 2.37126 + 3.84950 -3.00713 0.00000 1.00000 3.00713 + 3.86800 -4.05566 0.00000 1.00000 4.05566 + 3.88650 -5.24604 0.00000 1.00000 5.24604 + 3.90500 -6.25585 0.00000 1.00000 6.25585 + 3.92350 -6.79521 0.00000 1.00000 6.79521 + 3.94200 -6.68830 0.00000 1.00000 6.68830 + 3.96050 -5.93010 0.00000 1.00000 5.93010 + 3.97900 -4.70113 0.00000 1.00000 4.70113 + 3.99750 -3.33259 0.00000 1.00000 3.33259 + 4.01600 -2.22683 0.00000 1.00000 2.22683 + 4.03450 -1.75037 0.00000 1.00000 1.75037 + 4.05300 -2.12498 0.00000 1.00000 2.12498 + 4.07150 -3.34471 0.00000 1.00000 3.34471 + 4.09000 -5.14253 0.00000 1.00000 5.14253 + 4.10850 -7.01935 0.00000 1.00000 7.01935 + 4.12700 -8.33391 0.00000 1.00000 8.33391 + 4.14550 -8.43660 0.00000 1.00000 8.43660 + 4.16400 -6.81920 0.00000 1.00000 6.81920 + 4.18250 -3.24667 0.00000 1.00000 3.24667 + 4.20100 2.16009 0.00000 1.00000 -2.16009 + 4.21950 8.91152 0.00000 1.00000 -8.91152 + 4.23800 16.2134 0.00000 1.00000 -16.2134 + 4.25650 23.0973 0.00000 1.00000 -23.0973 + 4.27500 28.5935 0.00000 1.00000 -28.5935 + 4.29350 31.9106 0.00000 1.00000 -31.9106 + 4.31200 32.5842 0.00000 1.00000 -32.5842 + 4.33050 30.5617 0.00000 1.00000 -30.5617 + 4.34900 26.2027 0.00000 1.00000 -26.2027 + 4.36750 20.1990 0.00000 1.00000 -20.1990 + 4.38600 13.4320 0.00000 1.00000 -13.4320 + 4.40450 6.80337 0.00000 1.00000 -6.80337 + 4.42300 1.07527 0.00000 1.00000 -1.07527 + 4.44150 -3.24700 0.00000 1.00000 3.24700 + 4.46000 -5.96945 0.00000 1.00000 5.96945 + 4.47850 -7.19581 0.00000 1.00000 7.19581 + 4.49700 -7.25613 0.00000 1.00000 7.25613 + 4.51550 -6.59972 0.00000 1.00000 6.59972 + 4.53400 -5.68054 0.00000 1.00000 5.68054 + 4.55250 -4.86170 0.00000 1.00000 4.86170 + 4.57100 -4.35835 0.00000 1.00000 4.35835 + 4.58950 -4.22677 0.00000 1.00000 4.22677 + 4.60800 -4.39508 0.00000 1.00000 4.39508 + 4.62650 -4.72130 0.00000 1.00000 4.72130 + 4.64500 -5.05871 0.00000 1.00000 5.05871 + 4.66350 -5.30848 0.00000 1.00000 5.30848 + 4.68200 -5.44197 0.00000 1.00000 5.44197 + 4.70050 -5.50097 0.00000 1.00000 5.50097 + 4.71900 -5.56456 0.00000 1.00000 5.56456 + 4.73750 -5.69659 0.00000 1.00000 5.69659 + 4.75600 -5.90806 0.00000 1.00000 5.90806 + 4.77450 -6.13525 0.00000 1.00000 6.13525 + 4.79300 -6.24364 0.00000 1.00000 6.24364 + 4.81150 -6.05670 0.00000 1.00000 6.05670 + 4.83000 -5.40165 0.00000 1.00000 5.40165 + 4.84850 -4.16022 0.00000 1.00000 4.16022 + 4.86700 -2.31100 0.00000 1.00000 2.31100 + 4.88550 0.0479985 0.00000 1.00000 -0.0479985 + 4.90400 2.70271 0.00000 1.00000 -2.70271 + 4.92250 5.35252 0.00000 1.00000 -5.35252 + 4.94100 7.65960 0.00000 1.00000 -7.65960 + 4.95950 9.30734 0.00000 1.00000 -9.30734 + 4.97800 10.0558 0.00000 1.00000 -10.0558 + 4.99650 9.78268 0.00000 1.00000 -9.78268 + 5.01500 8.50309 0.00000 1.00000 -8.50309 + 5.03350 6.36470 0.00000 1.00000 -6.36470 + 5.05200 3.62252 0.00000 1.00000 -3.62252 + 5.07050 0.599290 0.00000 1.00000 -0.599290 + 5.08900 -2.36086 0.00000 1.00000 2.36086 + 5.10750 -4.93870 0.00000 1.00000 4.93870 + 5.12600 -6.88149 0.00000 1.00000 6.88149 + 5.14450 -8.03565 0.00000 1.00000 8.03565 + 5.16300 -8.36668 0.00000 1.00000 8.36668 + 5.18150 -7.96304 0.00000 1.00000 7.96304 + 5.20000 -7.02207 0.00000 1.00000 7.02207 + 5.21850 -5.81895 0.00000 1.00000 5.81895 + 5.23700 -4.66171 0.00000 1.00000 4.66171 + 5.25550 -3.83844 0.00000 1.00000 3.83844 + 5.27400 -3.56410 0.00000 1.00000 3.56410 + 5.29250 -3.93573 0.00000 1.00000 3.93573 + 5.31100 -4.90467 0.00000 1.00000 4.90467 + 5.32950 -6.27267 0.00000 1.00000 6.27267 + 5.34800 -7.71536 0.00000 1.00000 7.71536 + 5.36650 -8.83203 0.00000 1.00000 8.83203 + 5.38500 -9.21516 0.00000 1.00000 9.21516 + 5.40350 -8.52808 0.00000 1.00000 8.52808 + 5.42200 -6.57611 0.00000 1.00000 6.57611 + 5.44050 -3.35625 0.00000 1.00000 3.35625 + 5.45900 0.925287 0.00000 1.00000 -0.925287 + 5.47750 5.87209 0.00000 1.00000 -5.87209 + 5.49600 10.9500 0.00000 1.00000 -10.9500 + 5.51450 15.5640 0.00000 1.00000 -15.5640 + 5.53300 19.1477 0.00000 1.00000 -19.1477 + 5.55150 21.2490 0.00000 1.00000 -21.2490 + 5.57000 21.6003 0.00000 1.00000 -21.6003 + 5.58850 20.1588 0.00000 1.00000 -20.1588 + 5.60700 17.1124 0.00000 1.00000 -17.1124 + 5.62550 12.8494 0.00000 1.00000 -12.8494 + 5.64400 7.89927 0.00000 1.00000 -7.89927 + 5.66250 2.85190 0.00000 1.00000 -2.85190 + 5.68100 -1.72997 0.00000 1.00000 1.72997 + 5.69950 -5.39381 0.00000 1.00000 5.39381 + 5.71800 -7.86162 0.00000 1.00000 7.86162 + 5.73650 -9.06420 0.00000 1.00000 9.06420 + 5.75500 -9.13837 0.00000 1.00000 9.13837 + 5.77350 -8.38683 0.00000 1.00000 8.38683 + 5.79200 -7.20818 0.00000 1.00000 7.20818 + 5.81050 -6.01172 0.00000 1.00000 6.01172 + 5.82900 -5.13567 0.00000 1.00000 5.13567 + 5.84750 -4.78662 0.00000 1.00000 4.78662 + 5.86600 -5.01125 0.00000 1.00000 5.01125 + 5.88450 -5.70222 0.00000 1.00000 5.70222 + 5.90300 -6.63275 0.00000 1.00000 6.63275 + 5.92150 -7.51031 0.00000 1.00000 7.51031 + 5.94000 -8.03914 0.00000 1.00000 8.03914 + 5.95850 -7.98163 0.00000 1.00000 7.98163 + 5.97700 -7.20897 0.00000 1.00000 7.20897 + 5.99550 -5.73309 0.00000 1.00000 5.73309 + 6.01400 -3.71335 0.00000 1.00000 3.71335 + 6.03250 -1.43572 0.00000 1.00000 1.43572 + 6.05100 0.734316 0.00000 1.00000 -0.734316 + 6.06950 2.41816 0.00000 1.00000 -2.41816 + 6.08800 3.29880 0.00000 1.00000 -3.29880 + 6.10650 3.18922 0.00000 1.00000 -3.18922 + 6.12500 2.07961 0.00000 1.00000 -2.07961 + 6.14350 0.150522 0.00000 1.00000 -0.150522 + 6.16200 -2.25436 0.00000 1.00000 2.25436 + 6.18050 -4.69426 0.00000 1.00000 4.69426 + 6.19900 -6.72460 0.00000 1.00000 6.72460 + 6.21750 -7.99834 0.00000 1.00000 7.99834 + 6.23600 -8.35142 0.00000 1.00000 8.35142 + 6.25450 -7.84948 0.00000 1.00000 7.84948 + 6.27300 -6.78013 0.00000 1.00000 6.78013 + 6.29150 -5.58671 0.00000 1.00000 5.58671 + 6.31000 -4.75441 0.00000 1.00000 4.75441 + 6.32850 -4.67266 0.00000 1.00000 4.67266 + 6.34700 -5.50714 0.00000 1.00000 5.50714 + 6.36550 -7.11590 0.00000 1.00000 7.11590 + 6.38400 -9.03699 0.00000 1.00000 9.03699 + 6.40250 -10.5592 0.00000 1.00000 10.5592 + 6.42100 -10.8676 0.00000 1.00000 10.8676 + 6.43950 -9.23379 0.00000 1.00000 9.23379 + 6.45800 -5.20861 0.00000 1.00000 5.20861 + 6.47650 1.23011 0.00000 1.00000 -1.23011 + 6.49500 9.61241 0.00000 1.00000 -9.61241 + 6.51350 19.0142 0.00000 1.00000 -19.0142 + 6.53200 28.1967 0.00000 1.00000 -28.1967 + 6.55050 35.8243 0.00000 1.00000 -35.8243 + 6.56900 40.7166 0.00000 1.00000 -40.7166 + 6.58750 42.0833 0.00000 1.00000 -42.0833 + 6.60600 39.6873 0.00000 1.00000 -39.6873 + 6.62450 33.8989 0.00000 1.00000 -33.8989 + 6.64300 25.6256 0.00000 1.00000 -25.6256 + 6.66150 16.1324 0.00000 1.00000 -16.1324 + 6.68000 6.79125 0.00000 1.00000 -6.79125 + 6.69850 -1.18411 0.00000 1.00000 1.18411 + 6.71700 -6.95910 0.00000 1.00000 6.95910 + 6.73550 -10.2079 0.00000 1.00000 10.2079 + 6.75400 -11.1248 0.00000 1.00000 11.1248 + 6.77250 -10.3198 0.00000 1.00000 10.3198 + 6.79100 -8.62815 0.00000 1.00000 8.62815 + 6.80950 -6.88571 0.00000 1.00000 6.88571 + 6.82800 -5.72660 0.00000 1.00000 5.72660 + 6.84650 -5.45332 0.00000 1.00000 5.45332 + 6.86500 -6.00649 0.00000 1.00000 6.00649 + 6.88350 -7.03437 0.00000 1.00000 7.03437 + 6.90200 -8.03570 0.00000 1.00000 8.03570 + 6.92050 -8.53209 0.00000 1.00000 8.53209 + 6.93900 -8.22002 0.00000 1.00000 8.22002 + 6.95750 -7.06140 0.00000 1.00000 7.06140 + 6.97600 -5.29017 0.00000 1.00000 5.29017 + 6.99450 -3.33754 0.00000 1.00000 3.33754 + 7.01300 -1.70148 0.00000 1.00000 1.70148 + 7.03150 -0.800760 0.00000 1.00000 0.800760 + 7.05000 -0.856664 0.00000 1.00000 0.856664 + 7.06850 -1.83505 0.00000 1.00000 1.83505 + 7.08700 -3.46358 0.00000 1.00000 3.46358 + 7.10550 -5.31731 0.00000 1.00000 5.31731 + 7.12400 -6.94715 0.00000 1.00000 6.94715 + 7.14250 -8.01332 0.00000 1.00000 8.01332 + 7.16100 -8.38320 0.00000 1.00000 8.38320 + 7.17950 -8.16268 0.00000 1.00000 8.16268 + 7.19800 -7.64952 0.00000 1.00000 7.64952 + 7.21650 -7.22129 0.00000 1.00000 7.22129 + 7.23500 -7.19206 0.00000 1.00000 7.19206 + 7.25350 -7.68220 0.00000 1.00000 7.68220 + 7.27200 -8.54371 0.00000 1.00000 8.54371 + 7.29050 -9.36819 0.00000 1.00000 9.36819 + 7.30900 -9.58072 0.00000 1.00000 9.58072 + 7.32750 -8.59790 0.00000 1.00000 8.59790 + 7.34600 -6.00785 0.00000 1.00000 6.00785 + 7.36450 -1.72106 0.00000 1.00000 1.72106 + 7.38300 3.95269 0.00000 1.00000 -3.95269 + 7.40150 10.3276 0.00000 1.00000 -10.3276 + 7.42000 16.4640 0.00000 1.00000 -16.4640 + 7.43850 21.3618 0.00000 1.00000 -21.3618 + 7.45700 24.1782 0.00000 1.00000 -24.1782 + 7.47550 24.4162 0.00000 1.00000 -24.4162 + 7.49400 22.0356 0.00000 1.00000 -22.0356 + 7.51250 17.4573 0.00000 1.00000 -17.4573 + 7.53100 11.4623 0.00000 1.00000 -11.4623 + 7.54950 5.01118 0.00000 1.00000 -5.01118 + 7.56800 -0.965076 0.00000 1.00000 0.965076 + 7.58650 -5.75153 0.00000 1.00000 5.75153 + 7.60500 -8.96799 0.00000 1.00000 8.96799 + 7.62350 -10.5969 0.00000 1.00000 10.5969 + 7.64200 -10.9206 0.00000 1.00000 10.9206 + 7.66050 -10.3893 0.00000 1.00000 10.3893 + 7.67900 -9.46200 0.00000 1.00000 9.46200 + 7.69750 -8.46444 0.00000 1.00000 8.46444 + 7.71600 -7.50854 0.00000 1.00000 7.50854 + 7.73450 -6.49304 0.00000 1.00000 6.49304 + 7.75300 -5.18168 0.00000 1.00000 5.18168 + 7.77150 -3.32911 0.00000 1.00000 3.32911 + 7.79000 -0.811546 0.00000 1.00000 0.811546 + 7.80850 2.28073 0.00000 1.00000 -2.28073 + 7.82700 5.61902 0.00000 1.00000 -5.61902 + 7.84550 8.68909 0.00000 1.00000 -8.68909 + 7.86400 10.9073 0.00000 1.00000 -10.9073 + 7.88250 11.7676 0.00000 1.00000 -11.7676 + 7.90100 10.9777 0.00000 1.00000 -10.9777 + 7.91950 8.54633 0.00000 1.00000 -8.54633 + 7.93800 4.79627 0.00000 1.00000 -4.79627 + 7.95650 0.300695 0.00000 1.00000 -0.300695 + 7.97500 -4.24152 0.00000 1.00000 4.24152 + 7.99350 -8.15787 0.00000 1.00000 8.15787 + 8.01200 -10.9420 0.00000 1.00000 10.9420 + 8.03050 -12.3456 0.00000 1.00000 12.3456 + 8.04900 -12.4001 0.00000 1.00000 12.4001 + 8.06750 -11.3663 0.00000 1.00000 11.3663 + 8.08600 -9.63181 0.00000 1.00000 9.63181 + 8.10450 -7.58723 0.00000 1.00000 7.58723 + 8.12300 -5.52117 0.00000 1.00000 5.52117 + 8.14150 -3.56353 0.00000 1.00000 3.56353 + 8.16000 -1.69260 0.00000 1.00000 1.69260 + 8.17850 0.199827 0.00000 1.00000 -0.199827 + 8.19700 2.21044 0.00000 1.00000 -2.21044 + 8.21550 4.33057 0.00000 1.00000 -4.33057 + 8.23400 6.39218 0.00000 1.00000 -6.39218 + 8.25250 8.07555 0.00000 1.00000 -8.07555 + 8.27100 8.97896 0.00000 1.00000 -8.97896 + 8.28950 8.73073 0.00000 1.00000 -8.73073 + 8.30800 7.11016 0.00000 1.00000 -7.11016 + 8.32650 4.14151 0.00000 1.00000 -4.14151 + 8.34500 0.130936 0.00000 1.00000 -0.130936 + 8.36350 -4.36837 0.00000 1.00000 4.36837 + 8.38200 -8.65854 0.00000 1.00000 8.65854 + 8.40050 -12.0433 0.00000 1.00000 12.0433 + 8.41900 -13.9807 0.00000 1.00000 13.9807 + 8.43750 -14.2030 0.00000 1.00000 14.2030 + 8.45600 -12.7704 0.00000 1.00000 12.7704 + 8.47450 -10.0445 0.00000 1.00000 10.0445 + 8.49300 -6.58938 0.00000 1.00000 6.58938 + 8.51150 -3.02663 0.00000 1.00000 3.02663 + 8.53000 0.112114 0.00000 1.00000 -0.112114 + 8.54850 2.49566 0.00000 1.00000 -2.49566 + 8.56700 4.03580 0.00000 1.00000 -4.03580 + 8.58550 4.85377 0.00000 1.00000 -4.85377 + 8.60400 5.18537 0.00000 1.00000 -5.18537 + 8.62250 5.25808 0.00000 1.00000 -5.25808 + 8.64100 5.18193 0.00000 1.00000 -5.18193 + 8.65950 4.89182 0.00000 1.00000 -4.89182 + 8.67800 4.16349 0.00000 1.00000 -4.16349 + 8.69650 2.70252 0.00000 1.00000 -2.70252 + 8.71500 0.282220 0.00000 1.00000 -0.282220 + 8.73350 -3.11124 0.00000 1.00000 3.11124 + 8.75200 -7.17490 0.00000 1.00000 7.17490 + 8.77050 -11.2672 0.00000 1.00000 11.2672 + 8.78900 -14.4886 0.00000 1.00000 14.4886 + 8.80750 -15.8559 0.00000 1.00000 15.8559 + 8.82600 -14.5328 0.00000 1.00000 14.5328 + 8.84450 -10.0609 0.00000 1.00000 10.0609 + 8.86300 -2.52773 0.00000 1.00000 2.52773 + 8.88150 7.37428 0.00000 1.00000 -7.37428 + 8.90000 18.4240 0.00000 1.00000 -18.4240 + 8.91850 29.0726 0.00000 1.00000 -29.0726 + 8.93700 37.7295 0.00000 1.00000 -37.7295 + 8.95550 43.0717 0.00000 1.00000 -43.0717 + 8.97400 44.3044 0.00000 1.00000 -44.3044 + 8.99250 41.3154 0.00000 1.00000 -41.3154 + 9.01100 34.6857 0.00000 1.00000 -34.6857 + 9.02950 25.5570 0.00000 1.00000 -25.5570 + 9.04800 15.3859 0.00000 1.00000 -15.3859 + 9.06650 5.64529 0.00000 1.00000 -5.64529 + 9.08500 -2.45985 0.00000 1.00000 2.45985 + 9.10350 -8.19758 0.00000 1.00000 8.19758 + 9.12200 -11.3936 0.00000 1.00000 11.3936 + 9.14050 -12.3840 0.00000 1.00000 12.3840 + 9.15900 -11.8591 0.00000 1.00000 11.8591 + 9.17750 -10.6446 0.00000 1.00000 10.6446 + 9.19600 -9.48212 0.00000 1.00000 9.48212 + 9.21450 -8.86286 0.00000 1.00000 8.86286 + 9.23300 -8.95166 0.00000 1.00000 8.95166 + 9.25150 -9.60978 0.00000 1.00000 9.60978 + 9.27000 -10.4985 0.00000 1.00000 10.4985 + 9.28850 -11.2264 0.00000 1.00000 11.2264 + 9.30700 -11.4956 0.00000 1.00000 11.4956 + 9.32550 -11.2056 0.00000 1.00000 11.2056 + 9.34400 -10.4851 0.00000 1.00000 10.4851 + 9.36250 -9.64367 0.00000 1.00000 9.64367 + 9.38100 -9.05839 0.00000 1.00000 9.05839 + 9.39950 -9.03059 0.00000 1.00000 9.03059 + 9.41800 -9.65891 0.00000 1.00000 9.65891 + 9.43650 -10.7695 0.00000 1.00000 10.7695 + 9.45500 -11.9282 0.00000 1.00000 11.9282 + 9.47350 -12.5352 0.00000 1.00000 12.5352 + 9.49200 -11.9793 0.00000 1.00000 11.9793 + 9.51050 -9.80968 0.00000 1.00000 9.80968 + 9.52900 -5.88098 0.00000 1.00000 5.88098 + 9.54750 -0.429865 0.00000 1.00000 0.429865 + 9.56600 5.93738 0.00000 1.00000 -5.93738 + 9.58450 12.3467 0.00000 1.00000 -12.3467 + 9.60300 17.8253 0.00000 1.00000 -17.8253 + 9.62150 21.4983 0.00000 1.00000 -21.4983 + 9.64000 22.7684 0.00000 1.00000 -22.7684 + 9.65850 21.4353 0.00000 1.00000 -21.4353 + 9.67700 17.7297 0.00000 1.00000 -17.7297 + 9.69550 12.2556 0.00000 1.00000 -12.2556 + 9.71400 5.85940 0.00000 1.00000 -5.85940 + 9.73250 -0.539853 0.00000 1.00000 0.539853 + 9.75100 -6.11696 0.00000 1.00000 6.11696 + 9.76950 -10.2704 0.00000 1.00000 10.2704 + 9.78800 -12.6954 0.00000 1.00000 12.6954 + 9.80650 -13.3941 0.00000 1.00000 13.3941 + 9.82500 -12.6315 0.00000 1.00000 12.6315 + 9.84350 -10.8487 0.00000 1.00000 10.8487 + 9.86200 -8.55755 0.00000 1.00000 8.55755 + 9.88050 -6.24003 0.00000 1.00000 6.24003 + 9.89900 -4.27478 0.00000 1.00000 4.27478 + 9.91750 -2.90328 0.00000 1.00000 2.90328 + 9.93600 -2.23386 0.00000 1.00000 2.23386 + 9.95450 -2.27104 0.00000 1.00000 2.27104 + 9.97300 -2.95175 0.00000 1.00000 2.95175 + 9.99150 -4.17209 0.00000 1.00000 4.17209 + 10.0100 -5.79607 0.00000 1.00000 5.79607 + 10.0285 -7.64859 0.00000 1.00000 7.64859 + 10.0470 -9.50283 0.00000 1.00000 9.50283 + 10.0655 -11.0757 0.00000 1.00000 11.0757 + 10.0840 -12.0425 0.00000 1.00000 12.0425 + 10.1025 -12.0751 0.00000 1.00000 12.0751 + 10.1210 -10.9017 0.00000 1.00000 10.9017 + 10.1395 -8.37613 0.00000 1.00000 8.37613 + 10.1580 -4.54026 0.00000 1.00000 4.54026 + 10.1765 0.338357 0.00000 1.00000 -0.338357 + 10.1950 5.76996 0.00000 1.00000 -5.76996 + 10.2135 11.0939 0.00000 1.00000 -11.0939 + 10.2320 15.5741 0.00000 1.00000 -15.5741 + 10.2505 18.5225 0.00000 1.00000 -18.5225 + 10.2690 19.4270 0.00000 1.00000 -19.4270 + 10.2875 18.0567 0.00000 1.00000 -18.0567 + 10.3060 14.5227 0.00000 1.00000 -14.5227 + 10.3245 9.27796 0.00000 1.00000 -9.27796 + 10.3430 3.05599 0.00000 1.00000 -3.05599 + 10.3615 -3.24345 0.00000 1.00000 3.24345 + 10.3800 -8.70145 0.00000 1.00000 8.70145 + 10.3985 -12.5330 0.00000 1.00000 12.5330 + 10.4170 -14.2182 0.00000 1.00000 14.2182 + 10.4355 -13.5885 0.00000 1.00000 13.5885 + 10.4540 -10.8525 0.00000 1.00000 10.8525 + 10.4725 -6.55772 0.00000 1.00000 6.55772 + 10.4910 -1.49640 0.00000 1.00000 1.49640 + 10.5095 3.42852 0.00000 1.00000 -3.42852 + 10.5280 7.35363 0.00000 1.00000 -7.35363 + 10.5465 9.59717 0.00000 1.00000 -9.59717 + 10.5650 9.77054 0.00000 1.00000 -9.77054 + 10.5835 7.84234 0.00000 1.00000 -7.84234 + 10.6020 4.14584 0.00000 1.00000 -4.14584 + 10.6205 -0.671143 0.00000 1.00000 0.671143 + 10.6390 -5.74603 0.00000 1.00000 5.74603 + 10.6575 -10.1361 0.00000 1.00000 10.1361 + 10.6760 -12.9671 0.00000 1.00000 12.9671 + 10.6945 -13.5738 0.00000 1.00000 13.5738 + 10.7130 -11.6108 0.00000 1.00000 11.6108 + 10.7315 -7.11852 0.00000 1.00000 7.11852 + 10.7500 -0.532582 0.00000 1.00000 0.532582 + 10.7685 7.36496 0.00000 1.00000 -7.36496 + 10.7870 15.5502 0.00000 1.00000 -15.5502 + 10.8055 22.9046 0.00000 1.00000 -22.9046 + 10.8240 28.3836 0.00000 1.00000 -28.3836 + 10.8425 31.1819 0.00000 1.00000 -31.1819 + 10.8610 30.8667 0.00000 1.00000 -30.8667 + 10.8795 27.4544 0.00000 1.00000 -27.4544 + 10.8980 21.4174 0.00000 1.00000 -21.4174 + 10.9165 13.6149 0.00000 1.00000 -13.6149 + 10.9350 5.15717 0.00000 1.00000 -5.15717 + 10.9535 -2.77403 0.00000 1.00000 2.77403 + 10.9720 -9.11963 0.00000 1.00000 9.11963 + 10.9905 -13.1166 0.00000 1.00000 13.1166 + 11.0090 -14.4189 0.00000 1.00000 14.4189 + 11.0275 -13.1446 0.00000 1.00000 13.1446 + 11.0460 -9.84069 0.00000 1.00000 9.84069 + 11.0645 -5.37361 0.00000 1.00000 5.37361 + 11.0830 -0.766336 0.00000 1.00000 0.766336 + 11.1015 2.99059 0.00000 1.00000 -2.99059 + 11.1200 5.12102 0.00000 1.00000 -5.12102 + 11.1385 5.20555 0.00000 1.00000 -5.20555 + 11.1570 3.25580 0.00000 1.00000 -3.25580 + 11.1755 -0.295787 0.00000 1.00000 0.295787 + 11.1940 -4.68917 0.00000 1.00000 4.68917 + 11.2125 -8.99252 0.00000 1.00000 8.99252 + 11.2310 -12.2872 0.00000 1.00000 12.2872 + 11.2495 -13.8447 0.00000 1.00000 13.8447 + 11.2680 -13.2610 0.00000 1.00000 13.2610 + 11.2865 -10.5280 0.00000 1.00000 10.5280 + 11.3050 -6.02790 0.00000 1.00000 6.02790 + 11.3235 -0.457428 0.00000 1.00000 0.457428 + 11.3420 5.30272 0.00000 1.00000 -5.30272 + 11.3605 10.3468 0.00000 1.00000 -10.3468 + 11.3790 13.9003 0.00000 1.00000 -13.9003 + 11.3975 15.4459 0.00000 1.00000 -15.4459 + 11.4160 14.7993 0.00000 1.00000 -14.7993 + 11.4345 12.1251 0.00000 1.00000 -12.1251 + 11.4530 7.89515 0.00000 1.00000 -7.89515 + 11.4715 2.79743 0.00000 1.00000 -2.79743 + 11.4900 -2.38402 0.00000 1.00000 2.38402 + 11.5085 -6.89848 0.00000 1.00000 6.89848 + 11.5270 -10.1446 0.00000 1.00000 10.1446 + 11.5455 -11.7562 0.00000 1.00000 11.7562 + 11.5640 -11.6477 0.00000 1.00000 11.6477 + 11.5825 -10.0156 0.00000 1.00000 10.0156 + 11.6010 -7.29778 0.00000 1.00000 7.29778 + 11.6195 -4.09885 0.00000 1.00000 4.09885 + 11.6380 -1.08810 0.00000 1.00000 1.08810 + 11.6565 1.11439 0.00000 1.00000 -1.11439 + 11.6750 2.04788 0.00000 1.00000 -2.04788 + 11.6935 1.49867 0.00000 1.00000 -1.49867 + 11.7120 -0.451611 0.00000 1.00000 0.451611 + 11.7305 -3.42848 0.00000 1.00000 3.42848 + 11.7490 -6.82125 0.00000 1.00000 6.82125 + 11.7675 -9.88740 0.00000 1.00000 9.88740 + 11.7860 -11.8896 0.00000 1.00000 11.8896 + 11.8045 -12.2430 0.00000 1.00000 12.2430 + 11.8230 -10.6446 0.00000 1.00000 10.6446 + 11.8415 -7.15722 0.00000 1.00000 7.15722 + 11.8600 -2.22583 0.00000 1.00000 2.22583 + 11.8785 3.38458 0.00000 1.00000 -3.38458 + 11.8970 8.72108 0.00000 1.00000 -8.72108 + 11.9155 12.8213 0.00000 1.00000 -12.8213 + 11.9340 14.9032 0.00000 1.00000 -14.9032 + 11.9525 14.5281 0.00000 1.00000 -14.5281 + 11.9710 11.6999 0.00000 1.00000 -11.6999 + 11.9895 6.87776 0.00000 1.00000 -6.87776 + 12.0080 0.891504 0.00000 1.00000 -0.891504 + 12.0265 -5.22565 0.00000 1.00000 5.22565 + 12.0450 -10.4522 0.00000 1.00000 10.4522 + 12.0635 -13.9931 0.00000 1.00000 13.9931 + 12.0820 -15.4435 0.00000 1.00000 15.4435 + 12.1005 -14.8644 0.00000 1.00000 14.8644 + 12.1190 -12.7520 0.00000 1.00000 12.7520 + 12.1375 -9.90845 0.00000 1.00000 9.90845 + 12.1560 -7.24453 0.00000 1.00000 7.24453 + 12.1745 -5.56166 0.00000 1.00000 5.56166 + 12.1930 -5.36161 0.00000 1.00000 5.36161 + 12.2115 -6.72586 0.00000 1.00000 6.72586 + 12.2300 -9.28835 0.00000 1.00000 9.28835 + 12.2485 -12.3067 0.00000 1.00000 12.3067 + 12.2670 -14.8178 0.00000 1.00000 14.8178 + 12.2855 -15.8476 0.00000 1.00000 15.8476 + 12.3040 -14.6332 0.00000 1.00000 14.6332 + 12.3225 -10.8097 0.00000 1.00000 10.8097 + 12.3410 -4.52145 0.00000 1.00000 4.52145 + 12.3595 3.57058 0.00000 1.00000 -3.57058 + 12.3780 12.3893 0.00000 1.00000 -12.3893 + 12.3965 20.6314 0.00000 1.00000 -20.6314 + 12.4150 27.0092 0.00000 1.00000 -27.0092 + 12.4335 30.4959 0.00000 1.00000 -30.4959 + 12.4520 30.5247 0.00000 1.00000 -30.5247 + 12.4705 27.1034 0.00000 1.00000 -27.1034 + 12.4890 20.8197 0.00000 1.00000 -20.8197 + 12.5075 12.7348 0.00000 1.00000 -12.7348 + 12.5260 4.18409 0.00000 1.00000 -4.18409 + 12.5445 -3.47600 0.00000 1.00000 3.47600 + 12.5630 -9.12640 0.00000 1.00000 9.12640 + 12.5815 -12.0958 0.00000 1.00000 12.0958 + 12.6000 -12.2803 0.00000 1.00000 12.2803 + 12.6185 -10.1467 0.00000 1.00000 10.1467 + 12.6370 -6.61573 0.00000 1.00000 6.61573 + 12.6555 -2.84816 0.00000 1.00000 2.84816 + 12.6740 0.0234471 0.00000 1.00000 -0.0234471 + 12.6925 1.16051 0.00000 1.00000 -1.16051 + 12.7110 0.222329 0.00000 1.00000 -0.222329 + 12.7295 -2.53923 0.00000 1.00000 2.53923 + 12.7480 -6.31966 0.00000 1.00000 6.31966 + 12.7665 -9.93250 0.00000 1.00000 9.93250 + 12.7850 -12.0782 0.00000 1.00000 12.0782 + 12.8035 -11.6556 0.00000 1.00000 11.6556 + 12.8220 -8.04822 0.00000 1.00000 8.04822 + 12.8405 -1.31753 0.00000 1.00000 1.31753 + 12.8590 7.74657 0.00000 1.00000 -7.74657 + 12.8775 17.7420 0.00000 1.00000 -17.7420 + 12.8960 26.9214 0.00000 1.00000 -26.9214 + 12.9145 33.5578 0.00000 1.00000 -33.5578 + 12.9330 36.3277 0.00000 1.00000 -36.3277 + 12.9515 34.6234 0.00000 1.00000 -34.6234 + 12.9700 28.7156 0.00000 1.00000 -28.7156 + 12.9885 19.7233 0.00000 1.00000 -19.7233 + 13.0070 9.38804 0.00000 1.00000 -9.38804 + 13.0255 -0.297908 0.00000 1.00000 0.297908 + 13.0440 -7.52791 0.00000 1.00000 7.52791 + 13.0625 -11.0794 0.00000 1.00000 11.0794 + 13.0810 -10.5807 0.00000 1.00000 10.5807 + 13.0995 -6.58087 0.00000 1.00000 6.58087 + 13.1180 -0.404585 0.00000 1.00000 0.404585 + 13.1365 6.17556 0.00000 1.00000 -6.17556 + 13.1550 11.3708 0.00000 1.00000 -11.3708 + 13.1735 13.8053 0.00000 1.00000 -13.8053 + 13.1920 12.8357 0.00000 1.00000 -12.8357 + 13.2105 8.68336 0.00000 1.00000 -8.68336 + 13.2290 2.34908 0.00000 1.00000 -2.34908 + 13.2475 -4.66287 0.00000 1.00000 4.66287 + 13.2660 -10.7379 0.00000 1.00000 10.7379 + 13.2845 -14.5602 0.00000 1.00000 14.5602 + 13.3030 -15.4343 0.00000 1.00000 15.4343 + 13.3215 -13.4393 0.00000 1.00000 13.4393 + 13.3400 -9.37967 0.00000 1.00000 9.37967 + 13.3585 -4.55053 0.00000 1.00000 4.55053 + 13.3770 -0.382431 0.00000 1.00000 0.382431 + 13.3955 1.93839 0.00000 1.00000 -1.93839 + 13.4140 1.77366 0.00000 1.00000 -1.77366 + 13.4325 -0.818874 0.00000 1.00000 0.818874 + 13.4510 -5.13072 0.00000 1.00000 5.13072 + 13.4695 -10.0255 0.00000 1.00000 10.0255 + 13.4880 -14.2744 0.00000 1.00000 14.2744 + 13.5065 -16.9060 0.00000 1.00000 16.9060 + 13.5250 -17.4714 0.00000 1.00000 17.4714 + 13.5435 -16.1512 0.00000 1.00000 16.1512 + 13.5620 -13.6784 0.00000 1.00000 13.6784 + 13.5805 -11.1043 0.00000 1.00000 11.1043 + 13.5990 -9.47288 0.00000 1.00000 9.47288 + 13.6175 -9.49567 0.00000 1.00000 9.49567 + 13.6360 -11.3153 0.00000 1.00000 11.3153 + 13.6545 -14.4268 0.00000 1.00000 14.4268 + 13.6730 -17.7824 0.00000 1.00000 17.7824 + 13.6915 -20.0552 0.00000 1.00000 20.0552 + 13.7100 -19.9965 0.00000 1.00000 19.9965 + 13.7285 -16.7898 0.00000 1.00000 16.7898 + 13.7470 -10.3089 0.00000 1.00000 10.3089 + 13.7655 -1.20781 0.00000 1.00000 1.20781 + 13.7840 9.18567 0.00000 1.00000 -9.18567 + 13.8025 19.1488 0.00000 1.00000 -19.1488 + 13.8210 26.9489 0.00000 1.00000 -26.9489 + 13.8395 31.2366 0.00000 1.00000 -31.2366 + 13.8580 31.3496 0.00000 1.00000 -31.3496 + 13.8765 27.4511 0.00000 1.00000 -27.4511 + 13.8950 20.4697 0.00000 1.00000 -20.4697 + 13.9135 11.8582 0.00000 1.00000 -11.8582 + 13.9320 3.23523 0.00000 1.00000 -3.23523 + 13.9505 -3.99882 0.00000 1.00000 3.99882 + 13.9690 -8.96984 0.00000 1.00000 8.96984 + 13.9875 -11.4848 0.00000 1.00000 11.4848 + 14.0060 -11.9967 0.00000 1.00000 11.9967 + 14.0245 -11.3970 0.00000 1.00000 11.3970 + 14.0430 -10.7008 0.00000 1.00000 10.7008 + 14.0615 -10.7168 0.00000 1.00000 10.7168 + 14.0800 -11.7936 0.00000 1.00000 11.7936 + 14.0985 -13.7115 0.00000 1.00000 13.7115 + 14.1170 -15.7457 0.00000 1.00000 15.7457 + 14.1355 -16.8835 0.00000 1.00000 16.8835 + 14.1540 -16.1342 0.00000 1.00000 16.1342 + 14.1725 -12.8466 0.00000 1.00000 12.8466 + 14.1910 -6.94542 0.00000 1.00000 6.94542 + 14.2095 0.982134 0.00000 1.00000 -0.982134 + 14.2280 9.77953 0.00000 1.00000 -9.77953 + 14.2465 17.9729 0.00000 1.00000 -17.9729 + 14.2650 24.1178 0.00000 1.00000 -24.1178 + 14.2835 27.1485 0.00000 1.00000 -27.1485 + 14.3020 26.6355 0.00000 1.00000 -26.6355 + 14.3205 22.8839 0.00000 1.00000 -22.8839 + 14.3390 16.8479 0.00000 1.00000 -16.8479 + 14.3575 9.88786 0.00000 1.00000 -9.88786 + 14.3760 3.43554 0.00000 1.00000 -3.43554 + 14.3945 -1.34253 0.00000 1.00000 1.34253 + 14.4130 -3.79922 0.00000 1.00000 3.79922 + 14.4315 -3.91650 0.00000 1.00000 3.91650 + 14.4500 -2.25034 0.00000 1.00000 2.25034 + 14.4685 0.265934 0.00000 1.00000 -0.265934 + 14.4870 2.60091 0.00000 1.00000 -2.60091 + 14.5055 3.90902 0.00000 1.00000 -3.90902 + 14.5240 3.74411 0.00000 1.00000 -3.74411 + 14.5425 2.15013 0.00000 1.00000 -2.15013 + 14.5610 -0.388481 0.00000 1.00000 0.388481 + 14.5795 -3.11515 0.00000 1.00000 3.11515 + 14.5980 -5.23631 0.00000 1.00000 5.23631 + 14.6165 -6.15513 0.00000 1.00000 6.15513 + 14.6350 -5.63898 0.00000 1.00000 5.63898 + 14.6535 -3.87566 0.00000 1.00000 3.87566 + 14.6720 -1.40645 0.00000 1.00000 1.40645 + 14.6905 1.04029 0.00000 1.00000 -1.04029 + 14.7090 2.76304 0.00000 1.00000 -2.76304 + 14.7275 3.28473 0.00000 1.00000 -3.28473 + 14.7460 2.47788 0.00000 1.00000 -2.47788 + 14.7645 0.584519 0.00000 1.00000 -0.584519 + 14.7830 -1.87052 0.00000 1.00000 1.87052 + 14.8015 -4.24417 0.00000 1.00000 4.24417 + 14.8200 -5.96765 0.00000 1.00000 5.96765 + 14.8385 -6.70965 0.00000 1.00000 6.70965 + 14.8570 -6.46211 0.00000 1.00000 6.46211 + 14.8755 -5.52356 0.00000 1.00000 5.52356 + 14.8940 -4.38544 0.00000 1.00000 4.38544 + 14.9125 -3.55512 0.00000 1.00000 3.55512 + 14.9310 -3.36898 0.00000 1.00000 3.36898 + 14.9495 -3.85281 0.00000 1.00000 3.85281 + 14.9680 -4.67590 0.00000 1.00000 4.67590 + 14.9865 -5.21922 0.00000 1.00000 5.21922 + 15.0050 -4.74479 0.00000 1.00000 4.74479 + 15.0235 -2.62144 0.00000 1.00000 2.62144 + 15.0420 1.45687 0.00000 1.00000 -1.45687 + 15.0605 7.32500 0.00000 1.00000 -7.32500 + 15.0790 14.3193 0.00000 1.00000 -14.3193 + 15.0975 21.3835 0.00000 1.00000 -21.3835 + 15.1160 27.2852 0.00000 1.00000 -27.2852 + 15.1345 30.8902 0.00000 1.00000 -30.8902 + 15.1530 31.4245 0.00000 1.00000 -31.4245 + 15.1715 28.6588 0.00000 1.00000 -28.6588 + 15.1900 22.9682 0.00000 1.00000 -22.9682 + 15.2085 15.2541 0.00000 1.00000 -15.2541 + 15.2270 6.74712 0.00000 1.00000 -6.74712 + 15.2455 -1.25964 0.00000 1.00000 1.25964 + 15.2640 -7.68049 0.00000 1.00000 7.68049 + 15.2825 -11.8442 0.00000 1.00000 11.8442 + 15.3010 -13.5919 0.00000 1.00000 13.5919 + 15.3195 -13.2493 0.00000 1.00000 13.2493 + 15.3380 -11.4916 0.00000 1.00000 11.4916 + 15.3565 -9.14144 0.00000 1.00000 9.14144 + 15.3750 -6.95504 0.00000 1.00000 6.95504 + 15.3935 -5.44896 0.00000 1.00000 5.44896 + 15.4120 -4.80772 0.00000 1.00000 4.80772 + 15.4305 -4.88897 0.00000 1.00000 4.88897 + 15.4490 -5.31706 0.00000 1.00000 5.31706 + 15.4675 -5.63285 0.00000 1.00000 5.63285 + 15.4860 -5.45462 0.00000 1.00000 5.45462 + 15.5045 -4.60459 0.00000 1.00000 4.60459 + 15.5230 -3.16776 0.00000 1.00000 3.16776 + 15.5415 -1.46992 0.00000 1.00000 1.46992 + 15.5600 0.0157586 0.00000 1.00000 -0.0157586 + 15.5785 0.806047 0.00000 1.00000 -0.806047 + 15.5970 0.550242 0.00000 1.00000 -0.550242 + 15.6155 -0.861348 0.00000 1.00000 0.861348 + 15.6340 -3.25430 0.00000 1.00000 3.25430 + 15.6525 -6.20584 0.00000 1.00000 6.20584 + 15.6710 -9.14992 0.00000 1.00000 9.14992 + 15.6895 -11.5204 0.00000 1.00000 11.5204 + 15.7080 -12.8909 0.00000 1.00000 12.8909 + 15.7265 -13.0717 0.00000 1.00000 13.0717 + 15.7450 -12.1417 0.00000 1.00000 12.1417 + 15.7635 -10.4097 0.00000 1.00000 10.4097 + 15.7820 -8.32011 0.00000 1.00000 8.32011 + 15.8005 -6.33136 0.00000 1.00000 6.33136 + 15.8190 -4.80087 0.00000 1.00000 4.80087 + 15.8375 -3.90675 0.00000 1.00000 3.90675 + 15.8560 -3.62474 0.00000 1.00000 3.62474 + 15.8745 -3.76225 0.00000 1.00000 3.76225 + 15.8930 -4.03596 0.00000 1.00000 4.03596 + 15.9115 -4.16761 0.00000 1.00000 4.16761 + 15.9300 -3.96959 0.00000 1.00000 3.96959 + 15.9485 -3.39629 0.00000 1.00000 3.39629 + 15.9670 -2.54969 0.00000 1.00000 2.54969 + 15.9855 -1.64188 0.00000 1.00000 1.64188 + 16.0040 -0.928772 0.00000 1.00000 0.928772 + 16.0225 -0.634845 0.00000 1.00000 0.634845 + 16.0410 -0.888145 0.00000 1.00000 0.888145 + 16.0595 -1.67980 0.00000 1.00000 1.67980 + 16.0780 -2.85514 0.00000 1.00000 2.85514 + 16.0965 -4.13661 0.00000 1.00000 4.13661 + 16.1150 -5.17310 0.00000 1.00000 5.17310 + 16.1335 -5.60636 0.00000 1.00000 5.60636 + 16.1520 -5.14159 0.00000 1.00000 5.14159 + 16.1705 -3.60734 0.00000 1.00000 3.60734 + 16.1890 -0.992023 0.00000 1.00000 0.992023 + 16.2075 2.54958 0.00000 1.00000 -2.54958 + 16.2260 6.71807 0.00000 1.00000 -6.71807 + 16.2445 11.1120 0.00000 1.00000 -11.1120 + 16.2630 15.2812 0.00000 1.00000 -15.2812 + 16.2815 18.7822 0.00000 1.00000 -18.7822 + 16.3000 21.2269 0.00000 1.00000 -21.2269 + 16.3185 22.3212 0.00000 1.00000 -22.3212 + 16.3370 21.8912 0.00000 1.00000 -21.8912 + 16.3555 19.8991 0.00000 1.00000 -19.8991 + 16.3740 16.4493 0.00000 1.00000 -16.4493 + 16.3925 11.7863 0.00000 1.00000 -11.7863 + 16.4110 6.28331 0.00000 1.00000 -6.28331 + 16.4295 0.418687 0.00000 1.00000 -0.418687 + 16.4480 -5.25963 0.00000 1.00000 5.25963 + 16.4665 -10.1842 0.00000 1.00000 10.1842 + 16.4850 -13.8295 0.00000 1.00000 13.8295 + 16.5035 -15.7785 0.00000 1.00000 15.7785 + 16.5220 -15.7830 0.00000 1.00000 15.7830 + 16.5405 -13.8070 0.00000 1.00000 13.8070 + 16.5590 -10.0391 0.00000 1.00000 10.0391 + 16.5775 -4.87264 0.00000 1.00000 4.87264 + 16.5960 1.14589 0.00000 1.00000 -1.14589 + 16.6145 7.38649 0.00000 1.00000 -7.38649 + 16.6330 13.2091 0.00000 1.00000 -13.2091 + 16.6515 18.0296 0.00000 1.00000 -18.0296 + 16.6700 21.3708 0.00000 1.00000 -21.3708 + 16.6885 22.8991 0.00000 1.00000 -22.8991 + 16.7070 22.4456 0.00000 1.00000 -22.4456 + 16.7255 20.0158 0.00000 1.00000 -20.0158 + 16.7440 15.7881 0.00000 1.00000 -15.7881 + 16.7625 10.1035 0.00000 1.00000 -10.1035 + 16.7810 3.44424 0.00000 1.00000 -3.44424 + 16.7995 -3.59847 0.00000 1.00000 3.59847 + 16.8180 -10.3717 0.00000 1.00000 10.3717 + 16.8365 -16.2205 0.00000 1.00000 16.2205 + 16.8550 -20.5580 0.00000 1.00000 20.5580 + 16.8735 -22.9372 0.00000 1.00000 22.9372 + 16.8920 -23.1129 0.00000 1.00000 23.1129 + 16.9105 -21.0837 0.00000 1.00000 21.0837 + 16.9290 -17.1032 0.00000 1.00000 17.1032 + 16.9475 -11.6563 0.00000 1.00000 11.6563 + 16.9660 -5.39998 0.00000 1.00000 5.39998 + 16.9845 0.923758 0.00000 1.00000 -0.923758 + 17.0030 6.59122 0.00000 1.00000 -6.59122 + 17.0215 10.9979 0.00000 1.00000 -10.9979 + 17.0400 13.7383 0.00000 1.00000 -13.7383 + 17.0585 14.6477 0.00000 1.00000 -14.6477 + 17.0770 13.7998 0.00000 1.00000 -13.7998 + 17.0955 11.4638 0.00000 1.00000 -11.4638 + 17.1140 8.03578 0.00000 1.00000 -8.03578 + 17.1325 3.96378 0.00000 1.00000 -3.96378 + 17.1510 -0.316698 0.00000 1.00000 0.316698 + 17.1695 -4.42438 0.00000 1.00000 4.42438 + 17.1880 -8.04681 0.00000 1.00000 8.04681 + 17.2065 -10.9324 0.00000 1.00000 10.9324 + 17.2250 -12.8725 0.00000 1.00000 12.8725 + 17.2435 -13.6898 0.00000 1.00000 13.6898 + 17.2620 -13.2456 0.00000 1.00000 13.2456 + 17.2805 -11.4675 0.00000 1.00000 11.4675 + 17.2990 -8.39144 0.00000 1.00000 8.39144 + 17.3175 -4.20001 0.00000 1.00000 4.20001 + 17.3360 0.758004 0.00000 1.00000 -0.758004 + 17.3545 5.98116 0.00000 1.00000 -5.98116 + 17.3730 10.8661 0.00000 1.00000 -10.8661 + 17.3915 14.7906 0.00000 1.00000 -14.7906 + 17.4100 17.2137 0.00000 1.00000 -17.2137 + 17.4285 17.7745 0.00000 1.00000 -17.7745 + 17.4470 16.3661 0.00000 1.00000 -16.3661 + 17.4655 13.1690 0.00000 1.00000 -13.1690 + 17.4840 8.63053 0.00000 1.00000 -8.63053 + 17.5025 3.39246 0.00000 1.00000 -3.39246 + 17.5210 -1.82203 0.00000 1.00000 1.82203 + 17.5395 -6.33848 0.00000 1.00000 6.33848 + 17.5580 -9.64981 0.00000 1.00000 9.64981 + 17.5765 -11.4978 0.00000 1.00000 11.4978 + 17.5950 -11.9009 0.00000 1.00000 11.9009 + 17.6135 -11.1239 0.00000 1.00000 11.1239 + 17.6320 -9.59944 0.00000 1.00000 9.59944 + 17.6505 -7.81972 0.00000 1.00000 7.81972 + 17.6690 -6.22442 0.00000 1.00000 6.22442 + 17.6875 -5.11122 0.00000 1.00000 5.11122 + 17.7060 -4.58875 0.00000 1.00000 4.58875 + 17.7245 -4.58029 0.00000 1.00000 4.58029 + 17.7430 -4.87225 0.00000 1.00000 4.87225 + 17.7615 -5.18968 0.00000 1.00000 5.18968 + 17.7800 -5.27616 0.00000 1.00000 5.27616 + 17.7985 -4.95771 0.00000 1.00000 4.95771 + 17.8170 -4.17763 0.00000 1.00000 4.17763 + 17.8355 -2.99861 0.00000 1.00000 2.99861 + 17.8540 -1.57655 0.00000 1.00000 1.57655 + 17.8725 -0.115674 0.00000 1.00000 0.115674 + 17.8910 1.18232 0.00000 1.00000 -1.18232 + 17.9095 2.16253 0.00000 1.00000 -2.16253 + 17.9280 2.74507 0.00000 1.00000 -2.74507 + 17.9465 2.93310 0.00000 1.00000 -2.93310 + 17.9650 2.80225 0.00000 1.00000 -2.80225 + 17.9835 2.47685 0.00000 1.00000 -2.47685 + 18.0020 2.09940 0.00000 1.00000 -2.09940 + 18.0205 1.79907 0.00000 1.00000 -1.79907 + 18.0390 1.66403 0.00000 1.00000 -1.66403 + 18.0575 1.72260 0.00000 1.00000 -1.72260 + 18.0760 1.93703 0.00000 1.00000 -1.93703 + 18.0945 2.21113 0.00000 1.00000 -2.21113 + 18.1130 2.40837 0.00000 1.00000 -2.40837 + 18.1315 2.37442 0.00000 1.00000 -2.37442 + 18.1500 1.95988 0.00000 1.00000 -1.95988 + 18.1685 1.04724 0.00000 1.00000 -1.04724 + 18.1870 -0.426523 0.00000 1.00000 0.426523 + 18.2055 -2.45315 0.00000 1.00000 2.45315 + 18.2240 -4.90773 0.00000 1.00000 4.90773 + 18.2425 -7.52944 0.00000 1.00000 7.52944 + 18.2610 -9.92715 0.00000 1.00000 9.92715 + 18.2795 -11.6174 0.00000 1.00000 11.6174 + 18.2980 -12.0956 0.00000 1.00000 12.0956 + 18.3165 -10.9327 0.00000 1.00000 10.9327 + 18.3350 -7.88331 0.00000 1.00000 7.88331 + 18.3535 -2.98071 0.00000 1.00000 2.98071 + 18.3720 3.40650 0.00000 1.00000 -3.40650 + 18.3905 10.5811 0.00000 1.00000 -10.5811 + 18.4090 17.5968 0.00000 1.00000 -17.5968 + 18.4275 23.4036 0.00000 1.00000 -23.4036 + 18.4460 27.0310 0.00000 1.00000 -27.0310 + 18.4645 27.7731 0.00000 1.00000 -27.7731 + 18.4830 25.3345 0.00000 1.00000 -25.3345 + 18.5015 19.9052 0.00000 1.00000 -19.9052 + 18.5200 12.1472 0.00000 1.00000 -12.1472 + 18.5385 3.09099 0.00000 1.00000 -3.09099 + 18.5570 -6.03798 0.00000 1.00000 6.03798 + 18.5755 -14.0281 0.00000 1.00000 14.0281 + 18.5940 -19.8843 0.00000 1.00000 19.8843 + 18.6125 -22.9844 0.00000 1.00000 22.9844 + 18.6310 -23.1597 0.00000 1.00000 23.1597 + 18.6495 -20.6881 0.00000 1.00000 20.6881 + 18.6680 -16.2075 0.00000 1.00000 16.2075 + 18.6865 -10.5714 0.00000 1.00000 10.5714 + 18.7050 -4.68098 0.00000 1.00000 4.68098 + 18.7235 0.671251 0.00000 1.00000 -0.671251 + 18.7420 4.91529 0.00000 1.00000 -4.91529 + 18.7605 7.75797 0.00000 1.00000 -7.75797 + 18.7790 9.17588 0.00000 1.00000 -9.17588 + 18.7975 9.35965 0.00000 1.00000 -9.35965 + 18.8160 8.63035 0.00000 1.00000 -8.63035 + 18.8345 7.35145 0.00000 1.00000 -7.35145 + 18.8530 5.85510 0.00000 1.00000 -5.85510 + 18.8715 4.39513 0.00000 1.00000 -4.39513 + 18.8900 3.13002 0.00000 1.00000 -3.13002 + 18.9085 2.13168 0.00000 1.00000 -2.13168 + 18.9270 1.40976 0.00000 1.00000 -1.40976 + 18.9455 0.939913 0.00000 1.00000 -0.939913 + 18.9640 0.686429 0.00000 1.00000 -0.686429 + 18.9825 0.614229 0.00000 1.00000 -0.614229 + 19.0010 0.690570 0.00000 1.00000 -0.690570 + 19.0195 0.880032 0.00000 1.00000 -0.880032 + 19.0380 1.13788 0.00000 1.00000 -1.13788 + 19.0565 1.40627 0.00000 1.00000 -1.40627 + 19.0750 1.61604 0.00000 1.00000 -1.61604 + 19.0935 1.69418 0.00000 1.00000 -1.69418 + 19.1120 1.57467 0.00000 1.00000 -1.57467 + 19.1305 1.20912 0.00000 1.00000 -1.20912 + 19.1490 0.574418 0.00000 1.00000 -0.574418 + 19.1675 -0.322868 0.00000 1.00000 0.322868 + 19.1860 -1.44364 0.00000 1.00000 1.44364 + 19.2045 -2.71278 0.00000 1.00000 2.71278 + 19.2230 -4.01492 0.00000 1.00000 4.01492 + 19.2415 -5.19189 0.00000 1.00000 5.19189 + 19.2600 -6.04623 0.00000 1.00000 6.04623 + 19.2785 -6.35560 0.00000 1.00000 6.35560 + 19.2970 -5.90135 0.00000 1.00000 5.90135 + 19.3155 -4.51168 0.00000 1.00000 4.51168 + 19.3340 -2.11474 0.00000 1.00000 2.11474 + 19.3525 1.20914 0.00000 1.00000 -1.20914 + 19.3710 5.19105 0.00000 1.00000 -5.19105 + 19.3895 9.36912 0.00000 1.00000 -9.36912 + 19.4080 13.1271 0.00000 1.00000 -13.1271 + 19.4265 15.7779 0.00000 1.00000 -15.7779 + 19.4450 16.6827 0.00000 1.00000 -16.6827 + 19.4635 15.3867 0.00000 1.00000 -15.3867 + 19.4820 11.7418 0.00000 1.00000 -11.7418 + 19.5005 5.98757 0.00000 1.00000 -5.98757 + 19.5190 -1.23710 0.00000 1.00000 1.23710 + 19.5375 -8.96359 0.00000 1.00000 8.96359 + 19.5560 -16.0382 0.00000 1.00000 16.0382 + 19.5745 -21.3164 0.00000 1.00000 21.3164 + 19.5930 -23.8699 0.00000 1.00000 23.8699 + 19.6115 -23.1644 0.00000 1.00000 23.1644 + 19.6300 -19.1740 0.00000 1.00000 19.1740 + 19.6485 -12.4057 0.00000 1.00000 12.4057 + 19.6670 -3.82669 0.00000 1.00000 3.82669 + 19.6855 5.29471 0.00000 1.00000 -5.29471 + 19.7040 13.6058 0.00000 1.00000 -13.6058 + 19.7225 19.9014 0.00000 1.00000 -19.9014 + 19.7410 23.3260 0.00000 1.00000 -23.3260 + 19.7595 23.5068 0.00000 1.00000 -23.5068 + 19.7780 20.5929 0.00000 1.00000 -20.5929 + 19.7965 15.1973 0.00000 1.00000 -15.1973 + 19.8150 8.25741 0.00000 1.00000 -8.25741 + 19.8335 0.846490 0.00000 1.00000 -0.846490 + 19.8520 -6.02165 0.00000 1.00000 6.02165 + 19.8705 -11.5565 0.00000 1.00000 11.5565 + 19.8890 -15.2939 0.00000 1.00000 15.2939 + 19.9075 -17.1257 0.00000 1.00000 17.1257 + 19.9260 -17.2573 0.00000 1.00000 17.2573 + 19.9445 -16.1119 0.00000 1.00000 16.1119 + 19.9630 -14.2055 0.00000 1.00000 14.2055 + 19.9815 -12.0275 0.00000 1.00000 12.0275 + 20.0000 -9.95383 0.00000 1.00000 9.95383 diff --git a/src/diffpy/pdffit2/tests/testdata/badNi.stru b/src/diffpy/pdffit2/tests/testdata/badNi.stru new file mode 100644 index 00000000..d0b980cb --- /dev/null +++ b/src/diffpy/pdffit2/tests/testdata/badNi.stru @@ -0,0 +1,32 @@ +title structure Ni FCC +format pdffit +scale 1.000000 +sharp 0.000000, 1.000000, 0.000000 +spcgr Fm-3m +cell 3.520000, 3.520000, 3.520000, 90.000000, 90.000000, 90.000000 +dcell 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000 +ncell 1, 1, 1, 4 +atoms +NI 0.00000000 0.00000000 0.00000000 1.0000 + 0.00000000 0.00000000 0.00000000 0.0000 + 0.00126651 0.00126651 0.00126651 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 +NI 0.00000000 0.50000000 0.50000000 1.0000 + 0.00000000 0.00000000 0.00000000 0.0000 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 +NI 0.50000000 0.00000000 0.50000000 1.0000 + 0.00000000 0.00000000 0.00000000 0.0000 + 0.00126651 0.00126651 0.00126651 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 +NI 0.50000000 0.50000000 0.00000000 1.0000 + 0.00000000 0.00000000 0.00000000 0.0000 + 0.00126651 0.00126651 0.00126651 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 diff --git a/src/diffpy/pdffit2/tests/testdata/badNiZeroVolume.stru b/src/diffpy/pdffit2/tests/testdata/badNiZeroVolume.stru new file mode 100644 index 00000000..089db0da --- /dev/null +++ b/src/diffpy/pdffit2/tests/testdata/badNiZeroVolume.stru @@ -0,0 +1,33 @@ +title structure Ni FCC +format pdffit +scale 1.000000 +sharp 0.000000, 1.000000, 0.000000 +spcgr Fm-3m +cell 3.520000, 3.520000, 3.520000, 90.000000, 90.000000, 0.000000 +dcell 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000 +ncell 1, 1, 1, 4 +atoms +NI 0.00000000 0.00000000 0.00000000 1.0000 + 0.00000000 0.00000000 0.00000000 0.0000 + 0.00126651 0.00126651 0.00126651 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 +NI 0.00000000 0.50000000 0.50000000 1.0000 + 0.00000000 0.00000000 0.00000000 0.0000 + 0.00126651 0.00126651 0.00126651 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 +NI 0.50000000 0.00000000 0.50000000 1.0000 + 0.00000000 0.00000000 0.00000000 0.0000 + 0.00126651 0.00126651 0.00126651 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 +NI 0.50000000 0.50000000 0.00000000 1.0000 + 0.00000000 0.00000000 0.00000000 0.0000 + 0.00126651 0.00126651 0.00126651 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 diff --git a/src/diffpy/pdffit2/tests/testdata/noLattice.stru b/src/diffpy/pdffit2/tests/testdata/noLattice.stru new file mode 100644 index 00000000..4f8e7212 --- /dev/null +++ b/src/diffpy/pdffit2/tests/testdata/noLattice.stru @@ -0,0 +1,32 @@ +title structure Ni FCC +format pdffit +scale 1.000000 +sharp 0.000000, 1.000000, 0.000000 +spcgr Fm-3m +cell 3.520000, 3.520000, -3.520000, 90.000000, 90.000000, 90.000000 +dcell 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000 +ncell 1, 1, 1, 4 +atoms +NI 0.00000000 0.00000000 0.00000000 1.0000 + 0.00000000 0.00000000 0.00000000 0.0000 + 0.00126651 0.00126651 0.00126651 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 +NI 0.50000000 0.50000000 0.00000000 1.0000 + 0.00000000 0.00000000 0.00000000 0.0000 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 +NI 0.50000000 0.00000000 0.50000000 1.0000 + 0.00000000 0.00000000 0.00000000 0.0000 + 0.00126651 0.00126651 0.00126651 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 +NI 0.50000000 0.50000000 0.00000000 1.0000 + 0.00000000 0.00000000 0.00000000 0.0000 + 0.00126651 0.00126651 0.00126651 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 0.00000000 diff --git a/src/diffpy/pdffit2/version.py b/src/diffpy/pdffit2/version.py new file mode 100644 index 00000000..69e4d1b2 --- /dev/null +++ b/src/diffpy/pdffit2/version.py @@ -0,0 +1,26 @@ +#!/usr/bin/env python +############################################################################## +# +# (c) 2024 The Trustees of Columbia University in the City of New York. +# All rights reserved. +# +# File coded by: Billinge Group members and community contributors. +# +# See GitHub contributions for a more detailed list of contributors. +# https://github.com/diffpy/diffpy.pdffit2/graphs/contributors +# +# See LICENSE.rst for license information. +# +############################################################################## + +"""Definition of __version__.""" + +# We do not use the other three variables, but can be added back if needed. +# __all__ = ["__date__", "__git_commit__", "__timestamp__", "__version__"] + +# obtain version information +from importlib.metadata import version + +__version__ = version("diffpy.pdffit2") + +# End of file From af811e88935b07aa6574624e429e104cc14c8d4d Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 22 Jul 2024 15:52:36 +0000 Subject: [PATCH 022/104] [pre-commit.ci] auto fixes from pre-commit hooks --- src/diffpy/__init__.py | 1 - 1 file changed, 1 deletion(-) diff --git a/src/diffpy/__init__.py b/src/diffpy/__init__.py index 71428827..5b3af482 100644 --- a/src/diffpy/__init__.py +++ b/src/diffpy/__init__.py @@ -21,4 +21,3 @@ __path__ = extend_path(__path__, __name__) # End of file - From 1181ff6d6dd925bb3459bc2c25aa30a3b36488e0 Mon Sep 17 00:00:00 2001 From: Sam Andrello Date: Mon, 22 Jul 2024 12:03:56 -0400 Subject: [PATCH 023/104] Added C++ extensions libpdffit2 and pdffit2module --- src/extensions/libpdffit2/Atom.cc | 104 + src/extensions/libpdffit2/Atom.h | 70 + src/extensions/libpdffit2/AtomType.h | 76 + .../libpdffit2/LocalPeriodicTable.cc | 147 + .../libpdffit2/LocalPeriodicTable.h | 63 + src/extensions/libpdffit2/MathUtils.h | 94 + src/extensions/libpdffit2/OutputStreams.cc | 24 + src/extensions/libpdffit2/OutputStreams.h | 31 + src/extensions/libpdffit2/PairDistance.h | 42 + src/extensions/libpdffit2/PeriodicTable.cc | 3459 +++++++++++++++++ src/extensions/libpdffit2/PeriodicTable.h | 75 + src/extensions/libpdffit2/PointsInSphere.cc | 243 ++ src/extensions/libpdffit2/PointsInSphere.h | 182 + src/extensions/libpdffit2/ShapeFactors.h | 43 + src/extensions/libpdffit2/StringUtils.cc | 58 + src/extensions/libpdffit2/StringUtils.h | 71 + src/extensions/libpdffit2/exceptions.h | 95 + src/extensions/libpdffit2/fit.cc | 836 ++++ src/extensions/libpdffit2/gaussj.cc | 114 + src/extensions/libpdffit2/matrix.h | 239 ++ src/extensions/libpdffit2/metric.cc | 341 ++ src/extensions/libpdffit2/nrutil.cc | 122 + src/extensions/libpdffit2/nrutil.h | 34 + src/extensions/libpdffit2/output.cc | 350 ++ src/extensions/libpdffit2/parser.cc | 402 ++ src/extensions/libpdffit2/pdf.cc | 1776 +++++++++ src/extensions/libpdffit2/pdffit.cc | 372 ++ src/extensions/libpdffit2/pdffit.h | 611 +++ src/extensions/libpdffit2/pdflsmin.cc | 326 ++ src/extensions/libpdffit2/scatlen.cc | 114 + src/extensions/libpdffit2/stru.cc | 837 ++++ src/extensions/libpdffit2/support_msvc9.h | 13 + src/extensions/libpdffit2/tests/Makefile | 32 + .../libpdffit2/tests/TestPointsInSphere.cc | 228 ++ src/extensions/libpdffit2/tests/alltests.cc | 46 + .../pdffit2module/PyFileStreambuf.h | 97 + src/extensions/pdffit2module/bindings.cc | 341 ++ src/extensions/pdffit2module/bindings.h | 27 + src/extensions/pdffit2module/misc.cc | 2219 +++++++++++ src/extensions/pdffit2module/misc.h | 486 +++ src/extensions/pdffit2module/pdffit2module.cc | 150 + src/extensions/pdffit2module/pyexceptions.cc | 30 + src/extensions/pdffit2module/pyexceptions.h | 33 + 43 files changed, 15053 insertions(+) create mode 100644 src/extensions/libpdffit2/Atom.cc create mode 100644 src/extensions/libpdffit2/Atom.h create mode 100644 src/extensions/libpdffit2/AtomType.h create mode 100644 src/extensions/libpdffit2/LocalPeriodicTable.cc create mode 100644 src/extensions/libpdffit2/LocalPeriodicTable.h create mode 100644 src/extensions/libpdffit2/MathUtils.h create mode 100644 src/extensions/libpdffit2/OutputStreams.cc create mode 100644 src/extensions/libpdffit2/OutputStreams.h create mode 100644 src/extensions/libpdffit2/PairDistance.h create mode 100644 src/extensions/libpdffit2/PeriodicTable.cc create mode 100644 src/extensions/libpdffit2/PeriodicTable.h create mode 100644 src/extensions/libpdffit2/PointsInSphere.cc create mode 100644 src/extensions/libpdffit2/PointsInSphere.h create mode 100644 src/extensions/libpdffit2/ShapeFactors.h create mode 100644 src/extensions/libpdffit2/StringUtils.cc create mode 100644 src/extensions/libpdffit2/StringUtils.h create mode 100644 src/extensions/libpdffit2/exceptions.h create mode 100644 src/extensions/libpdffit2/fit.cc create mode 100644 src/extensions/libpdffit2/gaussj.cc create mode 100644 src/extensions/libpdffit2/matrix.h create mode 100644 src/extensions/libpdffit2/metric.cc create mode 100644 src/extensions/libpdffit2/nrutil.cc create mode 100644 src/extensions/libpdffit2/nrutil.h create mode 100644 src/extensions/libpdffit2/output.cc create mode 100644 src/extensions/libpdffit2/parser.cc create mode 100644 src/extensions/libpdffit2/pdf.cc create mode 100644 src/extensions/libpdffit2/pdffit.cc create mode 100644 src/extensions/libpdffit2/pdffit.h create mode 100644 src/extensions/libpdffit2/pdflsmin.cc create mode 100644 src/extensions/libpdffit2/scatlen.cc create mode 100644 src/extensions/libpdffit2/stru.cc create mode 100644 src/extensions/libpdffit2/support_msvc9.h create mode 100644 src/extensions/libpdffit2/tests/Makefile create mode 100644 src/extensions/libpdffit2/tests/TestPointsInSphere.cc create mode 100644 src/extensions/libpdffit2/tests/alltests.cc create mode 100644 src/extensions/pdffit2module/PyFileStreambuf.h create mode 100644 src/extensions/pdffit2module/bindings.cc create mode 100644 src/extensions/pdffit2module/bindings.h create mode 100644 src/extensions/pdffit2module/misc.cc create mode 100644 src/extensions/pdffit2module/misc.h create mode 100644 src/extensions/pdffit2module/pdffit2module.cc create mode 100644 src/extensions/pdffit2module/pyexceptions.cc create mode 100644 src/extensions/pdffit2module/pyexceptions.h diff --git a/src/extensions/libpdffit2/Atom.cc b/src/extensions/libpdffit2/Atom.cc new file mode 100644 index 00000000..aa2e66f2 --- /dev/null +++ b/src/extensions/libpdffit2/Atom.cc @@ -0,0 +1,104 @@ +/*********************************************************************** +* +* pdffit2 by DANSE Diffraction group +* Simon J. L. Billinge +* (c) 2006 trustees of the Michigan State University +* All rights reserved. +* +* File coded by: Pavol Juhas +* +* See AUTHORS.txt for a list of people who contributed. +* See LICENSE.txt for license information. +* +************************************************************************ +* +* class Atom +* +* Comments: +* +***********************************************************************/ + +#include + +#include "Atom.h" +#include "MathUtils.h" +#include "LocalPeriodicTable.h" + +using namespace std; + +// class data - private + + +Atom::AtomFormat Atom::streamformat = Atom::DISCUS; + + +// public class methods + + +void Atom::setDiscusFormat() +{ + Atom::streamformat = DISCUS; +} + + +void Atom::setPdffitFormat() +{ + Atom::streamformat = PDFFIT; +} + + +// private methods + + +istream& Atom::read_discus_atom(istream& in) +{ + double B; + string symbol; + const double fac = 1.0 / (8.0*M_PI*M_PI); + in >> symbol >> pos[0] >> pos[1] >> pos[2] >> B; + if (!in) return in; + // here we read successfully + const LocalPeriodicTable* lpt = LocalPeriodicTable::instance(); + atom_type = lpt->lookup(symbol); + fill_n(u, 3, fac*B); + fill_n(u+3, 3, 0.0); + occ = 1.0; + docc = 0.0; + fill_n(dpos, 3, 0.0); + fill_n(du, 6, 0.0); + return in; +} + + +istream& Atom::read_pdffit_atom(istream& in) +{ + string symbol; + in >> symbol >> pos[0] >> pos[1] >> pos[2] >> occ >> + dpos[0] >> dpos[1] >> dpos[2] >> docc >> + u[0] >> u[1] >> u[2] >> + du[0] >> du[1] >> du[2] >> + u[3] >> u[4] >> u[5] >> + du[3] >> du[4] >> du[5]; + if (!in) return in; + // here we read successfully + const LocalPeriodicTable* lpt = LocalPeriodicTable::instance(); + atom_type = lpt->lookup(symbol); + return in; +} + + +// non-member operators + + +istream& operator>>(istream& in, Atom& a) +{ + switch (Atom::streamformat) + { + case Atom::DISCUS: return a.read_discus_atom(in); + case Atom::PDFFIT: return a.read_pdffit_atom(in); + }; + return in; +} + + +// End of file diff --git a/src/extensions/libpdffit2/Atom.h b/src/extensions/libpdffit2/Atom.h new file mode 100644 index 00000000..11955036 --- /dev/null +++ b/src/extensions/libpdffit2/Atom.h @@ -0,0 +1,70 @@ +/*********************************************************************** +* +* pdffit2 by DANSE Diffraction group +* Simon J. L. Billinge +* (c) 2006 trustees of the Michigan State University +* All rights reserved. +* +* File coded by: Pavol Juhas +* +* See AUTHORS.txt for a list of people who contributed. +* See LICENSE.txt for license information. +* +************************************************************************ +* +* class Atom +* +* Comments: +* +***********************************************************************/ + +#ifndef ATOM_H_INCLUDED +#define ATOM_H_INCLUDED + +#include +#include "AtomType.h" + +class PdfFit; +class DataSet; +class Phase; + +class Atom +{ + // friends who need to touch offset + friend class PdfFit; + friend class DataSet; + friend class Phase; + friend std::istream& operator>>(std::istream& in, Atom& a); + + public: + + // class methods + static void setDiscusFormat(); + static void setPdffitFormat(); + + // data + const AtomType* atom_type; + double weight; // normalized scattering factor + double pos[3], dpos[3]; + double u[6], du[6]; + double occ, docc; + + private: + + // types and class data + enum AtomFormat { DISCUS, PDFFIT }; + static AtomFormat streamformat; + + // data + int offset; + + // methods + std::istream& read_discus_atom(std::istream& in); + std::istream& read_pdffit_atom(std::istream& in); +}; + +// non-member operators + +std::istream& operator>>(std::istream& in, Atom& a); + +#endif // ATOM_H_INCLUDED diff --git a/src/extensions/libpdffit2/AtomType.h b/src/extensions/libpdffit2/AtomType.h new file mode 100644 index 00000000..4c002e8d --- /dev/null +++ b/src/extensions/libpdffit2/AtomType.h @@ -0,0 +1,76 @@ +/*********************************************************************** +* +* pdffit2 by DANSE Diffraction group +* Simon J. L. Billinge +* (c) 2006 trustees of the Michigan State University +* All rights reserved. +* +* File coded by: Pavol Juhas +* +* See AUTHORS.txt for a list of people who contributed. +* See LICENSE.txt for license information. +* +************************************************************************ +* +* class AtomType +* +* Comments: storage of element properties like name, symbol, +* atomic mass or scattering power +* +***********************************************************************/ + +#ifndef ATOMTYPE_H_INCLUDED +#define ATOMTYPE_H_INCLUDED + +#include +#include +#include + +class AtomType +{ + public: + // Data + std::string symbol; // element symbol + std::string name; // element name + bool isotope; // flag for isotopes + int z; // atomic number + double M; // atomic mass + int charge; // total charge in e + double radius; // ionic radius + double xsf; // x-ray scattering factor + double nsf; // neutron scattering factor + + // Constructor + AtomType() + { + z = 0; + M = 0.0; + isotope = false; + charge = 0; + radius = 0.0; + xsf = 0.0; + nsf = 0.0; + } + + // Methods + double sf(char scattering_type) const + { + switch (scattering_type) + { + case 'x': + case 'X': + return xsf; + case 'n': + case 'N': + return nsf; + default: + std::ostringstream emsg; + emsg << "Invalid scattering type '" << + scattering_type << "'"; + throw std::runtime_error(emsg.str()); + } + return 0.0; + } +}; + +#endif // ATOMTYPE_H_INCLUDED diff --git a/src/extensions/libpdffit2/LocalPeriodicTable.cc b/src/extensions/libpdffit2/LocalPeriodicTable.cc new file mode 100644 index 00000000..482f2f10 --- /dev/null +++ b/src/extensions/libpdffit2/LocalPeriodicTable.cc @@ -0,0 +1,147 @@ +/*********************************************************************** +* +* pdffit2 by DANSE Diffraction group +* Simon J. L. Billinge +* (c) 2008 trustees of the Michigan State University +* All rights reserved. +* +* File coded by: Pavol Juhas +* +* See AUTHORS.txt for a list of people who contributed. +* See LICENSE.txt for license information. +* +************************************************************************ +* +* class LocalPeriodicTable +* +* Comments: Light-weight class which allows redefinitions of scattering +* factors. This class throws ValueError for unknown elements. +* +***********************************************************************/ + +#include +#include "LocalPeriodicTable.h" +#include "exceptions.h" + +using namespace std; + + +// public class methods + + +const LocalPeriodicTable* LocalPeriodicTable::instance() +{ + static unique_ptr the_table(new LocalPeriodicTable()); + return the_table.get(); +} + + +// constructor + + +LocalPeriodicTable::LocalPeriodicTable() +{ + // private data + this->_periodic_table = PeriodicTable::instance(); +} + + +// public methods + + +const AtomType* LocalPeriodicTable::name(const string& nm) const +{ + const AtomType* atp0; + try { + atp0 = this->_periodic_table->name(nm); + } + catch (runtime_error e) { + throw ValueError(e.what()); + } + const AtomType* atp = local_symbol(atp0->symbol); + return atp; +} + + +const AtomType* LocalPeriodicTable::symbol(const string& smbl) const +{ + const AtomType* atp = local_symbol(smbl); + return atp; +} + + +const AtomType* LocalPeriodicTable::lookup(const string& pat) const +{ + const AtomType* atp0; + try { + atp0 = this->_periodic_table->lookup(pat); + } + catch (runtime_error e) { + throw ValueError(e.what()); + } + const AtomType* atp = local_symbol(atp0->symbol); + return atp; +} + + +bool LocalPeriodicTable::has(const string& pat) const +{ + return this->_periodic_table->has(pat); +} + + +void LocalPeriodicTable::reset(const string& smbl) +{ + const AtomType* atp0; + try { + atp0 = this->_periodic_table->symbol(smbl); + } + catch (runtime_error e) { + throw ValueError(e.what()); + } + // overwrite with default only when smbl is in the local table + if (this->_local_table.count(smbl)) + { + this->_local_table[smbl] = *atp0; + } +} + + +void LocalPeriodicTable::setXsf(const string& smbl, double xsf) +{ + AtomType* atp = this->local_symbol(smbl); + atp->xsf = xsf; +} + + +void LocalPeriodicTable::setNsf(const string& smbl, double nsf) +{ + AtomType* atp = this->local_symbol(smbl); + atp->nsf = nsf; +} + + +// private methods + + +AtomType* LocalPeriodicTable::local_symbol(const string& smbl) const +{ + map::iterator atplocal; + atplocal = this->_local_table.find(smbl); + if (atplocal == this->_local_table.end()) + { + const AtomType* atp0; + try { + atp0 = this->_periodic_table->symbol(smbl); + } + catch (runtime_error e) { + throw ValueError(e.what()); + } + atplocal = this->_local_table.insert(make_pair(smbl, *atp0)).first; + } + AtomType* atp = &(atplocal->second); + return atp; +} + + +// End of file diff --git a/src/extensions/libpdffit2/LocalPeriodicTable.h b/src/extensions/libpdffit2/LocalPeriodicTable.h new file mode 100644 index 00000000..551faee5 --- /dev/null +++ b/src/extensions/libpdffit2/LocalPeriodicTable.h @@ -0,0 +1,63 @@ +/*********************************************************************** +* +* pdffit2 by DANSE Diffraction group +* Simon J. L. Billinge +* (c) 2008 trustees of the Michigan State University +* All rights reserved. +* +* File coded by: Pavol Juhas +* +* See AUTHORS.txt for a list of people who contributed. +* See LICENSE.txt for license information. +* +************************************************************************ +* +* class LocalPeriodicTable +* +* Comments: Light-weight class which allows redefinitions of scattering +* factors. It keeps a local copy of each looked up species, +* which can be redefined. +* This class also throws ValueError for unknown elements. +* +***********************************************************************/ + +#ifndef LOCALPERIODICTABLE_H_INCLUDED +#define LOCALPERIODICTABLE_H_INCLUDED + +#include +#include +#include "PeriodicTable.h" + +class LocalPeriodicTable +{ + public: + + // class methods + + // common instance for clients that do not need to own one + static const LocalPeriodicTable* instance(); + + // constructor + LocalPeriodicTable(); + + // methods + const AtomType* name(const std::string& nm) const; + const AtomType* symbol(const std::string& smbl) const; + const AtomType* lookup(const std::string& pat) const; + bool has(const std::string& pat) const; + void reset(const std::string& smbl); + void setXsf(const std::string& smbl, double xsf); + void setNsf(const std::string& smbl, double nsf); + + private: + + // data + PeriodicTable* _periodic_table; + mutable std::map _local_table; + + // methods + AtomType* local_symbol(const std::string& smbl) const; + +}; + +#endif // LOCALPERIODICTABLE_H_INCLUDED diff --git a/src/extensions/libpdffit2/MathUtils.h b/src/extensions/libpdffit2/MathUtils.h new file mode 100644 index 00000000..21240276 --- /dev/null +++ b/src/extensions/libpdffit2/MathUtils.h @@ -0,0 +1,94 @@ +/*********************************************************************** +* +* pdffit2 by DANSE Diffraction group +* Simon J. L. Billinge +* (c) 2007 trustees of the Michigan State University +* All rights reserved. +* +* File coded by: Jacques Bloch, Pavol Juhas +* +* See AUTHORS.txt for a list of people who contributed. +* See LICENSE.txt for license information. +* +************************************************************************ +* +* Math functions and numerical constants for pdffit2 and formula parser. +* +* Comments: +* +***********************************************************************/ + +#ifndef MATHUTILS_H_INCLUDED +#define MATHUTILS_H_INCLUDED + +#include +#include + +// numerical constants +const double rad = M_PI/180.0; +const double double_eps = (1.0 + sqrt(std::numeric_limits().epsilon())) - 1.0; +const double double_max = std::numeric_limits().max(); +const double deltar_tol = 1.0e-3; + +// MS compatibility fix - define functions not provided by MSVC cmath +#ifdef _MSC_VER +#include + +#if _MSC_VER < 1800 // log2 has been available since MSVC 2013 +inline double log2(double x) { return log(x)/log(2.0); } +#endif + +inline int isnan(double x) { return _isnan(x); } +inline double round(double x) { return (x < 0) ? ceil(x - 0.5) : floor(x + 0.5); } + +#endif // _MSC_VER + +// nearest integer +inline int nint(const double x) +{ + return (int) round(x); +} + +// math functions and derivatives used in formula parser + +inline double neg(double x) { return -x; } +inline double dneg(double x) { return -1.0; } + +inline double sqr(double x) { return x*x; } +inline double dsqr(double x) { return 2.0*x; } + +inline double cube(double x) { return x*x*x; } +inline double dcube(double x) { return 3.0*sqr(x); } + +inline double dsqrt(double x) { return 0.5/sqrt(x); } + +inline double dexp(double x) { return exp(x); } +inline double dlog(double x) { return 1.0/x; } + +inline double sind(double x) { return sin(rad*x); } +inline double dsind(double x) { return rad*cos(rad*x); } + +inline double cosd(double x) { return cos(rad*x); } +inline double dcosd(double x) { return -rad*sin(rad*x); } + +inline double tand(double x) { return tan(rad*x); } +inline double dtand(double x) { return rad/sqr(cosd(x)); } + +inline double dsin(double x) { return cos(x); } +inline double dcos(double x) { return -sin(x); } +inline double dtan(double x) { return 1.0/sqr(cos(x)); } + +inline double dasin(double x) { return 1.0/sqrt(1.0 - x*x); } +inline double dacos(double x) { return -1.0/sqrt(1.0 - x*x); } +inline double datan(double x) { return 1/(1+sqr(x)); } + +inline double asind(double x) { return asin(x)/rad; } +inline double dasind(double x) { return dasin(x)/rad; } + +inline double acosd(double x) { return acos(x)/rad; } +inline double dacosd(double x) { return dacos(x)/rad; } + +inline double atand(double x) { return atan(x)/rad; } +inline double datand(double x) { return datan(x)/rad; } + +#endif // MATHUTILS_H_INCLUDED diff --git a/src/extensions/libpdffit2/OutputStreams.cc b/src/extensions/libpdffit2/OutputStreams.cc new file mode 100644 index 00000000..6bacc8c1 --- /dev/null +++ b/src/extensions/libpdffit2/OutputStreams.cc @@ -0,0 +1,24 @@ +/*********************************************************************** +* +* pdffit2 by DANSE Diffraction group +* Simon J. L. Billinge +* (c) 2006 trustees of the Michigan State University +* All rights reserved. +* +* File coded by: Pavol Juhas +* +* See AUTHORS.txt for a list of people who contributed. +* See LICENSE.txt for license information. +* +************************************************************************ +* +* Custom output and error streams. +* +***********************************************************************/ + +#include "OutputStreams.h" + +std::ostream* NS_PDFFIT2::pout = &std::cout; +std::ostream* NS_PDFFIT2::perr = &std::cerr; + +// End of file diff --git a/src/extensions/libpdffit2/OutputStreams.h b/src/extensions/libpdffit2/OutputStreams.h new file mode 100644 index 00000000..d269b6b3 --- /dev/null +++ b/src/extensions/libpdffit2/OutputStreams.h @@ -0,0 +1,31 @@ +/*********************************************************************** +* +* pdffit2 by DANSE Diffraction group +* Simon J. L. Billinge +* (c) 2006 trustees of the Michigan State University +* All rights reserved. +* +* File coded by: Pavol Juhas +* +* See AUTHORS.txt for a list of people who contributed. +* See LICENSE.txt for license information. +* +************************************************************************ +* +* Custom output and error streams. +* +***********************************************************************/ + +#ifndef OUTPUTSTREAMS_H_INCLUDED +#define OUTPUTSTREAMS_H_INCLUDED + +#include + +namespace NS_PDFFIT2 { + +extern std::ostream* pout; +extern std::ostream* perr; + +} + +#endif // OUTPUTSTREAMS_H_INCLUDED diff --git a/src/extensions/libpdffit2/PairDistance.h b/src/extensions/libpdffit2/PairDistance.h new file mode 100644 index 00000000..92c375f3 --- /dev/null +++ b/src/extensions/libpdffit2/PairDistance.h @@ -0,0 +1,42 @@ +/*********************************************************************** +* +* pdffit2 by DANSE Diffraction group +* Simon J. L. Billinge +* (c) 2006 trustees of the Michigan State University +* All rights reserved. +* +* File coded by: Pavol Juhas +* +* See AUTHORS.txt for a list of people who contributed. +* See LICENSE.txt for license information. +* +************************************************************************ +* +* Simple struct for pair distance and indices of atoms in the pair +* +***********************************************************************/ + +#ifndef PAIRDISTANCE_H_INCLUDED +#define PAIRDISTANCE_H_INCLUDED + +struct PairDistance +{ + // Data members + double dij; // distance + double ddij; // standard deviation + int i; // first index based from 1 + int j; // second index based from 1 + + // Constructor + PairDistance() : dij(0.0), ddij(0.0), i(0), j(0) + { } + +}; + +// Comparison operator +inline bool operator<(const PairDistance& pd0, const PairDistance& pd1) +{ + return (pd0.dij < pd1.dij); +} + +#endif // PAIRDISTANCE_H_INCLUDED diff --git a/src/extensions/libpdffit2/PeriodicTable.cc b/src/extensions/libpdffit2/PeriodicTable.cc new file mode 100644 index 00000000..dd1b4481 --- /dev/null +++ b/src/extensions/libpdffit2/PeriodicTable.cc @@ -0,0 +1,3459 @@ +/*********************************************************************** +* +* pdffit2 by DANSE Diffraction group +* Simon J. L. Billinge +* (c) 2006 trustees of the Michigan State University +* All rights reserved. +* +* File coded by: Pavol Juhas +* +* See AUTHORS.txt for a list of people who contributed. +* See LICENSE.txt for license information. +* +************************************************************************ +* +* class PeriodicTable +* +* Comments: singleton class, use PeriodicTable::instance() +* for its pointer +* +***********************************************************************/ + +#include +#include +#include + +// MS compatibility fix +#include + +#include "PeriodicTable.h" + +using namespace std; + +//////////////////////////////////////////////////////////////////////// +// helper function +//////////////////////////////////////////////////////////////////////// +namespace { + +inline bool isalphachar(const char& c) +{ + return isalpha(c); +} + +} // namespace + +//////////////////////////////////////////////////////////////////////// +// PeriodicTable definitions +//////////////////////////////////////////////////////////////////////// + +PeriodicTable::PeriodicTable() +{ + init(); +} + +PeriodicTable::~PeriodicTable() +{ + clear(); +} + +AtomType* PeriodicTable::name(const string& s) +{ + map::iterator ii; + ii = name_index.find(s); + if (ii == name_index.end()) + { + ostringstream emsg; + emsg << "Element or isotope '" << s << "' is not defined."; + throw runtime_error(emsg.str()); + } + return ii->second; +} + +AtomType* PeriodicTable::symbol(const string& s) +{ + map::iterator ii; + ii = symbol_index.find(s); + if (ii == symbol_index.end()) + { + ostringstream emsg; + emsg << "Element or isotope '" << s << "' is not defined."; + throw runtime_error(emsg.str()); + } + return ii->second; +} + +AtomType* PeriodicTable::lookup(string s) +{ + // force standard case + string::iterator sii = find_if(s.begin(), s.end(), isalphachar); + if (sii != s.end()) + { + *sii = toupper(*sii); + for (sii++; sii != s.end(); ++sii) *sii = tolower(*sii); + } + map::iterator ii; + ii = symbol_index.find(s); + if ( ii == symbol_index.end() && + (ii = name_index.find(s)) == name_index.end() ) + { + ostringstream emsg; + emsg << "Element or isotope '" << s << "' is not defined."; + throw runtime_error(emsg.str()); + } + return ii->second; +} + +bool PeriodicTable::has(const std::string& s) +{ + bool rv; + try + { + lookup(s); + rv = true; + } + catch(runtime_error) + { + rv = false; + } + return rv; +} + +void PeriodicTable::defAtomType(const AtomType& atp) +{ + // check if already defined + if (symbol_index.count(atp.symbol)) + { + ostringstream emsg; + emsg << "Element symbol '" << atp.symbol + << "' already defined."; + throw runtime_error(emsg.str()); + } + if (name_index.count(atp.name)) + { + ostringstream emsg; + emsg << "Element name '" << atp.name + << "' already defined."; + throw runtime_error(emsg.str()); + } + // all should be fine here + pt_backup.push_back(new AtomType(atp)); + AtomType* newatp = new AtomType(atp); + pt_public.push_back(newatp); + symbol_index[newatp->symbol] = newatp; + name_index[newatp->name] = newatp; +} + +void PeriodicTable::deleteAtomType(const AtomType* atp) +{ + deque::iterator ii; + ii = find(pt_public.begin(), pt_public.end(), atp); + if (ii == pt_public.end()) return; + // here we need to free and remove atp related data + symbol_index.erase(atp->symbol); + name_index.erase(atp->name); + size_t idx = ii - pt_public.begin(); + delete pt_public[idx]; pt_public.erase(pt_public.begin() + idx); + delete pt_backup[idx]; pt_backup.erase(pt_backup.begin() + idx); +} + +void PeriodicTable::reset(AtomType* atp) +{ + deque::iterator ii; + if (!count(pt_backup.begin(), pt_backup.end(), atp)) + { + ostringstream emsg; + emsg << "Element '" << atp->symbol << "' is not defined."; + throw runtime_error(emsg.str()); + } + size_t idx = ii - pt_backup.begin(); + *(pt_public[idx]) = *(pt_backup[idx]); +} + +void PeriodicTable::resetAll() +{ + deque::iterator iipub = pt_public.begin(); + deque::iterator iibak = pt_backup.begin(); + for ( ; iipub != pt_public.end(); ++iipub, ++iibak) + { + **iipub = **iibak; + } +} + +void PeriodicTable::init() +{ + // load element data to pt_backup + fill_pt_backup(); + // make public copy and initialize lookup maps + pt_public.resize(pt_backup.size()); + // fill in lookup map + deque::iterator iipub = pt_public.begin(); + deque::iterator iibak = pt_backup.begin(); + for ( ; iipub != pt_public.end(); ++iipub, ++iibak) + { + *iipub = new AtomType(**iibak); + symbol_index[(*iipub)->symbol] = *iipub; + name_index[(*iipub)->name] = *iipub; + } + // add standard symbols for deuterium and tritium + symbol_index["2-H"] = lookup("D"); + symbol_index["3-H"] = lookup("T"); +} + +void PeriodicTable::clear() +{ + deque::iterator iipub = pt_public.begin(); + deque::iterator iibak = pt_backup.begin(); + for ( ; iipub != pt_public.end(); ++iipub, ++iibak) + { + delete *iipub; *iipub = NULL; + delete *iibak; *iibak = NULL; + } + pt_public.clear(); + pt_backup.clear(); +} + +void PeriodicTable::fill_pt_backup() +{ + // Refs: + // 1. Albert-Jose Dianoux, Gerry Lander, Neutron Data Booklet, + // Second Edition, ILL 2003 + // 2. ionic radii: http://www.fhi-berlin.mpg.de/th/balsac/balm.47.html + AtomType* atp; + AtomType* itp; + // hydrogen + atp = *pt_backup.insert(pt_backup.end(), new AtomType()); + { + atp->symbol = "H"; + atp->name = "Hydrogen"; + atp->z = 1; + atp->M = 1.007947; + atp->radius = 0.4350; + atp->xsf = 1.0; + atp->nsf = -3.7409; + // isotopes + // 1-hydrogen + itp = new AtomType(*atp); + itp->symbol = "1-H"; + itp->name = "1-Hydrogen"; + itp->isotope = true; + itp->M = 1.0078250321; + itp->nsf = -3.7423; + pt_backup.push_back(itp); + // deuterium + itp = new AtomType(*atp); + itp->symbol = "D"; + itp->name = "Deuterium"; + itp->isotope = true; + itp->M = 2.0141017780; + itp->nsf = 6.674; + pt_backup.push_back(itp); + // tritium + itp = new AtomType(*atp); + itp->symbol = "T"; + itp->name = "Tritium"; + itp->isotope = true; + itp->M = 3.0160492675; + itp->nsf = 4.792; + pt_backup.push_back(itp); + } + // helium + atp = *pt_backup.insert(pt_backup.end(), new AtomType()); + { + atp->symbol = "He"; + atp->name = "Helium"; + atp->z = 2; + atp->M = 4.0026022; + atp->radius = 1.4000; + atp->xsf = 2.0; + atp->nsf = 3.263; + // isotopes + // 3-helium + itp = new AtomType(*atp); + itp->symbol = "3-He"; + itp->name = "3-Helium"; + itp->isotope = true; + itp->M = 3.0160293097; + itp->nsf = 5.74; + pt_backup.push_back(itp); + // 4-helium + itp = new AtomType(*atp); + itp->symbol = "4-He"; + itp->name = "4-Helium"; + itp->isotope = true; + itp->M = 4.0026032497; + itp->nsf = 3.26; + pt_backup.push_back(itp); + } + // lithium + atp = *pt_backup.insert(pt_backup.end(), new AtomType()); + { + atp->symbol = "Li"; + atp->name = "Lithium"; + atp->z = 3; + atp->M = 6.9412; + atp->radius = 1.5199; + atp->xsf = 3.0; + atp->nsf = -1.903; + // isotopes + // 6-lithium + itp = new AtomType(*atp); + itp->symbol = "6-Li"; + itp->name = "6-Lithium"; + itp->isotope = true; + itp->M = 6.0151223; + itp->nsf = 2.0; + pt_backup.push_back(itp); + // 7-lithium + itp = new AtomType(*atp); + itp->symbol = "7-Li"; + itp->name = "7-Lithium"; + itp->isotope = true; + itp->M = 7.0160040; + itp->nsf = -2.22; + pt_backup.push_back(itp); + } + // beryllium + atp = *pt_backup.insert(pt_backup.end(), new AtomType()); + { + atp->symbol = "Be"; + atp->name = "Beryllium"; + atp->z = 4; + atp->M = 9.0121823; + atp->radius = 1.1430; + atp->xsf = 4.0; + atp->nsf = 7.791; + } + // boron + atp = *pt_backup.insert(pt_backup.end(), new AtomType()); + { + atp->symbol = "B"; + atp->name = "Boron"; + atp->z = 5; + atp->M = 10.8117; + atp->radius = 0.9750; + atp->xsf = 5.0; + atp->nsf = 5.304; + // isotopes + // 10-boron + itp = new AtomType(*atp); + itp->symbol = "10-B"; + itp->name = "10-Boron"; + itp->isotope = true; + itp->M = 10.0129370; + itp->nsf = -0.2; + pt_backup.push_back(itp); + // 11-boron + itp = new AtomType(*atp); + itp->symbol = "11-B"; + itp->name = "11-Boron"; + itp->isotope = true; + itp->M = 11.0093055; + itp->nsf = 6.65; + pt_backup.push_back(itp); + } + // carbon + atp = *pt_backup.insert(pt_backup.end(), new AtomType()); + { + atp->symbol = "C"; + atp->name = "Carbon"; + atp->z = 6; + atp->M = 12.01078; + atp->radius = 0.6550; + atp->xsf = 6.0; + atp->nsf = 6.648413; + // isotopes + // 12-carbon + itp = new AtomType(*atp); + itp->symbol = "12-C"; + itp->name = "12-Carbon"; + itp->isotope = true; + itp->M = 12.0; + itp->nsf = 6.6535; + pt_backup.push_back(itp); + // 13-carbon + itp = new AtomType(*atp); + itp->symbol = "13-C"; + itp->name = "13-Carbon"; + itp->isotope = true; + itp->M = 13.0033548378; + itp->nsf = 6.19; + pt_backup.push_back(itp); + } + // nitrogen + atp = *pt_backup.insert(pt_backup.end(), new AtomType()); + { + atp->symbol = "N"; + atp->name = "Nitrogen"; + atp->z = 7; + atp->M = 14.00672; + atp->radius = 0.7500; + atp->xsf = 7.0; + atp->nsf = 9.36; + // isotopes + // 14-nitrogen + itp = new AtomType(*atp); + itp->symbol = "14-N"; + itp->name = "14-Nitrogen"; + itp->isotope = true; + itp->M = 14.0030740052; + itp->nsf = 9.37; + pt_backup.push_back(itp); + // 15-nitrogen + itp = new AtomType(*atp); + itp->symbol = "15-N"; + itp->name = "15-Nitrogen"; + itp->isotope = true; + itp->M = 15.0001088984; + itp->nsf = 6.44; + pt_backup.push_back(itp); + } + // oxygen + atp = *pt_backup.insert(pt_backup.end(), new AtomType()); + { + atp->symbol = "O"; + atp->name = "Oxygen"; + atp->z = 8; + atp->M = 15.99943; + atp->radius = 0.7300; + atp->xsf = 8.0; + atp->nsf = 5.8054; + // isotopes + // 16-oxygen + itp = new AtomType(*atp); + itp->symbol = "16-O"; + itp->name = "16-Oxygen"; + itp->isotope = true; + itp->M = 15.9949146221; + itp->nsf = 5.805; + pt_backup.push_back(itp); + // 17-oxygen + itp = new AtomType(*atp); + itp->symbol = "17-O"; + itp->name = "17-Oxygen"; + itp->isotope = true; + itp->M = 16.99913150; + itp->nsf = 5.6; + pt_backup.push_back(itp); + // 18-oxygen + itp = new AtomType(*atp); + itp->symbol = "18-O"; + itp->name = "18-Oxygen"; + itp->isotope = true; + itp->M = 17.9991604; + itp->nsf = 5.84; + pt_backup.push_back(itp); + } + // fluorine + atp = *pt_backup.insert(pt_backup.end(), new AtomType()); + { + atp->symbol = "F"; + atp->name = "Fluorine"; + atp->z = 9; + atp->M = 18.99840325; + atp->radius = 0.7200; + atp->xsf = 9.0; + atp->nsf = 5.65412; + } + // neon + atp = *pt_backup.insert(pt_backup.end(), new AtomType()); + { + atp->symbol = "Ne"; + atp->name = "Neon"; + atp->z = 10; + atp->M = 20.17976; + atp->radius = 1.6000; + atp->xsf = 10.0; + atp->nsf = 4.5666; + // isotopes + // 20-neon + itp = new AtomType(*atp); + itp->symbol = "20-Ne"; + itp->name = "20-Neon"; + itp->isotope = true; + itp->M = 19.9924401759; + itp->nsf = 4.631; + pt_backup.push_back(itp); + // 21-neon + itp = new AtomType(*atp); + itp->symbol = "21-Ne"; + itp->name = "21-Neon"; + itp->isotope = true; + itp->M = 20.99384674; + itp->nsf = 6.66; + pt_backup.push_back(itp); + // 22-neon + itp = new AtomType(*atp); + itp->symbol = "22-Ne"; + itp->name = "22-Neon"; + itp->isotope = true; + itp->M = 21.99138551; + itp->nsf = 3.87; + pt_backup.push_back(itp); + } + // sodium + atp = *pt_backup.insert(pt_backup.end(), new AtomType()); + { + atp->symbol = "Na"; + atp->name = "Sodium"; + atp->z = 11; + atp->M = 22.9897702; + atp->radius = 1.8579; + atp->xsf = 11.0; + atp->nsf = 3.632; + } + // magnesium + atp = *pt_backup.insert(pt_backup.end(), new AtomType()); + { + atp->symbol = "Mg"; + atp->name = "Magnesium"; + atp->z = 12; + atp->M = 24.30506; + atp->radius = 1.6047; + atp->xsf = 12.0; + atp->nsf = 5.3754; + // isotopes + // 24-magnesium + itp = new AtomType(*atp); + itp->symbol = "24-Mg"; + itp->name = "24-Magnesium"; + itp->isotope = true; + itp->M = 23.98504190; + itp->nsf = 5.49; + pt_backup.push_back(itp); + // 25-magnesium + itp = new AtomType(*atp); + itp->symbol = "25-Mg"; + itp->name = "25-Magnesium"; + itp->isotope = true; + itp->M = 24.98583702; + itp->nsf = 3.62; + pt_backup.push_back(itp); + // 26-magnesium + itp = new AtomType(*atp); + itp->symbol = "26-Mg"; + itp->name = "26-Magnesium"; + itp->isotope = true; + itp->M = 25.98259304; + itp->nsf = 4.89; + pt_backup.push_back(itp); + } + // aluminium + atp = *pt_backup.insert(pt_backup.end(), new AtomType()); + { + atp->symbol = "Al"; + atp->name = "Aluminium"; + atp->z = 13; + atp->M = 26.9815382; + atp->radius = 1.4318; + atp->xsf = 13.0; + atp->nsf = 3.4495; + } + // silicon + atp = *pt_backup.insert(pt_backup.end(), new AtomType()); + { + atp->symbol = "Si"; + atp->name = "Silicon"; + atp->z = 14; + atp->M = 28.08553; + atp->radius = 1.1758; + atp->xsf = 14.0; + atp->nsf = 4.15071; + // isotopes + // 28-silicon + itp = new AtomType(*atp); + itp->symbol = "28-Si"; + itp->name = "28-Silicon"; + itp->isotope = true; + itp->M = 27.9769265327; + itp->nsf = 4.106; + pt_backup.push_back(itp); + // 29-silicon + itp = new AtomType(*atp); + itp->symbol = "29-Si"; + itp->name = "29-Silicon"; + itp->isotope = true; + itp->M = 28.97649472; + itp->nsf = 4.7; + pt_backup.push_back(itp); + // 30-silicon + itp = new AtomType(*atp); + itp->symbol = "30-Si"; + itp->name = "30-Silicon"; + itp->isotope = true; + itp->M = 29.97377022; + itp->nsf = 4.58; + pt_backup.push_back(itp); + } + // phosphorus + atp = *pt_backup.insert(pt_backup.end(), new AtomType()); + { + atp->symbol = "P"; + atp->name = "Phosphorus"; + atp->z = 15; + atp->M = 30.9737612; + atp->radius = 1.0600; + atp->xsf = 15.0; + atp->nsf = 5.131; + } + // sulfur + atp = *pt_backup.insert(pt_backup.end(), new AtomType()); + { + atp->symbol = "S"; + atp->name = "Sulfur"; + atp->z = 16; + atp->M = 32.0655; + atp->radius = 1.0200; + atp->xsf = 16.0; + atp->nsf = 2.8471; + // isotopes + // 32-sulfur + itp = new AtomType(*atp); + itp->symbol = "32-S"; + itp->name = "32-Sulfur"; + itp->isotope = true; + itp->M = 31.97207069; + itp->nsf = 2.804; + pt_backup.push_back(itp); + // 33-sulfur + itp = new AtomType(*atp); + itp->symbol = "33-S"; + itp->name = "33-Sulfur"; + itp->isotope = true; + itp->M = 32.97145850; + itp->nsf = 4.74; + pt_backup.push_back(itp); + // 34-sulfur + itp = new AtomType(*atp); + itp->symbol = "34-S"; + itp->name = "34-Sulfur"; + itp->isotope = true; + itp->M = 33.96786683; + itp->nsf = 3.48; + pt_backup.push_back(itp); + // 36-sulfur + itp = new AtomType(*atp); + itp->symbol = "36-S"; + itp->name = "36-Sulfur"; + itp->isotope = true; + itp->M = 35.96708088; + itp->nsf = 3.0; + pt_backup.push_back(itp); + } + // chlorine + atp = *pt_backup.insert(pt_backup.end(), new AtomType()); + { + atp->symbol = "Cl"; + atp->name = "Chlorine"; + atp->z = 17; + atp->M = 35.4532; + atp->radius = 0.9900; + atp->xsf = 17.0; + atp->nsf = 9.57928; + // isotopes + // 35-chlorine + itp = new AtomType(*atp); + itp->symbol = "35-Cl"; + itp->name = "35-Chlorine"; + itp->isotope = true; + itp->M = 34.96885271; + itp->nsf = 11.7; + pt_backup.push_back(itp); + // 37-chlorine + itp = new AtomType(*atp); + itp->symbol = "37-Cl"; + itp->name = "37-Chlorine"; + itp->isotope = true; + itp->M = 36.96590260; + itp->nsf = 3.08; + pt_backup.push_back(itp); + } + // argon + atp = *pt_backup.insert(pt_backup.end(), new AtomType()); + { + atp->symbol = "Ar"; + atp->name = "Argon"; + atp->z = 18; + atp->M = 39.9481; + atp->radius = 1.9000; + atp->xsf = 18.0; + atp->nsf = 1.9096; + // isotopes + // 36-argon + itp = new AtomType(*atp); + itp->symbol = "36-Ar"; + itp->name = "36-Argon"; + itp->isotope = true; + itp->M = 35.96754628; + itp->nsf = 24.9; + pt_backup.push_back(itp); + // 38-argon + itp = new AtomType(*atp); + itp->symbol = "38-Ar"; + itp->name = "38-Argon"; + itp->isotope = true; + itp->M = 37.9627322; + itp->nsf = 3.5; + pt_backup.push_back(itp); + // 40-argon + itp = new AtomType(*atp); + itp->symbol = "40-Ar"; + itp->name = "40-Argon"; + itp->isotope = true; + itp->M = 39.962383123; + itp->nsf = 1.7; + pt_backup.push_back(itp); + } + // potassium + atp = *pt_backup.insert(pt_backup.end(), new AtomType()); + { + atp->symbol = "K"; + atp->name = "Potassium"; + atp->z = 19; + atp->M = 39.09831; + atp->radius = 2.2620; + atp->xsf = 19.0; + atp->nsf = 3.672; + // isotopes + // 39-potassium + itp = new AtomType(*atp); + itp->symbol = "39-K"; + itp->name = "39-Potassium"; + itp->isotope = true; + itp->M = 38.9637069; + itp->nsf = 3.79; + pt_backup.push_back(itp); + // 40-potassium + itp = new AtomType(*atp); + itp->symbol = "40-K"; + itp->name = "40-Potassium"; + itp->isotope = true; + itp->M = 39.96399867; + itp->nsf = 3.1; + pt_backup.push_back(itp); + // 41-potassium + itp = new AtomType(*atp); + itp->symbol = "41-K"; + itp->name = "41-Potassium"; + itp->isotope = true; + itp->M = 40.96182597; + itp->nsf = 2.69; + pt_backup.push_back(itp); + } + // calcium + atp = *pt_backup.insert(pt_backup.end(), new AtomType()); + { + atp->symbol = "Ca"; + atp->name = "Calcium"; + atp->z = 20; + atp->M = 40.0784; + atp->radius = 1.9758; + atp->xsf = 20.0; + atp->nsf = 4.702; + // isotopes + // 40-calcium + itp = new AtomType(*atp); + itp->symbol = "40-Ca"; + itp->name = "40-Calcium"; + itp->isotope = true; + itp->M = 39.9625912; + itp->nsf = 4.78; + pt_backup.push_back(itp); + // 42-calcium + itp = new AtomType(*atp); + itp->symbol = "42-Ca"; + itp->name = "42-Calcium"; + itp->isotope = true; + itp->M = 41.9586183; + itp->nsf = 3.36; + pt_backup.push_back(itp); + // 43-calcium + itp = new AtomType(*atp); + itp->symbol = "43-Ca"; + itp->name = "43-Calcium"; + itp->isotope = true; + itp->M = 42.9587668; + itp->nsf = -1.56; + pt_backup.push_back(itp); + // 44-calcium + itp = new AtomType(*atp); + itp->symbol = "44-Ca"; + itp->name = "44-Calcium"; + itp->isotope = true; + itp->M = 43.9554811; + itp->nsf = 1.42; + pt_backup.push_back(itp); + // 46-calcium + itp = new AtomType(*atp); + itp->symbol = "46-Ca"; + itp->name = "46-Calcium"; + itp->isotope = true; + itp->M = 45.9536928; + itp->nsf = 3.55; + pt_backup.push_back(itp); + // 48-calcium + itp = new AtomType(*atp); + itp->symbol = "48-Ca"; + itp->name = "48-Calcium"; + itp->isotope = true; + itp->M = 47.952534; + itp->nsf = 0.39; + pt_backup.push_back(itp); + } + // scandium + atp = *pt_backup.insert(pt_backup.end(), new AtomType()); + { + atp->symbol = "Sc"; + atp->name = "Scandium"; + atp->z = 21; + atp->M = 44.9559108; + atp->radius = 1.6545; + atp->xsf = 21.0; + atp->nsf = 12.11; + } + // titanium + atp = *pt_backup.insert(pt_backup.end(), new AtomType()); + { + atp->symbol = "Ti"; + atp->name = "Titanium"; + atp->z = 22; + atp->M = 47.8671; + atp->radius = 1.4755; + atp->xsf = 22.0; + atp->nsf = -3.37013; + // isotopes + // 46-titanium + itp = new AtomType(*atp); + itp->symbol = "46-Ti"; + itp->name = "46-Titanium"; + itp->isotope = true; + itp->M = 45.9526295; + itp->nsf = 4.72; + pt_backup.push_back(itp); + // 47-titanium + itp = new AtomType(*atp); + itp->symbol = "47-Ti"; + itp->name = "47-Titanium"; + itp->isotope = true; + itp->M = 46.9517638; + itp->nsf = 3.53; + pt_backup.push_back(itp); + // 48-titanium + itp = new AtomType(*atp); + itp->symbol = "48-Ti"; + itp->name = "48-Titanium"; + itp->isotope = true; + itp->M = 47.9479471; + itp->nsf = -5.86; + pt_backup.push_back(itp); + // 49-titanium + itp = new AtomType(*atp); + itp->symbol = "49-Ti"; + itp->name = "49-Titanium"; + itp->isotope = true; + itp->M = 48.9478708; + itp->nsf = 0.98; + pt_backup.push_back(itp); + // 50-titanium + itp = new AtomType(*atp); + itp->symbol = "50-Ti"; + itp->name = "50-Titanium"; + itp->isotope = true; + itp->M = 49.9447921; + itp->nsf = 5.88; + pt_backup.push_back(itp); + } + // vanadium + atp = *pt_backup.insert(pt_backup.end(), new AtomType()); + { + atp->symbol = "V"; + atp->name = "Vanadium"; + atp->z = 23; + atp->M = 50.94151; + atp->radius = 1.3090; + atp->xsf = 23.0; + atp->nsf = -0.44314; + // isotopes + // 50-vanadium + itp = new AtomType(*atp); + itp->symbol = "50-V"; + itp->name = "50-Vanadium"; + itp->isotope = true; + itp->M = 49.9471628; + itp->nsf = 7.6; + pt_backup.push_back(itp); + // 51-vanadium + itp = new AtomType(*atp); + itp->symbol = "51-V"; + itp->name = "51-Vanadium"; + itp->isotope = true; + itp->M = 50.9439637; + itp->nsf = -0.402; + pt_backup.push_back(itp); + } + // chromium + atp = *pt_backup.insert(pt_backup.end(), new AtomType()); + { + atp->symbol = "Cr"; + atp->name = "Chromium"; + atp->z = 24; + atp->M = 51.99616; + atp->radius = 1.2490; + atp->xsf = 24.0; + atp->nsf = 3.6357; + // isotopes + // 50-chromium + itp = new AtomType(*atp); + itp->symbol = "50-Cr"; + itp->name = "50-Chromium"; + itp->isotope = true; + itp->M = 49.9460496; + itp->nsf = -4.50; + pt_backup.push_back(itp); + // 52-chromium + itp = new AtomType(*atp); + itp->symbol = "52-Cr"; + itp->name = "52-Chromium"; + itp->isotope = true; + itp->M = 51.9405119; + itp->nsf = 4.914; + pt_backup.push_back(itp); + // 0-chromium + itp = new AtomType(*atp); + itp->symbol = "53-Cr"; + itp->name = "53-Chromium"; + itp->isotope = true; + itp->M = 52.9406538; + itp->nsf = -4.20; + pt_backup.push_back(itp); + // 54-chromium + itp = new AtomType(*atp); + itp->symbol = "54-Cr"; + itp->name = "54-Chromium"; + itp->isotope = true; + itp->M = 53.9388849; + itp->nsf = 4.55; + pt_backup.push_back(itp); + } + // manganese + atp = *pt_backup.insert(pt_backup.end(), new AtomType()); + { + atp->symbol = "Mn"; + atp->name = "Manganese"; + atp->z = 25; + atp->M = 54.9380499; + atp->radius = 1.3500; + atp->xsf = 25.0; + atp->nsf = -3.75018; + } + // iron + atp = *pt_backup.insert(pt_backup.end(), new AtomType()); + { + atp->symbol = "Fe"; + atp->name = "Iron"; + atp->z = 26; + atp->M = 55.8452; + atp->radius = 1.2411; + atp->xsf = 26.0; + atp->nsf = 9.452; + // isotopes + // 54-iron + itp = new AtomType(*atp); + itp->symbol = "54-Fe"; + itp->name = "54-Iron"; + itp->isotope = true; + itp->M = 53.9396148; + itp->nsf = 4.2; + pt_backup.push_back(itp); + // 56-iron + itp = new AtomType(*atp); + itp->symbol = "56-Fe"; + itp->name = "56-Iron"; + itp->isotope = true; + itp->M = 55.9349421; + itp->nsf = 10.1; + pt_backup.push_back(itp); + // 57-iron + itp = new AtomType(*atp); + itp->symbol = "57-Fe"; + itp->name = "57-Iron"; + itp->isotope = true; + itp->M = 56.9353987; + itp->nsf = 2.3; + pt_backup.push_back(itp); + // 58-iron + itp = new AtomType(*atp); + itp->symbol = "58-Fe"; + itp->name = "58-Iron"; + itp->isotope = true; + itp->M = 57.9332805; + itp->nsf = 15; + pt_backup.push_back(itp); + } + // cobalt + atp = *pt_backup.insert(pt_backup.end(), new AtomType()); + { + atp->symbol = "Co"; + atp->name = "Cobalt"; + atp->z = 27; + atp->M = 58.9332009; + atp->radius = 1.2535; + atp->xsf = 27.0; + atp->nsf = 2.492; + } + // nickel + atp = *pt_backup.insert(pt_backup.end(), new AtomType()); + { + atp->symbol = "Ni"; + atp->name = "Nickel"; + atp->z = 28; + atp->M = 58.69342; + atp->radius = 1.2460; + atp->xsf = 28.0; + atp->nsf = 10.31; + // isotopes + // 58-nickel + itp = new AtomType(*atp); + itp->symbol = "58-Ni"; + itp->name = "58-Nickel"; + itp->isotope = true; + itp->M = 57.9353479; + itp->nsf = 14.4; + pt_backup.push_back(itp); + // 60-nickel + itp = new AtomType(*atp); + itp->symbol = "60-Ni"; + itp->name = "60-Nickel"; + itp->isotope = true; + itp->M = 59.9307906; + itp->nsf = 2.8; + pt_backup.push_back(itp); + // 61-nickel + itp = new AtomType(*atp); + itp->symbol = "61-Ni"; + itp->name = "61-Nickel"; + itp->isotope = true; + itp->M = 60.9310604; + itp->nsf = 7.60; + pt_backup.push_back(itp); + // 62-nickel + itp = new AtomType(*atp); + itp->symbol = "62-Ni"; + itp->name = "62-Nickel"; + itp->isotope = true; + itp->M = 61.9283488; + itp->nsf = -8.7; + pt_backup.push_back(itp); + // 64-nickel + itp = new AtomType(*atp); + itp->symbol = "64-Ni"; + itp->name = "64-Nickel"; + itp->isotope = true; + itp->M = 63.9279696; + itp->nsf = -0.37; + pt_backup.push_back(itp); + } + // copper + atp = *pt_backup.insert(pt_backup.end(), new AtomType()); + { + atp->symbol = "Cu"; + atp->name = "Copper"; + atp->z = 29; + atp->M = 63.5463; + atp->radius = 1.2780; + atp->xsf = 29.0; + atp->nsf = 7.7184; + // isotopes + // 63-copper + itp = new AtomType(*atp); + itp->symbol = "63-Cu"; + itp->name = "63-Copper"; + itp->isotope = true; + itp->M = 62.9296011; + itp->nsf = 6.477; + pt_backup.push_back(itp); + // 65-copper + itp = new AtomType(*atp); + itp->symbol = "65-Cu"; + itp->name = "65-Copper"; + itp->isotope = true; + itp->M = 64.9277937; + itp->nsf = 10.204; + pt_backup.push_back(itp); + } + // zinc + atp = *pt_backup.insert(pt_backup.end(), new AtomType()); + { + atp->symbol = "Zn"; + atp->name = "Zinc"; + atp->z = 30; + atp->M = 65.4094; + atp->radius = 1.3325; + atp->xsf = 30.0; + atp->nsf = 5.6805; + // isotopes + // 64-zinc + itp = new AtomType(*atp); + itp->symbol = "64-Zn"; + itp->name = "64-Zinc"; + itp->isotope = true; + itp->M = 63.9291466; + itp->nsf = 5.23; + pt_backup.push_back(itp); + // 66-zinc + itp = new AtomType(*atp); + itp->symbol = "66-Zn"; + itp->name = "66-Zinc"; + itp->isotope = true; + itp->M = 65.9260368; + itp->nsf = 5.98; + pt_backup.push_back(itp); + // 67-zinc + itp = new AtomType(*atp); + itp->symbol = "67-Zn"; + itp->name = "67-Zinc"; + itp->isotope = true; + itp->M = 66.9271309; + itp->nsf = 7.58; + pt_backup.push_back(itp); + // 68-zinc + itp = new AtomType(*atp); + itp->symbol = "68-Zn"; + itp->name = "68-Zinc"; + itp->isotope = true; + itp->M = 67.9248476; + itp->nsf = 6.04; + pt_backup.push_back(itp); + // 70-zinc + itp = new AtomType(*atp); + itp->symbol = "70-Zn"; + itp->name = "70-Zinc"; + itp->isotope = true; + itp->M = 69.925325; + itp->nsf = 6.9; + pt_backup.push_back(itp); + } + // gallium + atp = *pt_backup.insert(pt_backup.end(), new AtomType()); + { + atp->symbol = "Ga"; + atp->name = "Gallium"; + atp->z = 31; + atp->M = 69.7231; + atp->radius = 1.3501; + atp->xsf = 31.0; + atp->nsf = 7.2882; + // isotopes + // 69-gallium + itp = new AtomType(*atp); + itp->symbol = "69-Ga"; + itp->name = "69-Gallium"; + itp->isotope = true; + itp->M = 68.925581; + itp->nsf = 8.043; + pt_backup.push_back(itp); + // 71-gallium + itp = new AtomType(*atp); + itp->symbol = "71-Ga"; + itp->name = "71-Gallium"; + itp->isotope = true; + itp->M = 70.9247050; + itp->nsf = 6.170; + pt_backup.push_back(itp); + } + // germanium + atp = *pt_backup.insert(pt_backup.end(), new AtomType()); + { + atp->symbol = "Ge"; + atp->name = "Germanium"; + atp->z = 32; + atp->M = 72.641; + atp->radius = 1.2248; + atp->xsf = 32.0; + atp->nsf = 8.18520; + // isotopes + // 70-germanium + itp = new AtomType(*atp); + itp->symbol = "70-Ge"; + itp->name = "70-Germanium"; + itp->isotope = true; + itp->M = 69.9242504; + itp->nsf = 10.0; + pt_backup.push_back(itp); + // 72-germanium + itp = new AtomType(*atp); + itp->symbol = "72-Ge"; + itp->name = "72-Germanium"; + itp->isotope = true; + itp->M = 71.9220762; + itp->nsf = 8.51; + pt_backup.push_back(itp); + // 73-germanium + itp = new AtomType(*atp); + itp->symbol = "73-Ge"; + itp->name = "73-Germanium"; + itp->isotope = true; + itp->M = 72.9234594; + itp->nsf = 5.02; + pt_backup.push_back(itp); + // 74-germanium + itp = new AtomType(*atp); + itp->symbol = "74-Ge"; + itp->name = "74-Germanium"; + itp->isotope = true; + itp->M = 73.9211782; + itp->nsf = 7.58; + pt_backup.push_back(itp); + // 76-germanium + itp = new AtomType(*atp); + itp->symbol = "76-Ge"; + itp->name = "76-Germanium"; + itp->isotope = true; + itp->M = 75.9214027; + itp->nsf = 8.2; + pt_backup.push_back(itp); + } + // arsenic + atp = *pt_backup.insert(pt_backup.end(), new AtomType()); + { + atp->symbol = "As"; + atp->name = "Arsenic"; + atp->z = 33; + atp->M = 74.921602; + atp->radius = 1.2000; + atp->xsf = 33.0; + atp->nsf = 6.581; + } + // selenium + atp = *pt_backup.insert(pt_backup.end(), new AtomType()); + { + atp->symbol = "Se"; + atp->name = "Selenium"; + atp->z = 34; + atp->M = 78.963; + atp->radius = 1.1600; + atp->xsf = 34.0; + atp->nsf = 7.9709; + // isotopes + // 74-selenium + itp = new AtomType(*atp); + itp->symbol = "74-Se"; + itp->name = "74-Selenium"; + itp->isotope = true; + itp->M = 73.9224766; + itp->nsf = 0.8; + pt_backup.push_back(itp); + // 76-selenium + itp = new AtomType(*atp); + itp->symbol = "76-Se"; + itp->name = "76-Selenium"; + itp->isotope = true; + itp->M = 75.9192141; + itp->nsf = 12.2; + pt_backup.push_back(itp); + // 77-selenium + itp = new AtomType(*atp); + itp->symbol = "77-Se"; + itp->name = "77-Selenium"; + itp->isotope = true; + itp->M = 76.9199146; + itp->nsf = 8.25; + pt_backup.push_back(itp); + // 78-selenium + itp = new AtomType(*atp); + itp->symbol = "78-Se"; + itp->name = "78-Selenium"; + itp->isotope = true; + itp->M = 77.9173095; + itp->nsf = 8.24; + pt_backup.push_back(itp); + // 80-selenium + itp = new AtomType(*atp); + itp->symbol = "80-Se"; + itp->name = "80-Selenium"; + itp->isotope = true; + itp->M = 79.9165218; + itp->nsf = 7.48; + pt_backup.push_back(itp); + // 82-selenium + itp = new AtomType(*atp); + itp->symbol = "82-Se"; + itp->name = "82-Selenium"; + itp->isotope = true; + itp->M = 81.9167000; + itp->nsf = 6.34; + pt_backup.push_back(itp); + } + // bromine + atp = *pt_backup.insert(pt_backup.end(), new AtomType()); + { + atp->symbol = "Br"; + atp->name = "Bromine"; + atp->z = 35; + atp->M = 79.9041; + atp->radius = 1.1400; + atp->xsf = 35.0; + atp->nsf = 6.792; + // isotopes + // 79-bromine + itp = new AtomType(*atp); + itp->symbol = "79-Br"; + itp->name = "79-Bromine"; + itp->isotope = true; + itp->M = 78.9183376; + itp->nsf = 6.79; + pt_backup.push_back(itp); + // 81-bromine + itp = new AtomType(*atp); + itp->symbol = "81-Br"; + itp->name = "81-Bromine"; + itp->isotope = true; + itp->M = 80.916291; + itp->nsf = 6.78; + pt_backup.push_back(itp); + } + // krypton + atp = *pt_backup.insert(pt_backup.end(), new AtomType()); + { + atp->symbol = "Kr"; + atp->name = "Krypton"; + atp->z = 36; + atp->M = 83.7982; + atp->radius = 2.0000; + atp->xsf = 36.0; + atp->nsf = 7.812; + // isotopes + // 86-krypton + itp = new AtomType(*atp); + itp->symbol = "86-Kr"; + itp->name = "86-Krypton"; + itp->isotope = true; + itp->M = 85.9106103; + itp->nsf = 8.07; + pt_backup.push_back(itp); + } + // rubidium + atp = *pt_backup.insert(pt_backup.end(), new AtomType()); + { + atp->symbol = "Rb"; + atp->name = "Rubidium"; + atp->z = 37; + atp->M = 85.46783; + atp->radius = 2.4700; + atp->xsf = 37.0; + atp->nsf = 7.082; + // isotopes + // 85-rubidium + itp = new AtomType(*atp); + itp->symbol = "85-Rb"; + itp->name = "85-Rubidium"; + itp->isotope = true; + itp->M = 84.9117893; + itp->nsf = 7.07; + pt_backup.push_back(itp); + // 87-rubidium + itp = new AtomType(*atp); + itp->symbol = "87-Rb"; + itp->name = "87-Rubidium"; + itp->isotope = true; + itp->M = 86.9091835; + itp->nsf = 7.27; + pt_backup.push_back(itp); + } + // strontium + atp = *pt_backup.insert(pt_backup.end(), new AtomType()); + { + atp->symbol = "Sr"; + atp->name = "Strontium"; + atp->z = 38; + atp->M = 87.621; + atp->radius = 2.1513; + atp->xsf = 38.0; + atp->nsf = 7.022; + // isotopes + // 84-strontium + itp = new AtomType(*atp); + itp->symbol = "84-Sr"; + itp->name = "84-Strontium"; + itp->isotope = true; + itp->M = 83.913425; + itp->nsf = 5.0; + pt_backup.push_back(itp); + // 86-strontium + itp = new AtomType(*atp); + itp->symbol = "86-Sr"; + itp->name = "86-Strontium"; + itp->isotope = true; + itp->M = 85.9092624; + itp->nsf = 5.68; + pt_backup.push_back(itp); + // 87-strontium + itp = new AtomType(*atp); + itp->symbol = "87-Sr"; + itp->name = "87-Strontium"; + itp->isotope = true; + itp->M = 86.9088793; + itp->nsf = 7.41; + pt_backup.push_back(itp); + // 88-strontium + itp = new AtomType(*atp); + itp->symbol = "88-Sr"; + itp->name = "88-Strontium"; + itp->isotope = true; + itp->M = 87.9056143; + itp->nsf = 7.16; + pt_backup.push_back(itp); + } + // yttrium + atp = *pt_backup.insert(pt_backup.end(), new AtomType()); + { + atp->symbol = "Y"; + atp->name = "Yttrium"; + atp->z = 39; + atp->M = 88.905852; + atp->radius = 1.8237; + atp->xsf = 39.0; + atp->nsf = 7.752; + } + // zirconium + atp = *pt_backup.insert(pt_backup.end(), new AtomType()); + { + atp->symbol = "Zr"; + atp->name = "Zirconium"; + atp->z = 40; + atp->M = 91.2242; + atp->radius = 1.6156; + atp->xsf = 40.0; + atp->nsf = 7.163; + // isotopes + // 90-zirconium + itp = new AtomType(*atp); + itp->symbol = "90-Zr"; + itp->name = "90-Zirconium"; + itp->isotope = true; + itp->M = 89.9047037; + itp->nsf = 6.5; + pt_backup.push_back(itp); + // 91-zirconium + itp = new AtomType(*atp); + itp->symbol = "91-Zr"; + itp->name = "91-Zirconium"; + itp->isotope = true; + itp->M = 90.9056450; + itp->nsf = 8.8; + pt_backup.push_back(itp); + // 92-zirconium + itp = new AtomType(*atp); + itp->symbol = "92-Zr"; + itp->name = "92-Zirconium"; + itp->isotope = true; + itp->M = 91.9050401; + itp->nsf = 7.5; + pt_backup.push_back(itp); + // 94-zirconium + itp = new AtomType(*atp); + itp->symbol = "94-Zr"; + itp->name = "94-Zirconium"; + itp->isotope = true; + itp->M = 93.9063158; + itp->nsf = 8.3; + pt_backup.push_back(itp); + // 96-zirconium + itp = new AtomType(*atp); + itp->symbol = "96-Zr"; + itp->name = "96-Zirconium"; + itp->isotope = true; + itp->M = 95.908276; + itp->nsf = 5.5; + pt_backup.push_back(itp); + } + // niobium + atp = *pt_backup.insert(pt_backup.end(), new AtomType()); + { + atp->symbol = "Nb"; + atp->name = "Niobium"; + atp->z = 41; + atp->M = 92.906382; + atp->radius = 1.4318; + atp->xsf = 41.0; + atp->nsf = 7.0543; + } + // molybdenum + atp = *pt_backup.insert(pt_backup.end(), new AtomType()); + { + atp->symbol = "Mo"; + atp->name = "Molybdenum"; + atp->z = 42; + atp->M = 95.942; + atp->radius = 1.3626; + atp->xsf = 42.0; + atp->nsf = 6.71520; + // isotopes + // 92-molybdenum + itp = new AtomType(*atp); + itp->symbol = "92-Mo"; + itp->name = "92-Molybdenum"; + itp->isotope = true; + itp->M = 91.906810; + itp->nsf = 6.93; + pt_backup.push_back(itp); + // 94-molybdenum + itp = new AtomType(*atp); + itp->symbol = "94-Mo"; + itp->name = "94-Molybdenum"; + itp->isotope = true; + itp->M = 93.9050876; + itp->nsf = 6.82; + pt_backup.push_back(itp); + // 95-molybdenum + itp = new AtomType(*atp); + itp->symbol = "95-Mo"; + itp->name = "95-Molybdenum"; + itp->isotope = true; + itp->M = 94.9058415; + itp->nsf = 6.93; + pt_backup.push_back(itp); + // 96-molybdenum + itp = new AtomType(*atp); + itp->symbol = "96-Mo"; + itp->name = "96-Molybdenum"; + itp->isotope = true; + itp->M = 95.9046789; + itp->nsf = 6.22; + pt_backup.push_back(itp); + // 97-molybdenum + itp = new AtomType(*atp); + itp->symbol = "97-Mo"; + itp->name = "97-Molybdenum"; + itp->isotope = true; + itp->M = 96.9060210; + itp->nsf = 7.26; + pt_backup.push_back(itp); + // 98-molybdenum + itp = new AtomType(*atp); + itp->symbol = "98-Mo"; + itp->name = "98-Molybdenum"; + itp->isotope = true; + itp->M = 97.9054078; + itp->nsf = 6.60; + pt_backup.push_back(itp); + // 100-molybdenum + itp = new AtomType(*atp); + itp->symbol = "100-Mo"; + itp->name = "100-Molybdenum"; + itp->isotope = true; + itp->M = 99.907477; + itp->nsf = 6.75; + pt_backup.push_back(itp); + } + // technetium + atp = *pt_backup.insert(pt_backup.end(), new AtomType()); + { + atp->symbol = "Tc"; + atp->name = "Technetium"; + atp->z = 43; + atp->M = 98.0; + atp->radius = 1.3675; + atp->xsf = 43.0; + atp->nsf = 6.83; + } + // ruthenium + atp = *pt_backup.insert(pt_backup.end(), new AtomType()); + { + atp->symbol = "Ru"; + atp->name = "Ruthenium"; + atp->z = 44; + atp->M = 101.072; + atp->radius = 1.3529; + atp->xsf = 44.0; + atp->nsf = 7.022; + } + // rhodium + atp = *pt_backup.insert(pt_backup.end(), new AtomType()); + { + atp->symbol = "Rh"; + atp->name = "Rhodium"; + atp->z = 45; + atp->M = 102.905502; + atp->radius = 1.3450; + atp->xsf = 45.0; + atp->nsf = 5.904; + } + // palladium + atp = *pt_backup.insert(pt_backup.end(), new AtomType()); + { + atp->symbol = "Pd"; + atp->name = "Palladium"; + atp->z = 46; + atp->M = 106.421; + atp->radius = 1.3755; + atp->xsf = 46.0; + atp->nsf = 5.916; + // isotopes + // 102-palladium + itp = new AtomType(*atp); + itp->symbol = "102-Pd"; + itp->name = "102-Palladium"; + itp->isotope = true; + itp->M = 101.905608; + itp->nsf = 7.7; + pt_backup.push_back(itp); + // 104-palladium + itp = new AtomType(*atp); + itp->symbol = "104-Pd"; + itp->name = "104-Palladium"; + itp->isotope = true; + itp->M = 103.904035; + itp->nsf = 7.7; + pt_backup.push_back(itp); + // 105-palladium + itp = new AtomType(*atp); + itp->symbol = "105-Pd"; + itp->name = "105-Palladium"; + itp->isotope = true; + itp->M = 104.905084; + itp->nsf = 5.5; + pt_backup.push_back(itp); + // 106-palladium + itp = new AtomType(*atp); + itp->symbol = "106-Pd"; + itp->name = "106-Palladium"; + itp->isotope = true; + itp->M = 105.903483; + itp->nsf = 6.4; + pt_backup.push_back(itp); + // 108-palladium + itp = new AtomType(*atp); + itp->symbol = "108-Pd"; + itp->name = "108-Palladium"; + itp->isotope = true; + itp->M = 107.903894; + itp->nsf = 4.1; + pt_backup.push_back(itp); + // 110-palladium + itp = new AtomType(*atp); + itp->symbol = "110-Pd"; + itp->name = "110-Palladium"; + itp->isotope = true; + itp->M = 109.905152; + itp->nsf = 7.7; + pt_backup.push_back(itp); + } + // silver + atp = *pt_backup.insert(pt_backup.end(), new AtomType()); + { + atp->symbol = "Ag"; + atp->name = "Silver"; + atp->z = 47; + atp->M = 107.86822; + atp->radius = 1.4447; + atp->xsf = 47.0; + atp->nsf = 5.9227; + // isotopes + // 107-silver + itp = new AtomType(*atp); + itp->symbol = "107-Ag"; + itp->name = "107-Silver"; + itp->isotope = true; + itp->M = 106.905093; + itp->nsf = 7.555; + pt_backup.push_back(itp); + // 109-silver + itp = new AtomType(*atp); + itp->symbol = "109-Ag"; + itp->name = "109-Silver"; + itp->isotope = true; + itp->M = 108.904756; + itp->nsf = 4.165; + pt_backup.push_back(itp); + } + // cadmium + atp = *pt_backup.insert(pt_backup.end(), new AtomType()); + { + atp->symbol = "Cd"; + atp->name = "Cadmium"; + atp->z = 48; + atp->M = 112.4118; + atp->radius = 1.4894; + atp->xsf = 48.0; + atp->nsf = 4.835; + // isotopes + // 106-cadmium + itp = new AtomType(*atp); + itp->symbol = "106-Cd"; + itp->name = "106-Cadmium"; + itp->isotope = true; + itp->M = 105.906458; + itp->nsf = 5.0; + pt_backup.push_back(itp); + // 108-cadmium + itp = new AtomType(*atp); + itp->symbol = "108-Cd"; + itp->name = "108-Cadmium"; + itp->isotope = true; + itp->M = 107.904183; + itp->nsf = 5.31; + pt_backup.push_back(itp); + // 110-cadmium + itp = new AtomType(*atp); + itp->symbol = "110-Cd"; + itp->name = "110-Cadmium"; + itp->isotope = true; + itp->M = 109.903006; + itp->nsf = 5.78; + pt_backup.push_back(itp); + // 111-cadmium + itp = new AtomType(*atp); + itp->symbol = "111-Cd"; + itp->name = "111-Cadmium"; + itp->isotope = true; + itp->M = 110.904182; + itp->nsf = 6.47; + pt_backup.push_back(itp); + // 112-cadmium + itp = new AtomType(*atp); + itp->symbol = "112-Cd"; + itp->name = "112-Cadmium"; + itp->isotope = true; + itp->M = 111.9027572; + itp->nsf = 6.34; + pt_backup.push_back(itp); + // 113-cadmium + itp = new AtomType(*atp); + itp->symbol = "113-Cd"; + itp->name = "113-Cadmium"; + itp->isotope = true; + itp->M = 112.9044009; + itp->nsf = -8.0; + pt_backup.push_back(itp); + // 114-cadmium + itp = new AtomType(*atp); + itp->symbol = "114-Cd"; + itp->name = "114-Cadmium"; + itp->isotope = true; + itp->M = 113.9033581; + itp->nsf = 7.48; + pt_backup.push_back(itp); + // 116-cadmium + itp = new AtomType(*atp); + itp->symbol = "116-Cd"; + itp->name = "116-Cadmium"; + itp->isotope = true; + itp->M = 115.904755; + itp->nsf = 6.26; + pt_backup.push_back(itp); + } + // indium + atp = *pt_backup.insert(pt_backup.end(), new AtomType()); + { + atp->symbol = "In"; + atp->name = "Indium"; + atp->z = 49; + atp->M = 114.8183; + atp->radius = 1.6662; + atp->xsf = 49.0; + atp->nsf = 4.0652; + // isotopes + // 113-indium + itp = new AtomType(*atp); + itp->symbol = "113-In"; + itp->name = "113-Indium"; + itp->isotope = true; + itp->M = 112.904061; + itp->nsf = 5.39; + pt_backup.push_back(itp); + // 115-indium + itp = new AtomType(*atp); + itp->symbol = "115-In"; + itp->name = "115-Indium"; + itp->isotope = true; + itp->M = 114.903878; + itp->nsf = 4.00; + pt_backup.push_back(itp); + } + // tin + atp = *pt_backup.insert(pt_backup.end(), new AtomType()); + { + atp->symbol = "Sn"; + atp->name = "Tin"; + atp->z = 50; + atp->M = 118.7107; + atp->radius = 1.5375; + atp->xsf = 50.0; + atp->nsf = 6.2252; + // isotopes + // 112-tin + itp = new AtomType(*atp); + itp->symbol = "112-Sn"; + itp->name = "112-Tin"; + itp->isotope = true; + itp->M = 111.904821; + itp->nsf = 6.0; + pt_backup.push_back(itp); + // 114-tin + itp = new AtomType(*atp); + itp->symbol = "114-Sn"; + itp->name = "114-Tin"; + itp->isotope = true; + itp->M = 113.902782; + itp->nsf = 6.0; + pt_backup.push_back(itp); + // 115-tin + itp = new AtomType(*atp); + itp->symbol = "115-Sn"; + itp->name = "115-Tin"; + itp->isotope = true; + itp->M = 114.903346; + itp->nsf = 6.0; + pt_backup.push_back(itp); + // 116-tin + itp = new AtomType(*atp); + itp->symbol = "116-Sn"; + itp->name = "116-Tin"; + itp->isotope = true; + itp->M = 115.901744; + itp->nsf = 6.1; + pt_backup.push_back(itp); + // 117-tin + itp = new AtomType(*atp); + itp->symbol = "117-Sn"; + itp->name = "117-Tin"; + itp->isotope = true; + itp->M = 116.902954; + itp->nsf = 6.59; + pt_backup.push_back(itp); + // 118-tin + itp = new AtomType(*atp); + itp->symbol = "118-Sn"; + itp->name = "118-Tin"; + itp->isotope = true; + itp->M = 117.901606; + itp->nsf = 6.23; + pt_backup.push_back(itp); + // 119-tin + itp = new AtomType(*atp); + itp->symbol = "119-Sn"; + itp->name = "119-Tin"; + itp->isotope = true; + itp->M = 118.903309; + itp->nsf = 6.28; + pt_backup.push_back(itp); + // 120-tin + itp = new AtomType(*atp); + itp->symbol = "120-Sn"; + itp->name = "120-Tin"; + itp->isotope = true; + itp->M = 119.9021966; + itp->nsf = 6.67; + pt_backup.push_back(itp); + // 122-tin + itp = new AtomType(*atp); + itp->symbol = "122-Sn"; + itp->name = "122-Tin"; + itp->isotope = true; + itp->M = 121.9034401; + itp->nsf = 5.93; + pt_backup.push_back(itp); + // 124-tin + itp = new AtomType(*atp); + itp->symbol = "124-Sn"; + itp->name = "124-Tin"; + itp->isotope = true; + itp->M = 123.9052746; + itp->nsf = 6.15; + pt_backup.push_back(itp); + } + // antimony + atp = *pt_backup.insert(pt_backup.end(), new AtomType()); + { + atp->symbol = "Sb"; + atp->name = "Antimony"; + atp->z = 51; + atp->M = 121.7601; + atp->radius = 1.4000; + atp->xsf = 51.0; + atp->nsf = 5.573; + // isotopes + // 121-antimony + itp = new AtomType(*atp); + itp->symbol = "121-Sb"; + itp->name = "121-Antimony"; + itp->isotope = true; + itp->M = 120.9038180; + itp->nsf = 5.71; + pt_backup.push_back(itp); + // 123-antimony + itp = new AtomType(*atp); + itp->symbol = "123-Sb"; + itp->name = "123-Antimony"; + itp->isotope = true; + itp->M = 122.9042157; + itp->nsf = 5.38; + pt_backup.push_back(itp); + } + // tellurium + atp = *pt_backup.insert(pt_backup.end(), new AtomType()); + { + atp->symbol = "Te"; + atp->name = "Tellurium"; + atp->z = 52; + atp->M = 127.603; + atp->radius = 1.3600; + atp->xsf = 52.0; + atp->nsf = 5.682; + // isotopes + // 120-tellurium + itp = new AtomType(*atp); + itp->symbol = "120-Te"; + itp->name = "120-Tellurium"; + itp->isotope = true; + itp->M = 119.904020; + itp->nsf = 5.3; + pt_backup.push_back(itp); + // 122-tellurium + itp = new AtomType(*atp); + itp->symbol = "122-Te"; + itp->name = "122-Tellurium"; + itp->isotope = true; + itp->M = 121.9030471; + itp->nsf = 3.8; + pt_backup.push_back(itp); + // 123-tellurium + itp = new AtomType(*atp); + itp->symbol = "123-Te"; + itp->name = "123-Tellurium"; + itp->isotope = true; + itp->M = 122.9042730; + itp->nsf = -0.05; + pt_backup.push_back(itp); + // 124-tellurium + itp = new AtomType(*atp); + itp->symbol = "124-Te"; + itp->name = "124-Tellurium"; + itp->isotope = true; + itp->M = 123.9028195; + itp->nsf = 7.95; + pt_backup.push_back(itp); + // 125-tellurium + itp = new AtomType(*atp); + itp->symbol = "125-Te"; + itp->name = "125-Tellurium"; + itp->isotope = true; + itp->M = 124.9044247; + itp->nsf = 5.01; + pt_backup.push_back(itp); + // 126-tellurium + itp = new AtomType(*atp); + itp->symbol = "126-Te"; + itp->name = "126-Tellurium"; + itp->isotope = true; + itp->M = 125.9033055; + itp->nsf = 5.55; + pt_backup.push_back(itp); + // 128-tellurium + itp = new AtomType(*atp); + itp->symbol = "128-Te"; + itp->name = "128-Tellurium"; + itp->isotope = true; + itp->M = 127.9044614; + itp->nsf = 5.88; + pt_backup.push_back(itp); + // 130-tellurium + itp = new AtomType(*atp); + itp->symbol = "130-Te"; + itp->name = "130-Tellurium"; + itp->isotope = true; + itp->M = 129.9062228; + itp->nsf = 6.01; + pt_backup.push_back(itp); + } + // iodine + atp = *pt_backup.insert(pt_backup.end(), new AtomType()); + { + atp->symbol = "I"; + atp->name = "Iodine"; + atp->z = 53; + atp->M = 126.904473; + atp->radius = 1.3300; + atp->xsf = 53.0; + atp->nsf = 5.282; + } + // xenon + atp = *pt_backup.insert(pt_backup.end(), new AtomType()); + { + atp->symbol = "Xe"; + atp->name = "Xenon"; + atp->z = 54; + atp->M = 131.2936; + atp->radius = 2.2000; + atp->xsf = 54.0; + atp->nsf = 4.694; + } + // cesium + atp = *pt_backup.insert(pt_backup.end(), new AtomType()); + { + atp->symbol = "Cs"; + atp->name = "Cesium"; + atp->z = 55; + atp->M = 132.905452; + atp->radius = 2.6325; + atp->xsf = 55.0; + atp->nsf = 5.422; + } + // barium + atp = *pt_backup.insert(pt_backup.end(), new AtomType()); + { + atp->symbol = "Ba"; + atp->name = "Barium"; + atp->z = 56; + atp->M = 137.3277; + atp->radius = 2.1705; + atp->xsf = 56.0; + atp->nsf = 5.073; + // isotopes + // 130-barium + itp = new AtomType(*atp); + itp->symbol = "130-Ba"; + itp->name = "130-Barium"; + itp->isotope = true; + itp->M = 129.906310; + itp->nsf = -3.6; + pt_backup.push_back(itp); + // 132-barium + itp = new AtomType(*atp); + itp->symbol = "132-Ba"; + itp->name = "132-Barium"; + itp->isotope = true; + itp->M = 131.905056; + itp->nsf = 7.8; + pt_backup.push_back(itp); + // 134-barium + itp = new AtomType(*atp); + itp->symbol = "134-Ba"; + itp->name = "134-Barium"; + itp->isotope = true; + itp->M = 133.904503; + itp->nsf = 5.7; + pt_backup.push_back(itp); + // 135-barium + itp = new AtomType(*atp); + itp->symbol = "135-Ba"; + itp->name = "135-Barium"; + itp->isotope = true; + itp->M = 134.905683; + itp->nsf = 4.66; + pt_backup.push_back(itp); + // 136-barium + itp = new AtomType(*atp); + itp->symbol = "136-Ba"; + itp->name = "136-Barium"; + itp->isotope = true; + itp->M = 135.904570; + itp->nsf = 4.90; + pt_backup.push_back(itp); + // 137-barium + itp = new AtomType(*atp); + itp->symbol = "137-Ba"; + itp->name = "137-Barium"; + itp->isotope = true; + itp->M = 136.905821; + itp->nsf = 6.82; + pt_backup.push_back(itp); + // 138-barium + itp = new AtomType(*atp); + itp->symbol = "138-Ba"; + itp->name = "138-Barium"; + itp->isotope = true; + itp->M = 137.905241; + itp->nsf = 4.83; + pt_backup.push_back(itp); + } + // lanthanum + atp = *pt_backup.insert(pt_backup.end(), new AtomType()); + { + atp->symbol = "La"; + atp->name = "Lanthanum"; + atp->z = 57; + atp->M = 138.90552; + atp->radius = 1.8725; + atp->xsf = 57.0; + atp->nsf = 8.244; + // isotopes + // 138-lanthanum + itp = new AtomType(*atp); + itp->symbol = "138-La"; + itp->name = "138-Lanthanum"; + itp->isotope = true; + itp->M = 137.907107; + itp->nsf = 8.0; + pt_backup.push_back(itp); + // 139-lanthanum + itp = new AtomType(*atp); + itp->symbol = "139-La"; + itp->name = "139-Lanthanum"; + itp->isotope = true; + itp->M = 138.906348; + itp->nsf = 8.24; + pt_backup.push_back(itp); + } + // cerium + atp = *pt_backup.insert(pt_backup.end(), new AtomType()); + { + atp->symbol = "Ce"; + atp->name = "Cerium"; + atp->z = 58; + atp->M = 140.1161; + atp->radius = 1.8243; + atp->xsf = 58.0; + atp->nsf = 4.842; + // isotopes + // 136-cerium + itp = new AtomType(*atp); + itp->symbol = "136-Ce"; + itp->name = "136-Cerium"; + itp->isotope = true; + itp->M = 135.907140; + itp->nsf = 5.76; + pt_backup.push_back(itp); + // 138-cerium + itp = new AtomType(*atp); + itp->symbol = "138-Ce"; + itp->name = "138-Cerium"; + itp->isotope = true; + itp->M = 137.905986; + itp->nsf = 6.65; + pt_backup.push_back(itp); + // 140-cerium + itp = new AtomType(*atp); + itp->symbol = "140-Ce"; + itp->name = "140-Cerium"; + itp->isotope = true; + itp->M = 139.905434; + itp->nsf = 4.81; + pt_backup.push_back(itp); + // 142-cerium + itp = new AtomType(*atp); + itp->symbol = "142-Ce"; + itp->name = "142-Cerium"; + itp->isotope = true; + itp->M = 141.909240; + itp->nsf = 4.72; + pt_backup.push_back(itp); + } + // praseodymium + atp = *pt_backup.insert(pt_backup.end(), new AtomType()); + { + atp->symbol = "Pr"; + atp->name = "Praseodymium"; + atp->z = 59; + atp->M = 140.907652; + atp->radius = 1.8362; + atp->xsf = 59.0; + atp->nsf = 4.585; + } + // neodymium + atp = *pt_backup.insert(pt_backup.end(), new AtomType()); + { + atp->symbol = "Nd"; + atp->name = "Neodymium"; + atp->z = 60; + atp->M = 144.243; + atp->radius = 1.8295; + atp->xsf = 60.0; + atp->nsf = 7.695; + // isotopes + // 142-neodymium + itp = new AtomType(*atp); + itp->symbol = "142-Nd"; + itp->name = "142-Neodymium"; + itp->isotope = true; + itp->M = 141.907719; + itp->nsf = 7.7; + pt_backup.push_back(itp); + // 143-neodymium + itp = new AtomType(*atp); + itp->symbol = "143-Nd"; + itp->name = "143-Neodymium"; + itp->isotope = true; + itp->M = 142.909810; + itp->nsf = 14.0; + pt_backup.push_back(itp); + // 144-neodymium + itp = new AtomType(*atp); + itp->symbol = "144-Nd"; + itp->name = "144-Neodymium"; + itp->isotope = true; + itp->M = 143.910083; + itp->nsf = 2.8; + pt_backup.push_back(itp); + // 145-neodymium + itp = new AtomType(*atp); + itp->symbol = "145-Nd"; + itp->name = "145-Neodymium"; + itp->isotope = true; + itp->M = 144.912569; + itp->nsf = 14.0; + pt_backup.push_back(itp); + // 146-neodymium + itp = new AtomType(*atp); + itp->symbol = "146-Nd"; + itp->name = "146-Neodymium"; + itp->isotope = true; + itp->M = 145.913112; + itp->nsf = 8.7; + pt_backup.push_back(itp); + // 148-neodymium + itp = new AtomType(*atp); + itp->symbol = "148-Nd"; + itp->name = "148-Neodymium"; + itp->isotope = true; + itp->M = 147.916889; + itp->nsf = 5.7; + pt_backup.push_back(itp); + // 150-neodymium + itp = new AtomType(*atp); + itp->symbol = "150-Nd"; + itp->name = "150-Neodymium"; + itp->isotope = true; + itp->M = 149.920887; + itp->nsf = 5.28; + pt_backup.push_back(itp); + } + // promethium + atp = *pt_backup.insert(pt_backup.end(), new AtomType()); + { + atp->symbol = "Pm"; + atp->name = "Promethium"; + atp->z = 61; + atp->M = 145.0; + atp->radius = 1.8090; + atp->xsf = 61.0; + atp->nsf = 12.64; + } + // samarium + atp = *pt_backup.insert(pt_backup.end(), new AtomType()); + { + atp->symbol = "Sm"; + atp->name = "Samarium"; + atp->z = 62; + atp->M = 150.363; + atp->radius = 1.8040; + atp->xsf = 62.0; + atp->nsf = 0.005; + // isotopes + // 144-samarium + itp = new AtomType(*atp); + itp->symbol = "144-Sm"; + itp->name = "144-Samarium"; + itp->isotope = true; + itp->M = 143.911995; + itp->nsf = -3.0; + pt_backup.push_back(itp); + // 147-samarium + itp = new AtomType(*atp); + itp->symbol = "147-Sm"; + itp->name = "147-Samarium"; + itp->isotope = true; + itp->M = 146.914893; + itp->nsf = 14.0; + pt_backup.push_back(itp); + // 148-samarium + itp = new AtomType(*atp); + itp->symbol = "148-Sm"; + itp->name = "148-Samarium"; + itp->isotope = true; + itp->M = 147.914818; + itp->nsf = -3.0; + pt_backup.push_back(itp); + // 149-samarium + itp = new AtomType(*atp); + itp->symbol = "149-Sm"; + itp->name = "149-Samarium"; + itp->isotope = true; + itp->M = 148.917180; + itp->nsf = 18.7; + pt_backup.push_back(itp); + // 150-samarium + itp = new AtomType(*atp); + itp->symbol = "150-Sm"; + itp->name = "150-Samarium"; + itp->isotope = true; + itp->M = 149.917271; + itp->nsf = 14.0; + pt_backup.push_back(itp); + // 152-samarium + itp = new AtomType(*atp); + itp->symbol = "152-Sm"; + itp->name = "152-Samarium"; + itp->isotope = true; + itp->M = 151.919728; + itp->nsf = -5.0; + pt_backup.push_back(itp); + // 154-samarium + itp = new AtomType(*atp); + itp->symbol = "154-Sm"; + itp->name = "154-Samarium"; + itp->isotope = true; + itp->M = 153.922205; + itp->nsf = 8.0; + pt_backup.push_back(itp); + } + // europium + atp = *pt_backup.insert(pt_backup.end(), new AtomType()); + { + atp->symbol = "Eu"; + atp->name = "Europium"; + atp->z = 63; + atp->M = 151.9641; + atp->radius = 1.9840; + atp->xsf = 63.0; + atp->nsf = 5.33; + // isotopes + // 153-europium + itp = new AtomType(*atp); + itp->symbol = "153-Eu"; + itp->name = "153-Europium"; + itp->isotope = true; + itp->M = 152.921226; + itp->nsf = 8.22; + pt_backup.push_back(itp); + } + // gadolinium + atp = *pt_backup.insert(pt_backup.end(), new AtomType()); + { + atp->symbol = "Gd"; + atp->name = "Gadolinium"; + atp->z = 64; + atp->M = 157.253; + atp->radius = 1.8180; + atp->xsf = 64.0; + atp->nsf = 9.52; + // isotopes + // 152-gadolinium + itp = new AtomType(*atp); + itp->symbol = "152-Gd"; + itp->name = "152-Gadolinium"; + itp->isotope = true; + itp->M = 151.919788; + itp->nsf = 10.0; + pt_backup.push_back(itp); + // 154-gadolinium + itp = new AtomType(*atp); + itp->symbol = "154-Gd"; + itp->name = "154-Gadolinium"; + itp->isotope = true; + itp->M = 153.920862; + itp->nsf = 10.0; + pt_backup.push_back(itp); + // 155-gadolinium + itp = new AtomType(*atp); + itp->symbol = "155-Gd"; + itp->name = "155-Gadolinium"; + itp->isotope = true; + itp->M = 154.922619; + itp->nsf = 13.8; + pt_backup.push_back(itp); + // 156-gadolinium + itp = new AtomType(*atp); + itp->symbol = "156-Gd"; + itp->name = "156-Gadolinium"; + itp->isotope = true; + itp->M = 155.922120; + itp->nsf = 6.3; + pt_backup.push_back(itp); + // 157-gadolinium + itp = new AtomType(*atp); + itp->symbol = "157-Gd"; + itp->name = "157-Gadolinium"; + itp->isotope = true; + itp->M = 156.923957; + itp->nsf = 4.0; + pt_backup.push_back(itp); + // 158-gadolinium + itp = new AtomType(*atp); + itp->symbol = "158-Gd"; + itp->name = "158-Gadolinium"; + itp->isotope = true; + itp->M = 157.924101; + itp->nsf = 9.0; + pt_backup.push_back(itp); + // 160-gadolinium + itp = new AtomType(*atp); + itp->symbol = "160-Gd"; + itp->name = "160-Gadolinium"; + itp->isotope = true; + itp->M = 159.927051; + itp->nsf = 9.15; + pt_backup.push_back(itp); + } + // terbium + atp = *pt_backup.insert(pt_backup.end(), new AtomType()); + { + atp->symbol = "Tb"; + atp->name = "Terbium"; + atp->z = 65; + atp->M = 158.925342; + atp->radius = 1.8005; + atp->xsf = 65.0; + atp->nsf = 7.342; + } + // dysprosium + atp = *pt_backup.insert(pt_backup.end(), new AtomType()); + { + atp->symbol = "Dy"; + atp->name = "Dysprosium"; + atp->z = 66; + atp->M = 162.5001; + atp->radius = 1.7951; + atp->xsf = 66.0; + atp->nsf = 16.93; + // isotopes + // 156-dysprosium + itp = new AtomType(*atp); + itp->symbol = "156-Dy"; + itp->name = "156-Dysprosium"; + itp->isotope = true; + itp->M = 155.924278; + itp->nsf = 6.1; + pt_backup.push_back(itp); + // 158-dysprosium + itp = new AtomType(*atp); + itp->symbol = "158-Dy"; + itp->name = "158-Dysprosium"; + itp->isotope = true; + itp->M = 157.924405; + itp->nsf = 6.0; + pt_backup.push_back(itp); + // 160-dysprosium + itp = new AtomType(*atp); + itp->symbol = "160-Dy"; + itp->name = "160-Dysprosium"; + itp->isotope = true; + itp->M = 159.925194; + itp->nsf = 6.7; + pt_backup.push_back(itp); + // 161-dysprosium + itp = new AtomType(*atp); + itp->symbol = "161-Dy"; + itp->name = "161-Dysprosium"; + itp->isotope = true; + itp->M = 160.926930; + itp->nsf = 10.3; + pt_backup.push_back(itp); + // 162-dysprosium + itp = new AtomType(*atp); + itp->symbol = "162-Dy"; + itp->name = "162-Dysprosium"; + itp->isotope = true; + itp->M = 161.926795; + itp->nsf = -1.4; + pt_backup.push_back(itp); + // 163-dysprosium + itp = new AtomType(*atp); + itp->symbol = "163-Dy"; + itp->name = "163-Dysprosium"; + itp->isotope = true; + itp->M = 162.928728; + itp->nsf = 5.0; + pt_backup.push_back(itp); + // 164-dysprosium + itp = new AtomType(*atp); + itp->symbol = "164-Dy"; + itp->name = "164-Dysprosium"; + itp->isotope = true; + itp->M = 163.929171; + itp->nsf = 49.4; + pt_backup.push_back(itp); + } + // holmium + atp = *pt_backup.insert(pt_backup.end(), new AtomType()); + { + atp->symbol = "Ho"; + atp->name = "Holmium"; + atp->z = 67; + atp->M = 164.930322; + atp->radius = 1.7886; + atp->xsf = 67.0; + atp->nsf = 8.443; + } + // erbium + atp = *pt_backup.insert(pt_backup.end(), new AtomType()); + { + atp->symbol = "Er"; + atp->name = "Erbium"; + atp->z = 68; + atp->M = 167.2593; + atp->radius = 1.7794; + atp->xsf = 68.0; + atp->nsf = 7.792; + // isotopes + // 162-erbium + itp = new AtomType(*atp); + itp->symbol = "162-Er"; + itp->name = "162-Erbium"; + itp->isotope = true; + itp->M = 161.928775; + itp->nsf = 9.01; + pt_backup.push_back(itp); + // 164-erbium + itp = new AtomType(*atp); + itp->symbol = "164-Er"; + itp->name = "164-Erbium"; + itp->isotope = true; + itp->M = 163.929197; + itp->nsf = 7.95; + pt_backup.push_back(itp); + // 166-erbium + itp = new AtomType(*atp); + itp->symbol = "166-Er"; + itp->name = "166-Erbium"; + itp->isotope = true; + itp->M = 165.930290; + itp->nsf = 10.51; + pt_backup.push_back(itp); + // 167-erbium + itp = new AtomType(*atp); + itp->symbol = "167-Er"; + itp->name = "167-Erbium"; + itp->isotope = true; + itp->M = 166.932045; + itp->nsf = 3.06; + pt_backup.push_back(itp); + // 168-erbium + itp = new AtomType(*atp); + itp->symbol = "168-Er"; + itp->name = "168-Erbium"; + itp->isotope = true; + itp->M = 167.932368; + itp->nsf = 7.43; + pt_backup.push_back(itp); + // 170-erbium + itp = new AtomType(*atp); + itp->symbol = "170-Er"; + itp->name = "170-Erbium"; + itp->isotope = true; + itp->M = 169.935460; + itp->nsf = 9.61; + pt_backup.push_back(itp); + } + // thulium + atp = *pt_backup.insert(pt_backup.end(), new AtomType()); + { + atp->symbol = "Tm"; + atp->name = "Thulium"; + atp->z = 69; + atp->M = 168.934212; + atp->radius = 1.7687; + atp->xsf = 69.0; + atp->nsf = 7.073; + } + // ytterbium + atp = *pt_backup.insert(pt_backup.end(), new AtomType()); + { + atp->symbol = "Yb"; + atp->name = "Ytterbium"; + atp->z = 70; + atp->M = 173.043; + atp->radius = 1.9396; + atp->xsf = 70.0; + atp->nsf = 12.413; + // isotopes + // 168-ytterbium + itp = new AtomType(*atp); + itp->symbol = "168-Yb"; + itp->name = "168-Ytterbium"; + itp->isotope = true; + itp->M = 167.933894; + itp->nsf = -4.07; + pt_backup.push_back(itp); + // 170-ytterbium + itp = new AtomType(*atp); + itp->symbol = "170-Yb"; + itp->name = "170-Ytterbium"; + itp->isotope = true; + itp->M = 169.934759; + itp->nsf = 6.8; + pt_backup.push_back(itp); + // 171-ytterbium + itp = new AtomType(*atp); + itp->symbol = "171-Yb"; + itp->name = "171-Ytterbium"; + itp->isotope = true; + itp->M = 170.936322; + itp->nsf = 9.7; + pt_backup.push_back(itp); + // 172-ytterbium + itp = new AtomType(*atp); + itp->symbol = "172-Yb"; + itp->name = "172-Ytterbium"; + itp->isotope = true; + itp->M = 171.9363777; + itp->nsf = 9.5; + pt_backup.push_back(itp); + // 173-ytterbium + itp = new AtomType(*atp); + itp->symbol = "173-Yb"; + itp->name = "173-Ytterbium"; + itp->isotope = true; + itp->M = 172.9382068; + itp->nsf = 9.56; + pt_backup.push_back(itp); + // 174-ytterbium + itp = new AtomType(*atp); + itp->symbol = "174-Yb"; + itp->name = "174-Ytterbium"; + itp->isotope = true; + itp->M = 173.9388581; + itp->nsf = 19.2; + pt_backup.push_back(itp); + // 176-ytterbium + itp = new AtomType(*atp); + itp->symbol = "176-Yb"; + itp->name = "176-Ytterbium"; + itp->isotope = true; + itp->M = 175.942568; + itp->nsf = 8.7; + pt_backup.push_back(itp); + } + // lutetium + atp = *pt_backup.insert(pt_backup.end(), new AtomType()); + { + atp->symbol = "Lu"; + atp->name = "Lutetium"; + atp->z = 71; + atp->M = 174.9671; + atp->radius = 1.7515; + atp->xsf = 71.0; + atp->nsf = 7.213; + // isotopes + // 175-lutetium + itp = new AtomType(*atp); + itp->symbol = "175-Lu"; + itp->name = "175-Lutetium"; + itp->isotope = true; + itp->M = 174.9407679; + itp->nsf = 7.28; + pt_backup.push_back(itp); + // 176-lutetium + itp = new AtomType(*atp); + itp->symbol = "176-Lu"; + itp->name = "176-Lutetium"; + itp->isotope = true; + itp->M = 175.9426824; + itp->nsf = 6.1; + pt_backup.push_back(itp); + } + // hafnium + atp = *pt_backup.insert(pt_backup.end(), new AtomType()); + { + atp->symbol = "Hf"; + atp->name = "Hafnium"; + atp->z = 72; + atp->M = 178.492; + atp->radius = 1.5973; + atp->xsf = 72.0; + atp->nsf = 7.7714; + // isotopes + // 174-hafnium + itp = new AtomType(*atp); + itp->symbol = "174-Hf"; + itp->name = "174-Hafnium"; + itp->isotope = true; + itp->M = 173.940040; + itp->nsf = 10.9; + pt_backup.push_back(itp); + // 176-hafnium + itp = new AtomType(*atp); + itp->symbol = "176-Hf"; + itp->name = "176-Hafnium"; + itp->isotope = true; + itp->M = 175.9414018; + itp->nsf = 6.61; + pt_backup.push_back(itp); + // 177-hafnium + itp = new AtomType(*atp); + itp->symbol = "177-Hf"; + itp->name = "177-Hafnium"; + itp->isotope = true; + itp->M = 176.9432200; + itp->nsf = 0.8; + pt_backup.push_back(itp); + // 178-hafnium + itp = new AtomType(*atp); + itp->symbol = "178-Hf"; + itp->name = "178-Hafnium"; + itp->isotope = true; + itp->M = 177.9436977; + itp->nsf = 5.9; + pt_backup.push_back(itp); + // 179-hafnium + itp = new AtomType(*atp); + itp->symbol = "179-Hf"; + itp->name = "179-Hafnium"; + itp->isotope = true; + itp->M = 178.9458151; + itp->nsf = 7.46; + pt_backup.push_back(itp); + // 180-hafnium + itp = new AtomType(*atp); + itp->symbol = "180-Hf"; + itp->name = "180-Hafnium"; + itp->isotope = true; + itp->M = 179.9465488; + itp->nsf = 13.2; + pt_backup.push_back(itp); + } + // tantalum + atp = *pt_backup.insert(pt_backup.end(), new AtomType()); + { + atp->symbol = "Ta"; + atp->name = "Tantalum"; + atp->z = 73; + atp->M = 180.94791; + atp->radius = 1.4280; + atp->xsf = 73.0; + atp->nsf = 6.917; + // isotopes + // 180-tantalum + itp = new AtomType(*atp); + itp->symbol = "180-Ta"; + itp->name = "180-Tantalum"; + itp->isotope = true; + itp->M = 179.947466; + itp->nsf = 7.0; + pt_backup.push_back(itp); + // 181-tantalum + itp = new AtomType(*atp); + itp->symbol = "181-Ta"; + itp->name = "181-Tantalum"; + itp->isotope = true; + itp->M = 180.947996; + itp->nsf = 6.91; + pt_backup.push_back(itp); + } + // tungsten + atp = *pt_backup.insert(pt_backup.end(), new AtomType()); + { + atp->symbol = "W"; + atp->name = "Tungsten"; + atp->z = 74; + atp->M = 183.841; + atp->radius = 1.3705; + atp->xsf = 74.0; + atp->nsf = 4.75518; + // isotopes + // 180-tungsten + itp = new AtomType(*atp); + itp->symbol = "180-W"; + itp->name = "180-Tungsten"; + itp->isotope = true; + itp->M = 179.946706; + itp->nsf = 5.0; + pt_backup.push_back(itp); + // 182-tungsten + itp = new AtomType(*atp); + itp->symbol = "182-W"; + itp->name = "182-Tungsten"; + itp->isotope = true; + itp->M = 181.948206; + itp->nsf = 7.04; + pt_backup.push_back(itp); + // 183-tungsten + itp = new AtomType(*atp); + itp->symbol = "183-W"; + itp->name = "183-Tungsten"; + itp->isotope = true; + itp->M = 182.9502245; + itp->nsf = 6.59; + pt_backup.push_back(itp); + // 184-tungsten + itp = new AtomType(*atp); + itp->symbol = "184-W"; + itp->name = "184-Tungsten"; + itp->isotope = true; + itp->M = 183.9509326; + itp->nsf = 7.55; + pt_backup.push_back(itp); + // 186-tungsten + itp = new AtomType(*atp); + itp->symbol = "186-W"; + itp->name = "186-Tungsten"; + itp->isotope = true; + itp->M = 185.954362; + itp->nsf = -0.73; + pt_backup.push_back(itp); + } + // rhenium + atp = *pt_backup.insert(pt_backup.end(), new AtomType()); + { + atp->symbol = "Re"; + atp->name = "Rhenium"; + atp->z = 75; + atp->M = 186.2071; + atp->radius = 1.3800; + atp->xsf = 75.0; + atp->nsf = 9.22; + // isotopes + // 185-rhenium + itp = new AtomType(*atp); + itp->symbol = "185-Re"; + itp->name = "185-Rhenium"; + itp->isotope = true; + itp->M = 184.9529557; + itp->nsf = 9.0; + pt_backup.push_back(itp); + // 187-rhenium + itp = new AtomType(*atp); + itp->symbol = "187-Re"; + itp->name = "187-Rhenium"; + itp->isotope = true; + itp->M = 186.9557508; + itp->nsf = 9.3; + pt_backup.push_back(itp); + } + // osmium + atp = *pt_backup.insert(pt_backup.end(), new AtomType()); + { + atp->symbol = "Os"; + atp->name = "Osmium"; + atp->z = 76; + atp->M = 190.233; + atp->radius = 1.3676; + atp->xsf = 76.0; + atp->nsf = 10.72; + // isotopes + // 184-osmium + itp = new AtomType(*atp); + itp->symbol = "184-Os"; + itp->name = "184-Osmium"; + itp->isotope = true; + itp->M = 183.952491; + itp->nsf = 10.0; + pt_backup.push_back(itp); + // 186-osmium + itp = new AtomType(*atp); + itp->symbol = "186-Os"; + itp->name = "186-Osmium"; + itp->isotope = true; + itp->M = 185.953838; + itp->nsf = 12.0; + pt_backup.push_back(itp); + // 187-osmium + itp = new AtomType(*atp); + itp->symbol = "187-Os"; + itp->name = "187-Osmium"; + itp->isotope = true; + itp->M = 186.9557479; + itp->nsf = 10.0; + pt_backup.push_back(itp); + // 188-osmium + itp = new AtomType(*atp); + itp->symbol = "188-Os"; + itp->name = "188-Osmium"; + itp->isotope = true; + itp->M = 187.9558360; + itp->nsf = 7.8; + pt_backup.push_back(itp); + // 189-osmium + itp = new AtomType(*atp); + itp->symbol = "189-Os"; + itp->name = "189-Osmium"; + itp->isotope = true; + itp->M = 188.9581449; + itp->nsf = 11.0; + pt_backup.push_back(itp); + // 190-osmium + itp = new AtomType(*atp); + itp->symbol = "190-Os"; + itp->name = "190-Osmium"; + itp->isotope = true; + itp->M = 189.958445; + itp->nsf = 11.4; + pt_backup.push_back(itp); + // 192-osmium + itp = new AtomType(*atp); + itp->symbol = "192-Os"; + itp->name = "192-Osmium"; + itp->isotope = true; + itp->M = 191.961479; + itp->nsf = 11.9; + pt_backup.push_back(itp); + } + // iridium + atp = *pt_backup.insert(pt_backup.end(), new AtomType()); + { + atp->symbol = "Ir"; + atp->name = "Iridium"; + atp->z = 77; + atp->M = 192.2173; + atp->radius = 1.3573; + atp->xsf = 77.0; + atp->nsf = 10.63; + } + // platinum + atp = *pt_backup.insert(pt_backup.end(), new AtomType()); + { + atp->symbol = "Pt"; + atp->name = "Platinum"; + atp->z = 78; + atp->M = 195.0782; + atp->radius = 1.3873; + atp->xsf = 78.0; + atp->nsf = 9.601; + // isotopes + // 190-platinum + itp = new AtomType(*atp); + itp->symbol = "190-Pt"; + itp->name = "190-Platinum"; + itp->isotope = true; + itp->M = 189.959930; + itp->nsf = 9.0; + pt_backup.push_back(itp); + // 192-platinum + itp = new AtomType(*atp); + itp->symbol = "192-Pt"; + itp->name = "192-Platinum"; + itp->isotope = true; + itp->M = 191.961035; + itp->nsf = 9.9; + pt_backup.push_back(itp); + // 194-platinum + itp = new AtomType(*atp); + itp->symbol = "194-Pt"; + itp->name = "194-Platinum"; + itp->isotope = true; + itp->M = 193.962664; + itp->nsf = 10.55; + pt_backup.push_back(itp); + // 195-platinum + itp = new AtomType(*atp); + itp->symbol = "195-Pt"; + itp->name = "195-Platinum"; + itp->isotope = true; + itp->M = 194.964774; + itp->nsf = 8.91; + pt_backup.push_back(itp); + // 196-platinum + itp = new AtomType(*atp); + itp->symbol = "196-Pt"; + itp->name = "196-Platinum"; + itp->isotope = true; + itp->M = 195.964935; + itp->nsf = 9.89; + pt_backup.push_back(itp); + // 198-platinum + itp = new AtomType(*atp); + itp->symbol = "198-Pt"; + itp->name = "198-Platinum"; + itp->isotope = true; + itp->M = 197.967876; + itp->nsf = 7.8; + pt_backup.push_back(itp); + } + // gold + atp = *pt_backup.insert(pt_backup.end(), new AtomType()); + { + atp->symbol = "Au"; + atp->name = "Gold"; + atp->z = 79; + atp->M = 196.966552; + atp->radius = 1.4419; + atp->xsf = 79.0; + atp->nsf = 7.907; + } + // mercury + atp = *pt_backup.insert(pt_backup.end(), new AtomType()); + { + atp->symbol = "Hg"; + atp->name = "Mercury"; + atp->z = 80; + atp->M = 200.592; + atp->radius = 1.5025; + atp->xsf = 80.0; + atp->nsf = 12.59545; + // isotopes + // 196-mercury + itp = new AtomType(*atp); + itp->symbol = "196-Hg"; + itp->name = "196-Mercury"; + itp->isotope = true; + itp->M = 195.965815; + itp->nsf = 30.3; + pt_backup.push_back(itp); + // 199-mercury + itp = new AtomType(*atp); + itp->symbol = "199-Hg"; + itp->name = "199-Mercury"; + itp->isotope = true; + itp->M = 198.968262; + itp->nsf = 16.9; + pt_backup.push_back(itp); + // 202-mercury + itp = new AtomType(*atp); + itp->symbol = "202-Hg"; + itp->name = "202-Mercury"; + itp->isotope = true; + itp->M = 201.970626; + itp->nsf = 11.002; + pt_backup.push_back(itp); + } + // thallium + atp = *pt_backup.insert(pt_backup.end(), new AtomType()); + { + atp->symbol = "Tl"; + atp->name = "Thallium"; + atp->z = 81; + atp->M = 204.38332; + atp->radius = 1.7283; + atp->xsf = 81.0; + atp->nsf = 8.7765; + // isotopes + // 203-thalium + itp = new AtomType(*atp); + itp->symbol = "203-Tl"; + itp->name = "203-Thallium"; + itp->isotope = true; + itp->M = 202.972329; + itp->nsf = 8.51; + pt_backup.push_back(itp); + // 205-thalium + itp = new AtomType(*atp); + itp->symbol = "205-Tl"; + itp->name = "205-Thallium"; + itp->isotope = true; + itp->M = 204.974412; + itp->nsf = 8.87; + pt_backup.push_back(itp); + } + // lead + atp = *pt_backup.insert(pt_backup.end(), new AtomType()); + { + atp->symbol = "Pb"; + atp->name = "Lead"; + atp->z = 82; + atp->M = 207.21; + atp->radius = 1.7501; + atp->xsf = 82.0; + atp->nsf = 9.4012; + // isotopes + // 204-lead + itp = new AtomType(*atp); + itp->symbol = "204-Pb"; + itp->name = "204-Lead"; + itp->isotope = true; + itp->M = 203.973029; + itp->nsf = 10.893; + pt_backup.push_back(itp); + // 206-lead + itp = new AtomType(*atp); + itp->symbol = "206-Pb"; + itp->name = "206-Lead"; + itp->isotope = true; + itp->M = 205.974449; + itp->nsf = 9.2221; + pt_backup.push_back(itp); + // 207-lead + itp = new AtomType(*atp); + itp->symbol = "207-Pb"; + itp->name = "207-Lead"; + itp->isotope = true; + itp->M = 206.975881; + itp->nsf = 9.286; + pt_backup.push_back(itp); + // 208-lead + itp = new AtomType(*atp); + itp->symbol = "208-Pb"; + itp->name = "208-Lead"; + itp->isotope = true; + itp->M = 207.976636; + itp->nsf = 9.494; + pt_backup.push_back(itp); + } + // bismuth + atp = *pt_backup.insert(pt_backup.end(), new AtomType()); + { + atp->symbol = "Bi"; + atp->name = "Bismuth"; + atp->z = 83; + atp->M = 208.980382; + atp->radius = 1.4600; + atp->xsf = 83.0; + atp->nsf = 8.5322; + } + // polonium + atp = *pt_backup.insert(pt_backup.end(), new AtomType()); + { + atp->symbol = "Po"; + atp->name = "Polonium"; + atp->z = 84; + atp->M = 209.0; + atp->radius = 1.4600; + atp->xsf = 84.0; + atp->nsf = 0.0; + } + // astatine + atp = *pt_backup.insert(pt_backup.end(), new AtomType()); + { + atp->symbol = "At"; + atp->name = "Astatine"; + atp->z = 85; + atp->M = 210.0; + atp->radius = 1.4500; + atp->xsf = 85.0; + atp->nsf = 0.0; + } + // radon + atp = *pt_backup.insert(pt_backup.end(), new AtomType()); + { + atp->symbol = "Rn"; + atp->name = "Radon"; + atp->z = 86; + atp->M = 222.0; + atp->radius = 1.4300; + atp->xsf = 86.0; + atp->nsf = 0.0; + } + // francium + atp = *pt_backup.insert(pt_backup.end(), new AtomType()); + { + atp->symbol = "Fr"; + atp->name = "Francium"; + atp->z = 87; + atp->M = 223.0; + atp->radius = 2.5000; + atp->xsf = 87.0; + atp->nsf = 0.0; + } + // radium + atp = *pt_backup.insert(pt_backup.end(), new AtomType()); + { + atp->symbol = "Ra"; + atp->name = "Radium"; + atp->z = 88; + atp->M = 226.0; + atp->radius = 2.1400; + atp->xsf = 88.0; + atp->nsf = 10.0; + } + // actinium + atp = *pt_backup.insert(pt_backup.end(), new AtomType()); + { + atp->symbol = "Ac"; + atp->name = "Actinium"; + atp->z = 89; + atp->M = 227.0; + atp->radius = 1.8775; + atp->xsf = 89.0; + atp->nsf = 0.0; + } + // thorium + atp = *pt_backup.insert(pt_backup.end(), new AtomType()); + { + atp->symbol = "Th"; + atp->name = "Thorium"; + atp->z = 90; + atp->M = 232.03811; + atp->radius = 1.7975; + atp->xsf = 90.0; + atp->nsf = 10.31; + } + // protactinium + atp = *pt_backup.insert(pt_backup.end(), new AtomType()); + { + atp->symbol = "Pa"; + atp->name = "Protactinium"; + atp->z = 91; + atp->M = 231.035882; + atp->radius = 1.6086; + atp->xsf = 91.0; + atp->nsf = 9.13; + } + // uranium + atp = *pt_backup.insert(pt_backup.end(), new AtomType()); + { + atp->symbol = "U"; + atp->name = "Uranium"; + atp->z = 92; + atp->M = 238.028913; + atp->radius = 1.5683; + atp->xsf = 92.0; + atp->nsf = 8.417; + // isotopes + // 233-uranium + itp = new AtomType(*atp); + itp->symbol = "233-U"; + itp->name = "233-Uranium"; + itp->isotope = true; + itp->M = 233.039628; + itp->nsf = 10.1; + pt_backup.push_back(itp); + // 234-uranium + itp = new AtomType(*atp); + itp->symbol = "234-U"; + itp->name = "234-Uranium"; + itp->isotope = true; + itp->M = 234.0409456; + itp->nsf = 12.4; + pt_backup.push_back(itp); + // 235-uranium + itp = new AtomType(*atp); + itp->symbol = "235-U"; + itp->name = "235-Uranium"; + itp->isotope = true; + itp->M = 235.0439231; + itp->nsf = 10.50; + pt_backup.push_back(itp); + // 238-uranium + itp = new AtomType(*atp); + itp->symbol = "238-U"; + itp->name = "238-Uranium"; + itp->isotope = true; + itp->M = 238.0507826; + itp->nsf = 8.407; + pt_backup.push_back(itp); + } + // neptunium + atp = *pt_backup.insert(pt_backup.end(), new AtomType()); + { + atp->symbol = "Np"; + atp->name = "Neptunium"; + atp->z = 93; + atp->M = 237.0; + atp->radius = 1.0000; + atp->xsf = 93.0; + atp->nsf = 10.55; + } + // plutonium + atp = *pt_backup.insert(pt_backup.end(), new AtomType()); + { + atp->symbol = "Pu"; + atp->name = "Plutonium"; + atp->z = 94; + atp->M = 244.0; + atp->radius = 1.0000; + atp->xsf = 94.0; + atp->nsf = 7.71; + // isotopes + // 240-plutonium + itp = new AtomType(*atp); + itp->symbol = "240-Pu"; + itp->name = "240-Plutonium"; + itp->isotope = true; + itp->M = 240.0538075; + itp->nsf = 3.5; + pt_backup.push_back(itp); + // 242-plutonium + itp = new AtomType(*atp); + itp->symbol = "242-Pu"; + itp->name = "242-Plutonium"; + itp->isotope = true; + itp->M = 242.0587368; + itp->nsf = 8.1; + pt_backup.push_back(itp); + } + // americium + atp = *pt_backup.insert(pt_backup.end(), new AtomType()); + { + atp->symbol = "Am"; + atp->name = "Americium"; + atp->z = 95; + atp->M = 243.0; + atp->radius = 1.0000; + atp->xsf = 95.0; + atp->nsf = 8.32; + } + // curium + atp = *pt_backup.insert(pt_backup.end(), new AtomType()); + { + atp->symbol = "Cm"; + atp->name = "Curium"; + atp->z = 96; + atp->M = 247.0; + atp->radius = 1.0000; + atp->xsf = 96.0; + atp->nsf = 9.53; + // isotopes + // 246-curium + itp = new AtomType(*atp); + itp->symbol = "246-Cm"; + itp->name = "246-Curium"; + itp->isotope = true; + itp->M = 246.0672176; + itp->nsf = 9.3; + pt_backup.push_back(itp); + // 248-curium + itp = new AtomType(*atp); + itp->symbol = "248-Cm"; + itp->name = "248-Curium"; + itp->isotope = true; + itp->M = 248.072342; + itp->nsf = 7.7; + pt_backup.push_back(itp); + } + // berkelium + atp = *pt_backup.insert(pt_backup.end(), new AtomType()); + { + atp->symbol = "Bk"; + atp->name = "Berkelium"; + atp->z = 97; + atp->M = 247.0; + atp->radius = 1.0000; + atp->xsf = 97.0; + atp->nsf = 0.0; + } + // californium + atp = *pt_backup.insert(pt_backup.end(), new AtomType()); + { + atp->symbol = "Cf"; + atp->name = "Californium"; + atp->z = 98; + atp->M = 251.0; + atp->radius = 1.0000; + atp->xsf = 98.0; + atp->nsf = 0.0; + } + // einsteinium + atp = *pt_backup.insert(pt_backup.end(), new AtomType()); + { + atp->symbol = "Es"; + atp->name = "Einsteinium"; + atp->z = 99; + atp->M = 252.0; + atp->radius = 1.0000; + atp->xsf = 99.0; + atp->nsf = 0.0; + } + // fermium + atp = *pt_backup.insert(pt_backup.end(), new AtomType()); + { + atp->symbol = "Fm"; + atp->name = "Fermium"; + atp->z = 100; + atp->M = 257.0; + atp->radius = 1.0000; + atp->xsf = 100.0; + atp->nsf = 0.0; + } + // mendelevium + atp = *pt_backup.insert(pt_backup.end(), new AtomType()); + { + atp->symbol = "Md"; + atp->name = "Mendelevium"; + atp->z = 101; + atp->M = 258.0; + atp->radius = 1.0000; + atp->xsf = 101.0; + atp->nsf = 0.0; + } + // nobelium + atp = *pt_backup.insert(pt_backup.end(), new AtomType()); + { + atp->symbol = "No"; + atp->name = "Nobelium"; + atp->z = 102; + atp->M = 259.0; + atp->radius = 1.0000; + atp->xsf = 102.0; + atp->nsf = 0.0; + } + // lawrencium + atp = *pt_backup.insert(pt_backup.end(), new AtomType()); + { + atp->symbol = "Lr"; + atp->name = "Lawrencium"; + atp->z = 103; + atp->M = 262.0; + atp->radius = 1.0000; + atp->xsf = 103.0; + atp->nsf = 0.0; + } + // rutherfordium + atp = *pt_backup.insert(pt_backup.end(), new AtomType()); + { + atp->symbol = "Rf"; + atp->name = "Rutherfordium"; + atp->z = 104; + atp->M = 261.0; + atp->radius = 1.0000; + atp->xsf = 104.0; + atp->nsf = 0.0; + } + // dubnium + atp = *pt_backup.insert(pt_backup.end(), new AtomType()); + { + atp->symbol = "Db"; + atp->name = "Dubnium"; + atp->z = 105; + atp->M = 262.0; + atp->radius = 1.0000; + atp->xsf = 105.0; + atp->nsf = 0.0; + } + // seaborgium + atp = *pt_backup.insert(pt_backup.end(), new AtomType()); + { + atp->symbol = "Sg"; + atp->name = "Seaborgium"; + atp->z = 106; + atp->M = 266.0; + atp->radius = 1.0000; + atp->xsf = 106.0; + atp->nsf = 0.0; + } + // bohrium + atp = *pt_backup.insert(pt_backup.end(), new AtomType()); + { + atp->symbol = "Bh"; + atp->name = "Bohrium"; + atp->z = 107; + atp->M = 264.0; + atp->radius = 1.0000; + atp->xsf = 107.0; + atp->nsf = 0.0; + } + // hassium + atp = *pt_backup.insert(pt_backup.end(), new AtomType()); + { + atp->symbol = "Hs"; + atp->name = "Hassium"; + atp->z = 108; + atp->M = 277.0; + atp->radius = 1.0000; + atp->xsf = 108.0; + atp->nsf = 0.0; + } + // meitnerium + atp = *pt_backup.insert(pt_backup.end(), new AtomType()); + { + atp->symbol = "Mt"; + atp->name = "Meitnerium"; + atp->z = 109; + atp->M = 268.0; + atp->radius = 1.0000; + atp->xsf = 109.0; + atp->nsf = 0.0; + } + // darmstadtium + atp = *pt_backup.insert(pt_backup.end(), new AtomType()); + { + atp->symbol = "Ds"; + atp->name = "Darmstadtium"; + atp->z = 110; + atp->M = 281.0; + atp->radius = 1.0000; + atp->xsf = 110.0; + atp->nsf = 0.0; + } + // roentgenium + atp = *pt_backup.insert(pt_backup.end(), new AtomType()); + { + atp->symbol = "Rg"; + atp->name = "Roentgenium"; + atp->z = 111; + atp->M = 272.0; + atp->radius = 1.0000; + atp->xsf = 111.0; + atp->nsf = 0.0; + } +} + +// End of file diff --git a/src/extensions/libpdffit2/PeriodicTable.h b/src/extensions/libpdffit2/PeriodicTable.h new file mode 100644 index 00000000..99949031 --- /dev/null +++ b/src/extensions/libpdffit2/PeriodicTable.h @@ -0,0 +1,75 @@ +/*********************************************************************** +* +* pdffit2 by DANSE Diffraction group +* Simon J. L. Billinge +* (c) 2006 trustees of the Michigan State University +* All rights reserved. +* +* File coded by: Pavol Juhas +* +* See AUTHORS.txt for a list of people who contributed. +* See LICENSE.txt for license information. +* +************************************************************************ +* +* class PeriodicTable +* +* Comments: singleton class, use PeriodicTable::instance() +* for its pointer +* +***********************************************************************/ + +#ifndef PERIODICTABLE_H_INCLUDED +#define PERIODICTABLE_H_INCLUDED + +#include +#include +#include +#include +#include "AtomType.h" +#include "support_msvc9.h" + +// PeriodicTable +class PeriodicTable +{ + private: + + // PeriodicTable is a singleton class + PeriodicTable(); + + public: + + // Access to singleton instance + static PeriodicTable* instance() + { + static std::unique_ptr the_table(new PeriodicTable()); + return the_table.get(); + } + // Destructor + ~PeriodicTable(); + + // Methods + AtomType* name(const std::string& s); + AtomType* symbol(const std::string& s); + AtomType* lookup(std::string s); // icase lookup + bool has(const std::string& s); + void defAtomType(const AtomType& atp); + void deleteAtomType(const AtomType* atp); + void reset(AtomType* atp); // retrieve atp from pt_backup + void resetAll(); // reset all elements + + private: + + // Data Members + std::map name_index; + std::map symbol_index; + std::deque pt_public; + std::deque pt_backup; + + // Methods + void init(); + void clear(); + void fill_pt_backup(); +}; + +#endif // PERIODICTABLE_H_INCLUDED diff --git a/src/extensions/libpdffit2/PointsInSphere.cc b/src/extensions/libpdffit2/PointsInSphere.cc new file mode 100644 index 00000000..8e51c575 --- /dev/null +++ b/src/extensions/libpdffit2/PointsInSphere.cc @@ -0,0 +1,243 @@ +/*********************************************************************** +* +* pdffit2 by DANSE Diffraction group +* Simon J. L. Billinge +* (c) 2006 trustees of the Michigan State University +* All rights reserved. +* +* File coded by: Pavol Juhas +* +* See AUTHORS.txt for a list of people who contributed. +* See LICENSE.txt for license information. +* +************************************************************************ +* +* classes PointsInSphere, ReflectionsInQminQmax, ReflectionsInDmaxDmin +* +* Comments: sequencers for lattice points insided 3D sphere +* +***********************************************************************/ + +#include +#include "PointsInSphere.h" + +using namespace NS_POINTSINSPHERE; + +//////////////////////////////////////////////////////////////////////// +// LatticeParameters +//////////////////////////////////////////////////////////////////////// + +LatticeParameters::LatticeParameters( double _a, double _b, double _c, + double _alpha, double _beta, double _gamma ) : + a(_a), b(_b), c(_c), + alpha(_alpha), beta(_beta), gamma(_gamma) +{ + update(); +} + +LatticeParameters& LatticeParameters::update() +{ + ca = cosd(alpha); cb = cosd(beta); cg = cosd(gamma); + sa = sind(alpha); sb = sind(beta); sg = sind(gamma); + // Vunit is a volume of unit cell with a=b=c=1 + const double Vunit = sqrt(1.0 + 2.0*ca*cb*cg - ca*ca - cb*cb - cg*cg); + ar = sa/(a*Vunit); + br = sb/(b*Vunit); + cr = sg/(c*Vunit); + car = (cb*cg - ca)/(sb*sg); sar = sqrt(1.0 - car*car); + cbr = (ca*cg - cb)/(sa*sg); sbr = sqrt(1.0 - cbr*cbr); + cgr = (ca*cb - cg)/(sa*sb); sgr = sqrt(1.0 - cgr*cgr); + alphar = 180.0/M_PI*acos(car); + betar = 180.0/M_PI*acos(cbr); + gammar = 180.0/M_PI*acos(cgr); + return *this; +} + +LatticeParameters LatticeParameters::reciprocal() const +{ + using namespace std; + LatticeParameters rec(*this); + swap(rec.a, rec.ar); + swap(rec.b, rec.br); + swap(rec.c, rec.cr); + swap(rec.alpha, rec.alphar); + swap(rec.beta, rec.betar); + swap(rec.gamma, rec.gammar); + swap(rec.ca, rec.car); + swap(rec.cb, rec.cbr); + swap(rec.cg, rec.cgr); + swap(rec.sa, rec.sar); + swap(rec.sb, rec.sbr); + swap(rec.sg, rec.sgr); + return rec; +} + + +//////////////////////////////////////////////////////////////////////// +// PointsInSphere +//////////////////////////////////////////////////////////////////////// + +PointsInSphere::PointsInSphere( double _Rmin, double _Rmax, + const LatticeParameters& _latpar ) : + m(mno[0]), n(mno[1]), o(mno[2]), + Rmin(_Rmin), Rmax(_Rmax), latpar(_latpar) +{ + init(); + rewind(); +} + +PointsInSphere::PointsInSphere( double _Rmin, double _Rmax, + double _a, double _b, double _c, + double _alpha, double _beta, double _gamma ) : + m(mno[0]), n(mno[1]), o(mno[2]), + Rmin(_Rmin), Rmax(_Rmax), + latpar(_a, _b, _c, _alpha, _beta, _gamma) +{ + init(); + rewind(); +} + +void PointsInSphere::init() +{ + RminSquare = (Rmin < 0.0) ? -(Rmin*Rmin) : Rmin*Rmin; + RmaxSquare = (Rmax < 0.0) ? -(Rmax*Rmax) : Rmax*Rmax; + dn0dm = latpar.cgr*latpar.br/latpar.ar; + do0dm = latpar.cbr*latpar.cr/latpar.ar; + // 2D reciprocal parameters in bc plane + b2r = 1.0/(latpar.b*latpar.sa); + c2r = 1.0/(latpar.c*latpar.sa); + ca2r = -latpar.ca; + do0dn = ca2r*c2r/b2r; + // 1D reciprocal along c axis + c1r = 1.0/latpar.c; +} + +void PointsInSphere::rewind() +{ + mHalfSpan = Rmax*latpar.ar; + hi_m = int(ceil(mHalfSpan)); + m = -hi_m; + // make indices n, o invalid, reset the neares point + n = hi_n = 0; + o = hi_o = outside_o = 0; + n0plane = o0plane = o0line = 0.0; + // unset excluded zone + oExclHalfSpan = 0.0; + // get the first inside point + next_o(); +} + +void PointsInSphere::next_o() +{ + do + { + o++; + if (o < hi_o) + { + return; + } + if (hi_o != outside_o) + { + hi_o = outside_o; + o = int( ceil(o0line+oExclHalfSpan) ) - 1; + continue; + } + next_n(); + } + while (!finished()); +} + +void PointsInSphere::next_n() +{ + do + { + n++; + if (n < hi_n) + { + o0line = o0plane + (n-n0plane)*do0dn; + double RlineSquare = RplaneSquare - pow((n-n0plane)/b2r,2); + oHalfSpan = RlineSquare > 0.0 ? sqrt(RlineSquare)*c1r : 0.0; + // parentheses improve round-off errors around [0,0,0] + double RExclSquare = RminSquare + (RlineSquare - RmaxSquare); + oExclHalfSpan = RExclSquare > 0.0 ? sqrt(RExclSquare)*c1r : 0.0; + o = int(floor(o0line - oHalfSpan)); + outside_o = int(ceil(o0line + oHalfSpan)); + hi_o = outside_o; + if (oExclHalfSpan) + { + int hole_o = int(ceil(o0line - oExclHalfSpan)); + if (fabs(hole_o-o0line) < oExclHalfSpan) hi_o = hole_o; + } + return; + } + next_m(); + } + while (!finished()); +} + +void PointsInSphere::next_m() +{ + m++; + if (finished()) + { + return; + } + // not finished here + n0plane = m*dn0dm; + o0plane = m*do0dm; + RplaneSquare = RmaxSquare - pow(m/latpar.ar,2); + nHalfSpan = RplaneSquare > 0.0 ? sqrt(RplaneSquare)*b2r : 0.0; + n = int(floor(n0plane - nHalfSpan)); + hi_n = int(ceil(n0plane + nHalfSpan)); +} + +double PointsInSphere::r() const +{ + const double &a = latpar.a, &b = latpar.b, &c = latpar.c; + const double &ca = latpar.ca, &cb = latpar.cb, &cg = latpar.cg; + return sqrt( m*m*a*a + n*n*b*b + o*o*c*c + + 2*m*n*a*b*cg + 2*m*o*a*c*cb + 2*n*o*b*c*ca ); +} + + +//////////////////////////////////////////////////////////////////////// +// ReflectionsInQminQmax +//////////////////////////////////////////////////////////////////////// + +ReflectionsInQminQmax::ReflectionsInQminQmax( double _Qmin, double _Qmax, + const LatticeParameters& _latpar ) : + Qmin(_Qmin), Qmax(_Qmax), + latpar(_latpar), + sph(Qmin*M_1_PI/2.0, Qmax*M_1_PI/2.0, latpar.reciprocal()), + hkl(sph.mno), h(hkl[0]), k(hkl[1]), l(hkl[2]) +{ } + +ReflectionsInQminQmax::ReflectionsInQminQmax( double _Qmin, double _Qmax, + double _a, double _b, double _c, + double _alpha, double _beta, double _gamma ) : + Qmin(_Qmin), Qmax(_Qmax), + latpar(_a, _b, _c, _alpha, _beta, _gamma), + sph(Qmin*M_1_PI/2.0, Qmax*M_1_PI/2.0, latpar.reciprocal()), + hkl(sph.mno), h(hkl[0]), k(hkl[1]), l(hkl[2]) +{ } + + +//////////////////////////////////////////////////////////////////////// +// ReflectionsInDmaxDmin +//////////////////////////////////////////////////////////////////////// + +ReflectionsInDmaxDmin::ReflectionsInDmaxDmin( double _Dmax, double _Dmin, + const LatticeParameters& _latpar ) : + ReflectionsInQminQmax(2.0*M_PI/_Dmax, 2.0*M_PI/_Dmin, _latpar), + Dmax(_Dmax), Dmin(_Dmin) +{ } + +ReflectionsInDmaxDmin::ReflectionsInDmaxDmin( double _Dmax, double _Dmin, + double _a, double _b, double _c, + double _alpha, double _beta, double _gamma ) : + ReflectionsInQminQmax( 2.0*M_PI/_Dmax, 2.0*M_PI/_Dmin, + _a, _b, _c, _alpha, _beta, _gamma ), + Dmax(_Dmax), Dmin(_Dmin) +{ } + +// End of file diff --git a/src/extensions/libpdffit2/PointsInSphere.h b/src/extensions/libpdffit2/PointsInSphere.h new file mode 100644 index 00000000..2c3b5d45 --- /dev/null +++ b/src/extensions/libpdffit2/PointsInSphere.h @@ -0,0 +1,182 @@ +/*********************************************************************** +* +* pdffit2 by DANSE Diffraction group +* Simon J. L. Billinge +* (c) 2006 trustees of the Michigan State University +* All rights reserved. +* +* File coded by: Pavol Juhas +* +* See AUTHORS.txt for a list of people who contributed. +* See LICENSE.txt for license information. +* +************************************************************************ +* +* classes PointsInSphere, ReflectionsInQminQmax, ReflectionsInDmaxDmin +* +* Constructors: +* +* PointsInSphere(Rmin, Rmax, a, b, c, alpha, beta, gamma) +* ReflectionsInQminQmax(Qmin, Qmax, a, b, c, alpha, beta, gamma) +* ReflectionsInDmaxDmin(Dmax, Dmin, a, b, c, alpha, beta, gamma) +* +* Examples: +* +* PointsInSphere sph(Rmin, Rmax, a, b, c, alpha, beta, gamma) +* for (sph.rewind(); !sph.finished(); sph.next()) +* { +* // lattice indices are in sph.m, sph.n, sph.o or sph.mno[3] +* // sph.r() is distance from origin, +* // where Rmin < sph.r() < Rmax +* } +* +* ReflectionsInQminQmax refl(Qmin, Qmax, a, b, c, alpha, beta, gamma) +* for (ReflectionsInQminQmax ref(Qmin, Qmax, a, b, c, alpha, beta, gamma); +* !ref.finished(); ref.next() ) +* { +* // Miller indices are in ref.h, ref.k, ref.l or ref.hkl[3] +* // ref.Q() is magnitude of Q vector +* // ref.d() is lattice plane spacing +* } +* +* Tip: add epsilon to Rmax to avoid roundoff issues +* +***********************************************************************/ + +#ifndef POINTSINSPHERE_H_INCLUDED +#define POINTSINSPHERE_H_INCLUDED + +#include + + +namespace NS_POINTSINSPHERE { + +class LatticeParameters +{ +public: + LatticeParameters( double _a, double _b, double _c, + double _alpha, double _beta, double _gamma ); + // calculate all properties from current lattice parameters + LatticeParameters& update(); + // return a reciprocal of this lattice + LatticeParameters reciprocal() const; + // input arguments + double a, b, c, alpha, beta, gamma; + // cosines and sines of direct lattice angles + double ca, cb, cg, sa, sb, sg; + // reciprocal lattice and its cosines and sines + double ar, br, cr, alphar, betar, gammar; + double car, cbr, cgr, sar, sbr, sgr; +private: + // helper functions + inline double cosd(double x) { return cos(M_PI/180.0*x); } + inline double sind(double x) { return sin(M_PI/180.0*x); } +}; + +class PointsInSphere +{ +public: + PointsInSphere( double _Rmin, double _Rmax, + const LatticeParameters& _latpar ); + PointsInSphere( double _Rmin, double _Rmax, + double _a, double _b, double _c, + double _alpha, double _beta, double _gamma ); + void rewind(); + inline void next() + { + next_o(); + } + inline bool finished() + { + return !(m < hi_m); + } + // mno array and m, n, o aliases are supposed to be read only + int mno[3]; + int &m, &n, &o; + double r() const; + // input arguments + const double Rmin, Rmax; + const LatticeParameters latpar; +private: + // loop advance functions + void next_m(); + void next_n(); + void next_o(); + void init(); + // calculated constants set by init() + double RminSquare, RmaxSquare; + // 2D reciprocal parameters and cosine in bc plane + double b2r, c2r, ca2r; + // reciprocal c + double c1r; + // offset of the nearest point to [0,0,0] + double dn0dm, do0dm, do0dn; + // loop variables + double n0plane, o0plane, o0line; + double mHalfSpan, nHalfSpan, oHalfSpan; + // o indices excluded due to Rmin + double oExclHalfSpan; + int hi_m, hi_n, hi_o, outside_o; + double RplaneSquare; +}; + +class ReflectionsInQminQmax +{ +public: + ReflectionsInQminQmax( double _Qmin, double _Qmax, + const LatticeParameters& _latpar ); + ReflectionsInQminQmax( double _Qmin, double _Qmax, + double _a, double _b, double _c, + double _alpha, double _beta, double _gamma ); + inline void rewind() + { + sph.rewind(); + } + inline void next() + { + sph.next(); + } + inline bool finished() + { + return sph.finished(); + } + // input arguments + const double Qmin, Qmax; + const LatticeParameters latpar; +private: + // sph must be initialized before hkl and h, k, l + PointsInSphere sph; +public: + // hkl array and h, k, l aliases are supposed to be read only + int *hkl; + int &h, &k, &l; + inline double Q() const + { + return 2.0*M_PI*sph.r(); + } + inline double d() const + { + return 1.0/sph.r(); + } +}; + +class ReflectionsInDmaxDmin : ReflectionsInQminQmax +{ +public: + ReflectionsInDmaxDmin( double _Dmax, double _Dmin, + const LatticeParameters& _latpar ); + ReflectionsInDmaxDmin( double _Dmax, double _Dmin, + double _a, double _b, double _c, + double _alpha, double _beta, double _gamma ); + // input arguments + const double Dmax, Dmin; +}; + + +} // namespace NS_POINTSINSPHERE + +using NS_POINTSINSPHERE::PointsInSphere; +using NS_POINTSINSPHERE::ReflectionsInQminQmax; +using NS_POINTSINSPHERE::ReflectionsInDmaxDmin; + +#endif // POINTSINSPHERE_H_INCLUDED diff --git a/src/extensions/libpdffit2/ShapeFactors.h b/src/extensions/libpdffit2/ShapeFactors.h new file mode 100644 index 00000000..031efe66 --- /dev/null +++ b/src/extensions/libpdffit2/ShapeFactors.h @@ -0,0 +1,43 @@ +/*********************************************************************** +* +* pdffit2 by DANSE Diffraction group +* Simon J. L. Billinge +* (c) 2007 trustees of the Michigan State University +* All rights reserved. +* +* File coded by: Pavol Juhas +* +* See AUTHORS.txt for a list of people who contributed. +* See LICENSE.txt for license information. +* +************************************************************************ +* +* PDF corrections due to particle shape. +* +* Comments: +* PDF correction for spherical particles obtained from +* R.C. Howell et al, Phys. Rev. B 73, 094107 (2006) +* http://link.aps.org/abstract/PRB/v73/e094107 +* +***********************************************************************/ + +#ifndef SHAPEFACTORS_H_INCLUDED +#define SHAPEFACTORS_H_INCLUDED + +#include + +// envelope function for spherical nanoparticle with diameter d +inline double sphereEnvelope(double r, double d) +{ + double rdratio = r/d; + return (rdratio < 1.0) ? (1.0 - 1.5*rdratio + 0.5*pow(rdratio, 3)) : 0.0; +} + +// derivative of sphereEnvelope by diameter d +inline double dsphereEnvelope(double r, double d) +{ + double rdratio = r/d; + return (rdratio < 1.0) ? (1.5*rdratio/d - 1.5*pow(rdratio, 3)/d) : 0.0; +} + +#endif // SHAPEFACTORS_H_INCLUDED diff --git a/src/extensions/libpdffit2/StringUtils.cc b/src/extensions/libpdffit2/StringUtils.cc new file mode 100644 index 00000000..73fc04da --- /dev/null +++ b/src/extensions/libpdffit2/StringUtils.cc @@ -0,0 +1,58 @@ +/*********************************************************************** +* +* pdffit2 by DANSE Diffraction group +* Simon J. L. Billinge +* (c) 2006 trustees of the Michigan State University +* All rights reserved. +* +* File coded by: Jacques Bloch, Pavol Juhas +* +* See AUTHORS.txt for a list of people who contributed. +* See LICENSE.txt for license information. +* +************************************************************************ +* +* Utilities for string formatting. +* +***********************************************************************/ + +#include +#include + +#include "StringUtils.h" +#include "MathUtils.h" + +using namespace std; + +// return an uppercase copy of string s +string toupper(string s) +{ + for (string::iterator ii = s.begin(); ii != s.end(); ++ii) + { + *ii = toupper(*ii); + } + return s; +} + +// class FormatValueWithStd +string FormatValueWithStd::operator() (double x, double dx) +{ + ostringstream out(f_leading_blank ? " " : "", ios_base::app); + out << x << setprecision(f_std_precision); + // do not write dx when it is too small + if (dx > fabs(x)*1e-8) out << " (" << dx << ')'; + else if (std::isnan(dx)) out << " (NaN)"; + // left-pad string to the width + string rv = out.str(); + int rvlen = rv.size(); + // pad or prepend blanks as necessary + if (rvlen < f_width) + { + size_t nblanks = f_width - rvlen; + if (f_left) rv.append(nblanks, ' '); + else rv.insert(0, nblanks, ' '); + } + return rv; +} + +// End of file diff --git a/src/extensions/libpdffit2/StringUtils.h b/src/extensions/libpdffit2/StringUtils.h new file mode 100644 index 00000000..edb74a96 --- /dev/null +++ b/src/extensions/libpdffit2/StringUtils.h @@ -0,0 +1,71 @@ +/*********************************************************************** +* +* pdffit2 by DANSE Diffraction group +* Simon J. L. Billinge +* (c) 2006 trustees of the Michigan State University +* All rights reserved. +* +* File coded by: Pavol Juhas +* +* See AUTHORS.txt for a list of people who contributed. +* See LICENSE.txt for license information. +* +************************************************************************ +* +* Utilities for string formatting. +* +***********************************************************************/ + +#ifndef STRINGUTILS_H_INCLUDED +#define STRINGUTILS_H_INCLUDED + +#include + +std::string toupper(std::string s); + +class FormatValueWithStd +{ + private: + + // Data members + int f_width; + bool f_left; + bool f_leading_blank; + int f_std_precision; + + public: + + // Constructor: + FormatValueWithStd() + { + f_width = 0; + f_left = false; + f_leading_blank = false; + f_std_precision = 2; + } + + // Methods: + std::string operator() (double x, double dx); + inline FormatValueWithStd& width(int w) + { + f_width = w; + return *this; + } + inline FormatValueWithStd& left() + { + f_left = true; + return *this; + } + inline FormatValueWithStd& right() + { + f_left = false; + return *this; + } + inline FormatValueWithStd& leading_blank(bool flag) + { + f_leading_blank = flag; + return *this; + } +}; + +#endif // STRINGUTILS_H_INCLUDED diff --git a/src/extensions/libpdffit2/exceptions.h b/src/extensions/libpdffit2/exceptions.h new file mode 100644 index 00000000..738ce1a6 --- /dev/null +++ b/src/extensions/libpdffit2/exceptions.h @@ -0,0 +1,95 @@ +/*********************************************************************** +* +* pdffit2 by DANSE Diffraction group +* Simon J. L. Billinge +* (c) 2006 trustees of the Michigan State University +* All rights reserved. +* +* File coded by: Chris Farrow, Pavol Juhas +* +* See AUTHORS.txt for a list of people who contributed. +* See LICENSE.txt for license information. +* +************************************************************************ +* +* Exceptions used in pdffit2. +* +* Comments: +* +***********************************************************************/ + +#ifndef EXCEPTIONS_H_INCLUDED +#define EXCEPTIONS_H_INCLUDED + +#include +#include + +class Exception +{ + private: + std::string msg; + public: + Exception(std::string _msg) : msg(_msg) {} + std::string GetMsg() + { + return msg; + } +}; + +//specific exceptions - mimic python names +class ValueError : public Exception +{ + public: + ValueError(std::string _msg) : Exception(_msg) {} +}; + +class unassignedError : public Exception +{ + public: + unassignedError(std::string _msg) : Exception(_msg) {} +}; + +class IOError : public Exception +{ + public: + IOError(std::string _msg) : Exception(_msg) {} +}; + +class dataError : public Exception +{ + public: + dataError(std::string _msg) : Exception(_msg) {} +}; + +class structureError : public Exception +{ + public: + structureError(std::string _msg) : Exception(_msg) {} +}; + +class constraintError : public Exception +{ + public: + constraintError(std::string _msg) : Exception(_msg) {} +}; + +class calculationError : public Exception +{ + public: + calculationError(std::string _msg) : Exception(_msg) {} +}; + +class parseError : public Exception +{ + public: + parseError(std::string _msg) : Exception(_msg) {} +}; + +//This one is used internally, and should not make it to the python layer. +class vgetException : public Exception +{ + public: + vgetException(std::string _msg) : Exception(_msg) {} +}; + +#endif // EXCEPTIONS_H_INCLUDED diff --git a/src/extensions/libpdffit2/fit.cc b/src/extensions/libpdffit2/fit.cc new file mode 100644 index 00000000..4426aa29 --- /dev/null +++ b/src/extensions/libpdffit2/fit.cc @@ -0,0 +1,836 @@ +/*********************************************************************** +* +* pdffit2 by DANSE Diffraction group +* Simon J. L. Billinge +* (c) 2006 trustees of the Michigan State University +* All rights reserved. +* +* File coded by: Jacques Bloch, Chris Farrow +* +* See AUTHORS.txt for a list of people who contributed. +* See LICENSE.txt for license information. +* +************************************************************************ +* +* Mixed definitions of several DataSet, Fit and PdfFit methods +* +* Comments: Up to date with 1.3.10 Fortran version. +* What a spagetti. +* +***********************************************************************/ + +#include +#include +#include +#include +#include + +#include "MathUtils.h" +#include "ShapeFactors.h" +#include "pdffit.h" + +using NS_PDFFIT2::pout; + +/************************* + Main fit routine +**************************/ +// Command called in Fortran +// Now called + +int PdfFit::refine(bool deriv, double toler) { + int finished = 0; + while( !finished ) + { + finished = refine_step(deriv, toler); + } + return 1; +} + + +// CLF Wed May 25 2005 +// Added one-step refinement so that the progress can be checked after each +// refinement step. Many parameters made into public data members of Fit. This +// function is for use in higher level refinement routines. +int PdfFit::refine_step(bool deriv, double toler) +{ + static bool fit_running = false; + const int NSTAG = 3, MINITER = 3, MAXITER = 100; + + fit_running = fit_running && (fit.iter != 0); + // If fit_running flag is down, this is the first iteration. + // If so, then set up the fit. + if(!fit_running) + { + fit.iter = 0; + fit.alambda = -1; + fit.stagnating = 0; + fit.chisq = double_max; + fit_running = true; + + *pout << + "*******************\n" << + "Starting refinement\n" << + "*******************\n"; + + for (int is=0; isiset << " Phase: "; + for (unsigned int ip=0; ippsel.size(); ip++) + if (datasets[is]->psel[ip]) *pout << phase[ip]->iphase << " "; + *pout << endl; + + } + + fit_setup(); + } + + + //------ Here starts the fitting + + // setting the offset for all refinable variables + + if( (fit.iter order = this->order_by_id(); + vector::iterator i; + int j; + for (i = order.begin(), j = 0; i != order.end(); ++i) + { + if (ip[*i]) + { + *pout << setw(4) << id[*i] << ": " << setw(9) << fixed << p[*i]; + j++; + if (j % 4) *pout << " "; + else *pout << endl; + } + } + if (j % 4) *pout << endl; + *pout << endl; + (*pout).unsetf(ios_base::fixed); +} + +/********************************************************** + Setting the offset for all refinable variables +**********************************************************/ +void PdfFit::fit_setup() +{ + // initialize the array with the addresses of refinable variable + // and initialize the offset pointers to be used in derivative routines + // also makes a vector containing the address of the error of each + // refinable variable + //int ip, ia, is, j; + int j; + + // First we make an initial fill of all constrained equations + // to detect missing parameters but mainly to detect the fixed constraints, + // i.e. constraints without parameters or with only fixed parameters + + fit.fill_variables(); + + // for each refinable variable detect the corresponding constraint + + fit.refvar.clear(); + fit.sdptr.clear(); + + for (int ip=0; ipphase[ip]; + + phase.offset = fit.refvar.size(); + + for (j=0;j<3;j++) + { + fit.refvar.push_back(fit.vfind(phase.a0[j])); + fit.sdptr.push_back(&phase.da0[j]); + } + for (j=0;j<3;j++) + { + fit.refvar.push_back(fit.vfind(phase.win[j])); + fit.sdptr.push_back(&phase.dwin[j]); + + } + fit.refvar.push_back(fit.vfind(phase.delta2)); + fit.sdptr.push_back(&phase.ddelta2); + + fit.refvar.push_back(fit.vfind(phase.delta1)); + fit.sdptr.push_back(&phase.ddelta1); + + fit.refvar.push_back(fit.vfind(phase.pscale)); + fit.sdptr.push_back(&phase.dpscale); + + fit.refvar.push_back(fit.vfind(phase.spdiameter)); + fit.sdptr.push_back(&phase.dspdiameter); + + fit.refvar.push_back(fit.vfind(phase.sratio)); + fit.sdptr.push_back(&phase.dsratio); + + for (int ia=0; iadatasets[is]; + + ds.offset = fit.refvar.size(); + + fit.refvar.push_back(fit.vfind(ds.dscale)); + fit.sdptr.push_back(&ds.ddscale); + + fit.refvar.push_back(fit.vfind(ds.qdamp)); + fit.sdptr.push_back(&ds.dqdamp); + + fit.refvar.push_back(fit.vfind(ds.qbroad)); + fit.sdptr.push_back(&ds.dqbroad); + } + + // maximum number of refinable variables + int maxvar = fit.refvar.size(); + + // fill the vector pointing from available refinable variables to + // actual constrained variables + + if (maxvar != getnpar() ) + { + throw constraintError("Parameter set but not constrained."); + } + + fit.ndof = 0; + + for (int i=0; idatasets.empty()) + { + throw unassignedError("Space for calculation must be alloc'ed first"); + } + fit_theory(false, true); + *pout << "\n================================== DONE =================================\n"; + return; +} + +/*********************************************************** + Here we calculate PDF and derivatives during LS fit + (previously known as fit_theory) +************************************************************/ +void PdfFit::fit_theory(bool ldiff, bool lout) +{ + int is, ip, ia, i; + + +// ------ First we compute all constrained equations and the PDF + + fit.fill_variables(); + + // reposition atoms in the elementary unit cells + // Check if this is the correct wayto do things + for (ip=0; ipnatoms; ia++) + { + for(i=0; i<3; i++) + { + phase[ip]->atom[ia].pos[i] = fmod(phase[ip]->atom[ia].pos[i], phase[ip]->icc[i]); + } + } + } + + for (ip=0; iplattice(); + + // determine pdf for each dataset + fit.ntot = 0; + fit.wnorm = 0.0; + + for (is=0; isdatasets[is]; + + ds.determine(ldiff, lout, fit); + + // compute variables for reduced chi-squared and Rw + fit.ntot += ds.nfmax - ds.nfmin + 1; + fit.wnorm += ds.weighedSquareObs(); + } +} + + +double PdfFit::totalWeighedSquareObs() const +{ + return fit.wnorm; +} + + +int PdfFit::totalReducedObservations() const +{ + return fit.ntot - fit.ndof; +} + + +/*********************************************************************** + This routine sets up the matrix A with the derivatives d(PDF)/dx +************************************************************************/ + +void DataSet::fit_setup_derivatives(Fit &fit) +{ + int i, j, ia, ipar, offset; + unsigned int ip; + double fac, facs, facp, ddrho; + double r, bk; + fac = facs = facp = ddrho = r = bk = 0; + + DataSet& ds = *this; + + //------ Loop over all data points + + for (i = ds.ncmin; i <= ds.ncmax; i++) + { + // --- Some common variables + + r = i*ds.deltar + ds.rmin; + + // background envelope due to Q resolution + bk = (ds.qdamp > 0.0) ? exp(-sqr(r*ds.qdamp)/2.0) : 1.0; + + + //------ ---------------------------------------------------------------- + //------ Derivatives per atom : x,y,z,u,o + //------ ---------------------------------------------------------------- + + for (ip=0; ip 0.0 && r > phase.stepcut) + { + shape_env = 0.0; + } + + facp = phase.pscale * shape_env * ds.dscale * bk; + facs = 1.0 / (phase.np*r); + fac = facs*facp; + + for (ia=0; ia, so every contribution to + // the pdf contributes to the derivatives + ds.fit_a[i][ipar] += phase.pscale * ds.dscale * + (1.0 - 2.0 * atom.weight) / phase.np * + (calc[i][ip] + + 4.0*M_PI * r * phase.rho0 * phase.dnorm * bk * shape_env); + } + } + + //------ ---------------------------------------------------------------- + //------ Derivatives per phase : lat, delta2, pscale, spdiameter, sratio + //------ ---------------------------------------------------------------- + + // ----- ----- d/d(lat[j] for j=1,2,3) + + offset = phase.offset; + + for (j=0;j<3;j++) + { + if ( (ipar=fit.refvar[offset++]) != -1) + ds.fit_a[i][ipar] = facp*(facs*ds.fit_a[i][ipar] + + 4.0*M_PI*r*phase.dnorm*phase.rho0/phase.a0[j]); + } + + // ----- ----- d/d(lat[4]) + + if ( (ipar=fit.refvar[offset++]) != -1) + { + ddrho = sqr(phase.a0[0]*phase.a0[1]*phase.a0[2]/phase.v)* + rad*phase.sina*(phase.cosa - phase.cosb*phase.cosg); + ds.fit_a[i][ipar] = facp*(facs*ds.fit_a[i][ipar] + + 4.0*M_PI*r*phase.dnorm*phase.rho0*ddrho); + } + + // ----- ----- d/d(lat[5]) + + if ( (ipar=fit.refvar[offset++]) != -1) + { + ddrho = sqr(phase.a0[0]*phase.a0[1]*phase.a0[2]/phase.v)* + rad*phase.sinb*(phase.cosb - phase.cosa*phase.cosg); + ds.fit_a[i][ipar] = facp*(facs*ds.fit_a[i][ipar] + + 4.0*M_PI*r*phase.dnorm*phase.rho0*ddrho); + } + + // ----- ----- d/d(lat[6]) + + if ( (ipar=fit.refvar[offset++]) != -1) + { + ddrho = sqr(phase.a0[0]*phase.a0[1]*phase.a0[2]/phase.v)* + rad*phase.sing*(phase.cosg - phase.cosa*phase.cosb); + ds.fit_a[i][ipar] = facp*(facs*ds.fit_a[i][ipar] + + 4.0*M_PI*r*phase.dnorm*phase.rho0*ddrho); + } + + // ----- ----- d/d(delta2[ip]) + + if ( (ipar=fit.refvar[offset++]) != -1) + ds.fit_a[i][ipar] *= fac; + + + // ----- ----- d/d(delta1[ip]) + + if ( (ipar=fit.refvar[offset++]) != -1) + ds.fit_a[i][ipar] *= fac; + + //----- ----- d/d(pscale[ip]) + + if ( (ipar=fit.refvar[offset++]) != -1) + ds.fit_a[i][ipar] = ds.calc[i][ip] * ds.dscale; + + // ----- --- d/d(spdiameter) + if ( (ipar=fit.refvar[offset++]) != -1) + { + ds.fit_a[i][ipar] = (phase.spdiameter <= 0.0) ? 0.0 : + ds.calc[i][ip] * ds.dscale * phase.pscale * + dsphereEnvelope(r, phase.spdiameter) / + ((shape_env > 0.0) ? shape_env : 1.0); + } + + // ----- ----- d/d(sratio[ip]) + + if ( (ipar=fit.refvar[offset++]) != -1) + ds.fit_a[i][ipar] *= fac; + } + + //------ ---------------------------------------------------------------- + //------ Derivatives per dataset : dscale, qdamp, qbroad + //------ ---------------------------------------------------------------- + + offset = ds.offset; + + // ----- --- d/d(dscale[is]) + + if ( (ipar=fit.refvar[offset++]) != -1) + ds.fit_a[i][ipar] = ds.pdftot[i] / ds.dscale; + + // ----- --- d/d(qdamp[is]) + + if ( (ipar=fit.refvar[offset++]) != -1) + { + if (ds.qdamp > 0.0) + ds.fit_a[i][ipar] = -r*r * ds.qdamp * ds.pdftot[i]; + else + ds.fit_a[i][ipar] = 0; + } + + // ----- --- d/d(qbroad[ip]) + + if ( (ipar=fit.refvar[offset++]) != -1) + ds.fit_a[i][ipar] *= fac; + + } + +//------ Finally we need to apply Qmax cutoff on the derivatives + + if (ds.qmax > 0.0) + { + int nclen = ds.ncmax + 1 - ds.ncmin; + // matrix column is not a continuous data block, a copy is required + valarray col_ip_array(nclen); + double* col_ip = &(col_ip_array[0]); + for(ip=0; ip::iterator apos; + apos = find(var.begin(), var.end(), &a); + if (apos == var.end()) return -1; + // variable is found here, now check if it is refinable + int idx = apos - var.begin(); + return vref[idx] ? idx : -1; +} + + +void Fit::constrain(double &a, string inpform, fcon f, int ipar, FCON type) +{ + int ivar; + if ( (ivar=vfind(a)) != -1) + { + form[ivar] = inpform; + fconstraint[ivar] = f; + idef[ivar] = ipar; + ctype[ivar] = type; + vref[ivar] = true; + *pout << "Warning: replacing existing constraint\n\n"; + } + else + { + var.push_back(&a); + form.push_back(inpform); + fconstraint.push_back(f); + idef.push_back(ipar); + ctype.push_back(type); + vref.push_back(true); + } +} + + +void Fit::constrain(double &a, string inpform) +{ + constrain(a, inpform, NULL, -1, USER); +} + +void Fit::constrain(double &a, fcon f ) +{ + constrain(a, string(), f, -1, USER); +} + +// if a # is passed instead of a function, then the default function will be used +// which is just var = p[ipar] +void Fit::constrain(double &a, int ipar) +{ + constrain(a, ipar, IDENT); +} + +// if a # and the FCOMP-type are passed instead of a function, then the +// complement function will be used: +// which is just var = 1-p[ipar] +void Fit::constrain(double &a, int ipar, FCON type) +{ + if ( (type == IDENT) || (type == FCOMP) || (type == FSQR) ) + constrain(a, string(), NULL, ipar, type); + else + throw constraintError("Unknown constraint"); +} + +void Fit::fill_variables() +{ + dvdp.resize(var.size(),p.size()); + + for (unsigned int i=0; i dnumdp; + + *var[i] = parse(form[i],dnumdp); + + // store numerical derivatives + for(unsigned int iu=0; iuip[ip]; + + // calculate derivative wrt to p[ip] if parameter is free + if (this->ip[ip]) + { + dvdp[i][ip] = dnumdp[iu]; + } + } + } + else if (f) + { + //try + //{ + vector dvdp_i(dvdp.rowVector(i)); + *var[i] = f(p, dvdp_i); + copy(dvdp_i.begin(), dvdp_i.end(), dvdp[i]); + for(int ipar=0; iparip[ipar]); + } + } + else + { + int ipar = parfind(idef[i]); + + if (ipar == -1) + { + ostringstream msg; + msg << "parameter " << idef[i] << " undefined"; + throw constraintError( msg.str() ); + } + + // constraint is fixed if parameter ipar is fixed + vref[i] = this->ip[ipar]; + + if (ctype[i] == IDENT) + { + *var[i] = p[ipar]; + dvdp[i][ipar] = 1.0; + } + else if (ctype[i] == FCOMP) + { + *var[i] = 1.0 - p[ipar]; + dvdp[i][ipar] = -1.0; + } + else if (ctype[i] == FSQR) + { + *var[i] = sqr(p[ipar]); + dvdp[i][ipar] = 2.0*p[ipar]; + } + } + } +} + +int Fit::parfind(unsigned int pidx) +{ + // find the position of pidx in parameter indices vector id + // return -1 if not found + vector::iterator pos; + pos = find(id.begin(), id.end(), pidx); + if (pos == id.end()) + { + return -1; + } + return int(pos - id.begin()); +} + +void Fit::setpar(unsigned int pidx, double val) +{ + int ipar = parfind(pidx); + if (ipar != -1) + { + p[ipar] = val; + } + else + { + p.push_back(val); + ip.push_back(1); // select refinement "ON" when par gets defined + id.push_back(pidx); // store the parameter identifier + } +} + +double Fit::getpar(unsigned int pidx) +{ + int ipar = parfind(pidx); + if (ipar < 0) + { + ostringstream msg; + msg << "Parameter " << pidx << " does not exist"; + throw unassignedError( msg.str() ); + } + return p[ipar]; +} + +void Fit::fixpar(int pidx) +{ + if (pidx == ALL) + { + fill(ip.begin(), ip.end(), false); + return; + } + int ipar = parfind(pidx); + if (ipar == -1) + { + ostringstream emsg; + emsg << "Parameter " << pidx << " not defined."; + throw unassignedError(emsg.str()); + } + ip[ipar] = false; +} + +void Fit::freepar(int pidx) +{ + if (pidx == ALL) + { + fill(ip.begin(), ip.end(), true); + return; + } + int ipar = parfind(pidx); + if (ipar == -1) + { + ostringstream emsg; + emsg << "Parameter " << pidx << " not defined."; + throw unassignedError(emsg.str()); + } + ip[ipar] = true; +} + +/************************************************************************** + This routine calculates errors dx from dp ... + + The covariance of the constrained variables is given by the left and right + matrix multiplication of the dvdp matrix with the covariance matrix + (based on a Taylor expansion of each constraint around the mean parameter values). + The old Fortran program had a sqrt(sum of squares) as error. This + does not take into account parameter correlations, and implicitly considers + the parameters uncorrelated, which is an under-estimation of the parameters. +****************************************************************************/ +void PdfFit::fit_errors() +{ + int ip; + matrix dvdpt = fit.dvdp.transposed(); + + // compute the errors on the parameters as sqrt of diagonal elements of + // covariance matrix + fit.dp = fit.covar.sd(); + + // compute errors on refined variables: left and right matrix multiplication + // of covariance matrix with dvdp + fit.vcovar = fit.dvdp * fit.covar * dvdpt; + + fit.dvar = fit.vcovar.sd(); + + //for(int i=0;ilattice(); +} + +/*********************************************************************** + This routine converts the errors on the constraints to + errors on the actual pdf-paramters +************************************************************************/ + +void Fit::fill_errors() +{ + // transfers the errors on the constrained variables to the corresponding + // pdf error-variables + + int icon; + + // loop over all refinable variables and transfer the sd on any constrained + // variable into the sd on the refinable variable + for (unsigned int i=0; i= big) + { + big=fabs(a[j][k]); + irow=j; + icol=k; + } + } + } + } + } + ++(ipiv[icol]); + /*We now have the pivot element, so we interchange rows, if needed, to put the pivot + element on the diagonal. The columns are not physically interchanged, only relabeled: + indxc[i], the column of the ith pivot element, is the ith column that is reduced, while + indxr[i] is the row in which that pivot element was originally located. If indxr[i] + != indxc[i] there is an implied column interchange. With this form of bookkeeping, the + solution b's will end up in the correct order, and the inverse matrix will be scrambled + by columns.*/ + if (irow != icol) { + for (l=1;l<=n;l++) swap(a[irow][l],a[icol][l]); + for (l=1;l<=m;l++) swap(b[irow][l],b[icol][l]); + } + indxr[i]=irow; // We are now ready to divide the pivot row by the + // pivot element, located at irow and icol. + indxc[i]=icol; + + // Indices of a start at 1, make sure we don't reference invalid + // index of a. When icol is 0, all checked elements of the matrix + // a were zero and it is probably singular as well. + if (icol == 0 || a[icol][icol] == 0.0) + { + throw calculationError("Singular matrix during minimization"); + } + pivinv=1.0/a[icol][icol]; + a[icol][icol]=1.0; + for (l=1;l<=n;l++) a[icol][l] *= pivinv; + for (l=1;l<=m;l++) b[icol][l] *= pivinv; + for (ll=1;ll<=n;ll++) // Next, we reduce the rows... + if (ll != icol) { // ...except for the pivot one, of course. + dum=a[ll][icol]; + a[ll][icol]=0.0; + for (l=1;l<=n;l++) a[ll][l] -= a[icol][l]*dum; + for (l=1;l<=m;l++) b[ll][l] -= b[icol][l]*dum; + } + } + /*This is the end of the main loop over columns of the reduction. It only remains to unscram- + ble the solution in view of the column interchanges. We do this by interchanging pairs of + columns in the reverse order that the permutation was built up.*/ + for (l=n;l>=1;l--) + { + if (indxr[l] == indxc[l]) continue; + for (k=1;k<=n;k++) swap(a[k][indxr[l]],a[k][indxc[l]]); + } // And we are done. + free_ivector(ipiv,1,n); + free_ivector(indxr,1,n); + free_ivector(indxc,1,n); +} + +// End of file diff --git a/src/extensions/libpdffit2/matrix.h b/src/extensions/libpdffit2/matrix.h new file mode 100644 index 00000000..bc80b8ca --- /dev/null +++ b/src/extensions/libpdffit2/matrix.h @@ -0,0 +1,239 @@ +/*********************************************************************** +* +* pdffit2 by DANSE Diffraction group +* Simon J. L. Billinge +* (c) 2006 trustees of the Michigan State University +* All rights reserved. +* +* File coded by: Pavol Juhas +* +* See AUTHORS.txt for a list of people who contributed. +* See LICENSE.txt for license information. +* +************************************************************************ +* +* template class matrix +* +* Comments: optimized from original vector of vectors +* +***********************************************************************/ + +#ifndef MATRIX_H_INCLUDED +#define MATRIX_H_INCLUDED + +#include +#include +#include + +#include "OutputStreams.h" +using NS_PDFFIT2::pout; + +template class matrix +{ + private: + + // Data Methods + T* mdata; + size_t mrows; + size_t mcols; + size_t msize; + + public: + + // Constructors + matrix() : + mdata(NULL), mrows(0), mcols(0), msize(0) + { } + matrix(const matrix& src) : + mdata(new T[src.mrows*src.mcols]), + mrows(src.mrows), mcols(src.mcols), msize(src.msize) + { + std::copy(src.mdata, src.mdata + src.msize, mdata); + } + matrix(size_t m, size_t n) : + mrows(m), mcols(n), msize(mrows*mcols) + { + mdata = new T[mrows*mcols]; + std::fill(mdata, mdata + msize, T(0)); + } + // Destructor + ~matrix() + { + delete[] mdata; + } + // Methods + matrix& operator=(const matrix& src) + { + if (this == &src) return *this; + delete[] mdata; + mdata = new T[src.msize]; + std::copy(src.mdata, src.mdata + src.msize, mdata); + mrows = src.mrows; + mcols = src.mcols; + msize = src.msize; + return *this; + } + matrix& operator=(T value) + { + std::fill_n(mdata, msize, value); + return *this; + } + void resize(size_t m, size_t n, T value=T(0)) + { + if (m == mrows && n == mcols) return; + T* resized = new T[m*n]; + std::fill(resized, resized + m*n, value); + for ( size_t i = 0, offset = 0; + i != std::min(m, mrows); ++i, offset += n ) + { + for (size_t j = 0; j != std::min(n, mcols); ++j) + { + resized[offset+j] = (*this)(i, j); + } + } + delete[] mdata; + mdata = resized; + mrows = m; + mcols = n; + msize = m*n; + } + void clear() + { + delete[] mdata; + mdata = NULL; + mrows = mcols = msize = 0; + } + std::vector rowVector(size_t i) + { + return std::vector(mdata + mcols*i, mdata + mcols*(i+1)); + } + std::vector colVector(size_t j) + { + std::vector column(mrows); + typename std::vector::iterator vii; + vii = column.begin(); + T* pt = mdata + j; + for (; vii != column.end(); ++vii, pt += mcols) *vii = *pt; + return column; + } + inline size_t getrows() + { + return mrows; + } + inline size_t getcols() + { + return mcols; + } + inline T* operator[](size_t i) + { + return mdata + mcols*i; + } + inline T& operator()(size_t i, size_t j) + { + return *(mdata + i*mcols + j); + } + matrix transposed() + { + matrix mxt(mcols, mrows); + T* pt = mxt.mdata; + for (size_t j = 0; j != mcols; ++j) + { + for (size_t i = 0; i != mrows; ++i, ++pt) + { + *pt = (*this)(i, j); + } + } + return mxt; + } + // returns standard deviation vector from covariance matrix + std::vector sd() + { + std::vector v(mcols); + if (mcols != mrows) + { + const char* emsg = "Matrix not square in "; + throw emsg; + } + typename std::vector::iterator vii; + vii = v.begin(); + for (T* pii = mdata; pii < mdata + msize; pii += mcols + 1, ++vii) + { + *vii = sqrt(*pii); + } + return v; + } + matrix operator*(matrix& B) + { + matrix& A = *this; + matrix C(A.mrows, B.mcols); + if (A.mcols != B.mrows) + { + const char* emsg = "Inconsistent matrix multiplication"; + throw emsg; + } + for (size_t i = 0; i != A.mrows; ++i) + { + for (size_t j = 0; j != B.mcols; ++j) + { + T& Cij = C(i,j); + Cij = 0; + for (size_t k = 0; k != A.mcols; ++k) + { + Cij += A(i,k)*B(k,j); + } + } + } + return C; + } + template + friend std::ostream& operator<<(std::ostream &out, matrix &mx); + void print() + { + using namespace std; + for (size_t i = 0; i != mrows; ++i) + { + *pout << i << ": "; + for (size_t j = 0; j != mcols; ++j) + { + *pout << (*this)(i,j) << " "; + } + *pout << endl; + } + } +}; + +template +std::ostream &operator<<(std::ostream &out, std::vector &v) +{ + using namespace std; + out << "("; + for (size_t i=0; i != v.size(); ++i) + { + out << v[i]; + if (i != (v.size()-1)) out << ", "; + else out << ")\n"; + } + return out; +} + +template +std::ostream& operator<<(std::ostream &out, matrix &mx) +{ + using namespace std; + out << "( "; + for (size_t i = 0; i != mx.mrows; ++i) + { + out << "("; + for (size_t j = 0; j != mx.mcols; ++j) + { + *pout << mx(i,j); + if (j != (mx.mcols-1)) *pout << ", "; + else *pout << ")"; + } + if (i != (mx.mrows-1)) *pout << ", "; + else *pout << " )\n"; + } + return out; +} + +#endif // MATRIX_H_INCLUDED diff --git a/src/extensions/libpdffit2/metric.cc b/src/extensions/libpdffit2/metric.cc new file mode 100644 index 00000000..5f696495 --- /dev/null +++ b/src/extensions/libpdffit2/metric.cc @@ -0,0 +1,341 @@ +/*********************************************************************** +* +* pdffit2 by DANSE Diffraction group +* Simon J. L. Billinge +* (c) 2006 trustees of the Michigan State University +* All rights reserved. +* +* File coded by: Jacques Bloch +* +* See AUTHORS.txt for a list of people who contributed. +* See LICENSE.txt for license information. +* +************************************************************************ +* +* Definitions of several Phase methods +* +* Comments: +* +***********************************************************************/ + +#include + +#include "MathUtils.h" +#include "StringUtils.h" +#include "pdffit.h" +using NS_PDFFIT2::pout; + +/********************************************************************* + Calculates lattice constants, metric and reciprocal metric + tensor, permutation tensors and unit cell volume. + It's done quite some old fashioned way, rather than calculating + the direct metric tensor and its inverse. + + This extended version calculates standard deviations as well + **********************************************************************/ +void Phase::lattice() +{ + double abscosa, abscosb, abscosg, arg, darg; + double dcosa, dcosb, dcosg, voll, dvoll; + double cos1, cos2, cosi, sin1, sin2, sini; + double dcos1, dcos2, dcosi, dsin1, dsin2, dsini; + int i, i1, i2, j, k, ncc; + + cosa = cosd(win[0]); + cosb = cosd(win[1]); + cosg = cosd(win[2]); + + sina = sind(win[0]); + sinb = sind(win[1]); + sing = sind(win[2]); + + abscosa = fabs(cosa); + abscosb = fabs(cosb); + abscosg = fabs(cosg); + + dcosa = fabs(sina*rad*dwin[0]); + dcosb = fabs(sinb*rad*dwin[1]); + dcosg = fabs(sing*rad*dwin[2]); + + voll = 1.0 - sqr(cosa) - sqr(cosb) - sqr(cosg) + 2.0*cosa*cosb*cosg; + + if (voll <= double_eps) + { + throw structureError("Unit cell volume is not positive."); + } + v = sqrt(voll)*a0[0]*a0[1]*a0[2]; + + dvoll = 2.0*(abscosa*dcosa + abscosb*dcosb + abscosg*dcosg + + dcosa*abscosb*abscosg + abscosa*dcosb*abscosg + abscosa*abscosb*dcosg); + dv = 0.5/sqrt(voll)*dvoll*a0[0]*a0[1]*a0[2] + + sqrt(voll)*(da0[0]*a0[1]*a0[2] + a0[0]*da0[1]*a0[2] + a0[0]*a0[1]*da0[2]); + + vr = 1.0/v; + dvr = 1.0/(v*v)*dv; + + //------ - calculate direct metric tensor + + tensor(gten,a0,win); + dtensor(a0,win,dgten,da0,dwin); + + //------ - calculate reciprocal lattice constants + + // WHY ARE THERE NO ABSOLUTE VALUES IN THE FOLLOWING FORMULAE FOR THE STANDARD + // DEVIATIONS?? + for (i=0; i<3; i++) // i = 0,1,2 + { + i1 = (i+1) % 3; // i1 = 1,2,0 + i2 = (i+2) % 3; // i2 = 2,0,1 + + cos1 = cosd(win[i1]); + cos2 = cosd(win[i2]); + cosi = cosd(win[i]); + sin1 = sind(win[i1]); + sin2 = sind(win[i2]); + sini = sind(win[i]); + + ar[i] = a0[i1]*a0[i2]*sini/v; + arg = (cos1*cos2-cosi)/(sin1*sin2); + wrez[i] = acosd(arg); + + dcos1 = sin1*rad*dwin[i1]; + dcos2 = sin2*rad*dwin[i2]; + dcosi = sini*rad*dwin[i]; + dsin1 = cos1*rad*dwin[i1]; + dsin2 = cos2*rad*dwin[i2]; + dsini = cosi*rad*dwin[i]; + + dar[i] = ( (da0[i1]*a0[i2] + a0[i1]*da0[i2])*sini + + a0[i1]*a0[i2]*dsini) /v + a0[i1]*a0[i2]*sini/(v*v)*dv; + darg = (dcos1*cos2 + cos1*dcos2 + dcosi)/(sin1*sin2) + + arg/sin1*dsin1 + arg/sin2*dsin2; + dwrez[i] = 1./sqrt(1-arg*arg)*darg/rad; + } + + //------ - calculate reciprocal tensor + + tensor(rten,ar,wrez); + dtensor(ar,wrez,drten,dar,dwrez); + + //------ - calculate permutation tensors + + for (i=0; i<3; i++) + { + for (j=0; j<3; j++) + { + for (k=0; k<3; k++) + { + eps(i,j,k) = 0.0; + reps(i,j,k) = 0.0; + deps(i,j,k) = 0.0; + dreps(i,j,k) = 0.0; + } + } + } + + eps(0,1,2) = v; + eps(1,2,0) = v; + eps(2,0,1) = v; + eps(0,2,1) = -v; + eps(2,1,0) = -v; + eps(1,0,2) = -v; + reps(0,1,2) = vr; + reps(1,2,0) = vr; + reps(2,0,1) = vr; + reps(0,2,1) = -vr; + reps(2,1,0) = -vr; + reps(1,0,2) = -vr; + + deps(0,1,2) = dv; + deps(1,2,0) = dv; + deps(2,0,1) = dv; + deps(0,2,1) = -dv; + deps(2,1,0) = -dv; + deps(1,0,2) = -dv; + dreps(0,1,2) = dvr; + dreps(1,2,0) = dvr; + dreps(2,0,1) = dvr; + dreps(0,2,1) = -dvr; + dreps(2,1,0) = -dvr; + dreps(1,0,2) = -dvr; + + //------ - Calculate number density + + np = 0.0; + dnp = 0.0; + + for (i=0; i +#include + +const int getNR_END() +{ + return 1; +} + +static void nrerror(char error_text[]) + /* Numerical Recipes standard error handler */ +{ + fprintf(stderr,"Numerical Recipes run-time error...\n"); + fprintf(stderr,"%s\n",error_text); + fprintf(stderr,"...now exiting to system...\n"); + exit(1); +} + +template T *_vector(long nl, long nh) + /* allocate a vector with subscript range v[nl..nh] */ +{ + T *v = NULL; + if (nl > nh) return v; + v=(T *)malloc((size_t) ((nh-nl+1+getNR_END())*sizeof(T))); + if (!v) nrerror("allocation failure in _vector()"); + return v-nl+getNR_END(); +} + +double *dvector(long nl, long nh) + /* allocate a double vector with subscript range v[nl..nh] */ +{ + return _vector(nl, nh); +} + +int *ivector(long nl, long nh) + /* allocate an int vector with subscript range v[nl..nh] */ +{ + return _vector(nl, nh); +} + +template void _free_vector(T *v, long nl, long nh) + /* free a vector allocated with vector() */ +{ + if (nl > nh) return; + free((T*) (v+nl-getNR_END())); +} + +void free_dvector(double *v, long nl, long nh) + /* free a double vector allocated with vector() */ +{ + _free_vector(v, nl, nh); +} + + +void free_ivector(int *v, long nl, long nh) + /* free an int vector allocated with ivector() */ +{ + _free_vector(v, nl, nh); +} + +template T **_matrix(long nrl, long nrh, long ncl, long nch) + /* allocate a matrix with subscript range m[nrl..nrh][ncl..nch] */ +{ + long i, nrow=nrh-nrl+1,ncol=nch-ncl+1; + T **m = NULL; + if (nrl > nrh || ncl > nch) return m; + + /* allocate pointers to rows */ + m=(T **) malloc((size_t)((nrow+getNR_END())*sizeof(T*))); + if (!m) nrerror("allocation failure 1 in matrix()"); + m += getNR_END(); + m -= nrl; + /* allocate rows and set pointers to them */ + m[nrl]=(T *) malloc((size_t)((nrow*ncol+getNR_END())*sizeof(T))); + if (!m[nrl]) nrerror("allocation failure 2 in matrix()"); + m[nrl] += getNR_END(); + m[nrl] -= ncl; + for(i=nrl+1;i<=nrh;i++) m[i]=m[i-1]+ncol; + /* return pointer to array of pointers to rows */ + return m; +} + +double **dmatrix(long nrl, long nrh, long ncl, long nch) + /* allocate a double matrix with subscript range m[nrl..nrh][ncl..nch] */ +{ + return _matrix(nrl, nrh, ncl, nch); +} + +template void _free_matrix(T **m, long nrl, long nrh, long ncl, long nch) + /* free a double matrix allocated by matrix() */ +{ + if (nrl > nrh || ncl > nch) return; + free((T*) (m[nrl]+ncl-getNR_END())); + free((T**) (m+nrl-getNR_END())); +} + +void free_dmatrix(double **m, long nrl, long nrh, long ncl, long nch) + /* free a double matrix allocated by matrix() */ +{ + _free_matrix(m, nrl, nrh, ncl, nch); +} + +// End of file diff --git a/src/extensions/libpdffit2/nrutil.h b/src/extensions/libpdffit2/nrutil.h new file mode 100644 index 00000000..ee1bd4cb --- /dev/null +++ b/src/extensions/libpdffit2/nrutil.h @@ -0,0 +1,34 @@ +/*********************************************************************** +* +* pdffit2 by DANSE Diffraction group +* Simon J. L. Billinge +* (c) 2006 trustees of the Michigan State University +* All rights reserved. +* +* File coded by: Jacques Bloch +* +* See AUTHORS.txt for a list of people who contributed. +* See LICENSE.txt for license information. +* +************************************************************************ +* +* Utilities from numerical recipies. +* +* Comments: +* +***********************************************************************/ + +#ifndef NRUTIL_H_INCLUDED +#define NRUTIL_H_INCLUDED + +#include + +void nrerror(char error_text[]); +int *ivector(long nl, long nh); +double *dvector(long nl, long nh); +double **dmatrix(long nrl, long nrh, long ncl, long nch); +void free_ivector(int *v, long nl, long nh); +void free_dvector(double *v, long nl, long nh); +void free_dmatrix(double **m, long nrl, long nrh, long ncl, long nch); + +#endif // NRUTIL_H_INCLUDED diff --git a/src/extensions/libpdffit2/output.cc b/src/extensions/libpdffit2/output.cc new file mode 100644 index 00000000..36928794 --- /dev/null +++ b/src/extensions/libpdffit2/output.cc @@ -0,0 +1,350 @@ +/*********************************************************************** +* +* pdffit2 by DANSE Diffraction group +* Simon J. L. Billinge +* (c) 2006 trustees of the Michigan State University +* All rights reserved. +* +* File coded by: Jacques Bloch +* +* See AUTHORS.txt for a list of people who contributed. +* See LICENSE.txt for license information. +* +************************************************************************ +* +* Output methods for Phase, DataSet and Fit classes +* +* Comments: +* +***********************************************************************/ + +#include +#include +#include +#include +#include +#include +#include + +#include "pdffit.h" +#include "StringUtils.h" + +/************************************************************ + * Outputs phase information for phase 'ipha' on file 'id' + * Thu Oct 13 2005 - CLF Modified code to handle + * general types of streams. + *************************************************************/ +void Phase::output(ostream &fout) +{ + FormatValueWithStd value_std; + value_std.left(); + + fout << " " << string(78,'-') << '\n' + << " PHASE " << iphase << " : " << name << '\n' + << " " << string(78,'-') << endl; + + fout << " Scale factor : " << + value_std(pscale, dpscale) << endl; + + fout << " Particle diameter : "; + if (spdiameter <= 0.0) fout << "not applied\n"; + else fout << value_std(spdiameter, dspdiameter) << " A\n"; + + fout << " Step cutoff : "; + if (stepcut <= 0.0) fout << "not applied\n"; + else fout << value_std(stepcut, 0.0) << " A\n"; + + if (corr_max > 0.0) + { + fout << " Correlation limit [A] : " << corr_max << endl; + } + + fout << " Quad. corr. factor : " + << value_std(delta2, ddelta2) << endl; + + fout << " Lin. corr. factor : " + << value_std(delta1, ddelta1) << endl; + + fout << " Low r sigma ratio : " << value_std(sratio, dsratio) << '\n' + << " R cutoff [A] : " << value_std(rcut, 0.0) << endl; + + value_std.leading_blank(true).left(); + fout << " Lattice parameters :" + << value_std.width(20)(a0[0], da0[0]) + << value_std.width(20)(a0[1], da0[1]) + << value_std.width(0)(a0[2], da0[2]) << '\n'; + + fout << " & angles :" + << value_std.width(20)(win[0], dwin[0]) + << value_std.width(20)(win[1], dwin[1]) + << value_std.width(0)(win[2], dwin[2]) << '\n'; + + fout << endl; + + fout << " Atom positions & occupancies :" << endl; + for (VAIT ai = atom.begin(); ai != atom.end(); ++ai) + { + fout << " " + << setw(4) << left << toupper(ai->atom_type->symbol) << setw(0); + value_std.width(20); + for (int i = 0; i < 3; i++) + { + fout << value_std(ai->pos[i], ai->dpos[i]); + } + fout << value_std.width(0)(ai->occ,ai->docc) << endl; + } + fout << endl; + + fout << " Anisotropic temperature factors :" << endl; + for (VAIT ai = atom.begin(); ai != atom.end(); ++ai) + { + fout << " " << setw(4) << toupper(ai->atom_type->symbol); + for (int i = 0; i < 3; i++) + { + fout << value_std.width(i == 2 ? 0 : 20)(ai->u[i], ai->du[i]); + } + fout << endl; + if ( ai->u[3] || ai->u[4] || ai->u[5]) + { + fout << " "; + for (int i = 3; i < 6; i++) + { + fout << value_std.width(i == 5 ? 0 : 20)(ai->u[i], ai->du[i]); + } + fout << endl; + } + } +} + +string DataSet::selectedAtomsString(int ip, char ijchar) +{ + if (!psel[ip]) return string(""); + if (ijchar != 'i' && ijchar != 'j') + { + ostringstream emsg; + emsg << "Invalid value of ijchar '" << ijchar << "'"; + throw ValueError(emsg.str()); + } + // build string of selected indices per each atom type + // also check if any type is selected and ignored at the same time + map selidxstr; + set ignored_types; + Phase* ph = psel[ip]; + set& ignored = ijchar == 'i' ? phase_ignore_i[ph] : phase_ignore_j[ph]; + for (int aidx = 0; aidx < ph->natoms; ++aidx) + { + const AtomType* atp = ph->atom[aidx].atom_type; + if (ignored.count(aidx)) ignored_types.insert(atp); + else + { + ostringstream sidx; + sidx << ' ' << aidx + 1; + selidxstr[atp] += sidx.str(); + } + } + ostringstream ssel; + for ( vector::iterator atp = ph->atom_types.begin(); + atp != ph->atom_types.end(); ++atp ) + { + if (!selidxstr.count(*atp)) continue; + ssel << " " << toupper((*atp)->symbol); + if (ignored_types.count(*atp)) ssel << selidxstr[*atp]; + } + return ssel.str(); +} + +/*********************************************************** + Outputs information about this data set + Thu Oct 13 2005 - CLF + Modified code to handle general types of + streams. +************************************************************/ +void DataSet::output(ostream& fout) +{ + FormatValueWithStd value_std; + + fout << " " << string(78,'-') << '\n' + << " DATA SET : " << iset << " (" << name << ")" << '\n' + << " " << string(78,'-') << endl; + + fout << " Data range in r [A] : " << setw(8) << left << rmin << " -> " + << setw(8) << rmax << " Step dr : " << setw(0) << deltar << endl; + + fout << " Calculated range : " << setw(8) << rcmin << " -> " + << setw(0) << rcmax << endl; + + fout << " Refinement r range : " << setw(8) << rfmin << " -> " + << setw(8) << rfmax + << " Data pts : " << setw(5) << nfmin << " -> " + << setw(0) << nfmax << endl; + + fout << + " Reduced chi squared : " << this->getdsredchisq() << '\n' << + " Rw - value : " << this->getdsrw() << '\n' << endl; + + fout << endl << " Experimental settings :" << endl; + + if (scattering_type == 'X') + fout << " Radiation : X-Rays\n"; + else + fout << " Radiation : Neutrons\n"; + + if (qmax <= 0.0) + fout << " Termination at Qmax : not applied\n"; + else + fout << " Termination at Qmax : " << qmax << " A**-1\n"; + + if (qdamp <= 0.0) + fout << " DQ dampening Qdamp : not applied\n"; + else + fout << " DQ dampening Qdamp : " << value_std(qdamp, dqdamp) << " A**-1\n"; + + if (qbroad <= 0.0) + fout << " DQ broadening Qbroad : not applied\n"; + else + fout << " DQ broadening Qbroad : " << value_std(qbroad, dqbroad) << " A**-1\n"; + + fout << " Scale factor : " << value_std(dscale, ddscale) << endl; + + fout << endl; + + fout << " Selected phases and atoms for this data set :\n"; + + for(size_t ip = 0; ip != psel.size(); ip++) + { + if (!psel[ip]) continue; + fout << " Phase " << ip+1 << " :\n"; + + fout << " Atoms (i) :"; + fout << selectedAtomsString(ip, 'i') << '\n'; + fout << " Atoms (j) :"; + fout << selectedAtomsString(ip, 'j') << '\n'; + } + fout << '\n'; + + fout << " Relative phase content in terms of\n"; + fout << " atoms unit cells mass\n"; + vector< pair > atomfractions; + vector< pair > cellfractions; + vector< pair > massfractions; + atomfractions = getAtomPhaseFractions(); + cellfractions = getCellPhaseFractions(); + massfractions = getMassPhaseFractions(); + for(size_t ip = 0; ip != psel.size(); ip++) + { + fout << " Phase " << ip + 1 << " :"; + value_std.left().width(24).leading_blank(true); + fout << value_std(atomfractions[ip].first, atomfractions[ip].second); + fout << value_std(cellfractions[ip].first, cellfractions[ip].second); + value_std.width(0); + fout << value_std(massfractions[ip].first, massfractions[ip].second); + fout << '\n'; + } + fout << endl; +} + +/************************************************* + Outputs parameter information + Thu Oct 13 2005 - CLF + Modified code to handle general types of + streams. +**************************************************/ +void Fit::output(ostream &fout) +{ + fout << " " << string(78,'-') << '\n' + << " PARAMETER INFORMATION :" << '\n' + << " " << string(78,'-') << endl; + + int npar = 0; + + for (int i=0; i order = this->order_by_id(); + vector::iterator i; + for (i = order.begin(); i != order.end(); ++i) + { + int nword = i - order.begin(); + bool lastword = (nword + 1) % 3 == 0 || nword + 1 == psize(); + double dpi = ip[*i] ? dp[*i] : 0.0; + fout << right << ' ' << setw(3) << id[*i] << setw(0) << ":" + << value_std.width(lastword ? 0 : 20)(p[*i], dpi); + fout << (lastword ? "\n" : " "); + } + + fout << " " << string(78,'-') << '\n' + << " REFINEMENT INFORMATION:\n" + << " " << string(78,'-') << endl; + + fout << " Number of iterations : " << iter << endl; + + fout << " Reduced chi squared : " << redchisq << '\n' + << " Rw - value : " << fit_rw << '\n' << endl; + + fout << " Correlations greater than 0.8 :\n\n"; + + bool lkor = false; + + for (i = order.begin(); i != order.end(); ++i) + { + if (!ip[*i]) continue; + + vector::iterator j; + for (j = i + 1; j != order.end(); ++j) + { + if (!ip[*j]) continue; + + double corr = covar[*i][*j]/dp[*i]/dp[*j]; + + if (fabs(corr) > 0.8) + { + fout << " Corr(p[" << id[*i] << "], p[" << id[*j] << "]) = " << corr << endl; + lkor = true; + } + } + } + if (!lkor) + fout << " *** none ***\n"; + } +} + + +// Parameter indices in the vector id are not ordered by default. +// Return a proper order indices for id. This method is used +// for parameters printout. +vector Fit::order_by_id() const +{ + assert(this->psize() == int(this->id.size())); + typedef pair IdIndex; + vector id_with_idx; + for (size_t i = 0; i < id.size(); ++i) + { + id_with_idx.push_back(IdIndex(id[i], i)); + } + sort(id_with_idx.begin(), id_with_idx.end()); + // build return value + vector rv; + rv.reserve(id_with_idx.size()); + vector::iterator ii; + for (ii = id_with_idx.begin(); ii != id_with_idx.end(); ++ii) + { + rv.push_back(ii->second); + } + return rv; +} + + +// End of file diff --git a/src/extensions/libpdffit2/parser.cc b/src/extensions/libpdffit2/parser.cc new file mode 100644 index 00000000..46a5157c --- /dev/null +++ b/src/extensions/libpdffit2/parser.cc @@ -0,0 +1,402 @@ +/*********************************************************************** +* +* pdffit2 by DANSE Diffraction group +* Simon J. L. Billinge +* (c) 2006 trustees of the Michigan State University +* All rights reserved. +* +* File coded by: Jacques Bloch +* +* See AUTHORS.txt for a list of people who contributed. +* See LICENSE.txt for license information. +* +************************************************************************ +* +* Formula parser implemented as methods of Fit class +* +* Comments: +* +***********************************************************************/ + +#include +#include +#include +#include +#include + +#include "MathUtils.h" +#include "pdffit.h" + +static vector vstack; +static vector > dstack; // stack with derivative vectors +static bool deriv; + +string stackvar(int i) +{ + ostringstream expr; + expr << '#' << i; + return(expr.str()); +} + +/***************************************************************************************** + Searches for all parameters in the expression and replace them by stack pointers + *****************************************************************************************/ +string Fit::substitute_pars(string &expr) +{ + int ipos=-1, bopen, bclose; + unsigned int i; + string idexpr; + + // search the expression for the next @-sign + while((bopen=expr.find('@',ipos+1)) != (int) string::npos) + { + int id; + + istringstream inexpr(expr); + inexpr.seekg(bopen+1); + + inexpr >> id; + + if (!inexpr) + throw parseError(expr); + + bclose = inexpr.tellg(); + + // expression must be a valid parameter id + int ipar = parfind(id); + + if (ipar == -1) + { + ostringstream msg; + msg << "parameter " << id << " undefined"; + throw constraintError(msg.str()); + } + + // check if same parameter already occurred in this formula + for (i=0; i dnumdp(used.size()); + for (i=0; i()); + } + } + + return expr; // okay +} + +// get next number from expression +// only fill derivatives if that number has derivatives +double Fit::getnum(istringstream &inexpr, vector &dnumdp) +{ + double num; + char c; + int id; + map::iterator iter; + + // Various possibilities when reading the next value inside the + // unbracketted expression + + if (deriv) dnumdp.clear(); + + inexpr >> c; + + if (inexpr.eof()) + throw parseError("Error while reading value"); + + // if first character is a minus sign, call getnum again with expression stripped + // from its minus sign + if ((c=='-') || (c=='+')) + { + num = getnum(inexpr, dnumdp); + if (deriv && !dnumdp.empty() && (c=='-')) + { + for (unsigned int i=0; i check for built-in function + // read-up to next # + else if ((c>='a') && (c<='z')) + { + int start=inexpr.tellg(); + start--; + string::size_type end; + end = inexpr.str().find('#', start); + if (end == string::npos) + { + throw parseError("Error while reading builtin function arguments"); + } + + string sbuiltin = inexpr.str().substr(start,end-start); + if ((iter=builtin.find(sbuiltin)) == builtin.end()) + { + throw parseError("Unknown builtin function"); + } + + // set read pointer behind #-sign + inexpr.seekg(end+1); + + // read argument number + inexpr >> id; + if (!inexpr) + throw parseError(inexpr.str()); + num = iter->second.func(vstack[id]); + + // fill the partial derivatives if function argument had derivatives + if (deriv && !dstack[id].empty()) + { + double fder=iter->second.deriv(vstack[id]); + dnumdp = vector(used.size()); + for(unsigned int i=0; i> id; + if (!inexpr) + throw parseError(inexpr.str()); + num = vstack[id]; + if (deriv && !dstack[id].empty()) dnumdp = dstack[id]; + } + else + { + inexpr.unget(); + inexpr >> num; + + if (!inexpr) + throw parseError("Error while reading value"); + } + return num; +} + +/********************************************** + computes a basic expression without brackets + ***********************************************/ +double Fit::compute(string &expr, vector &dnumdp) +{ + ostringstream ostreamexpr; + string opstring="*/+-"; + double num1, num2, num; + vector dnum1dp, dnum2dp; + char op; // operator + + // transform string to string stream to read numbers more easily + istringstream inexpr(expr); + + // Two parsing passes are performed to ensure correct precedence of + // operators: first for * and /, then for + and - + int pass = 1; + + while(1) + { + int pos, end; + + if (deriv) dnumdp.clear(); + + pos = inexpr.tellg(); + + num1 = getnum(inexpr, dnum1dp); + + inexpr >> op; + + // check if this ends the expression + // if pass==2: expression completely parsed + // if pass==1: go to pass 2 + if (inexpr.eof()) + { + if (pass==2) + { + num = num1; + if (deriv && !dnum1dp.empty()) + dnumdp = dnum1dp; + break; + } + else + { + pass = 2; + inexpr.clear(); + inexpr.str(expr); + continue; + } + } + + if (!inexpr) + throw parseError(expr); + + if (opstring.find(op) == string::npos) + throw parseError(expr); + + // if a + or - operation is encountered in pass 1 -> look for next operation + if ( (pass==1) && ((op == '+') || op == '-') ) + { + continue; + } + + num2 = getnum(inexpr,dnum2dp); + + if (!dnum1dp.empty() || !dnum2dp.empty()) + dnumdp = vector(used.size()); + + switch (op) + { + case '+': + num = num1+num2; + + if (deriv) + { + if (!dnum1dp.empty()) dnumdp = dnum1dp; + if (!dnum2dp.empty()) + for (unsigned int i=0; i< used.size(); i++) + dnumdp[i] += dnum2dp[i]; + } + break; + + case '-': + num = num1-num2; + + if (deriv) + { + if (!dnum1dp.empty()) dnumdp = dnum1dp; + if (!dnum2dp.empty()) + for (unsigned int i=0; i< used.size(); i++) + dnumdp[i] -= dnum2dp[i]; + } + break; + + case '*': + num = num1*num2; + + if (deriv) + { + if (!dnum1dp.empty()) + for (unsigned int i=0; i< used.size(); i++) + dnumdp[i] += dnum1dp[i]*num2; + if (!dnum2dp.empty()) + for (unsigned int i=0; i< used.size(); i++) + dnumdp[i] += num1*dnum2dp[i]; + } + break; + + case '/': + num = num1/num2; + + if (deriv) + { + if (!dnum1dp.empty()) + for (unsigned int i=0; i< used.size(); i++) + dnumdp[i] += dnum1dp[i]/num2; + if (!dnum2dp.empty()) + for (unsigned int i=0; i< used.size(); i++) + dnumdp[i] -= num1*dnum2dp[i]/sqr(num2); + } + break; + } + + end = inexpr.tellg(); + + // replace computed substring by stack pointer, and push value on the stack + expr.replace(pos,end-pos,stackvar(vstack.size())); + vstack.push_back(num); + + // store the derivatives as well. Note that the derivative vector may be empty + // if no derivatives was non-zero. + if (deriv) + dstack.push_back(dnumdp); + + inexpr.clear(); + inexpr.str(expr); + inexpr.seekg(pos); + } + + // the expression has been reduced to just one number + return num; +} + +/*************************************************************************************** + Searches the formula for bracketted expressions replace them by their numerical values + ****************************************************************************************/ + +double Fit::parse(string line, vector &dnumdp) +{ + int bopen, bclose; + string expression; + double num; + + if (line.find('#') != string::npos) + throw parseError("Illegal character in formula"); + + // the first elements on the stack will be the used parameter values + vstack.clear(); + used.clear(); + + // Search for parameters, check their existence and put on the stack + line = substitute_pars(line); + + // look for first closing bracket + while( (bclose=line.find(')')) != (int) string::npos) + { + // look for closest opening bracket in front of closing bracket + if ( (bopen=line.rfind('(',bclose-1)) == (int) string::npos) + throw parseError("Unmatched brackets in formula"); + + // isolate expression within the brackets + expression = line.substr(bopen+1,bclose-bopen-1); + + // compute isolated expression + num = compute(expression, dnumdp); + + // put the bracket-value on the stack and replace substring by stack pointer, + // and push new value on the stack + line.replace(bopen,bclose-bopen+1,stackvar(vstack.size())); + vstack.push_back(num); + + if (deriv) + dstack.push_back(dnumdp); + + } + + // After all brackets have been worked out, the final expression is evaluated + num = compute(line, dnumdp); + + return num; // okay +} + +// End of file diff --git a/src/extensions/libpdffit2/pdf.cc b/src/extensions/libpdffit2/pdf.cc new file mode 100644 index 00000000..0ab857b6 --- /dev/null +++ b/src/extensions/libpdffit2/pdf.cc @@ -0,0 +1,1776 @@ +/*********************************************************************** +* +* pdffit2 by DANSE Diffraction group +* Simon J. L. Billinge +* (c) 2006 trustees of the Michigan State University +* All rights reserved. +* +* File coded by: Jacques Bloch, Pavol Juhas +* +* See AUTHORS.txt for a list of people who contributed. +* See LICENSE.txt for license information. +* +************************************************************************ +* +* Mixed methods for PDF calculation from PdfFit, DataSet and Phase +* +* Comments: Up to date with 1.3.10 Fortran version. +* What a spagetti. +* +***********************************************************************/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "PointsInSphere.h" +#include "StringUtils.h" +#include "LocalPeriodicTable.h" +#include "MathUtils.h" +#include "ShapeFactors.h" + +#include "pdffit.h" + +using NS_PDFFIT2::pout; + +#define NEW_SHARP + +/***************************************************************** + Allocating space for dummy dataset when calculating PDF + without data +******************************************************************/ +void PdfFit::alloc(char tp, double qmax, double qdamp, double rmin, double rmax, int bin) +{ + + DataSet* pds = new DataSet(this); + int i; + if (rmax < rmin || rmin < 0 || rmax < 0) + { + throw ValueError("Check rmin, rmax"); + } + if (bin <= 1) + { + throw ValueError("bin must be > 1"); + } + if( qmax < 0.0 ) + { + throw ValueError("qmax must be >= 0"); + } + if( qdamp < 0 ) + { + throw ValueError("qdamp must be >= 0"); + } + + // 2009-03-11 PJ: Removed check if a structure has been loaded before. + // It can be now loaded after calling alloc. + + pds->iset = nset+1; + + pds->scattering_type = tp; + + pds->qmax = qmax; + pds->qdamp = qdamp; + pds->rmin = pds->rfmin = rmin; + pds->rmax = pds->rfmax = rmax; + pds->bin = bin; + pds->deltar = (rmax-rmin)/double(bin-1); + pds->name = "Dummy set"; + + pds->obs.resize(bin); + pds->wic.resize(bin); + + for (i=0; iobs[i] = 0.0; + pds->wic[i] = 1.0; + } + + *pout << " Allocated PDF data set " << pds->iset << " (r = " + << rmin << " to " << rmax << " A, " << bin << " points) ..." << endl; + + // automatically select existing phases and its atoms for the new dataset + for (int ip=0; ipselphase(ip, this->phase[ip]); + + this->datasets.push_back(pds); + nset++; + setdata(nset); +} + +// cut-away high Q harmonics using fast Fourier transformation +void DataSet::applyQmaxCutoff(double* y, size_t len) +{ + // pad y with the same number of zeros up to the next power of 2 + size_t padlen = 2*len; + // MS compatibility fix + padlen = (size_t) pow(2.0, ceil(log2(padlen))) ; + // ycpad is complex, so it needs to be twice as long + valarray ycpad_array(2*padlen); + double* ycpad = &(ycpad_array[0]); + fill_n(ycpad, 2*padlen, 0.0); + // copy y to real components of ycpad + for (size_t i = 0; i != len; ++i) ycpad[2*i] = y[i]; + // apply fft + int status; + status = gsl_fft_complex_radix2_forward(ycpad, 1, padlen); + if (status != GSL_SUCCESS) + { + throw calculationError("Fourier Transformation failed."); + } + // Q step for ycpad + double dQ = 2*M_PI/((padlen-1)*deltar); + // loQidx, hiQidx correspond to Qmax and -Qmax frequencies + // they need to be integer to catch cases with huge qmax/dQ + int loQidx = int( ceil(qmax/dQ) ); + int hiQidx = padlen + 1 - loQidx; + // zero high Q components in ycpad + for (int i = loQidx; i < hiQidx; ++i) + { + ycpad[2*i] = ycpad[2*i+1] = 0.0; + } + // transform back + status = gsl_fft_complex_radix2_inverse(ycpad, 1, padlen); + if (status != GSL_SUCCESS) + { + throw calculationError("Fourier Transformation failed."); + } + // copy real components + for (size_t i = 0; i != len; ++i) y[i] = ycpad[2*i]; +} + + +/***************************************************** + Calculate PDF for dataset with current structure + + In initial version: one phase +******************************************************/ + +void DataSet::determine(bool ldiff, bool lout, Fit &fit) +{ + //int kk, ibin, ip; + int ib, ie, ig; + double rmax2, rmin2, gaus, rk, rb,re, rtot, ract; + vector ppp; + double dd[3], d[3], dist2, dist, rg, r; + double sigmap, sigma, gnorm, ampl; + long totcalc=0; + + if (lout) *pout << " Calculating PDF ...\n"; + + // total # points to be fitted + nfmin = nint((rfmin-rmin)/deltar); + nfmax = nint((rfmax-rmin)/deltar); + + // extend calculation range before applying Qmax cutoff + extendCalculationRange(lout); + + rmax2 = sqr(rcmax+1.0); + rmin2 = sqr(rcmin-1.0) * ((rcmin-1.0) < 0.0 ? -1.0 : 1.0); + rmin2 = max(0.01,rmin2); + + pdftot.resize(ncmax+1); + fill(pdftot.begin(), pdftot.end(), 0.0); + calc.resize(ncmax+1,psel.size()); + ppp.resize(ncmax+1); + + if (ldiff) + { + fit_a.resize(ncmax+1, fit.varsize()); + fit_a = 0.0; + } + + // ------ Loop over all phases + + for (unsigned ip=0; ip ignore_i(phase.natoms); + valarray ignore_j(phase.natoms); + for (int aidx = 0; aidx < phase.natoms; ++aidx) + { + ignore_i[aidx] = phase_ignore_i[&phase].count(aidx); + ignore_j[aidx] = phase_ignore_j[&phase].count(aidx); + } + + // ------ Get the ratio total pairs/selected weight in structure + + rtot = 0.0; + ract = 0.0; + for (int iidx = 0; iidx < phase.natoms; ++iidx) + { + Atom& ai = phase.atom[iidx]; + for (int jidx = iidx; jidx < phase.natoms; ++jidx) + { + Atom& aj = phase.atom[jidx]; + double halfloopscale = (iidx == jidx) ? 1.0 : 2.0; + rtot += halfloopscale * ai.weight * aj.weight; + // skip ignored pair + bool skip = (ignore_i[iidx] || ignore_j[jidx]) && + (ignore_i[jidx] || ignore_j[iidx]); + if (skip) continue; + ract += halfloopscale * ai.weight * aj.weight; + } + } + phase.dnorm = ract/rtot; + + //-------------------------------------------------------------- + + fill(ppp.begin() + ncmin, ppp.begin() + ncmax + 1, 0.0); + + // calculate range for PointsInSphere sequencer + // (negative rsphmin is no problem) + double buffzone = phase.circum_diameter(); + double rsphmin = sqrt(rmin2) - buffzone; + double rsphmax = sqrt(rmax2) + buffzone; + // limit rsphmax, when stepcut has been set for the phase + if (phase.stepcut > 0.0) + { + rsphmax = min(rsphmax, phase.stepcut + buffzone); + } + PointsInSphere sph( rsphmin, rsphmax, phase.a0[0]*phase.icc[0], + phase.a0[1]*phase.icc[1], phase.a0[2]*phase.icc[2], + phase.win[0], phase.win[1], phase.win[2] ); + + // loop only over selected atom indexes + for (int iidx = 0; iidx < phase.natoms; ++iidx) + { + Atom& ai = phase.atom[iidx]; + for (int jidx = iidx; jidx < phase.natoms; ++jidx) + { + Atom& aj = phase.atom[jidx]; + + // skip ignored pair + bool skip = (ignore_i[iidx] || ignore_j[jidx]) && + (ignore_i[jidx] || ignore_j[iidx]); + if (skip) continue; + + for (sph.rewind(); !sph.finished(); sph.next()) + { + for (int i=0; i<3; i++) + { + dd[i] = ai.pos[i] - aj.pos[i] - + sph.mno[i]*phase.icc[i]; + d[i] = dd[i] * phase.a0[i]; + } + dist2 = phase.skalpro(dd,dd); + + // check if pair distance is within dataset r limits + if ((dist2 < rmin2) || (dist2 > rmax2)) continue; + + // dist is distance r_ij + dist = sqrt(dist2); + + //------ Setting up 'thermal' Gaussian + sigmap = sqrt(phase.msdAtoms(ai, aj, dd)); + // neglect unphysical summed square displacements + if (sigmap <= 0.0) continue; + + //- PDF peak width modifications - new 07/2003 + +#if defined(NEW_SHARP) + // Computation of peak sharpening sigma + // sigma = sigmap* sqrt(1 - delta2/r_ij^2 - delta1/r_ij + qbroad*r_ij^2) + double corfact; + corfact = 1 - phase.delta2/dist2 + - phase.delta1/dist + sqr(qbroad)*dist2; + + // if sigma negative: set it back to 1e-5 just for this point + // note: derivative will be incorrect in this case + if (corfact <= 0) + { + continue; // neglect contribution + } + else + { + sigma = sigmap * sqrt(corfact); + } +#else + // Computation of peak sharpening sigma + // sigma = sqrt(sqr(sigmap) - delta2/r_ij^2 - delta1/r_ij + qbroad*r_ij^2) + double sigma2; + sigma2 = sqr(sigmap) - phase.delta2/dist2 + - phase.delta1/dist + sqr(qbroad)*dist2; + + // if sigma2 negative: set it back to 1e-5 just for this point + // note: derivative will be incorrect in this case + if (sigma2 <= 1e-10) + { + sigma = 1e-5; // neglect contribution + } + else + { + sigma = sqrt(sigma2); + } +#endif + // apply rcut if requested + if (dist < phase.rcut) + { + sigma *= phase.sratio; + } + + // The gaus curve is computed up to distance of 5 sigma + gnorm = 1.0/(sqrt(2.0*M_PI)*sigma); + ampl = ai.occ * ai.weight * aj.occ * aj.weight; + + if (iidx != jidx) ampl += ampl; + + rb = max(rcmin, dist - 5.0*sigma); + re = min(rcmax, dist + 5.0*sigma); + if (phase.stepcut > 0.0) + { + re = min(re, phase.stepcut); + } + + ib = nint((rb-rmin)/deltar); + ie = nint((re-rmin)/deltar); + + for(ig=ib; ig<=ie; ig++) + { + totcalc++; + rk = rmin + ig*deltar; + rg = rk-dist; + gaus = gnorm * exp(-0.5*sqr(rg/sigma)); + ppp[ig] += ampl*gaus; + + // if derivative are needed + if (ldiff) + { + pdf_derivative(phase, ai, aj, rk, + sigma, sigmap, dist, d, ampl, gaus, + fit, fit_a[ig]); + } + } + } + } + } + + //------ - Convert to proper G(r) and add to total PDF + + for (int i = ncmin; i<=ncmax; i++) + { + r = i*deltar + rmin; + + calc[i][ip] = ppp[i]/phase.np/r - 4.0*M_PI*r*phase.rho0*phase.dnorm; + + // Q-resolution envelope + if (qdamp > 0.0) + { + calc[i][ip] *= exp(-sqr(r*qdamp)/2.0); + } + + // PDF envelope for spherical nano particles + if (phase.spdiameter > 0.0) + { + calc[i][ip] *= sphereEnvelope(r, phase.spdiameter); + } + + // Empirical shape step cutoff of the PDF + if (phase.stepcut > 0.0) + { + double stepfactor = (r <= phase.stepcut) ? 1.0 : 0.0; + calc[i][ip] *= stepfactor; + } + + //if ( (r <= phase.corr_max) || (phase.corr_max <= 0.0) ) + pdftot[i] += this->dscale * phase.pscale * calc[i][ip]; + } + } + + // finalize computation of derivatives if required + // this HAS to happen before the multiplication by deltar/pi and before + // the convolution to avoid "double operations" on the derivatives, + // as this will be taken care of in the derivatives. + if (ldiff) + { + fit_setup_derivatives(fit); // computes matrix dpdf/dvar + } + + //for (i=ncmin;i<=ncmax;i++) + // *pout << i << " " << pdftot[i] << endl; + + // From here on we can restrict ourselves to the range [nfmin,nfmax] + // for the outerloop + + // Apply Qmax cutoff + if (qmax > 0.0) + { + applyQmaxCutoff(&pdftot[ncmin], ncmax-ncmin+1); + } +} + +/***************************************************************** + This routine calculates the sums over 'ij' needed for the + derivatives - this is faster than doing the complete loop + in 'pdf_determine' again .. + gaus: gaus[igaus+kk] from +******************************************************************/ +void DataSet::pdf_derivative (Phase &phase, + const Atom& atomi, const Atom& atomj, double rk, double sigma, + double sigmap, double dist, double d[3], double ampl,double gaus, + Fit &fit, double* fit_a_i) +{ + double rd,dg; + rd = dg = 0.0; + double s11,s22,s33,s12,s13,s23; + double drdx, drda, phi, dsdphi, dspdx, dspda; + int ipar, i, ioffset, joffset; + + //------ Some common calculations + + s11 = atomi.u[0] + atomj.u[0]; + s22 = atomi.u[1] + atomj.u[1]; + s33 = atomi.u[2] + atomj.u[2]; + s12 = atomi.u[3] + atomj.u[3]; + s13 = atomi.u[4] + atomj.u[4]; + s23 = atomi.u[5] + atomj.u[5]; + + rd = (rk-dist)/sigma; + + if (dist < phase.rcut) + { + phi = phase.sratio; + dsdphi = sigma/phi; + } + else + { + phi = 1.0; + dsdphi = 0.0; + } + + // derivative of T_ij wrt sigma + double T = ampl*gaus; + double dTds = T/sigma*(rd*rd-1); + double dTdr = (rk-dist)/sqr(sigma)*T; + +#if defined(NEW_SHARP) + // define s2 = sp**2 - delta2/sqr(rij) - delta1/rij + alpha*sqr(rij) + // then s = phi*sqrt(s2) + double dsds2 = sqr(phi*sigmap)/(2.0*sigma); + double dsdsp = sigma/sigmap; + double dsdr = dsds2*(2.0*phase.delta2/cube(dist) + + phase.delta1/sqr(dist) + 2.0*sqr(qbroad)*dist); +#else + // define s2 = sp**2 - delta2/sqr(rij) - delta1/rij + alpha*sqr(rij) + // then s = phi*sqrt(s2) + double dsds2 = sqr(phi)/(2.0*sigma); + if (sigma==1e-5) dsds2 = 0; + + double dsdsp = 2.0*sigmap*dsds2; + double dsdr = dsds2*(2.0*phase.delta2/cube(dist) + + phase.delta1/sqr(dist) + 2.0*sqr(qbroad)*dist); +#endif + double dspdr = - sigmap/dist; + + + + /*---------------------------------------------------------------- + //------ Derivatives per atom : x,y,z,u,o + //- ------------------------------------------------------------- + + dTdx = dTds.(dsdsp.(dspdr.drdx+dspdx) + dsdr.drdx) + dTdr.drdx + */ + + ioffset = atomi.offset; + joffset = atomj.offset; + + // ----- d/dx[ip,ia] + + if ( (fit.refvar[ioffset] != -1) || (fit.refvar[joffset] != -1) ) + { + drdx = phase.a0[0]/dist*(d[0] + phase.cosg*d[1] + phase.cosb*d[2]); + dspdx = phase.a0[0]*(d[0]*s11 + d[1]*s12 + d[2]*s13)/sqr(dist)/sigmap; + + dg = dTds*(dsdsp*(dspdr*drdx+dspdx) + dsdr*drdx) + dTdr*drdx; + } + + if ( (ipar=fit.refvar[ioffset++]) != -1) + { + fit_a_i[ipar] += dg; + } + + if ( (ipar=fit.refvar[joffset++]) != -1) + { + fit_a_i[ipar] -= dg; + } + + + // ----- d/dy[ip,ia] + + if ( (fit.refvar[ioffset] != -1) || (fit.refvar[joffset] != -1) ) + { + drdx = phase.a0[1]/dist*(phase.cosg*d[0] + d[1] + phase.cosa*d[2]); + dspdx = phase.a0[1]*(d[0]*s12 + d[1]*s22 + d[2]*s23)/sqr(dist)/sigmap; + + dg = dTds*(dsdsp*(dspdr*drdx+dspdx) + dsdr*drdx) + dTdr*drdx; + } + + if ( (ipar=fit.refvar[ioffset++]) != -1) + { + fit_a_i[ipar] += dg; + } + + if ( (ipar=fit.refvar[joffset++]) != -1) + { + fit_a_i[ipar] -= dg; + } + + + // ----- d/dz[ip,ia] + + if ( (fit.refvar[ioffset] != -1) || (fit.refvar[joffset] != -1) ) + { + drdx = phase.a0[2]/dist*(phase.cosb*d[0] + phase.cosa*d[1] + d[2]); + dspdx = phase.a0[2]*(d[0]*s13 + d[1]*s23 + d[2]*s33)/sqr(dist)/sigmap; + + dg = dTds*(dsdsp*(dspdr*drdx+dspdx) + dsdr*drdx) + dTdr*drdx; + } + + if ( (ipar=fit.refvar[ioffset++]) != -1) + { + fit_a_i[ipar] += dg; + } + + if ( (ipar=fit.refvar[joffset++]) != -1) + { + fit_a_i[ipar] -= dg; + } + + + // ----- d/du[j,ip,ia] (j=11,22,33,12,13,23) + + /* + dTdu = dTds.dsdsp.dspdu + */ + + // u[0], u[1], u[2] + + double dspdu = 1/(2.0*sigmap*sqr(dist)); + + double fsimp = dTds*dsdsp*dspdu; + + for (i=0; i<3; i++) + { + dg = fsimp*sqr(d[i]); + + if ( (ipar=fit.refvar[ioffset++]) != -1) + { + fit_a_i[ipar] += dg; + } + //*pout << phase.a0[i] << " " << d[i] << " " << ig << " " << i << " " << fit_a_i[ipar] << endl; + + if ( (ipar=fit.refvar[joffset++]) != -1) + { + fit_a_i[ipar] += dg; + } + } + + // u[3] + + dg = 2.0*fsimp*d[0]*d[1]; + + if ( (ipar=fit.refvar[ioffset++]) != -1) + { + fit_a_i[ipar] += dg; + } + + if ( (ipar=fit.refvar[joffset++]) != -1) + { + fit_a_i[ipar] += dg; + } + + // u[4] + + dg = 2.0*fsimp*d[0]*d[2]; + + if ( (ipar=fit.refvar[ioffset++]) != -1) + { + fit_a_i[ipar] += dg; + } + + if ( (ipar=fit.refvar[joffset++]) != -1) + { + fit_a_i[ipar] += dg; + } + + // u[5] + + dg = 2.0*fsimp*d[1]*d[2]; + + if ( (ipar=fit.refvar[ioffset++]) != -1) + { + fit_a_i[ipar] += dg; + } + + if ( (ipar=fit.refvar[joffset++]) != -1) + { + fit_a_i[ipar] += dg; + } + + + // ----- d/d occ[ip,ia], d/d occ[ip,ja] + + if ( (ipar=fit.refvar[ioffset++]) != -1) + { + fit_a_i[ipar] += T/atomi.occ; + } + + if ( (ipar=fit.refvar[joffset++]) != -1) + { + fit_a_i[ipar] += T/atomj.occ; + } + + //------ ---------------------------------------------------------------- + //------ Derivatives per phase : lat,delta2,delta1 + //------ ---------------------------------------------------------------- + + // ----- d/d(lattice parameter a) + + ioffset = phase.offset; + + if ( (ipar=fit.refvar[ioffset++]) != -1) + { + drda = (d[0] + phase.cosg*d[1] + phase.cosb*d[2])*d[0]/phase.a0[0]/dist; + dspda = (d[0]*s11 + d[1]*s12 + d[2]*s13)*d[0]/phase.a0[0]/sqr(dist)/sigmap; + + dg = (dTds*(dsdsp*dspdr+dsdr) + dTdr)*drda + dTds*dsdsp*dspda; + + fit_a_i[ipar] += dg; + } + + // ----- d/d(lattice parameter b) + + if ( (ipar=fit.refvar[ioffset++]) != -1) + { + drda = (phase.cosg*d[0] + d[1] + phase.cosa*d[2])*d[1]/phase.a0[1]/dist; + dspda = (d[0]*s12 + d[1]*s22 + d[2]*s23)*d[1]/phase.a0[1]/sqr(dist)/sigmap; + + dg = (dTds*(dsdsp*dspdr+dsdr) + dTdr)*drda + dTds*dsdsp*dspda; + + fit_a_i[ipar] += dg; + } + + // ----- d/d(lattice parameter c) + + if ( (ipar=fit.refvar[ioffset++]) != -1) + { + drda = (phase.cosb*d[0] + phase.cosa*d[1] + d[2])*d[2]/phase.a0[2]/dist; + dspda = (d[0]*s13 + d[1]*s23 + d[2]*s33)*d[2]/phase.a0[2]/sqr(dist)/sigmap; + + dg = (dTds*(dsdsp*dspdr+dsdr) + dTdr)*drda + dTds*dsdsp*dspda; + + fit_a_i[ipar] += dg; + } + + + // ----- d/d(lattice angle alpha) + + if ( (ipar=fit.refvar[ioffset++]) != -1) + { + drda = - rad*phase.sina*d[1]*d[2]/dist; + + dg = (dTds*(dsdsp*dspdr+dsdr) + dTdr)*drda; + + fit_a_i[ipar] += dg; + } + + // ----- d/d(lattice angle beta) + + if ( (ipar=fit.refvar[ioffset++]) != -1) + { + drda = - rad*phase.sinb*d[0]*d[2]/dist; + + dg = (dTds*(dsdsp*dspdr+dsdr) + dTdr)*drda; + + fit_a_i[ipar] += dg; + } + + // ----- d/d(lattice angle gamma) + + if ( (ipar=fit.refvar[ioffset++]) != -1) + { + drda = - rad*phase.sing*d[0]*d[1]/dist; + + dg = (dTds*(dsdsp*dspdr+dsdr) + dTdr)*drda; + + fit_a_i[ipar] += dg; + } + + // Derivatives wrt the peak sharpening parameters + + // ----- d/d(delta2) + + + if ( (ipar=fit.refvar[ioffset++]) != -1) + { + dg = -dTds*dsds2/sqr(dist); + fit_a_i[ipar] += dg; + } + + // ----- d/d(delta1) + + if ( (ipar=fit.refvar[ioffset++]) != -1) + { + dg = -dTds*dsds2/dist; + fit_a_i[ipar] += dg; + } + + // ----- d/d(pscale) + + ioffset++; + + // ----- d/d(spdiameter) + + ioffset++; + + // ----- d/d(sratio) + + if ( (ipar=fit.refvar[ioffset++]) != -1) + { + dg = dTds*dsdphi; + fit_a_i[ipar] += dg; + } + + + //------ ---------------------------------------------------------------- + //------ Derivatives per data set : dscale, qdamp, qbroad + //------ ---------------------------------------------------------------- + + ioffset = this->offset; + + // ----- d/d(dscale[is]) + + ioffset++; + + // ----- d/d(qdamp[is]) + + ioffset++; + + // ----- d/d(qbroad[ip]) + + if( (ipar=fit.refvar[ioffset++]) != -1) + { + dg = dTds*dsds2*(2.0*qbroad*sqr(dist)); + fit_a_i[ipar] += dg; + } + +} + + +/**************************************************************** +* Calculated average atom mass in this phase +*****************************************************************/ +double Phase::averageAtomicMass() +{ + double mavg = 0.0; + for (VAIT ai = atom.begin(); ai != atom.end(); ++ai) + { + mavg += ai->occ * ai->atom_type->M; + } + mavg /= np; + return mavg; +} + +/**************************************************************** +* Calculated average scattering factor for given radiation type +*****************************************************************/ +double Phase::averageScatteringFactor(char tp) +{ + double bavg = 0.0; + for (VAIT ai = atom.begin(); ai != atom.end(); ++ai) + { + bavg += ai->occ * ai->atom_type->sf(tp); + } + bavg /= np; + return bavg; +} + +/**************************************************************** +* Update atom weights for given scattering type +*****************************************************************/ +void Phase::setup_weights(char tp) +{ + // calculate average scattering factor + double bavg = averageScatteringFactor(tp); + // get normalized weight of each atom + for (VAIT ai = atom.begin(); ai != atom.end(); ++ai) + { + ai->weight = ai->atom_type->sf(tp) / bavg; + } +} + +/************************************************************************ +* Extend r-range by 6 ripples of sinc before applying Qmax cutoff. +* Contributions from peaks outside should be less than 1.5%. +* +* todo: should also extend by the 5*max(sigma) +************************************************************************/ +void DataSet::extendCalculationRange(bool lout) +{ + const int nripples = 6; + // initialize calculation range to fitting range + rcmin = rfmin; + rcmax = rfmax; + ncmin = nint((rcmin - rmin)/deltar); + ncmax = nint((rcmax - rmin)/deltar); + // check if Qmax cutoff is applied + if (!(0.0 < qmax)) return; + // get extension width + double rext = nripples*2*M_PI/qmax; + // FIXME - it should be possible to have rcmin smaller than rmin, + // but there is too much spaghetti that depends on it. + rcmin = max(rmin, rfmin - rext); + rcmax = rfmax + rext; + ncmin = nint((rcmin - rmin)/deltar); + ncmax = nint((rcmax - rmin)/deltar); + if (lout) + { + *pout << " Extending PDF search distance to " << + rcmin << " -> " << rcmax << " A ...\n"; + } +} + +/************************************************************************ + * Diameter of sphere that can enclose primitive cell. + * This is equal to the longest unit cell diagonal. + ************************************************************************/ +double Phase::circum_diameter() +{ + if (atom.empty()) return 0.0; + // array of all 4 diagonals + const size_t numdiags = 4; + static double ucdiagonals[numdiags][3] = { + {+1.0, +1.0, +1.0}, + {-1.0, +1.0, +1.0}, + {+1.0, -1.0, +1.0}, + {+1.0, +1.0, -1.0} + }; + double maxnorm = -1; + for (size_t idx = 0; idx != numdiags; ++idx) + { + const double* ucd = ucdiagonals[idx]; + double normucd = sqrt(skalpro(ucd, ucd)); + if (normucd > maxnorm) + { + maxnorm = normucd; + } + } + // adjust to round-off errors + const double epsilond = sqrt(numeric_limits().epsilon()); + maxnorm = maxnorm*(1.0+epsilond) + epsilond; + return maxnorm; +} + +/************************************************************************ + * combined mean square displacements of 2 atoms along lattice vector + ************************************************************************/ +double Phase::msdAtoms(const Atom& ai, const Atom& aj, double* vl) +{ + // msd = transpose(gten*vln) * ar[i]*U[i,j]*ar[j] * gten*vln + // normalize vl + double vlnorm = sqrt(skalpro(vl,vl)); + double vln[3] = { vl[0]/vlnorm, vl[1]/vlnorm, vl[2]/vlnorm }; + // combine squared atom displacements + double U[6]; + for (size_t i = 0; i != 6; ++i) + { + U[i] = ai.u[i] + aj.u[i]; + } + // Un = ar[i]*U[i,j]*ar[j] + double Un[6] = { U[0]*ar[0]*ar[0], U[1]*ar[1]*ar[1], U[2]*ar[2]*ar[2], + U[3]*ar[0]*ar[1], U[4]*ar[0]*ar[2], U[5]*ar[1]*ar[2] }; + // rhs = gten*vln + double rhs[3] = { 0.0, 0.0, 0.0 }; + for (size_t i = 0; i != 3; ++i) + { + for (size_t j = 0; j != 3; ++j) + { + rhs[i] += gten[i][j] * vln[j]; + } + } + // msd = transpose(rhs) * Un * rhs + double msd; + msd = Un[0]*rhs[0]*rhs[0] + Un[1]*rhs[1]*rhs[1] + Un[2]*rhs[2]*rhs[2] + + 2*Un[3]*rhs[0]*rhs[1] + 2*Un[4]*rhs[0]*rhs[2] + 2*Un[5]*rhs[1]*rhs[2]; + return msd; +} + +/********************************* +------ - Save fit results + Thu Oct 13 2005 - CLF + Changed code to return a string of the + saved file. Actually saving the file is + optional. +*********************************/ +string PdfFit::save_res(string fname) +{ + //check to see if a refinement has even been done. + //after a refinement is finished, fit.iter = -1 + if(fit.iter == 0) + { + throw unassignedError("Refinement must be performed first"); + } + ofstream fout; + stringstream outfilestream; + string outfilestring = ""; + + outfilestream << " " << string(78,'=') << endl + << " PDF REFINEMENT\n" + << " Using PDFFIT version : " << PdfFit::version() << endl + << " " << string(78,'=') << endl; + + for(int ip=0; ipoutput(outfilestream); + + fit.output(outfilestream); + + outfilestream << " " << string(78,'=') << endl; + + if( fname != "" ) + { + fout.open(fname.c_str()); + + if (!fout) + { + throw IOError("Cannot create output file"); + } + + *pout << " Saving fit results to file : " << fname << endl; + + fout << outfilestream.str(); + //fout.setf(ios::showpoint); + + fout.close(); + } + + return outfilestream.str(); +} + +/************************************************* + ------- Save PDF, structure or complete result + Thu Oct 13 2005 - CLF + Changed code to return a string of the + saved file. Actually saving the file is + optional. +**************************************************/ +string PdfFit::save_pdf(int iset, string fname) +{ + string outfilestring = ""; + + //------ - Save PDF (G(r)) + + if ( (iset < 1) || (iset > nset) ) + { + throw unassignedError("data set does not exist"); + } + else if( fname != "" ) + { + ofstream fout; + fout.open(fname.c_str()); + + if (!fout) + { + throw IOError("cannot create output file"); + } + + *pout << " Saving PDF data set " << iset << " to file : " << fname << endl; + + outfilestring = datasets[iset-1]->build_pdf_file(); + + fout << outfilestring; + fout.close(); + } + else + { + outfilestring = datasets[iset-1]->build_pdf_file(); + } + + return outfilestring; +} + + +/* + Thu Oct 13 2005 - CLF + Changed code to return a string of the + saved file. +*/ +string DataSet::build_pdf_file() +{ + string blank=string(4,' '); + stringstream outfilestream; + outfilestream.setf(ios::showpoint); + + for (int i=nfmin;i<=nfmax;i++) + { + double r = i*deltar + rmin; + outfilestream << setw(12) << r << blank << setw(12) << pdftot[i] << blank << setw(12) << 0.0 + << blank << setw(12) << 1.0/sqrt(wic[i]) << blank << setw(12) + << obs[i]-pdftot[i] << endl; + } + + return outfilestream.str(); +} + +//------ - Save DIF file (Gobs-G(r)) +/* + Thu Oct 13 2005 - CLF + Changed code to return a string of the + saved file. Actually saving the file + is optional. +*/ + +string PdfFit::save_dif(int iset, string fname) +{ + + ofstream fout; + string outfilestring = ""; + + if ( (iset < 1) || (iset > nset) ) + { + throw unassignedError("Data set does not exist"); + } + else if (fname != "" ) + { + fout.open(fname.c_str()); + + if (!fout) + { + throw IOError("Cannot create output file"); + } + + *pout << " Saving difference data set " << iset << " to file : " << fname << endl; + + outfilestring = datasets[iset-1]->build_dif_file(); + + fout << outfilestring; + fout.close(); + } + else + { + outfilestring = datasets[iset-1]->build_dif_file(); + } + + return outfilestring; +} + +/* + Thu Oct 13 2005 - CLF + Changed code to return a string of the saved file. +*/ +string DataSet::build_dif_file() +{ + string blank=string(4,' '); + stringstream outfilestream; + outfilestream.setf(ios::showpoint); + + for (int i=nfmin;i<=nfmax;i++) + { + double r = i*deltar + rmin; + outfilestream << setw(12) << r << blank << setw(12) << obs[i]-pdftot[i] << endl; + } + + return outfilestream.str(); +} + +void PdfFit::selphase(int ip) +{ + if (!curset) + { + throw unassignedError("No data set selected"); + } + assert(nphase == (int)phase.size()); + if (ip == ALL) + { + curset->psel = phase; + } + else + { + // check if one-based index ip is out of bounds + if (ip < 1 || ip > nphase) + { + stringstream eout; + eout << "Phase " << ip << " undefined"; + throw unassignedError(eout.str()); + } + curset->selphase(ip - 1, phase[ip - 1]); + } +} + +void DataSet::selphase(int ip, Phase *phase) +{ + if (int(psel.size()) <= ip) + { + psel.resize(ip+1); + } + psel[ip] = phase; +} + + +vector DataSet::getcrw() const +{ + assert(mowner); + double wsqobs = mowner->totalWeighedSquareObs(); + // Get reciprocal value of wsqobs. + // Do not normalize when wsqobs is zero. + double recwsqobs = (wsqobs > 0) ? (1.0 / wsqobs) : 1.0; + vector rv = this->cumchisq; + vector::iterator xi; + for (xi = rv.begin(); xi != rv.end(); ++xi) + { + *xi = sqrt(*xi * recwsqobs); + } + return rv; +} + + +double DataSet::weighedSquareObs() const +{ + double rv = 0; + for (int i = nfmin; i <= nfmax; i++) + { + rv += wic[i] * obs[i] * obs[i]; + } + return rv; +} + + +double DataSet::getdsrw() const +{ + vector crw = this->getcrw(); + double rv = crw.empty() ? 0.0 : crw.back(); + return rv; +} + + +double DataSet::getdsredchisq() const +{ + assert(mowner); + int nredobs = mowner->totalReducedObservations(); + double c2 = this->cumchisq.empty() ? 0.0 : this->cumchisq.back(); + double rv = (nredobs > 0) ? (c2 / nredobs) : 0.0; + return rv; +} + + +void PdfFit::pdesel(int ip) +{ + if (!curset) + { + throw unassignedError("No data set selected"); + } + assert(nphase == (int)curset->psel.size()); + if (ip == ALL) + { + fill(curset->psel.begin(), curset->psel.end(), + static_cast(NULL)); + } + else + { + // check if one-based index ip is out of bounds + if (ip < 1 || ip > nphase) + { + stringstream eout; + eout << "phase " << ip << " undefined"; + throw unassignedError(eout.str()); + } + curset->psel[ip - 1] = NULL; + } +} + +// phase[ip-1] or curphase for ip == 0 +Phase* PdfFit::getphase(int ip) +{ + Phase* ph = (0 < ip && ip <= nphase) ? phase[ip-1] : curphase; + if (!ph || ip < 0 || ip > nphase) + { + throw unassignedError("Phase does not exist."); + } + return ph; +} + +void PdfFit::check_sel_args(int ip, char ijchar, int aidx1) +{ + ostringstream emsg; + if (!curset) + { + throw unassignedError("No data set selected"); + } + if (ip < 1 || ip > int(curset->psel.size())) + { + emsg << "phase " << ip << " undefined or not selected\n"; + throw unassignedError(emsg.str()); + } + if (ijchar != 'i' && ijchar != 'j') + { + ostringstream emsg; + emsg << "Invalid value of ijchar '" << ijchar << "'"; + throw ValueError(emsg.str()); + } + if (aidx1 < 1 || aidx1 > (curset->psel[ip - 1]->natoms)) + { + emsg << "invalid atom index " << aidx1 << ".\n"; + throw ValueError(emsg.str()); + } +} + +void PdfFit::selphaseForEachDataSet(Phase* ph) +{ + // find 0-based index of ph in PdfFit::phase vector + assert(count(this->phase.begin(), this->phase.end(), ph) > 0); + int phidx0 = find(this->phase.begin(), this->phase.end(), ph) - + this->phase.begin(); + vector::iterator dsi; + for (dsi = this->datasets.begin(); dsi != this->datasets.end(); ++dsi) + { + DataSet* pds = *dsi; + pds->selphase(phidx0, ph); + } +} + +void PdfFit::selectAtomType(int ip, char ijchar, char* symbol, bool select) +{ + check_sel_args(ip, ijchar); + Phase* ph = curset->psel[ip - 1]; + const LocalPeriodicTable* lpt = ph->getPeriodicTable(); + const AtomType* atp = lpt->lookup(symbol); + set& ignored = ijchar == 'i' ? + curset->phase_ignore_i[ph] : curset->phase_ignore_j[ph]; + for (int aidx = 0; aidx < ph->natoms; ++aidx) + { + if (atp != ph->atom[aidx].atom_type) continue; + if (select) ignored.erase(aidx); + else ignored.insert(aidx); + } +} + +void PdfFit::selectAtomIndex(int ip, char ijchar, int aidx1, bool select) +{ + check_sel_args(ip, ijchar, aidx1); + Phase* ph = curset->psel[ip - 1]; + set& ignored = ijchar == 'i' ? + curset->phase_ignore_i[ph] : curset->phase_ignore_j[ph]; + int aidx = aidx1 - 1; + if (select) ignored.erase(aidx); + else ignored.insert(aidx); +} + +void PdfFit::selectAll(int ip, char ijchar) +{ + check_sel_args(ip, ijchar); + Phase* ph = curset->psel[ip - 1]; + set& ignored = ijchar == 'i' ? + curset->phase_ignore_i[ph] : curset->phase_ignore_j[ph]; + ignored.clear(); +} + +void PdfFit::selectNone(int ip, char ijchar) +{ + check_sel_args(ip, ijchar); + Phase* ph = curset->psel[ip - 1]; + set& ignored = ijchar == 'i' ? + curset->phase_ignore_i[ph] : curset->phase_ignore_j[ph]; + for (int aidx = 0; aidx < ph->natoms; ++aidx) ignored.insert(aidx); +} + +/***************************************** + Wed Oct 12 2005 - CLF + Reads observed PDF from arrays. +******************************************/ +int PdfFit::read_data_arrays(char tp, double qmax, double qdamp, + int length, double * r_data, double * Gr_data, double * dGr_data, string _name) +{ + DataSet* pds = new DataSet(this); + + try { + pds->read_data_arrays(nset+1, tp, qmax, qdamp, length, + r_data, Gr_data, dGr_data, _name); + } + catch(Exception e) { + delete pds; + throw; + } + + // automatically select existing phases and its atoms for the new dataset + for (int ip=0; ipselphase(ip, this->phase[ip]); + + this->datasets.push_back(pds); + nset++; + setdata(nset); + + return 1; +} + +/***************************************** + Wed Oct 12 2005 - CLF + Reads observed PDF from a c-style string. +******************************************/ + +int PdfFit::read_data_string(string& buffer, char tp, double qmax, double qdamp, string _name) +{ + DataSet* pds = new DataSet(this); + try { + pds->read_data_string(nset+1, buffer, tp, qmax, qdamp); + } + catch(Exception e) { + delete pds; + throw; + } + // automatically select existing phases and its atoms for the new dataset + for (int ip = 0; ip < nphase; ip++) pds->selphase(ip, this->phase[ip]); + + this->datasets.push_back(pds); + nset++; + setdata(nset); + + return 1; +} + +/***************************************** + Reads observed PDF as xy ASCII file. +******************************************/ + +int PdfFit::read_data(string datafile, char tp, double qmax, double qdamp) +{ + DataSet* pds = new DataSet(this); + try { + pds->read_data(nset+1, datafile, tp, qmax, qdamp); + } + catch(Exception e) { + delete pds; + throw; + } + + // automatically select existing phases and its atoms for the new dataset + for (int ip=0; ipselphase(ip, this->phase[ip]); + + this->datasets.push_back(pds); + nset++; + setdata(nset); + + return 1; +} + +// local helper to check for regular spacing in sequence +namespace { + +template +bool isRegular(Iterator first, Iterator last) +{ + if (last - first < 2) return true; + double dx = double( *(last-1) - *first ) / double(last - first - 1); + for (Iterator p0 = first, p1 = first + 1; p1 != last; ++p0, ++p1) + { + if (fabs(*p1 - *p0 - dx) > deltar_tol) return false; + } + return true; +} + +} // local namespace + + +/* Wed Oct 12 2005 - CLF + * Using read_data_arrays adds functionality + * to pdffit2, allowing one to read data that is alread stored as arrays. + */ +void DataSet::read_data_arrays(int _iset, char tp, double _qmax, double _qdamp, + int length, double * r_data, double * Gr_data, + double * dGr_data, string _name ) +{ + iset = _iset; + + //------ Now analyse given parameters + + //------ - get exp. method (neutron/x-ray) + + scattering_type = tp; + + //------ - get QMAX and Qdamp + + qmax = _qmax; + qdamp = _qdamp; + + //------ Finally we actually read the data + + bool lwei = true; + + /* Only really care about G(r) and dG(r), the uncertainty */ + for( int i = 0; i < length; i++ ) + { + double wic; + + if( dGr_data == NULL ) + { + wic = 1.0; + lwei = false; + } + else + { + wic = 1.0/sqrt( dGr_data[i] ); + } + + this->obs.push_back( Gr_data[i] ); + this->wic.push_back(wic); + + } + + *pout << " Reading data from arrays...\n"; + + rmin = rfmin = r_data[0]; + rmax = rfmax = r_data[length - 1]; + bin = length; + deltar = (rmax - rmin)/double(bin-1); + // check if r has equidistant spacing + if (!isRegular(r_data, r_data + length)) + { + throw dataError("Irregular spacing of r values."); + } + name = _name; + + *pout << " Read PDF data set " << iset << + " (r = " << rmin << " to " << rmax << " A, " << + bin << " points) ...\n"; + if (!lwei) this->warningOnMissingWeights(); + *pout << endl; + + return; +} + +void DataSet::read_data_stream(int _iset, istream& fdata, + char tp, double _qmax, double _qdamp, string _name) +{ + string line; + + iset = _iset; + + //------ - get exp. method (neutron/x-ray) + + scattering_type = tp; + + //------ - get QMAX and Qdamp + + qmax = _qmax; + qdamp = _qdamp; + + //------ Ignore header lines + getline(fdata, line); + if (line.compare(0, 7, "History") == 0) + { + for ( ; !fdata.eof(); getline(fdata,line)) + { + if (line[0] != '#') continue; + // get 3 words from line + string w0, w1, w2; + istringstream fline(line); + fline >> w0 >> w1 >> w2; + if ( w0.find_first_not_of('#') == string::npos && + w1 == "start" && w2 == "data" ) break; + } + } + //------ Any other header lines starting with # ? + while (line[0] == '#') getline(fdata,line); + + //------ Finally we actually read the data + + // find number of columns + int ncol = 0; + if (!line.empty()) + { + double x; + istringstream sline(line); + while (sline >> x) ++ncol; + } + + vector r_data; + bool lwei = (ncol > 2); // flag for weights defined by dGr + + while (true) + { + double ri, obs; + double val, wic; + istringstream sline(line); + + sline >> ri >> obs; + if (!sline) break; + + // Obtain weights from dGr. Use dGr values only when they are all + // positive, otherwise set all weights to 1. + wic = 1.0; + switch (ncol) + { + case 3: + if (sline >> val && val > 0.0) + { + wic = 1.0/sqr(val); + } + else + { + lwei = false; + } + break; + case 4: + // skip one value + if (sline >> val >> val && val > 0.0) + { + wic = 1.0/sqr(val); + } + else + { + lwei = false; + } + break; + } + + // copy values to data arrays + r_data.push_back(ri); + this->obs.push_back(obs); + this->wic.push_back(wic); + + if (!getline(fdata, line)) break; + } + + // make sure all wic values are one when lwei is false, because + // lwei could be reset due to zero dGr value + if (!lwei) + { + fill(this->wic.begin(), this->wic.end(), 1.0); + } + + *pout << " Reading " << ncol << " columns ...\n"; + + if (!isRegular(r_data.begin(), r_data.end())) + { + throw dataError("Irregular spacing of r values."); + } + if (this->obs.size() < 2) + { + throw dataError("Incredibly short data set."); + } + bin = this->obs.size(); + this->rmin = this->rfmin = r_data.front(); + this->rmax = this->rfmax = r_data.back(); + this->nfmin = 0; + this->nfmax = bin - 1; + this->deltar = (rmax - rmin)/double(bin-1); + this->name = _name; + + *pout << " Read PDF data set " << iset << " (r = " << rmin + << " to " << rmax << " A, " << bin << " points) ...\n"; + + if (!lwei) this->warningOnMissingWeights(); + + *pout << endl; + + return; +} + +/* Wed Oct 12 2005 - CLF + * Using read_data_string adds functionality + * to pdffit2, allowing one to read data that has already been loaded. + * + * + * Thu Nov 3 2005 - CLF + * Need to add some data checking routines! + */ +void DataSet::read_data_string(int _iset, string& buffer, char tp, double _qmax, + double _qdamp, string _name) +{ + istringstream fdata(buffer); + read_data_stream(_iset, fdata, tp, _qmax, _qdamp, _name); + return; +} + +/* Wed Oct 12 2005 - CLF + * Using read_data and the above read_data_string adds functionality + * to pdffit2, allowing one to read data that has already been loaded. + */ +void DataSet::read_data(int _iset, string pfile, char tp, double _qmax, + double _qdamp) +{ + // open and check pfile + ifstream fdata(pfile.c_str()); + if (!fdata) throw IOError("File does not exist"); + // read the data + read_data_stream(_iset, fdata, tp, _qmax, _qdamp, pfile); + return; +} + +/********************************* + Sets R-range for fitting +**********************************/ +void PdfFit::range(int is, double rmin, double rmax) +{ + if( rmin >= rmax ) + { + throw ValueError("rmin must be < rmax"); + } + if (is == ALL) + { + for(is = 0; is < nset; is++) datasets[is]->range(rmin,rmax); + } + else + { + if ( (is >= 1) && (is <= nset) ) + { + datasets[is-1]->range(rmin,rmax); + } + else + { + throw ValueError("Invalid data set number"); + } + } +} + +void DataSet::range(double rmin, double rmax) +{ + if ( (rmin >= this->rmin) && (rmin <= this->rmax) + && (rmax <= this->rmax) && (rmin < rmax) ) + { + this->rfmin = rmin; + this->rfmax = rmax; + } + else + { + throw ValueError("Range outside data set limits"); + } +} + +vector< pair > DataSet::getAtomPhaseFractions() +{ + size_t nphase = psel.size(); + valarray xi(nphase); + valarray dxi(nphase); + for (size_t ip = 0; ip < nphase; ip++) + { + Phase* ph = psel[ip]; + if (!ph) + { + xi[ip] = 0.0; + dxi[ip] = 0.0; + } + else + { + double bavg = ph->averageScatteringFactor(scattering_type); + xi[ip] = ph->pscale / (bavg*bavg); + dxi[ip] = ph->dpscale / (bavg*bavg); + } + } + double xtot = xi.sum(); + vector< pair > rv(nphase, make_pair(0.0, 0.0)); + double dx2tot = (dxi * dxi).sum(); + // get normalized phase fractions fi, do this only when xtot > 0 + for (size_t ip = 0; ip < nphase && 0.0 < xtot; ip++) + { + double fi = xi[ip] / xtot; + double dfi2 = ( dxi[ip]*dxi[ip] * (xtot*xtot - 2*xtot*xi[ip]) + + xi[ip]*xi[ip]*dx2tot ) / pow(xtot, 4); + double dfi = sqrt(dfi2); + rv[ip].first = fi; + rv[ip].second = dfi; + } + return rv; +} + +vector< pair > DataSet::getCellPhaseFractions() +{ + size_t nphase = psel.size(); + valarray xi(nphase); + valarray dxi(nphase); + for (size_t ip = 0; ip < nphase; ip++) + { + Phase* ph = psel[ip]; + if (!ph) + { + xi[ip] = 0.0; + dxi[ip] = 0.0; + } + else + { + double bavg = ph->averageScatteringFactor(scattering_type); + xi[ip] = ph->pscale / (bavg*bavg * ph->np); + dxi[ip] = ph->dpscale / (bavg*bavg * ph->np); + } + } + double xtot = xi.sum(); + vector< pair > rv(nphase, make_pair(0.0, 0.0)); + double dx2tot = (dxi * dxi).sum(); + // get normalized phase fractions fi, do this only when xtot > 0 + for (size_t ip = 0; ip < nphase && 0.0 < xtot; ip++) + { + double fi = xi[ip] / xtot; + double dfi2 = ( dxi[ip]*dxi[ip] * (xtot*xtot - 2*xtot*xi[ip]) + + xi[ip]*xi[ip]*dx2tot ) / pow(xtot, 4); + double dfi = sqrt(dfi2); + rv[ip].first = fi; + rv[ip].second = dfi; + } + return rv; +} + +vector< pair > DataSet::getMassPhaseFractions() +{ + size_t nphase = psel.size(); + valarray xi(nphase); + valarray dxi(nphase); + for (size_t ip = 0; ip < nphase; ip++) + { + Phase* ph = psel[ip]; + if (!ph) + { + xi[ip] = 0.0; + dxi[ip] = 0.0; + } + else + { + double bavg = ph->averageScatteringFactor(scattering_type); + double mavg = ph->averageAtomicMass(); + xi[ip] = ph->pscale * mavg / (bavg*bavg); + dxi[ip] = ph->dpscale * mavg / (bavg*bavg); + } + } + double xtot = xi.sum(); + vector< pair > rv(nphase, make_pair(0.0, 0.0)); + double dx2tot = (dxi * dxi).sum(); + // get normalized phase fractions fi, do this only when xtot > 0 + for (size_t ip = 0; ip < nphase && 0.0 < xtot; ip++) + { + double fi = xi[ip] / xtot; + double dfi2 = ( dxi[ip]*dxi[ip] * (xtot*xtot - 2*xtot*xi[ip]) + + xi[ip]*xi[ip]*dx2tot ) / pow(xtot, 4); + double dfi = sqrt(dfi2); + rv[ip].first = fi; + rv[ip].second = dfi; + } + return rv; +} + + +void DataSet::warningOnMissingWeights() const +{ + *pout << + " ****WARN****\n" << + " Uncertainties on G(r) were absent or unreadable in your input\n" << + " data. The program reset these uncertainties to unity. This\n" << + " does not affect at all the refined parameter values. However,\n" << + " the values of the estimated uncertainties on these refined\n" << + " parameter values are not reliable.\n" << + " ****WARN****\n"; +} + +// End of file diff --git a/src/extensions/libpdffit2/pdffit.cc b/src/extensions/libpdffit2/pdffit.cc new file mode 100644 index 00000000..7eaa5f49 --- /dev/null +++ b/src/extensions/libpdffit2/pdffit.cc @@ -0,0 +1,372 @@ +/*********************************************************************** +* +* pdffit2 by DANSE Diffraction group +* Simon J. L. Billinge +* (c) 2006 trustees of the Michigan State University +* All rights reserved. +* +* File coded by: Jacques Bloch, Chris Farrow +* +* See AUTHORS.txt for a list of people who contributed. +* See LICENSE.txt for license information. +* +************************************************************************ +* +* PdfFit and Fit methods for implementing PDFFIT1 interpreter commands. +* +* Comments: +* +***********************************************************************/ + +#include +#include +#include +#include +#include + +#include "MathUtils.h" +#include "pdffit.h" + + +// class methods + +const string& PdfFit::version(const char* ver) +{ + static unique_ptr vervalue; + static const string undefined_version = "1.0?"; + // definition of the version value. This should be only called once, + // when the pdffit2 module is initialized. We allow redefinition + // with the same version as this may happen when pdffit2 gets reloaded. + if (ver) + { + if (!vervalue.get()) + { + vervalue.reset(new string(ver)); + } + else if (*vervalue != ver) + { + ostringstream emsg; + emsg << "Invalid redefinition of PdfFit::version."; + throw invalid_argument(emsg.str()); + } + } + // take care of return value rv. + const string& rv = vervalue.get() ? *vervalue : undefined_version; + return rv; +} + + +// constructor and destructor + + +PdfFit::PdfFit() +{ + reset(); + init(); +} + + +PdfFit::~PdfFit() +{ + reset(); +} + + +/********************************************************** + resets the data sets and crystal structures to empty +***********************************************************/ + +void PdfFit::reset() +{ + //------ Data sets + + vector::iterator dsi = this->datasets.begin(); + for (; dsi != this->datasets.end(); ++dsi) delete *dsi; + this->datasets.clear(); + this->nset = 0; + this->curset = NULL; + + //------ Structure + + vector::iterator phi = this->phase.begin(); + for (; phi != this->phase.end(); ++phi) delete *phi; + this->phase.clear(); + this->nphase = 0; + this->curphase = NULL; + this->total = 0; + + // ------ Fit + + this->fit.reset(); +} + +void Fit::reset() +{ + // reset all data members to initial values + alambda = chisq = ochisq = fit_rw = redchisq = wnorm = 1.0; + stagnating = ntot = ndof = 1; + iter = 0; + // clean all arrays + p.clear(); + dp.clear(); + id.clear(); + ip.clear(); + covar.clear(); + alpha.clear(); + var.clear(); + dvar.clear(); + vref.clear(); + vcovar.clear(); + fconstraint.clear(); + form.clear(); + idef.clear(); + ctype.clear(); + used.clear(); + dvdp.clear(); + sdptr.clear(); + refvar.clear(); +} + + +void Fit::init_builtins() +{ + typedef pair entry; + builtin.insert(entry("-",Builtin(neg,dneg))); + builtin.insert(entry("sin",Builtin(sin,dsin))); + builtin.insert(entry("cos",Builtin(cos,dcos))); + builtin.insert(entry("tan",Builtin(tan,dtan))); + builtin.insert(entry("sind",Builtin(sind,dsind))); + builtin.insert(entry("cosd",Builtin(cosd,dcosd))); + builtin.insert(entry("tand",Builtin(tand,dtand))); + builtin.insert(entry("asin",Builtin(asin,dasin))); + builtin.insert(entry("acos",Builtin(acos,dacos))); + builtin.insert(entry("atan",Builtin(atan,datan))); + builtin.insert(entry("asind",Builtin(asind,dasind))); + builtin.insert(entry("acosd",Builtin(acosd,dacosd))); + builtin.insert(entry("atand",Builtin(atand,datand))); + builtin.insert(entry("exp",Builtin(exp,dexp))); + builtin.insert(entry("log",Builtin(log,dlog))); + builtin.insert(entry("sqr",Builtin(sqr,dsqr))); + builtin.insert(entry("cube",Builtin(cube,dcube))); + builtin.insert(entry("sqrt",Builtin(sqrt,dsqrt))); +} + +/* + Initialization routine +*/ +void PdfFit::init() // called setup in Fortran program +{ + fit.init_builtins(); +} + +void PdfFit::setphase(int ip) +{ + if ((ip<1) || (ip > nphase)) + { + stringstream eout; + eout << "Warning: phase " << ip << " undefined"; + throw unassignedError(eout.str()); + } + + Phase &phase=*this->phase[ip-1]; + + curphase = &phase; + + lat.resize(6); + lat[0].setptr(&phase.a0[0]); + lat[1].setptr(&phase.a0[1]); + lat[2].setptr(&phase.a0[2]); + lat[3].setptr(&phase.win[0]); + lat[4].setptr(&phase.win[1]); + lat[5].setptr(&phase.win[2]); + + pscale.setptr(&phase.pscale); + spdiameter.setptr(&phase.spdiameter); + stepcut.setptr(&phase.stepcut); + delta2.setptr(&phase.delta2); + delta1.setptr(&phase.delta1); + sratio.setptr(&phase.sratio); + rcut.setptr(&phase.rcut); + + x.resize(phase.natoms); + y.resize(phase.natoms); + z.resize(phase.natoms); + u11.resize(phase.natoms); + u22.resize(phase.natoms); + u33.resize(phase.natoms); + u12.resize(phase.natoms); + u13.resize(phase.natoms); + u23.resize(phase.natoms); + occ.resize(phase.natoms); + + for(int ia=0; ia nset)) + { + stringstream eout; + eout << "Warning: set " << is << " undefined"; + throw unassignedError(eout.str()); + } + + DataSet* pds = this->datasets[is-1]; + + curset = pds; + + dscale.setptr( &(pds->dscale) ); + qdamp.setptr( &(pds->qdamp) ); + qbroad.setptr( &(pds->qbroad) ); +} + + +const vector& DataSet::getpdf_obs() +{ + return this->obs; +} + + +const vector& DataSet::getpdf_fit() +{ + if (this->pdftot.empty()) + { + size_t n = this->obs.size(); + this->pdftot.assign(n, 0.0); + } + return this->pdftot; +} + + +vector PdfFit::getpdf_obs() +{ + if (!curset) + { + throw unassignedError("No data loaded"); + } + return curset->getpdf_obs(); +} + +vector PdfFit::getpdf_fit() +{ + if (!curset) + { + throw unassignedError("No fit data"); + } + return curset->getpdf_fit(); +} + +int PdfFit::getnfmin() +{ + if (!curset) + { + throw unassignedError("No data loaded"); + } + return curset->nfmin; +} + +int PdfFit::getnfmax() +{ + if (!curset) + { + throw unassignedError("No data loaded"); + } + return curset->nfmax; +} + +double PdfFit::getdeltar() +{ + if (!curset) + { + throw unassignedError("No data loaded"); + } + return curset->deltar; +} + +double PdfFit::getrmin() +{ + if (!curset) + { + throw unassignedError("No data loaded"); + } + return curset->rmin; +} + +double PdfFit::getrmax() +{ + if (!curset) + { + throw unassignedError("No data loaded"); + } + return curset->rmax; +} + +vector PdfFit::getcrw() const +{ + if (!curset) + { + throw unassignedError("No data loaded"); + } + return curset->getcrw(); +} + +map > PdfFit::getPhaseFractions() +{ + if (!curset) + { + const char* emsg = "Dataset not defined, unknown scattering type"; + throw unassignedError(emsg); + } + map > rv; + vector< pair > atomfractions; + vector< pair > cellfractions; + vector< pair > massfractions; + atomfractions = curset->getAtomPhaseFractions(); + cellfractions = curset->getCellPhaseFractions(); + massfractions = curset->getMassPhaseFractions(); + size_t n = atomfractions.size(); + for (size_t i = 0; i != n; ++i) + { + rv["atom"].push_back(atomfractions[i].first); + rv["stdatom"].push_back(atomfractions[i].second); + rv["cell"].push_back(cellfractions[i].first); + rv["stdcell"].push_back(cellfractions[i].second); + rv["mass"].push_back(massfractions[i].first); + rv["stdmass"].push_back(massfractions[i].second); + } + return rv; +} + +double PdfFit::get_scat(char tp, string smbpat) +{ + double rv; + const LocalPeriodicTable* lpt = this->curphase ? + this->curphase->getPeriodicTable() : + LocalPeriodicTable::instance(); + const AtomType* atp = lpt->lookup(smbpat); + try { + rv = atp->sf(tp); + } + catch (runtime_error e) { + throw ValueError(e.what()); + } + return rv; +} + +// End of file diff --git a/src/extensions/libpdffit2/pdffit.h b/src/extensions/libpdffit2/pdffit.h new file mode 100644 index 00000000..a4b030ac --- /dev/null +++ b/src/extensions/libpdffit2/pdffit.h @@ -0,0 +1,611 @@ +/*********************************************************************** +* +* pdffit2 by DANSE Diffraction group +* Simon J. L. Billinge +* (c) 2006 trustees of the Michigan State University +* All rights reserved. +* +* File coded by: Jacques Bloch +* +* See AUTHORS.txt for a list of people who contributed. +* See LICENSE.txt for license information. +* +************************************************************************ +* +* classes Phase, DataSet, Fit, Pdf, PdfFit, RefVar, NonRefVar, Builtin +* +* Comments: Main header file included by all others. Big mess. +* +***********************************************************************/ + +#ifndef PDFFIT_H_INCLUDED +#define PDFFIT_H_INCLUDED + +#include +#include +#include +#include +#include +#include + +#include "AtomType.h" +#include "Atom.h" +#include "PairDistance.h" +#include "matrix.h" +#include "exceptions.h" +#include "LocalPeriodicTable.h" +#include "OutputStreams.h" + +using namespace std; + +/*********************************************************************** + * Here are constants for the parameter coding - DO NOT CHANGE + * unless you are rewriting the program !!!!!!!!!!!!!!!!!!!!!! + *********************************************************************** + * + * n_st : Number of global structural parameters per phase + * n_at : Number of parameters for each atom + * n_ex : Number of experimental parameters per dataset + * + ***********************************************************************/ + +const int n_st = 11; +const int n_at = 10; +const int n_ex = 3; + +const int ALL = -1; +typedef vector::iterator VAIT; + +enum FCON { USER, IDENT, FCOMP, FSQR }; + +typedef double (*fbuiltin)(double); + +class Fit; +class PdfFit; +class DataSet; +class Phase; +class NonRefVar; +class RefVar; + + +// non-refinable variables accessible to the users +class NonRefVar +{ + friend class PdfFit; + double *a; + + public: + NonRefVar() : a(NULL) + { + mtype = "NonRefVar"; + } + bool isAssigned() { return (a != NULL); } + void setptr(double* a) { this->a = a; } + void setval(double a) { *this->a = a; } + double get() { + double rv = (a) ? *a : 0.0; + return rv; + } + const string& type() const + { + return mtype; + } + + protected: + string mtype; +}; + +// Refinable variables accessible to the users +class RefVar: public NonRefVar +{ + friend class PdfFit; + public: + RefVar() : NonRefVar() + { + mtype = "RefVar"; + } +}; + + +typedef double (*fcon)(vector&, vector&); +typedef double (*fbuiltin) (double); + +// TK commented out 03/31/05 +// class Builtin { fbuiltin func, deriv; +// public: +// Builtin(fbuiltin func, fbuiltin deriv): func(func), deriv(deriv) {} +// }; + +// TK 03/31/05 replaced above with +class Builtin { + public: + fbuiltin func, deriv; // made these public. + // Really should just be a struct, or provide + // const pointers. + Builtin(fbuiltin func, fbuiltin deriv): func(func), deriv(deriv) {} +}; + +// contains the address of the variable, and the current value of the parameter +class Fit +{ + friend class PdfFit; + + map builtin; + + double parse(string line, vector &dnumdp); + double compute(string &expr, vector &dnumdp); + string substitute_pars(string &expr); + double getnum(istringstream &inexpr, vector &dnumdp); + void init_builtins(); + void reset(); + + public: + Fit() + { + reset(); + } + + // CLF Wed May 25 2005 + // Made these members of fit. Were local variables to + // refine function. + double alambda, chisq, ochisq; + int stagnating; + // CLF + + int iter; + double fit_rw; + double redchisq; // reduced chi-squared + double wnorm; // sum of weighted squared datapoints + int ntot, ndof; // total # of points, number of degrees of freedom + // parameter related variables + vector p; // fit-parameters + vector dp; // errors on the refined parameters; + vector id; // parameter identification number (arbitrary integer) + vector ip; // parameter selection + matrix covar, alpha; // covariance matrix and curvature + + // constraint related variables + vector var; // constrained variables + vector dvar; // errors on the constrained variables + vector vref; // true if variable contains free parameters + matrix vcovar; // covariance matrix on constrained variables + vector fconstraint; // constraint equations + vector form; // constraint formula + vector idef; // default parameter if no explicit constraint + vector ctype; // type of constraint + + vector used; // vector of used parameter indices (not ids) in the current constraint + + // variables relating constraint-parameter + matrix dvdp; // derivative of var wrt p + + // variables relating to refinable variables + vector sdptr; // pointer to standard deviation of refinable variable + + vector refvar; // integer pointer from refinable variable to actual constraint # + + void fixpar(int pidx); + void freepar(int pidx); + void setpar(unsigned int pidx, double val); + double getpar(unsigned int pidx); + void constrain(double &a, string form); + void constrain(double &a, double f(vector&, vector&) ); + void constrain(double &a, int ipar ); + void constrain(double &a, int ipar, FCON type); + void constrain(double &a, string inpform, fcon f, int idef, FCON type); + int vfind(double &a); // look for variable in list of constraints + int parfind(unsigned int j); + void fill_variables(); + void fill_errors(); + int varsize() const { return var.size(); } + int psize() const { return p.size(); } + //Thu Oct 13 2005 - CLF + void output(ostream &fout); + void out(); + + private: + vector order_by_id() const; + +}; + +class PdfFit +{ + // class methods + + public: + static const string& version(const char* ver=NULL); + + private: + + //Struct cr; + int nphase; + int total; // total # of atoms + vector phase; + + Fit fit; + + // Dataset parameters + int nset; + vector datasets; + DataSet *curset; + + void init(); + + public: + + void fit_setup(); + void fit_errors(); + void fit_theory(bool ldiff, bool lout); + double totalWeighedSquareObs() const; + int totalReducedObservations() const; + + private: + + void initarrays(); + + void mrqmin(vector &a, vector &ia, matrix &covar, + matrix &alpha, double &chisq, double &alamda, + bool deriv); + void mrqmin(double a[], int ia[], int ma, double **covar, + double **alpha, double *chisq, double *alamda, bool deriv); + void mrqcof(double*, int*, int, double**, double*, double*, bool deriv); + void fill_variables(vector a); + int getnpar() { return nset*n_ex + nphase*n_st + total*n_at; } + + public: + + Phase* curphase; + PdfFit(); + ~PdfFit(); + + void alloc(char tp, double qmax, double qdamp, + double rmin, double rmax, int bin); + void calc(); + int read_struct(string fname); // returns 1:OK, 0:Error + int read_data(string fname, char tp, double qmax, double qdamp); + //Wed Oct 12 2005 - CLF + int read_struct_string(char * buffer); // returns 1:OK, 0:Error + int read_data_string(string& buffer, char tp, double qmax, double + qdamp, string name = "string"); + int read_data_arrays(char tp, double qmax, double qdamp, int length, + double * r_data, double * Gr_data, double * dGr_data = NULL, + string name = "array"); + void reset(); + //Thu Oct 13 2005 - CLF + string save_pdf(int iset, string fname = ""); + string save_dif(int iset, string fname = ""); + string save_res(string fname = ""); + string save_struct(int ip, string strucfile = ""); + string show_struct(int ip); + // + int refine(bool deriv, double toler = 0.00000001); + int refine_step(bool deriv, double toler = 0.00000001); + double getrw(void) + { + return fit.fit_rw; + } + void setpar(unsigned int pidx, double val) + { + fit.setpar(pidx, val); + } + void setpar(unsigned int pidx, RefVar v) + { + fit.setpar(pidx, *v.a); + } + double getpar(unsigned int pidx) + { + return fit.getpar(pidx); + } + void fixpar(int pidx) + { + fit.fixpar(pidx); + } + void freepar(int pidx) + { + fit.freepar(pidx); + } + void range(int iset, double rmin, double rmax); + + void constrain(RefVar v, double f(vector&, vector&)) + { + fit.constrain(*v.a,f); + } + void constrain(RefVar v, string form) + { + fit.constrain(*v.a,form); + } + void constrain(RefVar v, int ipar) + { + fit.constrain(*v.a,ipar); + } + void constrain(RefVar v, int ipar, FCON type) + { + fit.constrain(*v.a,ipar,type); + } + void setphase(int ip); + void setdata(int is); + void setvar(RefVar v, double a) { v.setval(a); } + double getvar(RefVar v) { return v.get(); } + void setvar(NonRefVar v, double a) { v.setval(a); } + double getvar(NonRefVar v) { return v.get(); } + + void selphase(int ip); + void pdesel(int ip); + Phase* getphase(int ip); + int num_phases() { return this->nphase; } + int num_datasets() { return this->nset; } + + private: + + void check_sel_args(int ip, char ijchar, int aidx1=1); + void selphaseForEachDataSet(Phase*); + + public: + + void selectAtomType(int ip, char ijchar, char* symbol, bool select); + void selectAtomIndex(int ip, char ijchar, int aidx1, bool select); + void selectAll(int ip, char ijchar); + void selectNone(int ip, char ijchar); + + pair bond_angle(int ia, int ja, int ka); + PairDistance bond_length_atoms(int ia, int ja); + vector bond_length_types(string symi, string symj, + double bmin, double bmax); + + vector getpdf_obs(); + vector getpdf_fit(); + + // current phase and set refinable variable pointers + vector lat, x, y, z, u11, u22, u33, u12, u13, u23, occ; + RefVar pscale; + RefVar spdiameter; + NonRefVar stepcut; + RefVar sratio; + RefVar delta2, delta1; + RefVar dscale, qdamp, qbroad; + NonRefVar rcut; + int getnfmin(); + int getnfmax(); + double getdeltar(); + double getrmin(); + double getrmax(); + vector getcrw() const; + map > getPhaseFractions(); + double get_scat(char tp, string smbpat); +}; + +class Pdf +{ + public: + + int nfmin, nfmax, ncmin, ncmax; + double qmax, qdamp, rmin, rmax, deltar; + double rfmin, rfmax; // fit range + double rcmin, rcmax; // extended calculation range + double dscale, ddscale, qbroad, dqbroad, dqdamp; + + Pdf() + { + nfmin = nfmax = ncmin = ncmax = 0; + qmax = qdamp = rmin = rmax = deltar = 0.0; + rfmin = rfmax = rcmin = rcmax = 0.0; + dscale = 0.0; ddscale = 0.0; + qbroad = dqbroad = dqdamp = 0.0; + } + + vector pdftot; // total pdf + matrix calc; // ?? pdf for each phase and each point in the dataset +}; + +class DataSet: public Pdf +{ + + private: + int offset; + const PdfFit* mowner; + void applyQmaxCutoff(double* y, size_t len); + void extendCalculationRange(bool lout); + string selectedAtomsString(int ip, char ijchar); + void read_data_stream(int iset, istream& fdata, + char tp, double qmax, double qdamp, string name); + void warningOnMissingWeights() const; + + public: + + int iset; // Dataset index + char scattering_type; + string name; + + DataSet(const PdfFit* owner) : Pdf(), mowner(owner) + { + dscale = 1.0; ddscale = 0; + qbroad = dqbroad = 0.0; + }; + // pdf-related + void determine(bool ldiff, bool lout, Fit &par); + void pdf_derivative (Phase& phase, + const Atom& atomi, const Atom& atomj, double rk, double sigma, + double sigmap, double dist, double d[3], double ampl, + double gaus, Fit &fit, double* fit_a_i); + + const vector& getpdf_fit(); + const vector& getpdf_obs(); + //Thu Oct 13 2005 - CLF + string build_pdf_file(); + string build_dif_file(); + // + void read_data(int iset, string fname, char tp, double qmax, double qdamp); + //Wed Oct 12 2005 - CLF + void read_data_string(int iset, string& buffer, char tp, double qmax, double qdamp, + string name = "string"); + void read_data_arrays(int iset, char tp, double qmax, double qdamp, + int length, double * r_data, double * Gr_data, double * dGr_data = NULL, string name = "array"); + // + //Thu Oct 13 2005 - CLF + void output(ostream &fout); + void range(double rmin, double rmax); + + void fit_setup_derivatives(Fit &par); + void selphase(int ip, Phase *phase); + + vector getcrw() const; + double weighedSquareObs() const; + double getdsrw() const; + double getdsredchisq() const; + + // phase fraction calculations + vector< pair > getAtomPhaseFractions(); + vector< pair > getCellPhaseFractions(); + vector< pair > getMassPhaseFractions(); + + // fit related + matrix fit_a, fit_b; // nbin*npar + + int bin; + vector obs, wic; + + // phase specific information this dataset: selected, allowed atoms + vector psel; // phase selection + // i and j indices to be ignored when calculating PDF + map > phase_ignore_i; + map > phase_ignore_j; + vector cumchisq; + friend void PdfFit::fit_setup(); + +}; + +class Phase { + + private: + + // data + string spcgr, name; + int offset; + LocalPeriodicTable _local_periodic_table; + + double ar[3], wrez[3], dar[3], dwrez[3]; + double gten[3][3], dgten[3][3]; // tensor and sd + double rten[3][3], drten[3][3]; // tensor and sd + double _eps[3][3][3], _reps[3][3][3], _deps[3][3][3], _dreps[3][3][3]; + double &eps(int i, int j, int k) { return _eps[i][j][k]; } + double &reps(int i, int j, int k) { return _reps[i][j][k]; } + double &deps(int i, int j, int k) { return _deps[i][j][k]; } + double &dreps(int i, int j, int k) { return _dreps[i][j][k]; } + + // methods + + set selectAtomsOf(string symbol); + + // Added a return value + string get_scat_string(char tp, const AtomType* atp); + + // shift to equivalent lattice position nearest to the origin + void make_nearest(double xyz[3]); + + public: + + vector atom_types; + int iphase; + double cosa, cosb, cosg, sina, sinb, sing; + double v, dv, vr, dvr; + int icc[3]; + // Phase has a number of public elements as it is often cross-referenced + + int natoms; // total number of atoms in multicell icc0 x icc1 x icc2 + int ncatoms; // number of atoms in one cell + + // IMPORTANT: atom[i].atom_type must be a pointer to AtomType + // from _local_periodic_table. Insertion of a new entry to + // vector atom must be followed by reassign_atom_type(entry); + vector atom; + + double pscale, dpscale; + double a0[3], win[3], da0[3], dwin[3]; + double np, dnp, rho0, drho0; // np: total occupance, rho0: number density + + // pdf-related + double delta2, sratio, rcut; + double ddelta2, dsratio, delta1, ddelta1; + double spdiameter, dspdiameter; // spherical particle diameter + double stepcut; + double dnorm, corr_max; + + + Phase() + { + pscale = 1.0; dpscale = 0.0; + sratio=1.0; + a0[0] = a0[1] = a0[2] = da0[0] = da0[1] = da0[2] = + win[0] = win[1] = win[2] = dwin[0] = dwin[1] = dwin[2] = + delta2 = ddelta2 = dsratio = rcut = 0.0; + delta1 = ddelta1 = corr_max = 0.0; + spdiameter = dspdiameter = 0.0; + stepcut = 0.0; + icc[0] = icc[1] = icc[2] = ncatoms = natoms = 0; + spcgr = "P1"; + name = "UNNAMED"; + } + inline size_t nscat() + { + return atom_types.size(); + } + void read_struct(int iphase, string fname); + void read_struct_string(int iphase, char * buffer); + private: + void read_struct_stream(int _iphase, istream& fstruct); + void read_header(istream &fstruct, bool &ldiscus); + void read_atoms(istream &fstruct); + // Reset atom_type to point to an entry from _local_periodic_table + void reassign_atom_type(Atom* ap); + + public: + //Thu Oct 13 2005 - CLF + void output(ostream &fout); + template void save_struct(Stream &fout); + + void lattice(); + void show_lattice(); + void tensor(double ten[3][3], double vec[3], double win[3]); + void dtensor(double vec[3], double win[3], double dten[3][3], double dvec[3], double dwin[3]); + + double skalpro(const double h[3], const double k[3]); + double dskalpro(double h[3], double k[3], double dh[3], double dk[3]); + + double circum_diameter(); // diameter of a sphere enclosing unit cell + // mean square displacement of 2 atoms + double msdAtoms(const Atom& ai, const Atom& aj, double* vl); + // reference to the local periodic table + LocalPeriodicTable* getPeriodicTable(); + + // pdf-related + + double averageAtomicMass(); + double averageScatteringFactor(char tp); + void setup_weights(char tp); + + pair bond_angle(int ia, int ja, int ka); + PairDistance bond_length_atoms(int ia, int ja); + vector bond_length_types(string symi, string symj, + double bmin, double bmax); + // Fri Oct 28 2005 - CLF + // Added a return value + void show_scat(char tp); + string get_scat_string(char tp); + string get_scat_string(char tp, string smbpat); + void set_scat(char tp, const string& smbpat, double value); + void reset_scat(const string& smbpat); + + friend class Atom; + friend class DataSet; + friend void PdfFit::fit_setup(); + friend void DataSet::fit_setup_derivatives(Fit &par); + friend void DataSet::determine(bool ldiff, bool lout, Fit &par); + friend void DataSet::pdf_derivative (Phase& phase, + const Atom& atomi, const Atom& atomj, double rk, double sigma, + double sigmap, double dist, double d[3], double ampl, + double gaus, Fit &fit, double* fit_a_i); + friend void PdfFit::fit_theory(bool ldiff, bool lout); +}; + + +#endif // PDFFIT_H_INCLUDED diff --git a/src/extensions/libpdffit2/pdflsmin.cc b/src/extensions/libpdffit2/pdflsmin.cc new file mode 100644 index 00000000..078d2754 --- /dev/null +++ b/src/extensions/libpdffit2/pdflsmin.cc @@ -0,0 +1,326 @@ +/*********************************************************************** +* +* pdffit2 by DANSE Diffraction group +* Simon J. L. Billinge +* (c) 2006 trustees of the Michigan State University +* All rights reserved. +* +* File coded by: Jacques Bloch +* +* See AUTHORS.txt for a list of people who contributed. +* See LICENSE.txt for license information. +* +************************************************************************ +* +* PdfFit methods for Levenberg-Marquardt least-squares minimization. +* +* Comments: +* +***********************************************************************/ + +//#define CHECK_DERIVATIVES + +#include +#include +#include +#include +#include + +#include "MathUtils.h" +#include "matrix.h" +#include "nrutil.h" +#include "pdffit.h" + +using NS_PDFFIT2::pout; + +void PdfFit::mrqmin(vector &a, vector &ia, matrix &covar, + matrix &alpha, double &chisq, double &alamda, bool deriv) +{ + using std::copy; + + int ma = a.size(); + double** _covar = new double*[ma]; + double** _alpha = new double*[ma]; + double* _a = new double[ma]; + + copy(a.begin(), a.end(), _a); + + for (int i = 0; i < ma; i++) + { + _covar[i] = &covar[i][0]-1; + _alpha[i] = &alpha[i][0]-1; + } + + int* iaptr = ia.size() ? &(ia[0]) - 1 : NULL; + mrqmin(_a-1, iaptr, ma, _covar-1, _alpha-1, &chisq, &alamda, deriv); + + copy(_a, _a + ma, a.begin()); + + delete [] _a; + delete [] _alpha; + delete [] _covar; +} + + +// Levenberg-Marquardt method, attempting to reduce the value Chi2 of a fit +// between a set of data points x[1..ndata], y[1..ndata] with individual +// standard deviations sig[1..ndata], and a nonlinear function dependent on ma +// coeffcients a[1..ma]. The input array ia[1..ma] indicates by nonzero +// entries those components of a that should be fitted for, and by zero entries +// those components that should be held fixed at their input values. The +// program re- turns current best-fit values for the parameters a[1..ma], and +// Chi2=chisq. The arrays covar[1..ma][1..ma], alpha[1..ma][1..ma] are used as +// working space during most iterations. Supply a routine +// funcs(x,a,yfit,dyda,ma) that evaluates the fitting function yfit, and its +// derivatives dyda[1..ma] with respect to the fitting parameters a at x. On +// the first call provide an initial guess for the parameters a, and set +// alamda<0 for initialization (which then sets alamda=.001). If a step +// succeeds chisq becomes smaller and alamda de- creases by a factor of 10. If +// a step fails alamda grows by a factor of 10. You must call this routine +// repeatedly until convergence is achieved. Then, make one final call with +// alamda=0, so that covar[1..ma][1..ma] returns the covariance matrix, and +// alpha the curvature matrix. (Parameters held fixed will return zero +// covariances.) +void PdfFit::mrqmin(double a[], int ia[], int ma, double **covar, double **alpha, double *chisq, double *alamda, bool deriv) +{ + void covsrt(double **covar, int ma, int ia[], int mfit); + void gaussj(double **a, int n, double **b, int m); + + int j, k, l; + static int mfit; + static double ochisq, *atry, *beta, *da, **oneda; + + if (*alamda < 0.0) + { + // Initialization. + atry = dvector(1, ma); + beta = dvector(1, ma); + da = dvector(1, ma); + + for (mfit = 0, j = 1; j <= ma; j++) + if (ia[j]) mfit++; + + oneda = dmatrix(1, mfit, 1, 1); + *alamda = 0.001; + mrqcof(a, ia, ma, alpha, beta, chisq, deriv); + ochisq=(*chisq); + for (j = 1; j <= ma; j++) atry[j]=a[j]; + + *pout << "\n******************************** ITER: " << fit.iter << " ********************************\n"; + fit.fit_rw = sqrt(ochisq/fit.wnorm); + fit.redchisq = ochisq/(fit.ntot-fit.ndof); + fit.out(); + *pout << " chisq.: " << ochisq << " red.chisq.: " << fit.redchisq << " Rw: " << fit.fit_rw << endl; + } + // Alter linearized fitting matrix, by augmenting diagonal elements. + for (j = 1; j <= mfit; j++) + { + for (k = 1; k <= mfit; k++) covar[j][k]=alpha[j][k]; + covar[j][j]=alpha[j][j]*(1.0+(*alamda)); + oneda[j][1]=beta[j]; + } + + //=================================================================== +#if defined(TEST) + print(covar, mfit); double **save = dmatrix(1, mfit, 1, mfit); + for(int i = 1; i <= mfit; i++) for(j = 1; j <= mfit; j++) save[i][j] = covar[i][j]; + for(int i = 1; i <= mfit; i++) printf("%lg ", oneda[i][1]); printf("\n"); +#endif + //=================================================================== + + gaussj(covar, mfit, oneda, 1); // Matrix solution. + + //=================================================================== +#if defined(TEST) + double res; + for(int i = 1; i <= mfit; i++) + { + res = 0; + for(j = 1; j <= mfit; j++) + res += save[i][j]*oneda[j][1]; printf("%lg ", res); + } + printf("\n"); +#endif + //================================================================= + + for (j = 1; j <= mfit; j++) da[j]=oneda[j][1]; + if (*alamda == 0.0) { // Once converged, evaluate covariance matrix. + covsrt(covar, ma, ia, mfit); + covsrt(alpha, ma, ia, mfit); // Spread out alpha to its full size too. + free_dmatrix(oneda, 1, mfit, 1, 1); + free_dvector(da, 1, ma); + free_dvector(beta, 1, ma); + free_dvector(atry, 1, ma); + return; + } + for (j = 0, l = 1; l <= ma; l++) // Did the trial succeed? + if (ia[l]) atry[l]=a[l]+da[++j]; + mrqcof(atry, ia, ma, covar, da, chisq, deriv); + if (*chisq < ochisq) { // Success, accept the new solution. + *alamda *= 0.1; + ochisq=(*chisq); + for (j = 1; j <= mfit; j++) { + for (k = 1; k <= mfit; k++) alpha[j][k]=covar[j][k]; + beta[j]=da[j]; + } + for (l = 1; l <= ma; l++) a[l]=atry[l]; + } else { // Failure, increase alamda and return. + *alamda *= 10.0; + *chisq = ochisq; + } +} + +// Used by mrqmin to evaluate the linearized fitting matrix alpha, and +// vector beta as in (15.5.8), and calculate Chi2. +void PdfFit::mrqcof(double a[], int ia[], int ma, double **alpha, double beta[], double *chisq, bool deriv) +{ + int i, j, k, l, m, mfit = 0; + double wt, sig2i, dy, *dyda; + //double ymod; + + dyda = dvector(1, ma); + for (j = 1; j <= ma; j++) + if (ia[j]) mfit++; + for (j = 1; j <= mfit; j++) { // Initialize (symmetric) alpha, beta. + for (k = 1; k <= j; k++) alpha[j][k]=0.0; + beta[j]=0.0; + } + + // careful: a of mrqcof is in fact atry of mrqmin! + for (j = 1; j <= ma; j++) + fit.p[j-1] = a[j]; + + // printf("a=%.12lg %.12lg %.12lg\n", a[1], a[2], a[3]); + + fit_theory(deriv, false); // yields pdftot and derivatives wrt parameters + + //============================================================================= +#if !defined(CHECK_DERIVATIVES) + // deriv: true for analytic derivatives, false for numerical ones + if (!deriv) +#endif + { +#if defined(CHECK_DERIVATIVES) + matrix dersave = datasets[0]->fit_b; +#endif + + // numerical derivative + vector > pdfsave; + for (int is = 0; is < nset; is++) + { + pdfsave.push_back(datasets[is]->pdftot); + + // fit_b used both in numerical and analytical derivative case + datasets[is]->fit_b.clear(); + datasets[is]->fit_b.resize(datasets[is]->ncmax+1, fit.psize()); + } + + double psave; + + if (fit.psize() != ma) { + throw constraintError("Inconsistent number of parameters"); + } + + for (int ip = 0; ip < fit.psize(); ip++) + { + if (!fit.ip[ip]) continue; + + double delta = double_eps*fit.p[ip]; + if (fabs(delta) < double_eps/100) delta = double_eps; + psave = fit.p[ip]; + fit.p[ip] += delta; + fit_theory(false, false); // yields pdftot and derivatives wrt parameters + fit.p[ip] = psave; + + for (int is = 0; is < nset; is++) + { + DataSet* pds = this->datasets[is]; + + for (i = pds->nfmin; i <= pds->nfmax; i++) + { + pds->fit_b[i][ip] = (pds->pdftot[i]-pdfsave[is][i])/delta; + } + } + +#if defined(CHECK_DERIVATIVES) + i = 200; + { + *pout << "DERIVATIVES:: ANALYTIC : " << dersave[i][ip] << endl; + *pout << " NUMERICAL: " << (datasets[0]->pdftot[i]-pdfsave[0][i])/delta + << " (delta[" << fit.id[ip] << "]=" << delta << ")" << endl << endl; + } +#endif + } + for (int is = 0; is < nset; is++) datasets[is]->pdftot = pdfsave[is]; + +#if defined(CHECK_DERIVATIVES) + exit(0); +#endif + } + //============================================================================= + + *chisq = 0.0; + + for (int is = 0; is < nset; is++) + { + DataSet* pds = this->datasets[is]; + pds->cumchisq.clear(); + + for (i = pds->nfmin; i <= pds->nfmax; i++) + { // Summation loop over all data. + + //(*funcs)(x[i], a, &ymod, dyda, ma); + sig2i = pds->wic[i]; + dy = pds->obs[i] - pds->pdftot[i]; + + for (j = 1; j <= ma; j++) + dyda[j] = pds->fit_b[i][j-1]; // of course use fit_b, NOT fit_a + + //if (i==0) printf("dyda=%.12lg %.12lg %.12lg\n", dyda[1], dyda[2], dyda[3]); + + for (j = 0, l = 1; l <= ma; l++) { + if (ia[l]) { + wt = dyda[l]*sig2i; + for (j++, k = 0, m = 1; m <= l; m++) + if (ia[m]) alpha[j][++k] += wt*dyda[m]; + beta[j] += dy*wt; + } + } + double prev = pds->cumchisq.empty() ? 0.0 : pds->cumchisq.back(); + double chisq_contribution = dy * dy * sig2i; + pds->cumchisq.push_back(prev + chisq_contribution); + } + *chisq += pds->cumchisq.empty() ? 0.0 : pds->cumchisq.back(); + } + for (j = 2; j <= mfit; j++) // Fill in the symmetric side. + for (k = 1; k < j; k++) alpha[k][j]=alpha[j][k]; + free_dvector(dyda, 1, ma); + //print(alpha, ma); +} + + +// Expand in storage the covariance matrix covar, so as to take into account +// parameters that are being held fixed. (For the latter, return zero +// covariances.) +void covsrt(double **covar, int ma, int ia[], int mfit) +{ + int i, j, k; + for (i = mfit+1; i <= ma; i++) + { + for (j = 1; j <= i; j++) + { + covar[i][j]=covar[j][i]=0.0; + } + } + k = mfit; + for (j = ma; j >= 1; j--) { + if (ia[j]) + { + for (i = 1; i <= ma; i++) swap(covar[i][k], covar[i][j]); + for (i = 1; i <= ma; i++) swap(covar[k][i], covar[j][i]); + k--; + } + } +} + +// End of file diff --git a/src/extensions/libpdffit2/scatlen.cc b/src/extensions/libpdffit2/scatlen.cc new file mode 100644 index 00000000..81beee03 --- /dev/null +++ b/src/extensions/libpdffit2/scatlen.cc @@ -0,0 +1,114 @@ +/*********************************************************************** +* +* pdffit2 by DANSE Diffraction group +* Simon J. L. Billinge +* (c) 2006 trustees of the Michigan State University +* All rights reserved. +* +* File coded by: Pavol Juhas +* +* See AUTHORS.txt for a list of people who contributed. +* See LICENSE.txt for license information. +* +************************************************************************ +* +* Phase methods for accessing scattering factors. +* +* Comments: Up to date with 1.3.10 Fortran version. +* In Fortran this was fourier.f +* +***********************************************************************/ + +#include +#include + +#include "LocalPeriodicTable.h" +#include "StringUtils.h" +#include "pdffit.h" + +using NS_PDFFIT2::pout; + +void Phase::show_scat(char tp) +{ + *pout << get_scat_string(tp); +} + +string Phase::get_scat_string(char tp) +{ + stringstream sout; + vector::iterator atp; + for (atp = atom_types.begin(); atp != atom_types.end(); ++atp) + { + sout << get_scat_string(tp, *atp); + } + return sout.str(); +} + +string Phase::get_scat_string(char tp, string smbpat) +{ + const LocalPeriodicTable* lpt = getPeriodicTable(); + const AtomType* atp = lpt->lookup(smbpat); + return get_scat_string(tp, atp); +} + +string Phase::get_scat_string(char tp, const AtomType* atp) +{ + stringstream sout; + string usymbol = toupper(atp->symbol); + switch(tp) + { + case 'n': + case 'N': + sout << "Neutron scattering length for " << usymbol << " : "; + break; + case 'x': + case 'X': + sout << "X-ray scattering factor for " << usymbol << " : "; + break; + } + // this also throws runtime_error for invalid tp value + sout << atp->sf(tp); + return sout.str(); +} + +void Phase::set_scat(char tp, const string& smbpat, double value) +{ + LocalPeriodicTable* lpt = getPeriodicTable(); + const string& stdsmbl = lpt->lookup(smbpat)->symbol; + switch (tp) + { + case 'n': + case 'N': + lpt->setNsf(stdsmbl, value); + break; + case 'x': + case 'X': + lpt->setXsf(stdsmbl, value); + break; + default: + ostringstream emsg; + emsg << "Invalid scattering type '" << tp << "'"; + throw runtime_error(emsg.str()); + } + const AtomType* atp = lpt->symbol(stdsmbl); + *pout << get_scat_string(tp, atp); +} + +void Phase::reset_scat(const string& smbpat) +{ + LocalPeriodicTable* lpt = getPeriodicTable(); + const AtomType* atp = lpt->lookup(smbpat); + const string& stdsmbl = atp->symbol; + lpt->reset(stdsmbl); + *pout << get_scat_string('N', stdsmbl); + *pout << get_scat_string('X', stdsmbl); +} + + +LocalPeriodicTable* Phase::getPeriodicTable() +{ + return &this->_local_periodic_table; +} + + +// End of file diff --git a/src/extensions/libpdffit2/stru.cc b/src/extensions/libpdffit2/stru.cc new file mode 100644 index 00000000..f9022f23 --- /dev/null +++ b/src/extensions/libpdffit2/stru.cc @@ -0,0 +1,837 @@ +/*********************************************************************** +* +* pdffit2 by DANSE Diffraction group +* Simon J. L. Billinge +* (c) 2006 trustees of the Michigan State University +* All rights reserved. +* +* File coded by: Jacques Bloch +* +* See AUTHORS.txt for a list of people who contributed. +* See LICENSE.txt for license information. +* +************************************************************************ +* +* PdfFit and Phase methods for reading and saving the structure, +* and for calculating bond lengths and angles. +* +* Comments: +* +***********************************************************************/ + +// Up to date with 1.3.10 Fortran version + +#include +#include +#include +#include + +#include "PointsInSphere.h" +#include "LocalPeriodicTable.h" +#include "Atom.h" +#include "StringUtils.h" +#include "PairDistance.h" +#include "MathUtils.h" +#include "pdffit.h" + +using NS_PDFFIT2::pout; + + +/*********************************************************************** +* local helper routines +***********************************************************************/ + +namespace { + +// Read a number and an eventual comma delimiter or EOF +template Type vget(istringstream &fin, char delim) +{ + char c; + Type val; + + fin >> val; + + // Return if reading error + if (!fin) { + string line; + fin.clear(); + fin >> line; + throw vgetException(line); + } + if (!fin) return 0; + + // check on end of file before looking for delimiter + if (fin.eof()) return val; + + // read eventual delimiter + fin >> c; + + // if a character c has been read and it is not the expected + // delimiter: put back for next reading + if (fin && c != delim) fin.unget(); + + // clear any error in case no delimiter could be read + if (!fin) fin.clear(); + + return val; +} + +// read space delimited value +template Type vget(istringstream &fin) +{ + Type val; + fin >> val; + return val; +} + +// read space or comma delimited double +double dget(istringstream &fin) +{ + return vget(fin, ','); +} + +// read space or comma delimited integer +int iget(istringstream &fin) +{ + return vget(fin, ','); +} + + +// strip leading spaces +string lstrip(const string &line) +{ + string naked; + string::size_type i = line.find_first_not_of(" \t"); + if (i != string::npos) naked = line.substr(i); + return naked; +} + +// substitute all occurences of literal pattern with new string +void substitute(string& s, const string& pat, const string& sub) +{ + string::size_type p; + string::size_type start = 0; + for (p = s.find(pat, start); p != string::npos; p = s.find(pat, start)) + { + s = s.replace(p, pat.size(), sub); + start = p + sub.size(); + } +} + + +} // local namespace + + +/*********************************************************************** +* Read a structure file. +***********************************************************************/ +int PdfFit::read_struct(string structfile) +{ + Phase* ph = new Phase(); + try { + ph->read_struct(nphase+1, structfile); + } + catch(Exception e) { + delete ph; + // Moved error catching to python bindings. + throw; + } + this->phase.push_back(ph); + this->total += ph->natoms; + this->nphase++; + this->selphaseForEachDataSet(ph); + this->setphase(this->nphase); + ph->show_lattice(); + return 1; +} + +/*********************************************************************** + Wed Oct 12 2005 - CLF + Read a structure from a storage string. +*************************************************************************/ +int PdfFit::read_struct_string(char * buffer) +{ + Phase* ph = new Phase(); + try { + ph->read_struct_string(nphase+1, buffer); + } + catch(Exception e) { + delete ph; + throw; + } + this->phase.push_back(ph); + this->total += ph->natoms; + this->nphase++; + this->selphaseForEachDataSet(ph); + this->setphase(this->nphase); + ph->show_lattice(); + return 1; +} + +void Phase::read_struct(int _iphase, string structfile) +{ + ifstream fstruct; + + fstruct.open(structfile.c_str()); + if (!fstruct) throw IOError("File does not exist"); + + read_struct_stream(_iphase, fstruct); +} + +void Phase::read_struct_string(int _iphase, char * buffer) +{ + istringstream fstruct(buffer); + read_struct_stream(_iphase, fstruct); +} + +void Phase::read_struct_stream(int _iphase, istream& fstruct) +{ + double tot; + bool ldiscus; + + iphase = _iphase; + natoms = 0; + + read_header(fstruct, ldiscus); + + if (ldiscus) + { + *pout << " Structure file format : DISCUS (converting B -> Uij) \n"; + Atom::streamformat = Atom::DISCUS; + } + else + { + *pout << " Structure file format : PDFFIT\n"; + Atom::streamformat = Atom::PDFFIT; + } + + read_atoms(fstruct); + // update atom_types + atom_types.clear(); + for (VAIT ai = atom.begin(); ai != atom.end(); ++ai) + { + if (!count(atom_types.begin(), atom_types.end(), ai->atom_type)) + { + atom_types.push_back(ai->atom_type); + } + } + + lattice(); + + tot = icc[0]*icc[1]*icc[2]*ncatoms; + + if (tot != natoms) + { + throw structureError("Inconsistent # of atoms in structure"); + } +} + + +/****************************************************************** + This subroutine reads the header of a structure file + Wed Oct 12 2005 - CLF + Changed ifstream to istream to accomodate stringstreams + as well. +********************************************************************/ + +void Phase::read_header(istream &fstruct, bool &ldiscus) +{ + string ier_msg; + string befehl, line; + + + // initialize format type to discuss format + ldiscus = true; + + /* parse structure file header and fill phase variables */ + + while (getline(fstruct, line)) + { + istringstream sline(line); + string action; + + // try to read a command from structure file + // if an error occurs, an exception will be caught + try{ + sline >> befehl; + + // get out if we get to atom positions + if (befehl == "atoms") break; + + // skip comments, i.e., when befehl starts with '#' + else if (befehl.find('#') == 0) continue; + + // format + else if (befehl == "format") + { + string format; + sline >> format; + ldiscus = (format != "pdffit"); + } + + // scale factor (PDFFIT) + else if (befehl == "scale") + { + action = "Reading scale factor"; + this->pscale = dget(sline); + this->dpscale = 0.0; + if (!sline) + { + throw structureError(action); + } + } + + // peak sharpening factors (PDFFIT) + else if (befehl == "sharp") + { + action = "reading sharpening parameters"; + double v0 = 0.0, v1 = 0.0, v2 = 0.0, v3 = 0.0; + // at least 3-parameters must be read without error + v0 = dget(sline); + v1 = dget(sline); + v2 = dget(sline); + // we have new format if we can read the 4th parameter + try { + v3 = dget(sline); + delta2 = v0; + delta1 = v1; + sratio = v2; + rcut = v3; + } + // if reading of 4th parameter fails, assume old format + catch(vgetException) { + delta2 = v0; + delta1 = 0.0; + sratio = v1; + rcut = v2; + } + ddelta2 = 0.0; + dsratio = 0.0; + ddelta1 = 0.0; + } + + // space group symbol (only to save it later for DISCUS use) + else if (befehl == "spcgr") + { + sline >> spcgr; + } + + // particle shape corrections + else if (befehl == "shape") + { + action = "reading particle shape correction data"; + string shapedata; + getline(sline, shapedata); + substitute(shapedata, ",", " "); + istringstream shapestream(shapedata); + string w; + shapestream >> w; + if (w == "sphere") + { + this->spdiameter = dget(shapestream); + } + else if (w == "stepcut") + { + this->stepcut = dget(shapestream); + } + else + { + ostringstream emsg; + emsg << " Unknown shape correction: " << w; + throw structureError(emsg.str()); + } + } + + // title / name for structure + else if (befehl == "title") + { + getline(sline, name); + // getline keeps leading whitespace + name = lstrip(name); + } + + // cell constants + else if (befehl == "cell") + { + action = "reading unit cell parameters"; + a0[0] = dget(sline); + a0[1] = dget(sline); + a0[2] = dget(sline); + win[0] = dget(sline); + win[1] = dget(sline); + win[2] = dget(sline); + } + + // standard deviation of cell constants + else if (befehl == "dcell") + { + action = "reading standard deviation of unit cell parameters"; + da0[0] = dget(sline); + da0[1] = dget(sline); + da0[2] = dget(sline); + dwin[0] = dget(sline); + dwin[1] = dget(sline); + dwin[2] = dget(sline); + } + + // crystal dimensions and number of atoms per unit cell 'ncell' + else if (befehl == "ncell") + { + action = "reading # atoms/unit cell"; + icc[0] = iget(sline); + icc[1] = iget(sline); + icc[2] = iget(sline); + ncatoms = iget(sline); + } + + // show warning message otherwise + else + { + *pout << " ****WARN**** Unknown keyword: " << + befehl << " (ignored) ****\n"; + } + } // end of try + // catch vget-exception and throw the specific exception + catch(vgetException e) { throw structureError(action+e.GetMsg()); } + } +} + +void Phase::read_atoms(istream& fstruct) +{ + Atom a; + while (fstruct >> a) + { + reassign_atom_type(&a); + this->atom.push_back(a); + natoms++; + } + return; +} + + +void Phase::reassign_atom_type(Atom* ap) +{ + LocalPeriodicTable* lpt = getPeriodicTable(); + const string& smbl = ap->atom_type->symbol; + ap->atom_type = lpt->symbol(smbl); +} + + + +/******************************************* +c------ - Save structure for given phase + Thu Oct 13 2005 - CLF + Changed code to return a string of the + saved file. Actually saving the file is + optional. +*******************************************/ +string PdfFit::show_struct(int ip) +{ + string filestring = save_struct(ip,""); + return filestring; +} + +string PdfFit::save_struct(int ip, string strucfile) +{ + + stringstream outfilestream; + + if ( (ip < 1) || (ip > nphase) ) + { + throw unassignedError("phase does not exist"); + } + else + { + bool ldiscus=false; + ofstream fout; + + if (!strucfile.empty()) + { + if (ldiscus) + *pout << " Saving structure (DISCUS format) phase " << ip + << " to file : " << strucfile << endl; + else + *pout << " Saving structure phase " << ip << " to file : " + << strucfile << endl; + + phase[ip-1]->save_struct(outfilestream); + + fout.open(strucfile.c_str()); + if (!fout) { + throw IOError("cannot create output file"); + } + fout << outfilestream.str(); + fout.close(); + } + else + { + phase[ip-1]->save_struct(outfilestream); + } + } + + return outfilestream.str(); +} + +/*************************************************************** +c This subroutine saves the structure and/or the unit cell +c onto a file. The format uses keyword description. +****************************************************************/ +template void Phase::save_struct(Stream &fout) +{ + const double fac = 8.0*M_PI*M_PI /3.0; + bool ldis=false; + + // -- Write new type of structure file + + fout << "title " << name << endl; + + fout << setprecision(6) << fixed; + + if (!ldis) + { + fout << "format pdffit" << endl; + fout << "scale " << setw(9) << pscale << endl; + fout << "sharp " << setw(9) << delta2 << ", " << setw(9) << delta1 << ", " + << setw(9) << sratio << ", " << setw(9) << rcut << endl; + } + + fout << "spcgr " << spcgr << endl; + + if (spdiameter > 0.0) + { + fout << "shape sphere, " << spdiameter << endl; + } + + if (stepcut > 0.0) + { + fout << "shape stepcut, " << stepcut << endl; + } + + fout << "cell "; + for (int i=0; i<3; i++) + fout << setw(9) << a0[i] << ", "; + + for (int i=0; i<3; i++) + { + fout << setw(9) << win[i]; + if (i!=2) + fout << ", "; + else + fout << endl; + } + + if (!ldis) + { + fout << "dcell "; + for (int i=0; i<3; i++) + fout << setw(9) << da0[i] << ", "; + + for (int i=0; i<3; i++) + { + fout << setw(9) << dwin[i]; + if (i!=2) + fout << ", "; + else + fout << endl; + } + } + + fout << "ncell "; + for (int i=0; i<3; i++) + fout << setw(9) << icc[i] << ", "; + fout << setw(9) << ncatoms << endl; + + fout << "atoms" << endl; + for (VAIT ai = atom.begin(); ai != atom.end(); ++ai) + { + + if (ldis) + { + double dw = fac*(ai->u[1]+ai->u[2]+ai->u[3]); + fout << setw(4) << left << ai->atom_type->symbol; + fout << right << setprecision(8); + for (int i=0; i<3; i++) fout << ' ' << setw(17) << ai->pos[i]; + fout << ' ' << setw(12) << dw << endl; + } + else + { + fout << setw(4) << left << ai->atom_type->symbol; + fout << right << setprecision(8); + for (int i=0; i<3; i++) fout << ' ' << setw(17) << ai->pos[i]; + fout << ' ' << setw(12) << setprecision(4) << ai->occ << endl; + + fout << " "; + fout << setprecision(8); + for (int i=0; i<3; i++) fout << ' ' << setw(17) << ai->dpos[i]; + fout << ' ' << setw(12) << setprecision(4) << ai->docc << endl; + + fout << " "; + fout << setprecision(8); + for (int i=0; i<3; i++) fout << ' ' << setw(17) << ai->u[i]; + fout << endl; + + fout << " "; + for (int i=0; i<3; i++) fout << ' ' << setw(17) << ai->du[i]; + fout << endl; + + fout << " "; + for (int i=3; i<6; i++) fout << ' ' << setw(17) << ai->u[i]; + fout << endl; + + fout << " "; + for (int i=3; i<6; i++) fout << ' ' << setw(17) << ai->du[i]; + fout << endl; + } + } +} + + +/*************************************** +c Calculate bond angles with errors +****************************************/ +pair PdfFit::bond_angle(int ia, int ja, int ka) +{ + if (!curphase) + { + throw unassignedError("Must read structure first"); + } + return curphase->bond_angle(ia, ja, ka); +} + +/*********************************************************************** +* shift to equivalent lattice position that is nearest to the origin +***********************************************************************/ +void Phase::make_nearest(double xyz[3]) +{ + // first shift to the first unit cell + for (int i = 0; i !=3; ++i) + { + // MS compatibility - use fmod instead of remainder + xyz[i] = fmod(xyz[i], icc[i]); + } + // that is all in orthogonal cell or if we get to the origin + if ( (xyz[0] == 0.0 && xyz[1] == 0.0 && xyz[2] == 0.0) || + (win[0] == 90.0 && win[1] == 90.0 && win[2] == 90.0) ) + { + return; + } + // otherwise we need to check all cells around + // first, let us shift to octant with xyz[i] <= 0.0 + for (int i = 0; i != 3; ++i) + { + if (xyz[i] > 0.0) xyz[i] -= icc[i]; + } + double nearest[3] = { xyz[0], xyz[1], xyz[2] }; + double mindsquare = skalpro(nearest, nearest); + double test[3]; + for (test[0] = xyz[0]; test[0] < icc[0]; test[0] += icc[0]) + { + for (test[1] = xyz[1]; test[1] < icc[1]; test[1] += icc[1]) + { + for (test[2] = xyz[2]; test[2] < icc[2]; test[2] += icc[2]) + { + double dsquare = skalpro(test,test); + if (dsquare < mindsquare) + { + copy(test, test+3, nearest); + dsquare = mindsquare; + } + } + } + } + copy(nearest, nearest+3, xyz); +} + +pair Phase::bond_angle(int ia, int ja, int ka) +{ + double x[3], y[3], dx[3], dy[3], xx, yy, xy, dxx, dyy, dxy, arg, darg, ang, dang; + + + if ( (ia < 1) || (ia > natoms) || (ja < 1) || (ja > natoms) + || (ka < 1) || (ka > natoms)) + { + stringstream eout; + eout << "Incorrect atom number(s): " << ia << ", " << ja << ", " << ka; + throw ValueError(eout.str()); + } + if ( ia == ja || ia == ka || ja == ka ) + { + stringstream eout; + eout << "All atoms must be different: " << ia << ", "; + eout << ja << ", " << ka; + throw ValueError(eout.str()); + } + + Atom& ai = atom[ia - 1]; + Atom& aj = atom[ja - 1]; + Atom& ak = atom[ka - 1]; + + for (int i=0; i<3; i++) + { + x[i] = aj.pos[i] - ai.pos[i]; + y[i] = aj.pos[i] - ak.pos[i]; + dx[i] = aj.dpos[i] + ai.dpos[i]; + dy[i] = aj.dpos[i] + ak.dpos[i]; + } + + make_nearest(x); + make_nearest(y); + xx = sqrt(skalpro(x,x)); + yy = sqrt(skalpro(y,y)); + xy = skalpro(x,y); + + dxx = 0.5/xx*dskalpro(x,x,dx,dx); + dyy = 0.5/yy*dskalpro(y,y,dy,dy); + dxy = dskalpro(x,y,dx,dy); + arg = xy/(xx*yy); + ang = acosd(arg); + darg = (1.0/(xx*yy)*dxy + arg/xx*dxx +arg/yy*dyy); + if (arg != 1.0) + dang = fabs(1.0/sqrt(1.0-arg*arg)/rad*darg); + else + dang = 0.0; + + pair rv(ang, dang); + + return rv; +} + +/*************************************** +c Calculate bond lengths with errors +****************************************/ +PairDistance PdfFit::bond_length_atoms(int ia, int ja) +{ + if (!curphase) + { + throw unassignedError("Must read structure first"); + } + return curphase->bond_length_atoms(ia, ja); +} + +PairDistance Phase::bond_length_atoms(int ia, int ja) +{ + double d[3], dd[3], dist, ddist; + + // -- Simple distance between given atoms + + if ( (ia < 1) || (ia > natoms) || (ja < 1) || (ja > natoms) ) + { + + stringstream eout; + eout << "Incorrect atom number(s): " << ia << ", " << ja; + throw ValueError(eout.str()); + } + + Atom& ai = atom[ia-1]; + Atom& aj = atom[ja-1]; + + for (int jj=0; jj<3; jj++) + { + d[jj] = ai.pos[jj] - aj.pos[jj]; + dd[jj] = ai.dpos[jj] + aj.dpos[jj]; + } + make_nearest(d); + dist = sqrt(skalpro(d,d)); + ddist = (dist > 0) ? 0.5/dist * dskalpro(d,d,dd,dd) : 0.0; + + PairDistance pd; + pd.dij = dist; + pd.ddij = ddist; + pd.i = ia; + pd.j = ja; + + return pd; +} + + +vector PdfFit::bond_length_types(string symi, string symj, + double bmin, double bmax) +{ + if (!curphase) + { + throw unassignedError("Must read structure first"); + } + return curphase->bond_length_types(symi, symj, bmin, bmax); +} + +vector Phase::bond_length_types(string symi, string symj, + double bmin, double bmax) +{ + double d[3], dd[3], dist, ddist; + set iselection, jselection; + iselection = selectAtomsOf(symi); + jselection = selectAtomsOf(symj); + + // ---- Get all bonds in specified range + + // calculate range for PointsInSphere sequencer + // (negative rsphmin is no problem) + double buffzone = circum_diameter(); + double rsphmin = bmin - buffzone; + double rsphmax = bmax + buffzone; + PointsInSphere sph( rsphmin, rsphmax, a0[0]*icc[0], + a0[1]*icc[1], a0[2]*icc[2], + win[0], win[1], win[2] ); + + // -- Loop over all atoms within the crystal + vector rv; + set::iterator ia, ja; + for (ia = iselection.begin(); ia != iselection.end(); ++ia) + { + for (ja = jselection.begin(); ja != jselection.end(); ++ja) + { + for (sph.rewind(); !sph.finished(); sph.next()) + { + for (int jj=0; jj<3; jj++) + { + d[jj] = atom[*ia].pos[jj] - atom[*ja].pos[jj] - + sph.mno[jj]*icc[jj]; + dd[jj] = atom[*ia].dpos[jj] + atom[*ja].dpos[jj]; + } + dist = sqrt(skalpro(d,d)); + if ( (dist >= bmin) && (dist <= bmax) ) + { + ddist = (dist > 0) ? 0.5/dist * dskalpro(d,d,dd,dd) : 0.0; + PairDistance pd; + pd.dij = dist; + pd.ddij = ddist; + pd.i = *ia + 1; + pd.j = *ja + 1; + rv.push_back(pd); + } + } + } + } + stable_sort(rv.begin(), rv.end()); + return rv; +} + +set Phase::selectAtomsOf(string symbol) +{ + set selection; + if (toupper(symbol) == "ALL") + { + for (size_t i = 0; i != size_t(natoms); ++i) selection.insert(i); + return selection; + } + // here we need to find AtomType + LocalPeriodicTable* lpt = getPeriodicTable(); + const AtomType* atp; + try + { + atp = lpt->lookup(symbol); + } + catch (ValueError e) + { + ostringstream emsg; + emsg << "Incorrect atom type '" << symbol << "'"; + throw ValueError(emsg.str()); + } + for (size_t i = 0; i != size_t(natoms); ++i) + { + if (atom[i].atom_type == atp) selection.insert(i); + } + return selection; +} + +// End of file diff --git a/src/extensions/libpdffit2/support_msvc9.h b/src/extensions/libpdffit2/support_msvc9.h new file mode 100644 index 00000000..cb4bbf70 --- /dev/null +++ b/src/extensions/libpdffit2/support_msvc9.h @@ -0,0 +1,13 @@ +/*********************************************************************** +* Python 2.7 needs MSVC 9.0 which does not have unique_ptr. +* Work around by substituting auto_ptr instead. +***********************************************************************/ + +#ifdef _MSC_VER + +// workarounds for MSVC 9.0 -------------------------------------------- +#if _MSC_VER <= 1500 +#define unique_ptr auto_ptr +#endif + +#endif // _MSC_VER diff --git a/src/extensions/libpdffit2/tests/Makefile b/src/extensions/libpdffit2/tests/Makefile new file mode 100644 index 00000000..f6bfe566 --- /dev/null +++ b/src/extensions/libpdffit2/tests/Makefile @@ -0,0 +1,32 @@ +######################################################################## +# Targets: alltests unittests +# +# Comments: This Makefile is for building and running C++ unit tests +# on the libpdffit2 sources. Intended for developers, not for the end +# users who just want to build pdffit2 from sources. +# +######################################################################## + + +# compiler options +CPPFLAGS += -I../ $(shell cppunit-config --cflags) +LDLIBS += $(shell cppunit-config --libs) + + +# default target +all: unittest + + +# build unit test driver +alltests: alltests.cc \ + TestPointsInSphere.cc ../PointsInSphere.cc + + +# execute unit tests +unittest: alltests + ./alltests + + +# clean up any generated files +clean: + rm -f alltests diff --git a/src/extensions/libpdffit2/tests/TestPointsInSphere.cc b/src/extensions/libpdffit2/tests/TestPointsInSphere.cc new file mode 100644 index 00000000..b82fcb31 --- /dev/null +++ b/src/extensions/libpdffit2/tests/TestPointsInSphere.cc @@ -0,0 +1,228 @@ +/*********************************************************************** +* +* pdffit2 by DANSE Diffraction group +* Simon J. L. Billinge +* (c) 2006 trustees of the Michigan State University +* All rights reserved. +* +* File coded by: Pavol Juhas +* +* See AUTHORS.txt for a list of people who contributed. +* See LICENSE.txt for license information. +* +************************************************************************ +* +* Unit tests for PointsInSphere module +* +* Comments: +* +***********************************************************************/ + +#include +#include +#include +#include + +#include "PointsInSphere.h" + +using namespace std; +using namespace NS_POINTSINSPHERE; + +namespace { + +const double eps = 1.0e-12; + +struct vidxgroup +{ + double vijk[4]; + vidxgroup(double v, int* ijk) + { + vijk[0] = v; + for (size_t i = 0; i != 3; ++i) { vijk[i+1] = ijk[i]; } + } + vidxgroup(double v, int i, int j, int k) + { + vijk[0] = v; vijk[1] = i; vijk[2] = j; vijk[3] = k; + } +}; + +bool operator<(const vidxgroup &x, const vidxgroup &y) +{ + return (x.vijk[0] < y.vijk[0] - eps) || + lexicographical_compare(x.vijk+1, x.vijk+4, y.vijk+1, y.vijk+4); +} + +bool operator==(const vidxgroup &x, const vidxgroup &y) +{ + bool eq = (fabs(x.vijk[0] - y.vijk[0]) < eps) && + equal(x.vijk+1, x.vijk+4, y.vijk+1); + return eq; +} + +ostream& operator<<(ostream &s, const vidxgroup &x) +{ + return s << "<" << x.vijk[0] << ";" << int(x.vijk[1]) + << ',' << int(x.vijk[2]) << ',' << int(x.vijk[3]) << '>'; +} + +} // namespace + +//////////////////////////////////////////////////////////////////////// +// TestPointsInSphere +//////////////////////////////////////////////////////////////////////// + +class TestPointsInSphere : public CppUnit::TestFixture +{ + + CPPUNIT_TEST_SUITE(TestPointsInSphere); + CPPUNIT_TEST(test_Cubic); + CPPUNIT_TEST(test_Orthorombic); + CPPUNIT_TEST(test_Hexagonal); + CPPUNIT_TEST(test_FCC); + CPPUNIT_TEST_SUITE_END(); + +private: + + LatticeParameters* latpar; + +public: + + void setUp() + { + latpar = new LatticeParameters(1, 1, 1, 90, 90, 90); + } + + void tearDown() + { + delete latpar; + } + +private: + + int count(double Rmin, double Rmax) + { + int c = 0; + for ( PointsInSphere sph(Rmin, Rmax, *latpar); + not sph.finished(); sph.next(), ++c ) + { } + return c; + } + + vector sortedPoints(double Rmin, double Rmax) + { + vector ridx; + for ( PointsInSphere sph(Rmin, Rmax, *latpar); + not sph.finished(); sph.next() ) + { + ridx.push_back(vidxgroup(sph.r(), sph.mno)); + } + sort(ridx.begin(), ridx.end()); + return ridx; + } + +public: + + void test_Cubic() + { + latpar->a = latpar->b = latpar->c = 1.0; + latpar->alpha = latpar->beta = latpar->gamma = 90.0; + latpar->update(); + CPPUNIT_ASSERT_EQUAL(0, count(0.0, 0.0)); + CPPUNIT_ASSERT_EQUAL(0, count(eps, 0.5)); + CPPUNIT_ASSERT_EQUAL(0, count(1.0 + eps, 1.1)); + CPPUNIT_ASSERT_EQUAL(1, count(0.0, eps)); + CPPUNIT_ASSERT_EQUAL(7, count(0.0, 1 + eps)); + CPPUNIT_ASSERT_EQUAL(19, count(0.0, sqrt(2.0) + eps)); + CPPUNIT_ASSERT_EQUAL(12, count(1.0 + eps, sqrt(2.0) + eps)); + } + + void test_Orthorombic() + { + latpar->a = 1.0; latpar->b = 2.0; latpar->c = 3.0; + latpar->alpha = latpar->beta = latpar->gamma = 90.0; + latpar->update(); + CPPUNIT_ASSERT_EQUAL(3, count(0.0, 1.1)); + CPPUNIT_ASSERT_EQUAL(4, count(1.9, 2.1)); + vidxgroup ep[] = { + vidxgroup(0, 0, 0, 0), + vidxgroup(1, -1, 0, 0), + vidxgroup(1, 1, 0, 0), + vidxgroup(2, -2, 0, 0), + vidxgroup(2, 0, -1, 0), + vidxgroup(2, 0, 1, 0), + vidxgroup(2, 2, 0, 0), + vidxgroup(sqrt(5.0), -1, -1, 0), + vidxgroup(sqrt(5.0), -1, 1, 0), + vidxgroup(sqrt(5.0), 1, -1, 0), + vidxgroup(sqrt(5.0), 1, 1, 0), + vidxgroup(sqrt(8.0), -2, -1, 0), + vidxgroup(sqrt(8.0), -2, 1, 0), + vidxgroup(sqrt(8.0), 2, -1, 0), + vidxgroup(sqrt(8.0), 2, 1, 0), + vidxgroup(3, -3, 0, 0), + vidxgroup(3, 0, 0, -1), + vidxgroup(3, 0, 0, 1), + vidxgroup(3, 3, 0, 0), + }; + vector exp_pts(ep, ep + sizeof(ep)/sizeof(vidxgroup)); + vector act_pts = sortedPoints(0.0, 3.0+eps); + CPPUNIT_ASSERT_EQUAL(exp_pts.size(), act_pts.size()); + for (size_t i = 0; i != exp_pts.size(); ++i) + { + CPPUNIT_ASSERT_EQUAL(exp_pts[i], act_pts[i]); + } + } + + void test_Hexagonal() + { + latpar->a = 1.0; latpar->b = 1.0; latpar->c = 2.0; + latpar->alpha = latpar->beta = 90.0; latpar->gamma = 120.0; + latpar->update(); + CPPUNIT_ASSERT_EQUAL(7, count(0.0, 1+eps)); + vidxgroup ep[] = { + vidxgroup(0, 0, 0, 0), + vidxgroup(1, -1, -1, 0), + vidxgroup(1, -1, 0, 0), + vidxgroup(1, 0, -1, 0), + vidxgroup(1, 0, 1, 0), + vidxgroup(1, 1, 0, 0), + vidxgroup(1, 1, 1, 0), + vidxgroup(sqrt(3.0), -2, -1, 0), + vidxgroup(sqrt(3.0), -1, -2, 0), + vidxgroup(sqrt(3.0), -1, 1, 0), + vidxgroup(sqrt(3.0), 1, -1, 0), + vidxgroup(sqrt(3.0), 1, 2, 0), + vidxgroup(sqrt(3.0), 2, 1, 0), + vidxgroup(2, -2, -2, 0), + vidxgroup(2, -2, 0, 0), + vidxgroup(2, 0, -2, 0), + vidxgroup(2, 0, 0, -1), + vidxgroup(2, 0, 0, 1), + vidxgroup(2, 0, 2, 0), + vidxgroup(2, 2, 0, 0), + vidxgroup(2, 2, 2, 0), + }; + vector exp_pts(ep, ep + sizeof(ep)/sizeof(vidxgroup)); + vector act_pts = sortedPoints(0.0, 2.0+eps); + CPPUNIT_ASSERT_EQUAL(exp_pts.size(), act_pts.size()); + for (size_t i = 0; i != exp_pts.size(); ++i) + { + CPPUNIT_ASSERT_EQUAL(exp_pts[i], act_pts[i]); + } + } + + void test_FCC() + { + latpar->a = latpar->b = latpar->c = sqrt(0.5); + latpar->alpha = latpar->beta = latpar->gamma = 60.0; + latpar->update(); + CPPUNIT_ASSERT_EQUAL(13, count(0.0, sqrt(0.5)+eps)); + CPPUNIT_ASSERT_EQUAL(19, count(0.0, 1.0+eps)); + } + +}; + +// Registers the fixture into the 'registry' +CPPUNIT_TEST_SUITE_REGISTRATION(TestPointsInSphere); + +// End of file diff --git a/src/extensions/libpdffit2/tests/alltests.cc b/src/extensions/libpdffit2/tests/alltests.cc new file mode 100644 index 00000000..318cb4b3 --- /dev/null +++ b/src/extensions/libpdffit2/tests/alltests.cc @@ -0,0 +1,46 @@ +/*********************************************************************** +* +* pdffit2 by DANSE Diffraction group +* Simon J. L. Billinge +* (c) 2006 trustees of the Michigan State University +* All rights reserved. +* +* File coded by: Pavol Juhas +* +* See AUTHORS.txt for a list of people who contributed. +* See LICENSE.txt for license information. +* +************************************************************************ +* +* Unit tests driver +* +***********************************************************************/ + +#include +#include +#include +#include +#include + +using namespace std; +using namespace CppUnit; + +int main() +{ + // Get the top level suite from the registry + Test *suite = TestFactoryRegistry::getRegistry().makeTest(); + + // Adds the test to the list of test to run + TextUi::TestRunner runner; + runner.addTest( suite ); + + // Change the default outputter to a compiler error format outputter + runner.setOutputter( new CompilerOutputter(&runner.result(), cerr) ); + // Run the tests. + bool wasSucessful = runner.run(); + + // Return error code 1 if the one of test failed. + return wasSucessful ? EXIT_SUCCESS : EXIT_FAILURE; +} + +// End of file diff --git a/src/extensions/pdffit2module/PyFileStreambuf.h b/src/extensions/pdffit2module/PyFileStreambuf.h new file mode 100644 index 00000000..3a2bc383 --- /dev/null +++ b/src/extensions/pdffit2module/PyFileStreambuf.h @@ -0,0 +1,97 @@ +/*********************************************************************** +* +* pdffit2 by DANSE Diffraction group +* Simon J. L. Billinge +* (c) 2007 trustees of the Michigan State University +* All rights reserved. +* +* File coded by: Pavol Juhas +* +* See AUTHORS.txt for a list of people who contributed. +* See LICENSE.txt for license information. +* +************************************************************************ +* +* class PyFileStreambuf +* +* Comments: PyFileStreambuf is a C++ streambuf which writes to a python +* file-like object. The python file can be changed anytime by +* calling the redirect() method. +* +* Examples: // redirect std::cout +* std::cout.rdbuf( PyFileStreambuf(PyObject* python_file) ); +* +***********************************************************************/ + +#ifndef PYFILESTREAMBUF_H_INCLUDED +#define PYFILESTREAMBUF_H_INCLUDED +#define PY_SSIZE_T_CLEAN + +#include +#include + +// MS compatibility fix +#include + +class PyFileStreambuf : public std::streambuf +{ + private: + + // Data members + PyObject* py_file; + + public: + + // Constructor + PyFileStreambuf(PyObject* f) : py_file(f) + { + Py_INCREF(py_file); + } + + // Destructor + ~PyFileStreambuf() + { + Py_DECREF(py_file); + } + + // Methods + PyObject* redirect(PyObject* f) + { + Py_INCREF(f); + Py_DECREF(py_file); + py_file = f; + return py_file; + } + + protected: + + virtual int_type overflow( int_type c) + { + PyObject* rv; + rv = PyObject_CallMethod(py_file, "write", "(s#)", &c, 1); + if (rv) { Py_DECREF(rv); } + return c; + } + + virtual std::streamsize xsputn(const char_type* s, std::streamsize n) + { + PyObject* rv; + rv = PyObject_CallMethod(py_file, "write", "(s#)", s, n); + if (rv) { Py_DECREF(rv); } + return n; + } + + virtual int sync() + { + if (PyObject_HasAttrString(py_file, "flush")) + { + PyObject* rv; + rv = PyObject_CallMethod(py_file, "flush", NULL); + if (rv) { Py_DECREF(rv); } + } + return 0; + } + +}; + +#endif // PYFILESTREAMBUF_H_INCLUDED diff --git a/src/extensions/pdffit2module/bindings.cc b/src/extensions/pdffit2module/bindings.cc new file mode 100644 index 00000000..568e1dd1 --- /dev/null +++ b/src/extensions/pdffit2module/bindings.cc @@ -0,0 +1,341 @@ +/*********************************************************************** +* +* pdffit2 by DANSE Diffraction group +* Simon J. L. Billinge +* (c) 2006 trustees of the Michigan State University +* All rights reserved. +* +* File coded by: Chris Farrow +* +* See AUTHORS.txt for a list of people who contributed. +* See LICENSE.txt for license information. +* +************************************************************************ +* +* Method table for python module bindings. +* +* Comments: +* +***********************************************************************/ +#define PY_SSIZE_T_CLEAN +#include + +#include "bindings.h" +#include "misc.h" + +// the method table +struct PyMethodDef pypdffit2_methods[] = { + + //copyright + {pypdffit2_copyright__name__, pypdffit2_copyright, + METH_VARARGS, pypdffit2_copyright__doc__}, + + //create + {pypdffit2_create__name__, pypdffit2_create, + METH_VARARGS, pypdffit2_create__doc__}, + + //read_struct + {pypdffit2_read_struct__name__, pypdffit2_read_struct, + METH_VARARGS, pypdffit2_read_struct__doc__}, + + //read_struct_string + {pypdffit2_read_struct_string__name__, pypdffit2_read_struct_string, + METH_VARARGS, pypdffit2_read_struct_string__doc__}, + + //read_data + {pypdffit2_read_data__name__, pypdffit2_read_data, + METH_VARARGS, pypdffit2_read_data__doc__}, + + //read_data_string + {pypdffit2_read_data_string__name__, pypdffit2_read_data_string, + METH_VARARGS, pypdffit2_read_data_string__doc__}, + + //read_data_arrays + {pypdffit2_read_data_arrays__name__, pypdffit2_read_data_arrays, + METH_VARARGS, pypdffit2_read_data_arrays__doc__}, + + //pdfrange + {pypdffit2_pdfrange__name__, pypdffit2_pdfrange, + METH_VARARGS, pypdffit2_pdfrange__doc__}, + + //reset + {pypdffit2_reset__name__, pypdffit2_reset, + METH_VARARGS, pypdffit2_reset__doc__}, + + //alloc + {pypdffit2_alloc__name__, pypdffit2_alloc, + METH_VARARGS, pypdffit2_alloc__doc__}, + + //calc + {pypdffit2_calc__name__, pypdffit2_calc, + METH_VARARGS, pypdffit2_calc__doc__}, + + //refine + {pypdffit2_refine__name__, pypdffit2_refine, + METH_VARARGS, pypdffit2_refine__doc__}, + + //refine_step + {pypdffit2_refine_step__name__, pypdffit2_refine_step, + METH_VARARGS, pypdffit2_refine_step__doc__}, + + //save_pdf + {pypdffit2_save_pdf__name__, pypdffit2_save_pdf, + METH_VARARGS, pypdffit2_save_pdf__doc__}, + + //save_dif + {pypdffit2_save_dif__name__, pypdffit2_save_dif, + METH_VARARGS, pypdffit2_save_dif__doc__}, + + //save_res + {pypdffit2_save_res__name__, pypdffit2_save_res, + METH_VARARGS, pypdffit2_save_res__doc__}, + + //save_struct + {pypdffit2_save_struct__name__, pypdffit2_save_struct, + METH_VARARGS, pypdffit2_save_struct__doc__}, + + //show_struct + {pypdffit2_show_struct__name__, pypdffit2_show_struct, + METH_VARARGS, pypdffit2_show_struct__doc__}, + + //constrain_int + {pypdffit2_constrain_int__name__, pypdffit2_constrain_int, + METH_VARARGS, pypdffit2_constrain_int__doc__}, + + //constrain_str + {pypdffit2_constrain_str__name__, pypdffit2_constrain_str, + METH_VARARGS, pypdffit2_constrain_str__doc__}, + + //setpar_dbl + {pypdffit2_setpar_dbl__name__, pypdffit2_setpar_dbl, + METH_VARARGS, pypdffit2_setpar_dbl__doc__}, + + //setpar_RV + {pypdffit2_setpar_RV__name__, pypdffit2_setpar_RV, + METH_VARARGS, pypdffit2_setpar_RV__doc__}, + + //setvar + {pypdffit2_setvar__name__, pypdffit2_setvar, + METH_VARARGS, pypdffit2_setvar__doc__}, + + //getvar + {pypdffit2_getvar__name__, pypdffit2_getvar, + METH_VARARGS, pypdffit2_getvar__doc__}, + + //getR + {pypdffit2_getR__name__, pypdffit2_getR, + METH_VARARGS, pypdffit2_getR__doc__}, + + //getpdf_fit + {pypdffit2_getpdf_fit__name__, pypdffit2_getpdf_fit, + METH_VARARGS, pypdffit2_getpdf_fit__doc__}, + + //getpdf_obs + {pypdffit2_getpdf_obs__name__, pypdffit2_getpdf_obs, + METH_VARARGS, pypdffit2_getpdf_obs__doc__}, + + //getpdf_diff + {pypdffit2_getpdf_diff__name__, pypdffit2_getpdf_diff, + METH_VARARGS, pypdffit2_getpdf_diff__doc__}, + + //getcrw + {pypdffit2_getcrw__name__, pypdffit2_getcrw, + METH_VARARGS, pypdffit2_getcrw__doc__}, + + //getrw + {pypdffit2_getrw__name__, pypdffit2_getrw, + METH_VARARGS, pypdffit2_getrw__doc__}, + + //getpar + {pypdffit2_getpar__name__, pypdffit2_getpar, + METH_VARARGS, pypdffit2_getpar__doc__}, + + //fixpar + {pypdffit2_fixpar__name__, pypdffit2_fixpar, + METH_VARARGS, pypdffit2_fixpar__doc__}, + + //freepar + {pypdffit2_freepar__name__, pypdffit2_freepar, + METH_VARARGS, pypdffit2_freepar__doc__}, + + //setphase + {pypdffit2_setphase__name__, pypdffit2_setphase, + METH_VARARGS, pypdffit2_setphase__doc__}, + + //setdata + {pypdffit2_setdata__name__, pypdffit2_setdata, + METH_VARARGS, pypdffit2_setdata__doc__}, + + //psel + {pypdffit2_psel__name__, pypdffit2_psel, + METH_VARARGS, pypdffit2_psel__doc__}, + + //pdesel + {pypdffit2_pdesel__name__, pypdffit2_pdesel, + METH_VARARGS, pypdffit2_pdesel__doc__}, + + //selectAtomType + {pypdffit2_selectAtomType__name__, pypdffit2_selectAtomType, + METH_VARARGS, pypdffit2_selectAtomType__doc__}, + + //selectAtomIndex + {pypdffit2_selectAtomIndex__name__, pypdffit2_selectAtomIndex, + METH_VARARGS, pypdffit2_selectAtomIndex__doc__}, + + //selectAll + {pypdffit2_selectAll__name__, pypdffit2_selectAll, + METH_VARARGS, pypdffit2_selectAll__doc__}, + + //selectNone + {pypdffit2_selectNone__name__, pypdffit2_selectNone, + METH_VARARGS, pypdffit2_selectNone__doc__}, + + //bond_angle + {pypdffit2_bond_angle__name__, pypdffit2_bond_angle, + METH_VARARGS, pypdffit2_bond_angle__doc__}, + + //bond_length_atoms + {pypdffit2_bond_length_atoms__name__, pypdffit2_bond_length_atoms, + METH_VARARGS, pypdffit2_bond_length_atoms__doc__}, + + //bond_length_types + {pypdffit2_bond_length_types__name__, pypdffit2_bond_length_types, + METH_VARARGS, pypdffit2_bond_length_types__doc__}, + + //get_scat_string + {pypdffit2_get_scat_string__name__, pypdffit2_get_scat_string, + METH_VARARGS, pypdffit2_get_scat_string__doc__}, + + //get_scat + {pypdffit2_get_scat__name__, pypdffit2_get_scat, + METH_VARARGS, pypdffit2_get_scat__doc__}, + + //set_scat + {pypdffit2_set_scat__name__, pypdffit2_set_scat, + METH_VARARGS, pypdffit2_set_scat__doc__}, + + //reset_scat + {pypdffit2_reset_scat__name__, pypdffit2_reset_scat, + METH_VARARGS, pypdffit2_reset_scat__doc__}, + + //lat + {pypdffit2_lat__name__, pypdffit2_lat, + METH_VARARGS, pypdffit2_lat__doc__}, + + //x + {pypdffit2_x__name__, pypdffit2_x, + METH_VARARGS, pypdffit2_x__doc__}, + + //y + {pypdffit2_y__name__, pypdffit2_y, + METH_VARARGS, pypdffit2_y__doc__}, + + //z + {pypdffit2_z__name__, pypdffit2_z, + METH_VARARGS, pypdffit2_z__doc__}, + + //u11 + {pypdffit2_u11__name__, pypdffit2_u11, + METH_VARARGS, pypdffit2_u11__doc__}, + + //u22 + {pypdffit2_u22__name__, pypdffit2_u22, + METH_VARARGS, pypdffit2_u22__doc__}, + + //u33 + {pypdffit2_u33__name__, pypdffit2_u33, + METH_VARARGS, pypdffit2_u33__doc__}, + + //u12 + {pypdffit2_u12__name__, pypdffit2_u12, + METH_VARARGS, pypdffit2_u12__doc__}, + + //u13 + {pypdffit2_u13__name__, pypdffit2_u13, + METH_VARARGS, pypdffit2_u13__doc__}, + + //u23 + {pypdffit2_u23__name__, pypdffit2_u23, + METH_VARARGS, pypdffit2_u23__doc__}, + + //occ + {pypdffit2_occ__name__, pypdffit2_occ, + METH_VARARGS, pypdffit2_occ__doc__}, + + //pscale + {pypdffit2_pscale__name__, pypdffit2_pscale, + METH_VARARGS, pypdffit2_pscale__doc__}, + + //spdiameter + {pypdffit2_spdiameter__name__, pypdffit2_spdiameter, + METH_VARARGS, pypdffit2_spdiameter__doc__}, + + //stepcut + {pypdffit2_stepcut__name__, pypdffit2_stepcut, + METH_VARARGS, pypdffit2_stepcut__doc__}, + + //sratio + {pypdffit2_sratio__name__, pypdffit2_sratio, + METH_VARARGS, pypdffit2_sratio__doc__}, + + //delta2 + {pypdffit2_delta2__name__, pypdffit2_delta2, + METH_VARARGS, pypdffit2_delta2__doc__}, + + //delta1 + {pypdffit2_delta1__name__, pypdffit2_delta1, + METH_VARARGS, pypdffit2_delta1__doc__}, + + //dscale + {pypdffit2_dscale__name__, pypdffit2_dscale, + METH_VARARGS, pypdffit2_dscale__doc__}, + + //qdamp + {pypdffit2_qdamp__name__, pypdffit2_qdamp, + METH_VARARGS, pypdffit2_qdamp__doc__}, + + //qbroad + {pypdffit2_qbroad__name__, pypdffit2_qbroad, + METH_VARARGS, pypdffit2_qbroad__doc__}, + + //rcut + {pypdffit2_rcut__name__, pypdffit2_rcut, + METH_VARARGS, pypdffit2_rcut__doc__}, + + //get_atoms + {pypdffit2_get_atoms__name__, pypdffit2_get_atoms, + METH_VARARGS, pypdffit2_get_atoms__doc__}, + + //num_atoms + {pypdffit2_num_atoms__name__, pypdffit2_num_atoms, + METH_VARARGS, pypdffit2_num_atoms__doc__}, + + //get_atom_types + {pypdffit2_get_atom_types__name__, pypdffit2_get_atom_types, + METH_VARARGS, pypdffit2_get_atom_types__doc__}, + + //num_phases + {pypdffit2_num_phases__name__, pypdffit2_num_phases, + METH_VARARGS, pypdffit2_num_phases__doc__}, + + //num_datasets + {pypdffit2_num_datasets__name__, pypdffit2_num_datasets, + METH_VARARGS, pypdffit2_num_datasets__doc__}, + + //phase_fractions + {pypdffit2_phase_fractions__name__, pypdffit2_phase_fractions, + METH_VARARGS, pypdffit2_phase_fractions__doc__}, + + //redirect_stdout + {pypdffit2_redirect_stdout__name__, pypdffit2_redirect_stdout, + METH_VARARGS, pypdffit2_redirect_stdout__doc__}, + + //is_element + {pypdffit2_is_element__name__, pypdffit2_is_element, + METH_VARARGS, pypdffit2_is_element__doc__}, + +// Sentinel + {0, 0} +}; + +// End of file diff --git a/src/extensions/pdffit2module/bindings.h b/src/extensions/pdffit2module/bindings.h new file mode 100644 index 00000000..bf1e1406 --- /dev/null +++ b/src/extensions/pdffit2module/bindings.h @@ -0,0 +1,27 @@ +/*********************************************************************** +* +* pdffit2 by DANSE Diffraction group +* Simon J. L. Billinge +* (c) 2006 trustees of the Michigan State University +* All rights reserved. +* +* File coded by: Chris Farrow +* +* See AUTHORS.txt for a list of people who contributed. +* See LICENSE.txt for license information. +* +************************************************************************ +* +* Method table for python module bindings. +* +* Comments: +* +***********************************************************************/ + +#ifndef PYPDFFIT2_BINDINGS_H +#define PYPDFFIT2_BINDINGS_H + +// the method table +extern struct PyMethodDef pypdffit2_methods[]; + +#endif // PYPDFFIT2_BINDINGS_H diff --git a/src/extensions/pdffit2module/misc.cc b/src/extensions/pdffit2module/misc.cc new file mode 100644 index 00000000..80198049 --- /dev/null +++ b/src/extensions/pdffit2module/misc.cc @@ -0,0 +1,2219 @@ +/*********************************************************************** +* +* pdffit2 by DANSE Diffraction group +* Simon J. L. Billinge +* (c) 2006 trustees of the Michigan State University +* All rights reserved. +* +* File coded by: Chris Farrow +* +* See AUTHORS.txt for a list of people who contributed. +* See LICENSE.txt for license information. +* +************************************************************************ +* +* Bindings from python to c++ PdfFit class. +* +* Comments: +* +***********************************************************************/ +#define PY_SSIZE_T_CLEAN +#include +#include +#include +#include +#include +#include +#include +#include + +#include "misc.h" +#include "pyexceptions.h" +#include "PyFileStreambuf.h" +#include "libpdffit2/StringUtils.h" +#include "libpdffit2/LocalPeriodicTable.h" +#include "libpdffit2/pdffit.h" + +// ostream buffer used for engine output redirection +PyFileStreambuf* py_stdout_streambuf = NULL; + +// copyright +char pypdffit2_copyright__doc__[] = ""; +char pypdffit2_copyright__name__[] = "copyright"; + +static char pypdffit2_copyright_note[] = + "pdffit2 python module: Copyright (c) 2005-2016 Simon J. L. Billinge et al."; + +// constant strings for python capsule names (cn) +static char* cnpfit = "pdffit"; +static char* cnvar = "pdfvar"; + +PyObject * pypdffit2_copyright(PyObject *, PyObject *) +{ + return Py_BuildValue("s", pypdffit2_copyright_note); +} + +//helper function to convert a pylist to a double array. +void double_array_from_pylist(PyObject *pylist, double *d_array, int const length) +{ + //length is the size of the d_array and not necessarily equal to the length + //of the pylist + PyObject *pyval = 0; + + for(int i = 0; i < length; i++) { + pyval = PyList_GetItem(pylist, i); + d_array[i] = PyFloat_AsDouble(pyval); + } +} + +// helper function to delete PdfFit object +static void deletePdfFit(PyObject* ptr) +{ + PdfFit *pdf = (PdfFit *)PyCapsule_GetPointer(ptr, cnpfit); + delete pdf; + return; +} + +// create a PdfFit instance +char pypdffit2_create__doc__[] = ""; +char pypdffit2_create__name__[] = "create"; + +PyObject * pypdffit2_create(PyObject *, PyObject *args) +{ + PdfFit *ppdf = new PdfFit(); + PyObject *py_ppdf = PyCapsule_New((void *)ppdf, cnpfit, deletePdfFit); + return py_ppdf; +} + + +// read_struct +char pypdffit2_read_struct__doc__[] = "Read structure file into memory."; +char pypdffit2_read_struct__name__[] = "read_struct"; + +PyObject * pypdffit2_read_struct(PyObject *, PyObject *args) +{ + char *fname; + PyObject *py_ppdf = 0; + int ok = PyArg_ParseTuple(args, "Os", &py_ppdf, &fname); + if (!ok) return 0; + PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); + try { + ppdf->read_struct(fname); + } + catch(structureError e) { + PyErr_SetString(pypdffit2_structureError, e.GetMsg().c_str()); + return 0; + } + catch(ValueError e) { + PyErr_SetString(pypdffit2_structureError, e.GetMsg().c_str()); + return 0; + } + catch(calculationError e) { + PyErr_SetString(pypdffit2_calculationError, e.GetMsg().c_str()); + return 0; + } + catch(IOError e) { + PyErr_SetString(PyExc_IOError, e.GetMsg().c_str()); + return 0; + } + Py_INCREF(Py_None); + return Py_None; +} + +// read_struct_string +char pypdffit2_read_struct_string__doc__[] = "Read structure file into memory from a c-string."; +char pypdffit2_read_struct_string__name__[] = "read_struct_string"; + +PyObject * pypdffit2_read_struct_string(PyObject *, PyObject *args) +{ + char *buffer; + PyObject *py_ppdf = 0; + int ok = PyArg_ParseTuple(args, "Os", &py_ppdf, &buffer); + if (!ok) return 0; + PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); + try { + ppdf->read_struct_string(buffer); + } + catch(structureError e) { + PyErr_SetString(pypdffit2_structureError, e.GetMsg().c_str()); + return 0; + } + catch(ValueError e) { + PyErr_SetString(pypdffit2_structureError, e.GetMsg().c_str()); + return 0; + } + catch(calculationError e) { + PyErr_SetString(pypdffit2_calculationError, e.GetMsg().c_str()); + return 0; + } + Py_INCREF(Py_None); + return Py_None; +} + + +// read_data +char pypdffit2_read_data__doc__[] = "Read data file into memory."; +char pypdffit2_read_data__name__[] = "read_data"; + +PyObject * pypdffit2_read_data(PyObject *, PyObject *args) +{ + char *fname; + char stype; + double qmax, qdamp; + PyObject *py_ppdf = 0; + int ok = PyArg_ParseTuple(args, "Oscdd", &py_ppdf, &fname, &stype, &qmax, &qdamp); + if (!ok) return 0; + PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); + try { + ppdf->read_data(fname, stype, qmax, qdamp); + } + catch(IOError e) { + PyErr_SetString(PyExc_IOError, e.GetMsg().c_str()); + return 0; + } + catch(dataError e) { + PyErr_SetString(pypdffit2_dataError, e.GetMsg().c_str()); + return 0; + } + Py_INCREF(Py_None); + return Py_None; +} + +// read_data_string +char pypdffit2_read_data_string__doc__[] = "Read data from string into memory."; +char pypdffit2_read_data_string__name__[] = "read_data_string"; + +PyObject * pypdffit2_read_data_string(PyObject *, PyObject *args) +{ + char *buffer; + char *c_name = NULL; + char stype; + double qmax, qdamp; + PyObject *py_ppdf = 0; + int ok = PyArg_ParseTuple(args, "Oscdd|s", &py_ppdf, &buffer, &stype, &qmax, &qdamp, &c_name); + if (!ok) return 0; + PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); + string name = c_name ? c_name : ""; + try { + string sbuffer(buffer); + ppdf->read_data_string(sbuffer, stype, qmax, qdamp, name); + } + catch(IOError e) { + PyErr_SetString(PyExc_IOError, e.GetMsg().c_str()); + return 0; + } + catch(dataError e) { + PyErr_SetString(pypdffit2_dataError, e.GetMsg().c_str()); + return 0; + } + Py_INCREF(Py_None); + return Py_None; +} + +// read_data_arrays - read_data_lists in PdfFit class +char pypdffit2_read_data_arrays__doc__[] = "Read data from arrays into memory."; +char pypdffit2_read_data_arrays__name__[] = "read_data_arrays"; + +PyObject * pypdffit2_read_data_arrays(PyObject *, PyObject *args) +{ + char stype; + double qmax, qdamp; + int length; + char * c_name = NULL; + double *r_data = NULL; + double *Gr_data = NULL; + double *dGr_data = NULL; + PyObject *py_r_data = Py_None; + PyObject *py_Gr_data = Py_None; + PyObject *py_dGr_data = Py_None; + PyObject *py_ppdf = NULL; + int ok = PyArg_ParseTuple(args, "OcddOO|Os", &py_ppdf, &stype, &qmax, &qdamp, + &py_r_data, &py_Gr_data, &py_dGr_data, &c_name); + if (!ok) return 0; + PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); + + length = PyList_Size(py_Gr_data); + //quick check that the arrays are all the same length // + int r_len = PyList_Size(py_r_data); + int dGr_len = length; + if(py_dGr_data != Py_None) { + dGr_len = PyList_Size(py_dGr_data); + } + if(r_len != length || dGr_len != length) + { + string err_string = "Data arrays have different lengths"; + PyErr_SetString(PyExc_ValueError, err_string.c_str()); + return 0; + } + + // create data arrays + r_data = new double [length]; + double_array_from_pylist(py_r_data, r_data, length); + Gr_data = new double [length]; + double_array_from_pylist(py_Gr_data, Gr_data, length); + if(py_dGr_data != Py_None) { + dGr_data = new double [length]; + double_array_from_pylist(py_dGr_data, dGr_data, length); + } + string name = c_name; + try { + ppdf->read_data_arrays(stype, qmax, qdamp, length, + r_data, Gr_data, dGr_data, name); + } + catch(dataError e) { + PyErr_SetString(pypdffit2_dataError, e.GetMsg().c_str()); + return 0; + } + + // read_data_arrays creates its own copy of the data, so we must delete our + // copies here. + delete [] r_data; + delete [] Gr_data; + if( dGr_data != NULL ) delete [] dGr_data; + Py_INCREF(Py_None); + return Py_None; +} + +// pdfrange (range in c) +char pypdffit2_pdfrange__doc__[] = "Set r-range of pdf."; +char pypdffit2_pdfrange__name__[] = "pdfrange"; + +PyObject * pypdffit2_pdfrange(PyObject *, PyObject *args) +{ + int iset; + double rmin, rmax; + PyObject *py_ppdf = 0; + int ok = PyArg_ParseTuple(args, "Oidd", &py_ppdf, &iset, &rmin, &rmax); + if (!ok) return 0; + PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); + try { + ppdf->range(iset, rmin, rmax); + } + catch (ValueError e) { + PyErr_SetString(PyExc_ValueError, e.GetMsg().c_str()); + return 0; + } + Py_INCREF(Py_None); + return Py_None; +} + +// reset +char pypdffit2_reset__doc__[] = "reset pdf data"; +char pypdffit2_reset__name__[] = "reset"; + +PyObject * pypdffit2_reset(PyObject *, PyObject *args) +{ + PyObject *py_ppdf = 0; + int ok = PyArg_ParseTuple(args, "O", &py_ppdf); + if (!ok) return 0; + PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); + ppdf->reset(); + Py_INCREF(Py_None); + return Py_None; +} + +// alloc +char pypdffit2_alloc__doc__[] = "Allocate space for pdf data"; +char pypdffit2_alloc__name__[] = "alloc"; + +PyObject * pypdffit2_alloc(PyObject *, PyObject *args) +{ + char stype; + double qmax, qdamp, rmin, rmax; + int bin; + PyObject *py_ppdf = 0; + int ok = PyArg_ParseTuple(args, "Ocddddi", &py_ppdf, &stype, &qmax, &qdamp, &rmin, &rmax, &bin); + if (!ok) return 0; + PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); + try { + ppdf->alloc(stype, qmax, qdamp, rmin, rmax, bin); + } + catch (ValueError e) { + PyErr_SetString(PyExc_ValueError, e.GetMsg().c_str()); + return 0; + } + catch (unassignedError e) { + PyErr_SetString(pypdffit2_unassignedError, e.GetMsg().c_str()); + return 0; + } + Py_INCREF(Py_None); + return Py_None; +} + +// calc +char pypdffit2_calc__doc__[] = "calculate pdf from data"; +char pypdffit2_calc__name__[] = "calc"; + +PyObject * pypdffit2_calc(PyObject *, PyObject *args) +{ + PyObject *py_ppdf = 0; + int ok = PyArg_ParseTuple(args, "O", &py_ppdf); + if (!ok) return 0; + PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); + try { + ppdf->calc(); + } + catch (calculationError e) { + PyErr_SetString(pypdffit2_calculationError, e.GetMsg().c_str()); + return 0; + } + catch (unassignedError e) { + PyErr_SetString(pypdffit2_unassignedError, e.GetMsg().c_str()); + return 0; + } + catch (parseError e) { + PyErr_SetString(pypdffit2_constraintError, e.GetMsg().c_str()); + return 0; + } + Py_INCREF(Py_None); + return Py_None; +} + +// refine +char pypdffit2_refine__doc__[] = "refine model to pdf data"; +char pypdffit2_refine__name__[] = "refine"; + +PyObject * pypdffit2_refine(PyObject *, PyObject *args) +{ + PyObject *py_ppdf = 0; + double toler; + int ok = PyArg_ParseTuple(args, "Od", &py_ppdf, &toler); + if (!ok) return 0; + PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); + try { + ppdf->refine(true, toler); + } + catch(constraintError e) { + PyErr_SetString(pypdffit2_constraintError, e.GetMsg().c_str()); + return 0; + } + catch(calculationError e) { + PyErr_SetString(pypdffit2_calculationError, e.GetMsg().c_str()); + return 0; + } + Py_INCREF(Py_None); + return Py_None; +} + +// local helper class for background thread in pypdffit2_refine_step() +namespace { + +class RefineStepHelper +{ + private: + PyThreadState* thread_state; + ostringstream msgout; + + public: + // Constructor saves thread state and arranges for holding + // engine output when redirected + RefineStepHelper() + { + if (py_stdout_streambuf) + { + NS_PDFFIT2::pout->rdbuf(msgout.rdbuf()); + } + thread_state = PyEval_SaveThread(); + } + + // method for restoring thread state and writing any outstanding output + void clean() + { + PyEval_RestoreThread(thread_state); + if (py_stdout_streambuf) + { + NS_PDFFIT2::pout->rdbuf(py_stdout_streambuf); + *NS_PDFFIT2::pout << msgout.str(); + } + } +}; + +} // local namespace + +// refine_step +char pypdffit2_refine_step__doc__[] = "Make one step in the refinement process."; +char pypdffit2_refine_step__name__[] = "refine_step"; + +PyObject * pypdffit2_refine_step(PyObject *, PyObject *args) +{ + PyObject *py_ppdf = 0; + double toler; + int ok = PyArg_ParseTuple(args, "Od", &py_ppdf, &toler); + if (!ok) return 0; + PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); + RefineStepHelper janitor; // takes care of thread an output issues + int finished = 1; + try { + finished = ppdf->refine_step(true, toler); + } + catch(parseError e) { + // parseError is due to invalid constraint + janitor.clean(); + PyErr_SetString(pypdffit2_constraintError, e.GetMsg().c_str()); + return 0; + } + catch(constraintError e) { + janitor.clean(); + PyErr_SetString(pypdffit2_constraintError, e.GetMsg().c_str()); + return 0; + } + catch(calculationError e) { + janitor.clean(); + PyErr_SetString(pypdffit2_calculationError, e.GetMsg().c_str()); + return 0; + } + catch(unassignedError e) { + janitor.clean(); + PyErr_SetString(pypdffit2_unassignedError, e.GetMsg().c_str()); + return 0; + } + catch(...) { + janitor.clean(); + return 0; + } + janitor.clean(); + + return Py_BuildValue("i", finished); +} + +// save_pdf +char pypdffit2_save_pdf__doc__[] = "Save calculated pdf to file"; +char pypdffit2_save_pdf__name__[] = "save_pdf"; + +PyObject * pypdffit2_save_pdf(PyObject *, PyObject *args) +{ + char *fname; + int iset; + PyObject *py_ppdf = 0; + int ok = PyArg_ParseTuple(args, "Ois", &py_ppdf, &iset, &fname); + if (!ok) return 0; + PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); + try + { + string outfilestring = ppdf->save_pdf(iset, fname); + return Py_BuildValue("s", outfilestring.c_str()); + } + catch(IOError e) + { + PyErr_SetString(PyExc_IOError, e.GetMsg().c_str()); + return 0; + } + catch(unassignedError e) + { + PyErr_SetString(pypdffit2_unassignedError, e.GetMsg().c_str()); + return 0; + } + Py_INCREF(Py_None); + return Py_None; +} + +// save_dif +char pypdffit2_save_dif__doc__[] = "Save pdf difference to file"; +char pypdffit2_save_dif__name__[] = "save_dif"; + +PyObject * pypdffit2_save_dif(PyObject *, PyObject *args) +{ + char *fname; + int iset; + PyObject *py_ppdf = 0; + int ok = PyArg_ParseTuple(args, "Ois", &py_ppdf, &iset, &fname); + if (!ok) return 0; + PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); + try + { + string outfilestring = ppdf->save_dif(iset, fname); + return Py_BuildValue("s", outfilestring.c_str()); + } + catch(IOError e) + { + PyErr_SetString(PyExc_IOError, e.GetMsg().c_str()); + return 0; + } + catch(unassignedError e) + { + PyErr_SetString(pypdffit2_unassignedError, e.GetMsg().c_str()); + return 0; + } + Py_INCREF(Py_None); + return Py_None; +} + +// save_res +char pypdffit2_save_res__doc__[] = "Save residual to file"; +char pypdffit2_save_res__name__[] = "save_res"; + +PyObject * pypdffit2_save_res(PyObject *, PyObject *args) +{ + char *fname; + PyObject *py_ppdf = 0; + int ok = PyArg_ParseTuple(args, "Os", &py_ppdf, &fname); + if (!ok) return 0; + PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); + try + { + string outfilestring = ppdf->save_res(fname); + return Py_BuildValue("s", outfilestring.c_str()); + } + catch(IOError e) + { + PyErr_SetString(PyExc_IOError, e.GetMsg().c_str()); + return 0; + } + catch(unassignedError e) + { + PyErr_SetString(pypdffit2_unassignedError, e.GetMsg().c_str()); + return 0; + } + Py_INCREF(Py_None); + return Py_None; +} + +// save_struct +char pypdffit2_save_struct__doc__[] = "Save refined structure to file"; +char pypdffit2_save_struct__name__[] = "save_struct"; + +PyObject * pypdffit2_save_struct(PyObject *, PyObject *args) +{ + char *fname; + int iset; + PyObject *py_ppdf = 0; + int ok = PyArg_ParseTuple(args, "Ois", &py_ppdf, &iset, &fname); + if (!ok) return 0; + PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); + try + { + string outfilestring = ppdf->save_struct(iset, fname); + return Py_BuildValue("s", outfilestring.c_str()); + } + catch(IOError e) + { + PyErr_SetString(PyExc_IOError, e.GetMsg().c_str()); + return 0; + } + catch(unassignedError e) + { + PyErr_SetString(pypdffit2_unassignedError, e.GetMsg().c_str()); + return 0; + } + Py_INCREF(Py_None); + return Py_None; +} + +// show_struct +char pypdffit2_show_struct__doc__[] = "Show structure."; +char pypdffit2_show_struct__name__[] = "show_struct"; + +PyObject * pypdffit2_show_struct(PyObject *, PyObject *args) +{ + int ip; + PyObject *py_ppdf = 0; + int ok = PyArg_ParseTuple(args, "Oi", &py_ppdf, &ip); + if (!ok) return 0; + PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); + try + { + string outfilestring = ppdf->show_struct(ip); + return Py_BuildValue("s", outfilestring.c_str()); + } + catch(unassignedError e) + { + PyErr_SetString(pypdffit2_unassignedError, e.GetMsg().c_str()); + return 0; + } + Py_INCREF(Py_None); + return Py_None; +} + +// constrain to string +char pypdffit2_constrain_str__doc__[] = "Constrain refined variable to string."; +char pypdffit2_constrain_str__name__[] = "constrain_str"; + +PyObject* pypdffit2_constrain_str(PyObject*, PyObject* args) +{ + PyObject* py_v = 0; + char* vname; + char* form; + PyObject* py_ppdf = 0; + int ok = PyArg_ParseTuple(args, "OOss", &py_ppdf, &py_v, &vname, &form); + if (!ok) return 0; + PdfFit* ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); + RefVar* v = (RefVar *) PyCapsule_GetPointer(py_v, cnvar); + if (v->type() != "RefVar") + { + string emsg = "cannot constrain non-refinable variable "; + emsg += vname; + PyErr_SetString(pypdffit2_constraintError, emsg.c_str()); + return 0; + } + if (v->isAssigned()) { + try { + ppdf->constrain(*v, form); + } + catch (constraintError e) { + PyErr_SetString(pypdffit2_constraintError, e.GetMsg().c_str()); + return 0; + } + catch (unassignedError e) { + PyErr_SetString(pypdffit2_unassignedError, e.GetMsg().c_str()); + return 0; + } + } + else { + ostringstream emsg; + emsg << "Variable " << vname << " was not yet assigned"; + PyErr_SetString(pypdffit2_unassignedError, emsg.str().c_str()); + } + Py_INCREF(Py_None); + return Py_None; +} + +// constrain to integer. +char pypdffit2_constrain_int__doc__[] = "Constrain refined variable to integer."; +char pypdffit2_constrain_int__name__[] = "constrain_int"; + +PyObject* pypdffit2_constrain_int(PyObject*, PyObject* args) +{ + PyObject* py_v = 0; + int ftype = 0; + char* vname; + int ipar; + PyObject* py_ppdf = 0; + int ok = PyArg_ParseTuple(args, "OOsi|i", &py_ppdf, &py_v, &vname, &ipar, &ftype); + if (!ok) return 0; + PdfFit* ppdf = (PdfFit*) PyCapsule_GetPointer(py_ppdf, cnpfit); + RefVar* v = (RefVar*) PyCapsule_GetPointer(py_v, cnvar); + if (v->type() != "RefVar") + { + string emsg = "cannot constrain non-refinable variable "; + emsg += vname; + PyErr_SetString(pypdffit2_constraintError, emsg.c_str()); + return 0; + } + if (v->isAssigned()) { + try { + if (ftype) + { + ppdf->constrain(*v, ipar, (FCON)ftype); + } + else ppdf->constrain(*v, ipar); + } + catch (constraintError e) { + PyErr_SetString(pypdffit2_constraintError, e.GetMsg().c_str()); + return 0; + } + catch (unassignedError e) { + PyErr_SetString(pypdffit2_unassignedError, e.GetMsg().c_str()); + return 0; + } + } + else { + ostringstream emsg; + emsg << "Variable " << vname << " was not yet assigned"; + PyErr_SetString(pypdffit2_unassignedError, emsg.str().c_str()); + return 0; + } + Py_INCREF(Py_None); + return Py_None; +} + +// setpar with value of double +char pypdffit2_setpar_dbl__doc__[] = "Set parameter value."; +char pypdffit2_setpar_dbl__name__[] = "setpar_dbl"; + +PyObject * pypdffit2_setpar_dbl(PyObject *, PyObject *args) +{ + unsigned int n; + double val; + PyObject *py_ppdf = 0; + int ok = PyArg_ParseTuple(args, "OId", &py_ppdf, &n, &val); + if (!ok) return 0; + PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); + try + { + ppdf->setpar(n, val); + } + catch(unassignedError e) + { + PyErr_SetString(pypdffit2_unassignedError, e.GetMsg().c_str()); + return 0; + } + Py_INCREF(Py_None); + return Py_None; +} + +// setpar with value of RefVar +char pypdffit2_setpar_RV__doc__[] = "Set parameter value via refined variable."; +char pypdffit2_setpar_RV__name__[] = "setpar_RV"; + +PyObject * pypdffit2_setpar_RV(PyObject *, PyObject *args) +{ + unsigned int n; + RefVar *v; + PyObject *py_v; + PyObject *py_ppdf = 0; + int ok = PyArg_ParseTuple(args, "OIO", &py_ppdf, &n, &py_v); + if (!ok) return 0; + PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); + v = (RefVar *) PyCapsule_GetPointer(py_v, cnvar); + if( v->isAssigned() ) { + try + { + ppdf->setpar(n, *v); + } + catch(unassignedError e) + { + PyErr_SetString(pypdffit2_unassignedError, e.GetMsg().c_str()); + return 0; + } + } + else { + string eout = "Variable not yet assigned"; + PyErr_SetString(pypdffit2_unassignedError, eout.c_str()); + return 0; + } + Py_INCREF(Py_None); + return Py_None; +} + +// setvar +char pypdffit2_setvar__doc__[] = "Set variable to value."; +char pypdffit2_setvar__name__[] = "setvar"; + +PyObject * pypdffit2_setvar(PyObject *, PyObject *args) +{ + double a; + NonRefVar *v; + PyObject *py_v; + PyObject *py_ppdf = 0; + int ok = PyArg_ParseTuple(args, "OOd", &py_ppdf, &py_v, &a); + if (!ok) return 0; + PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); + v = (NonRefVar *) PyCapsule_GetPointer(py_v, cnvar); + if( v->isAssigned() ) { + ppdf->setvar(*v, a); + } + else { + string eout = "Must import a structure"; + PyErr_SetString(pypdffit2_unassignedError, eout.c_str()); + return 0; + } + Py_INCREF(Py_None); + return Py_None; +} + +// getvar +char pypdffit2_getvar__doc__[] = "Get variable value."; +char pypdffit2_getvar__name__[] = "getvar"; + +PyObject * pypdffit2_getvar(PyObject *, PyObject *args) +{ + NonRefVar *v = 0; + PyObject *py_v = 0; + PyObject *py_ppdf = 0; + int ok = PyArg_ParseTuple(args, "OO", &py_ppdf, &py_v); + if (!ok) return 0; + PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); + v = (NonRefVar *) PyCapsule_GetPointer(py_v, cnvar); + if(v->isAssigned()) { + double crval = ppdf->getvar(*v); + return Py_BuildValue("d", crval); + } + else { + string eout = "Variable not yet assigned"; + PyErr_SetString(pypdffit2_unassignedError, eout.c_str()); + return 0; + Py_INCREF(Py_None); + return Py_None; + } +} + +// getcrw +char pypdffit2_getcrw__doc__[] = "Get cumulative Rw for the current dataset."; +char pypdffit2_getcrw__name__[] = "getcrw"; + +PyObject * pypdffit2_getcrw(PyObject *, PyObject *args) +{ + PyObject *py_ppdf = 0; + int ok = PyArg_ParseTuple(args, "O", &py_ppdf); + if (!ok) return 0; + PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); + try + { + vector crw = ppdf->getcrw(); + PyObject *py_r; + py_r = PyList_New(crw.size()); + for (int i = 0; i != int(crw.size()); ++i) + { + PyList_SetItem(py_r, i, PyFloat_FromDouble(crw[i])); + } + return py_r; + } + catch(unassignedError e) + { + PyErr_SetString(pypdffit2_unassignedError, e.GetMsg().c_str()); + return 0; + } +} + +// getrw +char pypdffit2_getrw__doc__[] = "Get rw of fit."; +char pypdffit2_getrw__name__[] = "getrw"; + +PyObject * pypdffit2_getrw(PyObject *, PyObject *args) +{ + PyObject *py_ppdf = 0; + int ok = PyArg_ParseTuple(args, "O", &py_ppdf); + if (!ok) return 0; + PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); + double crval = ppdf->getrw(); + return Py_BuildValue("d", crval); +} + +// getR +char pypdffit2_getR__doc__[] = "Get list of r-values for plotting."; +char pypdffit2_getR__name__[] = "getR"; + +PyObject * pypdffit2_getR(PyObject *, PyObject *args) +{ + PyObject *py_ppdf = 0; + int ok = PyArg_ParseTuple(args, "O", &py_ppdf); + if (!ok) return 0; + PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); + /* One should not put functionality in the bindings. However, + * this function is meant to create a python object from a + * c-object that does not actually exist. All that is stored + * in pdffit about the fitted R-range is the minimum, maximum, + * and step size. This binding turns that info into a python + * list. If the number of fit points stored in nfmax and nfmin + * have not yet been assigned, then this falls back on the + * r-points. This is crucial so that one can investigate the + * PDF before any fitting has been done. Once fit parameters + * have been established, they can be used and the r list, + * pdf-obs list, and pdf-fit list will be the same size. + * Also see getpdf_obs(). + */ + try + { + int nfmin = ppdf->getnfmin(); + int nfmax = ppdf->getnfmax(); + int len = nfmax - nfmin + 1; + double rmin = ppdf->getrmin(); + double rmax = ppdf->getrmax(); + double deltar = ppdf->getdeltar(); + PyObject *py_r; + if(len == 1) + { + nfmin = 0; + nfmax = (int) ((rmax - rmin)/deltar); + len = nfmax + 1; + } + py_r = PyList_New(len); + for (int i=nfmin;i<=nfmax;i++) + { + PyList_SetItem(py_r, i-nfmin, Py_BuildValue("d", i*deltar + rmin)); + } + + return py_r; + } + catch(unassignedError e) + { + PyErr_SetString(pypdffit2_unassignedError, e.GetMsg().c_str()); + return 0; + } +} + + +// getpdf_fit +char pypdffit2_getpdf_fit__doc__[] = "Get list of calculated pdf points."; +char pypdffit2_getpdf_fit__name__[] = "getpdf_fit"; + +PyObject * pypdffit2_getpdf_fit(PyObject *, PyObject *args) +{ + PyObject *py_ppdf = 0; + int ok = PyArg_ParseTuple(args, "O", &py_ppdf); + if (!ok) return 0; + PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); + //Return only the data range used in the fit + try + { + int min = ppdf->getnfmin(); + int max = ppdf->getnfmax(); + int len = max - min + 1; + vector v_pdfdata = ppdf->getpdf_fit(); + PyObject *py_r; + py_r = PyList_New(len); + for (int i=min;i<=max;i++) { + PyList_SetItem(py_r, i-min, Py_BuildValue("d", v_pdfdata[i])); + } + return py_r; + } + catch(unassignedError e) + { + PyErr_SetString(pypdffit2_unassignedError, e.GetMsg().c_str()); + return 0; + } +} + + +// getpdf_obs +char pypdffit2_getpdf_obs__doc__[] = "Get list of observed (theory) pdf points."; +char pypdffit2_getpdf_obs__name__[] = "getpdf_obs"; + +PyObject * pypdffit2_getpdf_obs(PyObject *, PyObject *args) +{ + PyObject *py_ppdf = 0; + int ok = PyArg_ParseTuple(args, "O", &py_ppdf); + if (!ok) return 0; + PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); + try + { + vector v_pdfdata = ppdf->getpdf_obs(); + int nfmin = ppdf->getnfmin(); + int nfmax = ppdf->getnfmax(); + int len = nfmax - nfmin + 1; + //Return only the data range used in the fit + PyObject *py_r; + py_r = PyList_New(len); + for (int i=nfmin;i<=nfmax;i++) { + PyList_SetItem(py_r, i-nfmin, Py_BuildValue("d", v_pdfdata[i])); + } + return py_r; + } + catch(unassignedError e) + { + PyErr_SetString(pypdffit2_unassignedError, e.GetMsg().c_str()); + return 0; + } +} + +// getpdf_diff +char pypdffit2_getpdf_diff__doc__[] = "Get list of differences between observed and fitted PDF points."; +char pypdffit2_getpdf_diff__name__[] = "getpdf_diff"; + +PyObject * pypdffit2_getpdf_diff(PyObject *, PyObject *args) +{ + PyObject *py_ppdf = 0; + int ok = PyArg_ParseTuple(args, "O", &py_ppdf); + if (!ok) return 0; + PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); + try + { + vector Gobs = ppdf->getpdf_obs(); + vector Gfit = ppdf->getpdf_fit(); + int nfmin = ppdf->getnfmin(); + int nfmax = ppdf->getnfmax(); + int len = nfmax - nfmin + 1; + //Return only the data range used in the fit + PyObject *py_r; + py_r = PyList_New(len); + for (int i = nfmin; i <= nfmax; i++) { + double Gdiff_i = Gobs[i] - Gfit[i]; + PyList_SetItem(py_r, i-nfmin, Py_BuildValue("d", Gdiff_i)); + } + return py_r; + } + catch(unassignedError e) + { + PyErr_SetString(pypdffit2_unassignedError, e.GetMsg().c_str()); + return 0; + } +} + + +// getpar +char pypdffit2_getpar__doc__[] = "Get value of parameter"; +char pypdffit2_getpar__name__[] = "getpar"; + +PyObject * pypdffit2_getpar(PyObject *, PyObject *args) +{ + unsigned int n; + PyObject *py_ppdf = 0; + int ok = PyArg_ParseTuple(args, "OI", &py_ppdf, &n); + if (!ok) return 0; + PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); + try + { + double crval = ppdf->getpar(n); + return Py_BuildValue("d", crval); + } + catch(unassignedError e) + { + PyErr_SetString(pypdffit2_unassignedError, e.GetMsg().c_str()); + return 0; + } +} + +// fixpar +char pypdffit2_fixpar__doc__[] = "Fix value of parameter."; +char pypdffit2_fixpar__name__[] = "fixpar"; + +PyObject * pypdffit2_fixpar(PyObject *, PyObject *args) +{ + int n; + PyObject *py_ppdf = 0; + int ok = PyArg_ParseTuple(args, "Oi", &py_ppdf, &n); + if (!ok) return 0; + PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); + try + { + ppdf->fixpar(n); + } + catch(unassignedError e) + { + PyErr_SetString(pypdffit2_unassignedError, e.GetMsg().c_str()); + return 0; + } + Py_INCREF(Py_None); + return Py_None; +} + +// freepar +char pypdffit2_freepar__doc__[] = "Free parameter."; +char pypdffit2_freepar__name__[] = "freepar"; + +PyObject * pypdffit2_freepar(PyObject *, PyObject *args) +{ + int n; + PyObject *py_ppdf = 0; + int ok = PyArg_ParseTuple(args, "Oi", &py_ppdf, &n); + if (!ok) return 0; + PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); + try + { + ppdf->freepar(n); + } + catch(unassignedError e) + { + PyErr_SetString(pypdffit2_unassignedError, e.GetMsg().c_str()); + return 0; + } + Py_INCREF(Py_None); + return Py_None; +} + +// setphase +char pypdffit2_setphase__doc__[] = "Set phase in focus."; +char pypdffit2_setphase__name__[] = "setphase"; + +PyObject * pypdffit2_setphase(PyObject *, PyObject *args) +{ + int ip; + PyObject *py_ppdf = 0; + int ok = PyArg_ParseTuple(args, "Oi", &py_ppdf, &ip); + if (!ok) return 0; + PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); + try + { + ppdf->setphase(ip); + } + catch(unassignedError e) + { + PyErr_SetString(pypdffit2_unassignedError, e.GetMsg().c_str()); + return 0; + } + Py_INCREF(Py_None); + return Py_None; +} + +// setdata +char pypdffit2_setdata__doc__[] = "Set data in focus."; +char pypdffit2_setdata__name__[] = "setdata"; + +PyObject * pypdffit2_setdata(PyObject *, PyObject *args) +{ + int is; + PyObject *py_ppdf = 0; + int ok = PyArg_ParseTuple(args, "Oi", &py_ppdf, &is); + if (!ok) return 0; + PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); + try + { + ppdf->setdata(is); + } + catch(unassignedError e) + { + PyErr_SetString(pypdffit2_unassignedError, e.GetMsg().c_str()); + return 0; + } + Py_INCREF(Py_None); + return Py_None; +} + +// psel +char pypdffit2_psel__doc__[] = "Select phase in focus."; +char pypdffit2_psel__name__[] = "psel"; + +PyObject * pypdffit2_psel(PyObject *, PyObject *args) +{ + int ip; + PyObject *py_ppdf = 0; + int ok = PyArg_ParseTuple(args, "Oi", &py_ppdf, &ip); + if (!ok) return 0; + PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); + try + { + ppdf->selphase(ip); + } + catch(unassignedError e) + { + // PyErr_Warn(PyExc_Warning, e.GetMsg().c_str()); + PyErr_SetString(pypdffit2_unassignedError, e.GetMsg().c_str()); + return 0; + } + Py_INCREF(Py_None); + return Py_None; +} + +// pdesel +char pypdffit2_pdesel__doc__[] = "Deselect phase in focus."; +char pypdffit2_pdesel__name__[] = "pdesel"; + +PyObject * pypdffit2_pdesel(PyObject *, PyObject *args) +{ + int ip; + PyObject *py_ppdf = 0; + int ok = PyArg_ParseTuple(args, "Oi", &py_ppdf, &ip); + if (!ok) return 0; + PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); + try + { + ppdf->pdesel(ip); + } + catch(unassignedError e) + { + // PyErr_Warn(PyExc_Warning, e.GetMsg().c_str()); + PyErr_SetString(pypdffit2_unassignedError, e.GetMsg().c_str()); + return 0; + } + Py_INCREF(Py_None); + return Py_None; +} + +// selectAtomType +char pypdffit2_selectAtomType__doc__[] = "Include element in 'i' or 'j' pair of PDF calculation."; +char pypdffit2_selectAtomType__name__[] = "selectAtomType"; + +PyObject * pypdffit2_selectAtomType(PyObject *, PyObject *args) +{ + PyObject *py_ppdf = 0; + int ip; + char ijchar; + char* smbpat; + bool select; + int ok = PyArg_ParseTuple(args, "Oicsb", &py_ppdf, &ip, &ijchar, &smbpat, &select); + if (!ok) return 0; + PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); + try + { + ppdf->selectAtomType(ip, ijchar, smbpat, select); + } + catch(unassignedError e) + { + PyErr_SetString(pypdffit2_unassignedError, e.GetMsg().c_str()); + return 0; + } + catch(ValueError e) + { + PyErr_SetString(PyExc_ValueError, e.GetMsg().c_str()); + return 0; + } + Py_INCREF(Py_None); + return Py_None; +} + +// selectAtomIndex +char pypdffit2_selectAtomIndex__doc__[] = "Include atom of given index in 'i' or 'j' pair of PDF calculation."; +char pypdffit2_selectAtomIndex__name__[] = "selectAtomIndex"; + +PyObject * pypdffit2_selectAtomIndex(PyObject *, PyObject *args) +{ + PyObject *py_ppdf = 0; + int ip; + char ijchar; + int aidx1; + bool select; + int ok = PyArg_ParseTuple(args, "Oicib", &py_ppdf, &ip, &ijchar, &aidx1, &select); + if (!ok) return 0; + PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); + try + { + ppdf->selectAtomIndex(ip, ijchar, aidx1, select); + } + catch(unassignedError e) + { + PyErr_SetString(pypdffit2_unassignedError, e.GetMsg().c_str()); + return 0; + } + catch(ValueError e) + { + PyErr_SetString(PyExc_ValueError, e.GetMsg().c_str()); + return 0; + } + Py_INCREF(Py_None); + return Py_None; +} + +// selectAll +char pypdffit2_selectAll__doc__[] = "Include all atoms in 'i' or 'j' pair of PDF calculation."; +char pypdffit2_selectAll__name__[] = "selectAll"; + +PyObject * pypdffit2_selectAll(PyObject *, PyObject *args) +{ + PyObject *py_ppdf = 0; + int ip; + char ijchar; + int ok = PyArg_ParseTuple(args, "Oic", &py_ppdf, &ip, &ijchar); + if (!ok) return 0; + PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); + try + { + ppdf->selectAll(ip, ijchar); + } + catch(unassignedError e) + { + PyErr_SetString(pypdffit2_unassignedError, e.GetMsg().c_str()); + return 0; + } + catch(ValueError e) + { + PyErr_SetString(PyExc_ValueError, e.GetMsg().c_str()); + return 0; + } + Py_INCREF(Py_None); + return Py_None; +} + +// selectNone +char pypdffit2_selectNone__doc__[] = "Include all atoms in 'i' or 'j' pair of PDF calculation."; +char pypdffit2_selectNone__name__[] = "selectNone"; + +PyObject * pypdffit2_selectNone(PyObject *, PyObject *args) +{ + PyObject *py_ppdf = 0; + int ip; + char ijchar; + int ok = PyArg_ParseTuple(args, "Oic", &py_ppdf, &ip, &ijchar); + if (!ok) return 0; + PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); + try + { + ppdf->selectNone(ip, ijchar); + } + catch(unassignedError e) + { + PyErr_SetString(pypdffit2_unassignedError, e.GetMsg().c_str()); + return 0; + } + catch(ValueError e) + { + PyErr_SetString(PyExc_ValueError, e.GetMsg().c_str()); + return 0; + } + Py_INCREF(Py_None); + return Py_None; +} + +// bond_angle +char pypdffit2_bond_angle__doc__[] = "Return bond angle between three atoms."; +char pypdffit2_bond_angle__name__[] = "bond_angle"; + +PyObject * pypdffit2_bond_angle(PyObject *, PyObject *args) +{ + int ia, ja, ka; + PyObject *py_ppdf = 0; + int ok = PyArg_ParseTuple(args, "Oiii", &py_ppdf, &ia, &ja, &ka); + if (!ok) return 0; + PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); + try { + pair angstd = ppdf->bond_angle(ia, ja, ka); + PyObject* py_tpl; + py_tpl = Py_BuildValue("(d,d)", angstd.first, angstd.second); + return py_tpl; + } + catch (ValueError e) { + PyErr_SetString(PyExc_ValueError, e.GetMsg().c_str()); + return 0; + } + catch (unassignedError e) { + PyErr_SetString(pypdffit2_unassignedError, e.GetMsg().c_str()); + return 0; + } +} + +// bond_length_atoms (nearest bond length between two atoms) +char pypdffit2_bond_length_atoms__doc__[] = + "Return a tuple of (dij, ddij) for distance between two atoms\n" + "and its standard deviation."; +char pypdffit2_bond_length_atoms__name__[] = "bond_length_atoms"; + +PyObject * pypdffit2_bond_length_atoms(PyObject *, PyObject *args) +{ + int ia, ja; + PyObject *py_ppdf = 0; + int ok = PyArg_ParseTuple(args, "Oii", &py_ppdf, &ia, &ja); + PairDistance pd; + if (!ok) return 0; + PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); + try { + pd = ppdf->bond_length_atoms(ia, ja); + PyObject *py_tpl; + py_tpl = Py_BuildValue("(d,d)", pd.dij, pd.ddij); + return py_tpl; + } + catch (ValueError e) { + PyErr_SetString(PyExc_ValueError, e.GetMsg().c_str()); + return 0; + } + catch (unassignedError e) { + PyErr_SetString(pypdffit2_unassignedError, e.GetMsg().c_str()); + return 0; + } +} + +// bond_length_types (bond lengths between two elements inside given bounds) +char pypdffit2_bond_length_types__doc__[] = + "Return bond lengths between two elements within given bounds\n" + "\n" + "a1 -- symbol of the first element in pair or 'ALL'\n" + "a2 -- symbol of the second element in pair or 'ALL'\n" + "lb -- lower bound for bond lengths\n" + "ub -- upper bound for bond lengths\n" + "\n" + "Return a dictionary of distance data containing:\n" + "\n" + "dij : list of bond lenghts within given bounds\n" + "ddij : list of bond legnth standard deviations\n" + "ij0 : list of tupled pairs of indices starting at 0\n" + "ij1 : list of tupled pairs of indices starting at 1"; +char pypdffit2_bond_length_types__name__[] = "bond_length_types"; + +PyObject * pypdffit2_bond_length_types(PyObject *, PyObject *args) +{ + char* symi; + char* symj; + double bmin = 0; + double bmax = 0; + PyObject *py_ppdf = 0; + int ok = PyArg_ParseTuple(args, "Ossdd", &py_ppdf, &symi, &symj, &bmin, &bmax); + vector pdvec; + if (!ok) return 0; + PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); + try { + pdvec = ppdf->bond_length_types(symi, symj, bmin, bmax); + int np = pdvec.size(); + PyObject* py_dij; + PyObject* py_ddij; + PyObject* py_ij0; + PyObject* py_ij1; + py_dij = PyList_New(np); + py_ddij = PyList_New(np); + py_ij0 = PyList_New(np); + py_ij1 = PyList_New(np); + for (int i = 0; i < np; ++i) + { + PairDistance& pd = pdvec[i]; + PyObject *py_item; + py_item = PyFloat_FromDouble(pd.dij); + PyList_SetItem(py_dij, i, py_item); + py_item = PyFloat_FromDouble(pd.ddij); + PyList_SetItem(py_ddij, i, py_item); + py_item = Py_BuildValue("(i,i)", pd.i - 1, pd.j - 1); + PyList_SetItem(py_ij0, i, py_item); + py_item = Py_BuildValue("(i,i)", pd.i, pd.j); + PyList_SetItem(py_ij1, i, py_item); + } + PyObject* py_rv; + py_rv = PyDict_New(); + PyDict_SetItemString(py_rv, "dij", py_dij); + PyDict_SetItemString(py_rv, "ddij", py_ddij); + PyDict_SetItemString(py_rv, "ij0", py_ij0); + PyDict_SetItemString(py_rv, "ij1", py_ij1); + return py_rv; + } + catch (ValueError e) { + PyErr_SetString(PyExc_ValueError, e.GetMsg().c_str()); + return 0; + } + catch (unassignedError e) { + PyErr_SetString(pypdffit2_unassignedError, e.GetMsg().c_str()); + return 0; + } +} + +// get_scat_string +char pypdffit2_get_scat_string__doc__[] = "Return string with scatter details."; +char pypdffit2_get_scat_string__name__[] = "get_scat_string"; + +PyObject * pypdffit2_get_scat_string(PyObject *, PyObject *args) +{ + char stype; + PyObject *py_ppdf = 0; + int ok = PyArg_ParseTuple(args, "Oc", &py_ppdf, &stype); + if (!ok) return 0; + PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); + string outstring; + if (!ppdf->curphase) + { + PyErr_SetString(pypdffit2_unassignedError, "No scatterers exist"); + return 0; + } + // here curphase exists, get_scat_string throws runtime error + // for invalid stype. + try { + outstring = (ppdf->curphase)->get_scat_string(stype); + } + catch (runtime_error e) { + PyErr_SetString(PyExc_ValueError, e.what()); + return 0; + } + return Py_BuildValue("s", outstring.c_str()); +} + +// get_scat +char pypdffit2_get_scat__doc__[] = "Return scattering factor for given element."; +char pypdffit2_get_scat__name__[] = "get_scat"; + +PyObject * pypdffit2_get_scat(PyObject *, PyObject *args) +{ + char stype; + char* smbpat; + PyObject *py_ppdf = 0; + int ok = PyArg_ParseTuple(args, "Ocs", &py_ppdf, &stype, &smbpat); + if (!ok) return 0; + PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); + double value; + try { + value = ppdf->get_scat(stype, smbpat); + } + catch (ValueError e) { + PyErr_SetString(PyExc_ValueError, e.GetMsg().c_str()); + return 0; + } + PyObject* py_rv; + py_rv = PyFloat_FromDouble(value); + return py_rv; +} + +// set_scat +char pypdffit2_set_scat__doc__[] = "Set custom scattering factor for given element."; +char pypdffit2_set_scat__name__[] = "set_scat"; + +PyObject * pypdffit2_set_scat(PyObject *, PyObject *args) +{ + char stype; + char* smbpat; + double value; + PyObject *py_ppdf = 0; + int ok = PyArg_ParseTuple(args, "Ocsd", &py_ppdf, &stype, &smbpat, &value); + if (!ok) return 0; + PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); + if (!ppdf->curphase) + { + PyErr_SetString(pypdffit2_unassignedError, "phase does not exist"); + return 0; + } + // Here curphase exists. set_scat may throw + // runtime or ValueError for invalid arguments + try { + ppdf->curphase->set_scat(stype, smbpat, value); + } + catch (ValueError e) { + PyErr_SetString(PyExc_ValueError, e.GetMsg().c_str()); + return 0; + } + catch (runtime_error e) { + PyErr_SetString(PyExc_ValueError, e.what()); + return 0; + } + Py_INCREF(Py_None); + return Py_None; +} + +// reset_scat +char pypdffit2_reset_scat__doc__[] = "Reset scattering factor for given element."; +char pypdffit2_reset_scat__name__[] = "reset_scat"; + +PyObject * pypdffit2_reset_scat(PyObject *, PyObject *args) +{ + char* smbpat; + PyObject *py_ppdf = 0; + int ok = PyArg_ParseTuple(args, "Os", &py_ppdf, &smbpat); + if (!ok) return 0; + PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); + if (!ppdf->curphase) + { + PyErr_SetString(pypdffit2_unassignedError, "phase does not exist"); + return 0; + } + // Here curphase exists. reset_scat may throw + // runtime or ValueError for invalid arguments + try { + ppdf->curphase->reset_scat(smbpat); + } + catch (ValueError e) { + PyErr_SetString(PyExc_ValueError, e.GetMsg().c_str()); + return 0; + } + Py_INCREF(Py_None); + return Py_None; +} + +//throw-away variable that helps with exception handling +//RefVar *_junkRV = new RefVar(); +// utility function (not available from Python) +RefVar *getRefVar(vector &v, unsigned int i) +{ + if (v.size() == 0) + { + throw unassignedError("Variable not yet assigned"); + } + else if (i > v.size() || i < 1) + { + stringstream errstr; + errstr << "Index " << i << " out of bounds"; + throw ValueError(errstr.str()); + } + return &v[i-1]; +} + +//current phase and set refinable variable pointers + +// lat +char pypdffit2_lat__doc__[] = "Pointer to refinable variable lat."; +char pypdffit2_lat__name__[] = "lat"; + +PyObject * pypdffit2_lat(PyObject *, PyObject *args) +{ + int i; + PyObject *py_ppdf = 0; + int ok = PyArg_ParseTuple(args, "Oi", &py_ppdf, &i); + if (!ok) return 0; + PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); + try { + RefVar *v = getRefVar(ppdf->lat,i); + PyObject *py_v = PyCapsule_New(v, cnvar, NULL); + return py_v; + } + catch(unassignedError e) { + PyErr_SetString(pypdffit2_unassignedError, e.GetMsg().c_str()); + return 0; + } + catch(ValueError e) { + PyErr_SetString(PyExc_ValueError, e.GetMsg().c_str()); + return 0; + } +} + +// x +char pypdffit2_x__doc__[] = "Pointer to refinable variable x."; +char pypdffit2_x__name__[] = "x"; + +PyObject * pypdffit2_x(PyObject *, PyObject *args) +{ + int i; + PyObject *py_ppdf = 0; + int ok = PyArg_ParseTuple(args, "Oi", &py_ppdf, &i); + if (!ok) return 0; + PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); + try { + RefVar *v = getRefVar(ppdf->x,i); + PyObject *py_v = PyCapsule_New(v, cnvar, NULL); + return py_v; + } + catch(unassignedError e) { + PyErr_SetString(pypdffit2_unassignedError, e.GetMsg().c_str()); + return 0; + } + catch(ValueError e) { + PyErr_SetString(PyExc_ValueError, e.GetMsg().c_str()); + return 0; + } +} + +// y +char pypdffit2_y__doc__[] = "Pointer to refinable variable y."; +char pypdffit2_y__name__[] = "y"; + +PyObject * pypdffit2_y(PyObject *, PyObject *args) +{ + int i; + PyObject *py_ppdf = 0; + int ok = PyArg_ParseTuple(args, "Oi", &py_ppdf, &i); + if (!ok) return 0; + PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); + try { + RefVar *v = getRefVar(ppdf->y,i); + PyObject *py_v = PyCapsule_New(v, cnvar, NULL); + return py_v; + } + catch(unassignedError e) { + PyErr_SetString(pypdffit2_unassignedError, e.GetMsg().c_str()); + return 0; + } + catch(ValueError e) { + PyErr_SetString(PyExc_ValueError, e.GetMsg().c_str()); + return 0; + } +} + +// z +char pypdffit2_z__doc__[] = "Pointer to refinable variable z."; +char pypdffit2_z__name__[] = "z"; + +PyObject * pypdffit2_z(PyObject *, PyObject *args) +{ + int i; + PyObject *py_ppdf = 0; + int ok = PyArg_ParseTuple(args, "Oi", &py_ppdf, &i); + if (!ok) return 0; + PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); + try { + RefVar *v = getRefVar(ppdf->z,i); + PyObject *py_v = PyCapsule_New(v, cnvar, NULL); + return py_v; + } + catch(unassignedError e) { + PyErr_SetString(pypdffit2_unassignedError, e.GetMsg().c_str()); + return 0; + } + catch(ValueError e) { + PyErr_SetString(PyExc_ValueError, e.GetMsg().c_str()); + return 0; + } +} + +// u11 +char pypdffit2_u11__doc__[] = "Pointer to refinable variable u11."; +char pypdffit2_u11__name__[] = "u11"; + +PyObject * pypdffit2_u11(PyObject *, PyObject *args) +{ + int i; + PyObject *py_ppdf = 0; + int ok = PyArg_ParseTuple(args, "Oi", &py_ppdf, &i); + if (!ok) return 0; + PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); + try { + RefVar *v = getRefVar(ppdf->u11,i); + PyObject *py_v = PyCapsule_New(v, cnvar, NULL); + return py_v; + } + catch(unassignedError e) { + PyErr_SetString(pypdffit2_unassignedError, e.GetMsg().c_str()); + return 0; + } + catch(ValueError e) { + PyErr_SetString(PyExc_ValueError, e.GetMsg().c_str()); + return 0; + } +} + +// u22 +char pypdffit2_u22__doc__[] = "Pointer to refinable variable u22."; +char pypdffit2_u22__name__[] = "u22"; + +PyObject * pypdffit2_u22(PyObject *, PyObject *args) +{ + int i; + PyObject *py_ppdf = 0; + int ok = PyArg_ParseTuple(args, "Oi", &py_ppdf, &i); + if (!ok) return 0; + PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); + try { + RefVar *v = getRefVar(ppdf->u22,i); + PyObject *py_v = PyCapsule_New(v, cnvar, NULL); + return py_v; + } + catch(unassignedError e) { + PyErr_SetString(pypdffit2_unassignedError, e.GetMsg().c_str()); + return 0; + } + catch(ValueError e) { + PyErr_SetString(PyExc_ValueError, e.GetMsg().c_str()); + return 0; + } +} + +// u33 +char pypdffit2_u33__doc__[] = "Pointer to refinable variable u33."; +char pypdffit2_u33__name__[] = "u33"; + +PyObject * pypdffit2_u33(PyObject *, PyObject *args) +{ + int i; + PyObject *py_ppdf = 0; + int ok = PyArg_ParseTuple(args, "Oi", &py_ppdf, &i); + if (!ok) return 0; + PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); + try { + RefVar *v = getRefVar(ppdf->u33,i); + PyObject *py_v = PyCapsule_New(v, cnvar, NULL); + return py_v; + } + catch(unassignedError e) { + PyErr_SetString(pypdffit2_unassignedError, e.GetMsg().c_str()); + return 0; + } + catch(ValueError e) { + PyErr_SetString(PyExc_ValueError, e.GetMsg().c_str()); + return 0; + } +} + +// u12 +char pypdffit2_u12__doc__[] = "Pointer to refinable variable u12."; +char pypdffit2_u12__name__[] = "u12"; + +PyObject * pypdffit2_u12(PyObject *, PyObject *args) +{ + int i; + PyObject *py_ppdf = 0; + int ok = PyArg_ParseTuple(args, "Oi", &py_ppdf, &i); + if (!ok) return 0; + PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); + try { + RefVar *v = getRefVar(ppdf->u12,i); + PyObject *py_v = PyCapsule_New(v, cnvar, NULL); + return py_v; + } + catch(unassignedError e) { + PyErr_SetString(pypdffit2_unassignedError, e.GetMsg().c_str()); + return 0; + } + catch(ValueError e) { + PyErr_SetString(PyExc_ValueError, e.GetMsg().c_str()); + return 0; + } +} + +// u13 +char pypdffit2_u13__doc__[] = "Pointer to refinable variable u13."; +char pypdffit2_u13__name__[] = "u13"; + +PyObject * pypdffit2_u13(PyObject *, PyObject *args) +{ + int i; + PyObject *py_ppdf = 0; + int ok = PyArg_ParseTuple(args, "Oi", &py_ppdf, &i); + if (!ok) return 0; + PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); + try { + RefVar *v = getRefVar(ppdf->u13,i); + PyObject *py_v = PyCapsule_New(v, cnvar, NULL); + return py_v; + } + catch(unassignedError e) { + PyErr_SetString(pypdffit2_unassignedError, e.GetMsg().c_str()); + return 0; + } + catch(ValueError e) { + PyErr_SetString(PyExc_ValueError, e.GetMsg().c_str()); + return 0; + } +} + +// u23 +char pypdffit2_u23__doc__[] = "Pointer to refinable variable u23."; +char pypdffit2_u23__name__[] = "u23"; + +PyObject * pypdffit2_u23(PyObject *, PyObject *args) +{ + int i; + PyObject *py_ppdf = 0; + int ok = PyArg_ParseTuple(args, "Oi", &py_ppdf, &i); + if (!ok) return 0; + PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); + try { + RefVar *v = getRefVar(ppdf->u23,i); + PyObject *py_v = PyCapsule_New(v, cnvar, NULL); + return py_v; + } + catch(unassignedError e) { + PyErr_SetString(pypdffit2_unassignedError, e.GetMsg().c_str()); + return 0; + } + catch(ValueError e) { + PyErr_SetString(PyExc_ValueError, e.GetMsg().c_str()); + return 0; + } +} + +// occ +char pypdffit2_occ__doc__[] = "Pointer to refinable variable occ."; +char pypdffit2_occ__name__[] = "occ"; + +PyObject * pypdffit2_occ(PyObject *, PyObject *args) +{ + int i; + PyObject *py_ppdf = 0; + int ok = PyArg_ParseTuple(args, "Oi", &py_ppdf, &i); + if (!ok) return 0; + PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); + try { + RefVar *v = getRefVar(ppdf->occ,i); + PyObject *py_v = PyCapsule_New(v, cnvar, NULL); + return py_v; + } + catch(unassignedError e) { + PyErr_SetString(pypdffit2_unassignedError, e.GetMsg().c_str()); + return 0; + } + catch(ValueError e) { + PyErr_SetString(PyExc_ValueError, e.GetMsg().c_str()); + return 0; + } +} + +// pscale +char pypdffit2_pscale__doc__[] = "Pointer to variable pscale."; +char pypdffit2_pscale__name__[] = "pscale"; + +PyObject * pypdffit2_pscale(PyObject *, PyObject *args) +{ + PyObject *py_ppdf = 0; + int ok = PyArg_ParseTuple(args, "O", &py_ppdf); + if (!ok) return 0; + PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); + PyObject *py_v = PyCapsule_New(&(ppdf->pscale), cnvar, NULL); + return py_v; +} + +// spdiameter +char pypdffit2_spdiameter__doc__[] = "Pointer to variable spdiameter."; +char pypdffit2_spdiameter__name__[] = "spdiameter"; + +PyObject * pypdffit2_spdiameter(PyObject *, PyObject *args) +{ + PyObject *py_ppdf = 0; + int ok = PyArg_ParseTuple(args, "O", &py_ppdf); + if (!ok) return 0; + PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); + PyObject *py_v = PyCapsule_New(&(ppdf->spdiameter), cnvar, NULL); + return py_v; +} + +// stepcut +char pypdffit2_stepcut__doc__[] = "Pointer to nonvariable stepcut."; +char pypdffit2_stepcut__name__[] = "stepcut"; + +PyObject * pypdffit2_stepcut(PyObject *, PyObject *args) +{ + PyObject *py_ppdf = 0; + int ok = PyArg_ParseTuple(args, "O", &py_ppdf); + if (!ok) return 0; + PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); + PyObject *py_v = PyCapsule_New(&(ppdf->stepcut), cnvar, NULL); + return py_v; +} + +// sratio +char pypdffit2_sratio__doc__[] = "Pointer to variable sratio."; +char pypdffit2_sratio__name__[] = "sratio"; + +PyObject * pypdffit2_sratio(PyObject *, PyObject *args) +{ + PyObject *py_ppdf = 0; + int ok = PyArg_ParseTuple(args, "O", &py_ppdf); + if (!ok) return 0; + PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); + PyObject *py_v = PyCapsule_New(&(ppdf->sratio), cnvar, NULL); + return py_v; +} + +// delta2 +char pypdffit2_delta2__doc__[] = "Pointer to variable delta2."; +char pypdffit2_delta2__name__[] = "delta2"; + +PyObject * pypdffit2_delta2(PyObject *, PyObject *args) +{ + PyObject *py_ppdf = 0; + int ok = PyArg_ParseTuple(args, "O", &py_ppdf); + if (!ok) return 0; + PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); + PyObject *py_v = PyCapsule_New(&(ppdf->delta2), cnvar, NULL); + return py_v; +} + +// delta1 +char pypdffit2_delta1__doc__[] = "Pointer to variable delta1."; +char pypdffit2_delta1__name__[] = "delta1"; + +PyObject * pypdffit2_delta1(PyObject *, PyObject *args) +{ + PyObject *py_ppdf = 0; + int ok = PyArg_ParseTuple(args, "O", &py_ppdf); + if (!ok) return 0; + PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); + PyObject *py_v = PyCapsule_New(&(ppdf->delta1), cnvar, NULL); + return py_v; +} + +// dscale +char pypdffit2_dscale__doc__[] = "Pointer to variable dscale."; +char pypdffit2_dscale__name__[] = "dscale"; + +PyObject * pypdffit2_dscale(PyObject *, PyObject *args) +{ + PyObject *py_ppdf = 0; + int ok = PyArg_ParseTuple(args, "O", &py_ppdf); + if (!ok) return 0; + PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); + PyObject *py_v = PyCapsule_New(&(ppdf->dscale), cnvar, NULL); + return py_v; +} + +// qdamp +char pypdffit2_qdamp__doc__[] = "Pointer to variable qdamp."; +char pypdffit2_qdamp__name__[] = "qdamp"; + +PyObject * pypdffit2_qdamp(PyObject *, PyObject *args) +{ + PyObject *py_ppdf = 0; + int ok = PyArg_ParseTuple(args, "O", &py_ppdf); + if (!ok) return 0; + PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); + PyObject *py_v = PyCapsule_New(&(ppdf->qdamp), cnvar, NULL); + return py_v; +} + +// qbroad +char pypdffit2_qbroad__doc__[] = "Pointer to variable qbroad."; +char pypdffit2_qbroad__name__[] = "qbroad"; + +PyObject * pypdffit2_qbroad(PyObject *, PyObject *args) +{ + PyObject *py_ppdf = 0; + int ok = PyArg_ParseTuple(args, "O", &py_ppdf); + if (!ok) return 0; + PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); + PyObject *py_v = PyCapsule_New(&(ppdf->qbroad), cnvar, NULL); + return py_v; +} + +// rcut +char pypdffit2_rcut__doc__[] = "Pointer to nonvariable rcut."; +char pypdffit2_rcut__name__[] = "rcut"; + +PyObject * pypdffit2_rcut(PyObject *, PyObject *args) +{ + PyObject *py_ppdf = 0; + int ok = PyArg_ParseTuple(args, "O", &py_ppdf); + if (!ok) return 0; + PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); + PyObject *py_v = PyCapsule_New(&(ppdf->rcut), cnvar, NULL); + return py_v; +} + +// get_atoms +char pypdffit2_get_atoms__doc__[] = "Get element symbols of atoms in the phase."; +char pypdffit2_get_atoms__name__[] = "get_atoms"; + +PyObject * pypdffit2_get_atoms(PyObject *, PyObject *args) +{ + PyObject *py_ppdf = 0; + int ip = 0; + int ok = PyArg_ParseTuple(args, "O|i", &py_ppdf, &ip); + if (!ok) return 0; + PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); + Phase* ph; + try { + ph = ppdf->getphase(ip); + } + catch (unassignedError e) { + PyErr_SetString(pypdffit2_unassignedError, e.GetMsg().c_str()); + return 0; + } + // Phase ph is defined here + PyObject *py_atoms = PyList_New(ph->natoms); + for (int i = 0; i < ph->natoms; ++i) + { + string usymbol = toupper(ph->atom[i].atom_type->symbol); + PyList_SetItem(py_atoms, i, PyUnicode_FromString(usymbol.c_str())); + } + return py_atoms; +} + +// num_atoms +char pypdffit2_num_atoms__doc__[] = "Get the number of atoms in the current phase."; +char pypdffit2_num_atoms__name__[] = "num_atoms"; + +PyObject * pypdffit2_num_atoms(PyObject *, PyObject *args) +{ + int retval = 0; + PyObject *py_ppdf = 0; + int ok = PyArg_ParseTuple(args, "O", &py_ppdf); + if (!ok) return 0; + PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); + if (ppdf->curphase) + { + retval = (ppdf->curphase)->natoms; + } + else + { + PyErr_SetString(pypdffit2_unassignedError, "No data loaded"); + return 0; + } + return Py_BuildValue("i", retval); +} + +// get_atom_types +char pypdffit2_get_atom_types__doc__[] = "Get ordered unique symbols of atoms in the phase."; +char pypdffit2_get_atom_types__name__[] = "get_atom_types"; + +PyObject * pypdffit2_get_atom_types(PyObject *, PyObject *args) +{ + PyObject *py_ppdf = 0; + int ip = 0; + int ok = PyArg_ParseTuple(args, "O|i", &py_ppdf, &ip); + if (!ok) return 0; + PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); + Phase* ph; + try { + ph = ppdf->getphase(ip); + } + catch (unassignedError e) { + PyErr_SetString(pypdffit2_unassignedError, e.GetMsg().c_str()); + return 0; + } + // Phase ph is defined here + PyObject *py_atom_types = PyList_New(ph->atom_types.size()); + for (int i = 0; i < int(ph->atom_types.size()); ++i) + { + string usymbol = toupper(ph->atom_types[i]->symbol); + PyList_SetItem(py_atom_types, i, PyUnicode_FromString(usymbol.c_str())); + } + return py_atom_types; +} + + +// num_phases +char pypdffit2_num_phases__doc__[] = "Get the number of loaded phases."; +char pypdffit2_num_phases__name__[] = "num_phases"; + +PyObject * pypdffit2_num_phases(PyObject *, PyObject *args) +{ + int retval = 0; + PyObject *py_ppdf = 0; + int ok = PyArg_ParseTuple(args, "O", &py_ppdf); + if (!ok) return 0; + PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); + retval = ppdf->num_phases(); + return Py_BuildValue("i", retval); +} + + +// num_datasets +char pypdffit2_num_datasets__doc__[] = "Get the number of loaded datasets."; +char pypdffit2_num_datasets__name__[] = "num_datasets"; + +PyObject * pypdffit2_num_datasets(PyObject *, PyObject *args) +{ + int retval = 0; + PyObject *py_ppdf = 0; + int ok = PyArg_ParseTuple(args, "O", &py_ppdf); + if (!ok) return 0; + PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); + retval = ppdf->num_datasets(); + return Py_BuildValue("i", retval); +} + + +// phase_fractions +char pypdffit2_phase_fractions__doc__[] = + "Return relative phase fractions for current dataset scattering type\n" + "\n" + "Return a dictionary of relative phase fractions:\n" + "\n" + "atom -- list of fractions normalized to atom count\n" + "stdatom -- errors of atom count fractions\n" + "cell -- list of fractions normalized to unit cell count\n" + "stdcell -- errors of unit cell count fractions\n" + "mass -- list of relative weight fractions\n" + "stdmass -- errors of relative weight fractions\n" + ; +char pypdffit2_phase_fractions__name__[] = "phase_fractions"; + +PyObject * pypdffit2_phase_fractions(PyObject *, PyObject *args) +{ + PyObject *py_ppdf = 0; + int ok = PyArg_ParseTuple(args, "O", &py_ppdf); + if (!ok) return 0; + PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); + map > fractions; + try + { + fractions = ppdf->getPhaseFractions(); + } + catch(unassignedError e) + { + PyErr_SetString(pypdffit2_unassignedError, e.GetMsg().c_str()); + return 0; + } + // convert fractions map to an equivalent python dictionary + map >::iterator ii; + PyObject* py_rv; + py_rv = PyDict_New(); + for (ii = fractions.begin(); ii != fractions.end(); ++ii) + { + int n = ii->second.size(); + PyObject* py_lst; + py_lst = PyList_New(n); + for (int i = 0; i < n; ++i) + { + PyObject* py_value; + py_value = PyFloat_FromDouble(ii->second.at(i)); + PyList_SetItem(py_lst, i, py_value); + } + PyDict_SetItemString(py_rv, ii->first.c_str(), py_lst); + } + return py_rv; +} + +// redirect_stdout +char pypdffit2_redirect_stdout__doc__[] = "Redirect engine output to a file-like object."; +char pypdffit2_redirect_stdout__name__[] = "redirect_stdout"; + +PyObject * pypdffit2_redirect_stdout(PyObject *, PyObject *args) +{ + // instance of PyFileStreambuf which takes care of redirection + PyObject *py_file = 0; + int ok = PyArg_ParseTuple(args, "O", &py_file); + if (!ok) return 0; + // check if py_file has write and flush attributes + if ( !PyObject_HasAttrString(py_file, "write") || + !PyObject_HasAttrString(py_file, "flush") ) + { + PyErr_SetString(PyExc_TypeError, "expected file-like argument"); + return 0; + } + // create py_stdout_streambuf if necessary + if (!py_stdout_streambuf) + { + py_stdout_streambuf = new PyFileStreambuf(py_file); + } + py_stdout_streambuf->redirect(py_file); + // on first redirection we need to assign new ostream to NS_PDFFIT2::pout + if (NS_PDFFIT2::pout == &std::cout) + { + NS_PDFFIT2::pout = new ostream(py_stdout_streambuf); + } + Py_INCREF(Py_None); + return Py_None; +} + +// is_element +char pypdffit2_is_element__doc__[] = "Check if element or isotope is defined in the built-in periodic table."; +char pypdffit2_is_element__name__[] = "is_element"; + +PyObject * pypdffit2_is_element(PyObject *, PyObject *args) +{ + // instance of PyFileStreambuf which takes care of redirection + char *smbpat; + int ok = PyArg_ParseTuple(args, "s", &smbpat); + if (!ok) return 0; + const LocalPeriodicTable* lpt = LocalPeriodicTable::instance(); + PyObject *rv = PyBool_FromLong(lpt->has(smbpat)); + return rv; +} + +// End of file diff --git a/src/extensions/pdffit2module/misc.h b/src/extensions/pdffit2module/misc.h new file mode 100644 index 00000000..f8782307 --- /dev/null +++ b/src/extensions/pdffit2module/misc.h @@ -0,0 +1,486 @@ +/*********************************************************************** +* +* pdffit2 by DANSE Diffraction group +* Simon J. L. Billinge +* (c) 2006 trustees of the Michigan State University +* All rights reserved. +* +* File coded by: Chris Farrow +* +* See AUTHORS.txt for a list of people who contributed. +* See LICENSE.txt for license information. +* +************************************************************************ +* +* Bindings from python to c++ PdfFit class. +* +* Comments: +* +***********************************************************************/ + +#ifndef PYPDFFIT2_MISC_H +#define PYPDFFIT2_MISC_H + +// copyright +extern char pypdffit2_copyright__name__[]; +extern char pypdffit2_copyright__doc__[]; +extern "C" +PyObject * pypdffit2_copyright(PyObject *, PyObject *); + +// create +extern char pypdffit2_create__name__[]; +extern char pypdffit2_create__doc__[]; +extern "C" +PyObject * pypdffit2_create(PyObject *, PyObject *); + +// read_struct +extern char pypdffit2_read_struct__name__[]; +extern char pypdffit2_read_struct__doc__[]; +extern "C" +PyObject * pypdffit2_read_struct(PyObject *, PyObject *); + +// read_struct_string +extern char pypdffit2_read_struct_string__name__[]; +extern char pypdffit2_read_struct_string__doc__[]; +extern "C" +PyObject * pypdffit2_read_struct_string(PyObject *, PyObject *); + +// read_data +extern char pypdffit2_read_data__name__[]; +extern char pypdffit2_read_data__doc__[]; +extern "C" +PyObject * pypdffit2_read_data(PyObject *, PyObject *); + +// read_data_string +extern char pypdffit2_read_data_string__name__[]; +extern char pypdffit2_read_data_string__doc__[]; +extern "C" +PyObject * pypdffit2_read_data_string(PyObject *, PyObject *); + +// read_data_arrays +extern char pypdffit2_read_data_arrays__name__[]; +extern char pypdffit2_read_data_arrays__doc__[]; +extern "C" +PyObject * pypdffit2_read_data_arrays(PyObject *, PyObject *); + +// pdfrange +extern char pypdffit2_pdfrange__doc__[]; +extern char pypdffit2_pdfrange__name__[]; +extern "C" +PyObject * pypdffit2_pdfrange(PyObject *, PyObject *); + +// reset +extern char pypdffit2_reset__doc__[]; +extern char pypdffit2_reset__name__[]; +extern "C" +PyObject * pypdffit2_reset(PyObject *, PyObject *); + +// alloc +extern char pypdffit2_alloc__doc__[]; +extern char pypdffit2_alloc__name__[]; +extern "C" +PyObject * pypdffit2_alloc(PyObject *, PyObject *); + +// calc +extern char pypdffit2_calc__doc__[]; +extern char pypdffit2_calc__name__[]; +extern "C" +PyObject * pypdffit2_calc(PyObject *, PyObject *); + +// refine +extern char pypdffit2_refine__doc__[]; +extern char pypdffit2_refine__name__[]; +extern "C" +PyObject * pypdffit2_refine(PyObject *, PyObject *); + +// refine_step +extern char pypdffit2_refine_step__doc__[]; +extern char pypdffit2_refine_step__name__[]; +extern "C" +PyObject * pypdffit2_refine_step(PyObject *, PyObject *); + +// save_pdf +extern char pypdffit2_save_pdf__doc__[]; +extern char pypdffit2_save_pdf__name__[]; +extern "C" +PyObject * pypdffit2_save_pdf(PyObject *, PyObject *); + +// save_dif +extern char pypdffit2_save_dif__doc__[]; +extern char pypdffit2_save_dif__name__[]; +extern "C" +PyObject * pypdffit2_save_dif(PyObject *, PyObject *); + +// save_res +extern char pypdffit2_save_res__doc__[]; +extern char pypdffit2_save_res__name__[]; +extern "C" +PyObject * pypdffit2_save_res(PyObject *, PyObject *); + +// save_struct +extern char pypdffit2_save_struct__doc__[]; +extern char pypdffit2_save_struct__name__[]; +extern "C" +PyObject * pypdffit2_save_struct(PyObject *, PyObject *); + +// show_struct +extern char pypdffit2_show_struct__doc__[]; +extern char pypdffit2_show_struct__name__[]; +extern "C" +PyObject * pypdffit2_show_struct(PyObject *, PyObject *); + +// constrain to string +extern char pypdffit2_constrain_str__doc__[]; +extern char pypdffit2_constrain_str__name__[]; +extern "C" +PyObject * pypdffit2_constrain_str(PyObject *, PyObject *); + +// constrain_int to integer +extern char pypdffit2_constrain_int__doc__[]; +extern char pypdffit2_constrain_int__name__[]; +extern "C" +PyObject * pypdffit2_constrain_int(PyObject *, PyObject *); + +// setpar_dbl +extern char pypdffit2_setpar_dbl__doc__[]; +extern char pypdffit2_setpar_dbl__name__[]; +extern "C" +PyObject * pypdffit2_setpar_dbl(PyObject *, PyObject *); + +// setpar with RefVar +extern char pypdffit2_setpar_RV__doc__[]; +extern char pypdffit2_setpar_RV__name__[]; +extern "C" +PyObject * pypdffit2_setpar_RV(PyObject *, PyObject *); + +// setvar +extern char pypdffit2_setvar__doc__[]; +extern char pypdffit2_setvar__name__[]; +extern "C" +PyObject * pypdffit2_setvar(PyObject *, PyObject *); + +// getvar +extern char pypdffit2_getvar__doc__[]; +extern char pypdffit2_getvar__name__[]; +extern "C" +PyObject * pypdffit2_getvar(PyObject *, PyObject *); + +// getR +extern char pypdffit2_getR__doc__[]; +extern char pypdffit2_getR__name__[]; +extern "C" +PyObject * pypdffit2_getR(PyObject *, PyObject *); + +// getpdf_fit +extern char pypdffit2_getpdf_fit__doc__[]; +extern char pypdffit2_getpdf_fit__name__[]; +extern "C" +PyObject * pypdffit2_getpdf_fit(PyObject *, PyObject *); + +// getpdf_obs +extern char pypdffit2_getpdf_obs__doc__[]; +extern char pypdffit2_getpdf_obs__name__[]; +extern "C" +PyObject * pypdffit2_getpdf_obs(PyObject *, PyObject *); + +// getpdf_diff +extern char pypdffit2_getpdf_diff__doc__[]; +extern char pypdffit2_getpdf_diff__name__[]; +extern "C" +PyObject * pypdffit2_getpdf_diff(PyObject *, PyObject *); + +// getcrw +extern char pypdffit2_getcrw__doc__[]; +extern char pypdffit2_getcrw__name__[]; +extern "C" +PyObject * pypdffit2_getcrw(PyObject *, PyObject *); + +// getrw +extern char pypdffit2_getrw__doc__[]; +extern char pypdffit2_getrw__name__[]; +extern "C" +PyObject * pypdffit2_getrw(PyObject *, PyObject *); + +// getpar +extern char pypdffit2_getpar__doc__[]; +extern char pypdffit2_getpar__name__[]; +extern "C" +PyObject * pypdffit2_getpar(PyObject *, PyObject *); + +// fixpar +extern char pypdffit2_fixpar__doc__[]; +extern char pypdffit2_fixpar__name__[]; +extern "C" +PyObject * pypdffit2_fixpar(PyObject *, PyObject *); + +// freepar +extern char pypdffit2_freepar__doc__[]; +extern char pypdffit2_freepar__name__[]; +extern "C" +PyObject * pypdffit2_freepar(PyObject *, PyObject *); + +// setphase +extern char pypdffit2_setphase__doc__[]; +extern char pypdffit2_setphase__name__[]; +extern "C" +PyObject * pypdffit2_setphase(PyObject *, PyObject *); + +// setdata +extern char pypdffit2_setdata__doc__[]; +extern char pypdffit2_setdata__name__[]; +extern "C" +PyObject * pypdffit2_setdata(PyObject *, PyObject *); + +// psel +extern char pypdffit2_psel__doc__[]; +extern char pypdffit2_psel__name__[]; +extern "C" +PyObject * pypdffit2_psel(PyObject *, PyObject *); + +// pdesel +extern char pypdffit2_pdesel__doc__[]; +extern char pypdffit2_pdesel__name__[]; +extern "C" +PyObject * pypdffit2_pdesel(PyObject *, PyObject *); + +// selectAtomType +extern char pypdffit2_selectAtomType__doc__[]; +extern char pypdffit2_selectAtomType__name__[]; +extern "C" +PyObject * pypdffit2_selectAtomType(PyObject *, PyObject *); + +// selectAtomIndex +extern char pypdffit2_selectAtomIndex__doc__[]; +extern char pypdffit2_selectAtomIndex__name__[]; +extern "C" +PyObject * pypdffit2_selectAtomIndex(PyObject *, PyObject *); + +// selectAll +extern char pypdffit2_selectAll__doc__[]; +extern char pypdffit2_selectAll__name__[]; +extern "C" +PyObject * pypdffit2_selectAll(PyObject *, PyObject *); + +// selectNone +extern char pypdffit2_selectNone__doc__[]; +extern char pypdffit2_selectNone__name__[]; +extern "C" +PyObject * pypdffit2_selectNone(PyObject *, PyObject *); + +// bond_angle +extern char pypdffit2_bond_angle__doc__[]; +extern char pypdffit2_bond_angle__name__[]; +extern "C" +PyObject * pypdffit2_bond_angle(PyObject *, PyObject *); + +// bond_length_atoms +extern char pypdffit2_bond_length_atoms__doc__[]; +extern char pypdffit2_bond_length_atoms__name__[]; +extern "C" +PyObject * pypdffit2_bond_length_atoms(PyObject *, PyObject *); + +// bond_length_types +extern char pypdffit2_bond_length_types__doc__[]; +extern char pypdffit2_bond_length_types__name__[]; +extern "C" +PyObject * pypdffit2_bond_length_types(PyObject *, PyObject *); + +// get_scat_string +extern char pypdffit2_get_scat_string__doc__[]; +extern char pypdffit2_get_scat_string__name__[]; +extern "C" +PyObject * pypdffit2_get_scat_string(PyObject *, PyObject *); + +// get_scat +extern char pypdffit2_get_scat__doc__[]; +extern char pypdffit2_get_scat__name__[]; +extern "C" +PyObject * pypdffit2_get_scat(PyObject *, PyObject *); + +// set_scat +extern char pypdffit2_set_scat__doc__[]; +extern char pypdffit2_set_scat__name__[]; +extern "C" +PyObject * pypdffit2_set_scat(PyObject *, PyObject *); + +// reset_scat +extern char pypdffit2_reset_scat__doc__[]; +extern char pypdffit2_reset_scat__name__[]; +extern "C" +PyObject * pypdffit2_reset_scat(PyObject *, PyObject *); + +// lat +extern char pypdffit2_lat__doc__[]; +extern char pypdffit2_lat__name__[]; +extern "C" +PyObject * pypdffit2_lat(PyObject *, PyObject *); + +// x +extern char pypdffit2_x__doc__[]; +extern char pypdffit2_x__name__[]; +extern "C" +PyObject * pypdffit2_x(PyObject *, PyObject *); + +// y +extern char pypdffit2_y__doc__[]; +extern char pypdffit2_y__name__[]; +extern "C" +PyObject * pypdffit2_y(PyObject *, PyObject *); + +// z +extern char pypdffit2_z__doc__[]; +extern char pypdffit2_z__name__[]; +extern "C" +PyObject * pypdffit2_z(PyObject *, PyObject *); + +// u11 +extern char pypdffit2_u11__doc__[]; +extern char pypdffit2_u11__name__[]; +extern "C" +PyObject * pypdffit2_u11(PyObject *, PyObject *); + +// u22 +extern char pypdffit2_u22__doc__[]; +extern char pypdffit2_u22__name__[]; +extern "C" +PyObject * pypdffit2_u22(PyObject *, PyObject *); + +// u33 +extern char pypdffit2_u33__doc__[]; +extern char pypdffit2_u33__name__[]; +extern "C" +PyObject * pypdffit2_u33(PyObject *, PyObject *); + +// u12 +extern char pypdffit2_u12__doc__[]; +extern char pypdffit2_u12__name__[]; +extern "C" +PyObject * pypdffit2_u12(PyObject *, PyObject *); + +// u13 +extern char pypdffit2_u13__doc__[]; +extern char pypdffit2_u13__name__[]; +extern "C" +PyObject * pypdffit2_u13(PyObject *, PyObject *); + +// u23 +extern char pypdffit2_u23__doc__[]; +extern char pypdffit2_u23__name__[]; +extern "C" +PyObject * pypdffit2_u23(PyObject *, PyObject *); + +// occ +extern char pypdffit2_occ__doc__[]; +extern char pypdffit2_occ__name__[]; +extern "C" +PyObject * pypdffit2_occ(PyObject *, PyObject *); + +// pscale +extern char pypdffit2_pscale__doc__[]; +extern char pypdffit2_pscale__name__[]; +extern "C" +PyObject * pypdffit2_pscale(PyObject *, PyObject *); + +// spdiameter +extern char pypdffit2_spdiameter__doc__[]; +extern char pypdffit2_spdiameter__name__[]; +extern "C" +PyObject * pypdffit2_spdiameter(PyObject *, PyObject *); + +// stepcut +extern char pypdffit2_stepcut__doc__[]; +extern char pypdffit2_stepcut__name__[]; +extern "C" +PyObject * pypdffit2_stepcut(PyObject *, PyObject *); + +// sratio +extern char pypdffit2_sratio__doc__[]; +extern char pypdffit2_sratio__name__[]; +extern "C" +PyObject * pypdffit2_sratio(PyObject *, PyObject *); + +// delta2 +extern char pypdffit2_delta2__doc__[]; +extern char pypdffit2_delta2__name__[]; +extern "C" +PyObject * pypdffit2_delta2(PyObject *, PyObject *); + +// delta1 +extern char pypdffit2_delta1__doc__[]; +extern char pypdffit2_delta1__name__[]; +extern "C" +PyObject * pypdffit2_delta1(PyObject *, PyObject *); + +// dscale +extern char pypdffit2_dscale__doc__[]; +extern char pypdffit2_dscale__name__[]; +extern "C" +PyObject * pypdffit2_dscale(PyObject *, PyObject *); + +// qdamp +extern char pypdffit2_qdamp__doc__[]; +extern char pypdffit2_qdamp__name__[]; +extern "C" +PyObject * pypdffit2_qdamp(PyObject *, PyObject *); + +// qbroad +extern char pypdffit2_qbroad__doc__[]; +extern char pypdffit2_qbroad__name__[]; +extern "C" +PyObject * pypdffit2_qbroad(PyObject *, PyObject *); + +// rcut +extern char pypdffit2_rcut__doc__[]; +extern char pypdffit2_rcut__name__[]; +extern "C" +PyObject * pypdffit2_rcut(PyObject *, PyObject *); + +// get_atoms +extern char pypdffit2_get_atoms__doc__[]; +extern char pypdffit2_get_atoms__name__[]; +extern "C" +PyObject * pypdffit2_get_atoms(PyObject *, PyObject *); + +// num_atoms +extern char pypdffit2_num_atoms__doc__[]; +extern char pypdffit2_num_atoms__name__[]; +extern "C" +PyObject * pypdffit2_num_atoms(PyObject *, PyObject *); + +// get_atom_types +extern char pypdffit2_get_atom_types__doc__[]; +extern char pypdffit2_get_atom_types__name__[]; +extern "C" +PyObject * pypdffit2_get_atom_types(PyObject *, PyObject *); + +// num_phases +extern char pypdffit2_num_phases__doc__[]; +extern char pypdffit2_num_phases__name__[]; +extern "C" +PyObject * pypdffit2_num_phases(PyObject *, PyObject *); + +// num_datasets +extern char pypdffit2_num_datasets__doc__[]; +extern char pypdffit2_num_datasets__name__[]; +extern "C" +PyObject * pypdffit2_num_datasets(PyObject *, PyObject *); + +// phase_fractions +extern char pypdffit2_phase_fractions__doc__[]; +extern char pypdffit2_phase_fractions__name__[]; +extern "C" +PyObject * pypdffit2_phase_fractions(PyObject *, PyObject *); + +// redirect_stdout +extern char pypdffit2_redirect_stdout__doc__[]; +extern char pypdffit2_redirect_stdout__name__[]; +extern "C" +PyObject * pypdffit2_redirect_stdout(PyObject *, PyObject *); + +// is_element +extern char pypdffit2_is_element__doc__[]; +extern char pypdffit2_is_element__name__[]; +extern "C" +PyObject * pypdffit2_is_element(PyObject *, PyObject *); + +#endif // PYPDFFIT2_MISC_H diff --git a/src/extensions/pdffit2module/pdffit2module.cc b/src/extensions/pdffit2module/pdffit2module.cc new file mode 100644 index 00000000..acf89fa3 --- /dev/null +++ b/src/extensions/pdffit2module/pdffit2module.cc @@ -0,0 +1,150 @@ +/*********************************************************************** +* +* pdffit2 by DANSE Diffraction group +* Simon J. L. Billinge +* (c) 2006 trustees of the Michigan State University +* All rights reserved. +* +* File coded by: Chris Farrow +* +* See AUTHORS.txt for a list of people who contributed. +* See LICENSE.txt for license information. +* +************************************************************************ +* +* The python pdffit2 module. +* +* Comments: +* +***********************************************************************/ +#define PY_SSIZE_T_CLEAN +#include +#include + +#include "pyexceptions.h" +#include "bindings.h" +#include "libpdffit2/pdffit.h" + +using namespace std; + +char pypdffit2_module__doc__[] = + "pdffit2 - interface to the core calculation routines in C++"; + +// local helper for transfer version information from +// Python to C++ PdfFit class. + +namespace { + +void transfer_version() +{ + // obtain version information from the Python module + PyObject* mdiffpy_pdffit2; + mdiffpy_pdffit2 = PyImport_ImportModule("diffpy.pdffit2"); + if (!mdiffpy_pdffit2) return; + PyObject* pyversion; + pyversion = PyObject_GetAttrString(mdiffpy_pdffit2, "__version__"); + Py_DECREF(mdiffpy_pdffit2); + if (!pyversion) return; + const char* cversion; +#if PY_MAJOR_VERSION >= 3 + cversion = PyUnicode_AsUTF8(pyversion); +#else + cversion = PyString_AsString(pyversion); +#endif + // copy version information to C++ constant + if (cversion) PdfFit::version(cversion); + Py_DECREF(pyversion); +} + + +void setup_module_contents(PyObject* d) +{ + // install the module exceptions + pypdffit2_runtimeError = PyErr_NewException("pdffit2.runtime", 0, 0); + PyDict_SetItemString(d, "RuntimeException", pypdffit2_runtimeError); + + pypdffit2_unassignedError = PyErr_NewException( + "pdffit2.unassignedError", 0, 0); + PyDict_SetItemString(d, "unassignedError", pypdffit2_unassignedError); + + pypdffit2_dataError = PyErr_NewException( + "pdffit2.dataError", 0, 0); + PyDict_SetItemString(d, "dataError", pypdffit2_dataError); + + pypdffit2_structureError = PyErr_NewException( + "pdffit2.structureError", 0, 0); + PyDict_SetItemString(d, "structureError", pypdffit2_structureError); + + pypdffit2_calculationError = PyErr_NewException( + "pdffit2.calculationError", 0, 0); + PyDict_SetItemString(d, "calculationError", pypdffit2_calculationError); + + pypdffit2_constraintError = PyErr_NewException( + "pdffit2.constraintError", 0, 0); + PyDict_SetItemString(d, "constraintError", pypdffit2_constraintError); + + transfer_version(); +} + +} // namespace ------------------------------------------------------------- + +// TODO remove PY_MAJOR_VERSION blocks after ending support for Python 2.7 + +#if PY_MAJOR_VERSION == 2 + +// Initialization function for the module (*must* be called initpdffit2) +extern "C" +void +initpdffit2() +{ + // create the module and add the functions + PyObject * m = Py_InitModule4( + "pdffit2", pypdffit2_methods, + pypdffit2_module__doc__, 0, PYTHON_API_VERSION); + + // get its dictionary + PyObject * d = PyModule_GetDict(m); + + // check for errors + if (PyErr_Occurred()) { + Py_FatalError("can't initialize module pdffit2"); + } + + // install the module exceptions and version string + setup_module_contents(d); + + return; +} + +#else + +// Module initialization for Python 3 ---------------------------------------- + +static struct PyModuleDef pdffit2moduledef = { + PyModuleDef_HEAD_INIT, + // .m_name = + "pdffit2", + // .m_doc = + pypdffit2_module__doc__, + // .m_size = + -1, + // .m_methods = + pypdffit2_methods, +}; + + +PyMODINIT_FUNC +PyInit_pdffit2(void) + +{ + PyObject *module = PyModule_Create(&pdffit2moduledef); + if (module == NULL) return NULL; + + PyObject* d = PyModule_GetDict(module); + setup_module_contents(d); + return module; +} + +#endif // PY_MAJOR_VERSION == 2 + +// End of file diff --git a/src/extensions/pdffit2module/pyexceptions.cc b/src/extensions/pdffit2module/pyexceptions.cc new file mode 100644 index 00000000..e94b3d16 --- /dev/null +++ b/src/extensions/pdffit2module/pyexceptions.cc @@ -0,0 +1,30 @@ +/*********************************************************************** +* +* pdffit2 by DANSE Diffraction group +* Simon J. L. Billinge +* (c) 2006 trustees of the Michigan State University +* All rights reserved. +* +* File coded by: Chris Farrow +* +* See AUTHORS.txt for a list of people who contributed. +* See LICENSE.txt for license information. +* +************************************************************************ +* +* Exceptions for pdffit2 python module. +* +* Comments: +* +***********************************************************************/ +#define PY_SSIZE_T_CLEAN +#include + +PyObject *pypdffit2_runtimeError = 0; +PyObject *pypdffit2_unassignedError = 0; +PyObject *pypdffit2_dataError = 0; +PyObject *pypdffit2_structureError = 0; +PyObject *pypdffit2_calculationError = 0; +PyObject *pypdffit2_constraintError = 0; + +// End of file diff --git a/src/extensions/pdffit2module/pyexceptions.h b/src/extensions/pdffit2module/pyexceptions.h new file mode 100644 index 00000000..09bd942b --- /dev/null +++ b/src/extensions/pdffit2module/pyexceptions.h @@ -0,0 +1,33 @@ +/*********************************************************************** +* +* pdffit2 by DANSE Diffraction group +* Simon J. L. Billinge +* (c) 2006 trustees of the Michigan State University +* All rights reserved. +* +* File coded by: Chris Farrow +* +* See AUTHORS.txt for a list of people who contributed. +* See LICENSE.txt for license information. +* +************************************************************************ +* +* Exceptions for pdffit2 python module. +* +* Comments: +* +***********************************************************************/ + +#ifndef PYPDFFIT2_EXCEPTIONS_H +#define PYPDFFIT2_EXCEPTIONS_H + +// exceptions + +extern PyObject *pypdffit2_runtimeError; +extern PyObject *pypdffit2_unassignedError; +extern PyObject *pypdffit2_dataError; +extern PyObject *pypdffit2_structureError; +extern PyObject *pypdffit2_constraintError; +extern PyObject *pypdffit2_calculationError; + +#endif // PYPDFFIT2_EXCEPTIONS_H From 3d438cc94c5e4d863fa2a16458b08d5bcd047101 Mon Sep 17 00:00:00 2001 From: Sam Andrello Date: Mon, 22 Jul 2024 17:35:23 -0400 Subject: [PATCH 024/104] Add relevant files for building with updated requirements --- environment.yml | 6 + pyproject.toml | 50 +++++++ requirements/build.txt | 2 + requirements/docs.txt | 4 + requirements/pip.txt | 0 requirements/run.txt | 0 requirements/test.txt | 5 + setup.py | 296 ++++++++--------------------------------- 8 files changed, 123 insertions(+), 240 deletions(-) create mode 100644 environment.yml create mode 100644 requirements/build.txt create mode 100644 requirements/docs.txt create mode 100644 requirements/pip.txt create mode 100644 requirements/run.txt create mode 100644 requirements/test.txt mode change 100755 => 100644 setup.py diff --git a/environment.yml b/environment.yml new file mode 100644 index 00000000..3979d3cb --- /dev/null +++ b/environment.yml @@ -0,0 +1,6 @@ +name: diffpy.pdffit2 +channels: + - conda-forge +dependencies: + - python=3 + - pip diff --git a/pyproject.toml b/pyproject.toml index e537e24a..6945ff83 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,53 @@ +[build-system] +requires = ["setuptools>=62.0", "setuptools-git-versioning<2"] +build-backend = "setuptools.build_meta" + +[project] +name = "diffpy.pdffit2" +dynamic=['version'] +authors = [ + { name="Simon J.L. Billinge group", email="simon.billinge@gmail.com" }, +] +maintainers = [ + { name="Simon J.L. Billinge group", email="simon.billinge@gmail.com" }, +] +description = "PDFfit2 - real space structure refinement program." +keywords = ['PDF structure refinement'] +readme = "README.rst" +requires-python = ">=3.10" +classifiers = [ + 'Development Status :: 5 - Production/Stable', + 'Environment :: Console', + 'Intended Audience :: Developers', + 'Intended Audience :: Science/Research', + 'License :: OSI Approved :: BSD License', + 'Operating System :: MacOS :: MacOS X', + 'Operating System :: Microsoft :: Windows', + 'Operating System :: POSIX', + 'Operating System :: Unix', + 'Programming Language :: Python :: 3.10', + 'Programming Language :: Python :: 3.11', + 'Programming Language :: Python :: 3.12', + 'Topic :: Scientific/Engineering :: Physics', + 'Topic :: Scientific/Engineering :: Chemistry', +] + +[project.urls] +Homepage = "https://github.com/diffpy/diffpy.pdffit2/" +Issues = "https://github.com/diffpy/diffpy.pdffit2/issues/" + +[tool.setuptools-git-versioning] +enabled = true +template = "{tag}" +dev_template = "{tag}" +dirty_template = "{tag}" + +[tool.setuptools.packages.find] +where = ["src"] # list of folders that contain the packages (["."] by default) +include = ["*"] # package names should match these glob patterns (["*"] by default) +exclude = ["diffpy.pdffit2.tests*"] # exclude packages matching these glob patterns (empty by default) +namespaces = false # to disable scanning PEP 420 namespaces (true by default) + [tool.black] line-length = 115 include = '\.pyi?$' diff --git a/requirements/build.txt b/requirements/build.txt new file mode 100644 index 00000000..f72d870d --- /dev/null +++ b/requirements/build.txt @@ -0,0 +1,2 @@ +python +setuptools diff --git a/requirements/docs.txt b/requirements/docs.txt new file mode 100644 index 00000000..ab17b1c8 --- /dev/null +++ b/requirements/docs.txt @@ -0,0 +1,4 @@ +sphinx +sphinx_rtd_theme +doctr +m2r diff --git a/requirements/pip.txt b/requirements/pip.txt new file mode 100644 index 00000000..e69de29b diff --git a/requirements/run.txt b/requirements/run.txt new file mode 100644 index 00000000..e69de29b diff --git a/requirements/test.txt b/requirements/test.txt new file mode 100644 index 00000000..6f9ccf84 --- /dev/null +++ b/requirements/test.txt @@ -0,0 +1,5 @@ +flake8 +pytest +codecov +coverage +pytest-env diff --git a/setup.py b/setup.py old mode 100755 new mode 100644 index 32800328..fbedeff1 --- a/setup.py +++ b/setup.py @@ -1,257 +1,73 @@ #!/usr/bin/env python -# Installation script for diffpy.pdffit2 - -"""PDFfit2 - real space structure refinement engine - -Packages: diffpy.pdffit2 -Scripts: pdffit2 -""" +# Extensions script for diffpy.pdffit2 +import glob import os import re import sys -import warnings - -from setuptools import Extension, find_packages, setup - -# Use this version when git data are not available, like in git zip archive. -# Update when tagging a new release. -FALLBACK_VERSION = "1.4.2" - -# determine if we run with Python 3. -PY3 = sys.version_info[0] == 3 - -# versioncfgfile holds version data for git commit hash and date. -# It must reside in the same directory as version.py. -MYDIR = os.path.dirname(os.path.abspath(__file__)) -versioncfgfile = os.path.join(MYDIR, "diffpy/pdffit2/version.cfg") -gitarchivecfgfile = os.path.join(MYDIR, ".gitarchive.cfg") - - -def gitinfo(): - from subprocess import PIPE, Popen - - kw = dict(stdout=PIPE, cwd=MYDIR, universal_newlines=True) - proc = Popen(["git", "describe", "--tags", "--match=[v,V,[:digit:]]*"], **kw) - desc = proc.stdout.read() - proc = Popen(["git", "log", "-1", "--format=%H %ct %ci"], **kw) - glog = proc.stdout.read() - rv = {} - rv["commit"], rv["timestamp"], rv["date"] = glog.strip().split(None, 2) - version = ".post".join(desc.strip().split("-")[:2]).lstrip("vV") - rv["version"] = version - return rv - - -def getversioncfg(): - if PY3: - from configparser import RawConfigParser - else: - from ConfigParser import RawConfigParser - vd0 = dict(version=FALLBACK_VERSION, commit="", date="", timestamp=0) - # first fetch data from gitarchivecfgfile, ignore if it is unexpanded - g = vd0.copy() - cp0 = RawConfigParser(vd0) - cp0.read(gitarchivecfgfile) - if len(cp0.get("DEFAULT", "commit")) > 20: - g = cp0.defaults() - mx = re.search(r"\btag: [vV]?(\d[^,]*)", g.pop("refnames")) - if mx: - g["version"] = mx.group(1) - # then try to obtain version data from git. - gitdir = os.path.join(MYDIR, ".git") - if os.path.exists(gitdir) or "GIT_DIR" in os.environ: - try: - g = gitinfo() - except OSError: - pass - # finally, check and update the active version file - - cp = RawConfigParser() - cp.read(versioncfgfile) - d = cp.defaults() - rewrite = not d or (g["commit"] and (g["version"] != d.get("version") or g["commit"] != d.get("commit"))) - if rewrite: - cp.set("DEFAULT", "version", g["version"]) - cp.set("DEFAULT", "commit", g["commit"]) - cp.set("DEFAULT", "date", g["date"]) - cp.set("DEFAULT", "timestamp", g["timestamp"]) - with open(versioncfgfile, "w") as fp: - cp.write(fp) - return cp - - -versiondata = getversioncfg() - -# Helper functions ----------------------------------------------------------- +from setuptools import Extension, setup -def get_compiler_type(): - """find compiler used for building extensions.""" - cc_arg = [a for a in sys.argv if a.startswith("--compiler=")] - if cc_arg: - compiler_type = cc_arg[-1].split("=", 1)[1] - else: - from distutils.ccompiler import new_compiler +# Define extension arguments here +ext_kws = { + "libraries": [], + "extra_compile_args": [], + "extra_link_args": [], + "include_dirs": [], +} - compiler_type = new_compiler().compiler_type - return compiler_type +# Figure out the tagged name of boost_python library. +def get_boost_libraries(): + """Check for installed boost_python shared library. -def get_gsl_config(): - """Return dictionary with paths to GSL library.""" - gslcfgpaths = [os.path.join(p, "gsl-config") for p in ([MYDIR] + os.environ["PATH"].split(os.pathsep))] - gslcfgpaths = [p for p in gslcfgpaths if os.path.isfile(p)] - rv = {"include_dirs": [], "library_dirs": []} - if not gslcfgpaths: - wmsg = "Cannot find gsl-config in {!r} nor in system PATH." - warnings.warn(wmsg.format(MYDIR)) - return rv - gslcfg = gslcfgpaths[0] - with open(gslcfg) as fp: - txt = fp.read() - mprefix = re.search("(?m)^prefix=(.+)", txt) - minclude = re.search(r"(?m)^[^#]*\s-I(\S+)", txt) - mlibpath = re.search(r"(?m)^[^#]*\s-L(\S+)", txt) - if not mprefix: - emsg = "Cannot find 'prefix=' line in {}." - raise RuntimeError(emsg.format(gslcfg)) - p = mprefix.group(1) - inc = minclude.group(1) if minclude else (p + "/include") - lib = mlibpath.group(1) if mlibpath else (p + "/lib") - rv["include_dirs"] += [inc] - rv["library_dirs"] += [lib] - return rv - - -def get_gsl_config_win(): - """Return dictionary with paths to GSL library, windwows version. - This version is installed with conda. + Returns list of required boost_python shared libraries that are installed + on the system. If required libraries are not found, an Exception will be + thrown. """ - conda_prefix = os.environ["CONDA_PREFIX"] - inc = os.path.join(conda_prefix, "Library", "include") - lib = os.path.join(conda_prefix, "Library", "lib") - rv = {"include_dirs": [], "library_dirs": []} - rv["include_dirs"] += [inc] - rv["library_dirs"] += [lib] - return rv - - -# ---------------------------------------------------------------------------- - -# compile and link options -define_macros = [] -os_name = os.name -if os_name == "nt": - gcfg = get_gsl_config_win() -else: - gcfg = get_gsl_config() -include_dirs = [MYDIR] + gcfg["include_dirs"] -library_dirs = [] -libraries = [] -extra_objects = [] -extra_compile_args = [] -extra_link_args = [] - -compiler_type = get_compiler_type() -if compiler_type in ("unix", "cygwin", "mingw32"): - extra_compile_args = ["-std=c++11", "-Wall", "-Wno-write-strings", "-O3", "-funroll-loops", "-ffast-math"] - extra_objects += ((p + "/libgsl.a") for p in gcfg["library_dirs"]) -elif compiler_type == "msvc": - define_macros += [("_USE_MATH_DEFINES", None)] - extra_compile_args = ["/EHs"] - libraries += ["gsl"] - library_dirs += gcfg["library_dirs"] -# add optimization flags for other compilers if needed - - -# define extension here -pdffit2module = Extension( - "diffpy.pdffit2.pdffit2", - [ - "pdffit2module/bindings.cc", - "pdffit2module/misc.cc", - "pdffit2module/pdffit2module.cc", - "pdffit2module/pyexceptions.cc", - "libpdffit2/Atom.cc", - "libpdffit2/LocalPeriodicTable.cc", - "libpdffit2/OutputStreams.cc", - "libpdffit2/PeriodicTable.cc", - "libpdffit2/PointsInSphere.cc", - "libpdffit2/StringUtils.cc", - "libpdffit2/fit.cc", - "libpdffit2/gaussj.cc", - "libpdffit2/metric.cc", - "libpdffit2/nrutil.cc", - "libpdffit2/output.cc", - "libpdffit2/parser.cc", - "libpdffit2/pdf.cc", - "libpdffit2/pdffit.cc", - "libpdffit2/pdflsmin.cc", - "libpdffit2/scatlen.cc", - "libpdffit2/stru.cc", - ], - include_dirs=include_dirs, - libraries=libraries, - library_dirs=library_dirs, - define_macros=define_macros, - extra_compile_args=extra_compile_args, - extra_link_args=extra_link_args, - extra_objects=extra_objects, -) - - -with open(os.path.join(MYDIR, "README.rst")) as fp: - long_description = fp.read() - -# define distribution + baselib = "boost_python" + major, minor = (str(x) for x in sys.version_info[:2]) + pytags = [major + minor, major, ""] + mttags = ["", "-mt"] + boostlibtags = [(pt + mt) for mt in mttags for pt in pytags] + [""] + from ctypes.util import find_library + + for tag in boostlibtags: + lib = baselib + tag + found = find_library(lib) + if found: + break + + # Show warning when library was not detected. + if not found: + import platform + import warnings + + ldevname = "LIBRARY_PATH" + if platform.system() == "Darwin": + ldevname = "DYLD_FALLBACK_LIBRARY_PATH" + wmsg = ("Cannot detect name suffix for the %r library. " "Consider setting %s.") % (baselib, ldevname) + warnings.warn(wmsg) + + libs = [lib] + return libs + + +def create_extensions(): + "Initialize Extension objects for the setup function." + blibs = [n for n in get_boost_libraries() if not n in ext_kws["libraries"]] + ext_kws["libraries"] += blibs + ext = Extension("diffpy.pdffit2.pdffit2_ext", glob.glob("src/extensions/*.cpp"), **ext_kws) + return [ext] + + +# Extensions not included in pyproject.toml setup_args = dict( - name="diffpy.pdffit2", - version=versiondata.get("DEFAULT", "version"), - packages=find_packages(), - test_suite="diffpy.pdffit2.tests", - ext_modules=[pdffit2module], - include_package_data=True, - install_requires=[ - "six", - "diffpy.structure>=3", - ], - zip_safe=False, - author="Simon J.L. Billinge", - author_email="sb2896@columbia.edu", - maintainer="Pavol Juhas", - maintainer_email="pavol.juhas@gmail.com", - url="https://github.com/diffpy/diffpy.pdffit2", - description="PDFfit2 - real space structure refinement program.", - long_description=long_description, - long_description_content_type="text/x-rst", - license="BSD", - keywords="PDF structure refinement", - classifiers=[ - # List of possible values at - # http://pypi.python.org/pypi?:action=list_classifiers - "Development Status :: 5 - Production/Stable", - "Environment :: Console", - "Intended Audience :: Science/Research", - "License :: OSI Approved :: BSD License", - "Operating System :: MacOS", - "Operating System :: Microsoft :: Windows", - "Operating System :: POSIX", - "Programming Language :: C++", - "Programming Language :: Python :: 2.7", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "Topic :: Scientific/Engineering :: Chemistry", - "Topic :: Scientific/Engineering :: Physics", - ], + ext_modules=[], ) + if __name__ == "__main__": + setup_args["ext_modules"] = create_extensions() setup(**setup_args) - -# End of file From 7aa2db9176057c9cd7ea18cbc177d794319a2793 Mon Sep 17 00:00:00 2001 From: Sam Andrello Date: Mon, 22 Jul 2024 17:38:21 -0400 Subject: [PATCH 025/104] Add C++ requirements to environment.yml --- environment.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/environment.yml b/environment.yml index 3979d3cb..0e55d589 100644 --- a/environment.yml +++ b/environment.yml @@ -4,3 +4,6 @@ channels: dependencies: - python=3 - pip + - gsl + - gcc + - gxx From c767c629d5649c8f0061c22b536ca20b94119fe2 Mon Sep 17 00:00:00 2001 From: Sam Andrello Date: Mon, 22 Jul 2024 17:39:10 -0400 Subject: [PATCH 026/104] pre-commit fixes in setup.py --- setup.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/setup.py b/setup.py index fbedeff1..2d0ae795 100644 --- a/setup.py +++ b/setup.py @@ -3,8 +3,6 @@ # Extensions script for diffpy.pdffit2 import glob -import os -import re import sys from setuptools import Extension, setup @@ -56,7 +54,7 @@ def get_boost_libraries(): def create_extensions(): "Initialize Extension objects for the setup function." - blibs = [n for n in get_boost_libraries() if not n in ext_kws["libraries"]] + blibs = [n for n in get_boost_libraries() if n not in ext_kws["libraries"]] ext_kws["libraries"] += blibs ext = Extension("diffpy.pdffit2.pdffit2_ext", glob.glob("src/extensions/*.cpp"), **ext_kws) return [ext] From cb7c2efeb1a75f28d9a07ca4d1968bbb47f614da Mon Sep 17 00:00:00 2001 From: Sam Andrello Date: Mon, 22 Jul 2024 18:00:59 -0400 Subject: [PATCH 027/104] add diffpy.structure requirement --- requirements/run.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/requirements/run.txt b/requirements/run.txt index e69de29b..9cc306b0 100644 --- a/requirements/run.txt +++ b/requirements/run.txt @@ -0,0 +1 @@ +diffpy.structure From f76d0ef0ab2168f52e5af33ab2f9044329ccc29a Mon Sep 17 00:00:00 2001 From: Sam Andrello Date: Mon, 22 Jul 2024 18:53:46 -0400 Subject: [PATCH 028/104] add build files --- pyproject.toml | 3 + setup.py | 199 ++++++++++++++++++++++++++++++++++--------------- 2 files changed, 142 insertions(+), 60 deletions(-) mode change 100644 => 100755 setup.py diff --git a/pyproject.toml b/pyproject.toml index 6945ff83..665112c4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -36,6 +36,9 @@ classifiers = [ Homepage = "https://github.com/diffpy/diffpy.pdffit2/" Issues = "https://github.com/diffpy/diffpy.pdffit2/issues/" +[tools.setuptools] +package-dir = {"" = "src"} + [tool.setuptools-git-versioning] enabled = true template = "{tag}" diff --git a/setup.py b/setup.py old mode 100644 new mode 100755 index 2d0ae795..d9c4a01d --- a/setup.py +++ b/setup.py @@ -1,71 +1,150 @@ #!/usr/bin/env python -# Extensions script for diffpy.pdffit2 +# Installation script for diffpy.pdffit2 -import glob -import sys - -from setuptools import Extension, setup - -# Define extension arguments here -ext_kws = { - "libraries": [], - "extra_compile_args": [], - "extra_link_args": [], - "include_dirs": [], -} +"""PDFfit2 - real space structure refinement engine +Packages: diffpy.pdffit2 +Scripts: pdffit2 +""" -# Figure out the tagged name of boost_python library. -def get_boost_libraries(): - """Check for installed boost_python shared library. - - Returns list of required boost_python shared libraries that are installed - on the system. If required libraries are not found, an Exception will be - thrown. +import os +import re +import sys +import warnings + +from setuptools import Extension, find_packages, setup + +MYDIR = os.path.dirname(os.path.abspath(__file__)) +versioncfgfile = os.path.join(MYDIR, "src/diffpy/pdffit2/version.cfg") +gitarchivecfgfile = os.path.join(MYDIR, ".gitarchive.cfg") + + +# Helper functions ----------------------------------------------------------- + + +def get_compiler_type(): + """find compiler used for building extensions.""" + cc_arg = [a for a in sys.argv if a.startswith("--compiler=")] + if cc_arg: + compiler_type = cc_arg[-1].split("=", 1)[1] + else: + from distutils.ccompiler import new_compiler + + compiler_type = new_compiler().compiler_type + return compiler_type + + +def get_gsl_config(): + """Return dictionary with paths to GSL library.""" + gslcfgpaths = [os.path.join(p, "gsl-config") for p in ([MYDIR] + os.environ["PATH"].split(os.pathsep))] + gslcfgpaths = [p for p in gslcfgpaths if os.path.isfile(p)] + rv = {"include_dirs": [], "library_dirs": []} + if not gslcfgpaths: + wmsg = "Cannot find gsl-config in {!r} nor in system PATH." + warnings.warn(wmsg.format(MYDIR)) + return rv + gslcfg = gslcfgpaths[0] + with open(gslcfg) as fp: + txt = fp.read() + mprefix = re.search("(?m)^prefix=(.+)", txt) + minclude = re.search(r"(?m)^[^#]*\s-I(\S+)", txt) + mlibpath = re.search(r"(?m)^[^#]*\s-L(\S+)", txt) + if not mprefix: + emsg = "Cannot find 'prefix=' line in {}." + raise RuntimeError(emsg.format(gslcfg)) + p = mprefix.group(1) + inc = minclude.group(1) if minclude else (p + "/include") + lib = mlibpath.group(1) if mlibpath else (p + "/lib") + rv["include_dirs"] += [inc] + rv["library_dirs"] += [lib] + return rv + + +def get_gsl_config_win(): + """Return dictionary with paths to GSL library, windwows version. + This version is installed with conda. """ - baselib = "boost_python" - major, minor = (str(x) for x in sys.version_info[:2]) - pytags = [major + minor, major, ""] - mttags = ["", "-mt"] - boostlibtags = [(pt + mt) for mt in mttags for pt in pytags] + [""] - from ctypes.util import find_library - - for tag in boostlibtags: - lib = baselib + tag - found = find_library(lib) - if found: - break - - # Show warning when library was not detected. - if not found: - import platform - import warnings - - ldevname = "LIBRARY_PATH" - if platform.system() == "Darwin": - ldevname = "DYLD_FALLBACK_LIBRARY_PATH" - wmsg = ("Cannot detect name suffix for the %r library. " "Consider setting %s.") % (baselib, ldevname) - warnings.warn(wmsg) - - libs = [lib] - return libs - - -def create_extensions(): - "Initialize Extension objects for the setup function." - blibs = [n for n in get_boost_libraries() if n not in ext_kws["libraries"]] - ext_kws["libraries"] += blibs - ext = Extension("diffpy.pdffit2.pdffit2_ext", glob.glob("src/extensions/*.cpp"), **ext_kws) - return [ext] - - -# Extensions not included in pyproject.toml -setup_args = dict( - ext_modules=[], + conda_prefix = os.environ["CONDA_PREFIX"] + inc = os.path.join(conda_prefix, "Library", "include") + lib = os.path.join(conda_prefix, "Library", "lib") + rv = {"include_dirs": [], "library_dirs": []} + rv["include_dirs"] += [inc] + rv["library_dirs"] += [lib] + return rv + + +# ---------------------------------------------------------------------------- + +# compile and link options +define_macros = [] +os_name = os.name +if os_name == "nt": + gcfg = get_gsl_config_win() +else: + gcfg = get_gsl_config() +include_dirs = [MYDIR] + gcfg["include_dirs"] +library_dirs = [] +libraries = [] +extra_objects = [] +extra_compile_args = [] +extra_link_args = [] + +compiler_type = get_compiler_type() +if compiler_type in ("unix", "cygwin", "mingw32"): + extra_compile_args = ["-std=c++11", "-Wall", "-Wno-write-strings", "-O3", "-funroll-loops", "-ffast-math"] + extra_objects += ((p + "/libgsl.a") for p in gcfg["library_dirs"]) +elif compiler_type == "msvc": + define_macros += [("_USE_MATH_DEFINES", None)] + extra_compile_args = ["/EHs"] + libraries += ["gsl"] + library_dirs += gcfg["library_dirs"] +# add optimization flags for other compilers if needed + + +# define extension here +pdffit2module = Extension( + "diffpy.pdffit2.pdffit2", + [ + "src/extensions/pdffit2module/bindings.cc", + "src/extensions/pdffit2module/misc.cc", + "src/extensions/pdffit2module/pdffit2module.cc", + "src/extensions/pdffit2module/pyexceptions.cc", + "src/extensions/libpdffit2/Atom.cc", + "src/extensions/libpdffit2/LocalPeriodicTable.cc", + "src/extensions/libpdffit2/OutputStreams.cc", + "src/extensions/libpdffit2/PeriodicTable.cc", + "src/extensions/libpdffit2/PointsInSphere.cc", + "src/extensions/libpdffit2/StringUtils.cc", + "src/extensions/libpdffit2/fit.cc", + "src/extensions/libpdffit2/gaussj.cc", + "src/extensions/libpdffit2/metric.cc", + "src/extensions/libpdffit2/nrutil.cc", + "src/extensions/libpdffit2/output.cc", + "src/extensions/libpdffit2/parser.cc", + "src/extensions/libpdffit2/pdf.cc", + "src/extensions/libpdffit2/pdffit.cc", + "src/extensions/libpdffit2/pdflsmin.cc", + "src/extensions/libpdffit2/scatlen.cc", + "src/extensions/libpdffit2/stru.cc", + ], + include_dirs=include_dirs, + libraries=libraries, + library_dirs=library_dirs, + define_macros=define_macros, + extra_compile_args=extra_compile_args, + extra_link_args=extra_link_args, + extra_objects=extra_objects, ) +setup_args = dict( + packages=find_packages(where="src"), + package_dir={"": "src"}, + ext_modules=[pdffit2module], + # scripts=[] +) if __name__ == "__main__": - setup_args["ext_modules"] = create_extensions() setup(**setup_args) + +# End of file From 0a6c179baa3559f943c9a733ea8a54975d0075f9 Mon Sep 17 00:00:00 2001 From: Sam Andrello Date: Mon, 22 Jul 2024 18:54:36 -0400 Subject: [PATCH 029/104] update C++ include paths --- src/extensions/pdffit2module/misc.cc | 6 +++--- src/extensions/pdffit2module/pdffit2module.cc | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/extensions/pdffit2module/misc.cc b/src/extensions/pdffit2module/misc.cc index 80198049..17e0833d 100644 --- a/src/extensions/pdffit2module/misc.cc +++ b/src/extensions/pdffit2module/misc.cc @@ -30,9 +30,9 @@ #include "misc.h" #include "pyexceptions.h" #include "PyFileStreambuf.h" -#include "libpdffit2/StringUtils.h" -#include "libpdffit2/LocalPeriodicTable.h" -#include "libpdffit2/pdffit.h" +#include "../libpdffit2/StringUtils.h" +#include "../libpdffit2/LocalPeriodicTable.h" +#include "../libpdffit2/pdffit.h" // ostream buffer used for engine output redirection PyFileStreambuf* py_stdout_streambuf = NULL; diff --git a/src/extensions/pdffit2module/pdffit2module.cc b/src/extensions/pdffit2module/pdffit2module.cc index acf89fa3..efde9511 100644 --- a/src/extensions/pdffit2module/pdffit2module.cc +++ b/src/extensions/pdffit2module/pdffit2module.cc @@ -23,7 +23,7 @@ #include "pyexceptions.h" #include "bindings.h" -#include "libpdffit2/pdffit.h" +#include "../libpdffit2/pdffit.h" using namespace std; From f1068f29dd2946982471f6a1c92b06c8f42a0e72 Mon Sep 17 00:00:00 2001 From: Sam Andrello Date: Mon, 22 Jul 2024 19:11:14 -0400 Subject: [PATCH 030/104] comment edits --- setup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index d9c4a01d..5cac1080 100755 --- a/setup.py +++ b/setup.py @@ -1,6 +1,6 @@ #!/usr/bin/env python -# Installation script for diffpy.pdffit2 +# Extensions script for diffpy.pdffit2 """PDFfit2 - real space structure refinement engine @@ -141,7 +141,7 @@ def get_gsl_config_win(): packages=find_packages(where="src"), package_dir={"": "src"}, ext_modules=[pdffit2module], - # scripts=[] + # scripts=[] # place examples here ) if __name__ == "__main__": From d3a2283e469710428202e053a57d90f5c1e1ffb3 Mon Sep 17 00:00:00 2001 From: Sam Andrello Date: Tue, 23 Jul 2024 11:54:40 -0400 Subject: [PATCH 031/104] Remove duplicate code files --- diffpy/__init__.py | 28 - diffpy/pdffit2/__init__.py | 34 - diffpy/pdffit2/ipy_ext.py | 95 - diffpy/pdffit2/output.py | 41 - diffpy/pdffit2/pdffit.py | 1297 ------ diffpy/pdffit2/tests/ExceptionsTest.py | 794 ---- diffpy/pdffit2/tests/TestPdfFit.py | 761 ---- diffpy/pdffit2/tests/TestPhaseFractions.py | 95 - diffpy/pdffit2/tests/TestShapeFactors.py | 274 -- diffpy/pdffit2/tests/__init__.py | 103 - diffpy/pdffit2/tests/debug.py | 36 - diffpy/pdffit2/tests/pdffit2testutils.py | 53 - diffpy/pdffit2/tests/run.py | 38 - diffpy/pdffit2/tests/rundeps.py | 30 - diffpy/pdffit2/tests/testdata/300K.gr | 2062 ---------- diffpy/pdffit2/tests/testdata/Ni.dat | 1001 ----- diffpy/pdffit2/tests/testdata/Ni.stru | 33 - .../pdffit2/tests/testdata/PbScW25TiO3.stru | 345 -- diffpy/pdffit2/tests/testdata/badNi.dat | 1001 ----- diffpy/pdffit2/tests/testdata/badNi.stru | 32 - .../tests/testdata/badNiZeroVolume.stru | 33 - diffpy/pdffit2/tests/testdata/noLattice.stru | 32 - diffpy/pdffit2/version.py | 54 - libpdffit2/Atom.cc | 104 - libpdffit2/Atom.h | 70 - libpdffit2/AtomType.h | 76 - libpdffit2/LocalPeriodicTable.cc | 147 - libpdffit2/LocalPeriodicTable.h | 63 - libpdffit2/MathUtils.h | 94 - libpdffit2/OutputStreams.cc | 24 - libpdffit2/OutputStreams.h | 31 - libpdffit2/PairDistance.h | 42 - libpdffit2/PeriodicTable.cc | 3459 ----------------- libpdffit2/PeriodicTable.h | 75 - libpdffit2/PointsInSphere.cc | 243 -- libpdffit2/PointsInSphere.h | 182 - libpdffit2/ShapeFactors.h | 43 - libpdffit2/StringUtils.cc | 58 - libpdffit2/StringUtils.h | 71 - libpdffit2/exceptions.h | 95 - libpdffit2/fit.cc | 836 ---- libpdffit2/gaussj.cc | 114 - libpdffit2/matrix.h | 239 -- libpdffit2/metric.cc | 341 -- libpdffit2/nrutil.cc | 122 - libpdffit2/nrutil.h | 34 - libpdffit2/output.cc | 350 -- libpdffit2/parser.cc | 402 -- libpdffit2/pdf.cc | 1776 --------- libpdffit2/pdffit.cc | 372 -- libpdffit2/pdffit.h | 611 --- libpdffit2/pdflsmin.cc | 326 -- libpdffit2/scatlen.cc | 114 - libpdffit2/stru.cc | 837 ---- libpdffit2/support_msvc9.h | 13 - libpdffit2/tests/Makefile | 32 - libpdffit2/tests/TestPointsInSphere.cc | 228 -- libpdffit2/tests/alltests.cc | 46 - pdffit2module/PyFileStreambuf.h | 97 - pdffit2module/bindings.cc | 341 -- pdffit2module/bindings.h | 27 - pdffit2module/misc.cc | 2219 ----------- pdffit2module/misc.h | 486 --- pdffit2module/pdffit2module.cc | 150 - pdffit2module/pyexceptions.cc | 30 - pdffit2module/pyexceptions.h | 33 - 66 files changed, 23325 deletions(-) delete mode 100644 diffpy/__init__.py delete mode 100644 diffpy/pdffit2/__init__.py delete mode 100644 diffpy/pdffit2/ipy_ext.py delete mode 100644 diffpy/pdffit2/output.py delete mode 100644 diffpy/pdffit2/pdffit.py delete mode 100644 diffpy/pdffit2/tests/ExceptionsTest.py delete mode 100644 diffpy/pdffit2/tests/TestPdfFit.py delete mode 100644 diffpy/pdffit2/tests/TestPhaseFractions.py delete mode 100644 diffpy/pdffit2/tests/TestShapeFactors.py delete mode 100644 diffpy/pdffit2/tests/__init__.py delete mode 100644 diffpy/pdffit2/tests/debug.py delete mode 100644 diffpy/pdffit2/tests/pdffit2testutils.py delete mode 100644 diffpy/pdffit2/tests/run.py delete mode 100644 diffpy/pdffit2/tests/rundeps.py delete mode 100644 diffpy/pdffit2/tests/testdata/300K.gr delete mode 100644 diffpy/pdffit2/tests/testdata/Ni.dat delete mode 100644 diffpy/pdffit2/tests/testdata/Ni.stru delete mode 100644 diffpy/pdffit2/tests/testdata/PbScW25TiO3.stru delete mode 100644 diffpy/pdffit2/tests/testdata/badNi.dat delete mode 100644 diffpy/pdffit2/tests/testdata/badNi.stru delete mode 100644 diffpy/pdffit2/tests/testdata/badNiZeroVolume.stru delete mode 100644 diffpy/pdffit2/tests/testdata/noLattice.stru delete mode 100644 diffpy/pdffit2/version.py delete mode 100644 libpdffit2/Atom.cc delete mode 100644 libpdffit2/Atom.h delete mode 100644 libpdffit2/AtomType.h delete mode 100644 libpdffit2/LocalPeriodicTable.cc delete mode 100644 libpdffit2/LocalPeriodicTable.h delete mode 100644 libpdffit2/MathUtils.h delete mode 100644 libpdffit2/OutputStreams.cc delete mode 100644 libpdffit2/OutputStreams.h delete mode 100644 libpdffit2/PairDistance.h delete mode 100644 libpdffit2/PeriodicTable.cc delete mode 100644 libpdffit2/PeriodicTable.h delete mode 100644 libpdffit2/PointsInSphere.cc delete mode 100644 libpdffit2/PointsInSphere.h delete mode 100644 libpdffit2/ShapeFactors.h delete mode 100644 libpdffit2/StringUtils.cc delete mode 100644 libpdffit2/StringUtils.h delete mode 100644 libpdffit2/exceptions.h delete mode 100644 libpdffit2/fit.cc delete mode 100644 libpdffit2/gaussj.cc delete mode 100644 libpdffit2/matrix.h delete mode 100644 libpdffit2/metric.cc delete mode 100644 libpdffit2/nrutil.cc delete mode 100644 libpdffit2/nrutil.h delete mode 100644 libpdffit2/output.cc delete mode 100644 libpdffit2/parser.cc delete mode 100644 libpdffit2/pdf.cc delete mode 100644 libpdffit2/pdffit.cc delete mode 100644 libpdffit2/pdffit.h delete mode 100644 libpdffit2/pdflsmin.cc delete mode 100644 libpdffit2/scatlen.cc delete mode 100644 libpdffit2/stru.cc delete mode 100644 libpdffit2/support_msvc9.h delete mode 100644 libpdffit2/tests/Makefile delete mode 100644 libpdffit2/tests/TestPointsInSphere.cc delete mode 100644 libpdffit2/tests/alltests.cc delete mode 100644 pdffit2module/PyFileStreambuf.h delete mode 100644 pdffit2module/bindings.cc delete mode 100644 pdffit2module/bindings.h delete mode 100644 pdffit2module/misc.cc delete mode 100644 pdffit2module/misc.h delete mode 100644 pdffit2module/pdffit2module.cc delete mode 100644 pdffit2module/pyexceptions.cc delete mode 100644 pdffit2module/pyexceptions.h diff --git a/diffpy/__init__.py b/diffpy/__init__.py deleted file mode 100644 index f093b937..00000000 --- a/diffpy/__init__.py +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env python -############################################################################## -# -# diffpy by DANSE Diffraction group -# Simon J. L. Billinge -# (c) 2008 trustees of the Michigan State University. -# All rights reserved. -# -# File coded by: Pavol Juhas -# -# See AUTHORS.txt for a list of people who contributed. -# See LICENSE.txt for license information. -# -############################################################################## - - -"""diffpy - tools for structure analysis by diffraction. - -Blank namespace package. -""" - - -from pkgutil import extend_path - -__path__ = extend_path(__path__, __name__) - - -# End of file diff --git a/diffpy/pdffit2/__init__.py b/diffpy/pdffit2/__init__.py deleted file mode 100644 index 0f33c5c4..00000000 --- a/diffpy/pdffit2/__init__.py +++ /dev/null @@ -1,34 +0,0 @@ -#!/usr/bin/env python -############################################################################## -# -# pdffit2 by DANSE Diffraction group -# Simon J. L. Billinge -# (c) 2006 trustees of the Michigan State University. -# All rights reserved. -# -# File coded by: Pavol Juhas -# -# See AUTHORS.txt for a list of people who contributed. -# See LICENSE.txt for license information. -# -############################################################################## - -"""PDFfit2 - real space structure refinement program. -Classes: - PdfFit -Routines: - redirect_stdout -""" - - -from diffpy.pdffit2.version import __version__, __date__ -from diffpy.pdffit2.pdffit import PdfFit -from diffpy.pdffit2.output import redirect_stdout -from diffpy.pdffit2.pdffit2 import is_element - -# silence pyflakes checker -assert __version__ or True -assert __date__ or True -assert all((PdfFit, redirect_stdout, is_element)) - -# End of file diff --git a/diffpy/pdffit2/ipy_ext.py b/diffpy/pdffit2/ipy_ext.py deleted file mode 100644 index 4546967e..00000000 --- a/diffpy/pdffit2/ipy_ext.py +++ /dev/null @@ -1,95 +0,0 @@ -#!/usr/bin/env python - -"""This module defines functions within IPython session to simulate -the old pdffit2 interactive session. - -Usage: %load_ext diffpy.pdffit2.ipy_ext -""" - - -def load_ipython_extension(ipython): - from diffpy.pdffit2 import PdfFit - - pf = PdfFit() - pdf = EasyPDFPlotting(pf) - print(" Type help(pdffit) or help(topic) for information.\n") - ns = dict(pdffit=PdfFit, pdf=pdf) - pf._exportAll(ns) - ipython.user_ns.update(ns) - return - - -class EasyPDFPlotting(object): - """Convenience functions for accessing and plotting PDFfit2 data.""" - - def __init__(self, pdffit_instance): - self._pdffit = pdffit_instance - return - - @property - def r(self): - "R-grid for PDF simulation." - return self._asarray(self._pdffit.getR(), dtype=float) - - @property - def Gobs(self): - "Observed PDF data." - return self._asarray(self._pdffit.getpdf_obs(), dtype=float) - - @property - def Gcalc(self): - "Calculated PDF data." - return self._asarray(self._pdffit.getpdf_fit()) - - @property - def Gdiff(self): - "Difference between the observed and simulated PDF." - return self.Gobs - self.Gcalc - - def showfit(self, offset=None): - """Plot observed and simulated PDFs and the difference curve. - - offset -- offset for the difference curve. - - No return value. - """ - from math import floor - - from matplotlib.pyplot import gca - - cr = self.r - cGobs = self.Gobs - cGcalc = self.Gcalc - cGdiff = self.Gdiff - if offset is None: - offset = floor(min([min(cGobs), min(cGcalc)]) - max(cGdiff)) - ax = gca() - ax.plot(cr, cGobs, "r.", cr, cGcalc, "b-", cr, cGdiff + offset, "g-") - xl = ax.xaxis.get_label().get_text() - yl = ax.yaxis.get_label().get_text() - if xl == "": - ax.set_xlabel("r (A)") - if yl == "": - ax.set_ylabel("G (A**-2)") - return - - def showRw(self): - "Plot cumulative Rw." - from matplotlib.pyplot import gca - - cRw = self._asarray(self._pdffit.getcrw()) - ax = gca() - ax.plot(self.r, cRw) - ax.set_title("Cumulative Rw = %.4f" % cRw[-1]) - ax.set_xlabel("r") - ax.set_ylabel("Rw") - return - - @staticmethod - def _asarray(x, dtype=None): - import numpy - - return numpy.asarray(x, dtype=dtype) - - -# End of class EasyPDFPlotting diff --git a/diffpy/pdffit2/output.py b/diffpy/pdffit2/output.py deleted file mode 100644 index 6d1247cf..00000000 --- a/diffpy/pdffit2/output.py +++ /dev/null @@ -1,41 +0,0 @@ -#!/usr/bin/env python -############################################################################## -# -# pdffit2 by DANSE Diffraction group -# Simon J. L. Billinge -# (c) 2007 trustees of the Michigan State University. -# All rights reserved. -# -# File coded by: Pavol Juhas -# -# See AUTHORS.txt for a list of people who contributed. -# See LICENSE.txt for license information. -# -############################################################################## - -"""Take care of sending engine output to given file-like object. -The output file is stored in local module variable stdout. -""" - - -# create module variable stdout - -from sys import stdout as stdout - -# silence pyflakes checker -assert stdout - - -def redirect_stdout(dst): - """Redirect PDFfit2 standard output to a file-like object dst. - The dst value is stored in module variable stdout. - """ - from diffpy.pdffit2.pdffit2 import redirect_stdout - - redirect_stdout(dst) - global stdout - stdout = dst - return - - -# End of file diff --git a/diffpy/pdffit2/pdffit.py b/diffpy/pdffit2/pdffit.py deleted file mode 100644 index 255e8b0f..00000000 --- a/diffpy/pdffit2/pdffit.py +++ /dev/null @@ -1,1297 +0,0 @@ -#!/usr/bin/env python -############################################################################## -# -# pdffit2 by DANSE Diffraction group -# Simon J. L. Billinge -# (c) 2006 trustees of the Michigan State University. -# All rights reserved. -# -# File coded by: Chris Farros, Pavol Juhas -# -# See AUTHORS.txt for a list of people who contributed. -# See LICENSE.txt for license information. -# -############################################################################## - -"""PdfFit class for fitting pdf data to a model.""" - -from __future__ import print_function - -import itertools -import numbers - -import six - -# Load pdffit2 and output modules to the current namespace. -# Note that "import diffpy.pdffit2.output as output" would -# crash with AttributeError when executed during imports of -# parent packages. -from diffpy.pdffit2 import output, pdffit2 - -# helper routines - - -def _format_value_std(value, stdev): - """Convert value to a string with standard deviation in brackets. - - value -- a number - stdev -- standard deviation. Ignored when small compared to value. - - Return string. - """ - if stdev > abs(value) * 1e-8: - s = "%g (%g)" % (value, stdev) - elif str(stdev) == "nan": - s = "%g (NaN)" % value - else: - s = "%g" % value - return s - - -def _format_bond_length(dij, ddij, ij1, symij): - """Return string with formatted bond length info for a pair of atoms. - - dij -- distance between atoms i and j - ddij -- standard deviation of dij. Ignored when small relative to dij. - ij1 -- tuple of atom indices starting at 1 - symij -- tuple of atom symbols - - Return formatted string. - """ - w_smbidx = 10 - w_equals = 30 - s0 = "%s (#%i)" % (symij[0], ij1[0]) - s1 = "%s (#%i)" % (symij[1], ij1[1]) - leader0 = " " + s0.ljust(w_smbidx) + " - " + s1 + " " - leader1 = leader0.ljust(w_equals) + "= " - s = leader1 + _format_value_std(dij, ddij) + " A" - return s - - -def _convertCallable(var): - """Convert an object to the result of its call when callable. - - var -- string or callable object that returns string - - Return var or var(). - """ - if callable(var): - rv = var() - else: - rv = var - return rv - - -# constants - -__intro_message__ = """ -****************************************************************************** -* P D F F I T Version %(version)s * -* %(date)s * -* -------------------------------------------------------------------------- * -* (c) 1998-2007 Trustees of the Michigan State University. * -* (c) 2008-%(year)s Trustees of the Columbia University * -* in the city of New York. * -* * -* Authors: * -* Thomas Proffen - Email: tproffen@lanl.gov * -* Jacques Bloch - Email: bloch@pa.msu.edu * -* Christopher Farrow - Email: clf2121@columbia.edu * -* Pavol Juhas - Email: pjuhas@bnl.gov * -* Simon Billinge - Email: sb2896@columbia.edu * -****************************************************************************** -""" - - -############################################################################## - - -class PdfFit(object): - """Create PdfFit object.""" - - # constants and enumerators from pdffit.h: - # selection of all atoms - selalias = {"ALL": -1} - # constraint type identifiers - FCON = {"USER": 0, "IDENT": 1, "FCOMP": 2, "FSQR": 3} - # scattering type identifiers - Sctp = {"X": 0, "N": 1} - - def _exportAll(self, namespace): - """_exportAll(self, namespace) --> Export all 'public' class methods - into namespace. - - This function allows for a module-level PdfFit object which doesn't have - to be referenced when calling a method. This function makes old (python) - scripts compatible with this class. At the top of the script, create a - pdffit object, and then call this method. Usually, namespace = locals(). - """ - # string aliases (var = "var") - for a in itertools.chain(self.selalias, self.FCON, self.Sctp): - exec("%s = %r" % (a, a), namespace) - public = [ - a - for a in dir(self) - if "__" not in a and a not in ["_handle", "_exportAll", "selalias", "FCON", "Sctp"] - ] - for funcname in public: - namespace[funcname] = getattr(self, funcname) - return - - def intro(): - """Show introductory message.""" - import re - - from diffpy.pdffit2 import __date__, __version__ - - date = __date__[:10] - d = {"version": __version__, "date": date, "year": date[:4] or "2019"} - msg = __intro_message__ % d - - def filler(mx): - return mx.group(0).rstrip(" *").ljust(77) + "*" - - msg_ljust = re.sub("(?m)^(.{1,77}|.{79}.*)$", filler, msg) - print(msg_ljust, file=output.stdout) - return - - intro = staticmethod(intro) - - def add_structure(self, stru): - """add_structure(stru) --> Add new structure to PdfFit instance. - - stru -- instance of Structure class from diffpy.structure. - - No return value. - Raises pdffit2.structureError when stru contains unknown - atom species. - """ - s = stru.writeStr("pdffit") - self.read_struct_string(s) - return - - def read_struct(self, struct): - """read_struct(struct) --> Read structure from file into memory. - - struct -- name of file from which to read structure - - Raises: - pdffit2.calculationError when a lattice cannot be created from the - given structure - pdffit2.structureError when a structure file is malformed - IOError when the file cannot be read from the disk - """ - pdffit2.read_struct(self._handle, struct) - self.stru_files.append(struct) - return - - def read_struct_string(self, struct, name=""): - """read_struct_string(struct, name = "") --> Read structure from - a string into memory. - - struct -- string containing the contents of the structure file - name -- tag with which to label structure - - Raises: - pdffit2.calculationError when a lattice cannot be created from the - given structure - pdffit2.structureError when a structure file is malformed - """ - pdffit2.read_struct_string(self._handle, struct) - self.stru_files.append(name) - return - - def read_data(self, data, stype, qmax, qdamp): - """read_data(data, stype, qmax, qdamp) --> Read pdf data from file into - memory. - - data -- name of file from which to read data - stype -- 'X' (xray) or 'N' (neutron) - qmax -- Q-value cutoff used in PDF calculation. - Use qmax=0 to neglect termination ripples. - qdamp -- instrumental Q-resolution factor - - Raises: IOError when the file cannot be read from disk - """ - pdffit2.read_data(self._handle, data, six.b(stype), qmax, qdamp) - self.data_files.append(data) - return - - def read_data_string(self, data, stype, qmax, qdamp, name=""): - """read_data_string(data, stype, qmax, qdamp, name = "") --> Read - pdf data from a string into memory. - - data -- string containing the contents of the data file - stype -- 'X' (xray) or 'N' (neutron) - qmax -- Q-value cutoff used in PDF calculation. - Use qmax=0 to neglect termination ripples. - qdamp -- instrumental Q-resolution factor - name -- tag with which to label data - """ - pdffit2.read_data_string(self._handle, data, six.b(stype), qmax, qdamp, name) - name = data - self.data_files.append(name) - return - - def read_data_lists(self, stype, qmax, qdamp, r_data, Gr_data, dGr_data=None, name="list"): - """read_data_lists(stype, qmax, qdamp, r_data, Gr_data, dGr_data = - None, name = "list") --> Read pdf data into memory from lists. - - All lists must be of the same length. - stype -- 'X' (xray) or 'N' (neutron) - qmax -- Q-value cutoff used in PDF calculation. - Use qmax=0 to neglect termination ripples. - qdamp -- instrumental Q-resolution factor - r_data -- list of r-values - Gr_data -- list of G(r) values - dGr_data -- list of G(r) uncertainty values - name -- tag with which to label data - - Raises: ValueError when the data lists are of different length - """ - pdffit2.read_data_arrays(self._handle, six.b(stype), qmax, qdamp, r_data, Gr_data, dGr_data, name) - self.data_files.append(name) - return - - def pdfrange(self, iset, rmin, rmax): - """pdfrange(iset, rmin, rmax) --> Set the range of the fit. - - iset -- data set to consider - rmin -- minimum r-value of fit - rmax -- maximum r-value of fit - - Raises: ValueError for bad input values - """ - pdffit2.pdfrange(self._handle, iset, rmin, rmax) - return - - def reset(self): - """reset() --> Clear all stored fit, structure, and parameter data.""" - self.stru_files = [] - self.data_files = [] - pdffit2.reset(self._handle) - return - - def alloc(self, stype, qmax, qdamp, rmin, rmax, bin): - """alloc(stype, qmax, qdamp, rmin, rmax, bin) --> Allocate space - for a PDF calculation. - - The structure from which to calculate the PDF must first be imported - with the read_struct() or read_struct_string() method. - stype -- 'X' (xray) or 'N' (neutron) - qmax -- Q-value cutoff used in PDF calculation. - Use qmax=0 to neglect termination ripples. - qdamp -- instrumental Q-resolution factor - rmin -- minimum r-value of calculation - rmax -- maximum r-value of calculation - bin -- number of data points in calculation - - Raises: - ValueError for bad input values - pdffit.unassignedError when no structure has been loaded - """ - pdffit2.alloc(self._handle, six.b(stype), qmax, qdamp, rmin, rmax, bin) - return - - def calc(self): - """calc() --> Calculate the PDF of the imported structure. - - Space for the calculation must first be allocated with the alloc() - method. - - Raises: - pdffit2.calculationError when allocated space cannot - accomodate calculation - pdffit.unassignedError when space for calculation has not been - allocated - """ - pdffit2.calc(self._handle) - return - - def refine(self, toler=0.00000001): - """refine(toler = 0.00000001) --> Fit the theory to the imported data. - - toler -- tolerance of the fit - - Raises: - pdffit2.calculationError when the model pdf cannot be calculated - pdffit2.constraintError when refinement fails due to bad - constraint - pdffit2.unassigedError when a constraint used but never initialized - using setpar() - """ - step = 0 - finished = 0 - while not finished: - finished = pdffit2.refine_step(self._handle, toler) - step += 1 - return - - def refine_step(self, toler=0.00000001): - """refine_step(toler = 0.00000001) --> Run a single step of the fit. - - toler -- tolerance of the fit - - Raises: - pdffit2.calculationError when the model pdf cannot be calculated - pdffit2.constraintError when refinement fails due to bad - constraint - pdffit2.unassigedError when a constraint used but never initialized - using setpar() - - Returns: 1 (0) if refinement is (is not) finished - """ - self.finished = pdffit2.refine_step(self._handle, toler) - return self.finished - - def save_pdf(self, iset, fname): - """save_pdf(iset, fname) --> Save calculated or fitted PDF to file. - - iset -- data set to save - - Raises: - IOError if file cannot be saved - pdffit2.unassignedError if the data set is undefined - """ - pdffit2.save_pdf(self._handle, iset, fname) - return - - def save_pdf_string(self, iset): - """save_pdf_string(iset) --> Save calculated or fitted PDF to string. - - iset -- data set to save - - Raises: - pdffit2.unassignedError if the data set is undefined - - Returns: string containing contents of save file - """ - pdffilestring = pdffit2.save_pdf(self._handle, iset, "") - return pdffilestring - - def save_dif(self, iset, fname): - """save_dif(iset, fname) --> Save data and fitted PDF difference to - file. - - iset -- data set to save - - Raises: - IOError if file cannot be saved - pdffit2.unassignedError if the data set is undefined - """ - pdffit2.save_dif(self._handle, iset, fname) - return - - def save_dif_string(self, iset): - """save_dif_string(iset) --> Save data and fitted PDF difference to - string. - - iset -- data set to save - - Raises: - pdffit2.unassignedError if the data set is undefined - - Returns: string containing contents of save file - """ - diffilestring = pdffit2.save_dif(self._handle, iset, "") - return diffilestring - - def save_res(self, fname): - """save_res(fname) --> Save fit-specific data to file. - - Raises: - IOError if file cannot be saved - pdffit2.unassignedError if there is no refinement data to save - """ - pdffit2.save_res(self._handle, fname) - return - - def save_res_string(self): - """save_res_string() --> Save fit-specific data to a string. - - Raises: - pdffit2.unassignedError if there is no refinement data to save - - Returns: string containing contents of save file - """ - resfilestring = pdffit2.save_res(self._handle, "") - return resfilestring - - def get_structure(self, ip): - """get_structure(ip) --> Get a copy of specified phase data. - - ip -- index of existing PdfFit phase starting from 1 - - Return Structure object from diffpy.structure. - Raise pdffit2.unassignedError if phase ip is undefined. - """ - from diffpy.structure import PDFFitStructure - - s = self.save_struct_string(ip) - stru = PDFFitStructure() - stru.readStr(s, "pdffit") - return stru - - def save_struct(self, ip, fname): - """save_struct(ip, fname) --> Save structure resulting from fit - to file. - - ip -- phase to save - - Raises: - IOError if file cannot be saved - pdffit2.unassignedError if the data set is undefined - """ - pdffit2.save_struct(self._handle, ip, fname) - return - - def save_struct_string(self, ip): - """save_struct(ip) --> Save structure resulting from fit to string. - - ip -- phase to save - - Raises: - pdffit2.unassignedError if phase ip is undefined. - - Returns: string containing contents of save file - """ - structfilestring = pdffit2.save_struct(self._handle, ip, "") - return structfilestring - - def show_struct(self, ip): - """show_struct(ip) --> Print structure resulting from fit. - - ip -- phase to display - - Raises: pdffit2.unassignedError if the phase is undefined - """ - pdffit2.show_struct(self._handle, ip) - return - - def constrain(self, var, par, fcon=None): - """constrain(var, par[, fcon]) --> Constrain a variable to a parameter. - - A variable can be constrained to a number or equation string. - var -- variable to constrain, such as x(1) - par -- parameter which to constrain the variable. This can be - an integer or an equation string containing a reference - to another parameter. Equation strings use standard c++ - syntax. The value of a constrained parameter is accessed - as @p in an equation string, where p is the parameter. - e.g. - >>> constrain(x(1), 1) - >>> constrain(x(2), "0.5+@1") - fcon -- 'USER', 'IDENT', 'FCOMP', or 'FSQR' - this is an optional parameter, and I don't know how it is - used! - - Raises: - pdffit2.constraintError if a constraint is bad - pdffit2.unassignedError if variable does not yet exist - ValueError if variable index does not exist (e.g. lat(7)) - """ - var_ref = self.__getRef(var) - varnc = _convertCallable(var) - if fcon: - fc = self.FCON[fcon] - pdffit2.constrain_int(self._handle, var_ref, varnc, par, fc) - elif isinstance(par, six.string_types): - pdffit2.constrain_str(self._handle, var_ref, varnc, par) - else: - pdffit2.constrain_int(self._handle, var_ref, varnc, par) - return - - def setpar(self, par, val): - """setpar(par, val) --> Set value of constrained parameter. - - val -- Either a numerical value or a reference to a variable - - Raises: - pdffit2.unassignedError when variable is yet to be assigned - """ - # people do not use parenthesis, e.g., "setpar(3, qdamp)" - # in such case val is a reference to PdfFit method - val = _convertCallable(val) - try: - val = float(val) - pdffit2.setpar_dbl(self._handle, par, val) - except ValueError: - var_ref = self.__getRef(val) - pdffit2.setpar_RV(self._handle, par, var_ref) - return - - def setvar(self, var, val): - """setvar(var, val) --> Set the value of a variable. - - Raises: - pdffit2.unassignedError if variable does not yet exist - ValueError if variable index does not exist (e.g. lat(7)) - """ - var_ref = self.__getRef(var) - pdffit2.setvar(self._handle, var_ref, val) - return - - def getvar(self, var): - """getvar(var) --> Get stored value of a variable. - - Raises: - pdffit2.unassignedError if variable does not yet exist - ValueError if variable index does not exist (e.g. lat(7)) - """ - var_ref = self.__getRef(var) - retval = pdffit2.getvar(self._handle, var_ref) - return retval - - def getrw(self): - """getrw() --> Get normalized total error of the fit rw. - - getrw calculates total fit error summed for all datasets in the fit. - - Return float. - """ - rw = pdffit2.getrw(self._handle) - return rw - - def getcrw(self): - """getcrw() --> Get cumulative Rw for the current dataset. - - Cumulative Rw is a list of Rw partial sums cost values evaluated against - observed PDF data in the error sums evaluated against - the r-points in the fit. - - Raises: pdffit2.unassignedError if no data exists - - Returns: List of crw points, equidistant in r or empty list - if the refine function has not been called yet. - """ - crw = pdffit2.getcrw(self._handle) - return crw - - def getR(self): - """getR() --> Get r-points used in the fit. - - This function should only be called after data has been loaded or - calculated. Before a refinement, the list of r-points will reflect the - data. Afterwords, they will reflect the fit range. - - Raises: pdffit2.unassignedError if no data exists - - Returns: List of equidistance r-points used in fit. - """ - R = pdffit2.getR(self._handle) - return R - - def getpdf_fit(self): - """getpdf_fit() --> Get fitted PDF. - - This function should only be called after a refinement or refinement - step has been done. - - Raises: pdffit2.unassignedError if no data exists - - Returns: List of fitted points, equidistant in r. - """ - pdfdata = pdffit2.getpdf_fit(self._handle) - return pdfdata - - def getpdf_obs(self): - """getpdf_obs() --> Get observed PDF. - - This function should only be called after data has been loaded or - calculated. Before a refinement, the list of r-points will reflect the - data. Afterwords, they will reflect the fit range. - - Raises: pdffit2.unassignedError if no data exists - - Returns: List of data points, equidistant in r. - """ - pdfdata = pdffit2.getpdf_obs(self._handle) - return pdfdata - - def getpdf_diff(self): - """Obtain difference between observed and fitted PDF. - - This function should only be called after data has been loaded or - calculated. Before a refinement, the list of r-points will reflect the - data. Afterwords, they will reflect the fit range. - - Raises: pdffit2.unassignedError if no data exists - - Returns: List of data points, equidistant in r. - """ - Gdiff = pdffit2.getpdf_diff(self._handle) - return Gdiff - - def get_atoms(self, ip=None): - """get_atoms() --> Get element symbols of all atoms in the structure. - - ip -- index of phase to get the elements from (starting from 1) - when ip is not given, use current phase - - This function should only be called after a structure has been loaded. - - Raises: pdffit2.unassignedError if no structure exists - - Returns: List of atom names in structure. - """ - if ip is None: - rv = pdffit2.get_atoms(self._handle) - else: - rv = pdffit2.get_atoms(self._handle, ip) - return rv - - def get_atom_types(self, ip=None): - """get_atom_types() --> Ordered unique element symbols in the structure. - - ip -- index of phase to get the elements from (starting from 1) - when ip is not given, use current phase - - This function should only be called after a structure has been loaded. - - Raises: - pdffit2.unassignedError if no structure exists - - Returns: List of unique atom symbols as they occur in structure. - """ - if ip is None: - rv = pdffit2.get_atom_types(self._handle) - else: - rv = pdffit2.get_atom_types(self._handle, ip) - return rv - - def getpar(self, par): - """getpar(par) --> Get value of parameter. - - Raises: ValueError if parameter does not exists - """ - return pdffit2.getpar(self._handle, par) - - def fixpar(self, par): - """fixpar(par) --> Fix a parameter. - - Fixed parameters are not fitted in a refinement. Passed parameter - can be 'ALL', in which case all parameters are fixed. - - Raises: pdffit.unassignedError when parameter has not been assigned - """ - if isinstance(par, six.string_types) and par.upper() in self.selalias: - par = self.selalias[par.upper()] - pdffit2.fixpar(self._handle, par) - return - - def freepar(self, par): - """freepar(par) --> Free a parameter. - - Freed parameters are fitted in a refinement. Passed parameter - can be 'ALL', in which case all parameters are freed. - - Raises: pdffit.unassignedError when parameter has not been assigned - """ - if isinstance(par, six.string_types) and par.upper() in self.selalias: - par = self.selalias[par.upper()] - pdffit2.freepar(self._handle, par) - return - - def setphase(self, ip): - """setphase(ip) --> Switch to phase ip. - - ip -- index of the phase starting at 1. - - All parameters assigned after this method is called refer only to the - current phase. - - Raises: pdffit.unassignedError when phase does not exist - """ - pdffit2.setphase(self._handle, ip) - return - - def setdata(self, iset): - """setdata(iset) --> Set the data set in focus. - - iset -- integer index of data set starting at 1. - - Raises: pdffit.unassignedError when data set does not exist - """ - pdffit2.setdata(self._handle, iset) - return - - def psel(self, ip): - """psel(ip) --> Include phase ip in calculation of total PDF - - psel('ALL') selects all phases for PDF calculation. - - Raises: pdffit2.unassignedError if selected phase does not exist - """ - if isinstance(ip, six.string_types) and ip.upper() in self.selalias: - ip = self.selalias[ip.upper()] - pdffit2.psel(self._handle, ip) - return - - def pdesel(self, ip): - """pdesel(ip) --> Exclude phase ip from calculation of total PDF. - - pdesel('ALL') excludes all phases from PDF calculation. - - Raises: pdffit2.unassignedError if selected phase does not exist - """ - if isinstance(ip, six.string_types) and ip.upper() in self.selalias: - ip = self.selalias[ip.upper()] - pdffit2.pdesel(self._handle, ip) - return - - def selectAtomType(self, ip, ijchar, symbol, flag): - """Configure partial PDF - mark the specified atom type in phase ip - as included or excluded as a first or second in pair for distance - evaluation. - - ip -- phase index starting at 1 - ijchar -- 'i' or 'j' for first or second in pair - symbol -- element symbol - flag -- bool flag, True for selection, False for exclusion - - Raises: - pdffit2.unassignedError if selected phase does not exist - ValueError for invalid value of ijchar - """ - pdffit2.selectAtomType(self._handle, ip, six.b(ijchar), symbol, flag) - return - - def selectAtomIndex(self, ip, ijchar, aidx, flag): - """Configure partial PDF - mark the atom of given index in phase ip - as included or excluded as a first or second in pair for distance - evaluation. - - ip -- phase index starting at 1 - ijchar -- 'i' or 'j' for first or second in pair - aidx -- integer index of atom starting at 1 - flag -- bool flag, True for selection, False for exclusion - - Raises: - pdffit2.unassignedError if selected phase does not exist - ValueError if atom index or ijchar are invalid - """ - pdffit2.selectAtomIndex(self._handle, ip, six.b(ijchar), aidx, flag) - return - - def selectAll(self, ip, ijchar): - """Configure partial PDF - include all atoms of phase ip as first or - second element in pair for distance evaluation. - - ip -- phase index starting at 1 - ijchar -- 'i' or 'j' for first or second in pair - - Raises: - pdffit2.unassignedError if selected phase does not exist - ValueError if ijchar is invalid - """ - pdffit2.selectAll(self._handle, ip, six.b(ijchar)) - return - - def selectNone(self, ip, ijchar): - """Configure partial PDF - exclude all atoms of phase ip from first - or second element of pair distance evaluation. - - ip -- phase index starting at 1 - ijchar -- 'i' or 'j' for first or second in pair - - Raises: - pdffit2.unassignedError if selected phase does not exist - ValueError if ijchar is invalid - """ - pdffit2.selectNone(self._handle, ip, six.b(ijchar)) - return - - def bang(self, i, j, k): - """bang(i, j, k) --> Show bond angle defined by atoms i, j, k. - - No return value. Use bond_angle() to get the result. - - Raises: ValueError if selected atom(s) does not exist - pdffit.unassignedError when no structure has been loaded - """ - angle, stdev = pdffit2.bond_angle(self._handle, i, j, k) - # indices should be already checked here by bond_angle - atom_symbols = self.get_atoms() - leader = " %s (#%i) - %s (#%i) - %s (#%i) = " % ( - atom_symbols[i - 1], - i, - atom_symbols[j - 1], - j, - atom_symbols[k - 1], - k, - ) - s = leader + _format_value_std(angle, stdev) + " degrees" - print(s, file=output.stdout) - return - - def bond_angle(self, i, j, k): - """bond_angle(i, j, k) --> bond angle defined by atoms i, j, k. - Angle is calculated using the shortest ji and jk lengths with - respect to periodic boundary conditions. - - i, j, k -- atom indices starting at 1 - - Return a tuple of (angle, angle_error), both values are in degrees. - - Raises: ValueError if selected atom(s) does not exist - pdffit.unassignedError when no structure has been loaded - """ - rv = pdffit2.bond_angle(self._handle, i, j, k) - return rv - - def blen(self, *args): - """blen(i, j) --> Show bond length defined by atoms i and j. - - i -- index of the first atom starting at 1 - j -- index of the second atom starting at 1 - - No return value. Use bond_length_atoms() to retrieve result. - - Second form: - - blen(a1, a2, lb, ub) --> Show sorted lengths of all a1-a2 bonds. - - a1 -- symbol of the first element in pair or "ALL" - a2 -- symbol of the second element in pair or "ALL" - lb -- lower bond length boundary - ub -- upper bond length boundary - - No return value. Use bond_length_types() to retrieve results. - - Raises: ValueError if selected atom(s) does not exist - pdffit.unassignedError when no structure has been loaded - """ - # first form - if len(args) == 2: - dij, ddij = self.bond_length_atoms(*args[0:2]) - atom_symbols = self.get_atoms() - ij = (args[0], args[1]) - # indices were already checked in bond_length_atoms call - assert (0 <= min(ij) - 1) and (max(ij) - 1 < len(atom_symbols)) - symij = (atom_symbols[ij[0] - 1].upper(), atom_symbols[ij[1] - 1].upper()) - print(_format_bond_length(dij, ddij, ij, symij), file=output.stdout) - # second form - elif len(args) == 4: - a1, a2, lb, ub = args - try: - atom_types = self.get_atom_types() - if isinstance(a1, numbers.Integral): - a1 = atom_types[a1 - 1] - if isinstance(a2, numbers.Integral): - a2 = atom_types[a2 - 1] - except IndexError: - # index of non-existant atom type - return - # arguments are OK here, get bond length dictionary - bld = pdffit2.bond_length_types(self._handle, a1, a2, lb, ub) - s = "(%s,%s) bond lengths in [%gA,%gA] for current phase :" % (a1, a2, lb, ub) - print(s, file=output.stdout) - atom_symbols = self.get_atoms() - npts = len(bld["dij"]) - for idx in range(npts): - dij = bld["dij"][idx] - ddij = bld["ddij"][idx] - ij0 = bld["ij0"][idx] - ij1 = bld["ij1"][idx] - symij = (atom_symbols[ij0[0]], atom_symbols[ij0[1]]) - s = _format_bond_length(dij, ddij, ij1, symij) - print(s, file=output.stdout) - print(file=output.stdout) - if not bld["dij"]: - print(" *** No pairs found ***", file=output.stdout) - else: - emsg = "blen() takes 2 or 4 arguments (%i given)" % len(args) - raise TypeError(emsg) - # done - return - - def bond_length_atoms(self, i, j): - """bond_length_atoms(i, j) --> shortest distance between atoms i, j. - Periodic boundary conditions are applied to find the shortest bond. - - i -- index of the first atom starting at 1 - j -- index of the second atom starting at 1 - - Return a tuple of (distance, distance_error). - - Raises: ValueError if selected atom(s) does not exist - pdffit.unassignedError when no structure has been loaded. - """ - rv = pdffit2.bond_length_atoms(self._handle, i, j) - return rv - - def bond_length_types(self, a1, a2, lb, ub): - """bond_length_types(a1, a2, lb, ub) --> get all a1-a2 distances. - - a1 -- symbol of the first element in pair or "ALL" - a2 -- symbol of the second element in pair or "ALL" - lb -- lower bond length boundary - ub -- upper bond length boundary - - Return a dictionary of distance data containing - - dij : list of bond lenghts within given bounds - ddij : list of bond legnth standard deviations - ij0 : pairs of atom indices starting from 0 - ij1 : pairs of atom indices starting from 1 - - Raises: ValueError if selected atom(s) does not exist - pdffit.unassignedError when no structure has been loaded. - """ - rv = pdffit2.bond_length_types(self._handle, a1, a2, lb, ub) - return rv - - def show_scat(self, stype): - """show_scat(stype) --> Print scattering length for all atoms in - the current phase. - - stype -- 'X' (xray) or 'N' (neutron). - - Raises: pdffit2.unassignedError if no phase exists - """ - print(self.get_scat_string(stype), file=output.stdout) - return - - def get_scat_string(self, stype): - """get_scat_string(stype) --> Get string with scattering factors - of all atoms in the current phase. - - stype -- 'X' (xray) or 'N' (neutron). - - Raises: - pdffit2.unassignedError if no phase exists - - Returns: string with all scattering factors. - """ - return pdffit2.get_scat_string(self._handle, six.b(stype)) - - def get_scat(self, stype, element): - """get_scat(stype, element) --> Get active scattering factor for - given element. If scattering factor has been changed using - set_scat the result may depend on the active phase. When no - phase has been loaded, return the standard value. - - stype -- 'X' (xray) or 'N' (neutron). - element -- case-insensitive element symbol such as "Na" or "CL" - - Return float. - - Raises: - ValueError if element is not known. - """ - rv = pdffit2.get_scat(self._handle, six.b(stype), element) - return rv - - def set_scat(self, stype, element, value): - """set_scat(stype, element, value) --> Set custom scattering factor - for given element. The new scattering factor applies only for the - current phase, in other phases it keeps its default value. - - stype -- 'X' (xray) or 'N' (neutron). - element -- case-insensitive element symbol such as "Na" or "CL" - value -- new value of scattering factor - - No return value. - - Raises: - pdffit2.unassignedError if no phase exists. - ValueError if element is not known. - - See also reset_scat, get_scat. - """ - pdffit2.set_scat(self._handle, six.b(stype), element, value) - return - - def reset_scat(self, element): - """reset_scat(stype, element) --> Reset scattering factors for - given element to their standard values. The reset_scat applies - only for the current phase. - - element -- case-insensitive element symbol such as "Na" or "CL" - Raises: - pdffit2.unassignedError if no phase exists - ValueError if element is not known. - """ - pdffit2.reset_scat(self._handle, element) - return - - def num_atoms(self): - """num_atoms() --> Get number of atoms in current phase. - - Raises: pdffit2.unassignedError if no atoms exist - """ - return pdffit2.num_atoms(self._handle) - - def num_phases(self): - """num_phases() --> Number of phases loaded in PdfFit instance. - - Use setphase to bring a specific phase in focus. - - Return integer. - """ - n = pdffit2.num_phases(self._handle) - return n - - def num_datasets(self): - """num_datasets() --> Number of datasets loaded in PdfFit instance. - - Use setdata to bring a specific dataset in focus. - - Return integer. - """ - n = pdffit2.num_datasets(self._handle) - return n - - def phase_fractions(self): - """phase_fractions() --> relative phase fractions for current dataset. - Convert phase scale factors to relative phase fractions given the - scattering type of current dataset. - - Return a dictionary of phase fractions with following keys: - - "atom" -- list of fractions normalized to atom count - "stdatom" -- errors of atom count fractions - "cell" -- list of fractions normalized to unit cell count - "stdcell" -- errors of unit cell count fractions - "mass" -- list of relative weight fractions - "stdmass" -- errors of relative weight fractions - - Raises: pdffit2.unassignedError if no dataset exists. - """ - return pdffit2.phase_fractions(self._handle) - - # Begin refinable variables. - - def lat(n): - """lat(n) --> Get reference to lattice variable n. - - n can be an integer or a string representing the lattice variable. - 1 <==> 'a' - 2 <==> 'b' - 3 <==> 'c' - 4 <==> 'alpha' - 5 <==> 'beta' - 6 <==> 'gamma' - """ - LatParams = {"a": 1, "b": 2, "c": 3, "alpha": 4, "beta": 5, "gamma": 6} - if isinstance(n, six.string_types): - n = LatParams[n] - return "lat(%i)" % n - - lat = staticmethod(lat) - - def x(i): - """x(i) --> Get reference to x-value of atom i.""" - return "x(%i)" % i - - x = staticmethod(x) - - def y(i): - """y(i) --> Get reference to y-value of atom i.""" - return "y(%i)" % i - - y = staticmethod(y) - - def z(i): - """z(i) --> Get reference to z-value of atom i.""" - return "z(%i)" % i - - z = staticmethod(z) - - def u11(i): - """u11(i) --> Get reference to U(1,1) for atom i. - - U is the anisotropic thermal factor tensor. - """ - return "u11(%i)" % i - - u11 = staticmethod(u11) - - def u22(i): - """u22(i) --> Get reference to U(2,2) for atom i. - - U is the anisotropic thermal factor tensor. - """ - return "u22(%i)" % i - - u22 = staticmethod(u22) - - def u33(i): - """u33(i) --> Get reference to U(3,3) for atom i. - - U is the anisotropic thermal factor tensor. - """ - return "u33(%i)" % i - - u33 = staticmethod(u33) - - def u12(i): - """u12(i) --> Get reference to U(1,2) for atom i. - - U is the anisotropic thermal factor tensor. - """ - return "u12(%i)" % i - - u12 = staticmethod(u12) - - def u13(i): - """u13(i) --> Get reference to U(1,3) for atom i. - - U is the anisotropic thermal factor tensor. - """ - return "u13(%i)" % i - - u13 = staticmethod(u13) - - def u23(i): - """u23(i) --> Get reference to U(2,3) for atom i. - - U is the anisotropic thermal factor tensor. - """ - return "u23(%i)" % i - - u23 = staticmethod(u23) - - def occ(i): - """occ(i) --> Get reference to occupancy of atom i.""" - return "occ(%i)" % i - - occ = staticmethod(occ) - - def pscale(): - """pscale() --> Get reference to pscale. - - pscale is the fraction of the total structure that the current phase - represents. - """ - return "pscale" - - pscale = staticmethod(pscale) - - def sratio(): - """sratio() --> Get reference to sigma ratio. - - The sigma ratio determines the reduction in the Debye-Waller factor for - distances below rcut. - """ - return "sratio" - - sratio = staticmethod(sratio) - - def delta1(): - """delta1() --> Get reference to 1/R peak sharpening factor.""" - return "delta1" - - delta1 = staticmethod(delta1) - - def delta2(): - """delta2() --> Reference to (1/R^2) sharpening factor. - The phenomenological correlation constant in the Debye-Waller factor. - The (1/R^2) peak sharpening factor. - """ - return "delta2" - - delta2 = staticmethod(delta2) - - def dscale(): - """dscale() --> Get reference to dscale. - - The data scale factor. - """ - return "dscale" - - dscale = staticmethod(dscale) - - def qdamp(): - """qdamp() --> Get reference to qdamp. - - Qdamp controls PDF damping due to instrument Q-resolution. - """ - return "qdamp" - - qdamp = staticmethod(qdamp) - - def qbroad(): - """qbroad() --> Get reference to qbroad. - - Quadratic peak broadening factor. - """ - return "qbroad" - - qbroad = staticmethod(qbroad) - - def spdiameter(): - """spdiameter() --> Get reference to spdiameter (phase property). - - Diameter value for the spherical particle PDF correction. - Spherical envelope is not applied when spdiameter equals 0. - """ - return "spdiameter" - - spdiameter = staticmethod(spdiameter) - - def stepcut(): - """stepcut() --> Get reference to stepcut (phase property). - - stepcut is cutoff radius for empirical step-function PDF envelope. - stepcut can be used to approximate loss of pair correlations - in amorphous phase. stepcut cannot be refined. - - Step cutoff is not applied when stepcut equals 0. - """ - return "stepcut" - - stepcut = staticmethod(stepcut) - - def rcut(): - """rcut() --> Get reference to rcut. - - rcut is the value of r below which peak sharpening, defined by - the sigma ratio (sratio), applies. rcut cannot be refined. - """ - return "rcut" - - rcut = staticmethod(rcut) - - # End refinable variables. - - def __init__(self): - - self.stru_files = [] - self.data_files = [] - - self._handle = pdffit2.create() - self.intro() - return - - def __getRef(self, var_string): - """Return the actual reference to the variable in the var_string. - - This function must be called before trying to actually reference an - internal variable. See the constrain method for an example. - - Raises: - pdffit2.unassignedError if variable is not yet assigned - ValueError if variable index does not exist (e.g. lat(7)) - """ - var_string = _convertCallable(var_string) - arg_int = None - try: - method_string, arg_string = var_string.split("(") - method_string = method_string.strip() - arg_int = int(arg_string.strip(")").strip()) - except ValueError: # There is no arg_string - method_string = var_string.strip() - - f = getattr(pdffit2, method_string) - if arg_int is None: - retval = f(self._handle) - else: - retval = f(self._handle, arg_int) - return retval - - -# End of class PdfFit - - -# End of file diff --git a/diffpy/pdffit2/tests/ExceptionsTest.py b/diffpy/pdffit2/tests/ExceptionsTest.py deleted file mode 100644 index 5dee1b75..00000000 --- a/diffpy/pdffit2/tests/ExceptionsTest.py +++ /dev/null @@ -1,794 +0,0 @@ -#!/usr/bin/env python -############################################################################## -# -# pdffit2 by DANSE Diffraction group -# Simon J. L. Billinge -# (c) 2006 trustees of the Michigan State University. -# All rights reserved. -# -# File coded by: Chris Farrow -# -# See AUTHORS.txt for a list of people who contributed. -# See LICENSE.txt for license information. -# -############################################################################## - - -import unittest - -from diffpy.pdffit2 import PdfFit, pdffit2 -from diffpy.pdffit2.tests.pdffit2testutils import datafile - - -class read_structExceptions(unittest.TestCase): - def setUp(self): - self.P = PdfFit() - - def tearDown(self): - del self.P - - def test_IOError(self): - """raise IOError when structure file does not exist""" - self.assertRaises(IOError, self.P.read_struct, "Nofile.stru") - - def test_structureError(self): - """raise pdffit2.structureError when structure is malformed""" - self.assertRaises(pdffit2.structureError, self.P.read_struct, datafile("badNi.stru")) - - def test_structureErrorZeroVolume(self): - """raise pdffit2.structureError when unit cell volume is negative""" - # I don't know how to test for this, but it's in the library code - self.assertRaises(pdffit2.structureError, self.P.read_struct, datafile("badNiZeroVolume.stru")) - - -class read_dataExceptions(unittest.TestCase): - def setUp(self): - self.P = PdfFit() - - def tearDown(self): - del self.P - - def test_IOError(self): - """raise IOError when data file does not exist""" - self.assertRaises(IOError, self.P.read_data, "Nofile.dat", "X", 25.0, 0.5) - - def test_dataError(self): - """raise pdffit2.dataError when data has improper spacing""" - self.assertRaises(pdffit2.dataError, self.P.read_data, datafile("badNi.dat"), "X", 25.0, 0.5) - - -class read_data_listsExceptions(unittest.TestCase): - def setUp(self): - self.P = PdfFit() - self.r_data = [0.1, 0.2] - self.Gr_data = [1, 2, 3] - self.qmax = 10 - self.qdamp = 0.5 - - def tearDown(self): - del self.P - - def test_ValueError1(self): - """raise ValueError when lists are of different length""" - self.assertRaises( - ValueError, self.P.read_data_lists, "X", self.qmax, self.qdamp, self.r_data, self.Gr_data - ) - - def test_ValueError2(self): - """raise ValueError when qmax < 0""" - self.assertRaises( - ValueError, self.P.read_data_lists, "X", -self.qmax, self.qdamp, self.r_data, self.Gr_data - ) - - def test_ValueError3(self): - """raise ValueError when qdamp < 0""" - self.assertRaises( - ValueError, self.P.read_data_lists, "X", self.qmax, -self.qdamp, self.r_data, self.Gr_data - ) - - def test_dataError(self): - """raise pdffit2.dataError when data has improper spacing""" - r_data = [0.1, 0.52, 0.2] - self.assertRaises( - pdffit2.dataError, self.P.read_data_lists, "X", self.qmax, self.qdamp, r_data, self.Gr_data - ) - - -class pdfrangeExceptions(unittest.TestCase): - def setUp(self): - self.P = PdfFit() - self.iset = 1 - self.rmin = 4.0 - self.rmax = 10.0 - - def tearDown(self): - del self.P - - def test_ValueError1(self): - """raise ValueError when iset does not exist""" - self.assertRaises(ValueError, self.P.pdfrange, self.iset, self.rmin, self.rmax) - - def test_ValueError2(self): - """raise ValueError when rmax < rmin""" - self.P.read_data(datafile("Ni.dat"), "X", 25.0, 0.5) - self.assertRaises(ValueError, self.P.pdfrange, self.iset, self.rmax, self.rmin) - - def test_ValueError3(self): - """raise ValueError when range outside of data""" - self.P.read_data(datafile("Ni.dat"), "X", 25.0, 0.5) - self.assertRaises(ValueError, self.P.pdfrange, self.iset, -self.rmin, self.rmax) - - -class allocExceptions(unittest.TestCase): - def setUp(self): - self.P = PdfFit() - self.qmax = 25 - self.qdamp = 0.5 - self.rmin = 4.0 - self.rmax = 10.0 - self.bin = 100 - - def tearDown(self): - del self.P - - def test_ValueError1(self): - """raise ValueError when qmax < 0""" - self.P.read_struct(datafile("Ni.stru")) - self.assertRaises(ValueError, self.P.alloc, "X", -self.qmax, self.qdamp, self.rmin, self.rmax, self.bin) - - def test_ValueError2(self): - """raise ValueError when qdamp < 0""" - self.P.read_struct(datafile("Ni.stru")) - self.assertRaises(ValueError, self.P.alloc, "X", self.qmax, -self.qdamp, self.rmin, self.rmax, self.bin) - - def test_ValueError3(self): - """raise ValueError when rmin < 0""" - self.P.read_struct(datafile("Ni.stru")) - self.assertRaises(ValueError, self.P.alloc, "X", self.qmax, self.qdamp, -self.rmin, self.rmax, self.bin) - - def test_ValueError4(self): - """raise ValueError when rmax < 0""" - self.P.read_struct(datafile("Ni.stru")) - self.assertRaises(ValueError, self.P.alloc, "X", self.qmax, self.qdamp, self.rmin, -self.rmax, self.bin) - - def test_ValueError5(self): - """raise ValueError when bin < 0""" - self.P.read_struct(datafile("Ni.stru")) - self.assertRaises(ValueError, self.P.alloc, "X", self.qmax, self.qdamp, self.rmin, self.rmax, -self.bin) - - def test_ValueError6(self): - """raise ValueError when rmax < rmin""" - self.P.read_struct(datafile("Ni.stru")) - self.assertRaises(ValueError, self.P.alloc, "X", self.qmax, self.qdamp, self.rmax, self.rmin, self.bin) - - def test_ValueError7(self): - """raise ValueError when qdamp < 0""" - self.P.read_struct(datafile("Ni.stru")) - self.assertRaises(ValueError, self.P.alloc, "X", self.qmax, self.qdamp, self.rmin, self.rmax, -self.bin) - - -class calcExceptions(unittest.TestCase): - def setUp(self): - self.P = PdfFit() - self.P.read_struct(datafile("Ni.stru")) - - def tearDown(self): - del self.P - - def test_unassignedError(self): - """raise pdffit2.unassignedError when no space has been allocated""" - self.assertRaises(pdffit2.unassignedError, self.P.calc) - - -# PJ 2006-03-06 -# -# test_calculationError raised exception, because for Qmax=0.5, rmax would -# increase to 4010A and this would throw exception when the size of bnd array -# would exceed MAXBND limit. However, bnd vector can now grow, thus rmax -# is not limited and the following test would hang indefinitely. - -# def test_calculationError(self): -# """raise pdffit2.calculationError when calculation cannot be done""" -# self.P.alloc('X', 0.01, 0.5, 2, 10, 100) -# self.assertRaises(pdffit2.calculationError, self.P.calc) - - -# class refineExceptions(unittest.TestCase): -# I'm not sure how to test these - -# def setUp(self): -# self.P = PdfFit() -# -# def test_calculationError(self): -# """raise pdffit2.calculationError when model pdf can't be calculated""" -# #self.assertRaises(pdffit2.calculationError, self.P.calc) -# -# def test_constraintError(self): -# """raise pdffit2.constraintError for bad constraint(s)""" -# #self.assertRaises(pdffit2.constraintError, self.P.calc) - - -# class refine_stepExceptions(unittest.TestCase): -# I'm not sure how to test these - -# def setUp(self): -# self.P = PdfFit() -# -# def test_calculationError(self): -# """raise pdffit2.calculationError when model pdf can't be calculated""" -# #self.assertRaises(pdffit2.calculationError, self.P.calc) -# -# def test_constraintError(self): -# """raise pdffit2.constraintError for bad constraint(s)""" -# #self.assertRaises(pdffit2.constraintError, self.P.calc) - - -class save_pdfExceptions(unittest.TestCase): - def setUp(self): - self.P = PdfFit() - self.strufile = "temp.pdf" - - def tearDown(self): - del self.P - - def test_IOError(self): - """raise IOError when structure cannot be saved""" - self.P.read_struct(datafile("Ni.stru")) - self.P.alloc("X", 30.0, 0.05, 2, 10, 100) - self.P.calc() - self.assertRaises(IOError, self.P.save_pdf, 1, "nodir183160/" + self.strufile) - - def test_unassignedError(self): - """raise pdffit2.unassignedError when structure is undefined""" - self.assertRaises(pdffit2.unassignedError, self.P.save_pdf, 1, self.strufile) - - -class save_difExceptions(unittest.TestCase): - def setUp(self): - self.P = PdfFit() - self.strufile = "temp.dif" - - def tearDown(self): - del self.P - - def test_IOError(self): - """raise IOError when dif cannot be saved""" - self.P.read_struct(datafile("Ni.stru")) - self.P.alloc("X", 30.0, 0.05, 2, 10, 100) - self.P.calc() - self.P.read_data(datafile("Ni.dat"), "X", 25.0, 0.5) - self.assertRaises(IOError, self.P.save_dif, 1, "nodir183160/" + self.strufile) - - def test_unassignedError(self): - """raise pdffit2.unassignedError when structure is undefined""" - self.assertRaises(pdffit2.unassignedError, self.P.save_dif, 1, self.strufile) - - -class save_resExceptions(unittest.TestCase): - def setUp(self): - self.P = PdfFit() - self.resfile = "temp.res" - - def tearDown(self): - del self.P - - def test_IOError(self): - """raise IOError when residual file cannot be saved""" - self.P.read_struct(datafile("Ni.stru")) - self.P.read_data(datafile("Ni.dat"), "X", 30.0, 0.0) - self.P.constrain(self.P.lat(1), 1) - self.P.setpar(1, 3.0) - self.P.pdfrange(1, 2.0, 10.0) - self.P.refine_step() - self.assertRaises(IOError, self.P.save_res, "nodir183160/" + self.resfile) - - def test_unassignedError(self): - """raise pdffit2.unassignedError when structure is undefined""" - self.assertRaises(pdffit2.unassignedError, self.P.save_res, self.resfile) - - -class save_structExceptions(unittest.TestCase): - # Same code as show_struct - - def setUp(self): - self.P = PdfFit() - self.strufile = "temp.stru" - - def tearDown(self): - del self.P - - def test_IOError(self): - """raise IOError when structure cannot be saved""" - self.P.read_struct(datafile("Ni.stru")) - self.assertRaises(IOError, self.P.save_struct, 1, "nodir183160/" + self.strufile) - - def test_unassignedError(self): - """raise pdffit2.unassignedError when structure is undefined""" - self.assertRaises(pdffit2.unassignedError, self.P.save_struct, 1, self.strufile) - - -class constrainExceptions(unittest.TestCase): - def setUp(self): - self.P = PdfFit() - self.par = 1 - return - - def tearDown(self): - self.P = None - return - - def test_constraintError(self): - """raise constraintError when constraint is bad""" - self.P.read_struct(datafile("Ni.stru")) - self.P.read_data(datafile("Ni.dat"), "X", 25.0, 0.0) - self.P.constrain("x(1)", "junk+@1") - self.P.setpar(1, 0.01) - self.assertRaises(pdffit2.constraintError, self.P.calc) - self.assertRaises(pdffit2.constraintError, self.P.refine) - return - - def test_unassignedError(self): - """raise pdffit2.unassignedError when variable is undefined""" - self.assertRaises(pdffit2.unassignedError, self.P.constrain, self.P.x(1), self.par) - return - - def test_ValueError(self): - """raise ValueError when a variable index does not exist""" - self.P.read_struct(datafile("Ni.stru")) - self.assertRaises(ValueError, self.P.constrain, self.P.x(6), self.par) - return - - def test_constrainNonRefVar(self): - "raise constraintError when attempting to constrain non-refinables" - self.P.read_struct(datafile("Ni.stru")) - self.P.read_data(datafile("Ni.dat"), "X", 25.0, 0.0) - self.assertRaises(pdffit2.constraintError, self.P.constrain, "rcut", "@7") - self.assertRaises(pdffit2.constraintError, self.P.constrain, "rcut", 13) - self.assertRaises(pdffit2.constraintError, self.P.constrain, "stepcut", "@17") - return - - -class setvarExceptions(unittest.TestCase): - def setUp(self): - self.P = PdfFit() - self.val = 3.0 - - def tearDown(self): - del self.P - - def test_unassignedError(self): - """raise pdffit2.unassignedError when variable is undefined""" - self.assertRaises(pdffit2.unassignedError, self.P.setvar, self.P.lat(1), self.val) - - def test_ValueError(self): - """raise ValueError when a variable index does not exist""" - self.P.read_struct(datafile("Ni.stru")) - self.assertRaises(ValueError, self.P.setvar, self.P.lat(7), self.val) - - -class getvarExceptions(unittest.TestCase): - def setUp(self): - self.P = PdfFit() - - def tearDown(self): - del self.P - - def test_unassignedError(self): - """raise pdffit2.unassignedError when variable is undefined""" - self.assertRaises(pdffit2.unassignedError, self.P.getvar, self.P.pscale()) - - def test_ValueError(self): - """raise ValueError when a variable index does not exist""" - self.P.read_struct(datafile("Ni.stru")) - self.assertRaises(ValueError, self.P.getvar, self.P.lat(7)) - - -class getRExceptions(unittest.TestCase): - def setUp(self): - self.P = PdfFit() - - def tearDown(self): - del self.P - - def test_unassignedError(self): - """raise pdffit2.unassignedError when data does not exist""" - self.assertRaises(pdffit2.unassignedError, self.P.getR) - - -class getpdf_fitExceptions(unittest.TestCase): - def setUp(self): - self.P = PdfFit() - - def tearDown(self): - del self.P - - def test_unassignedError(self): - """raise pdffit2.unassignedError when data does not exist""" - self.assertRaises(pdffit2.unassignedError, self.P.getpdf_fit) - - -class getpdf_obsExceptions(unittest.TestCase): - def setUp(self): - self.P = PdfFit() - - def tearDown(self): - del self.P - - def test_unassignedError(self): - """raise pdffit2.unassignedError when data does not exist""" - self.assertRaises(pdffit2.unassignedError, self.P.getpdf_obs) - - -class getpdf_diffExceptions(unittest.TestCase): - def setUp(self): - self.P = PdfFit() - - def tearDown(self): - del self.P - - def test_unassignedError(self): - """raise pdffit2.unassignedError when data does not exist""" - self.assertRaises(pdffit2.unassignedError, self.P.getpdf_diff) - - -class get_atomsExceptions(unittest.TestCase): - def setUp(self): - self.P = PdfFit() - - def tearDown(self): - del self.P - - def test_unassignedError(self): - """raise pdffit2.unassignedError when data does not exist""" - self.assertRaises(pdffit2.unassignedError, self.P.get_atoms) - - -class getparExceptions(unittest.TestCase): - def setUp(self): - self.P = PdfFit() - - def tearDown(self): - del self.P - - def test_unassignedError1(self): - """raise pdffit2.unassignedError when parameter does not exist""" - self.assertRaises(pdffit2.unassignedError, self.P.getpar, 1) - - def test_unassignedError2(self): - """raise pdffit2.unassignedError when parameter does not exist""" - self.P.read_struct(datafile("Ni.stru")) - self.P.constrain(self.P.lat(1), 2) - self.assertRaises(pdffit2.unassignedError, self.P.getpar, 1) - - -class pselExceptions(unittest.TestCase): - def setUp(self): - self.P = PdfFit() - self.ip = 1 - - def tearDown(self): - del self.P - - def test_unassignedError(self): - """raise pdffit2.unassignedError when phase does not exist""" - self.assertRaises(pdffit2.unassignedError, self.P.pdesel, self.ip) - - def test_unassignedError2(self): - """raise pdffit2.unassignedError when phase does not exist""" - self.assertRaises(pdffit2.unassignedError, self.P.pdesel, self.ip) - - -class pdeselExceptions(unittest.TestCase): - def setUp(self): - self.P = PdfFit() - self.ip = 1 - - def tearDown(self): - del self.P - - def test_unassignedError1(self): - """raise pdffit2.unassignedError when phase does not exist""" - self.assertRaises(pdffit2.unassignedError, self.P.pdesel, self.ip) - - def test_unassignedError2(self): - """raise pdffit2.unassignedError when phase does not exist""" - self.P.read_struct(datafile("Ni.stru")) - self.assertRaises(pdffit2.unassignedError, self.P.pdesel, self.ip) - - -class selectAtomTypeExceptions(unittest.TestCase): - def setUp(self): - self.P = PdfFit() - self.iset = 1 - self.i = 1 - - def tearDown(self): - del self.P - - def test_unassignedError1(self): - """raise pdffit2.unassignedError when set does not exist""" - self.assertRaises(pdffit2.unassignedError, self.P.selectAtomType, self.iset, "i", "Ni", True) - - def test_unassignedError2(self): - """raise pdffit2.unassignedError when set does not exist""" - self.P.read_struct(datafile("Ni.stru")) - # selectAtomType should pass with one phase defined - self.P.read_data(datafile("Ni.dat"), "X", 25.0, 0.0) - self.P.selectAtomType(self.iset, "i", "Ni", True) - self.P.selectAtomType(self.iset, "j", "Ni", False) - # but fail for phase 2 which is not present - self.assertRaises(pdffit2.unassignedError, self.P.selectAtomType, 2, "i", "Ca", True) - - def test_ijcharValueError(self): - """raise ValueError when ijchar is neither 'i' nor 'j'""" - self.P.read_struct(datafile("Ni.stru")) - self.P.read_data(datafile("Ni.dat"), "X", 25.0, 0.0) - self.P.selectAtomType(self.iset, "i", "Ni", True) - self.P.selectAtomType(self.iset, "j", "Ni", True) - self.assertRaises(ValueError, self.P.selectAtomType, self.iset, "k", "Ni", True) - - -class selectAtomIndexExceptions(unittest.TestCase): - def setUp(self): - self.P = PdfFit() - self.iset = 1 - self.i = 1 - - def tearDown(self): - del self.P - - def test_unassignedError1(self): - """raise pdffit2.unassignedError when set does not exist""" - self.assertRaises(pdffit2.unassignedError, self.P.selectAtomIndex, self.iset, "i", self.i, True) - - def test_unassignedError2(self): - """raise pdffit2.unassignedError when set does not exist""" - self.P.read_struct(datafile("Ni.stru")) - # pass for phase 1 - self.P.read_data(datafile("Ni.dat"), "X", 25.0, 0.0) - self.P.selectAtomIndex(self.iset, "i", 1, True) - self.P.selectAtomIndex(self.iset, "i", 2, False) - # fail for phase 2 - self.assertRaises(pdffit2.unassignedError, self.P.selectAtomIndex, 2, "i", 1, True) - - def test_ValueError(self): - """raise ValueError when selected atom does not exist""" - self.P.read_struct(datafile("Ni.stru")) - self.P.read_data(datafile("Ni.dat"), "X", 25.0, 0.0) - self.assertRaises(ValueError, self.P.selectAtomIndex, self.iset, "i", 6, True) - - -class selectAllExceptions(unittest.TestCase): - def setUp(self): - self.P = PdfFit() - self.iset = 1 - self.i = 1 - - def tearDown(self): - del self.P - - def test_unassignedError1(self): - """raise pdffit2.unassignedError when set does not exist""" - self.assertRaises(pdffit2.unassignedError, self.P.selectAll, self.iset, "i") - - def test_unassignedError2(self): - """raise pdffit2.unassignedError when set does not exist""" - self.P.read_struct(datafile("Ni.stru")) - # fail when there is no dataset - self.assertRaises(pdffit2.unassignedError, self.P.selectAll, self.iset, "i") - # pass with dataset - self.P.read_data(datafile("Ni.dat"), "X", 25.0, 0.0) - self.P.selectAll(self.iset, "i") - self.P.selectAll(self.iset, "j") - # fail for phase 2 - self.assertRaises(pdffit2.unassignedError, self.P.selectAll, 2, "i") - self.assertRaises(pdffit2.unassignedError, self.P.selectAll, 2, "j") - - -class selectNoneExceptions(unittest.TestCase): - def setUp(self): - self.P = PdfFit() - self.iset = 1 - self.i = 1 - - def tearDown(self): - del self.P - - def test_unassignedError1(self): - """raise pdffit2.unassignedError when set does not exist""" - self.assertRaises(pdffit2.unassignedError, self.P.selectNone, self.iset, "i") - - def test_unassignedError2(self): - """raise pdffit2.unassignedError when set does not exist""" - self.P.read_struct(datafile("Ni.stru")) - # fail when there is no dataset - self.assertRaises(pdffit2.unassignedError, self.P.selectNone, self.iset, "i") - # pass with dataset - self.P.read_data(datafile("Ni.dat"), "X", 25.0, 0.0) - self.P.selectNone(self.iset, "i") - self.P.selectNone(self.iset, "j") - # fail for phase 2 - self.assertRaises(pdffit2.unassignedError, self.P.selectNone, 2, "i") - self.assertRaises(pdffit2.unassignedError, self.P.selectNone, 2, "j") - - -class bangExceptions(unittest.TestCase): - def setUp(self): - self.P = PdfFit() - self.a1 = 1 - self.a2 = 2 - self.a3 = 3 - - def tearDown(self): - del self.P - - def test_unassignedError(self): - """raise pdffit2.unassignedError when phase does not exist""" - self.assertRaises(pdffit2.unassignedError, self.P.bang, self.a1, self.a2, self.a3) - - def test_ValueError1(self): - """raise ValueError when selected atom(s) does not exist""" - self.P.read_struct(datafile("Ni.stru")) - self.P.read_data(datafile("Ni.dat"), "X", 25.0, 0.0) - self.assertRaises(ValueError, self.P.bang, 0, self.a2, self.a3) - - def test_ValueError2(self): - """raise ValueError when selected atom(s) does not exist""" - self.P.read_struct(datafile("Ni.stru")) - self.assertRaises(ValueError, self.P.bang, self.a1, -1, self.a3) - - def test_ValueError3(self): - """raise ValueError when selected atom(s) does not exist""" - self.P.read_struct(datafile("Ni.stru")) - self.assertRaises(ValueError, self.P.bang, self.a1, self.a2, 6) - - -class blenExceptions(unittest.TestCase): - def setUp(self): - self.P = PdfFit() - self.a1 = 1 - self.a2 = 2 - - def tearDown(self): - del self.P - - def test_unassignedError(self): - """raise pdffit2.unassignedError when no data exists""" - self.assertRaises(pdffit2.unassignedError, self.P.blen, self.a1, self.a2) - - def test_ValueError1(self): - """raise ValueError when selected atom(s) does not exist""" - self.P.read_struct(datafile("Ni.stru")) - self.assertRaises(ValueError, self.P.blen, 0, self.a2) - - def test_ValueError2(self): - """raise ValueError when selected atom(s) does not exist""" - self.P.read_struct(datafile("Ni.stru")) - self.assertRaises(ValueError, self.P.blen, self.a1, 6) - - def test_ValueError3(self): - """raise ValueError when selected atom(s) does not exist""" - self.P.read_struct(datafile("Ni.stru")) - self.assertRaises(ValueError, self.P.blen, 0, 6) - - -class show_scatExceptions(unittest.TestCase): - def setUp(self): - self.P = PdfFit() - - def tearDown(self): - del self.P - - def test_unassignedError(self): - """raise pdffit2.unassignedError when phase does not exist""" - self.assertRaises(pdffit2.unassignedError, self.P.show_scat, "X") - - -# class set_scatExceptions(unittest.TestCase): -# I'm not sure how to use this function - -# def setUp(self): -# self.P = PdfFit() -# -# def test_unassignedError1(self): -# """raise pdffit2.unassignedError when phase does not exist""" -# #self.assertRaises(pdffit2.constraintError, self.P.calc) -# -# def test_unassignedError2(self): -# """raise pdffit2.unassignedError when phase does not exist""" -# #self.assertRaises(pdffit2.constraintError, self.P.calc) -# -# def test_ValueError(self): -# """raise pdffit2.unassignedError when selected atom does not exist""" -# #self.assertRaises(pdffit2.constraintError, self.P.calc) - - -class num_atomsExceptions(unittest.TestCase): - def setUp(self): - self.P = PdfFit() - - def tearDown(self): - del self.P - - def test_unassignedError(self): - """raise pdffit2.unassignedError when no atoms exist""" - self.assertRaises(pdffit2.unassignedError, self.P.num_atoms) - - -class fixparExceptions(unittest.TestCase): - def setUp(self): - self.P = PdfFit() - - def tearDown(self): - del self.P - - def test_unassignedError(self): - """raise pdffit2.unassignedError when parameter does not exist""" - self.P.read_struct(datafile("Ni.stru")) - self.P.read_data(datafile("Ni.dat"), "X", 25.0, 0.0) - self.assertRaises(pdffit2.unassignedError, self.P.fixpar, 1) - - -class freeparExceptions(unittest.TestCase): - def setUp(self): - self.P = PdfFit() - - def tearDown(self): - del self.P - - def test_unassignedError(self): - """raise pdffit2.unassignedError when parameter does not exist""" - self.P.read_struct(datafile("Ni.stru")) - self.P.read_data(datafile("Ni.dat"), "X", 25.0, 0.0) - self.assertRaises(pdffit2.unassignedError, self.P.freepar, 1) - - -class setphaseExceptions(unittest.TestCase): - def setUp(self): - self.P = PdfFit() - - def tearDown(self): - del self.P - - def test_unassignedError(self): - """raise pdffit2.unassignedError when phase does not exist""" - self.P.read_struct(datafile("Ni.stru")) - self.P.read_data(datafile("Ni.dat"), "X", 25.0, 0.0) - self.assertRaises(pdffit2.unassignedError, self.P.setphase, 2) - - -class setdataExceptions(unittest.TestCase): - def setUp(self): - self.P = PdfFit() - - def tearDown(self): - del self.P - - def test_unassignedError(self): - """raise pdffit2.unassignedError when data set does not exist""" - self.P.read_struct(datafile("Ni.stru")) - self.P.read_data(datafile("Ni.dat"), "X", 25.0, 0.0) - self.assertRaises(pdffit2.unassignedError, self.P.setdata, 2) - - -class getcrwExceptions(unittest.TestCase): - def setUp(self): - self.P = PdfFit() - - def tearDown(self): - del self.P - - def test_unassignedError(self): - """raise pdffit2.unassignedError when data does not exist""" - self.assertRaises(pdffit2.unassignedError, self.P.getcrw) - - -# main -if __name__ == "__main__": - # suite = unittest.makeSuite(num_atomsExceptions) - # unittest.TextTestRunner(verbosity=3).run(suite) - # testcase = calcExceptions('test_unassignedError') - # unittest.TextTestRunner(verbosity=3).run(testcase) - unittest.main() - -# End of file diff --git a/diffpy/pdffit2/tests/TestPdfFit.py b/diffpy/pdffit2/tests/TestPdfFit.py deleted file mode 100644 index 70712356..00000000 --- a/diffpy/pdffit2/tests/TestPdfFit.py +++ /dev/null @@ -1,761 +0,0 @@ -#!/usr/bin/env python - -"""Unit tests for PdfFit.py -""" - -import unittest - -from diffpy.pdffit2 import PdfFit, pdffit2 -from diffpy.pdffit2.tests.pdffit2testutils import capture_output, datafile -from diffpy.structure import loadStructure - -# ---------------------------------------------------------------------------- - - -class TestPdfFit(unittest.TestCase): - places = 6 - - def setUp(self): - self.P = PdfFit() - return - - def tearDown(self): - del self.P - return - - def test__exportAll(self): - "check PdfFit._exportAll()" - ns = {} - self.P._exportAll(ns) - self.assertEqual("ALL", ns["ALL"]) - self.assertEqual("FSQR", ns["FSQR"]) - self.assertEqual("N", ns["N"]) - self.assertIs("N", ns["N"]) - self.assertIs(self.P.lat, ns["lat"]) - self.assertEqual(self.P.reset, ns["reset"]) - return - - # def test_intro(self): - # """check PdfFit.intro() - # """ - # return - - def test_add_structure(self): - """check PdfFit.add_structure()""" - ni = loadStructure(datafile("Ni.stru")) - self.P.add_structure(ni) - self.assertEqual(4, self.P.num_atoms()) - return - - # def test_read_struct(self): - # """check PdfFit.read_struct() - # """ - # return - # - # def test_read_struct_string(self): - # """check PdfFit.read_struct_string() - # """ - # return - # - # def test_read_data(self): - # """check PdfFit.read_data() - # """ - # return - - def test_read_data_string(self): - """check PdfFit.read_data_string()""" - pf = self.P - with open(datafile("300K.gr")) as fp: - s = fp.read() - self.assertEqual([], pf.data_files) - pf.read_data_string(s, "N", 32, 0.03, "lmo") - self.assertEqual(1, len(pf.data_files)) - gobs = pf.getpdf_obs() - self.assertEqual(2000, len(gobs)) - self.assertEqual(0.384, gobs[-1]) - self.assertEqual(0.03, pf.getvar("qdamp")) - return - - # def test_read_data_lists(self): - # """check PdfFit.read_data_lists() - # """ - # return - # - # def test_pdfrange(self): - # """check PdfFit.pdfrange() - # """ - # return - # - # def test_reset(self): - # """check PdfFit.reset() - # """ - # return - - def test_alloc(self): - """check PdfFit.alloc()""" - # alloc and read_struct can be called in any order. - self.P.alloc("X", 25, 0.0, 0.01, 10, 1000) - # without a structure calculated PDF is all zero - self.P.calc() - Gzero = self.P.getpdf_fit() - self.assertEqual(1000 * [0.0], Gzero) - self.P.read_struct(datafile("Ni.stru")) - self.P.calc() - # check r-values - r = self.P.getR() - self.assertEqual(1000, len(r)) - for i in range(1000): - self.assertAlmostEqual(0.01 * (i + 1), r[i], self.places) - Gfit_alloc_read = self.P.getpdf_fit() - # now try the other order - self.P.reset() - self.P.read_struct(datafile("Ni.stru")) - self.P.alloc("X", 25, 0.0, 0.01, 10, 1000) - self.P.calc() - Gfit_read_alloc = self.P.getpdf_fit() - # and they should be the same - self.assertEqual(Gfit_read_alloc, Gfit_alloc_read) - return - - # def test_calc(self): - # """check PdfFit.calc() - # """ - # return - # - # def test_refine(self): - # """check PdfFit.refine() - # """ - # return - # - # def test_refine_step(self): - # """check PdfFit.refine_step() - # """ - # return - # - # def test_save_pdf(self): - # """check PdfFit.save_pdf() - # """ - # return - # - # def test_save_pdf_string(self): - # """check PdfFit.save_pdf_string() - # """ - # return - # - # def test_save_dif(self): - # """check PdfFit.save_dif() - # """ - # return - # - # def test_save_dif_string(self): - # """check PdfFit.save_dif_string() - # """ - # return - # - # def test_save_res(self): - # """check PdfFit.save_res() - # """ - # return - # - # def test_save_res_string(self): - # """check PdfFit.save_res_string() - # """ - # return - - def test_get_structure(self): - """check PdfFit.get_structure()""" - self.P.read_struct(datafile("Ni.stru")) - self.P.read_struct(datafile("PbScW25TiO3.stru")) - stru1 = self.P.get_structure(1) - self.assertEqual(4, len(stru1)) - self.assertEqual("Ni", stru1[0].element) - stru2 = self.P.get_structure(2) - self.assertEqual(56, len(stru2)) - self.assertEqual("Ti", stru2[-1].element) - return - - # def test_save_struct(self): - # """check PdfFit.save_struct() - # """ - # return - # - # def test_save_struct_string(self): - # """check PdfFit.save_struct_string() - # """ - # return - # - # def test_show_struct(self): - # """check PdfFit.show_struct() - # """ - # return - # - # def test_constrain(self): - # """check PdfFit.constrain() - # """ - # return - - def test_setpar(self): - """check PdfFit.setpar()""" - pf = self.P - pf.read_struct(datafile("Ni.stru")) - pf.setpar(1, "lat(1)") - self.assertEqual(3.52, pf.getpar(1)) - pf.setpar(1, 4.0) - self.assertEqual(4, pf.getpar(1)) - pf.setpar(1, pf.lat("a")) - self.assertEqual(3.52, pf.getpar(1)) - return - - def test_setvar(self): - """check PdfFit.setvar()""" - pf = self.P - pf.read_struct(datafile("Ni.stru")) - pf.setvar(pf.delta1, 1.2) - self.assertEqual(1.2, pf.getvar(pf.delta1)) - pf.setvar("delta1", 1.7) - self.assertEqual(1.7, pf.getvar("delta1")) - return - - # def test_getvar(self): - # """check PdfFit.getvar() - # """ - # return - # - # def test_getrw(self): - # """check PdfFit.getrw() - # """ - # return - # - # def test_getR(self): - # """check PdfFit.getR() - # """ - # return - # - # def test_getpdf_fit(self): - # """check PdfFit.getpdf_fit() - # """ - # return - # - # def test_getpdf_obs(self): - # """check PdfFit.getpdf_obs() - # """ - # return - # - # def test_getpdf_diff(self): - # """check PdfFit.getpdf_diff() - # """ - # return - - def test_get_atoms(self): - """check PdfFit.get_atoms()""" - self.P.read_struct(datafile("Ni.stru")) - self.P.read_struct(datafile("PbScW25TiO3.stru")) - self.P.setphase(1) - a1 = self.P.get_atoms() - a2 = self.P.get_atoms(2) - self.assertEqual(4 * ["NI"], a1) - self.assertEqual(8 * ["PB"] + 24 * ["O"] + 8 * ["SC"] + 8 * ["W"] + 8 * ["TI"], a2) - return - - def test_get_atom_types(self): - """check PdfFit.get_atom_types()""" - self.P.read_struct(datafile("Ni.stru")) - self.P.read_struct(datafile("PbScW25TiO3.stru")) - self.P.setphase(1) - atp1 = self.P.get_atom_types() - atp2 = self.P.get_atom_types(2) - self.assertEqual(["NI"], atp1) - self.assertEqual(["PB", "O", "SC", "W", "TI"], atp2) - return - - def test_num_phases(self): - """check PdfFit.num_phases()""" - self.assertEqual(0, self.P.num_phases()) - self.P.read_struct(datafile("Ni.stru")) - self.assertEqual(1, self.P.num_phases()) - self.P.read_struct(datafile("PbScW25TiO3.stru")) - self.assertEqual(2, self.P.num_phases()) - self.P.reset() - self.assertEqual(0, self.P.num_phases()) - return - - def test_num_datasets(self): - """check PdfFit.num_datasets()""" - self.assertEqual(0, self.P.num_datasets()) - self.P.read_data(datafile("Ni.dat"), "X", 25.0, 0.5) - self.assertEqual(1, self.P.num_datasets()) - # failed data should not increase num_datasets - try: - self.P.read_data(datafile("badNi.dat")) - except (RuntimeError, TypeError, NameError, ValueError, IOError): - pass - self.assertEqual(1, self.P.num_datasets()) - # alloc should increase number of datasets - # alloc requires a loaded structure - self.P.read_struct(datafile("Ni.stru")) - self.P.alloc("X", 30.0, 0.05, 2, 10, 100) - self.assertEqual(2, self.P.num_datasets()) - self.P.reset() - self.assertEqual(0, self.P.num_datasets()) - return - - def test_getcrw(self): - """check PdfFit.getcrw()""" - import numpy - - self.assertEqual(0, self.P.num_datasets()) - # Setting qmax=0 so that partial crw are not disturbed by - # termination ripples. - self.P.read_data(datafile("Ni.dat"), "X", 0.0, 0.0) - # crw is empty before data refinement - self.assertEqual([], self.P.getcrw()) - self.P.read_struct(datafile("Ni.stru")) - self.P.pdfrange(1, 2, 19) - self.P.refine() - crw19 = numpy.array(self.P.getcrw()) - self.assertTrue(numpy.all(crw19 >= 0.0)) - # check that crw19 is non decreasing - self.assertTrue(numpy.all(numpy.diff(crw19) >= 0.0)) - # check that crw19 and getrw give the same value - rw19 = crw19[-1] - self.assertAlmostEqual(self.P.getrw(), rw19, self.places) - # renormalize cumulative Rw and compare with Rw at r=15 - Gobs19 = numpy.array(self.P.getpdf_obs()) - Gnorm19 = numpy.sqrt(numpy.sum(Gobs19**2)) - r = numpy.array(self.P.getR()) - idx = numpy.nonzero(r <= 15)[0] - Gnorm15 = numpy.sqrt(numpy.sum(Gobs19[idx] ** 2)) - i15 = idx[-1] - rw15 = crw19[i15] * Gnorm19 / Gnorm15 - self.P.pdfrange(1, 2, r[i15] + 1e-5) - self.P.refine() - self.assertAlmostEqual(self.P.getrw(), rw15, self.places) - return - - def test_getcrw_two_datasets(self): - """check that getcrw() and getrw() are consistent for two datasets.""" - self.P.read_data(datafile("Ni.dat"), "X", 25.0, 0.0) - self.P.pdfrange(1, 2, 8) - self.P.read_data(datafile("300K.gr"), "N", 32.0, 0.0) - self.P.pdfrange(2, 1, 11) - self.P.read_struct(datafile("Ni.stru")) - # mess lattice parameters to have comparable Rw contributions - self.P.setvar("lat(1)", 3) - self.P.setvar("lat(2)", 3) - self.P.setvar("lat(3)", 3) - self.P.refine() - rwtot = self.P.getrw() - self.assertTrue(rwtot > 0.0) - self.P.setdata(1) - rw1 = self.P.getcrw()[-1] - self.P.setdata(2) - rw2 = self.P.getcrw()[-1] - self.assertAlmostEqual(rwtot**2, rw1**2 + rw2**2, self.places) - return - - # def test_getpar(self): - # """check PdfFit.getpar() - # """ - # return - - def test_fixpar(self): - """check PdfFit.fixpar()""" - self.P.fixpar("all") - self.assertRaises(TypeError, self.P.fixpar, "x") - return - - def test_freepar(self): - """check PdfFit.freepar()""" - self.P.freepar("all") - self.assertRaises(TypeError, self.P.freepar, "x") - return - - # def test_setphase(self): - # """check PdfFit.setphase() - # """ - # return - # - # def test_setdata(self): - # """check PdfFit.setdata() - # """ - # return - # - def test_psel(self): - """check PdfFit.psel()""" - - def doalloc(): - self.P.alloc("X", 30.0, 0.05, 2, 10, 100) - return - - self.assertRaises(pdffit2.unassignedError, self.P.psel, 0) - self.assertRaises(pdffit2.unassignedError, self.P.psel, 1) - self.P.read_struct(datafile("Ni.stru")) - doalloc() - self.P.calc() - G1 = self.P.getpdf_fit() - self.P.reset() - self.P.read_struct(datafile("PbScW25TiO3.stru")) - doalloc() - self.P.calc() - G2 = self.P.getpdf_fit() - self.P.reset() - self.P.read_struct(datafile("Ni.stru")) - self.P.read_struct(datafile("PbScW25TiO3.stru")) - doalloc() - self.P.pdesel("ALL") - self.P.psel(1) - self.P.calc() - self.assertEqual(G1, self.P.getpdf_fit()) - self.P.pdesel("ALL") - self.P.psel(2) - self.P.calc() - self.assertEqual(G2, self.P.getpdf_fit()) - self.P.psel("ALL") - self.P.calc() - Gall = self.P.getpdf_fit() - dGmax = max([abs(g1 + g2 - gall) for g1, g2, gall in zip(G1, G2, Gall)]) - self.assertAlmostEqual(0, dGmax, self.places) - self.assertRaises(pdffit2.unassignedError, self.P.psel, 10) - self.assertRaises(pdffit2.unassignedError, self.P.psel, 0) - self.assertRaises(pdffit2.unassignedError, self.P.psel, -100) - return - - def test_pdesel(self): - """check PdfFit.pdesel()""" - - def doalloc(): - self.P.alloc("X", 30.0, 0.05, 2, 10, 100) - return - - self.assertRaises(pdffit2.unassignedError, self.P.pdesel, 0) - self.assertRaises(pdffit2.unassignedError, self.P.pdesel, 1) - self.P.read_struct(datafile("Ni.stru")) - doalloc() - self.P.calc() - G1 = self.P.getpdf_fit() - self.P.reset() - self.P.read_struct(datafile("PbScW25TiO3.stru")) - doalloc() - self.P.calc() - G2 = self.P.getpdf_fit() - self.P.reset() - self.P.read_struct(datafile("Ni.stru")) - self.P.read_struct(datafile("PbScW25TiO3.stru")) - doalloc() - self.P.psel("ALL") - self.P.pdesel(2) - self.P.calc() - self.assertEqual(G1, self.P.getpdf_fit()) - self.P.psel("ALL") - self.P.pdesel(1) - self.P.calc() - self.assertEqual(G2, self.P.getpdf_fit()) - self.P.pdesel("ALL") - self.P.calc() - G0 = self.P.getpdf_fit() - self.assertEqual([0.0] * len(G0), G0) - self.assertRaises(pdffit2.unassignedError, self.P.pdesel, 10) - self.assertRaises(pdffit2.unassignedError, self.P.pdesel, 0) - self.assertRaises(pdffit2.unassignedError, self.P.pdesel, -100) - return - - # - # def test_selectAtomType(self): - # """check PdfFit.selectAtomType() - # """ - # return - # - # def test_selectAtomIndex(self): - # """check PdfFit.selectAtomIndex() - # """ - # return - # - # def test_selectAll(self): - # """check PdfFit.selectAll() - # """ - # return - # - # def test_selectNone(self): - # """check PdfFit.selectNone() - # """ - # return - - def test_bond_angle(self): - """check PdfFit.bond_angle()""" - self.P.read_struct(datafile("Ni.stru")) - a, e = self.P.bond_angle(1, 2, 3) - self.assertAlmostEqual(60.0, a, self.places) - self.assertRaises(ValueError, self.P.bond_angle, 0, 1, 2) - self.assertRaises(ValueError, self.P.bond_angle, 1, 2, 7) - return - - def test_bang(self): - "check PdfFit.bang() function" - self.P.read_struct(datafile("Ni.stru")) - out = capture_output(self.P.bang, 1, 2, 3).strip() - self.assertTrue(out.endswith("60 degrees")) - self.assertTrue(out.startswith("NI (#1) - NI (#2) - NI (#3)")) - return - - def test_bond_length_atoms(self): - """check PdfFit.bond_length_atoms()""" - self.P.read_struct(datafile("Ni.stru")) - self.P.read_struct(datafile("PbScW25TiO3.stru")) - dij, ddij = self.P.bond_length_atoms(1, 5) - self.assertAlmostEqual(4.03635, dij, self.places) - self.P.setphase(1) - self.assertRaises(ValueError, self.P.bond_length_atoms, 1, 5) - return - - def test_bond_length_types(self): - """check PdfFit.bond_length_types()""" - self.P.read_struct(datafile("Ni.stru")) - self.P.read_struct(datafile("PbScW25TiO3.stru")) - dPbO = self.P.bond_length_types("Pb", "O", 0.1, 3.0) - # check if keys are present - self.assertTrue("dij" in dPbO) - self.assertTrue("ddij" in dPbO) - self.assertTrue("ij0" in dPbO) - self.assertTrue("ij1" in dPbO) - # check if they have the same length - npts = len(dPbO["dij"]) - self.assertEqual(npts, len(dPbO["ddij"])) - self.assertEqual(npts, len(dPbO["ij0"])) - self.assertEqual(npts, len(dPbO["ij1"])) - # 8 Pb atoms have coordination 12 in perovskite structure - self.assertEqual(8 * 12, len(dPbO["dij"])) - self.P.setphase(1) - dfcc = self.P.bond_length_types("ALL", "ALL", 0.1, 2.6) - # 4 Ni atoms with coordination 12 - self.assertEqual(4 * 12, len(dfcc["dij"])) - # invalid element - self.assertRaises(ValueError, self.P.bond_length_types, "Ni", "Nix", 0.1, 5.0) - # check indices ij0 - allij0 = sum(dfcc["ij0"], tuple()) - self.assertEqual(0, min(allij0)) - self.assertEqual(3, max(allij0)) - # check indices ij1 - allij1 = sum(dfcc["ij1"], tuple()) - self.assertEqual(1, min(allij1)) - self.assertEqual(4, max(allij1)) - # check index values - ij0check = [(i1 - 1, j1 - 1) for i1, j1 in dfcc["ij1"]] - self.assertEqual(ij0check, dfcc["ij0"]) - # test valid element which is not present in the structure - dnone = self.P.bond_length_types("Ni", "Au", 0.1, 5.0) - self.assertEqual(0, len(dnone["dij"])) - self.assertEqual(0, len(dnone["ddij"])) - self.assertEqual(0, len(dnone["ij0"])) - self.assertEqual(0, len(dnone["ij1"])) - return - - def test_blen(self): - """check PdfFit.blen()""" - self.P.read_struct(datafile("PbScW25TiO3.stru")) - blen = self.P.blen - o = capture_output(blen, 1, 5).strip() - self.assertTrue(o.endswith("4.03635 A")) - self.assertTrue("PB (#1)" in o) - self.assertTrue("PB (#5)" in o) - self.assertRaises(ValueError, blen, 1, 99) - self.assertRaises(ValueError, blen, 0, 1) - o1 = capture_output(blen, 1, 1, 0.1, 1) - self.assertTrue("No pairs found" in o1) - o2 = capture_output(blen, 1, 50, 0.1, 1) - self.assertEqual("", o2) - o3 = capture_output(blen, "Sc", "O", 0.5, 2.3).strip() - self.assertEqual(1 + 48, len(o3.split("\n"))) - self.assertEqual(6, o3.count("SC (#33)")) - self.assertEqual(2, o3.count("O (#9)")) - self.assertRaises(TypeError, blen, "Sc", "O", 0.5) - return - - # def test_show_scat(self): - # """check PdfFit.show_scat() - # """ - # return - # - # def test_get_scat_string(self): - # """check PdfFit.get_scat_string() - # """ - # return - - def test_get_scat(self): - """check PdfFit.get_scat()""" - # x-ray scattering factors - fPb = self.P.get_scat("X", "Pb") - self.assertEqual(82.0, fPb) - fTi = self.P.get_scat("X", "tI") - self.assertEqual(22.0, fTi) - # neutron scattering lengths - bPb = self.P.get_scat("N", "PB") - self.assertAlmostEqual(9.401, bPb, 3) - bTi = self.P.get_scat("N", "ti") - self.assertAlmostEqual(-3.370, bTi, 3) - # exceptions - self.assertRaises(ValueError, self.P.get_scat, "N", "zz") - self.assertRaises(ValueError, self.P.get_scat, "Z", "Ti") - return - - def test_set_scat(self): - """check PdfFit.set_scat()""" - # raises exception when no phase exists - self.assertRaises(pdffit2.unassignedError, self.P.set_scat, "N", "Ti", -11) - # check if it is local to phase - fPb = self.P.get_scat("X", "Pb") - bPb = self.P.get_scat("N", "Pb") - self.P.read_struct(datafile("PbScW25TiO3.stru")) - self.P.set_scat("X", "Pb", 142) - self.assertEqual(142, self.P.get_scat("X", "Pb")) - self.assertEqual(bPb, self.P.get_scat("N", "Pb")) - self.P.read_struct(datafile("PbScW25TiO3.stru")) - self.assertEqual(fPb, self.P.get_scat("X", "Pb")) - self.P.setphase(1) - self.assertEqual(142, self.P.get_scat("X", "Pb")) - self.P.setphase(2) - self.assertEqual(fPb, self.P.get_scat("X", "Pb")) - # check exception for invalid inputs - self.assertRaises(ValueError, self.P.set_scat, "Z", "C", 123) - self.assertRaises(ValueError, self.P.set_scat, "X", "ZZ", 123) - return - - def test_reset_scat(self): - """check PdfFit.reset_scat()""" - # raises exception when no phase exists - self.assertRaises(pdffit2.unassignedError, self.P.reset_scat, "Ti") - # check if it is local to phase - fPb = self.P.get_scat("X", "Pb") - bPb = self.P.get_scat("N", "Pb") - self.P.read_struct(datafile("PbScW25TiO3.stru")) - self.P.set_scat("X", "Pb", 142) - self.P.read_struct(datafile("PbScW25TiO3.stru")) - self.P.set_scat("N", "Pb", -17) - self.P.setphase(1) - self.assertNotEqual(fPb, self.P.get_scat("X", "Pb")) - self.P.reset_scat("Pb") - self.assertEqual(fPb, self.P.get_scat("X", "Pb")) - self.P.setphase(2) - self.assertNotEqual(bPb, self.P.get_scat("N", "Pb")) - self.P.reset_scat("Pb") - self.assertEqual(bPb, self.P.get_scat("N", "Pb")) - # check exception for invalid inputs - self.assertRaises(ValueError, self.P.reset_scat, "Zz") - return - - def test_num_atoms(self): - """check PdfFit.num_atoms()""" - self.P.read_struct(datafile("Ni.stru")) - self.assertEqual(4, self.P.num_atoms()) - self.P.read_struct(datafile("PbScW25TiO3.stru")) - self.assertEqual(56, self.P.num_atoms()) - self.P.setphase(1) - self.assertEqual(4, self.P.num_atoms()) - self.P.setphase(2) - self.assertEqual(56, self.P.num_atoms()) - return - - def test_lat(self): - """check PdfFit.lat()""" - pf = self.P - pf.read_struct(datafile("Ni.stru")) - for i in ("a", "b", "c", 1, 2, 3): - self.assertEqual(3.52, pf.getvar(pf.lat(i))) - for i in ("alpha", "beta", "gamma", 4, 5, 6): - self.assertEqual(90, pf.getvar(pf.lat(i))) - return - - def test_xyz(self): - """check PdfFit.x() PdfFit.y(), PdfFit.z()""" - pf = self.P - pf.read_struct(datafile("Ni.stru")) - self.assertEqual(0.5, pf.getvar(pf.x(3))) - self.assertEqual(0, pf.getvar(pf.y(3))) - self.assertEqual(0.5, pf.getvar(pf.z(3))) - return - - def test_uij(self): - """check PdfFit.uij()""" - ni = loadStructure(datafile("Ni.stru")) - ni[2].anisotropy = True - ni[2].U11, ni[2].U22, ni[2].U33 = 1, 2, 3 - ni[2].U12, ni[2].U13, ni[2].U23 = 4, 5, 6 - pf = self.P - pf.add_structure(ni) - self.assertEqual(1, pf.getvar(pf.u11(3))) - self.assertEqual(2, pf.getvar(pf.u22(3))) - self.assertEqual(3, pf.getvar(pf.u33(3))) - self.assertEqual(4, pf.getvar(pf.u12(3))) - self.assertEqual(5, pf.getvar(pf.u13(3))) - self.assertEqual(6, pf.getvar(pf.u23(3))) - return - - def test_occ(self): - """check PdfFit.occ()""" - pf = self.P - pf.read_struct(datafile("Ni.stru")) - for i in range(1, 5): - self.assertEqual(1, pf.getvar(pf.occ(i))) - return - - -# def test_pscale(self): -# """check PdfFit.pscale() -# """ -# return -# -# def test_pscale(self): -# """check PdfFit.pscale() -# """ -# return -# -# def test_sratio(self): -# """check PdfFit.sratio() -# """ -# return -# -# def test_delta1(self): -# """check PdfFit.delta1() -# """ -# return -# -# def test_delta2(self): -# """check PdfFit.delta2() -# """ -# return -# -# def test_dscale(self): -# """check PdfFit.dscale() -# """ -# return -# -# def test_qdamp(self): -# """check PdfFit.qdamp() -# """ -# return -# -# def test_qbroad(self): -# """check PdfFit.qbroad() -# """ -# return -# -# def test_rcut(self): -# """check PdfFit.rcut() -# """ -# return -# -# def test___init__(self): -# """check PdfFit.__init__() -# """ -# return -# -# def test__PdfFit__getRef(self): -# """check PdfFit._PdfFit__getRef() -# """ -# return - -# End of class TestPdfFit - -if __name__ == "__main__": - unittest.main() - -# End of file diff --git a/diffpy/pdffit2/tests/TestPhaseFractions.py b/diffpy/pdffit2/tests/TestPhaseFractions.py deleted file mode 100644 index afc57c06..00000000 --- a/diffpy/pdffit2/tests/TestPhaseFractions.py +++ /dev/null @@ -1,95 +0,0 @@ -#!/usr/bin/env python - -"""Unit tests for phase fraction calculations. -""" - -import unittest - -from diffpy.pdffit2 import PdfFit -from diffpy.pdffit2.tests.pdffit2testutils import datafile - - -############################################################################## -class TestPhaseFractions(unittest.TestCase): - places = 4 - - def setUp(self): - self.P = PdfFit() - self.P.read_struct(datafile("Ni.stru")) - self.P.read_struct(datafile("PbScW25TiO3.stru")) - self.P.alloc("X", 0.0, 0.05, 0.1, 10, 200) - self.P.alloc("N", 0.0, 0.05, 0.1, 10, 200) - return - - def tearDown(self): - del self.P - return - - def test_xray_fractions(self): - """test_xray_fractions -- check phase fractions in x-ray dataset.""" - self.P.setdata(1) - ph = self.P.phase_fractions() - bb1 = 28**2 - bb2 = ((8 * 82 + 24 * 8 + 4 * 21 + 2 * 74 + 2 * 22) / 40.0) ** 2 - self.assertAlmostEqual(1.0, sum(ph["atom"]), self.places) - self.assertAlmostEqual(1.0, sum(ph["cell"]), self.places) - self.assertAlmostEqual(1.0, sum(ph["mass"]), self.places) - self.assertAlmostEqual(bb2 / bb1, ph["atom"][0] / ph["atom"][1], self.places) - self.assertAlmostEqual(bb2 / bb1 * 40.0 / 4.0, ph["cell"][0] / ph["cell"][1], self.places) - mavg1 = 58.69 - mavg2 = (8 * 207.19 + 24 * 15.994 + 4 * 44.956 + 2 * 183.85 + 2 * 47.90) / 40.0 - self.assertAlmostEqual(bb2 / bb1 * mavg1 / mavg2, ph["mass"][0] / ph["mass"][1], self.places) - self.assertEqual(0.0, sum(ph["stdatom"])) - self.assertEqual(0.0, sum(ph["stdcell"])) - self.assertEqual(0.0, sum(ph["stdmass"])) - self.P.setphase(1) - self.P.setvar("pscale", 2.0) - ph2 = self.P.phase_fractions() - self.assertAlmostEqual(1.0, sum(ph2["atom"]), self.places) - self.assertAlmostEqual(1.0, sum(ph2["cell"]), self.places) - self.assertAlmostEqual(1.0, sum(ph2["mass"]), self.places) - self.assertAlmostEqual(2.0, ph2["atom"][0] / ph2["atom"][1] / (ph["atom"][0] / ph["atom"][1]), self.places) - self.assertAlmostEqual(2.0, ph2["cell"][0] / ph2["cell"][1] / (ph["cell"][0] / ph["cell"][1]), self.places) - self.assertAlmostEqual(2.0, ph2["mass"][0] / ph2["mass"][1] / (ph["mass"][0] / ph["mass"][1]), self.places) - return - - def test_neutron_fractions(self): - """test_neutron_fractions -- check phase fractions in neutron dataset.""" - self.P.setdata(2) - ph = self.P.phase_fractions() - bb1 = 10.31**2 - bPb = 9.4012 - bO = 5.8054 - bSc = 12.11 - bW = 4.75518 - bTi = -3.37013 - bb2 = ((8 * bPb + 24 * bO + 4 * bSc + 2 * bW + 2 * bTi) / 40.0) ** 2 - self.assertAlmostEqual(1.0, sum(ph["atom"]), self.places) - self.assertAlmostEqual(1.0, sum(ph["cell"]), self.places) - self.assertAlmostEqual(1.0, sum(ph["mass"]), self.places) - self.assertAlmostEqual(bb2 / bb1, ph["atom"][0] / ph["atom"][1], self.places) - self.assertAlmostEqual(bb2 / bb1 * 40.0 / 4.0, ph["cell"][0] / ph["cell"][1], self.places) - mavg1 = 58.69 - mavg2 = (8 * 207.19 + 24 * 15.994 + 4 * 44.956 + 2 * 183.85 + 2 * 47.90) / 40.0 - self.assertAlmostEqual(bb2 / bb1 * mavg1 / mavg2, ph["mass"][0] / ph["mass"][1], self.places) - self.assertEqual(0.0, sum(ph["stdatom"])) - self.assertEqual(0.0, sum(ph["stdcell"])) - self.assertEqual(0.0, sum(ph["stdmass"])) - self.P.setphase(1) - self.P.setvar("pscale", 2.0) - ph2 = self.P.phase_fractions() - self.assertAlmostEqual(1.0, sum(ph2["atom"]), self.places) - self.assertAlmostEqual(1.0, sum(ph2["cell"]), self.places) - self.assertAlmostEqual(1.0, sum(ph2["mass"]), self.places) - self.assertAlmostEqual(2.0, ph2["atom"][0] / ph2["atom"][1] / (ph["atom"][0] / ph["atom"][1]), self.places) - self.assertAlmostEqual(2.0, ph2["cell"][0] / ph2["cell"][1] / (ph["cell"][0] / ph["cell"][1]), self.places) - self.assertAlmostEqual(2.0, ph2["mass"][0] / ph2["mass"][1] / (ph["mass"][0] / ph["mass"][1]), self.places) - return - - -# End of class TestSphereEnvelope - -if __name__ == "__main__": - unittest.main() - -# End of file diff --git a/diffpy/pdffit2/tests/TestShapeFactors.py b/diffpy/pdffit2/tests/TestShapeFactors.py deleted file mode 100644 index 1eaa9711..00000000 --- a/diffpy/pdffit2/tests/TestShapeFactors.py +++ /dev/null @@ -1,274 +0,0 @@ -#!/usr/bin/env python - -"""Unit tests for particle shape envelope factors. -""" - - -import unittest - -import numpy - -from diffpy.pdffit2 import PdfFit, pdffit2 -from diffpy.pdffit2.tests.pdffit2testutils import datafile - - -def spherefactor(r, d): - """Calculate spherical envelope correction - - r -- PDF radius - d -- diameter of spherical particle - - Return numpy array of shape correction envelope. - """ - r1 = numpy.array(r) - fsph = 1.0 - 1.5 * r1 / d + 0.5 * (r1 / d) ** 3 - fsph[r1 > d] = 0.0 - return fsph - - -############################################################################## -class TestSphereEnvelope(unittest.TestCase): - - places = 6 - - def setUp(self): - self.P = PdfFit() - return - - def tearDown(self): - self.P = None - return - - def test_calculation(self): - """check calculation of sphere envelope factor""" - self.P.read_struct(datafile("Ni.stru")) - self.P.alloc("X", 0.0, 0.05, 0.1, 10, 200) - self.P.calc() - d = 8.0 - r = numpy.array(self.P.getR()) - G0 = numpy.array(self.P.getpdf_fit()) - self.P.setvar("spdiameter", d) - self.P.calc() - G1 = numpy.array(self.P.getpdf_fit()) - dG = G0 * spherefactor(r, d) - G1 - msd = numpy.dot(dG, dG) / len(r) - self.assertAlmostEqual(0.0, numpy.sqrt(msd), self.places) - return - - def test_refinement(self): - """check refinement of sphere envelope factor""" - dcheck = 8.0 - dstart = 12.0 - self.P.read_struct(datafile("Ni.stru")) - self.P.alloc("X", 0.0, 0.05, 0.1, 10, 200) - self.P.setvar("spdiameter", dcheck) - self.P.calc() - r = numpy.array(self.P.getR()) - Gd8 = numpy.array(self.P.getpdf_fit()) - Gd8noise = Gd8 - Gd8noise[::2] += 0.01 - Gd8noise[1::2] -= 0.01 - self.P.reset() - self.P.read_struct(datafile("Ni.stru")) - self.P.read_data_lists("X", 0.0, 0.05, list(r), list(Gd8noise)) - self.P.constrain("spdiameter", "@8") - self.P.setpar(8, dstart) - self.P.refine() - dfinal = self.P.getvar("spdiameter") - self.assertAlmostEqual(dcheck, dfinal, 3) - return - - def test_twophase_calculation(self): - """check PDF calculation for 2 phases with different spdiameters""" - d1 = 6 - d2 = 9 - self.P.read_struct(datafile("Ni.stru")) - self.P.alloc("X", 0.0, 0.05, 0.1, 10, 200) - self.P.setvar("spdiameter", d1) - self.P.calc() - G1 = numpy.array(self.P.getpdf_fit()) - self.P.reset() - self.P.read_struct(datafile("PbScW25TiO3.stru")) - self.P.alloc("X", 0.0, 0.05, 0.1, 10, 200) - self.P.setvar("spdiameter", d2) - self.P.calc() - G2 = numpy.array(self.P.getpdf_fit()) - self.P.reset() - self.P.read_struct(datafile("Ni.stru")) - self.P.read_struct(datafile("PbScW25TiO3.stru")) - self.P.alloc("X", 0.0, 0.05, 0.1, 10, 200) - self.P.setphase(1) - self.P.setvar("spdiameter", d1) - self.P.setphase(2) - self.P.setvar("spdiameter", d2) - self.P.calc() - Gtot = numpy.array(self.P.getpdf_fit()) - dG = G1 + G2 - Gtot - r = numpy.array(self.P.getR()) - msd = numpy.dot(dG, dG) / len(r) - self.assertAlmostEqual(0.0, numpy.sqrt(msd), self.places) - return - - def test_twophase_refinement(self): - """check PDF refinement of 2 phases that have different spdiameter.""" - dcheck1 = 8.0 - dstart1 = 8.2 - dcheck2 = 6.0 - dstart2 = 5.5 - self.P.read_struct(datafile("Ni.stru")) - self.P.alloc("X", 0.0, 0.05, 0.1, 10, 200) - self.P.setvar("spdiameter", dcheck1) - self.P.calc() - G1 = numpy.array(self.P.getpdf_fit()) - self.P.reset() - self.P.read_struct(datafile("PbScW25TiO3.stru")) - self.P.alloc("X", 0.0, 0.05, 0.1, 10, 200) - self.P.setvar("spdiameter", dcheck2) - self.P.calc() - G2 = numpy.array(self.P.getpdf_fit()) - r = numpy.array(self.P.getR()) - Gnoise = G1 + G2 - Gnoise[::2] += 0.01 - Gnoise[1::2] -= 0.01 - self.P.reset() - self.P.read_struct(datafile("Ni.stru")) - self.P.read_struct(datafile("PbScW25TiO3.stru")) - self.P.read_data_lists("X", 0.0, 0.05, list(r), list(Gnoise)) - self.P.setphase(1) - self.P.constrain("spdiameter", "@11") - self.P.setphase(2) - self.P.constrain("spdiameter", "@12") - self.P.setpar(11, dstart1) - self.P.setpar(12, dstart2) - self.P.refine() - dfinal2 = self.P.getvar("spdiameter") - self.P.setphase(1) - dfinal1 = self.P.getvar("spdiameter") - self.assertAlmostEqual(dcheck1, dfinal1, 3) - self.assertAlmostEqual(dcheck2, dfinal2, 3) - return - - def test_spdiameter_io(self): - """Check reading and writing of spdiameter from structure file.""" - import re - - self.P.read_struct(datafile("Ni.stru")) - self.assertEqual(0.0, self.P.getvar("spdiameter")) - # engine should not write shape factor when not defined - spdnone = self.P.save_struct_string(1) - self.assertTrue(not re.search("(?m)^shape +sphere,", spdnone)) - self.P.setvar("spdiameter", 7) - spd7 = self.P.save_struct_string(1) - # spd7 should contain shape factor data - self.assertTrue(re.search("(?m)^shape +sphere,", spd7)) - self.P.reset() - self.P.read_struct_string(spd7) - self.assertEqual(7.0, self.P.getvar("spdiameter")) - # try to read without comma - spd14 = re.sub("(?m)^shape +sphere.*$", "shape sphere 14.00", spd7) - self.P.read_struct_string(spd14) - self.assertEqual(14.0, self.P.getvar("spdiameter")) - # try to read invalid shape data - sinvalid = re.sub("(?m)^shape .*", "shape invalid, 1", spd7) - self.assertRaises(pdffit2.structureError, self.P.read_struct_string, sinvalid) - return - - -# End of class TestSphereEnvelope - - -############################################################################## -class TestStepCutEnvelope(unittest.TestCase): - - places = 6 - - def setUp(self): - self.P = PdfFit() - return - - def tearDown(self): - self.P = None - return - - def test_stepcut_calculation(self): - """check calculation of sphere envelope factor""" - self.P.read_struct(datafile("Ni.stru")) - self.P.alloc("X", 0.0, 0.05, 0.1, 10, 200) - self.P.calc() - stepcut = 8.0 - r = numpy.array(self.P.getR()) - G0 = numpy.array(self.P.getpdf_fit()) - G0[r > stepcut] = 0.0 - self.P.setvar("stepcut", stepcut) - self.P.calc() - G1 = numpy.array(self.P.getpdf_fit()) - dG = G0 - G1 - msd = numpy.dot(dG, dG) / len(r) - self.assertAlmostEqual(0.0, numpy.sqrt(msd), self.places) - return - - def test_twophase_stepcut_calculation(self): - """check PDF calculation for 2 phases with different spdiameters""" - d1 = 6 - d2 = 9 - self.P.read_struct(datafile("Ni.stru")) - self.P.alloc("X", 0.0, 0.05, 0.1, 10, 200) - self.P.setvar("stepcut", d1) - self.P.calc() - G1 = numpy.array(self.P.getpdf_fit()) - self.P.reset() - self.P.read_struct(datafile("PbScW25TiO3.stru")) - self.P.alloc("X", 0.0, 0.05, 0.1, 10, 200) - self.P.setvar("stepcut", d2) - self.P.calc() - G2 = numpy.array(self.P.getpdf_fit()) - self.P.reset() - self.P.read_struct(datafile("Ni.stru")) - self.P.read_struct(datafile("PbScW25TiO3.stru")) - self.P.alloc("X", 0.0, 0.05, 0.1, 10, 200) - self.P.setphase(1) - self.P.setvar("stepcut", d1) - self.P.setphase(2) - self.P.setvar("stepcut", d2) - self.P.calc() - Gtot = numpy.array(self.P.getpdf_fit()) - dG = G1 + G2 - Gtot - r = numpy.array(self.P.getR()) - msd = numpy.dot(dG, dG) / len(r) - self.assertAlmostEqual(0.0, numpy.sqrt(msd), self.places) - # G after step should be zero - self.assertTrue(numpy.all(0 == Gtot[r > max(d1, d2)])) - return - - def test_stepcut_io(self): - """Check reading and writing of stepcut from structure file.""" - import re - - self.P.read_struct(datafile("Ni.stru")) - self.assertEqual(0.0, self.P.getvar("stepcut")) - # engine should not write shape factor when not defined - sscnone = self.P.save_struct_string(1) - self.assertTrue(not re.search("(?m)^shape +stepcut,", sscnone)) - self.P.setvar("stepcut", 7) - ssc7 = self.P.save_struct_string(1) - # ssc7 should contain shape factor data - self.assertTrue(re.search("(?m)^shape +stepcut,", ssc7)) - self.P.reset() - self.P.read_struct_string(ssc7) - self.assertEqual(7.0, self.P.getvar("stepcut")) - # try to read without comma - ssc14 = re.sub("(?m)^shape +stepcut.*$", "shape stepcut 14.00", ssc7) - self.P.read_struct_string(ssc14) - self.assertEqual(14.0, self.P.getvar("stepcut")) - # try to read invalid shape data - sinvalid = re.sub("(?m)^shape .*", "shape invalid, 1", ssc7) - self.assertRaises(pdffit2.structureError, self.P.read_struct_string, sinvalid) - return - - -# End of class TestStepCutEnvelope - -if __name__ == "__main__": - unittest.main() - -# End of file diff --git a/diffpy/pdffit2/tests/__init__.py b/diffpy/pdffit2/tests/__init__.py deleted file mode 100644 index e01060cf..00000000 --- a/diffpy/pdffit2/tests/__init__.py +++ /dev/null @@ -1,103 +0,0 @@ -#!/usr/bin/env python -############################################################################## -# -# diffpy.pdffit2 by DANSE Diffraction group -# Simon J. L. Billinge -# (c) 2012 Trustees of the Columbia University -# in the City of New York. All rights reserved. -# -# File coded by: Pavol Juhas -# -# See AUTHORS.txt for a list of people who contributed. -# See LICENSE.txt for license information. -# -############################################################################## - -"""Unit tests for the diffpy.pdffit2 package. -""" - -import unittest - - -def testsuite(pattern=""): - """Create a unit tests suite for the diffpy.pdffit2 package. - - Parameters - ---------- - pattern : str, optional - Regular expression pattern for selecting test cases. - Select all tests when empty. Ignore the pattern when - any of unit test modules fails to import. - - Returns - ------- - suite : `unittest.TestSuite` - The TestSuite object containing the matching tests. - """ - import re - from itertools import chain - from os.path import dirname - - from pkg_resources import resource_filename - - loader = unittest.defaultTestLoader - thisdir = resource_filename(__name__, "") - depth = __name__.count(".") + 1 - topdir = thisdir - for i in range(depth): - topdir = dirname(topdir) - suite_all = loader.discover(thisdir, pattern="*Test*.py", top_level_dir=topdir) - # always filter the suite by pattern to test-cover the selection code. - suite = unittest.TestSuite() - rx = re.compile(pattern) - tsuites = list(chain.from_iterable(suite_all)) - tsok = all(isinstance(ts, unittest.TestSuite) for ts in tsuites) - if not tsok: # pragma: no cover - return suite_all - tcases = chain.from_iterable(tsuites) - for tc in tcases: - tcwords = tc.id().split(".") - shortname = ".".join(tcwords[-3:]) - if rx.search(shortname): - suite.addTest(tc) - # verify all tests are found for an empty pattern. - assert pattern or suite_all.countTestCases() == suite.countTestCases() - return suite - - -def test(): - """Execute all unit tests for the diffpy.pdffit2 package. - - Returns - ------- - result : `unittest.TestResult` - """ - suite = testsuite() - runner = unittest.TextTestRunner() - result = runner.run(suite) - return result - - -def testdeps(): - """Execute all unit tests for diffpy.pdffit2 and its dependencies. - - Returns - ------- - result : `unittest.TestResult` - """ - from importlib import import_module - - modulenames = """ - diffpy.pdffit2.tests - diffpy.structure.tests - """.split() - suite = unittest.TestSuite() - for mname in modulenames: - mod = import_module(mname) - suite.addTests(mod.testsuite()) - runner = unittest.TextTestRunner() - result = runner.run(suite) - return result - - -# End of file diff --git a/diffpy/pdffit2/tests/debug.py b/diffpy/pdffit2/tests/debug.py deleted file mode 100644 index 83074005..00000000 --- a/diffpy/pdffit2/tests/debug.py +++ /dev/null @@ -1,36 +0,0 @@ -#!/usr/bin/env python -############################################################################## -# -# diffpy.pdffit2 Complex Modeling Initiative -# (c) 2016 Brookhaven Science Associates, -# Brookhaven National Laboratory. -# All rights reserved. -# -# File coded by: Pavol Juhas -# -# See AUTHORS.txt for a list of people who contributed. -# See LICENSE.txt for license information. -# -############################################################################## - - -"""\ -Convenience module for debugging the unit tests using - -python -m diffpy.pdffit2.tests.debug - -Exceptions raised by failed tests or other errors are not caught. -""" - - -if __name__ == "__main__": - import sys - - from diffpy.pdffit2.tests import testsuite - - pattern = sys.argv[1] if len(sys.argv) > 1 else "" - suite = testsuite(pattern) - suite.debug() - - -# End of file diff --git a/diffpy/pdffit2/tests/pdffit2testutils.py b/diffpy/pdffit2/tests/pdffit2testutils.py deleted file mode 100644 index ce61aa16..00000000 --- a/diffpy/pdffit2/tests/pdffit2testutils.py +++ /dev/null @@ -1,53 +0,0 @@ -#!/usr/bin/env python -############################################################################## -# -# diffpy.srreal by DANSE Diffraction group -# Simon J. L. Billinge -# (c) 2010 Trustees of the Columbia University -# in the City of New York. All rights reserved. -# -# File coded by: Pavol Juhas -# -# See AUTHORS.txt for a list of people who contributed. -# See LICENSE.txt for license information. -# -############################################################################## - -"""Helper routines for running other unit tests. -Import of this module suppresses the chatty output from the C++ extension. -""" - - -import os.path - -import six - -import diffpy.pdffit2 - -# silence the C++ engine output -diffpy.pdffit2.redirect_stdout(open(os.path.devnull, "w")) - -# path variables -thisfile = locals().get("__file__", "file.py") -tests_dir = os.path.dirname(os.path.abspath(thisfile)) -testdata_dir = os.path.join(tests_dir, "testdata") - - -def datafile(filename): - """prepend testdata_dir to filename.""" - return os.path.join(testdata_dir, filename) - - -def capture_output(f, *args, **kwargs): - """Capture output from pdffit2 engine produced in function call.""" - savestdout = diffpy.pdffit2.output.stdout - fp = six.StringIO() - diffpy.pdffit2.redirect_stdout(fp) - try: - f(*args, **kwargs) - finally: - diffpy.pdffit2.redirect_stdout(savestdout) - return fp.getvalue() - - -# End of file diff --git a/diffpy/pdffit2/tests/run.py b/diffpy/pdffit2/tests/run.py deleted file mode 100644 index 790e018d..00000000 --- a/diffpy/pdffit2/tests/run.py +++ /dev/null @@ -1,38 +0,0 @@ -#!/usr/bin/env python -############################################################################## -# -# diffpy.pdffit2 by DANSE Diffraction group -# Simon J. L. Billinge -# (c) 2012 Trustees of the Columbia University -# in the City of New York. All rights reserved. -# -# File coded by: Pavol Juhas -# -# See AUTHORS.txt for a list of people who contributed. -# See LICENSE.txt for license information. -# -############################################################################## - -"""Convenience module for executing all unit tests with - -python -m diffpy.pdffit2.tests.run -""" - - -if __name__ == "__main__": - import sys - - # show warnings by default - if not sys.warnoptions: - import os - import warnings - - warnings.simplefilter("default") - # also affect subprocesses - os.environ["PYTHONWARNINGS"] = "default" - from diffpy.pdffit2.tests import test - - # produce zero exit code for a successful test - sys.exit(not test().wasSuccessful()) - -# End of file diff --git a/diffpy/pdffit2/tests/rundeps.py b/diffpy/pdffit2/tests/rundeps.py deleted file mode 100644 index 038475ae..00000000 --- a/diffpy/pdffit2/tests/rundeps.py +++ /dev/null @@ -1,30 +0,0 @@ -#!/usr/bin/env python -############################################################################## -# -# diffpy.pdffit2 by DANSE Diffraction group -# Simon J. L. Billinge -# (c) 2012 Trustees of the Columbia University -# in the City of New York. All rights reserved. -# -# File coded by: Pavol Juhas -# -# See AUTHORS.txt for a list of people who contributed. -# See LICENSE.txt for license information. -# -############################################################################## - -"""Convenience module for executing unit tests for all pdffit2 dependencies - -python -m diffpy.pdffit2.tests.rundeps -""" - - -if __name__ == "__main__": - import sys - - from diffpy.pdffit2.tests import testdeps - - # produce zero exit code for a successful test - sys.exit(not testdeps().wasSuccessful()) - -# End of file diff --git a/diffpy/pdffit2/tests/testdata/300K.gr b/diffpy/pdffit2/tests/testdata/300K.gr deleted file mode 100644 index 15578911..00000000 --- a/diffpy/pdffit2/tests/testdata/300K.gr +++ /dev/null @@ -1,2062 +0,0 @@ -History written: Fri Apr 30 13:05:36 2004 -produced by -##### Run Information runCorrection=T -prep=gsas machine=npdf -run=300K background=npdf_00907 -smooth=2 smoothParam=32 32 0 backKillThresh=-1.0 -in beam: radius=0.635 height=2.54 -temp=308 runTitle=Run 1018: LMO - RT (before), HIPPO-furnace - -##### Vanadium runCorrection=T -run=npdf_00709 background=npdf_00710 -smooth=2 smoothParam=32 32 0 vanKillThresh=4.0 vBackKillThresh=-1.0 -in beam: radius=0.635 height=2.54 - -##### Container runCorrection=T -run=npdf_00917 background=npdf_00907 -smooth=2 smoothParam=32 32 0 cBackKillThresh=-1.0 -wallThick=0.023 atomDensity=0.072110 -atomic information: scattCS=5.100 absorpCS=5.080 - -##### Sample Material numElements=3 NormLaue=0.47445 -Element relAtomNum atomMass atomCoherCS atomIncoherCS atomAbsorpCS - O 0.6000 15.999 4.2320 0.0008 0.00019 - Mn 0.2000 54.931 -1.7500 0.4000 13.30000 - La 0.2000 138.905 8.5300 1.1300 8.97000 -density= effDensity=3.4138 - -##### Banks=6 deltaQ=0.01 matchRef=0 matchScal=T matchOffset=T -bank angle blendQmin blendQmax (0.0 means no info) - 1 90.0 1.62 29.42 - 2 -90.0 1.62 29.42 - 3 119.0 1.97 35.85 - 4 -119.0 1.97 35.85 - 5 148.0 2.20 40.00 - 6 -148.0 2.20 40.00 - -##### Program Specific Information -## Ft calcError=1 (1 for true, 0 for false) -numRpoints=2000 maxR=20.0 numDensity=0.0 intMaxR=1.5 -## Damp Qmin=2.0 Qmax=32 startDampQ=32 QAveMin=0.6 -dampFuncType=0 modEqn=1.0000*S(Q) +0.0000 +0.0000*Q dampExtraToZero=0 -## Blend numBanks=6 banks=1,2,3,4,5,6 -## Soqd minProcOut=0 -samPlazcek=0 vanPlazcek=0 smoothData=0 modifyData=1 -## Corps minProcOut=0 numBanksMiss=0 - -##### prepgsas prepOutput=1 numBanksMiss=0 fileExt=gsa -instParamFile=npdf_displex_757.iparm -numBanksAdd=0 -numBanksMult=6 -Bank# mulData mulBack - 1 1.0230 1.0000 - 2 1.0300 1.0000 - 3 1.0200 1.0000 - 4 0.9800 1.0000 - 5 0.9930 1.0000 - 6 0.9750 1.0000 -##### start data -#O0 rg_int sig_rg_int low_int sig_low_int rmax rhofit -#S 1 - PDF from PDFgetN -#P0 -4.09986 0.44295 0.11702 0.01370 1.50 0.0731 -#L r G(r) dr dG(r) - 0.010 0.086 0.0 0.0441 - 0.020 0.149 0.0 0.0849 - 0.030 0.169 0.0 0.1193 - 0.040 0.130 0.0 0.1448 - 0.050 0.021 0.0 0.1598 - 0.060 -0.160 0.0 0.1637 - 0.070 -0.410 0.0 0.1568 - 0.080 -0.717 0.0 0.1411 - 0.090 -1.064 0.0 0.1196 - 0.100 -1.428 0.0 0.0979 - 0.110 -1.782 0.0 0.0842 - 0.120 -2.101 0.0 0.0854 - 0.130 -2.359 0.0 0.0992 - 0.140 -2.535 0.0 0.1166 - 0.150 -2.612 0.0 0.1311 - 0.160 -2.581 0.0 0.1392 - 0.170 -2.440 0.0 0.1400 - 0.180 -2.196 0.0 0.1341 - 0.190 -1.863 0.0 0.1238 - 0.200 -1.462 0.0 0.1126 - 0.210 -1.017 0.0 0.1050 - 0.220 -0.556 0.0 0.1044 - 0.230 -0.109 0.0 0.1107 - 0.240 0.299 0.0 0.1202 - 0.250 0.643 0.0 0.1290 - 0.260 0.906 0.0 0.1341 - 0.270 1.077 0.0 0.1343 - 0.280 1.152 0.0 0.1298 - 0.290 1.134 0.0 0.1222 - 0.300 1.035 0.0 0.1143 - 0.310 0.870 0.0 0.1091 - 0.320 0.660 0.0 0.1090 - 0.330 0.426 0.0 0.1137 - 0.340 0.193 0.0 0.1209 - 0.350 -0.019 0.0 0.1275 - 0.360 -0.192 0.0 0.1313 - 0.370 -0.313 0.0 0.1313 - 0.380 -0.373 0.0 0.1276 - 0.390 -0.372 0.0 0.1217 - 0.400 -0.314 0.0 0.1156 - 0.410 -0.207 0.0 0.1119 - 0.420 -0.065 0.0 0.1121 - 0.430 0.095 0.0 0.1159 - 0.440 0.257 0.0 0.1215 - 0.450 0.404 0.0 0.1267 - 0.460 0.523 0.0 0.1295 - 0.470 0.601 0.0 0.1292 - 0.480 0.632 0.0 0.1259 - 0.490 0.614 0.0 0.1210 - 0.500 0.548 0.0 0.1163 - 0.510 0.443 0.0 0.1136 - 0.520 0.307 0.0 0.1141 - 0.530 0.152 0.0 0.1175 - 0.540 -0.007 0.0 0.1222 - 0.550 -0.158 0.0 0.1263 - 0.560 -0.290 0.0 0.1283 - 0.570 -0.393 0.0 0.1277 - 0.580 -0.461 0.0 0.1248 - 0.590 -0.493 0.0 0.1205 - 0.600 -0.490 0.0 0.1166 - 0.610 -0.458 0.0 0.1146 - 0.620 -0.404 0.0 0.1153 - 0.630 -0.338 0.0 0.1184 - 0.640 -0.271 0.0 0.1225 - 0.650 -0.214 0.0 0.1259 - 0.660 -0.176 0.0 0.1275 - 0.670 -0.163 0.0 0.1268 - 0.680 -0.180 0.0 0.1240 - 0.690 -0.228 0.0 0.1203 - 0.700 -0.306 0.0 0.1171 - 0.710 -0.409 0.0 0.1156 - 0.720 -0.529 0.0 0.1164 - 0.730 -0.659 0.0 0.1192 - 0.740 -0.789 0.0 0.1226 - 0.750 -0.910 0.0 0.1254 - 0.760 -1.015 0.0 0.1265 - 0.770 -1.097 0.0 0.1257 - 0.780 -1.153 0.0 0.1232 - 0.790 -1.181 0.0 0.1200 - 0.800 -1.185 0.0 0.1173 - 0.810 -1.166 0.0 0.1163 - 0.820 -1.132 0.0 0.1173 - 0.830 -1.088 0.0 0.1198 - 0.840 -1.043 0.0 0.1228 - 0.850 -1.002 0.0 0.1251 - 0.860 -0.973 0.0 0.1259 - 0.870 -0.958 0.0 0.1249 - 0.880 -0.961 0.0 0.1226 - 0.890 -0.982 0.0 0.1198 - 0.900 -1.018 0.0 0.1177 - 0.910 -1.066 0.0 0.1170 - 0.920 -1.122 0.0 0.1181 - 0.930 -1.179 0.0 0.1204 - 0.940 -1.232 0.0 0.1229 - 0.950 -1.277 0.0 0.1247 - 0.960 -1.308 0.0 0.1251 - 0.970 -1.324 0.0 0.1240 - 0.980 -1.325 0.0 0.1219 - 0.990 -1.311 0.0 0.1195 - 1.000 -1.287 0.0 0.1178 - 1.010 -1.255 0.0 0.1175 - 1.020 -1.222 0.0 0.1187 - 1.030 -1.192 0.0 0.1208 - 1.040 -1.170 0.0 0.1231 - 1.050 -1.161 0.0 0.1245 - 1.060 -1.165 0.0 0.1246 - 1.070 -1.185 0.0 0.1234 - 1.080 -1.217 0.0 0.1214 - 1.090 -1.260 0.0 0.1193 - 1.100 -1.309 0.0 0.1180 - 1.110 -1.358 0.0 0.1180 - 1.120 -1.401 0.0 0.1193 - 1.130 -1.432 0.0 0.1212 - 1.140 -1.448 0.0 0.1231 - 1.150 -1.443 0.0 0.1242 - 1.160 -1.417 0.0 0.1241 - 1.170 -1.371 0.0 0.1228 - 1.180 -1.307 0.0 0.1209 - 1.190 -1.230 0.0 0.1191 - 1.200 -1.147 0.0 0.1182 - 1.210 -1.065 0.0 0.1184 - 1.220 -0.992 0.0 0.1198 - 1.230 -0.934 0.0 0.1217 - 1.240 -0.898 0.0 0.1233 - 1.250 -0.888 0.0 0.1241 - 1.260 -0.905 0.0 0.1237 - 1.270 -0.950 0.0 0.1224 - 1.280 -1.019 0.0 0.1206 - 1.290 -1.106 0.0 0.1191 - 1.300 -1.205 0.0 0.1184 - 1.310 -1.306 0.0 0.1188 - 1.320 -1.400 0.0 0.1202 - 1.330 -1.479 0.0 0.1220 - 1.340 -1.534 0.0 0.1234 - 1.350 -1.562 0.0 0.1239 - 1.360 -1.557 0.0 0.1234 - 1.370 -1.519 0.0 0.1220 - 1.380 -1.452 0.0 0.1204 - 1.390 -1.360 0.0 0.1190 - 1.400 -1.251 0.0 0.1186 - 1.410 -1.133 0.0 0.1193 - 1.420 -1.017 0.0 0.1207 - 1.430 -0.913 0.0 0.1224 - 1.440 -0.830 0.0 0.1236 - 1.450 -0.775 0.0 0.1239 - 1.460 -0.755 0.0 0.1232 - 1.470 -0.770 0.0 0.1217 - 1.480 -0.822 0.0 0.1201 - 1.490 -0.906 0.0 0.1190 - 1.500 -1.017 0.0 0.1188 - 1.510 -1.147 0.0 0.1196 - 1.520 -1.285 0.0 0.1210 - 1.530 -1.422 0.0 0.1226 - 1.540 -1.548 0.0 0.1236 - 1.550 -1.653 0.0 0.1238 - 1.560 -1.730 0.0 0.1230 - 1.570 -1.774 0.0 0.1216 - 1.580 -1.781 0.0 0.1201 - 1.590 -1.753 0.0 0.1191 - 1.600 -1.691 0.0 0.1190 - 1.610 -1.600 0.0 0.1198 - 1.620 -1.487 0.0 0.1213 - 1.630 -1.360 0.0 0.1227 - 1.640 -1.227 0.0 0.1236 - 1.650 -1.097 0.0 0.1236 - 1.660 -0.977 0.0 0.1227 - 1.670 -0.876 0.0 0.1213 - 1.680 -0.797 0.0 0.1200 - 1.690 -0.747 0.0 0.1191 - 1.700 -0.727 0.0 0.1191 - 1.710 -0.739 0.0 0.1200 - 1.720 -0.782 0.0 0.1214 - 1.730 -0.858 0.0 0.1227 - 1.740 -0.964 0.0 0.1234 - 1.750 -1.099 0.0 0.1234 - 1.760 -1.262 0.0 0.1225 - 1.770 -1.452 0.0 0.1212 - 1.780 -1.668 0.0 0.1200 - 1.790 -1.908 0.0 0.1193 - 1.800 -2.171 0.0 0.1195 - 1.810 -2.456 0.0 0.1204 - 1.820 -2.758 0.0 0.1216 - 1.830 -3.075 0.0 0.1227 - 1.840 -3.401 0.0 0.1233 - 1.850 -3.730 0.0 0.1230 - 1.860 -4.053 0.0 0.1221 - 1.870 -4.362 0.0 0.1209 - 1.880 -4.647 0.0 0.1198 - 1.890 -4.897 0.0 0.1194 - 1.900 -5.103 0.0 0.1197 - 1.910 -5.256 0.0 0.1206 - 1.920 -5.349 0.0 0.1218 - 1.930 -5.378 0.0 0.1227 - 1.940 -5.342 0.0 0.1231 - 1.950 -5.241 0.0 0.1227 - 1.960 -5.081 0.0 0.1218 - 1.970 -4.869 0.0 0.1207 - 1.980 -4.618 0.0 0.1198 - 1.990 -4.340 0.0 0.1196 - 2.000 -4.050 0.0 0.1200 - 2.010 -3.762 0.0 0.1210 - 2.020 -3.493 0.0 0.1221 - 2.030 -3.253 0.0 0.1229 - 2.040 -3.056 0.0 0.1231 - 2.050 -2.907 0.0 0.1226 - 2.060 -2.811 0.0 0.1215 - 2.070 -2.769 0.0 0.1204 - 2.080 -2.778 0.0 0.1197 - 2.090 -2.831 0.0 0.1196 - 2.100 -2.918 0.0 0.1201 - 2.110 -3.029 0.0 0.1211 - 2.120 -3.150 0.0 0.1222 - 2.130 -3.270 0.0 0.1229 - 2.140 -3.377 0.0 0.1229 - 2.150 -3.460 0.0 0.1223 - 2.160 -3.511 0.0 0.1213 - 2.170 -3.525 0.0 0.1202 - 2.180 -3.499 0.0 0.1196 - 2.190 -3.432 0.0 0.1196 - 2.200 -3.327 0.0 0.1202 - 2.210 -3.188 0.0 0.1213 - 2.220 -3.019 0.0 0.1223 - 2.230 -2.825 0.0 0.1229 - 2.240 -2.613 0.0 0.1229 - 2.250 -2.385 0.0 0.1222 - 2.260 -2.145 0.0 0.1212 - 2.270 -1.895 0.0 0.1202 - 2.280 -1.633 0.0 0.1197 - 2.290 -1.359 0.0 0.1197 - 2.300 -1.069 0.0 0.1204 - 2.310 -0.761 0.0 0.1214 - 2.320 -0.431 0.0 0.1223 - 2.330 -0.077 0.0 0.1228 - 2.340 0.303 0.0 0.1227 - 2.350 0.706 0.0 0.1221 - 2.360 1.131 0.0 0.1211 - 2.370 1.571 0.0 0.1203 - 2.380 2.020 0.0 0.1198 - 2.390 2.466 0.0 0.1199 - 2.400 2.899 0.0 0.1206 - 2.410 3.309 0.0 0.1215 - 2.420 3.682 0.0 0.1223 - 2.430 4.010 0.0 0.1227 - 2.440 4.285 0.0 0.1225 - 2.450 4.501 0.0 0.1218 - 2.460 4.656 0.0 0.1210 - 2.470 4.751 0.0 0.1203 - 2.480 4.792 0.0 0.1200 - 2.490 4.788 0.0 0.1203 - 2.500 4.749 0.0 0.1210 - 2.510 4.688 0.0 0.1218 - 2.520 4.620 0.0 0.1225 - 2.530 4.558 0.0 0.1226 - 2.540 4.518 0.0 0.1223 - 2.550 4.508 0.0 0.1215 - 2.560 4.539 0.0 0.1207 - 2.570 4.615 0.0 0.1201 - 2.580 4.738 0.0 0.1200 - 2.590 4.907 0.0 0.1204 - 2.600 5.115 0.0 0.1212 - 2.610 5.354 0.0 0.1220 - 2.620 5.613 0.0 0.1226 - 2.630 5.882 0.0 0.1226 - 2.640 6.146 0.0 0.1222 - 2.650 6.395 0.0 0.1213 - 2.660 6.619 0.0 0.1205 - 2.670 6.808 0.0 0.1200 - 2.680 6.957 0.0 0.1200 - 2.690 7.063 0.0 0.1205 - 2.700 7.126 0.0 0.1214 - 2.710 7.148 0.0 0.1222 - 2.720 7.134 0.0 0.1227 - 2.730 7.090 0.0 0.1226 - 2.740 7.023 0.0 0.1221 - 2.750 6.941 0.0 0.1212 - 2.760 6.849 0.0 0.1204 - 2.770 6.754 0.0 0.1200 - 2.780 6.659 0.0 0.1201 - 2.790 6.567 0.0 0.1206 - 2.800 6.477 0.0 0.1215 - 2.810 6.388 0.0 0.1222 - 2.820 6.297 0.0 0.1226 - 2.830 6.201 0.0 0.1225 - 2.840 6.094 0.0 0.1219 - 2.850 5.972 0.0 0.1211 - 2.860 5.832 0.0 0.1204 - 2.870 5.671 0.0 0.1200 - 2.880 5.487 0.0 0.1202 - 2.890 5.281 0.0 0.1209 - 2.900 5.053 0.0 0.1217 - 2.910 4.807 0.0 0.1224 - 2.920 4.548 0.0 0.1227 - 2.930 4.279 0.0 0.1225 - 2.940 4.006 0.0 0.1218 - 2.950 3.734 0.0 0.1210 - 2.960 3.467 0.0 0.1203 - 2.970 3.208 0.0 0.1200 - 2.980 2.958 0.0 0.1202 - 2.990 2.720 0.0 0.1209 - 3.000 2.491 0.0 0.1218 - 3.010 2.269 0.0 0.1224 - 3.020 2.053 0.0 0.1227 - 3.030 1.838 0.0 0.1224 - 3.040 1.622 0.0 0.1217 - 3.050 1.402 0.0 0.1209 - 3.060 1.176 0.0 0.1202 - 3.070 0.942 0.0 0.1200 - 3.080 0.703 0.0 0.1203 - 3.090 0.459 0.0 0.1210 - 3.100 0.213 0.0 0.1218 - 3.110 -0.029 0.0 0.1224 - 3.120 -0.263 0.0 0.1226 - 3.130 -0.484 0.0 0.1223 - 3.140 -0.688 0.0 0.1216 - 3.150 -0.868 0.0 0.1208 - 3.160 -1.024 0.0 0.1202 - 3.170 -1.152 0.0 0.1201 - 3.180 -1.254 0.0 0.1204 - 3.190 -1.330 0.0 0.1211 - 3.200 -1.385 0.0 0.1218 - 3.210 -1.423 0.0 0.1223 - 3.220 -1.450 0.0 0.1224 - 3.230 -1.472 0.0 0.1220 - 3.240 -1.495 0.0 0.1214 - 3.250 -1.526 0.0 0.1206 - 3.260 -1.568 0.0 0.1202 - 3.270 -1.625 0.0 0.1201 - 3.280 -1.698 0.0 0.1205 - 3.290 -1.787 0.0 0.1212 - 3.300 -1.888 0.0 0.1220 - 3.310 -1.998 0.0 0.1224 - 3.320 -2.111 0.0 0.1224 - 3.330 -2.220 0.0 0.1219 - 3.340 -2.319 0.0 0.1212 - 3.350 -2.401 0.0 0.1205 - 3.360 -2.460 0.0 0.1201 - 3.370 -2.492 0.0 0.1201 - 3.380 -2.495 0.0 0.1206 - 3.390 -2.467 0.0 0.1213 - 3.400 -2.411 0.0 0.1220 - 3.410 -2.329 0.0 0.1224 - 3.420 -2.229 0.0 0.1223 - 3.430 -2.116 0.0 0.1219 - 3.440 -1.998 0.0 0.1212 - 3.450 -1.885 0.0 0.1205 - 3.460 -1.785 0.0 0.1202 - 3.470 -1.705 0.0 0.1202 - 3.480 -1.652 0.0 0.1207 - 3.490 -1.631 0.0 0.1214 - 3.500 -1.645 0.0 0.1220 - 3.510 -1.696 0.0 0.1223 - 3.520 -1.782 0.0 0.1222 - 3.530 -1.901 0.0 0.1217 - 3.540 -2.049 0.0 0.1211 - 3.550 -2.219 0.0 0.1205 - 3.560 -2.405 0.0 0.1203 - 3.570 -2.600 0.0 0.1204 - 3.580 -2.797 0.0 0.1209 - 3.590 -2.990 0.0 0.1215 - 3.600 -3.171 0.0 0.1220 - 3.610 -3.337 0.0 0.1223 - 3.620 -3.483 0.0 0.1221 - 3.630 -3.605 0.0 0.1216 - 3.640 -3.702 0.0 0.1210 - 3.650 -3.771 0.0 0.1205 - 3.660 -3.813 0.0 0.1204 - 3.670 -3.826 0.0 0.1206 - 3.680 -3.810 0.0 0.1211 - 3.690 -3.765 0.0 0.1217 - 3.700 -3.691 0.0 0.1221 - 3.710 -3.589 0.0 0.1222 - 3.720 -3.456 0.0 0.1219 - 3.730 -3.294 0.0 0.1214 - 3.740 -3.101 0.0 0.1209 - 3.750 -2.880 0.0 0.1205 - 3.760 -2.629 0.0 0.1205 - 3.770 -2.351 0.0 0.1208 - 3.780 -2.049 0.0 0.1213 - 3.790 -1.726 0.0 0.1219 - 3.800 -1.387 0.0 0.1222 - 3.810 -1.038 0.0 0.1222 - 3.820 -0.686 0.0 0.1219 - 3.830 -0.338 0.0 0.1213 - 3.840 -0.003 0.0 0.1208 - 3.850 0.312 0.0 0.1205 - 3.860 0.598 0.0 0.1205 - 3.870 0.848 0.0 0.1209 - 3.880 1.056 0.0 0.1215 - 3.890 1.215 0.0 0.1220 - 3.900 1.323 0.0 0.1223 - 3.910 1.377 0.0 0.1222 - 3.920 1.376 0.0 0.1218 - 3.930 1.322 0.0 0.1212 - 3.940 1.217 0.0 0.1206 - 3.950 1.065 0.0 0.1204 - 3.960 0.871 0.0 0.1205 - 3.970 0.640 0.0 0.1210 - 3.980 0.378 0.0 0.1216 - 3.990 0.091 0.0 0.1221 - 4.000 -0.215 0.0 0.1223 - 4.010 -0.536 0.0 0.1222 - 4.020 -0.866 0.0 0.1217 - 4.030 -1.203 0.0 0.1211 - 4.040 -1.543 0.0 0.1206 - 4.050 -1.884 0.0 0.1204 - 4.060 -2.224 0.0 0.1206 - 4.070 -2.562 0.0 0.1211 - 4.080 -2.896 0.0 0.1217 - 4.090 -3.225 0.0 0.1222 - 4.100 -3.547 0.0 0.1223 - 4.110 -3.859 0.0 0.1221 - 4.120 -4.159 0.0 0.1216 - 4.130 -4.443 0.0 0.1210 - 4.140 -4.707 0.0 0.1205 - 4.150 -4.946 0.0 0.1203 - 4.160 -5.155 0.0 0.1205 - 4.170 -5.329 0.0 0.1211 - 4.180 -5.463 0.0 0.1217 - 4.190 -5.552 0.0 0.1222 - 4.200 -5.595 0.0 0.1224 - 4.210 -5.588 0.0 0.1221 - 4.220 -5.529 0.0 0.1216 - 4.230 -5.421 0.0 0.1210 - 4.240 -5.265 0.0 0.1205 - 4.250 -5.064 0.0 0.1204 - 4.260 -4.824 0.0 0.1206 - 4.270 -4.551 0.0 0.1211 - 4.280 -4.251 0.0 0.1217 - 4.290 -3.932 0.0 0.1221 - 4.300 -3.602 0.0 0.1222 - 4.310 -3.268 0.0 0.1219 - 4.320 -2.936 0.0 0.1214 - 4.330 -2.613 0.0 0.1209 - 4.340 -2.302 0.0 0.1205 - 4.350 -2.007 0.0 0.1204 - 4.360 -1.729 0.0 0.1207 - 4.370 -1.469 0.0 0.1212 - 4.380 -1.226 0.0 0.1218 - 4.390 -0.996 0.0 0.1221 - 4.400 -0.779 0.0 0.1222 - 4.410 -0.569 0.0 0.1219 - 4.420 -0.365 0.0 0.1213 - 4.430 -0.162 0.0 0.1208 - 4.440 0.042 0.0 0.1205 - 4.450 0.248 0.0 0.1205 - 4.460 0.456 0.0 0.1208 - 4.470 0.667 0.0 0.1213 - 4.480 0.878 0.0 0.1218 - 4.490 1.086 0.0 0.1221 - 4.500 1.288 0.0 0.1220 - 4.510 1.481 0.0 0.1217 - 4.520 1.658 0.0 0.1212 - 4.530 1.818 0.0 0.1207 - 4.540 1.955 0.0 0.1204 - 4.550 2.067 0.0 0.1205 - 4.560 2.153 0.0 0.1208 - 4.570 2.213 0.0 0.1214 - 4.580 2.249 0.0 0.1218 - 4.590 2.262 0.0 0.1221 - 4.600 2.258 0.0 0.1220 - 4.610 2.241 0.0 0.1216 - 4.620 2.219 0.0 0.1211 - 4.630 2.198 0.0 0.1207 - 4.640 2.185 0.0 0.1204 - 4.650 2.185 0.0 0.1206 - 4.660 2.205 0.0 0.1209 - 4.670 2.249 0.0 0.1214 - 4.680 2.319 0.0 0.1219 - 4.690 2.416 0.0 0.1220 - 4.700 2.540 0.0 0.1219 - 4.710 2.688 0.0 0.1215 - 4.720 2.856 0.0 0.1210 - 4.730 3.037 0.0 0.1206 - 4.740 3.226 0.0 0.1204 - 4.750 3.413 0.0 0.1206 - 4.760 3.592 0.0 0.1210 - 4.770 3.755 0.0 0.1215 - 4.780 3.896 0.0 0.1219 - 4.790 4.007 0.0 0.1220 - 4.800 4.084 0.0 0.1219 - 4.810 4.125 0.0 0.1215 - 4.820 4.129 0.0 0.1210 - 4.830 4.094 0.0 0.1207 - 4.840 4.025 0.0 0.1206 - 4.850 3.923 0.0 0.1208 - 4.860 3.794 0.0 0.1212 - 4.870 3.642 0.0 0.1216 - 4.880 3.474 0.0 0.1219 - 4.890 3.295 0.0 0.1220 - 4.900 3.112 0.0 0.1218 - 4.910 2.928 0.0 0.1214 - 4.920 2.748 0.0 0.1210 - 4.930 2.576 0.0 0.1207 - 4.940 2.412 0.0 0.1207 - 4.950 2.258 0.0 0.1210 - 4.960 2.113 0.0 0.1214 - 4.970 1.977 0.0 0.1218 - 4.980 1.847 0.0 0.1220 - 4.990 1.720 0.0 0.1220 - 5.000 1.594 0.0 0.1217 - 5.010 1.467 0.0 0.1213 - 5.020 1.336 0.0 0.1209 - 5.030 1.199 0.0 0.1207 - 5.040 1.057 0.0 0.1208 - 5.050 0.908 0.0 0.1211 - 5.060 0.754 0.0 0.1215 - 5.070 0.597 0.0 0.1219 - 5.080 0.440 0.0 0.1220 - 5.090 0.286 0.0 0.1219 - 5.100 0.140 0.0 0.1216 - 5.110 0.005 0.0 0.1211 - 5.120 -0.113 0.0 0.1208 - 5.130 -0.212 0.0 0.1206 - 5.140 -0.288 0.0 0.1207 - 5.150 -0.338 0.0 0.1211 - 5.160 -0.360 0.0 0.1216 - 5.170 -0.356 0.0 0.1220 - 5.180 -0.325 0.0 0.1221 - 5.190 -0.270 0.0 0.1220 - 5.200 -0.195 0.0 0.1216 - 5.210 -0.104 0.0 0.1211 - 5.220 -0.003 0.0 0.1208 - 5.230 0.102 0.0 0.1207 - 5.240 0.205 0.0 0.1208 - 5.250 0.299 0.0 0.1212 - 5.260 0.378 0.0 0.1217 - 5.270 0.439 0.0 0.1220 - 5.280 0.476 0.0 0.1221 - 5.290 0.487 0.0 0.1219 - 5.300 0.472 0.0 0.1215 - 5.310 0.432 0.0 0.1210 - 5.320 0.368 0.0 0.1207 - 5.330 0.285 0.0 0.1206 - 5.340 0.188 0.0 0.1208 - 5.350 0.084 0.0 0.1212 - 5.360 -0.020 0.0 0.1217 - 5.370 -0.116 0.0 0.1220 - 5.380 -0.197 0.0 0.1220 - 5.390 -0.256 0.0 0.1218 - 5.400 -0.287 0.0 0.1214 - 5.410 -0.287 0.0 0.1209 - 5.420 -0.250 0.0 0.1206 - 5.430 -0.178 0.0 0.1206 - 5.440 -0.070 0.0 0.1208 - 5.450 0.070 0.0 0.1212 - 5.460 0.240 0.0 0.1217 - 5.470 0.433 0.0 0.1219 - 5.480 0.643 0.0 0.1219 - 5.490 0.863 0.0 0.1217 - 5.500 1.086 0.0 0.1212 - 5.510 1.306 0.0 0.1208 - 5.520 1.515 0.0 0.1206 - 5.530 1.711 0.0 0.1206 - 5.540 1.889 0.0 0.1209 - 5.550 2.048 0.0 0.1214 - 5.560 2.187 0.0 0.1218 - 5.570 2.307 0.0 0.1221 - 5.580 2.412 0.0 0.1220 - 5.590 2.504 0.0 0.1217 - 5.600 2.587 0.0 0.1213 - 5.610 2.664 0.0 0.1209 - 5.620 2.740 0.0 0.1206 - 5.630 2.817 0.0 0.1207 - 5.640 2.897 0.0 0.1210 - 5.650 2.979 0.0 0.1214 - 5.660 3.062 0.0 0.1218 - 5.670 3.144 0.0 0.1220 - 5.680 3.221 0.0 0.1219 - 5.690 3.287 0.0 0.1216 - 5.700 3.338 0.0 0.1212 - 5.710 3.366 0.0 0.1208 - 5.720 3.366 0.0 0.1206 - 5.730 3.333 0.0 0.1207 - 5.740 3.264 0.0 0.1210 - 5.750 3.156 0.0 0.1214 - 5.760 3.009 0.0 0.1218 - 5.770 2.825 0.0 0.1219 - 5.780 2.606 0.0 0.1218 - 5.790 2.357 0.0 0.1215 - 5.800 2.087 0.0 0.1211 - 5.810 1.802 0.0 0.1207 - 5.820 1.511 0.0 0.1206 - 5.830 1.222 0.0 0.1207 - 5.840 0.944 0.0 0.1210 - 5.850 0.684 0.0 0.1214 - 5.860 0.447 0.0 0.1218 - 5.870 0.238 0.0 0.1219 - 5.880 0.059 0.0 0.1217 - 5.890 -0.089 0.0 0.1214 - 5.900 -0.208 0.0 0.1210 - 5.910 -0.301 0.0 0.1207 - 5.920 -0.374 0.0 0.1206 - 5.930 -0.430 0.0 0.1208 - 5.940 -0.477 0.0 0.1212 - 5.950 -0.520 0.0 0.1216 - 5.960 -0.566 0.0 0.1219 - 5.970 -0.619 0.0 0.1219 - 5.980 -0.684 0.0 0.1217 - 5.990 -0.763 0.0 0.1214 - 6.000 -0.859 0.0 0.1210 - 6.010 -0.971 0.0 0.1207 - 6.020 -1.098 0.0 0.1207 - 6.030 -1.238 0.0 0.1209 - 6.040 -1.388 0.0 0.1212 - 6.050 -1.545 0.0 0.1216 - 6.060 -1.705 0.0 0.1219 - 6.070 -1.865 0.0 0.1220 - 6.080 -2.021 0.0 0.1217 - 6.090 -2.172 0.0 0.1214 - 6.100 -2.315 0.0 0.1210 - 6.110 -2.449 0.0 0.1207 - 6.120 -2.575 0.0 0.1207 - 6.130 -2.694 0.0 0.1209 - 6.140 -2.805 0.0 0.1213 - 6.150 -2.912 0.0 0.1217 - 6.160 -3.016 0.0 0.1219 - 6.170 -3.119 0.0 0.1219 - 6.180 -3.223 0.0 0.1217 - 6.190 -3.329 0.0 0.1213 - 6.200 -3.439 0.0 0.1210 - 6.210 -3.552 0.0 0.1208 - 6.220 -3.669 0.0 0.1208 - 6.230 -3.789 0.0 0.1211 - 6.240 -3.911 0.0 0.1214 - 6.250 -4.033 0.0 0.1217 - 6.260 -4.153 0.0 0.1219 - 6.270 -4.269 0.0 0.1218 - 6.280 -4.378 0.0 0.1216 - 6.290 -4.478 0.0 0.1213 - 6.300 -4.567 0.0 0.1210 - 6.310 -4.640 0.0 0.1208 - 6.320 -4.697 0.0 0.1209 - 6.330 -4.734 0.0 0.1212 - 6.340 -4.751 0.0 0.1215 - 6.350 -4.745 0.0 0.1218 - 6.360 -4.714 0.0 0.1219 - 6.370 -4.659 0.0 0.1218 - 6.380 -4.578 0.0 0.1215 - 6.390 -4.473 0.0 0.1211 - 6.400 -4.344 0.0 0.1209 - 6.410 -4.194 0.0 0.1208 - 6.420 -4.025 0.0 0.1209 - 6.430 -3.840 0.0 0.1212 - 6.440 -3.645 0.0 0.1215 - 6.450 -3.443 0.0 0.1218 - 6.460 -3.241 0.0 0.1219 - 6.470 -3.045 0.0 0.1217 - 6.480 -2.860 0.0 0.1214 - 6.490 -2.691 0.0 0.1211 - 6.500 -2.545 0.0 0.1208 - 6.510 -2.424 0.0 0.1208 - 6.520 -2.333 0.0 0.1210 - 6.530 -2.272 0.0 0.1213 - 6.540 -2.241 0.0 0.1217 - 6.550 -2.239 0.0 0.1219 - 6.560 -2.262 0.0 0.1219 - 6.570 -2.305 0.0 0.1216 - 6.580 -2.361 0.0 0.1213 - 6.590 -2.425 0.0 0.1209 - 6.600 -2.488 0.0 0.1207 - 6.610 -2.541 0.0 0.1207 - 6.620 -2.578 0.0 0.1209 - 6.630 -2.592 0.0 0.1213 - 6.640 -2.577 0.0 0.1216 - 6.650 -2.530 0.0 0.1219 - 6.660 -2.449 0.0 0.1218 - 6.670 -2.334 0.0 0.1216 - 6.680 -2.187 0.0 0.1213 - 6.690 -2.012 0.0 0.1209 - 6.700 -1.815 0.0 0.1207 - 6.710 -1.601 0.0 0.1207 - 6.720 -1.380 0.0 0.1209 - 6.730 -1.158 0.0 0.1213 - 6.740 -0.944 0.0 0.1216 - 6.750 -0.743 0.0 0.1218 - 6.760 -0.562 0.0 0.1218 - 6.770 -0.404 0.0 0.1216 - 6.780 -0.272 0.0 0.1212 - 6.790 -0.166 0.0 0.1209 - 6.800 -0.083 0.0 0.1208 - 6.810 -0.022 0.0 0.1208 - 6.820 0.023 0.0 0.1211 - 6.830 0.057 0.0 0.1214 - 6.840 0.088 0.0 0.1217 - 6.850 0.122 0.0 0.1218 - 6.860 0.164 0.0 0.1217 - 6.870 0.222 0.0 0.1214 - 6.880 0.299 0.0 0.1211 - 6.890 0.398 0.0 0.1208 - 6.900 0.521 0.0 0.1207 - 6.910 0.667 0.0 0.1208 - 6.920 0.835 0.0 0.1211 - 6.930 1.021 0.0 0.1215 - 6.940 1.221 0.0 0.1217 - 6.950 1.428 0.0 0.1218 - 6.960 1.636 0.0 0.1217 - 6.970 1.839 0.0 0.1214 - 6.980 2.030 0.0 0.1211 - 6.990 2.203 0.0 0.1209 - 7.000 2.353 0.0 0.1208 - 7.010 2.476 0.0 0.1209 - 7.020 2.569 0.0 0.1212 - 7.030 2.630 0.0 0.1215 - 7.040 2.660 0.0 0.1217 - 7.050 2.658 0.0 0.1217 - 7.060 2.627 0.0 0.1216 - 7.070 2.571 0.0 0.1213 - 7.080 2.493 0.0 0.1210 - 7.090 2.397 0.0 0.1207 - 7.100 2.289 0.0 0.1207 - 7.110 2.173 0.0 0.1209 - 7.120 2.053 0.0 0.1213 - 7.130 1.933 0.0 0.1216 - 7.140 1.819 0.0 0.1218 - 7.150 1.712 0.0 0.1218 - 7.160 1.615 0.0 0.1216 - 7.170 1.531 0.0 0.1213 - 7.180 1.461 0.0 0.1210 - 7.190 1.405 0.0 0.1209 - 7.200 1.366 0.0 0.1209 - 7.210 1.342 0.0 0.1211 - 7.220 1.333 0.0 0.1214 - 7.230 1.340 0.0 0.1217 - 7.240 1.363 0.0 0.1218 - 7.250 1.401 0.0 0.1218 - 7.260 1.455 0.0 0.1216 - 7.270 1.524 0.0 0.1213 - 7.280 1.608 0.0 0.1210 - 7.290 1.707 0.0 0.1208 - 7.300 1.823 0.0 0.1209 - 7.310 1.954 0.0 0.1211 - 7.320 2.099 0.0 0.1215 - 7.330 2.260 0.0 0.1217 - 7.340 2.434 0.0 0.1219 - 7.350 2.620 0.0 0.1218 - 7.360 2.816 0.0 0.1216 - 7.370 3.018 0.0 0.1213 - 7.380 3.224 0.0 0.1210 - 7.390 3.430 0.0 0.1209 - 7.400 3.631 0.0 0.1210 - 7.410 3.823 0.0 0.1213 - 7.420 4.001 0.0 0.1216 - 7.430 4.160 0.0 0.1218 - 7.440 4.297 0.0 0.1219 - 7.450 4.406 0.0 0.1218 - 7.460 4.486 0.0 0.1215 - 7.470 4.534 0.0 0.1212 - 7.480 4.550 0.0 0.1209 - 7.490 4.533 0.0 0.1208 - 7.500 4.485 0.0 0.1210 - 7.510 4.408 0.0 0.1212 - 7.520 4.306 0.0 0.1216 - 7.530 4.183 0.0 0.1218 - 7.540 4.044 0.0 0.1218 - 7.550 3.892 0.0 0.1217 - 7.560 3.733 0.0 0.1214 - 7.570 3.571 0.0 0.1211 - 7.580 3.409 0.0 0.1209 - 7.590 3.251 0.0 0.1208 - 7.600 3.097 0.0 0.1210 - 7.610 2.949 0.0 0.1213 - 7.620 2.804 0.0 0.1216 - 7.630 2.663 0.0 0.1218 - 7.640 2.523 0.0 0.1218 - 7.650 2.380 0.0 0.1216 - 7.660 2.233 0.0 0.1213 - 7.670 2.077 0.0 0.1210 - 7.680 1.911 0.0 0.1208 - 7.690 1.734 0.0 0.1208 - 7.700 1.543 0.0 0.1210 - 7.710 1.341 0.0 0.1213 - 7.720 1.128 0.0 0.1216 - 7.730 0.906 0.0 0.1218 - 7.740 0.681 0.0 0.1218 - 7.750 0.455 0.0 0.1216 - 7.760 0.234 0.0 0.1213 - 7.770 0.022 0.0 0.1209 - 7.780 -0.176 0.0 0.1208 - 7.790 -0.356 0.0 0.1208 - 7.800 -0.514 0.0 0.1210 - 7.810 -0.650 0.0 0.1213 - 7.820 -0.761 0.0 0.1216 - 7.830 -0.848 0.0 0.1218 - 7.840 -0.912 0.0 0.1217 - 7.850 -0.957 0.0 0.1215 - 7.860 -0.984 0.0 0.1212 - 7.870 -0.997 0.0 0.1209 - 7.880 -1.000 0.0 0.1208 - 7.890 -0.996 0.0 0.1208 - 7.900 -0.988 0.0 0.1210 - 7.910 -0.978 0.0 0.1213 - 7.920 -0.968 0.0 0.1216 - 7.930 -0.958 0.0 0.1217 - 7.940 -0.949 0.0 0.1217 - 7.950 -0.939 0.0 0.1214 - 7.960 -0.928 0.0 0.1211 - 7.970 -0.914 0.0 0.1209 - 7.980 -0.897 0.0 0.1207 - 7.990 -0.876 0.0 0.1208 - 8.000 -0.850 0.0 0.1211 - 8.010 -0.821 0.0 0.1214 - 8.020 -0.791 0.0 0.1217 - 8.030 -0.761 0.0 0.1218 - 8.040 -0.736 0.0 0.1217 - 8.050 -0.718 0.0 0.1215 - 8.060 -0.711 0.0 0.1211 - 8.070 -0.718 0.0 0.1209 - 8.080 -0.742 0.0 0.1208 - 8.090 -0.784 0.0 0.1209 - 8.100 -0.845 0.0 0.1211 - 8.110 -0.922 0.0 0.1214 - 8.120 -1.014 0.0 0.1217 - 8.130 -1.115 0.0 0.1218 - 8.140 -1.220 0.0 0.1216 - 8.150 -1.322 0.0 0.1214 - 8.160 -1.415 0.0 0.1211 - 8.170 -1.489 0.0 0.1208 - 8.180 -1.540 0.0 0.1208 - 8.190 -1.561 0.0 0.1209 - 8.200 -1.549 0.0 0.1212 - 8.210 -1.501 0.0 0.1215 - 8.220 -1.417 0.0 0.1217 - 8.230 -1.300 0.0 0.1218 - 8.240 -1.155 0.0 0.1217 - 8.250 -0.988 0.0 0.1214 - 8.260 -0.808 0.0 0.1211 - 8.270 -0.624 0.0 0.1209 - 8.280 -0.445 0.0 0.1209 - 8.290 -0.282 0.0 0.1210 - 8.300 -0.144 0.0 0.1213 - 8.310 -0.038 0.0 0.1216 - 8.320 0.030 0.0 0.1218 - 8.330 0.056 0.0 0.1218 - 8.340 0.039 0.0 0.1216 - 8.350 -0.020 0.0 0.1214 - 8.360 -0.119 0.0 0.1211 - 8.370 -0.253 0.0 0.1210 - 8.380 -0.415 0.0 0.1209 - 8.390 -0.598 0.0 0.1211 - 8.400 -0.794 0.0 0.1214 - 8.410 -0.996 0.0 0.1216 - 8.420 -1.195 0.0 0.1217 - 8.430 -1.387 0.0 0.1217 - 8.440 -1.565 0.0 0.1216 - 8.450 -1.725 0.0 0.1213 - 8.460 -1.864 0.0 0.1211 - 8.470 -1.980 0.0 0.1210 - 8.480 -2.073 0.0 0.1210 - 8.490 -2.143 0.0 0.1211 - 8.500 -2.189 0.0 0.1214 - 8.510 -2.213 0.0 0.1216 - 8.520 -2.215 0.0 0.1217 - 8.530 -2.196 0.0 0.1217 - 8.540 -2.156 0.0 0.1215 - 8.550 -2.096 0.0 0.1213 - 8.560 -2.016 0.0 0.1210 - 8.570 -1.916 0.0 0.1210 - 8.580 -1.798 0.0 0.1210 - 8.590 -1.664 0.0 0.1212 - 8.600 -1.516 0.0 0.1214 - 8.610 -1.358 0.0 0.1216 - 8.620 -1.194 0.0 0.1217 - 8.630 -1.030 0.0 0.1216 - 8.640 -0.872 0.0 0.1214 - 8.650 -0.728 0.0 0.1212 - 8.660 -0.604 0.0 0.1210 - 8.670 -0.508 0.0 0.1210 - 8.680 -0.446 0.0 0.1211 - 8.690 -0.423 0.0 0.1213 - 8.700 -0.442 0.0 0.1215 - 8.710 -0.505 0.0 0.1217 - 8.720 -0.611 0.0 0.1217 - 8.730 -0.758 0.0 0.1216 - 8.740 -0.941 0.0 0.1214 - 8.750 -1.154 0.0 0.1211 - 8.760 -1.387 0.0 0.1210 - 8.770 -1.633 0.0 0.1210 - 8.780 -1.883 0.0 0.1211 - 8.790 -2.127 0.0 0.1213 - 8.800 -2.357 0.0 0.1215 - 8.810 -2.568 0.0 0.1216 - 8.820 -2.753 0.0 0.1216 - 8.830 -2.911 0.0 0.1215 - 8.840 -3.041 0.0 0.1212 - 8.850 -3.144 0.0 0.1210 - 8.860 -3.222 0.0 0.1209 - 8.870 -3.280 0.0 0.1210 - 8.880 -3.323 0.0 0.1212 - 8.890 -3.357 0.0 0.1214 - 8.900 -3.384 0.0 0.1216 - 8.910 -3.411 0.0 0.1217 - 8.920 -3.438 0.0 0.1216 - 8.930 -3.467 0.0 0.1214 - 8.940 -3.498 0.0 0.1212 - 8.950 -3.529 0.0 0.1209 - 8.960 -3.554 0.0 0.1208 - 8.970 -3.571 0.0 0.1209 - 8.980 -3.574 0.0 0.1211 - 8.990 -3.556 0.0 0.1214 - 9.000 -3.515 0.0 0.1216 - 9.010 -3.445 0.0 0.1217 - 9.020 -3.346 0.0 0.1216 - 9.030 -3.215 0.0 0.1214 - 9.040 -3.055 0.0 0.1211 - 9.050 -2.869 0.0 0.1209 - 9.060 -2.661 0.0 0.1208 - 9.070 -2.438 0.0 0.1209 - 9.080 -2.207 0.0 0.1212 - 9.090 -1.976 0.0 0.1214 - 9.100 -1.752 0.0 0.1216 - 9.110 -1.542 0.0 0.1217 - 9.120 -1.351 0.0 0.1216 - 9.130 -1.183 0.0 0.1214 - 9.140 -1.041 0.0 0.1211 - 9.150 -0.925 0.0 0.1209 - 9.160 -0.835 0.0 0.1209 - 9.170 -0.768 0.0 0.1210 - 9.180 -0.720 0.0 0.1212 - 9.190 -0.688 0.0 0.1215 - 9.200 -0.666 0.0 0.1217 - 9.210 -0.651 0.0 0.1217 - 9.220 -0.638 0.0 0.1216 - 9.230 -0.626 0.0 0.1214 - 9.240 -0.611 0.0 0.1211 - 9.250 -0.593 0.0 0.1209 - 9.260 -0.572 0.0 0.1209 - 9.270 -0.546 0.0 0.1210 - 9.280 -0.518 0.0 0.1212 - 9.290 -0.487 0.0 0.1215 - 9.300 -0.453 0.0 0.1217 - 9.310 -0.416 0.0 0.1217 - 9.320 -0.372 0.0 0.1216 - 9.330 -0.320 0.0 0.1213 - 9.340 -0.255 0.0 0.1211 - 9.350 -0.172 0.0 0.1209 - 9.360 -0.066 0.0 0.1209 - 9.370 0.070 0.0 0.1211 - 9.380 0.241 0.0 0.1213 - 9.390 0.451 0.0 0.1215 - 9.400 0.704 0.0 0.1217 - 9.410 1.001 0.0 0.1217 - 9.420 1.341 0.0 0.1215 - 9.430 1.721 0.0 0.1213 - 9.440 2.135 0.0 0.1211 - 9.450 2.576 0.0 0.1210 - 9.460 3.035 0.0 0.1210 - 9.470 3.500 0.0 0.1211 - 9.480 3.959 0.0 0.1214 - 9.490 4.403 0.0 0.1216 - 9.500 4.819 0.0 0.1217 - 9.510 5.199 0.0 0.1217 - 9.520 5.536 0.0 0.1215 - 9.530 5.823 0.0 0.1213 - 9.540 6.060 0.0 0.1210 - 9.550 6.246 0.0 0.1209 - 9.560 6.384 0.0 0.1210 - 9.570 6.477 0.0 0.1211 - 9.580 6.533 0.0 0.1214 - 9.590 6.558 0.0 0.1216 - 9.600 6.558 0.0 0.1217 - 9.610 6.541 0.0 0.1216 - 9.620 6.512 0.0 0.1215 - 9.630 6.474 0.0 0.1212 - 9.640 6.430 0.0 0.1210 - 9.650 6.379 0.0 0.1210 - 9.660 6.321 0.0 0.1210 - 9.670 6.251 0.0 0.1212 - 9.680 6.166 0.0 0.1215 - 9.690 6.060 0.0 0.1216 - 9.700 5.929 0.0 0.1217 - 9.710 5.768 0.0 0.1216 - 9.720 5.574 0.0 0.1214 - 9.730 5.346 0.0 0.1212 - 9.740 5.085 0.0 0.1210 - 9.750 4.792 0.0 0.1210 - 9.760 4.472 0.0 0.1211 - 9.770 4.132 0.0 0.1213 - 9.780 3.778 0.0 0.1215 - 9.790 3.420 0.0 0.1216 - 9.800 3.065 0.0 0.1217 - 9.810 2.722 0.0 0.1216 - 9.820 2.398 0.0 0.1214 - 9.830 2.098 0.0 0.1211 - 9.840 1.826 0.0 0.1210 - 9.850 1.584 0.0 0.1210 - 9.860 1.371 0.0 0.1211 - 9.870 1.185 0.0 0.1213 - 9.880 1.021 0.0 0.1215 - 9.890 0.875 0.0 0.1217 - 9.900 0.741 0.0 0.1216 - 9.910 0.613 0.0 0.1215 - 9.920 0.485 0.0 0.1213 - 9.930 0.354 0.0 0.1211 - 9.940 0.216 0.0 0.1210 - 9.950 0.070 0.0 0.1210 - 9.960 -0.084 0.0 0.1211 - 9.970 -0.244 0.0 0.1213 - 9.980 -0.408 0.0 0.1215 - 9.990 -0.570 0.0 0.1217 - 10.000 -0.727 0.0 0.1216 - 10.010 -0.872 0.0 0.1215 - 10.020 -1.002 0.0 0.1212 - 10.030 -1.112 0.0 0.1210 - 10.040 -1.200 0.0 0.1209 - 10.050 -1.262 0.0 0.1210 - 10.060 -1.299 0.0 0.1212 - 10.070 -1.312 0.0 0.1214 - 10.080 -1.300 0.0 0.1216 - 10.090 -1.268 0.0 0.1217 - 10.100 -1.216 0.0 0.1216 - 10.110 -1.148 0.0 0.1214 - 10.120 -1.065 0.0 0.1212 - 10.130 -0.970 0.0 0.1210 - 10.140 -0.863 0.0 0.1209 - 10.150 -0.744 0.0 0.1210 - 10.160 -0.612 0.0 0.1212 - 10.170 -0.465 0.0 0.1214 - 10.180 -0.303 0.0 0.1216 - 10.190 -0.123 0.0 0.1217 - 10.200 0.075 0.0 0.1216 - 10.210 0.293 0.0 0.1214 - 10.220 0.529 0.0 0.1212 - 10.230 0.781 0.0 0.1210 - 10.240 1.044 0.0 0.1209 - 10.250 1.314 0.0 0.1210 - 10.260 1.582 0.0 0.1212 - 10.270 1.841 0.0 0.1214 - 10.280 2.081 0.0 0.1216 - 10.290 2.293 0.0 0.1217 - 10.300 2.466 0.0 0.1216 - 10.310 2.593 0.0 0.1213 - 10.320 2.666 0.0 0.1211 - 10.330 2.679 0.0 0.1209 - 10.340 2.630 0.0 0.1209 - 10.350 2.518 0.0 0.1210 - 10.360 2.343 0.0 0.1212 - 10.370 2.109 0.0 0.1215 - 10.380 1.822 0.0 0.1216 - 10.390 1.489 0.0 0.1217 - 10.400 1.119 0.0 0.1215 - 10.410 0.718 0.0 0.1213 - 10.420 0.298 0.0 0.1211 - 10.430 -0.135 0.0 0.1209 - 10.440 -0.574 0.0 0.1209 - 10.450 -1.012 0.0 0.1210 - 10.460 -1.444 0.0 0.1212 - 10.470 -1.868 0.0 0.1214 - 10.480 -2.282 0.0 0.1216 - 10.490 -2.685 0.0 0.1216 - 10.500 -3.077 0.0 0.1215 - 10.510 -3.458 0.0 0.1213 - 10.520 -3.829 0.0 0.1211 - 10.530 -4.190 0.0 0.1210 - 10.540 -4.541 0.0 0.1210 - 10.550 -4.879 0.0 0.1211 - 10.560 -5.204 0.0 0.1213 - 10.570 -5.511 0.0 0.1215 - 10.580 -5.797 0.0 0.1217 - 10.590 -6.059 0.0 0.1216 - 10.600 -6.290 0.0 0.1215 - 10.610 -6.489 0.0 0.1213 - 10.620 -6.650 0.0 0.1211 - 10.630 -6.771 0.0 0.1210 - 10.640 -6.850 0.0 0.1210 - 10.650 -6.888 0.0 0.1211 - 10.660 -6.886 0.0 0.1214 - 10.670 -6.845 0.0 0.1216 - 10.680 -6.769 0.0 0.1217 - 10.690 -6.663 0.0 0.1216 - 10.700 -6.532 0.0 0.1215 - 10.710 -6.380 0.0 0.1213 - 10.720 -6.212 0.0 0.1211 - 10.730 -6.032 0.0 0.1210 - 10.740 -5.844 0.0 0.1211 - 10.750 -5.648 0.0 0.1212 - 10.760 -5.445 0.0 0.1214 - 10.770 -5.234 0.0 0.1216 - 10.780 -5.013 0.0 0.1217 - 10.790 -4.780 0.0 0.1216 - 10.800 -4.529 0.0 0.1214 - 10.810 -4.257 0.0 0.1212 - 10.820 -3.959 0.0 0.1211 - 10.830 -3.633 0.0 0.1210 - 10.840 -3.274 0.0 0.1211 - 10.850 -2.880 0.0 0.1213 - 10.860 -2.452 0.0 0.1215 - 10.870 -1.989 0.0 0.1216 - 10.880 -1.494 0.0 0.1217 - 10.890 -0.970 0.0 0.1215 - 10.900 -0.421 0.0 0.1214 - 10.910 0.147 0.0 0.1211 - 10.920 0.727 0.0 0.1210 - 10.930 1.315 0.0 0.1210 - 10.940 1.901 0.0 0.1211 - 10.950 2.481 0.0 0.1213 - 10.960 3.047 0.0 0.1215 - 10.970 3.594 0.0 0.1217 - 10.980 4.115 0.0 0.1217 - 10.990 4.605 0.0 0.1216 - 11.000 5.060 0.0 0.1214 - 11.010 5.475 0.0 0.1212 - 11.020 5.846 0.0 0.1210 - 11.030 6.169 0.0 0.1210 - 11.040 6.441 0.0 0.1211 - 11.050 6.658 0.0 0.1213 - 11.060 6.817 0.0 0.1215 - 11.070 6.915 0.0 0.1216 - 11.080 6.950 0.0 0.1216 - 11.090 6.919 0.0 0.1215 - 11.100 6.823 0.0 0.1213 - 11.110 6.661 0.0 0.1211 - 11.120 6.434 0.0 0.1210 - 11.130 6.144 0.0 0.1210 - 11.140 5.793 0.0 0.1212 - 11.150 5.386 0.0 0.1214 - 11.160 4.929 0.0 0.1215 - 11.170 4.427 0.0 0.1216 - 11.180 3.888 0.0 0.1216 - 11.190 3.318 0.0 0.1214 - 11.200 2.725 0.0 0.1212 - 11.210 2.117 0.0 0.1211 - 11.220 1.502 0.0 0.1210 - 11.230 0.885 0.0 0.1210 - 11.240 0.272 0.0 0.1212 - 11.250 -0.330 0.0 0.1213 - 11.260 -0.918 0.0 0.1215 - 11.270 -1.488 0.0 0.1215 - 11.280 -2.037 0.0 0.1215 - 11.290 -2.563 0.0 0.1213 - 11.300 -3.065 0.0 0.1211 - 11.310 -3.539 0.0 0.1210 - 11.320 -3.986 0.0 0.1209 - 11.330 -4.404 0.0 0.1210 - 11.340 -4.791 0.0 0.1212 - 11.350 -5.146 0.0 0.1214 - 11.360 -5.467 0.0 0.1216 - 11.370 -5.752 0.0 0.1216 - 11.380 -5.999 0.0 0.1215 - 11.390 -6.206 0.0 0.1213 - 11.400 -6.371 0.0 0.1211 - 11.410 -6.493 0.0 0.1210 - 11.420 -6.571 0.0 0.1209 - 11.430 -6.605 0.0 0.1210 - 11.440 -6.595 0.0 0.1212 - 11.450 -6.543 0.0 0.1214 - 11.460 -6.450 0.0 0.1216 - 11.470 -6.319 0.0 0.1216 - 11.480 -6.154 0.0 0.1215 - 11.490 -5.958 0.0 0.1213 - 11.500 -5.735 0.0 0.1211 - 11.510 -5.488 0.0 0.1210 - 11.520 -5.222 0.0 0.1210 - 11.530 -4.940 0.0 0.1211 - 11.540 -4.646 0.0 0.1213 - 11.550 -4.342 0.0 0.1215 - 11.560 -4.031 0.0 0.1216 - 11.570 -3.713 0.0 0.1216 - 11.580 -3.391 0.0 0.1215 - 11.590 -3.064 0.0 0.1213 - 11.600 -2.734 0.0 0.1211 - 11.610 -2.399 0.0 0.1210 - 11.620 -2.062 0.0 0.1210 - 11.630 -1.720 0.0 0.1211 - 11.640 -1.375 0.0 0.1213 - 11.650 -1.026 0.0 0.1215 - 11.660 -0.673 0.0 0.1216 - 11.670 -0.319 0.0 0.1216 - 11.680 0.038 0.0 0.1215 - 11.690 0.395 0.0 0.1212 - 11.700 0.752 0.0 0.1210 - 11.710 1.106 0.0 0.1210 - 11.720 1.456 0.0 0.1210 - 11.730 1.800 0.0 0.1212 - 11.740 2.136 0.0 0.1214 - 11.750 2.461 0.0 0.1216 - 11.760 2.774 0.0 0.1217 - 11.770 3.071 0.0 0.1216 - 11.780 3.351 0.0 0.1215 - 11.790 3.611 0.0 0.1213 - 11.800 3.849 0.0 0.1211 - 11.810 4.063 0.0 0.1210 - 11.820 4.251 0.0 0.1210 - 11.830 4.411 0.0 0.1212 - 11.840 4.542 0.0 0.1214 - 11.850 4.644 0.0 0.1216 - 11.860 4.718 0.0 0.1216 - 11.870 4.763 0.0 0.1215 - 11.880 4.782 0.0 0.1214 - 11.890 4.776 0.0 0.1212 - 11.900 4.749 0.0 0.1210 - 11.910 4.704 0.0 0.1210 - 11.920 4.644 0.0 0.1211 - 11.930 4.574 0.0 0.1213 - 11.940 4.496 0.0 0.1215 - 11.950 4.416 0.0 0.1217 - 11.960 4.334 0.0 0.1217 - 11.970 4.254 0.0 0.1216 - 11.980 4.177 0.0 0.1214 - 11.990 4.102 0.0 0.1212 - 12.000 4.030 0.0 0.1211 - 12.010 3.959 0.0 0.1210 - 12.020 3.886 0.0 0.1211 - 12.030 3.809 0.0 0.1213 - 12.040 3.725 0.0 0.1215 - 12.050 3.631 0.0 0.1216 - 12.060 3.524 0.0 0.1217 - 12.070 3.403 0.0 0.1216 - 12.080 3.266 0.0 0.1214 - 12.090 3.115 0.0 0.1212 - 12.100 2.950 0.0 0.1211 - 12.110 2.775 0.0 0.1211 - 12.120 2.593 0.0 0.1212 - 12.130 2.411 0.0 0.1214 - 12.140 2.233 0.0 0.1215 - 12.150 2.066 0.0 0.1216 - 12.160 1.916 0.0 0.1216 - 12.170 1.789 0.0 0.1215 - 12.180 1.690 0.0 0.1213 - 12.190 1.622 0.0 0.1211 - 12.200 1.587 0.0 0.1210 - 12.210 1.587 0.0 0.1210 - 12.220 1.620 0.0 0.1211 - 12.230 1.684 0.0 0.1213 - 12.240 1.774 0.0 0.1215 - 12.250 1.886 0.0 0.1216 - 12.260 2.013 0.0 0.1216 - 12.270 2.150 0.0 0.1215 - 12.280 2.290 0.0 0.1213 - 12.290 2.427 0.0 0.1211 - 12.300 2.556 0.0 0.1210 - 12.310 2.673 0.0 0.1210 - 12.320 2.775 0.0 0.1212 - 12.330 2.860 0.0 0.1213 - 12.340 2.928 0.0 0.1215 - 12.350 2.979 0.0 0.1215 - 12.360 3.015 0.0 0.1215 - 12.370 3.036 0.0 0.1214 - 12.380 3.046 0.0 0.1212 - 12.390 3.045 0.0 0.1211 - 12.400 3.035 0.0 0.1210 - 12.410 3.016 0.0 0.1211 - 12.420 2.987 0.0 0.1212 - 12.430 2.947 0.0 0.1214 - 12.440 2.894 0.0 0.1215 - 12.450 2.825 0.0 0.1216 - 12.460 2.736 0.0 0.1215 - 12.470 2.625 0.0 0.1213 - 12.480 2.488 0.0 0.1211 - 12.490 2.322 0.0 0.1210 - 12.500 2.127 0.0 0.1209 - 12.510 1.901 0.0 0.1210 - 12.520 1.647 0.0 0.1212 - 12.530 1.367 0.0 0.1214 - 12.540 1.064 0.0 0.1215 - 12.550 0.745 0.0 0.1215 - 12.560 0.416 0.0 0.1214 - 12.570 0.083 0.0 0.1213 - 12.580 -0.245 0.0 0.1211 - 12.590 -0.561 0.0 0.1210 - 12.600 -0.858 0.0 0.1210 - 12.610 -1.131 0.0 0.1211 - 12.620 -1.376 0.0 0.1213 - 12.630 -1.588 0.0 0.1215 - 12.640 -1.767 0.0 0.1216 - 12.650 -1.912 0.0 0.1216 - 12.660 -2.026 0.0 0.1214 - 12.670 -2.111 0.0 0.1212 - 12.680 -2.172 0.0 0.1210 - 12.690 -2.212 0.0 0.1209 - 12.700 -2.237 0.0 0.1210 - 12.710 -2.251 0.0 0.1211 - 12.720 -2.259 0.0 0.1213 - 12.730 -2.264 0.0 0.1215 - 12.740 -2.269 0.0 0.1216 - 12.750 -2.276 0.0 0.1216 - 12.760 -2.285 0.0 0.1215 - 12.770 -2.297 0.0 0.1213 - 12.780 -2.310 0.0 0.1211 - 12.790 -2.324 0.0 0.1210 - 12.800 -2.336 0.0 0.1210 - 12.810 -2.345 0.0 0.1212 - 12.820 -2.350 0.0 0.1214 - 12.830 -2.349 0.0 0.1216 - 12.840 -2.343 0.0 0.1216 - 12.850 -2.333 0.0 0.1216 - 12.860 -2.319 0.0 0.1214 - 12.870 -2.303 0.0 0.1212 - 12.880 -2.289 0.0 0.1211 - 12.890 -2.279 0.0 0.1210 - 12.900 -2.275 0.0 0.1210 - 12.910 -2.282 0.0 0.1212 - 12.920 -2.301 0.0 0.1214 - 12.930 -2.333 0.0 0.1216 - 12.940 -2.381 0.0 0.1217 - 12.950 -2.444 0.0 0.1216 - 12.960 -2.521 0.0 0.1215 - 12.970 -2.612 0.0 0.1212 - 12.980 -2.712 0.0 0.1210 - 12.990 -2.820 0.0 0.1210 - 13.000 -2.931 0.0 0.1210 - 13.010 -3.043 0.0 0.1212 - 13.020 -3.150 0.0 0.1214 - 13.030 -3.251 0.0 0.1216 - 13.040 -3.342 0.0 0.1217 - 13.050 -3.420 0.0 0.1216 - 13.060 -3.485 0.0 0.1215 - 13.070 -3.535 0.0 0.1213 - 13.080 -3.570 0.0 0.1211 - 13.090 -3.592 0.0 0.1210 - 13.100 -3.601 0.0 0.1211 - 13.110 -3.599 0.0 0.1212 - 13.120 -3.589 0.0 0.1214 - 13.130 -3.571 0.0 0.1216 - 13.140 -3.549 0.0 0.1216 - 13.150 -3.524 0.0 0.1216 - 13.160 -3.497 0.0 0.1214 - 13.170 -3.469 0.0 0.1212 - 13.180 -3.441 0.0 0.1211 - 13.190 -3.412 0.0 0.1210 - 13.200 -3.381 0.0 0.1211 - 13.210 -3.349 0.0 0.1213 - 13.220 -3.314 0.0 0.1215 - 13.230 -3.273 0.0 0.1216 - 13.240 -3.226 0.0 0.1216 - 13.250 -3.170 0.0 0.1216 - 13.260 -3.105 0.0 0.1214 - 13.270 -3.028 0.0 0.1212 - 13.280 -2.939 0.0 0.1211 - 13.290 -2.836 0.0 0.1210 - 13.300 -2.719 0.0 0.1211 - 13.310 -2.587 0.0 0.1213 - 13.320 -2.440 0.0 0.1214 - 13.330 -2.277 0.0 0.1215 - 13.340 -2.100 0.0 0.1216 - 13.350 -1.907 0.0 0.1215 - 13.360 -1.701 0.0 0.1213 - 13.370 -1.483 0.0 0.1212 - 13.380 -1.252 0.0 0.1211 - 13.390 -1.012 0.0 0.1211 - 13.400 -0.763 0.0 0.1212 - 13.410 -0.508 0.0 0.1213 - 13.420 -0.251 0.0 0.1215 - 13.430 0.007 0.0 0.1216 - 13.440 0.261 0.0 0.1215 - 13.450 0.507 0.0 0.1214 - 13.460 0.743 0.0 0.1212 - 13.470 0.962 0.0 0.1211 - 13.480 1.162 0.0 0.1210 - 13.490 1.338 0.0 0.1210 - 13.500 1.486 0.0 0.1212 - 13.510 1.604 0.0 0.1213 - 13.520 1.689 0.0 0.1215 - 13.530 1.739 0.0 0.1216 - 13.540 1.755 0.0 0.1215 - 13.550 1.735 0.0 0.1214 - 13.560 1.682 0.0 0.1213 - 13.570 1.599 0.0 0.1212 - 13.580 1.489 0.0 0.1211 - 13.590 1.357 0.0 0.1211 - 13.600 1.208 0.0 0.1212 - 13.610 1.047 0.0 0.1213 - 13.620 0.882 0.0 0.1214 - 13.630 0.717 0.0 0.1215 - 13.640 0.559 0.0 0.1214 - 13.650 0.412 0.0 0.1213 - 13.660 0.282 0.0 0.1211 - 13.670 0.171 0.0 0.1211 - 13.680 0.081 0.0 0.1210 - 13.690 0.014 0.0 0.1211 - 13.700 -0.031 0.0 0.1213 - 13.710 -0.054 0.0 0.1214 - 13.720 -0.059 0.0 0.1215 - 13.730 -0.048 0.0 0.1215 - 13.740 -0.025 0.0 0.1214 - 13.750 0.006 0.0 0.1213 - 13.760 0.041 0.0 0.1211 - 13.770 0.075 0.0 0.1210 - 13.780 0.105 0.0 0.1210 - 13.790 0.128 0.0 0.1211 - 13.800 0.141 0.0 0.1213 - 13.810 0.143 0.0 0.1215 - 13.820 0.131 0.0 0.1216 - 13.830 0.107 0.0 0.1215 - 13.840 0.070 0.0 0.1214 - 13.850 0.021 0.0 0.1213 - 13.860 -0.039 0.0 0.1212 - 13.870 -0.109 0.0 0.1211 - 13.880 -0.187 0.0 0.1211 - 13.890 -0.273 0.0 0.1212 - 13.900 -0.364 0.0 0.1214 - 13.910 -0.461 0.0 0.1215 - 13.920 -0.564 0.0 0.1216 - 13.930 -0.671 0.0 0.1215 - 13.940 -0.782 0.0 0.1214 - 13.950 -0.897 0.0 0.1212 - 13.960 -1.017 0.0 0.1210 - 13.970 -1.138 0.0 0.1210 - 13.980 -1.261 0.0 0.1210 - 13.990 -1.381 0.0 0.1212 - 14.000 -1.497 0.0 0.1214 - 14.010 -1.605 0.0 0.1215 - 14.020 -1.699 0.0 0.1216 - 14.030 -1.774 0.0 0.1216 - 14.040 -1.825 0.0 0.1214 - 14.050 -1.846 0.0 0.1212 - 14.060 -1.830 0.0 0.1211 - 14.070 -1.775 0.0 0.1210 - 14.080 -1.674 0.0 0.1211 - 14.090 -1.526 0.0 0.1212 - 14.100 -1.330 0.0 0.1214 - 14.110 -1.085 0.0 0.1215 - 14.120 -0.795 0.0 0.1216 - 14.130 -0.463 0.0 0.1215 - 14.140 -0.094 0.0 0.1214 - 14.150 0.302 0.0 0.1212 - 14.160 0.720 0.0 0.1211 - 14.170 1.148 0.0 0.1211 - 14.180 1.579 0.0 0.1212 - 14.190 2.002 0.0 0.1213 - 14.200 2.410 0.0 0.1215 - 14.210 2.795 0.0 0.1216 - 14.220 3.150 0.0 0.1216 - 14.230 3.470 0.0 0.1215 - 14.240 3.753 0.0 0.1214 - 14.250 3.998 0.0 0.1212 - 14.260 4.203 0.0 0.1211 - 14.270 4.370 0.0 0.1211 - 14.280 4.503 0.0 0.1212 - 14.290 4.603 0.0 0.1213 - 14.300 4.674 0.0 0.1215 - 14.310 4.722 0.0 0.1216 - 14.320 4.748 0.0 0.1216 - 14.330 4.756 0.0 0.1215 - 14.340 4.750 0.0 0.1214 - 14.350 4.732 0.0 0.1212 - 14.360 4.703 0.0 0.1211 - 14.370 4.666 0.0 0.1211 - 14.380 4.622 0.0 0.1212 - 14.390 4.572 0.0 0.1213 - 14.400 4.519 0.0 0.1215 - 14.410 4.464 0.0 0.1215 - 14.420 4.410 0.0 0.1215 - 14.430 4.361 0.0 0.1215 - 14.440 4.320 0.0 0.1213 - 14.450 4.290 0.0 0.1212 - 14.460 4.276 0.0 0.1211 - 14.470 4.282 0.0 0.1211 - 14.480 4.310 0.0 0.1212 - 14.490 4.363 0.0 0.1214 - 14.500 4.442 0.0 0.1215 - 14.510 4.546 0.0 0.1216 - 14.520 4.674 0.0 0.1216 - 14.530 4.820 0.0 0.1215 - 14.540 4.980 0.0 0.1213 - 14.550 5.145 0.0 0.1211 - 14.560 5.308 0.0 0.1211 - 14.570 5.460 0.0 0.1211 - 14.580 5.591 0.0 0.1212 - 14.590 5.691 0.0 0.1213 - 14.600 5.752 0.0 0.1214 - 14.610 5.768 0.0 0.1215 - 14.620 5.734 0.0 0.1214 - 14.630 5.646 0.0 0.1213 - 14.640 5.503 0.0 0.1212 - 14.650 5.307 0.0 0.1211 - 14.660 5.063 0.0 0.1210 - 14.670 4.775 0.0 0.1211 - 14.680 4.451 0.0 0.1212 - 14.690 4.098 0.0 0.1214 - 14.700 3.724 0.0 0.1215 - 14.710 3.337 0.0 0.1215 - 14.720 2.945 0.0 0.1215 - 14.730 2.554 0.0 0.1213 - 14.740 2.166 0.0 0.1212 - 14.750 1.786 0.0 0.1211 - 14.760 1.414 0.0 0.1211 - 14.770 1.049 0.0 0.1211 - 14.780 0.689 0.0 0.1213 - 14.790 0.333 0.0 0.1214 - 14.800 -0.023 0.0 0.1215 - 14.810 -0.383 0.0 0.1215 - 14.820 -0.746 0.0 0.1215 - 14.830 -1.116 0.0 0.1213 - 14.840 -1.491 0.0 0.1212 - 14.850 -1.869 0.0 0.1211 - 14.860 -2.248 0.0 0.1211 - 14.870 -2.622 0.0 0.1211 - 14.880 -2.986 0.0 0.1213 - 14.890 -3.333 0.0 0.1214 - 14.900 -3.657 0.0 0.1215 - 14.910 -3.952 0.0 0.1215 - 14.920 -4.213 0.0 0.1214 - 14.930 -4.434 0.0 0.1213 - 14.940 -4.615 0.0 0.1212 - 14.950 -4.754 0.0 0.1211 - 14.960 -4.852 0.0 0.1211 - 14.970 -4.914 0.0 0.1212 - 14.980 -4.942 0.0 0.1213 - 14.990 -4.942 0.0 0.1215 - 15.000 -4.921 0.0 0.1215 - 15.010 -4.884 0.0 0.1215 - 15.020 -4.837 0.0 0.1214 - 15.030 -4.785 0.0 0.1213 - 15.040 -4.730 0.0 0.1211 - 15.050 -4.676 0.0 0.1211 - 15.060 -4.622 0.0 0.1211 - 15.070 -4.568 0.0 0.1212 - 15.080 -4.511 0.0 0.1213 - 15.090 -4.449 0.0 0.1215 - 15.100 -4.380 0.0 0.1215 - 15.110 -4.299 0.0 0.1215 - 15.120 -4.204 0.0 0.1214 - 15.130 -4.096 0.0 0.1212 - 15.140 -3.973 0.0 0.1211 - 15.150 -3.838 0.0 0.1211 - 15.160 -3.693 0.0 0.1211 - 15.170 -3.544 0.0 0.1213 - 15.180 -3.397 0.0 0.1214 - 15.190 -3.257 0.0 0.1215 - 15.200 -3.131 0.0 0.1215 - 15.210 -3.025 0.0 0.1215 - 15.220 -2.943 0.0 0.1213 - 15.230 -2.888 0.0 0.1212 - 15.240 -2.862 0.0 0.1211 - 15.250 -2.863 0.0 0.1211 - 15.260 -2.888 0.0 0.1212 - 15.270 -2.931 0.0 0.1213 - 15.280 -2.986 0.0 0.1215 - 15.290 -3.044 0.0 0.1216 - 15.300 -3.097 0.0 0.1216 - 15.310 -3.137 0.0 0.1215 - 15.320 -3.155 0.0 0.1213 - 15.330 -3.146 0.0 0.1212 - 15.340 -3.106 0.0 0.1211 - 15.350 -3.035 0.0 0.1211 - 15.360 -2.932 0.0 0.1212 - 15.370 -2.804 0.0 0.1213 - 15.380 -2.654 0.0 0.1215 - 15.390 -2.492 0.0 0.1216 - 15.400 -2.326 0.0 0.1216 - 15.410 -2.165 0.0 0.1215 - 15.420 -2.018 0.0 0.1213 - 15.430 -1.892 0.0 0.1212 - 15.440 -1.793 0.0 0.1211 - 15.450 -1.725 0.0 0.1211 - 15.460 -1.687 0.0 0.1212 - 15.470 -1.677 0.0 0.1214 - 15.480 -1.690 0.0 0.1215 - 15.490 -1.720 0.0 0.1216 - 15.500 -1.757 0.0 0.1216 - 15.510 -1.793 0.0 0.1215 - 15.520 -1.819 0.0 0.1213 - 15.530 -1.825 0.0 0.1212 - 15.540 -1.806 0.0 0.1211 - 15.550 -1.757 0.0 0.1211 - 15.560 -1.677 0.0 0.1212 - 15.570 -1.566 0.0 0.1214 - 15.580 -1.430 0.0 0.1215 - 15.590 -1.273 0.0 0.1216 - 15.600 -1.106 0.0 0.1215 - 15.610 -0.939 0.0 0.1214 - 15.620 -0.782 0.0 0.1213 - 15.630 -0.645 0.0 0.1211 - 15.640 -0.537 0.0 0.1211 - 15.650 -0.467 0.0 0.1211 - 15.660 -0.437 0.0 0.1212 - 15.670 -0.450 0.0 0.1214 - 15.680 -0.505 0.0 0.1215 - 15.690 -0.596 0.0 0.1216 - 15.700 -0.716 0.0 0.1215 - 15.710 -0.857 0.0 0.1214 - 15.720 -1.006 0.0 0.1212 - 15.730 -1.152 0.0 0.1211 - 15.740 -1.284 0.0 0.1210 - 15.750 -1.392 0.0 0.1211 - 15.760 -1.465 0.0 0.1212 - 15.770 -1.498 0.0 0.1214 - 15.780 -1.486 0.0 0.1215 - 15.790 -1.428 0.0 0.1215 - 15.800 -1.325 0.0 0.1215 - 15.810 -1.181 0.0 0.1213 - 15.820 -1.001 0.0 0.1212 - 15.830 -0.793 0.0 0.1211 - 15.840 -0.564 0.0 0.1210 - 15.850 -0.323 0.0 0.1211 - 15.860 -0.078 0.0 0.1212 - 15.870 0.164 0.0 0.1214 - 15.880 0.398 0.0 0.1215 - 15.890 0.619 0.0 0.1215 - 15.900 0.824 0.0 0.1214 - 15.910 1.010 0.0 0.1213 - 15.920 1.178 0.0 0.1211 - 15.930 1.328 0.0 0.1210 - 15.940 1.459 0.0 0.1210 - 15.950 1.574 0.0 0.1211 - 15.960 1.671 0.0 0.1212 - 15.970 1.752 0.0 0.1214 - 15.980 1.815 0.0 0.1215 - 15.990 1.860 0.0 0.1215 - 16.000 1.884 0.0 0.1214 - 16.010 1.885 0.0 0.1213 - 16.020 1.861 0.0 0.1212 - 16.030 1.810 0.0 0.1211 - 16.040 1.731 0.0 0.1211 - 16.050 1.623 0.0 0.1212 - 16.060 1.488 0.0 0.1213 - 16.070 1.326 0.0 0.1214 - 16.080 1.143 0.0 0.1215 - 16.090 0.942 0.0 0.1215 - 16.100 0.731 0.0 0.1214 - 16.110 0.516 0.0 0.1213 - 16.120 0.305 0.0 0.1211 - 16.130 0.106 0.0 0.1211 - 16.140 -0.075 0.0 0.1211 - 16.150 -0.230 0.0 0.1212 - 16.160 -0.355 0.0 0.1213 - 16.170 -0.444 0.0 0.1215 - 16.180 -0.496 0.0 0.1215 - 16.190 -0.510 0.0 0.1215 - 16.200 -0.484 0.0 0.1214 - 16.210 -0.421 0.0 0.1212 - 16.220 -0.323 0.0 0.1211 - 16.230 -0.192 0.0 0.1211 - 16.240 -0.032 0.0 0.1211 - 16.250 0.155 0.0 0.1212 - 16.260 0.366 0.0 0.1213 - 16.270 0.599 0.0 0.1215 - 16.280 0.852 0.0 0.1215 - 16.290 1.124 0.0 0.1215 - 16.300 1.413 0.0 0.1214 - 16.310 1.720 0.0 0.1212 - 16.320 2.042 0.0 0.1211 - 16.330 2.378 0.0 0.1211 - 16.340 2.725 0.0 0.1212 - 16.350 3.079 0.0 0.1213 - 16.360 3.437 0.0 0.1215 - 16.370 3.793 0.0 0.1216 - 16.380 4.141 0.0 0.1216 - 16.390 4.475 0.0 0.1215 - 16.400 4.786 0.0 0.1214 - 16.410 5.070 0.0 0.1212 - 16.420 5.319 0.0 0.1211 - 16.430 5.529 0.0 0.1211 - 16.440 5.696 0.0 0.1212 - 16.450 5.818 0.0 0.1213 - 16.460 5.897 0.0 0.1214 - 16.470 5.932 0.0 0.1215 - 16.480 5.929 0.0 0.1215 - 16.490 5.891 0.0 0.1215 - 16.500 5.825 0.0 0.1213 - 16.510 5.736 0.0 0.1212 - 16.520 5.630 0.0 0.1211 - 16.530 5.513 0.0 0.1211 - 16.540 5.388 0.0 0.1212 - 16.550 5.258 0.0 0.1213 - 16.560 5.123 0.0 0.1215 - 16.570 4.982 0.0 0.1215 - 16.580 4.832 0.0 0.1215 - 16.590 4.669 0.0 0.1214 - 16.600 4.487 0.0 0.1213 - 16.610 4.280 0.0 0.1212 - 16.620 4.045 0.0 0.1211 - 16.630 3.776 0.0 0.1211 - 16.640 3.472 0.0 0.1212 - 16.650 3.131 0.0 0.1214 - 16.660 2.757 0.0 0.1215 - 16.670 2.352 0.0 0.1216 - 16.680 1.925 0.0 0.1215 - 16.690 1.484 0.0 0.1214 - 16.700 1.040 0.0 0.1213 - 16.710 0.603 0.0 0.1212 - 16.720 0.185 0.0 0.1211 - 16.730 -0.203 0.0 0.1211 - 16.740 -0.553 0.0 0.1212 - 16.750 -0.856 0.0 0.1213 - 16.760 -1.110 0.0 0.1215 - 16.770 -1.313 0.0 0.1215 - 16.780 -1.465 0.0 0.1215 - 16.790 -1.573 0.0 0.1214 - 16.800 -1.643 0.0 0.1212 - 16.810 -1.684 0.0 0.1211 - 16.820 -1.705 0.0 0.1211 - 16.830 -1.716 0.0 0.1212 - 16.840 -1.727 0.0 0.1213 - 16.850 -1.746 0.0 0.1214 - 16.860 -1.778 0.0 0.1215 - 16.870 -1.826 0.0 0.1215 - 16.880 -1.892 0.0 0.1214 - 16.890 -1.972 0.0 0.1213 - 16.900 -2.062 0.0 0.1212 - 16.910 -2.154 0.0 0.1211 - 16.920 -2.241 0.0 0.1211 - 16.930 -2.313 0.0 0.1211 - 16.940 -2.362 0.0 0.1213 - 16.950 -2.379 0.0 0.1214 - 16.960 -2.360 0.0 0.1215 - 16.970 -2.299 0.0 0.1215 - 16.980 -2.197 0.0 0.1214 - 16.990 -2.055 0.0 0.1213 - 17.000 -1.878 0.0 0.1212 - 17.010 -1.673 0.0 0.1211 - 17.020 -1.449 0.0 0.1211 - 17.030 -1.216 0.0 0.1212 - 17.040 -0.985 0.0 0.1213 - 17.050 -0.766 0.0 0.1214 - 17.060 -0.568 0.0 0.1215 - 17.070 -0.398 0.0 0.1215 - 17.080 -0.261 0.0 0.1214 - 17.090 -0.159 0.0 0.1212 - 17.100 -0.093 0.0 0.1211 - 17.110 -0.060 0.0 0.1210 - 17.120 -0.056 0.0 0.1211 - 17.130 -0.073 0.0 0.1212 - 17.140 -0.105 0.0 0.1213 - 17.150 -0.146 0.0 0.1215 - 17.160 -0.187 0.0 0.1215 - 17.170 -0.223 0.0 0.1215 - 17.180 -0.250 0.0 0.1214 - 17.190 -0.266 0.0 0.1213 - 17.200 -0.270 0.0 0.1211 - 17.210 -0.264 0.0 0.1211 - 17.220 -0.252 0.0 0.1211 - 17.230 -0.237 0.0 0.1212 - 17.240 -0.226 0.0 0.1213 - 17.250 -0.225 0.0 0.1215 - 17.260 -0.238 0.0 0.1215 - 17.270 -0.270 0.0 0.1215 - 17.280 -0.325 0.0 0.1214 - 17.290 -0.405 0.0 0.1212 - 17.300 -0.509 0.0 0.1211 - 17.310 -0.636 0.0 0.1211 - 17.320 -0.782 0.0 0.1211 - 17.330 -0.943 0.0 0.1213 - 17.340 -1.114 0.0 0.1214 - 17.350 -1.289 0.0 0.1215 - 17.360 -1.462 0.0 0.1216 - 17.370 -1.629 0.0 0.1215 - 17.380 -1.783 0.0 0.1214 - 17.390 -1.923 0.0 0.1212 - 17.400 -2.046 0.0 0.1211 - 17.410 -2.151 0.0 0.1211 - 17.420 -2.237 0.0 0.1211 - 17.430 -2.307 0.0 0.1213 - 17.440 -2.360 0.0 0.1214 - 17.450 -2.399 0.0 0.1215 - 17.460 -2.425 0.0 0.1216 - 17.470 -2.439 0.0 0.1215 - 17.480 -2.441 0.0 0.1214 - 17.490 -2.431 0.0 0.1213 - 17.500 -2.407 0.0 0.1211 - 17.510 -2.369 0.0 0.1211 - 17.520 -2.313 0.0 0.1212 - 17.530 -2.239 0.0 0.1213 - 17.540 -2.145 0.0 0.1214 - 17.550 -2.031 0.0 0.1215 - 17.560 -1.896 0.0 0.1215 - 17.570 -1.743 0.0 0.1215 - 17.580 -1.575 0.0 0.1213 - 17.590 -1.397 0.0 0.1212 - 17.600 -1.216 0.0 0.1211 - 17.610 -1.038 0.0 0.1211 - 17.620 -0.873 0.0 0.1212 - 17.630 -0.727 0.0 0.1213 - 17.640 -0.610 0.0 0.1215 - 17.650 -0.528 0.0 0.1216 - 17.660 -0.486 0.0 0.1216 - 17.670 -0.488 0.0 0.1215 - 17.680 -0.536 0.0 0.1214 - 17.690 -0.628 0.0 0.1212 - 17.700 -0.761 0.0 0.1211 - 17.710 -0.930 0.0 0.1211 - 17.720 -1.127 0.0 0.1212 - 17.730 -1.343 0.0 0.1213 - 17.740 -1.570 0.0 0.1215 - 17.750 -1.797 0.0 0.1215 - 17.760 -2.015 0.0 0.1215 - 17.770 -2.217 0.0 0.1214 - 17.780 -2.396 0.0 0.1213 - 17.790 -2.547 0.0 0.1211 - 17.800 -2.666 0.0 0.1211 - 17.810 -2.754 0.0 0.1211 - 17.820 -2.810 0.0 0.1212 - 17.830 -2.837 0.0 0.1214 - 17.840 -2.839 0.0 0.1215 - 17.850 -2.819 0.0 0.1216 - 17.860 -2.781 0.0 0.1215 - 17.870 -2.730 0.0 0.1214 - 17.880 -2.668 0.0 0.1213 - 17.890 -2.599 0.0 0.1211 - 17.900 -2.522 0.0 0.1210 - 17.910 -2.438 0.0 0.1211 - 17.920 -2.346 0.0 0.1212 - 17.930 -2.244 0.0 0.1213 - 17.940 -2.130 0.0 0.1214 - 17.950 -2.001 0.0 0.1215 - 17.960 -1.855 0.0 0.1215 - 17.970 -1.690 0.0 0.1214 - 17.980 -1.505 0.0 0.1213 - 17.990 -1.302 0.0 0.1211 - 18.000 -1.080 0.0 0.1211 - 18.010 -0.845 0.0 0.1211 - 18.020 -0.598 0.0 0.1212 - 18.030 -0.344 0.0 0.1213 - 18.040 -0.090 0.0 0.1215 - 18.050 0.161 0.0 0.1215 - 18.060 0.404 0.0 0.1215 - 18.070 0.635 0.0 0.1214 - 18.080 0.849 0.0 0.1212 - 18.090 1.047 0.0 0.1211 - 18.100 1.226 0.0 0.1211 - 18.110 1.387 0.0 0.1211 - 18.120 1.532 0.0 0.1212 - 18.130 1.662 0.0 0.1214 - 18.140 1.779 0.0 0.1215 - 18.150 1.887 0.0 0.1215 - 18.160 1.987 0.0 0.1214 - 18.170 2.081 0.0 0.1213 - 18.180 2.170 0.0 0.1212 - 18.190 2.251 0.0 0.1211 - 18.200 2.325 0.0 0.1211 - 18.210 2.388 0.0 0.1212 - 18.220 2.437 0.0 0.1213 - 18.230 2.467 0.0 0.1214 - 18.240 2.475 0.0 0.1214 - 18.250 2.457 0.0 0.1215 - 18.260 2.410 0.0 0.1214 - 18.270 2.332 0.0 0.1213 - 18.280 2.224 0.0 0.1212 - 18.290 2.086 0.0 0.1211 - 18.300 1.922 0.0 0.1211 - 18.310 1.736 0.0 0.1212 - 18.320 1.534 0.0 0.1213 - 18.330 1.324 0.0 0.1214 - 18.340 1.113 0.0 0.1215 - 18.350 0.909 0.0 0.1215 - 18.360 0.719 0.0 0.1214 - 18.370 0.550 0.0 0.1213 - 18.380 0.406 0.0 0.1212 - 18.390 0.291 0.0 0.1211 - 18.400 0.207 0.0 0.1211 - 18.410 0.153 0.0 0.1212 - 18.420 0.127 0.0 0.1213 - 18.430 0.126 0.0 0.1214 - 18.440 0.145 0.0 0.1215 - 18.450 0.180 0.0 0.1215 - 18.460 0.224 0.0 0.1214 - 18.470 0.273 0.0 0.1213 - 18.480 0.323 0.0 0.1212 - 18.490 0.370 0.0 0.1212 - 18.500 0.413 0.0 0.1212 - 18.510 0.452 0.0 0.1213 - 18.520 0.486 0.0 0.1214 - 18.530 0.519 0.0 0.1215 - 18.540 0.553 0.0 0.1215 - 18.550 0.592 0.0 0.1214 - 18.560 0.640 0.0 0.1213 - 18.570 0.700 0.0 0.1212 - 18.580 0.775 0.0 0.1212 - 18.590 0.866 0.0 0.1212 - 18.600 0.973 0.0 0.1212 - 18.610 1.097 0.0 0.1213 - 18.620 1.233 0.0 0.1214 - 18.630 1.379 0.0 0.1215 - 18.640 1.530 0.0 0.1215 - 18.650 1.681 0.0 0.1215 - 18.660 1.827 0.0 0.1213 - 18.670 1.963 0.0 0.1212 - 18.680 2.085 0.0 0.1212 - 18.690 2.188 0.0 0.1212 - 18.700 2.271 0.0 0.1212 - 18.710 2.333 0.0 0.1213 - 18.720 2.374 0.0 0.1215 - 18.730 2.396 0.0 0.1215 - 18.740 2.402 0.0 0.1215 - 18.750 2.394 0.0 0.1214 - 18.760 2.376 0.0 0.1213 - 18.770 2.351 0.0 0.1212 - 18.780 2.323 0.0 0.1211 - 18.790 2.292 0.0 0.1211 - 18.800 2.261 0.0 0.1212 - 18.810 2.228 0.0 0.1214 - 18.820 2.193 0.0 0.1215 - 18.830 2.154 0.0 0.1215 - 18.840 2.106 0.0 0.1215 - 18.850 2.047 0.0 0.1214 - 18.860 1.973 0.0 0.1213 - 18.870 1.880 0.0 0.1211 - 18.880 1.767 0.0 0.1211 - 18.890 1.631 0.0 0.1211 - 18.900 1.474 0.0 0.1212 - 18.910 1.296 0.0 0.1213 - 18.920 1.100 0.0 0.1214 - 18.930 0.892 0.0 0.1215 - 18.940 0.678 0.0 0.1215 - 18.950 0.462 0.0 0.1214 - 18.960 0.254 0.0 0.1213 - 18.970 0.060 0.0 0.1212 - 18.980 -0.114 0.0 0.1211 - 18.990 -0.262 0.0 0.1212 - 19.000 -0.380 0.0 0.1213 - 19.010 -0.465 0.0 0.1214 - 19.020 -0.517 0.0 0.1215 - 19.030 -0.536 0.0 0.1215 - 19.040 -0.526 0.0 0.1214 - 19.050 -0.490 0.0 0.1213 - 19.060 -0.434 0.0 0.1212 - 19.070 -0.363 0.0 0.1211 - 19.080 -0.284 0.0 0.1211 - 19.090 -0.203 0.0 0.1211 - 19.100 -0.125 0.0 0.1212 - 19.110 -0.055 0.0 0.1214 - 19.120 0.005 0.0 0.1215 - 19.130 0.054 0.0 0.1215 - 19.140 0.090 0.0 0.1214 - 19.150 0.114 0.0 0.1213 - 19.160 0.130 0.0 0.1212 - 19.170 0.139 0.0 0.1211 - 19.180 0.146 0.0 0.1211 - 19.190 0.152 0.0 0.1212 - 19.200 0.161 0.0 0.1213 - 19.210 0.175 0.0 0.1214 - 19.220 0.195 0.0 0.1215 - 19.230 0.221 0.0 0.1215 - 19.240 0.253 0.0 0.1214 - 19.250 0.287 0.0 0.1213 - 19.260 0.321 0.0 0.1212 - 19.270 0.351 0.0 0.1211 - 19.280 0.373 0.0 0.1211 - 19.290 0.383 0.0 0.1212 - 19.300 0.377 0.0 0.1213 - 19.310 0.354 0.0 0.1214 - 19.320 0.310 0.0 0.1215 - 19.330 0.245 0.0 0.1215 - 19.340 0.160 0.0 0.1214 - 19.350 0.057 0.0 0.1213 - 19.360 -0.060 0.0 0.1212 - 19.370 -0.187 0.0 0.1211 - 19.380 -0.320 0.0 0.1211 - 19.390 -0.453 0.0 0.1212 - 19.400 -0.580 0.0 0.1213 - 19.410 -0.696 0.0 0.1214 - 19.420 -0.798 0.0 0.1215 - 19.430 -0.880 0.0 0.1215 - 19.440 -0.942 0.0 0.1214 - 19.450 -0.981 0.0 0.1213 - 19.460 -0.999 0.0 0.1211 - 19.470 -0.996 0.0 0.1211 - 19.480 -0.976 0.0 0.1211 - 19.490 -0.941 0.0 0.1212 - 19.500 -0.896 0.0 0.1213 - 19.510 -0.845 0.0 0.1214 - 19.520 -0.793 0.0 0.1215 - 19.530 -0.743 0.0 0.1215 - 19.540 -0.699 0.0 0.1214 - 19.550 -0.664 0.0 0.1213 - 19.560 -0.641 0.0 0.1212 - 19.570 -0.631 0.0 0.1211 - 19.580 -0.634 0.0 0.1211 - 19.590 -0.650 0.0 0.1212 - 19.600 -0.678 0.0 0.1214 - 19.610 -0.718 0.0 0.1215 - 19.620 -0.767 0.0 0.1215 - 19.630 -0.825 0.0 0.1215 - 19.640 -0.888 0.0 0.1214 - 19.650 -0.957 0.0 0.1213 - 19.660 -1.028 0.0 0.1212 - 19.670 -1.102 0.0 0.1211 - 19.680 -1.176 0.0 0.1212 - 19.690 -1.250 0.0 0.1213 - 19.700 -1.323 0.0 0.1214 - 19.710 -1.395 0.0 0.1215 - 19.720 -1.463 0.0 0.1215 - 19.730 -1.529 0.0 0.1215 - 19.740 -1.589 0.0 0.1214 - 19.750 -1.643 0.0 0.1213 - 19.760 -1.690 0.0 0.1212 - 19.770 -1.727 0.0 0.1212 - 19.780 -1.754 0.0 0.1212 - 19.790 -1.767 0.0 0.1213 - 19.800 -1.767 0.0 0.1214 - 19.810 -1.751 0.0 0.1215 - 19.820 -1.720 0.0 0.1215 - 19.830 -1.672 0.0 0.1215 - 19.840 -1.609 0.0 0.1213 - 19.850 -1.530 0.0 0.1212 - 19.860 -1.438 0.0 0.1211 - 19.870 -1.334 0.0 0.1211 - 19.880 -1.219 0.0 0.1212 - 19.890 -1.097 0.0 0.1213 - 19.900 -0.969 0.0 0.1214 - 19.910 -0.837 0.0 0.1215 - 19.920 -0.703 0.0 0.1215 - 19.930 -0.568 0.0 0.1214 - 19.940 -0.432 0.0 0.1213 - 19.950 -0.298 0.0 0.1212 - 19.960 -0.163 0.0 0.1211 - 19.970 -0.028 0.0 0.1211 - 19.980 0.108 0.0 0.1212 - 19.990 0.245 0.0 0.1213 - 20.000 0.384 0.0 0.1214 diff --git a/diffpy/pdffit2/tests/testdata/Ni.dat b/diffpy/pdffit2/tests/testdata/Ni.dat deleted file mode 100644 index 360a4d6b..00000000 --- a/diffpy/pdffit2/tests/testdata/Ni.dat +++ /dev/null @@ -1,1001 +0,0 @@ - 1.50000 -0.539443 0.00000 1.00000 0.539443 - 1.51850 -1.03098 0.00000 1.00000 1.03098 - 1.53700 -1.43712 0.00000 1.00000 1.43712 - 1.55550 -1.73810 0.00000 1.00000 1.73810 - 1.57400 -1.93402 0.00000 1.00000 1.93402 - 1.59250 -2.04145 0.00000 1.00000 2.04145 - 1.61100 -2.08593 0.00000 1.00000 2.08593 - 1.62950 -2.09295 0.00000 1.00000 2.09295 - 1.64800 -2.08072 0.00000 1.00000 2.08072 - 1.66650 -2.05688 0.00000 1.00000 2.05688 - 1.68500 -2.02006 0.00000 1.00000 2.02006 - 1.70350 -1.96554 0.00000 1.00000 1.96554 - 1.72200 -1.89239 0.00000 1.00000 1.89239 - 1.74050 -1.80936 0.00000 1.00000 1.80936 - 1.75900 -1.73670 0.00000 1.00000 1.73670 - 1.77750 -1.70255 0.00000 1.00000 1.70255 - 1.79600 -1.73461 0.00000 1.00000 1.73461 - 1.81450 -1.84946 0.00000 1.00000 1.84946 - 1.83300 -2.04300 0.00000 1.00000 2.04300 - 1.85150 -2.28566 0.00000 1.00000 2.28566 - 1.87000 -2.52486 0.00000 1.00000 2.52486 - 1.88850 -2.69615 0.00000 1.00000 2.69615 - 1.90700 -2.74180 0.00000 1.00000 2.74180 - 1.92550 -2.63223 0.00000 1.00000 2.63223 - 1.94400 -2.38239 0.00000 1.00000 2.38239 - 1.96250 -2.05565 0.00000 1.00000 2.05565 - 1.98100 -1.75092 0.00000 1.00000 1.75092 - 1.99950 -1.57518 0.00000 1.00000 1.57518 - 2.01800 -1.60914 0.00000 1.00000 1.60914 - 2.03650 -1.87687 0.00000 1.00000 1.87687 - 2.05500 -2.33004 0.00000 1.00000 2.33004 - 2.07350 -2.85357 0.00000 1.00000 2.85357 - 2.09200 -3.29353 0.00000 1.00000 3.29353 - 2.11050 -3.50124 0.00000 1.00000 3.50124 - 2.12900 -3.38172 0.00000 1.00000 3.38172 - 2.14750 -2.93205 0.00000 1.00000 2.93205 - 2.16600 -2.25629 0.00000 1.00000 2.25629 - 2.18450 -1.54918 0.00000 1.00000 1.54918 - 2.20300 -1.04888 0.00000 1.00000 1.04888 - 2.22150 -0.968136 0.00000 1.00000 0.968136 - 2.24000 -1.42070 0.00000 1.00000 1.42070 - 2.25850 -2.36300 0.00000 1.00000 2.36300 - 2.27700 -3.56960 0.00000 1.00000 3.56960 - 2.29550 -4.65416 0.00000 1.00000 4.65416 - 2.31400 -5.13684 0.00000 1.00000 5.13684 - 2.33250 -4.54696 0.00000 1.00000 4.54696 - 2.35100 -2.53890 0.00000 1.00000 2.53890 - 2.36950 1.00656 0.00000 1.00000 -1.00656 - 2.38800 5.92223 0.00000 1.00000 -5.92223 - 2.40650 11.7527 0.00000 1.00000 -11.7527 - 2.42500 17.8143 0.00000 1.00000 -17.8143 - 2.44350 23.3057 0.00000 1.00000 -23.3057 - 2.46200 27.4478 0.00000 1.00000 -27.4478 - 2.48050 29.6246 0.00000 1.00000 -29.6246 - 2.49900 29.4986 0.00000 1.00000 -29.4986 - 2.51750 27.0749 0.00000 1.00000 -27.0749 - 2.53600 22.7028 0.00000 1.00000 -22.7028 - 2.55450 17.0112 0.00000 1.00000 -17.0112 - 2.57300 10.7932 0.00000 1.00000 -10.7932 - 2.59150 4.86134 0.00000 1.00000 -4.86134 - 2.61000 -0.0945224 0.00000 1.00000 0.0945224 - 2.62850 -3.61858 0.00000 1.00000 3.61858 - 2.64700 -5.54803 0.00000 1.00000 5.54803 - 2.66550 -6.01016 0.00000 1.00000 6.01016 - 2.68400 -5.36293 0.00000 1.00000 5.36293 - 2.70250 -4.09596 0.00000 1.00000 4.09596 - 2.72100 -2.71625 0.00000 1.00000 2.71625 - 2.73950 -1.64382 0.00000 1.00000 1.64382 - 2.75800 -1.13791 0.00000 1.00000 1.13791 - 2.77650 -1.26649 0.00000 1.00000 1.26649 - 2.79500 -1.92103 0.00000 1.00000 1.92103 - 2.81350 -2.86890 0.00000 1.00000 2.86890 - 2.83200 -3.82782 0.00000 1.00000 3.82782 - 2.85050 -4.54328 0.00000 1.00000 4.54328 - 2.86900 -4.85054 0.00000 1.00000 4.85054 - 2.88750 -4.70809 0.00000 1.00000 4.70809 - 2.90600 -4.19687 0.00000 1.00000 4.19687 - 2.92450 -3.48841 0.00000 1.00000 3.48841 - 2.94300 -2.79256 0.00000 1.00000 2.79256 - 2.96150 -2.29993 0.00000 1.00000 2.29993 - 2.98000 -2.13422 0.00000 1.00000 2.13422 - 2.99850 -2.32552 0.00000 1.00000 2.32552 - 3.01700 -2.80931 0.00000 1.00000 2.80931 - 3.03550 -3.44928 0.00000 1.00000 3.44928 - 3.05400 -4.07624 0.00000 1.00000 4.07624 - 3.07250 -4.53264 0.00000 1.00000 4.53264 - 3.09100 -4.71141 0.00000 1.00000 4.71141 - 3.10950 -4.58013 0.00000 1.00000 4.58013 - 3.12800 -4.18572 0.00000 1.00000 4.18572 - 3.14650 -3.63955 0.00000 1.00000 3.63955 - 3.16500 -3.08796 0.00000 1.00000 3.08796 - 3.18350 -2.67579 0.00000 1.00000 2.67579 - 3.20200 -2.51194 0.00000 1.00000 2.51194 - 3.22050 -2.64475 0.00000 1.00000 2.64475 - 3.23900 -3.05186 0.00000 1.00000 3.05186 - 3.25750 -3.64576 0.00000 1.00000 3.64576 - 3.27600 -4.29257 0.00000 1.00000 4.29257 - 3.29450 -4.83876 0.00000 1.00000 4.83876 - 3.31300 -5.14008 0.00000 1.00000 5.14008 - 3.33150 -5.08721 0.00000 1.00000 5.08721 - 3.35000 -4.62391 0.00000 1.00000 4.62391 - 3.36850 -3.75470 0.00000 1.00000 3.75470 - 3.38700 -2.54063 0.00000 1.00000 2.54063 - 3.40550 -1.08396 0.00000 1.00000 1.08396 - 3.42400 0.493223 0.00000 1.00000 -0.493223 - 3.44250 2.06874 0.00000 1.00000 -2.06874 - 3.46100 3.53152 0.00000 1.00000 -3.53152 - 3.47950 4.78254 0.00000 1.00000 -4.78254 - 3.49800 5.72969 0.00000 1.00000 -5.72969 - 3.51650 6.28423 0.00000 1.00000 -6.28423 - 3.53500 6.36504 0.00000 1.00000 -6.36504 - 3.55350 5.91247 0.00000 1.00000 -5.91247 - 3.57200 4.90861 0.00000 1.00000 -4.90861 - 3.59050 3.39740 0.00000 1.00000 -3.39740 - 3.60900 1.49612 0.00000 1.00000 -1.49612 - 3.62750 -0.608193 0.00000 1.00000 0.608193 - 3.64600 -2.68019 0.00000 1.00000 2.68019 - 3.66450 -4.47243 0.00000 1.00000 4.47243 - 3.68300 -5.76925 0.00000 1.00000 5.76925 - 3.70150 -6.42920 0.00000 1.00000 6.42920 - 3.72000 -6.41719 0.00000 1.00000 6.41719 - 3.73850 -5.81875 0.00000 1.00000 5.81875 - 3.75700 -4.83074 0.00000 1.00000 4.83074 - 3.77550 -3.72667 0.00000 1.00000 3.72667 - 3.79400 -2.80071 0.00000 1.00000 2.80071 - 3.81250 -2.30147 0.00000 1.00000 2.30147 - 3.83100 -2.37126 0.00000 1.00000 2.37126 - 3.84950 -3.00713 0.00000 1.00000 3.00713 - 3.86800 -4.05566 0.00000 1.00000 4.05566 - 3.88650 -5.24604 0.00000 1.00000 5.24604 - 3.90500 -6.25585 0.00000 1.00000 6.25585 - 3.92350 -6.79521 0.00000 1.00000 6.79521 - 3.94200 -6.68830 0.00000 1.00000 6.68830 - 3.96050 -5.93010 0.00000 1.00000 5.93010 - 3.97900 -4.70113 0.00000 1.00000 4.70113 - 3.99750 -3.33259 0.00000 1.00000 3.33259 - 4.01600 -2.22683 0.00000 1.00000 2.22683 - 4.03450 -1.75037 0.00000 1.00000 1.75037 - 4.05300 -2.12498 0.00000 1.00000 2.12498 - 4.07150 -3.34471 0.00000 1.00000 3.34471 - 4.09000 -5.14253 0.00000 1.00000 5.14253 - 4.10850 -7.01935 0.00000 1.00000 7.01935 - 4.12700 -8.33391 0.00000 1.00000 8.33391 - 4.14550 -8.43660 0.00000 1.00000 8.43660 - 4.16400 -6.81920 0.00000 1.00000 6.81920 - 4.18250 -3.24667 0.00000 1.00000 3.24667 - 4.20100 2.16009 0.00000 1.00000 -2.16009 - 4.21950 8.91152 0.00000 1.00000 -8.91152 - 4.23800 16.2134 0.00000 1.00000 -16.2134 - 4.25650 23.0973 0.00000 1.00000 -23.0973 - 4.27500 28.5935 0.00000 1.00000 -28.5935 - 4.29350 31.9106 0.00000 1.00000 -31.9106 - 4.31200 32.5842 0.00000 1.00000 -32.5842 - 4.33050 30.5617 0.00000 1.00000 -30.5617 - 4.34900 26.2027 0.00000 1.00000 -26.2027 - 4.36750 20.1990 0.00000 1.00000 -20.1990 - 4.38600 13.4320 0.00000 1.00000 -13.4320 - 4.40450 6.80337 0.00000 1.00000 -6.80337 - 4.42300 1.07527 0.00000 1.00000 -1.07527 - 4.44150 -3.24700 0.00000 1.00000 3.24700 - 4.46000 -5.96945 0.00000 1.00000 5.96945 - 4.47850 -7.19581 0.00000 1.00000 7.19581 - 4.49700 -7.25613 0.00000 1.00000 7.25613 - 4.51550 -6.59972 0.00000 1.00000 6.59972 - 4.53400 -5.68054 0.00000 1.00000 5.68054 - 4.55250 -4.86170 0.00000 1.00000 4.86170 - 4.57100 -4.35835 0.00000 1.00000 4.35835 - 4.58950 -4.22677 0.00000 1.00000 4.22677 - 4.60800 -4.39508 0.00000 1.00000 4.39508 - 4.62650 -4.72130 0.00000 1.00000 4.72130 - 4.64500 -5.05871 0.00000 1.00000 5.05871 - 4.66350 -5.30848 0.00000 1.00000 5.30848 - 4.68200 -5.44197 0.00000 1.00000 5.44197 - 4.70050 -5.50097 0.00000 1.00000 5.50097 - 4.71900 -5.56456 0.00000 1.00000 5.56456 - 4.73750 -5.69659 0.00000 1.00000 5.69659 - 4.75600 -5.90806 0.00000 1.00000 5.90806 - 4.77450 -6.13525 0.00000 1.00000 6.13525 - 4.79300 -6.24364 0.00000 1.00000 6.24364 - 4.81150 -6.05670 0.00000 1.00000 6.05670 - 4.83000 -5.40165 0.00000 1.00000 5.40165 - 4.84850 -4.16022 0.00000 1.00000 4.16022 - 4.86700 -2.31100 0.00000 1.00000 2.31100 - 4.88550 0.0479985 0.00000 1.00000 -0.0479985 - 4.90400 2.70271 0.00000 1.00000 -2.70271 - 4.92250 5.35252 0.00000 1.00000 -5.35252 - 4.94100 7.65960 0.00000 1.00000 -7.65960 - 4.95950 9.30734 0.00000 1.00000 -9.30734 - 4.97800 10.0558 0.00000 1.00000 -10.0558 - 4.99650 9.78268 0.00000 1.00000 -9.78268 - 5.01500 8.50309 0.00000 1.00000 -8.50309 - 5.03350 6.36470 0.00000 1.00000 -6.36470 - 5.05200 3.62252 0.00000 1.00000 -3.62252 - 5.07050 0.599290 0.00000 1.00000 -0.599290 - 5.08900 -2.36086 0.00000 1.00000 2.36086 - 5.10750 -4.93870 0.00000 1.00000 4.93870 - 5.12600 -6.88149 0.00000 1.00000 6.88149 - 5.14450 -8.03565 0.00000 1.00000 8.03565 - 5.16300 -8.36668 0.00000 1.00000 8.36668 - 5.18150 -7.96304 0.00000 1.00000 7.96304 - 5.20000 -7.02207 0.00000 1.00000 7.02207 - 5.21850 -5.81895 0.00000 1.00000 5.81895 - 5.23700 -4.66171 0.00000 1.00000 4.66171 - 5.25550 -3.83844 0.00000 1.00000 3.83844 - 5.27400 -3.56410 0.00000 1.00000 3.56410 - 5.29250 -3.93573 0.00000 1.00000 3.93573 - 5.31100 -4.90467 0.00000 1.00000 4.90467 - 5.32950 -6.27267 0.00000 1.00000 6.27267 - 5.34800 -7.71536 0.00000 1.00000 7.71536 - 5.36650 -8.83203 0.00000 1.00000 8.83203 - 5.38500 -9.21516 0.00000 1.00000 9.21516 - 5.40350 -8.52808 0.00000 1.00000 8.52808 - 5.42200 -6.57611 0.00000 1.00000 6.57611 - 5.44050 -3.35625 0.00000 1.00000 3.35625 - 5.45900 0.925287 0.00000 1.00000 -0.925287 - 5.47750 5.87209 0.00000 1.00000 -5.87209 - 5.49600 10.9500 0.00000 1.00000 -10.9500 - 5.51450 15.5640 0.00000 1.00000 -15.5640 - 5.53300 19.1477 0.00000 1.00000 -19.1477 - 5.55150 21.2490 0.00000 1.00000 -21.2490 - 5.57000 21.6003 0.00000 1.00000 -21.6003 - 5.58850 20.1588 0.00000 1.00000 -20.1588 - 5.60700 17.1124 0.00000 1.00000 -17.1124 - 5.62550 12.8494 0.00000 1.00000 -12.8494 - 5.64400 7.89927 0.00000 1.00000 -7.89927 - 5.66250 2.85190 0.00000 1.00000 -2.85190 - 5.68100 -1.72997 0.00000 1.00000 1.72997 - 5.69950 -5.39381 0.00000 1.00000 5.39381 - 5.71800 -7.86162 0.00000 1.00000 7.86162 - 5.73650 -9.06420 0.00000 1.00000 9.06420 - 5.75500 -9.13837 0.00000 1.00000 9.13837 - 5.77350 -8.38683 0.00000 1.00000 8.38683 - 5.79200 -7.20818 0.00000 1.00000 7.20818 - 5.81050 -6.01172 0.00000 1.00000 6.01172 - 5.82900 -5.13567 0.00000 1.00000 5.13567 - 5.84750 -4.78662 0.00000 1.00000 4.78662 - 5.86600 -5.01125 0.00000 1.00000 5.01125 - 5.88450 -5.70222 0.00000 1.00000 5.70222 - 5.90300 -6.63275 0.00000 1.00000 6.63275 - 5.92150 -7.51031 0.00000 1.00000 7.51031 - 5.94000 -8.03914 0.00000 1.00000 8.03914 - 5.95850 -7.98163 0.00000 1.00000 7.98163 - 5.97700 -7.20897 0.00000 1.00000 7.20897 - 5.99550 -5.73309 0.00000 1.00000 5.73309 - 6.01400 -3.71335 0.00000 1.00000 3.71335 - 6.03250 -1.43572 0.00000 1.00000 1.43572 - 6.05100 0.734316 0.00000 1.00000 -0.734316 - 6.06950 2.41816 0.00000 1.00000 -2.41816 - 6.08800 3.29880 0.00000 1.00000 -3.29880 - 6.10650 3.18922 0.00000 1.00000 -3.18922 - 6.12500 2.07961 0.00000 1.00000 -2.07961 - 6.14350 0.150522 0.00000 1.00000 -0.150522 - 6.16200 -2.25436 0.00000 1.00000 2.25436 - 6.18050 -4.69426 0.00000 1.00000 4.69426 - 6.19900 -6.72460 0.00000 1.00000 6.72460 - 6.21750 -7.99834 0.00000 1.00000 7.99834 - 6.23600 -8.35142 0.00000 1.00000 8.35142 - 6.25450 -7.84948 0.00000 1.00000 7.84948 - 6.27300 -6.78013 0.00000 1.00000 6.78013 - 6.29150 -5.58671 0.00000 1.00000 5.58671 - 6.31000 -4.75441 0.00000 1.00000 4.75441 - 6.32850 -4.67266 0.00000 1.00000 4.67266 - 6.34700 -5.50714 0.00000 1.00000 5.50714 - 6.36550 -7.11590 0.00000 1.00000 7.11590 - 6.38400 -9.03699 0.00000 1.00000 9.03699 - 6.40250 -10.5592 0.00000 1.00000 10.5592 - 6.42100 -10.8676 0.00000 1.00000 10.8676 - 6.43950 -9.23379 0.00000 1.00000 9.23379 - 6.45800 -5.20861 0.00000 1.00000 5.20861 - 6.47650 1.23011 0.00000 1.00000 -1.23011 - 6.49500 9.61241 0.00000 1.00000 -9.61241 - 6.51350 19.0142 0.00000 1.00000 -19.0142 - 6.53200 28.1967 0.00000 1.00000 -28.1967 - 6.55050 35.8243 0.00000 1.00000 -35.8243 - 6.56900 40.7166 0.00000 1.00000 -40.7166 - 6.58750 42.0833 0.00000 1.00000 -42.0833 - 6.60600 39.6873 0.00000 1.00000 -39.6873 - 6.62450 33.8989 0.00000 1.00000 -33.8989 - 6.64300 25.6256 0.00000 1.00000 -25.6256 - 6.66150 16.1324 0.00000 1.00000 -16.1324 - 6.68000 6.79125 0.00000 1.00000 -6.79125 - 6.69850 -1.18411 0.00000 1.00000 1.18411 - 6.71700 -6.95910 0.00000 1.00000 6.95910 - 6.73550 -10.2079 0.00000 1.00000 10.2079 - 6.75400 -11.1248 0.00000 1.00000 11.1248 - 6.77250 -10.3198 0.00000 1.00000 10.3198 - 6.79100 -8.62815 0.00000 1.00000 8.62815 - 6.80950 -6.88571 0.00000 1.00000 6.88571 - 6.82800 -5.72660 0.00000 1.00000 5.72660 - 6.84650 -5.45332 0.00000 1.00000 5.45332 - 6.86500 -6.00649 0.00000 1.00000 6.00649 - 6.88350 -7.03437 0.00000 1.00000 7.03437 - 6.90200 -8.03570 0.00000 1.00000 8.03570 - 6.92050 -8.53209 0.00000 1.00000 8.53209 - 6.93900 -8.22002 0.00000 1.00000 8.22002 - 6.95750 -7.06140 0.00000 1.00000 7.06140 - 6.97600 -5.29017 0.00000 1.00000 5.29017 - 6.99450 -3.33754 0.00000 1.00000 3.33754 - 7.01300 -1.70148 0.00000 1.00000 1.70148 - 7.03150 -0.800760 0.00000 1.00000 0.800760 - 7.05000 -0.856664 0.00000 1.00000 0.856664 - 7.06850 -1.83505 0.00000 1.00000 1.83505 - 7.08700 -3.46358 0.00000 1.00000 3.46358 - 7.10550 -5.31731 0.00000 1.00000 5.31731 - 7.12400 -6.94715 0.00000 1.00000 6.94715 - 7.14250 -8.01332 0.00000 1.00000 8.01332 - 7.16100 -8.38320 0.00000 1.00000 8.38320 - 7.17950 -8.16268 0.00000 1.00000 8.16268 - 7.19800 -7.64952 0.00000 1.00000 7.64952 - 7.21650 -7.22129 0.00000 1.00000 7.22129 - 7.23500 -7.19206 0.00000 1.00000 7.19206 - 7.25350 -7.68220 0.00000 1.00000 7.68220 - 7.27200 -8.54371 0.00000 1.00000 8.54371 - 7.29050 -9.36819 0.00000 1.00000 9.36819 - 7.30900 -9.58072 0.00000 1.00000 9.58072 - 7.32750 -8.59790 0.00000 1.00000 8.59790 - 7.34600 -6.00785 0.00000 1.00000 6.00785 - 7.36450 -1.72106 0.00000 1.00000 1.72106 - 7.38300 3.95269 0.00000 1.00000 -3.95269 - 7.40150 10.3276 0.00000 1.00000 -10.3276 - 7.42000 16.4640 0.00000 1.00000 -16.4640 - 7.43850 21.3618 0.00000 1.00000 -21.3618 - 7.45700 24.1782 0.00000 1.00000 -24.1782 - 7.47550 24.4162 0.00000 1.00000 -24.4162 - 7.49400 22.0356 0.00000 1.00000 -22.0356 - 7.51250 17.4573 0.00000 1.00000 -17.4573 - 7.53100 11.4623 0.00000 1.00000 -11.4623 - 7.54950 5.01118 0.00000 1.00000 -5.01118 - 7.56800 -0.965076 0.00000 1.00000 0.965076 - 7.58650 -5.75153 0.00000 1.00000 5.75153 - 7.60500 -8.96799 0.00000 1.00000 8.96799 - 7.62350 -10.5969 0.00000 1.00000 10.5969 - 7.64200 -10.9206 0.00000 1.00000 10.9206 - 7.66050 -10.3893 0.00000 1.00000 10.3893 - 7.67900 -9.46200 0.00000 1.00000 9.46200 - 7.69750 -8.46444 0.00000 1.00000 8.46444 - 7.71600 -7.50854 0.00000 1.00000 7.50854 - 7.73450 -6.49304 0.00000 1.00000 6.49304 - 7.75300 -5.18168 0.00000 1.00000 5.18168 - 7.77150 -3.32911 0.00000 1.00000 3.32911 - 7.79000 -0.811546 0.00000 1.00000 0.811546 - 7.80850 2.28073 0.00000 1.00000 -2.28073 - 7.82700 5.61902 0.00000 1.00000 -5.61902 - 7.84550 8.68909 0.00000 1.00000 -8.68909 - 7.86400 10.9073 0.00000 1.00000 -10.9073 - 7.88250 11.7676 0.00000 1.00000 -11.7676 - 7.90100 10.9777 0.00000 1.00000 -10.9777 - 7.91950 8.54633 0.00000 1.00000 -8.54633 - 7.93800 4.79627 0.00000 1.00000 -4.79627 - 7.95650 0.300695 0.00000 1.00000 -0.300695 - 7.97500 -4.24152 0.00000 1.00000 4.24152 - 7.99350 -8.15787 0.00000 1.00000 8.15787 - 8.01200 -10.9420 0.00000 1.00000 10.9420 - 8.03050 -12.3456 0.00000 1.00000 12.3456 - 8.04900 -12.4001 0.00000 1.00000 12.4001 - 8.06750 -11.3663 0.00000 1.00000 11.3663 - 8.08600 -9.63181 0.00000 1.00000 9.63181 - 8.10450 -7.58723 0.00000 1.00000 7.58723 - 8.12300 -5.52117 0.00000 1.00000 5.52117 - 8.14150 -3.56353 0.00000 1.00000 3.56353 - 8.16000 -1.69260 0.00000 1.00000 1.69260 - 8.17850 0.199827 0.00000 1.00000 -0.199827 - 8.19700 2.21044 0.00000 1.00000 -2.21044 - 8.21550 4.33057 0.00000 1.00000 -4.33057 - 8.23400 6.39218 0.00000 1.00000 -6.39218 - 8.25250 8.07555 0.00000 1.00000 -8.07555 - 8.27100 8.97896 0.00000 1.00000 -8.97896 - 8.28950 8.73073 0.00000 1.00000 -8.73073 - 8.30800 7.11016 0.00000 1.00000 -7.11016 - 8.32650 4.14151 0.00000 1.00000 -4.14151 - 8.34500 0.130936 0.00000 1.00000 -0.130936 - 8.36350 -4.36837 0.00000 1.00000 4.36837 - 8.38200 -8.65854 0.00000 1.00000 8.65854 - 8.40050 -12.0433 0.00000 1.00000 12.0433 - 8.41900 -13.9807 0.00000 1.00000 13.9807 - 8.43750 -14.2030 0.00000 1.00000 14.2030 - 8.45600 -12.7704 0.00000 1.00000 12.7704 - 8.47450 -10.0445 0.00000 1.00000 10.0445 - 8.49300 -6.58938 0.00000 1.00000 6.58938 - 8.51150 -3.02663 0.00000 1.00000 3.02663 - 8.53000 0.112114 0.00000 1.00000 -0.112114 - 8.54850 2.49566 0.00000 1.00000 -2.49566 - 8.56700 4.03580 0.00000 1.00000 -4.03580 - 8.58550 4.85377 0.00000 1.00000 -4.85377 - 8.60400 5.18537 0.00000 1.00000 -5.18537 - 8.62250 5.25808 0.00000 1.00000 -5.25808 - 8.64100 5.18193 0.00000 1.00000 -5.18193 - 8.65950 4.89182 0.00000 1.00000 -4.89182 - 8.67800 4.16349 0.00000 1.00000 -4.16349 - 8.69650 2.70252 0.00000 1.00000 -2.70252 - 8.71500 0.282220 0.00000 1.00000 -0.282220 - 8.73350 -3.11124 0.00000 1.00000 3.11124 - 8.75200 -7.17490 0.00000 1.00000 7.17490 - 8.77050 -11.2672 0.00000 1.00000 11.2672 - 8.78900 -14.4886 0.00000 1.00000 14.4886 - 8.80750 -15.8559 0.00000 1.00000 15.8559 - 8.82600 -14.5328 0.00000 1.00000 14.5328 - 8.84450 -10.0609 0.00000 1.00000 10.0609 - 8.86300 -2.52773 0.00000 1.00000 2.52773 - 8.88150 7.37428 0.00000 1.00000 -7.37428 - 8.90000 18.4240 0.00000 1.00000 -18.4240 - 8.91850 29.0726 0.00000 1.00000 -29.0726 - 8.93700 37.7295 0.00000 1.00000 -37.7295 - 8.95550 43.0717 0.00000 1.00000 -43.0717 - 8.97400 44.3044 0.00000 1.00000 -44.3044 - 8.99250 41.3154 0.00000 1.00000 -41.3154 - 9.01100 34.6857 0.00000 1.00000 -34.6857 - 9.02950 25.5570 0.00000 1.00000 -25.5570 - 9.04800 15.3859 0.00000 1.00000 -15.3859 - 9.06650 5.64529 0.00000 1.00000 -5.64529 - 9.08500 -2.45985 0.00000 1.00000 2.45985 - 9.10350 -8.19758 0.00000 1.00000 8.19758 - 9.12200 -11.3936 0.00000 1.00000 11.3936 - 9.14050 -12.3840 0.00000 1.00000 12.3840 - 9.15900 -11.8591 0.00000 1.00000 11.8591 - 9.17750 -10.6446 0.00000 1.00000 10.6446 - 9.19600 -9.48212 0.00000 1.00000 9.48212 - 9.21450 -8.86286 0.00000 1.00000 8.86286 - 9.23300 -8.95166 0.00000 1.00000 8.95166 - 9.25150 -9.60978 0.00000 1.00000 9.60978 - 9.27000 -10.4985 0.00000 1.00000 10.4985 - 9.28850 -11.2264 0.00000 1.00000 11.2264 - 9.30700 -11.4956 0.00000 1.00000 11.4956 - 9.32550 -11.2056 0.00000 1.00000 11.2056 - 9.34400 -10.4851 0.00000 1.00000 10.4851 - 9.36250 -9.64367 0.00000 1.00000 9.64367 - 9.38100 -9.05839 0.00000 1.00000 9.05839 - 9.39950 -9.03059 0.00000 1.00000 9.03059 - 9.41800 -9.65891 0.00000 1.00000 9.65891 - 9.43650 -10.7695 0.00000 1.00000 10.7695 - 9.45500 -11.9282 0.00000 1.00000 11.9282 - 9.47350 -12.5352 0.00000 1.00000 12.5352 - 9.49200 -11.9793 0.00000 1.00000 11.9793 - 9.51050 -9.80968 0.00000 1.00000 9.80968 - 9.52900 -5.88098 0.00000 1.00000 5.88098 - 9.54750 -0.429865 0.00000 1.00000 0.429865 - 9.56600 5.93738 0.00000 1.00000 -5.93738 - 9.58450 12.3467 0.00000 1.00000 -12.3467 - 9.60300 17.8253 0.00000 1.00000 -17.8253 - 9.62150 21.4983 0.00000 1.00000 -21.4983 - 9.64000 22.7684 0.00000 1.00000 -22.7684 - 9.65850 21.4353 0.00000 1.00000 -21.4353 - 9.67700 17.7297 0.00000 1.00000 -17.7297 - 9.69550 12.2556 0.00000 1.00000 -12.2556 - 9.71400 5.85940 0.00000 1.00000 -5.85940 - 9.73250 -0.539853 0.00000 1.00000 0.539853 - 9.75100 -6.11696 0.00000 1.00000 6.11696 - 9.76950 -10.2704 0.00000 1.00000 10.2704 - 9.78800 -12.6954 0.00000 1.00000 12.6954 - 9.80650 -13.3941 0.00000 1.00000 13.3941 - 9.82500 -12.6315 0.00000 1.00000 12.6315 - 9.84350 -10.8487 0.00000 1.00000 10.8487 - 9.86200 -8.55755 0.00000 1.00000 8.55755 - 9.88050 -6.24003 0.00000 1.00000 6.24003 - 9.89900 -4.27478 0.00000 1.00000 4.27478 - 9.91750 -2.90328 0.00000 1.00000 2.90328 - 9.93600 -2.23386 0.00000 1.00000 2.23386 - 9.95450 -2.27104 0.00000 1.00000 2.27104 - 9.97300 -2.95175 0.00000 1.00000 2.95175 - 9.99150 -4.17209 0.00000 1.00000 4.17209 - 10.0100 -5.79607 0.00000 1.00000 5.79607 - 10.0285 -7.64859 0.00000 1.00000 7.64859 - 10.0470 -9.50283 0.00000 1.00000 9.50283 - 10.0655 -11.0757 0.00000 1.00000 11.0757 - 10.0840 -12.0425 0.00000 1.00000 12.0425 - 10.1025 -12.0751 0.00000 1.00000 12.0751 - 10.1210 -10.9017 0.00000 1.00000 10.9017 - 10.1395 -8.37613 0.00000 1.00000 8.37613 - 10.1580 -4.54026 0.00000 1.00000 4.54026 - 10.1765 0.338357 0.00000 1.00000 -0.338357 - 10.1950 5.76996 0.00000 1.00000 -5.76996 - 10.2135 11.0939 0.00000 1.00000 -11.0939 - 10.2320 15.5741 0.00000 1.00000 -15.5741 - 10.2505 18.5225 0.00000 1.00000 -18.5225 - 10.2690 19.4270 0.00000 1.00000 -19.4270 - 10.2875 18.0567 0.00000 1.00000 -18.0567 - 10.3060 14.5227 0.00000 1.00000 -14.5227 - 10.3245 9.27796 0.00000 1.00000 -9.27796 - 10.3430 3.05599 0.00000 1.00000 -3.05599 - 10.3615 -3.24345 0.00000 1.00000 3.24345 - 10.3800 -8.70145 0.00000 1.00000 8.70145 - 10.3985 -12.5330 0.00000 1.00000 12.5330 - 10.4170 -14.2182 0.00000 1.00000 14.2182 - 10.4355 -13.5885 0.00000 1.00000 13.5885 - 10.4540 -10.8525 0.00000 1.00000 10.8525 - 10.4725 -6.55772 0.00000 1.00000 6.55772 - 10.4910 -1.49640 0.00000 1.00000 1.49640 - 10.5095 3.42852 0.00000 1.00000 -3.42852 - 10.5280 7.35363 0.00000 1.00000 -7.35363 - 10.5465 9.59717 0.00000 1.00000 -9.59717 - 10.5650 9.77054 0.00000 1.00000 -9.77054 - 10.5835 7.84234 0.00000 1.00000 -7.84234 - 10.6020 4.14584 0.00000 1.00000 -4.14584 - 10.6205 -0.671143 0.00000 1.00000 0.671143 - 10.6390 -5.74603 0.00000 1.00000 5.74603 - 10.6575 -10.1361 0.00000 1.00000 10.1361 - 10.6760 -12.9671 0.00000 1.00000 12.9671 - 10.6945 -13.5738 0.00000 1.00000 13.5738 - 10.7130 -11.6108 0.00000 1.00000 11.6108 - 10.7315 -7.11852 0.00000 1.00000 7.11852 - 10.7500 -0.532582 0.00000 1.00000 0.532582 - 10.7685 7.36496 0.00000 1.00000 -7.36496 - 10.7870 15.5502 0.00000 1.00000 -15.5502 - 10.8055 22.9046 0.00000 1.00000 -22.9046 - 10.8240 28.3836 0.00000 1.00000 -28.3836 - 10.8425 31.1819 0.00000 1.00000 -31.1819 - 10.8610 30.8667 0.00000 1.00000 -30.8667 - 10.8795 27.4544 0.00000 1.00000 -27.4544 - 10.8980 21.4174 0.00000 1.00000 -21.4174 - 10.9165 13.6149 0.00000 1.00000 -13.6149 - 10.9350 5.15717 0.00000 1.00000 -5.15717 - 10.9535 -2.77403 0.00000 1.00000 2.77403 - 10.9720 -9.11963 0.00000 1.00000 9.11963 - 10.9905 -13.1166 0.00000 1.00000 13.1166 - 11.0090 -14.4189 0.00000 1.00000 14.4189 - 11.0275 -13.1446 0.00000 1.00000 13.1446 - 11.0460 -9.84069 0.00000 1.00000 9.84069 - 11.0645 -5.37361 0.00000 1.00000 5.37361 - 11.0830 -0.766336 0.00000 1.00000 0.766336 - 11.1015 2.99059 0.00000 1.00000 -2.99059 - 11.1200 5.12102 0.00000 1.00000 -5.12102 - 11.1385 5.20555 0.00000 1.00000 -5.20555 - 11.1570 3.25580 0.00000 1.00000 -3.25580 - 11.1755 -0.295787 0.00000 1.00000 0.295787 - 11.1940 -4.68917 0.00000 1.00000 4.68917 - 11.2125 -8.99252 0.00000 1.00000 8.99252 - 11.2310 -12.2872 0.00000 1.00000 12.2872 - 11.2495 -13.8447 0.00000 1.00000 13.8447 - 11.2680 -13.2610 0.00000 1.00000 13.2610 - 11.2865 -10.5280 0.00000 1.00000 10.5280 - 11.3050 -6.02790 0.00000 1.00000 6.02790 - 11.3235 -0.457428 0.00000 1.00000 0.457428 - 11.3420 5.30272 0.00000 1.00000 -5.30272 - 11.3605 10.3468 0.00000 1.00000 -10.3468 - 11.3790 13.9003 0.00000 1.00000 -13.9003 - 11.3975 15.4459 0.00000 1.00000 -15.4459 - 11.4160 14.7993 0.00000 1.00000 -14.7993 - 11.4345 12.1251 0.00000 1.00000 -12.1251 - 11.4530 7.89515 0.00000 1.00000 -7.89515 - 11.4715 2.79743 0.00000 1.00000 -2.79743 - 11.4900 -2.38402 0.00000 1.00000 2.38402 - 11.5085 -6.89848 0.00000 1.00000 6.89848 - 11.5270 -10.1446 0.00000 1.00000 10.1446 - 11.5455 -11.7562 0.00000 1.00000 11.7562 - 11.5640 -11.6477 0.00000 1.00000 11.6477 - 11.5825 -10.0156 0.00000 1.00000 10.0156 - 11.6010 -7.29778 0.00000 1.00000 7.29778 - 11.6195 -4.09885 0.00000 1.00000 4.09885 - 11.6380 -1.08810 0.00000 1.00000 1.08810 - 11.6565 1.11439 0.00000 1.00000 -1.11439 - 11.6750 2.04788 0.00000 1.00000 -2.04788 - 11.6935 1.49867 0.00000 1.00000 -1.49867 - 11.7120 -0.451611 0.00000 1.00000 0.451611 - 11.7305 -3.42848 0.00000 1.00000 3.42848 - 11.7490 -6.82125 0.00000 1.00000 6.82125 - 11.7675 -9.88740 0.00000 1.00000 9.88740 - 11.7860 -11.8896 0.00000 1.00000 11.8896 - 11.8045 -12.2430 0.00000 1.00000 12.2430 - 11.8230 -10.6446 0.00000 1.00000 10.6446 - 11.8415 -7.15722 0.00000 1.00000 7.15722 - 11.8600 -2.22583 0.00000 1.00000 2.22583 - 11.8785 3.38458 0.00000 1.00000 -3.38458 - 11.8970 8.72108 0.00000 1.00000 -8.72108 - 11.9155 12.8213 0.00000 1.00000 -12.8213 - 11.9340 14.9032 0.00000 1.00000 -14.9032 - 11.9525 14.5281 0.00000 1.00000 -14.5281 - 11.9710 11.6999 0.00000 1.00000 -11.6999 - 11.9895 6.87776 0.00000 1.00000 -6.87776 - 12.0080 0.891504 0.00000 1.00000 -0.891504 - 12.0265 -5.22565 0.00000 1.00000 5.22565 - 12.0450 -10.4522 0.00000 1.00000 10.4522 - 12.0635 -13.9931 0.00000 1.00000 13.9931 - 12.0820 -15.4435 0.00000 1.00000 15.4435 - 12.1005 -14.8644 0.00000 1.00000 14.8644 - 12.1190 -12.7520 0.00000 1.00000 12.7520 - 12.1375 -9.90845 0.00000 1.00000 9.90845 - 12.1560 -7.24453 0.00000 1.00000 7.24453 - 12.1745 -5.56166 0.00000 1.00000 5.56166 - 12.1930 -5.36161 0.00000 1.00000 5.36161 - 12.2115 -6.72586 0.00000 1.00000 6.72586 - 12.2300 -9.28835 0.00000 1.00000 9.28835 - 12.2485 -12.3067 0.00000 1.00000 12.3067 - 12.2670 -14.8178 0.00000 1.00000 14.8178 - 12.2855 -15.8476 0.00000 1.00000 15.8476 - 12.3040 -14.6332 0.00000 1.00000 14.6332 - 12.3225 -10.8097 0.00000 1.00000 10.8097 - 12.3410 -4.52145 0.00000 1.00000 4.52145 - 12.3595 3.57058 0.00000 1.00000 -3.57058 - 12.3780 12.3893 0.00000 1.00000 -12.3893 - 12.3965 20.6314 0.00000 1.00000 -20.6314 - 12.4150 27.0092 0.00000 1.00000 -27.0092 - 12.4335 30.4959 0.00000 1.00000 -30.4959 - 12.4520 30.5247 0.00000 1.00000 -30.5247 - 12.4705 27.1034 0.00000 1.00000 -27.1034 - 12.4890 20.8197 0.00000 1.00000 -20.8197 - 12.5075 12.7348 0.00000 1.00000 -12.7348 - 12.5260 4.18409 0.00000 1.00000 -4.18409 - 12.5445 -3.47600 0.00000 1.00000 3.47600 - 12.5630 -9.12640 0.00000 1.00000 9.12640 - 12.5815 -12.0958 0.00000 1.00000 12.0958 - 12.6000 -12.2803 0.00000 1.00000 12.2803 - 12.6185 -10.1467 0.00000 1.00000 10.1467 - 12.6370 -6.61573 0.00000 1.00000 6.61573 - 12.6555 -2.84816 0.00000 1.00000 2.84816 - 12.6740 0.0234471 0.00000 1.00000 -0.0234471 - 12.6925 1.16051 0.00000 1.00000 -1.16051 - 12.7110 0.222329 0.00000 1.00000 -0.222329 - 12.7295 -2.53923 0.00000 1.00000 2.53923 - 12.7480 -6.31966 0.00000 1.00000 6.31966 - 12.7665 -9.93250 0.00000 1.00000 9.93250 - 12.7850 -12.0782 0.00000 1.00000 12.0782 - 12.8035 -11.6556 0.00000 1.00000 11.6556 - 12.8220 -8.04822 0.00000 1.00000 8.04822 - 12.8405 -1.31753 0.00000 1.00000 1.31753 - 12.8590 7.74657 0.00000 1.00000 -7.74657 - 12.8775 17.7420 0.00000 1.00000 -17.7420 - 12.8960 26.9214 0.00000 1.00000 -26.9214 - 12.9145 33.5578 0.00000 1.00000 -33.5578 - 12.9330 36.3277 0.00000 1.00000 -36.3277 - 12.9515 34.6234 0.00000 1.00000 -34.6234 - 12.9700 28.7156 0.00000 1.00000 -28.7156 - 12.9885 19.7233 0.00000 1.00000 -19.7233 - 13.0070 9.38804 0.00000 1.00000 -9.38804 - 13.0255 -0.297908 0.00000 1.00000 0.297908 - 13.0440 -7.52791 0.00000 1.00000 7.52791 - 13.0625 -11.0794 0.00000 1.00000 11.0794 - 13.0810 -10.5807 0.00000 1.00000 10.5807 - 13.0995 -6.58087 0.00000 1.00000 6.58087 - 13.1180 -0.404585 0.00000 1.00000 0.404585 - 13.1365 6.17556 0.00000 1.00000 -6.17556 - 13.1550 11.3708 0.00000 1.00000 -11.3708 - 13.1735 13.8053 0.00000 1.00000 -13.8053 - 13.1920 12.8357 0.00000 1.00000 -12.8357 - 13.2105 8.68336 0.00000 1.00000 -8.68336 - 13.2290 2.34908 0.00000 1.00000 -2.34908 - 13.2475 -4.66287 0.00000 1.00000 4.66287 - 13.2660 -10.7379 0.00000 1.00000 10.7379 - 13.2845 -14.5602 0.00000 1.00000 14.5602 - 13.3030 -15.4343 0.00000 1.00000 15.4343 - 13.3215 -13.4393 0.00000 1.00000 13.4393 - 13.3400 -9.37967 0.00000 1.00000 9.37967 - 13.3585 -4.55053 0.00000 1.00000 4.55053 - 13.3770 -0.382431 0.00000 1.00000 0.382431 - 13.3955 1.93839 0.00000 1.00000 -1.93839 - 13.4140 1.77366 0.00000 1.00000 -1.77366 - 13.4325 -0.818874 0.00000 1.00000 0.818874 - 13.4510 -5.13072 0.00000 1.00000 5.13072 - 13.4695 -10.0255 0.00000 1.00000 10.0255 - 13.4880 -14.2744 0.00000 1.00000 14.2744 - 13.5065 -16.9060 0.00000 1.00000 16.9060 - 13.5250 -17.4714 0.00000 1.00000 17.4714 - 13.5435 -16.1512 0.00000 1.00000 16.1512 - 13.5620 -13.6784 0.00000 1.00000 13.6784 - 13.5805 -11.1043 0.00000 1.00000 11.1043 - 13.5990 -9.47288 0.00000 1.00000 9.47288 - 13.6175 -9.49567 0.00000 1.00000 9.49567 - 13.6360 -11.3153 0.00000 1.00000 11.3153 - 13.6545 -14.4268 0.00000 1.00000 14.4268 - 13.6730 -17.7824 0.00000 1.00000 17.7824 - 13.6915 -20.0552 0.00000 1.00000 20.0552 - 13.7100 -19.9965 0.00000 1.00000 19.9965 - 13.7285 -16.7898 0.00000 1.00000 16.7898 - 13.7470 -10.3089 0.00000 1.00000 10.3089 - 13.7655 -1.20781 0.00000 1.00000 1.20781 - 13.7840 9.18567 0.00000 1.00000 -9.18567 - 13.8025 19.1488 0.00000 1.00000 -19.1488 - 13.8210 26.9489 0.00000 1.00000 -26.9489 - 13.8395 31.2366 0.00000 1.00000 -31.2366 - 13.8580 31.3496 0.00000 1.00000 -31.3496 - 13.8765 27.4511 0.00000 1.00000 -27.4511 - 13.8950 20.4697 0.00000 1.00000 -20.4697 - 13.9135 11.8582 0.00000 1.00000 -11.8582 - 13.9320 3.23523 0.00000 1.00000 -3.23523 - 13.9505 -3.99882 0.00000 1.00000 3.99882 - 13.9690 -8.96984 0.00000 1.00000 8.96984 - 13.9875 -11.4848 0.00000 1.00000 11.4848 - 14.0060 -11.9967 0.00000 1.00000 11.9967 - 14.0245 -11.3970 0.00000 1.00000 11.3970 - 14.0430 -10.7008 0.00000 1.00000 10.7008 - 14.0615 -10.7168 0.00000 1.00000 10.7168 - 14.0800 -11.7936 0.00000 1.00000 11.7936 - 14.0985 -13.7115 0.00000 1.00000 13.7115 - 14.1170 -15.7457 0.00000 1.00000 15.7457 - 14.1355 -16.8835 0.00000 1.00000 16.8835 - 14.1540 -16.1342 0.00000 1.00000 16.1342 - 14.1725 -12.8466 0.00000 1.00000 12.8466 - 14.1910 -6.94542 0.00000 1.00000 6.94542 - 14.2095 0.982134 0.00000 1.00000 -0.982134 - 14.2280 9.77953 0.00000 1.00000 -9.77953 - 14.2465 17.9729 0.00000 1.00000 -17.9729 - 14.2650 24.1178 0.00000 1.00000 -24.1178 - 14.2835 27.1485 0.00000 1.00000 -27.1485 - 14.3020 26.6355 0.00000 1.00000 -26.6355 - 14.3205 22.8839 0.00000 1.00000 -22.8839 - 14.3390 16.8479 0.00000 1.00000 -16.8479 - 14.3575 9.88786 0.00000 1.00000 -9.88786 - 14.3760 3.43554 0.00000 1.00000 -3.43554 - 14.3945 -1.34253 0.00000 1.00000 1.34253 - 14.4130 -3.79922 0.00000 1.00000 3.79922 - 14.4315 -3.91650 0.00000 1.00000 3.91650 - 14.4500 -2.25034 0.00000 1.00000 2.25034 - 14.4685 0.265934 0.00000 1.00000 -0.265934 - 14.4870 2.60091 0.00000 1.00000 -2.60091 - 14.5055 3.90902 0.00000 1.00000 -3.90902 - 14.5240 3.74411 0.00000 1.00000 -3.74411 - 14.5425 2.15013 0.00000 1.00000 -2.15013 - 14.5610 -0.388481 0.00000 1.00000 0.388481 - 14.5795 -3.11515 0.00000 1.00000 3.11515 - 14.5980 -5.23631 0.00000 1.00000 5.23631 - 14.6165 -6.15513 0.00000 1.00000 6.15513 - 14.6350 -5.63898 0.00000 1.00000 5.63898 - 14.6535 -3.87566 0.00000 1.00000 3.87566 - 14.6720 -1.40645 0.00000 1.00000 1.40645 - 14.6905 1.04029 0.00000 1.00000 -1.04029 - 14.7090 2.76304 0.00000 1.00000 -2.76304 - 14.7275 3.28473 0.00000 1.00000 -3.28473 - 14.7460 2.47788 0.00000 1.00000 -2.47788 - 14.7645 0.584519 0.00000 1.00000 -0.584519 - 14.7830 -1.87052 0.00000 1.00000 1.87052 - 14.8015 -4.24417 0.00000 1.00000 4.24417 - 14.8200 -5.96765 0.00000 1.00000 5.96765 - 14.8385 -6.70965 0.00000 1.00000 6.70965 - 14.8570 -6.46211 0.00000 1.00000 6.46211 - 14.8755 -5.52356 0.00000 1.00000 5.52356 - 14.8940 -4.38544 0.00000 1.00000 4.38544 - 14.9125 -3.55512 0.00000 1.00000 3.55512 - 14.9310 -3.36898 0.00000 1.00000 3.36898 - 14.9495 -3.85281 0.00000 1.00000 3.85281 - 14.9680 -4.67590 0.00000 1.00000 4.67590 - 14.9865 -5.21922 0.00000 1.00000 5.21922 - 15.0050 -4.74479 0.00000 1.00000 4.74479 - 15.0235 -2.62144 0.00000 1.00000 2.62144 - 15.0420 1.45687 0.00000 1.00000 -1.45687 - 15.0605 7.32500 0.00000 1.00000 -7.32500 - 15.0790 14.3193 0.00000 1.00000 -14.3193 - 15.0975 21.3835 0.00000 1.00000 -21.3835 - 15.1160 27.2852 0.00000 1.00000 -27.2852 - 15.1345 30.8902 0.00000 1.00000 -30.8902 - 15.1530 31.4245 0.00000 1.00000 -31.4245 - 15.1715 28.6588 0.00000 1.00000 -28.6588 - 15.1900 22.9682 0.00000 1.00000 -22.9682 - 15.2085 15.2541 0.00000 1.00000 -15.2541 - 15.2270 6.74712 0.00000 1.00000 -6.74712 - 15.2455 -1.25964 0.00000 1.00000 1.25964 - 15.2640 -7.68049 0.00000 1.00000 7.68049 - 15.2825 -11.8442 0.00000 1.00000 11.8442 - 15.3010 -13.5919 0.00000 1.00000 13.5919 - 15.3195 -13.2493 0.00000 1.00000 13.2493 - 15.3380 -11.4916 0.00000 1.00000 11.4916 - 15.3565 -9.14144 0.00000 1.00000 9.14144 - 15.3750 -6.95504 0.00000 1.00000 6.95504 - 15.3935 -5.44896 0.00000 1.00000 5.44896 - 15.4120 -4.80772 0.00000 1.00000 4.80772 - 15.4305 -4.88897 0.00000 1.00000 4.88897 - 15.4490 -5.31706 0.00000 1.00000 5.31706 - 15.4675 -5.63285 0.00000 1.00000 5.63285 - 15.4860 -5.45462 0.00000 1.00000 5.45462 - 15.5045 -4.60459 0.00000 1.00000 4.60459 - 15.5230 -3.16776 0.00000 1.00000 3.16776 - 15.5415 -1.46992 0.00000 1.00000 1.46992 - 15.5600 0.0157586 0.00000 1.00000 -0.0157586 - 15.5785 0.806047 0.00000 1.00000 -0.806047 - 15.5970 0.550242 0.00000 1.00000 -0.550242 - 15.6155 -0.861348 0.00000 1.00000 0.861348 - 15.6340 -3.25430 0.00000 1.00000 3.25430 - 15.6525 -6.20584 0.00000 1.00000 6.20584 - 15.6710 -9.14992 0.00000 1.00000 9.14992 - 15.6895 -11.5204 0.00000 1.00000 11.5204 - 15.7080 -12.8909 0.00000 1.00000 12.8909 - 15.7265 -13.0717 0.00000 1.00000 13.0717 - 15.7450 -12.1417 0.00000 1.00000 12.1417 - 15.7635 -10.4097 0.00000 1.00000 10.4097 - 15.7820 -8.32011 0.00000 1.00000 8.32011 - 15.8005 -6.33136 0.00000 1.00000 6.33136 - 15.8190 -4.80087 0.00000 1.00000 4.80087 - 15.8375 -3.90675 0.00000 1.00000 3.90675 - 15.8560 -3.62474 0.00000 1.00000 3.62474 - 15.8745 -3.76225 0.00000 1.00000 3.76225 - 15.8930 -4.03596 0.00000 1.00000 4.03596 - 15.9115 -4.16761 0.00000 1.00000 4.16761 - 15.9300 -3.96959 0.00000 1.00000 3.96959 - 15.9485 -3.39629 0.00000 1.00000 3.39629 - 15.9670 -2.54969 0.00000 1.00000 2.54969 - 15.9855 -1.64188 0.00000 1.00000 1.64188 - 16.0040 -0.928772 0.00000 1.00000 0.928772 - 16.0225 -0.634845 0.00000 1.00000 0.634845 - 16.0410 -0.888145 0.00000 1.00000 0.888145 - 16.0595 -1.67980 0.00000 1.00000 1.67980 - 16.0780 -2.85514 0.00000 1.00000 2.85514 - 16.0965 -4.13661 0.00000 1.00000 4.13661 - 16.1150 -5.17310 0.00000 1.00000 5.17310 - 16.1335 -5.60636 0.00000 1.00000 5.60636 - 16.1520 -5.14159 0.00000 1.00000 5.14159 - 16.1705 -3.60734 0.00000 1.00000 3.60734 - 16.1890 -0.992023 0.00000 1.00000 0.992023 - 16.2075 2.54958 0.00000 1.00000 -2.54958 - 16.2260 6.71807 0.00000 1.00000 -6.71807 - 16.2445 11.1120 0.00000 1.00000 -11.1120 - 16.2630 15.2812 0.00000 1.00000 -15.2812 - 16.2815 18.7822 0.00000 1.00000 -18.7822 - 16.3000 21.2269 0.00000 1.00000 -21.2269 - 16.3185 22.3212 0.00000 1.00000 -22.3212 - 16.3370 21.8912 0.00000 1.00000 -21.8912 - 16.3555 19.8991 0.00000 1.00000 -19.8991 - 16.3740 16.4493 0.00000 1.00000 -16.4493 - 16.3925 11.7863 0.00000 1.00000 -11.7863 - 16.4110 6.28331 0.00000 1.00000 -6.28331 - 16.4295 0.418687 0.00000 1.00000 -0.418687 - 16.4480 -5.25963 0.00000 1.00000 5.25963 - 16.4665 -10.1842 0.00000 1.00000 10.1842 - 16.4850 -13.8295 0.00000 1.00000 13.8295 - 16.5035 -15.7785 0.00000 1.00000 15.7785 - 16.5220 -15.7830 0.00000 1.00000 15.7830 - 16.5405 -13.8070 0.00000 1.00000 13.8070 - 16.5590 -10.0391 0.00000 1.00000 10.0391 - 16.5775 -4.87264 0.00000 1.00000 4.87264 - 16.5960 1.14589 0.00000 1.00000 -1.14589 - 16.6145 7.38649 0.00000 1.00000 -7.38649 - 16.6330 13.2091 0.00000 1.00000 -13.2091 - 16.6515 18.0296 0.00000 1.00000 -18.0296 - 16.6700 21.3708 0.00000 1.00000 -21.3708 - 16.6885 22.8991 0.00000 1.00000 -22.8991 - 16.7070 22.4456 0.00000 1.00000 -22.4456 - 16.7255 20.0158 0.00000 1.00000 -20.0158 - 16.7440 15.7881 0.00000 1.00000 -15.7881 - 16.7625 10.1035 0.00000 1.00000 -10.1035 - 16.7810 3.44424 0.00000 1.00000 -3.44424 - 16.7995 -3.59847 0.00000 1.00000 3.59847 - 16.8180 -10.3717 0.00000 1.00000 10.3717 - 16.8365 -16.2205 0.00000 1.00000 16.2205 - 16.8550 -20.5580 0.00000 1.00000 20.5580 - 16.8735 -22.9372 0.00000 1.00000 22.9372 - 16.8920 -23.1129 0.00000 1.00000 23.1129 - 16.9105 -21.0837 0.00000 1.00000 21.0837 - 16.9290 -17.1032 0.00000 1.00000 17.1032 - 16.9475 -11.6563 0.00000 1.00000 11.6563 - 16.9660 -5.39998 0.00000 1.00000 5.39998 - 16.9845 0.923758 0.00000 1.00000 -0.923758 - 17.0030 6.59122 0.00000 1.00000 -6.59122 - 17.0215 10.9979 0.00000 1.00000 -10.9979 - 17.0400 13.7383 0.00000 1.00000 -13.7383 - 17.0585 14.6477 0.00000 1.00000 -14.6477 - 17.0770 13.7998 0.00000 1.00000 -13.7998 - 17.0955 11.4638 0.00000 1.00000 -11.4638 - 17.1140 8.03578 0.00000 1.00000 -8.03578 - 17.1325 3.96378 0.00000 1.00000 -3.96378 - 17.1510 -0.316698 0.00000 1.00000 0.316698 - 17.1695 -4.42438 0.00000 1.00000 4.42438 - 17.1880 -8.04681 0.00000 1.00000 8.04681 - 17.2065 -10.9324 0.00000 1.00000 10.9324 - 17.2250 -12.8725 0.00000 1.00000 12.8725 - 17.2435 -13.6898 0.00000 1.00000 13.6898 - 17.2620 -13.2456 0.00000 1.00000 13.2456 - 17.2805 -11.4675 0.00000 1.00000 11.4675 - 17.2990 -8.39144 0.00000 1.00000 8.39144 - 17.3175 -4.20001 0.00000 1.00000 4.20001 - 17.3360 0.758004 0.00000 1.00000 -0.758004 - 17.3545 5.98116 0.00000 1.00000 -5.98116 - 17.3730 10.8661 0.00000 1.00000 -10.8661 - 17.3915 14.7906 0.00000 1.00000 -14.7906 - 17.4100 17.2137 0.00000 1.00000 -17.2137 - 17.4285 17.7745 0.00000 1.00000 -17.7745 - 17.4470 16.3661 0.00000 1.00000 -16.3661 - 17.4655 13.1690 0.00000 1.00000 -13.1690 - 17.4840 8.63053 0.00000 1.00000 -8.63053 - 17.5025 3.39246 0.00000 1.00000 -3.39246 - 17.5210 -1.82203 0.00000 1.00000 1.82203 - 17.5395 -6.33848 0.00000 1.00000 6.33848 - 17.5580 -9.64981 0.00000 1.00000 9.64981 - 17.5765 -11.4978 0.00000 1.00000 11.4978 - 17.5950 -11.9009 0.00000 1.00000 11.9009 - 17.6135 -11.1239 0.00000 1.00000 11.1239 - 17.6320 -9.59944 0.00000 1.00000 9.59944 - 17.6505 -7.81972 0.00000 1.00000 7.81972 - 17.6690 -6.22442 0.00000 1.00000 6.22442 - 17.6875 -5.11122 0.00000 1.00000 5.11122 - 17.7060 -4.58875 0.00000 1.00000 4.58875 - 17.7245 -4.58029 0.00000 1.00000 4.58029 - 17.7430 -4.87225 0.00000 1.00000 4.87225 - 17.7615 -5.18968 0.00000 1.00000 5.18968 - 17.7800 -5.27616 0.00000 1.00000 5.27616 - 17.7985 -4.95771 0.00000 1.00000 4.95771 - 17.8170 -4.17763 0.00000 1.00000 4.17763 - 17.8355 -2.99861 0.00000 1.00000 2.99861 - 17.8540 -1.57655 0.00000 1.00000 1.57655 - 17.8725 -0.115674 0.00000 1.00000 0.115674 - 17.8910 1.18232 0.00000 1.00000 -1.18232 - 17.9095 2.16253 0.00000 1.00000 -2.16253 - 17.9280 2.74507 0.00000 1.00000 -2.74507 - 17.9465 2.93310 0.00000 1.00000 -2.93310 - 17.9650 2.80225 0.00000 1.00000 -2.80225 - 17.9835 2.47685 0.00000 1.00000 -2.47685 - 18.0020 2.09940 0.00000 1.00000 -2.09940 - 18.0205 1.79907 0.00000 1.00000 -1.79907 - 18.0390 1.66403 0.00000 1.00000 -1.66403 - 18.0575 1.72260 0.00000 1.00000 -1.72260 - 18.0760 1.93703 0.00000 1.00000 -1.93703 - 18.0945 2.21113 0.00000 1.00000 -2.21113 - 18.1130 2.40837 0.00000 1.00000 -2.40837 - 18.1315 2.37442 0.00000 1.00000 -2.37442 - 18.1500 1.95988 0.00000 1.00000 -1.95988 - 18.1685 1.04724 0.00000 1.00000 -1.04724 - 18.1870 -0.426523 0.00000 1.00000 0.426523 - 18.2055 -2.45315 0.00000 1.00000 2.45315 - 18.2240 -4.90773 0.00000 1.00000 4.90773 - 18.2425 -7.52944 0.00000 1.00000 7.52944 - 18.2610 -9.92715 0.00000 1.00000 9.92715 - 18.2795 -11.6174 0.00000 1.00000 11.6174 - 18.2980 -12.0956 0.00000 1.00000 12.0956 - 18.3165 -10.9327 0.00000 1.00000 10.9327 - 18.3350 -7.88331 0.00000 1.00000 7.88331 - 18.3535 -2.98071 0.00000 1.00000 2.98071 - 18.3720 3.40650 0.00000 1.00000 -3.40650 - 18.3905 10.5811 0.00000 1.00000 -10.5811 - 18.4090 17.5968 0.00000 1.00000 -17.5968 - 18.4275 23.4036 0.00000 1.00000 -23.4036 - 18.4460 27.0310 0.00000 1.00000 -27.0310 - 18.4645 27.7731 0.00000 1.00000 -27.7731 - 18.4830 25.3345 0.00000 1.00000 -25.3345 - 18.5015 19.9052 0.00000 1.00000 -19.9052 - 18.5200 12.1472 0.00000 1.00000 -12.1472 - 18.5385 3.09099 0.00000 1.00000 -3.09099 - 18.5570 -6.03798 0.00000 1.00000 6.03798 - 18.5755 -14.0281 0.00000 1.00000 14.0281 - 18.5940 -19.8843 0.00000 1.00000 19.8843 - 18.6125 -22.9844 0.00000 1.00000 22.9844 - 18.6310 -23.1597 0.00000 1.00000 23.1597 - 18.6495 -20.6881 0.00000 1.00000 20.6881 - 18.6680 -16.2075 0.00000 1.00000 16.2075 - 18.6865 -10.5714 0.00000 1.00000 10.5714 - 18.7050 -4.68098 0.00000 1.00000 4.68098 - 18.7235 0.671251 0.00000 1.00000 -0.671251 - 18.7420 4.91529 0.00000 1.00000 -4.91529 - 18.7605 7.75797 0.00000 1.00000 -7.75797 - 18.7790 9.17588 0.00000 1.00000 -9.17588 - 18.7975 9.35965 0.00000 1.00000 -9.35965 - 18.8160 8.63035 0.00000 1.00000 -8.63035 - 18.8345 7.35145 0.00000 1.00000 -7.35145 - 18.8530 5.85510 0.00000 1.00000 -5.85510 - 18.8715 4.39513 0.00000 1.00000 -4.39513 - 18.8900 3.13002 0.00000 1.00000 -3.13002 - 18.9085 2.13168 0.00000 1.00000 -2.13168 - 18.9270 1.40976 0.00000 1.00000 -1.40976 - 18.9455 0.939913 0.00000 1.00000 -0.939913 - 18.9640 0.686429 0.00000 1.00000 -0.686429 - 18.9825 0.614229 0.00000 1.00000 -0.614229 - 19.0010 0.690570 0.00000 1.00000 -0.690570 - 19.0195 0.880032 0.00000 1.00000 -0.880032 - 19.0380 1.13788 0.00000 1.00000 -1.13788 - 19.0565 1.40627 0.00000 1.00000 -1.40627 - 19.0750 1.61604 0.00000 1.00000 -1.61604 - 19.0935 1.69418 0.00000 1.00000 -1.69418 - 19.1120 1.57467 0.00000 1.00000 -1.57467 - 19.1305 1.20912 0.00000 1.00000 -1.20912 - 19.1490 0.574418 0.00000 1.00000 -0.574418 - 19.1675 -0.322868 0.00000 1.00000 0.322868 - 19.1860 -1.44364 0.00000 1.00000 1.44364 - 19.2045 -2.71278 0.00000 1.00000 2.71278 - 19.2230 -4.01492 0.00000 1.00000 4.01492 - 19.2415 -5.19189 0.00000 1.00000 5.19189 - 19.2600 -6.04623 0.00000 1.00000 6.04623 - 19.2785 -6.35560 0.00000 1.00000 6.35560 - 19.2970 -5.90135 0.00000 1.00000 5.90135 - 19.3155 -4.51168 0.00000 1.00000 4.51168 - 19.3340 -2.11474 0.00000 1.00000 2.11474 - 19.3525 1.20914 0.00000 1.00000 -1.20914 - 19.3710 5.19105 0.00000 1.00000 -5.19105 - 19.3895 9.36912 0.00000 1.00000 -9.36912 - 19.4080 13.1271 0.00000 1.00000 -13.1271 - 19.4265 15.7779 0.00000 1.00000 -15.7779 - 19.4450 16.6827 0.00000 1.00000 -16.6827 - 19.4635 15.3867 0.00000 1.00000 -15.3867 - 19.4820 11.7418 0.00000 1.00000 -11.7418 - 19.5005 5.98757 0.00000 1.00000 -5.98757 - 19.5190 -1.23710 0.00000 1.00000 1.23710 - 19.5375 -8.96359 0.00000 1.00000 8.96359 - 19.5560 -16.0382 0.00000 1.00000 16.0382 - 19.5745 -21.3164 0.00000 1.00000 21.3164 - 19.5930 -23.8699 0.00000 1.00000 23.8699 - 19.6115 -23.1644 0.00000 1.00000 23.1644 - 19.6300 -19.1740 0.00000 1.00000 19.1740 - 19.6485 -12.4057 0.00000 1.00000 12.4057 - 19.6670 -3.82669 0.00000 1.00000 3.82669 - 19.6855 5.29471 0.00000 1.00000 -5.29471 - 19.7040 13.6058 0.00000 1.00000 -13.6058 - 19.7225 19.9014 0.00000 1.00000 -19.9014 - 19.7410 23.3260 0.00000 1.00000 -23.3260 - 19.7595 23.5068 0.00000 1.00000 -23.5068 - 19.7780 20.5929 0.00000 1.00000 -20.5929 - 19.7965 15.1973 0.00000 1.00000 -15.1973 - 19.8150 8.25741 0.00000 1.00000 -8.25741 - 19.8335 0.846490 0.00000 1.00000 -0.846490 - 19.8520 -6.02165 0.00000 1.00000 6.02165 - 19.8705 -11.5565 0.00000 1.00000 11.5565 - 19.8890 -15.2939 0.00000 1.00000 15.2939 - 19.9075 -17.1257 0.00000 1.00000 17.1257 - 19.9260 -17.2573 0.00000 1.00000 17.2573 - 19.9445 -16.1119 0.00000 1.00000 16.1119 - 19.9630 -14.2055 0.00000 1.00000 14.2055 - 19.9815 -12.0275 0.00000 1.00000 12.0275 - 20.0000 -9.95383 0.00000 1.00000 9.95383 diff --git a/diffpy/pdffit2/tests/testdata/Ni.stru b/diffpy/pdffit2/tests/testdata/Ni.stru deleted file mode 100644 index b4da517c..00000000 --- a/diffpy/pdffit2/tests/testdata/Ni.stru +++ /dev/null @@ -1,33 +0,0 @@ -title structure Ni FCC -format pdffit -scale 1.000000 -sharp 0.000000, 1.000000, 0.000000 -spcgr Fm-3m -cell 3.520000, 3.520000, 3.520000, 90.000000, 90.000000, 90.000000 -dcell 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000 -ncell 1, 1, 1, 4 -atoms -NI 0.00000000 0.00000000 0.00000000 1.0000 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.00126651 0.00126651 0.00126651 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -NI 0.00000000 0.50000000 0.50000000 1.0000 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.00126651 0.00126651 0.00126651 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -NI 0.50000000 0.00000000 0.50000000 1.0000 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.00126651 0.00126651 0.00126651 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -NI 0.50000000 0.50000000 0.00000000 1.0000 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.00126651 0.00126651 0.00126651 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 diff --git a/diffpy/pdffit2/tests/testdata/PbScW25TiO3.stru b/diffpy/pdffit2/tests/testdata/PbScW25TiO3.stru deleted file mode 100644 index 71ba3651..00000000 --- a/diffpy/pdffit2/tests/testdata/PbScW25TiO3.stru +++ /dev/null @@ -1,345 +0,0 @@ -title Pb8 (Sc16/3 W8/3)0.75 (Ti8)0.25 O24, B factors from BNL2 -format pdffit -scale 1.000000 -sharp 0.000000, 1.000000, 0.000000 -spcgr Fm-3m -cell 8.072700, 8.072700, 8.072700, 90.000000, 90.000000, 90.000000 -dcell 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000 -ncell 1, 1, 1, 56 -atoms -PB 0.25000000 0.25000000 0.25000000 1.0000 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.04795025 0.04795025 0.04795025 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -PB 0.25000000 0.75000000 0.75000000 1.0000 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.04795025 0.04795025 0.04795025 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -PB 0.75000000 0.25000000 0.75000000 1.0000 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.04795025 0.04795025 0.04795025 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -PB 0.75000000 0.75000000 0.25000000 1.0000 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.04795025 0.04795025 0.04795025 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -PB 0.25000000 0.25000000 0.75000000 1.0000 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.04795025 0.04795025 0.04795025 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -PB 0.75000000 0.25000000 0.25000000 1.0000 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.04795025 0.04795025 0.04795025 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -PB 0.25000000 0.75000000 0.25000000 1.0000 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.04795025 0.04795025 0.04795025 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -PB 0.75000000 0.75000000 0.75000000 1.0000 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.04795025 0.04795025 0.04795025 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -O 0.00000000 0.00000000 0.25735000 1.0000 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.02293025 0.02293025 0.02293025 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -O 0.00000000 0.50000000 0.75735003 1.0000 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.02293025 0.02293025 0.02293025 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -O 0.50000000 0.00000000 0.75735003 1.0000 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.02293025 0.02293025 0.02293025 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -O 0.50000000 0.50000000 0.25735000 1.0000 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.02293025 0.02293025 0.02293025 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -O 0.00000000 0.00000000 0.74264997 1.0000 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.02293025 0.02293025 0.02293025 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -O 0.00000000 0.50000000 0.24265000 1.0000 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.02293025 0.02293025 0.02293025 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -O 0.50000000 0.00000000 0.24265000 1.0000 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.02293025 0.02293025 0.02293025 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -O 0.50000000 0.50000000 0.74264997 1.0000 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.02293025 0.02293025 0.02293025 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -O 0.25735000 0.00000000 0.00000000 1.0000 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.02293025 0.02293025 0.02293025 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -O 0.75735003 0.00000000 0.50000000 1.0000 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.02293025 0.02293025 0.02293025 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -O 0.75735003 0.50000000 0.00000000 1.0000 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.02293025 0.02293025 0.02293025 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -O 0.25735000 0.50000000 0.50000000 1.0000 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.02293025 0.02293025 0.02293025 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -O 0.74264997 0.00000000 0.00000000 1.0000 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.02293025 0.02293025 0.02293025 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -O 0.24265000 0.00000000 0.50000000 1.0000 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.02293025 0.02293025 0.02293025 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -O 0.24265000 0.50000000 0.00000000 1.0000 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.02293025 0.02293025 0.02293025 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -O 0.74264997 0.50000000 0.50000000 1.0000 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.02293025 0.02293025 0.02293025 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -O 0.00000000 0.25735000 0.00000000 1.0000 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.02293025 0.02293025 0.02293025 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -O 0.50000000 0.75735003 0.00000000 1.0000 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.02293025 0.02293025 0.02293025 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -O 0.00000000 0.75735003 0.50000000 1.0000 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.02293025 0.02293025 0.02293025 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -O 0.50000000 0.25735000 0.50000000 1.0000 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.02293025 0.02293025 0.02293025 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -O 0.00000000 0.74264997 0.00000000 1.0000 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.02293025 0.02293025 0.02293025 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -O 0.50000000 0.24265000 0.00000000 1.0000 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.02293025 0.02293025 0.02293025 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -O 0.00000000 0.24265000 0.50000000 1.0000 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.02293025 0.02293025 0.02293025 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -O 0.50000000 0.74264997 0.50000000 1.0000 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.02293025 0.02293025 0.02293025 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -SC 0.00000000 0.00000000 0.00000000 0.9739 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.00809050 0.00809050 0.00809050 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -SC 0.00000000 0.50000000 0.50000000 0.9739 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.00809050 0.00809050 0.00809050 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -SC 0.50000000 0.00000000 0.50000000 0.9739 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.00809050 0.00809050 0.00809050 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -SC 0.50000000 0.50000000 0.00000000 0.9739 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.00809050 0.00809050 0.00809050 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -SC 0.50000000 0.50000000 0.50000000 0.0261 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.00809050 0.00809050 0.00809050 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -SC 0.50000000 0.00000000 0.00000000 0.0261 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.00809050 0.00809050 0.00809050 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -SC 0.00000000 0.50000000 0.00000000 0.0261 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.00809050 0.00809050 0.00809050 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -SC 0.00000000 0.00000000 0.50000000 0.0261 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.00809050 0.00809050 0.00809050 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -W 0.00000000 0.00000000 0.00000000 0.0131 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.00809050 0.00809050 0.00809050 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -W 0.00000000 0.50000000 0.50000000 0.0131 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.00809050 0.00809050 0.00809050 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -W 0.50000000 0.00000000 0.50000000 0.0131 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.00809050 0.00809050 0.00809050 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -W 0.50000000 0.50000000 0.00000000 0.0131 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.00809050 0.00809050 0.00809050 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -W 0.50000000 0.50000000 0.50000000 0.4869 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.00809050 0.00809050 0.00809050 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -W 0.50000000 0.00000000 0.00000000 0.4869 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.00809050 0.00809050 0.00809050 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -W 0.00000000 0.50000000 0.00000000 0.4869 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.00809050 0.00809050 0.00809050 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -W 0.00000000 0.00000000 0.50000000 0.4869 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.00809050 0.00809050 0.00809050 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -TI 0.00000000 0.00000000 0.00000000 0.0131 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.00809050 0.00809050 0.00809050 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -TI 0.00000000 0.50000000 0.50000000 0.0131 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.00809050 0.00809050 0.00809050 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -TI 0.50000000 0.00000000 0.50000000 0.0131 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.00809050 0.00809050 0.00809050 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -TI 0.50000000 0.50000000 0.00000000 0.0131 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.00809050 0.00809050 0.00809050 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -TI 0.50000000 0.50000000 0.50000000 0.4869 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.00809050 0.00809050 0.00809050 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -TI 0.50000000 0.00000000 0.00000000 0.4869 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.00809050 0.00809050 0.00809050 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -TI 0.00000000 0.50000000 0.00000000 0.4869 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.00809050 0.00809050 0.00809050 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -TI 0.00000000 0.00000000 0.50000000 0.4869 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.00809050 0.00809050 0.00809050 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 diff --git a/diffpy/pdffit2/tests/testdata/badNi.dat b/diffpy/pdffit2/tests/testdata/badNi.dat deleted file mode 100644 index ef5b7007..00000000 --- a/diffpy/pdffit2/tests/testdata/badNi.dat +++ /dev/null @@ -1,1001 +0,0 @@ - 1.50000 -0.539443 0.00000 1.00000 0.539443 - 1.51850 -1.03098 0.00000 1.00000 1.03098 - 1.53700 -1.43712 0.00000 1.00000 1.43712 - 1.55550 -1.73810 0.00000 1.00000 1.73810 - 1.57400 -1.93402 0.00000 1.00000 1.93402 - 1.59250 -2.04145 0.00000 1.00000 2.04145 - 1.61100 -2.08593 0.00000 1.00000 2.08593 - 1.62950 -2.09295 0.00000 1.00000 2.09295 - 1.64800 -2.08072 0.00000 1.00000 2.08072 - 1.66650 -2.05688 0.00000 1.00000 2.05688 - 1.68500 -2.02006 0.00000 1.00000 2.02006 - 1.70350 -1.96554 0.00000 1.00000 1.96554 - 1.72200 -1.89239 0.00000 1.00000 1.89239 - 1.74050 -1.80936 0.00000 1.00000 1.80936 - 1.75900 -1.73670 0.00000 1.00000 1.73670 - 1.77750 -1.70255 0.00000 1.00000 1.70255 - 1.79600 -1.73461 0.00000 1.00000 1.73461 - 1.81450 -1.84946 0.00000 1.00000 1.84946 - 1.83300 -2.04300 0.00000 1.00000 2.04300 - 1.85150 -2.28566 0.00000 1.00000 2.28566 - 1.87000 -2.52486 0.00000 1.00000 2.52486 - 1.88850 -2.69615 0.00000 1.00000 2.69615 - 1.92700 -2.74180 0.00000 1.00000 2.74180 - 1.92550 -2.63223 0.00000 1.00000 2.63223 - 1.94400 -2.38239 0.00000 1.00000 2.38239 - 1.96250 -2.05565 0.00000 1.00000 2.05565 - 1.98100 -1.75092 0.00000 1.00000 1.75092 - 1.99950 -1.57518 0.00000 1.00000 1.57518 - 2.01800 -1.60914 0.00000 1.00000 1.60914 - 2.03650 -1.87687 0.00000 1.00000 1.87687 - 2.05500 -2.33004 0.00000 1.00000 2.33004 - 2.07350 -2.85357 0.00000 1.00000 2.85357 - 2.09200 -3.29353 0.00000 1.00000 3.29353 - 2.11050 -3.50124 0.00000 1.00000 3.50124 - 2.12900 -3.38172 0.00000 1.00000 3.38172 - 2.14750 -2.93205 0.00000 1.00000 2.93205 - 2.16600 -2.25629 0.00000 1.00000 2.25629 - 2.18450 -1.54918 0.00000 1.00000 1.54918 - 2.20300 -1.04888 0.00000 1.00000 1.04888 - 2.22150 -0.968136 0.00000 1.00000 0.968136 - 2.24000 -1.42070 0.00000 1.00000 1.42070 - 2.25850 -2.36300 0.00000 1.00000 2.36300 - 2.27700 -3.56960 0.00000 1.00000 3.56960 - 2.29550 -4.65416 0.00000 1.00000 4.65416 - 2.31400 -5.13684 0.00000 1.00000 5.13684 - 2.33250 -4.54696 0.00000 1.00000 4.54696 - 2.35100 -2.53890 0.00000 1.00000 2.53890 - 2.36950 1.00656 0.00000 1.00000 -1.00656 - 2.38800 5.92223 0.00000 1.00000 -5.92223 - 2.40650 11.7527 0.00000 1.00000 -11.7527 - 2.42500 17.8143 0.00000 1.00000 -17.8143 - 2.44350 23.3057 0.00000 1.00000 -23.3057 - 2.46200 27.4478 0.00000 1.00000 -27.4478 - 2.48050 29.6246 0.00000 1.00000 -29.6246 - 2.49900 29.4986 0.00000 1.00000 -29.4986 - 2.51750 27.0749 0.00000 1.00000 -27.0749 - 2.53600 22.7028 0.00000 1.00000 -22.7028 - 2.55450 17.0112 0.00000 1.00000 -17.0112 - 2.57300 10.7932 0.00000 1.00000 -10.7932 - 2.59150 4.86134 0.00000 1.00000 -4.86134 - 2.61000 -0.0945224 0.00000 1.00000 0.0945224 - 2.62850 -3.61858 0.00000 1.00000 3.61858 - 2.64700 -5.54803 0.00000 1.00000 5.54803 - 2.66550 -6.01016 0.00000 1.00000 6.01016 - 2.68400 -5.36293 0.00000 1.00000 5.36293 - 2.70250 -4.09596 0.00000 1.00000 4.09596 - 2.72100 -2.71625 0.00000 1.00000 2.71625 - 2.73950 -1.64382 0.00000 1.00000 1.64382 - 2.75800 -1.13791 0.00000 1.00000 1.13791 - 2.77650 -1.26649 0.00000 1.00000 1.26649 - 2.79500 -1.92103 0.00000 1.00000 1.92103 - 2.81350 -2.86890 0.00000 1.00000 2.86890 - 2.83200 -3.82782 0.00000 1.00000 3.82782 - 2.85050 -4.54328 0.00000 1.00000 4.54328 - 2.86900 -4.85054 0.00000 1.00000 4.85054 - 2.88750 -4.70809 0.00000 1.00000 4.70809 - 2.90600 -4.19687 0.00000 1.00000 4.19687 - 2.92450 -3.48841 0.00000 1.00000 3.48841 - 2.94300 -2.79256 0.00000 1.00000 2.79256 - 2.96150 -2.29993 0.00000 1.00000 2.29993 - 2.98000 -2.13422 0.00000 1.00000 2.13422 - 2.99850 -2.32552 0.00000 1.00000 2.32552 - 3.01700 -2.80931 0.00000 1.00000 2.80931 - 3.03550 -3.44928 0.00000 1.00000 3.44928 - 3.05400 -4.07624 0.00000 1.00000 4.07624 - 3.07250 -4.53264 0.00000 1.00000 4.53264 - 3.09100 -4.71141 0.00000 1.00000 4.71141 - 3.10950 -4.58013 0.00000 1.00000 4.58013 - 3.12800 -4.18572 0.00000 1.00000 4.18572 - 3.14650 -3.63955 0.00000 1.00000 3.63955 - 3.16500 -3.08796 0.00000 1.00000 3.08796 - 3.18350 -2.67579 0.00000 1.00000 2.67579 - 3.20200 -2.51194 0.00000 1.00000 2.51194 - 3.22050 -2.64475 0.00000 1.00000 2.64475 - 3.23900 -3.05186 0.00000 1.00000 3.05186 - 3.25750 -3.64576 0.00000 1.00000 3.64576 - 3.27600 -4.29257 0.00000 1.00000 4.29257 - 3.29450 -4.83876 0.00000 1.00000 4.83876 - 3.31300 -5.14008 0.00000 1.00000 5.14008 - 3.33150 -5.08721 0.00000 1.00000 5.08721 - 3.35000 -4.62391 0.00000 1.00000 4.62391 - 3.36850 -3.75470 0.00000 1.00000 3.75470 - 3.38700 -2.54063 0.00000 1.00000 2.54063 - 3.40550 -1.08396 0.00000 1.00000 1.08396 - 3.42400 0.493223 0.00000 1.00000 -0.493223 - 3.44250 2.06874 0.00000 1.00000 -2.06874 - 3.46100 3.53152 0.00000 1.00000 -3.53152 - 3.47950 4.78254 0.00000 1.00000 -4.78254 - 3.49800 5.72969 0.00000 1.00000 -5.72969 - 3.51650 6.28423 0.00000 1.00000 -6.28423 - 3.53500 6.36504 0.00000 1.00000 -6.36504 - 3.55350 5.91247 0.00000 1.00000 -5.91247 - 3.57200 4.90861 0.00000 1.00000 -4.90861 - 3.59050 3.39740 0.00000 1.00000 -3.39740 - 3.60900 1.49612 0.00000 1.00000 -1.49612 - 3.62750 -0.608193 0.00000 1.00000 0.608193 - 3.64600 -2.68019 0.00000 1.00000 2.68019 - 3.66450 -4.47243 0.00000 1.00000 4.47243 - 3.68300 -5.76925 0.00000 1.00000 5.76925 - 3.70150 -6.42920 0.00000 1.00000 6.42920 - 3.72000 -6.41719 0.00000 1.00000 6.41719 - 3.73850 -5.81875 0.00000 1.00000 5.81875 - 3.75700 -4.83074 0.00000 1.00000 4.83074 - 3.77550 -3.72667 0.00000 1.00000 3.72667 - 3.79400 -2.80071 0.00000 1.00000 2.80071 - 3.81250 -2.30147 0.00000 1.00000 2.30147 - 3.83100 -2.37126 0.00000 1.00000 2.37126 - 3.84950 -3.00713 0.00000 1.00000 3.00713 - 3.86800 -4.05566 0.00000 1.00000 4.05566 - 3.88650 -5.24604 0.00000 1.00000 5.24604 - 3.90500 -6.25585 0.00000 1.00000 6.25585 - 3.92350 -6.79521 0.00000 1.00000 6.79521 - 3.94200 -6.68830 0.00000 1.00000 6.68830 - 3.96050 -5.93010 0.00000 1.00000 5.93010 - 3.97900 -4.70113 0.00000 1.00000 4.70113 - 3.99750 -3.33259 0.00000 1.00000 3.33259 - 4.01600 -2.22683 0.00000 1.00000 2.22683 - 4.03450 -1.75037 0.00000 1.00000 1.75037 - 4.05300 -2.12498 0.00000 1.00000 2.12498 - 4.07150 -3.34471 0.00000 1.00000 3.34471 - 4.09000 -5.14253 0.00000 1.00000 5.14253 - 4.10850 -7.01935 0.00000 1.00000 7.01935 - 4.12700 -8.33391 0.00000 1.00000 8.33391 - 4.14550 -8.43660 0.00000 1.00000 8.43660 - 4.16400 -6.81920 0.00000 1.00000 6.81920 - 4.18250 -3.24667 0.00000 1.00000 3.24667 - 4.20100 2.16009 0.00000 1.00000 -2.16009 - 4.21950 8.91152 0.00000 1.00000 -8.91152 - 4.23800 16.2134 0.00000 1.00000 -16.2134 - 4.25650 23.0973 0.00000 1.00000 -23.0973 - 4.27500 28.5935 0.00000 1.00000 -28.5935 - 4.29350 31.9106 0.00000 1.00000 -31.9106 - 4.31200 32.5842 0.00000 1.00000 -32.5842 - 4.33050 30.5617 0.00000 1.00000 -30.5617 - 4.34900 26.2027 0.00000 1.00000 -26.2027 - 4.36750 20.1990 0.00000 1.00000 -20.1990 - 4.38600 13.4320 0.00000 1.00000 -13.4320 - 4.40450 6.80337 0.00000 1.00000 -6.80337 - 4.42300 1.07527 0.00000 1.00000 -1.07527 - 4.44150 -3.24700 0.00000 1.00000 3.24700 - 4.46000 -5.96945 0.00000 1.00000 5.96945 - 4.47850 -7.19581 0.00000 1.00000 7.19581 - 4.49700 -7.25613 0.00000 1.00000 7.25613 - 4.51550 -6.59972 0.00000 1.00000 6.59972 - 4.53400 -5.68054 0.00000 1.00000 5.68054 - 4.55250 -4.86170 0.00000 1.00000 4.86170 - 4.57100 -4.35835 0.00000 1.00000 4.35835 - 4.58950 -4.22677 0.00000 1.00000 4.22677 - 4.60800 -4.39508 0.00000 1.00000 4.39508 - 4.62650 -4.72130 0.00000 1.00000 4.72130 - 4.64500 -5.05871 0.00000 1.00000 5.05871 - 4.66350 -5.30848 0.00000 1.00000 5.30848 - 4.68200 -5.44197 0.00000 1.00000 5.44197 - 4.70050 -5.50097 0.00000 1.00000 5.50097 - 4.71900 -5.56456 0.00000 1.00000 5.56456 - 4.73750 -5.69659 0.00000 1.00000 5.69659 - 4.75600 -5.90806 0.00000 1.00000 5.90806 - 4.77450 -6.13525 0.00000 1.00000 6.13525 - 4.79300 -6.24364 0.00000 1.00000 6.24364 - 4.81150 -6.05670 0.00000 1.00000 6.05670 - 4.83000 -5.40165 0.00000 1.00000 5.40165 - 4.84850 -4.16022 0.00000 1.00000 4.16022 - 4.86700 -2.31100 0.00000 1.00000 2.31100 - 4.88550 0.0479985 0.00000 1.00000 -0.0479985 - 4.90400 2.70271 0.00000 1.00000 -2.70271 - 4.92250 5.35252 0.00000 1.00000 -5.35252 - 4.94100 7.65960 0.00000 1.00000 -7.65960 - 4.95950 9.30734 0.00000 1.00000 -9.30734 - 4.97800 10.0558 0.00000 1.00000 -10.0558 - 4.99650 9.78268 0.00000 1.00000 -9.78268 - 5.01500 8.50309 0.00000 1.00000 -8.50309 - 5.03350 6.36470 0.00000 1.00000 -6.36470 - 5.05200 3.62252 0.00000 1.00000 -3.62252 - 5.07050 0.599290 0.00000 1.00000 -0.599290 - 5.08900 -2.36086 0.00000 1.00000 2.36086 - 5.10750 -4.93870 0.00000 1.00000 4.93870 - 5.12600 -6.88149 0.00000 1.00000 6.88149 - 5.14450 -8.03565 0.00000 1.00000 8.03565 - 5.16300 -8.36668 0.00000 1.00000 8.36668 - 5.18150 -7.96304 0.00000 1.00000 7.96304 - 5.20000 -7.02207 0.00000 1.00000 7.02207 - 5.21850 -5.81895 0.00000 1.00000 5.81895 - 5.23700 -4.66171 0.00000 1.00000 4.66171 - 5.25550 -3.83844 0.00000 1.00000 3.83844 - 5.27400 -3.56410 0.00000 1.00000 3.56410 - 5.29250 -3.93573 0.00000 1.00000 3.93573 - 5.31100 -4.90467 0.00000 1.00000 4.90467 - 5.32950 -6.27267 0.00000 1.00000 6.27267 - 5.34800 -7.71536 0.00000 1.00000 7.71536 - 5.36650 -8.83203 0.00000 1.00000 8.83203 - 5.38500 -9.21516 0.00000 1.00000 9.21516 - 5.40350 -8.52808 0.00000 1.00000 8.52808 - 5.42200 -6.57611 0.00000 1.00000 6.57611 - 5.44050 -3.35625 0.00000 1.00000 3.35625 - 5.45900 0.925287 0.00000 1.00000 -0.925287 - 5.47750 5.87209 0.00000 1.00000 -5.87209 - 5.49600 10.9500 0.00000 1.00000 -10.9500 - 5.51450 15.5640 0.00000 1.00000 -15.5640 - 5.53300 19.1477 0.00000 1.00000 -19.1477 - 5.55150 21.2490 0.00000 1.00000 -21.2490 - 5.57000 21.6003 0.00000 1.00000 -21.6003 - 5.58850 20.1588 0.00000 1.00000 -20.1588 - 5.60700 17.1124 0.00000 1.00000 -17.1124 - 5.62550 12.8494 0.00000 1.00000 -12.8494 - 5.64400 7.89927 0.00000 1.00000 -7.89927 - 5.66250 2.85190 0.00000 1.00000 -2.85190 - 5.68100 -1.72997 0.00000 1.00000 1.72997 - 5.69950 -5.39381 0.00000 1.00000 5.39381 - 5.71800 -7.86162 0.00000 1.00000 7.86162 - 5.73650 -9.06420 0.00000 1.00000 9.06420 - 5.75500 -9.13837 0.00000 1.00000 9.13837 - 5.77350 -8.38683 0.00000 1.00000 8.38683 - 5.79200 -7.20818 0.00000 1.00000 7.20818 - 5.81050 -6.01172 0.00000 1.00000 6.01172 - 5.82900 -5.13567 0.00000 1.00000 5.13567 - 5.84750 -4.78662 0.00000 1.00000 4.78662 - 5.86600 -5.01125 0.00000 1.00000 5.01125 - 5.88450 -5.70222 0.00000 1.00000 5.70222 - 5.90300 -6.63275 0.00000 1.00000 6.63275 - 5.92150 -7.51031 0.00000 1.00000 7.51031 - 5.94000 -8.03914 0.00000 1.00000 8.03914 - 5.95850 -7.98163 0.00000 1.00000 7.98163 - 5.97700 -7.20897 0.00000 1.00000 7.20897 - 5.99550 -5.73309 0.00000 1.00000 5.73309 - 6.01400 -3.71335 0.00000 1.00000 3.71335 - 6.03250 -1.43572 0.00000 1.00000 1.43572 - 6.05100 0.734316 0.00000 1.00000 -0.734316 - 6.06950 2.41816 0.00000 1.00000 -2.41816 - 6.08800 3.29880 0.00000 1.00000 -3.29880 - 6.10650 3.18922 0.00000 1.00000 -3.18922 - 6.12500 2.07961 0.00000 1.00000 -2.07961 - 6.14350 0.150522 0.00000 1.00000 -0.150522 - 6.16200 -2.25436 0.00000 1.00000 2.25436 - 6.18050 -4.69426 0.00000 1.00000 4.69426 - 6.19900 -6.72460 0.00000 1.00000 6.72460 - 6.21750 -7.99834 0.00000 1.00000 7.99834 - 6.23600 -8.35142 0.00000 1.00000 8.35142 - 6.25450 -7.84948 0.00000 1.00000 7.84948 - 6.27300 -6.78013 0.00000 1.00000 6.78013 - 6.29150 -5.58671 0.00000 1.00000 5.58671 - 6.31000 -4.75441 0.00000 1.00000 4.75441 - 6.32850 -4.67266 0.00000 1.00000 4.67266 - 6.34700 -5.50714 0.00000 1.00000 5.50714 - 6.36550 -7.11590 0.00000 1.00000 7.11590 - 6.38400 -9.03699 0.00000 1.00000 9.03699 - 6.40250 -10.5592 0.00000 1.00000 10.5592 - 6.42100 -10.8676 0.00000 1.00000 10.8676 - 6.43950 -9.23379 0.00000 1.00000 9.23379 - 6.45800 -5.20861 0.00000 1.00000 5.20861 - 6.47650 1.23011 0.00000 1.00000 -1.23011 - 6.49500 9.61241 0.00000 1.00000 -9.61241 - 6.51350 19.0142 0.00000 1.00000 -19.0142 - 6.53200 28.1967 0.00000 1.00000 -28.1967 - 6.55050 35.8243 0.00000 1.00000 -35.8243 - 6.56900 40.7166 0.00000 1.00000 -40.7166 - 6.58750 42.0833 0.00000 1.00000 -42.0833 - 6.60600 39.6873 0.00000 1.00000 -39.6873 - 6.62450 33.8989 0.00000 1.00000 -33.8989 - 6.64300 25.6256 0.00000 1.00000 -25.6256 - 6.66150 16.1324 0.00000 1.00000 -16.1324 - 6.68000 6.79125 0.00000 1.00000 -6.79125 - 6.69850 -1.18411 0.00000 1.00000 1.18411 - 6.71700 -6.95910 0.00000 1.00000 6.95910 - 6.73550 -10.2079 0.00000 1.00000 10.2079 - 6.75400 -11.1248 0.00000 1.00000 11.1248 - 6.77250 -10.3198 0.00000 1.00000 10.3198 - 6.79100 -8.62815 0.00000 1.00000 8.62815 - 6.80950 -6.88571 0.00000 1.00000 6.88571 - 6.82800 -5.72660 0.00000 1.00000 5.72660 - 6.84650 -5.45332 0.00000 1.00000 5.45332 - 6.86500 -6.00649 0.00000 1.00000 6.00649 - 6.88350 -7.03437 0.00000 1.00000 7.03437 - 6.90200 -8.03570 0.00000 1.00000 8.03570 - 6.92050 -8.53209 0.00000 1.00000 8.53209 - 6.93900 -8.22002 0.00000 1.00000 8.22002 - 6.95750 -7.06140 0.00000 1.00000 7.06140 - 6.97600 -5.29017 0.00000 1.00000 5.29017 - 6.99450 -3.33754 0.00000 1.00000 3.33754 - 7.01300 -1.70148 0.00000 1.00000 1.70148 - 7.03150 -0.800760 0.00000 1.00000 0.800760 - 7.05000 -0.856664 0.00000 1.00000 0.856664 - 7.06850 -1.83505 0.00000 1.00000 1.83505 - 7.08700 -3.46358 0.00000 1.00000 3.46358 - 7.10550 -5.31731 0.00000 1.00000 5.31731 - 7.12400 -6.94715 0.00000 1.00000 6.94715 - 7.14250 -8.01332 0.00000 1.00000 8.01332 - 7.16100 -8.38320 0.00000 1.00000 8.38320 - 7.17950 -8.16268 0.00000 1.00000 8.16268 - 7.19800 -7.64952 0.00000 1.00000 7.64952 - 7.21650 -7.22129 0.00000 1.00000 7.22129 - 7.23500 -7.19206 0.00000 1.00000 7.19206 - 7.25350 -7.68220 0.00000 1.00000 7.68220 - 7.27200 -8.54371 0.00000 1.00000 8.54371 - 7.29050 -9.36819 0.00000 1.00000 9.36819 - 7.30900 -9.58072 0.00000 1.00000 9.58072 - 7.32750 -8.59790 0.00000 1.00000 8.59790 - 7.34600 -6.00785 0.00000 1.00000 6.00785 - 7.36450 -1.72106 0.00000 1.00000 1.72106 - 7.38300 3.95269 0.00000 1.00000 -3.95269 - 7.40150 10.3276 0.00000 1.00000 -10.3276 - 7.42000 16.4640 0.00000 1.00000 -16.4640 - 7.43850 21.3618 0.00000 1.00000 -21.3618 - 7.45700 24.1782 0.00000 1.00000 -24.1782 - 7.47550 24.4162 0.00000 1.00000 -24.4162 - 7.49400 22.0356 0.00000 1.00000 -22.0356 - 7.51250 17.4573 0.00000 1.00000 -17.4573 - 7.53100 11.4623 0.00000 1.00000 -11.4623 - 7.54950 5.01118 0.00000 1.00000 -5.01118 - 7.56800 -0.965076 0.00000 1.00000 0.965076 - 7.58650 -5.75153 0.00000 1.00000 5.75153 - 7.60500 -8.96799 0.00000 1.00000 8.96799 - 7.62350 -10.5969 0.00000 1.00000 10.5969 - 7.64200 -10.9206 0.00000 1.00000 10.9206 - 7.66050 -10.3893 0.00000 1.00000 10.3893 - 7.67900 -9.46200 0.00000 1.00000 9.46200 - 7.69750 -8.46444 0.00000 1.00000 8.46444 - 7.71600 -7.50854 0.00000 1.00000 7.50854 - 7.73450 -6.49304 0.00000 1.00000 6.49304 - 7.75300 -5.18168 0.00000 1.00000 5.18168 - 7.77150 -3.32911 0.00000 1.00000 3.32911 - 7.79000 -0.811546 0.00000 1.00000 0.811546 - 7.80850 2.28073 0.00000 1.00000 -2.28073 - 7.82700 5.61902 0.00000 1.00000 -5.61902 - 7.84550 8.68909 0.00000 1.00000 -8.68909 - 7.86400 10.9073 0.00000 1.00000 -10.9073 - 7.88250 11.7676 0.00000 1.00000 -11.7676 - 7.90100 10.9777 0.00000 1.00000 -10.9777 - 7.91950 8.54633 0.00000 1.00000 -8.54633 - 7.93800 4.79627 0.00000 1.00000 -4.79627 - 7.95650 0.300695 0.00000 1.00000 -0.300695 - 7.97500 -4.24152 0.00000 1.00000 4.24152 - 7.99350 -8.15787 0.00000 1.00000 8.15787 - 8.01200 -10.9420 0.00000 1.00000 10.9420 - 8.03050 -12.3456 0.00000 1.00000 12.3456 - 8.04900 -12.4001 0.00000 1.00000 12.4001 - 8.06750 -11.3663 0.00000 1.00000 11.3663 - 8.08600 -9.63181 0.00000 1.00000 9.63181 - 8.10450 -7.58723 0.00000 1.00000 7.58723 - 8.12300 -5.52117 0.00000 1.00000 5.52117 - 8.14150 -3.56353 0.00000 1.00000 3.56353 - 8.16000 -1.69260 0.00000 1.00000 1.69260 - 8.17850 0.199827 0.00000 1.00000 -0.199827 - 8.19700 2.21044 0.00000 1.00000 -2.21044 - 8.21550 4.33057 0.00000 1.00000 -4.33057 - 8.23400 6.39218 0.00000 1.00000 -6.39218 - 8.25250 8.07555 0.00000 1.00000 -8.07555 - 8.27100 8.97896 0.00000 1.00000 -8.97896 - 8.28950 8.73073 0.00000 1.00000 -8.73073 - 8.30800 7.11016 0.00000 1.00000 -7.11016 - 8.32650 4.14151 0.00000 1.00000 -4.14151 - 8.34500 0.130936 0.00000 1.00000 -0.130936 - 8.36350 -4.36837 0.00000 1.00000 4.36837 - 8.38200 -8.65854 0.00000 1.00000 8.65854 - 8.40050 -12.0433 0.00000 1.00000 12.0433 - 8.41900 -13.9807 0.00000 1.00000 13.9807 - 8.43750 -14.2030 0.00000 1.00000 14.2030 - 8.45600 -12.7704 0.00000 1.00000 12.7704 - 8.47450 -10.0445 0.00000 1.00000 10.0445 - 8.49300 -6.58938 0.00000 1.00000 6.58938 - 8.51150 -3.02663 0.00000 1.00000 3.02663 - 8.53000 0.112114 0.00000 1.00000 -0.112114 - 8.54850 2.49566 0.00000 1.00000 -2.49566 - 8.56700 4.03580 0.00000 1.00000 -4.03580 - 8.58550 4.85377 0.00000 1.00000 -4.85377 - 8.60400 5.18537 0.00000 1.00000 -5.18537 - 8.62250 5.25808 0.00000 1.00000 -5.25808 - 8.64100 5.18193 0.00000 1.00000 -5.18193 - 8.65950 4.89182 0.00000 1.00000 -4.89182 - 8.67800 4.16349 0.00000 1.00000 -4.16349 - 8.69650 2.70252 0.00000 1.00000 -2.70252 - 8.71500 0.282220 0.00000 1.00000 -0.282220 - 8.73350 -3.11124 0.00000 1.00000 3.11124 - 8.75200 -7.17490 0.00000 1.00000 7.17490 - 8.77050 -11.2672 0.00000 1.00000 11.2672 - 8.78900 -14.4886 0.00000 1.00000 14.4886 - 8.80750 -15.8559 0.00000 1.00000 15.8559 - 8.82600 -14.5328 0.00000 1.00000 14.5328 - 8.84450 -10.0609 0.00000 1.00000 10.0609 - 8.86300 -2.52773 0.00000 1.00000 2.52773 - 8.88150 7.37428 0.00000 1.00000 -7.37428 - 8.90000 18.4240 0.00000 1.00000 -18.4240 - 8.91850 29.0726 0.00000 1.00000 -29.0726 - 8.93700 37.7295 0.00000 1.00000 -37.7295 - 8.95550 43.0717 0.00000 1.00000 -43.0717 - 8.97400 44.3044 0.00000 1.00000 -44.3044 - 8.99250 41.3154 0.00000 1.00000 -41.3154 - 9.01100 34.6857 0.00000 1.00000 -34.6857 - 9.02950 25.5570 0.00000 1.00000 -25.5570 - 9.04800 15.3859 0.00000 1.00000 -15.3859 - 9.06650 5.64529 0.00000 1.00000 -5.64529 - 9.08500 -2.45985 0.00000 1.00000 2.45985 - 9.10350 -8.19758 0.00000 1.00000 8.19758 - 9.12200 -11.3936 0.00000 1.00000 11.3936 - 9.14050 -12.3840 0.00000 1.00000 12.3840 - 9.15900 -11.8591 0.00000 1.00000 11.8591 - 9.17750 -10.6446 0.00000 1.00000 10.6446 - 9.19600 -9.48212 0.00000 1.00000 9.48212 - 9.21450 -8.86286 0.00000 1.00000 8.86286 - 9.23300 -8.95166 0.00000 1.00000 8.95166 - 9.25150 -9.60978 0.00000 1.00000 9.60978 - 9.27000 -10.4985 0.00000 1.00000 10.4985 - 9.28850 -11.2264 0.00000 1.00000 11.2264 - 9.30700 -11.4956 0.00000 1.00000 11.4956 - 9.32550 -11.2056 0.00000 1.00000 11.2056 - 9.34400 -10.4851 0.00000 1.00000 10.4851 - 9.36250 -9.64367 0.00000 1.00000 9.64367 - 9.38100 -9.05839 0.00000 1.00000 9.05839 - 9.39950 -9.03059 0.00000 1.00000 9.03059 - 9.41800 -9.65891 0.00000 1.00000 9.65891 - 9.43650 -10.7695 0.00000 1.00000 10.7695 - 9.45500 -11.9282 0.00000 1.00000 11.9282 - 9.47350 -12.5352 0.00000 1.00000 12.5352 - 9.49200 -11.9793 0.00000 1.00000 11.9793 - 9.51050 -9.80968 0.00000 1.00000 9.80968 - 9.52900 -5.88098 0.00000 1.00000 5.88098 - 9.54750 -0.429865 0.00000 1.00000 0.429865 - 9.56600 5.93738 0.00000 1.00000 -5.93738 - 9.58450 12.3467 0.00000 1.00000 -12.3467 - 9.60300 17.8253 0.00000 1.00000 -17.8253 - 9.62150 21.4983 0.00000 1.00000 -21.4983 - 9.64000 22.7684 0.00000 1.00000 -22.7684 - 9.65850 21.4353 0.00000 1.00000 -21.4353 - 9.67700 17.7297 0.00000 1.00000 -17.7297 - 9.69550 12.2556 0.00000 1.00000 -12.2556 - 9.71400 5.85940 0.00000 1.00000 -5.85940 - 9.73250 -0.539853 0.00000 1.00000 0.539853 - 9.75100 -6.11696 0.00000 1.00000 6.11696 - 9.76950 -10.2704 0.00000 1.00000 10.2704 - 9.78800 -12.6954 0.00000 1.00000 12.6954 - 9.80650 -13.3941 0.00000 1.00000 13.3941 - 9.82500 -12.6315 0.00000 1.00000 12.6315 - 9.84350 -10.8487 0.00000 1.00000 10.8487 - 9.86200 -8.55755 0.00000 1.00000 8.55755 - 9.88050 -6.24003 0.00000 1.00000 6.24003 - 9.89900 -4.27478 0.00000 1.00000 4.27478 - 9.91750 -2.90328 0.00000 1.00000 2.90328 - 9.93600 -2.23386 0.00000 1.00000 2.23386 - 9.95450 -2.27104 0.00000 1.00000 2.27104 - 9.97300 -2.95175 0.00000 1.00000 2.95175 - 9.99150 -4.17209 0.00000 1.00000 4.17209 - 10.0100 -5.79607 0.00000 1.00000 5.79607 - 10.0285 -7.64859 0.00000 1.00000 7.64859 - 10.0470 -9.50283 0.00000 1.00000 9.50283 - 10.0655 -11.0757 0.00000 1.00000 11.0757 - 10.0840 -12.0425 0.00000 1.00000 12.0425 - 10.1025 -12.0751 0.00000 1.00000 12.0751 - 10.1210 -10.9017 0.00000 1.00000 10.9017 - 10.1395 -8.37613 0.00000 1.00000 8.37613 - 10.1580 -4.54026 0.00000 1.00000 4.54026 - 10.1765 0.338357 0.00000 1.00000 -0.338357 - 10.1950 5.76996 0.00000 1.00000 -5.76996 - 10.2135 11.0939 0.00000 1.00000 -11.0939 - 10.2320 15.5741 0.00000 1.00000 -15.5741 - 10.2505 18.5225 0.00000 1.00000 -18.5225 - 10.2690 19.4270 0.00000 1.00000 -19.4270 - 10.2875 18.0567 0.00000 1.00000 -18.0567 - 10.3060 14.5227 0.00000 1.00000 -14.5227 - 10.3245 9.27796 0.00000 1.00000 -9.27796 - 10.3430 3.05599 0.00000 1.00000 -3.05599 - 10.3615 -3.24345 0.00000 1.00000 3.24345 - 10.3800 -8.70145 0.00000 1.00000 8.70145 - 10.3985 -12.5330 0.00000 1.00000 12.5330 - 10.4170 -14.2182 0.00000 1.00000 14.2182 - 10.4355 -13.5885 0.00000 1.00000 13.5885 - 10.4540 -10.8525 0.00000 1.00000 10.8525 - 10.4725 -6.55772 0.00000 1.00000 6.55772 - 10.4910 -1.49640 0.00000 1.00000 1.49640 - 10.5095 3.42852 0.00000 1.00000 -3.42852 - 10.5280 7.35363 0.00000 1.00000 -7.35363 - 10.5465 9.59717 0.00000 1.00000 -9.59717 - 10.5650 9.77054 0.00000 1.00000 -9.77054 - 10.5835 7.84234 0.00000 1.00000 -7.84234 - 10.6020 4.14584 0.00000 1.00000 -4.14584 - 10.6205 -0.671143 0.00000 1.00000 0.671143 - 10.6390 -5.74603 0.00000 1.00000 5.74603 - 10.6575 -10.1361 0.00000 1.00000 10.1361 - 10.6760 -12.9671 0.00000 1.00000 12.9671 - 10.6945 -13.5738 0.00000 1.00000 13.5738 - 10.7130 -11.6108 0.00000 1.00000 11.6108 - 10.7315 -7.11852 0.00000 1.00000 7.11852 - 10.7500 -0.532582 0.00000 1.00000 0.532582 - 10.7685 7.36496 0.00000 1.00000 -7.36496 - 10.7870 15.5502 0.00000 1.00000 -15.5502 - 10.8055 22.9046 0.00000 1.00000 -22.9046 - 10.8240 28.3836 0.00000 1.00000 -28.3836 - 10.8425 31.1819 0.00000 1.00000 -31.1819 - 10.8610 30.8667 0.00000 1.00000 -30.8667 - 10.8795 27.4544 0.00000 1.00000 -27.4544 - 10.8980 21.4174 0.00000 1.00000 -21.4174 - 10.9165 13.6149 0.00000 1.00000 -13.6149 - 10.9350 5.15717 0.00000 1.00000 -5.15717 - 10.9535 -2.77403 0.00000 1.00000 2.77403 - 10.9720 -9.11963 0.00000 1.00000 9.11963 - 10.9905 -13.1166 0.00000 1.00000 13.1166 - 11.0090 -14.4189 0.00000 1.00000 14.4189 - 11.0275 -13.1446 0.00000 1.00000 13.1446 - 11.0460 -9.84069 0.00000 1.00000 9.84069 - 11.0645 -5.37361 0.00000 1.00000 5.37361 - 11.0830 -0.766336 0.00000 1.00000 0.766336 - 11.1015 2.99059 0.00000 1.00000 -2.99059 - 11.1200 5.12102 0.00000 1.00000 -5.12102 - 11.1385 5.20555 0.00000 1.00000 -5.20555 - 11.1570 3.25580 0.00000 1.00000 -3.25580 - 11.1755 -0.295787 0.00000 1.00000 0.295787 - 11.1940 -4.68917 0.00000 1.00000 4.68917 - 11.2125 -8.99252 0.00000 1.00000 8.99252 - 11.2310 -12.2872 0.00000 1.00000 12.2872 - 11.2495 -13.8447 0.00000 1.00000 13.8447 - 11.2680 -13.2610 0.00000 1.00000 13.2610 - 11.2865 -10.5280 0.00000 1.00000 10.5280 - 11.3050 -6.02790 0.00000 1.00000 6.02790 - 11.3235 -0.457428 0.00000 1.00000 0.457428 - 11.3420 5.30272 0.00000 1.00000 -5.30272 - 11.3605 10.3468 0.00000 1.00000 -10.3468 - 11.3790 13.9003 0.00000 1.00000 -13.9003 - 11.3975 15.4459 0.00000 1.00000 -15.4459 - 11.4160 14.7993 0.00000 1.00000 -14.7993 - 11.4345 12.1251 0.00000 1.00000 -12.1251 - 11.4530 7.89515 0.00000 1.00000 -7.89515 - 11.4715 2.79743 0.00000 1.00000 -2.79743 - 11.4900 -2.38402 0.00000 1.00000 2.38402 - 11.5085 -6.89848 0.00000 1.00000 6.89848 - 11.5270 -10.1446 0.00000 1.00000 10.1446 - 11.5455 -11.7562 0.00000 1.00000 11.7562 - 11.5640 -11.6477 0.00000 1.00000 11.6477 - 11.5825 -10.0156 0.00000 1.00000 10.0156 - 11.6010 -7.29778 0.00000 1.00000 7.29778 - 11.6195 -4.09885 0.00000 1.00000 4.09885 - 11.6380 -1.08810 0.00000 1.00000 1.08810 - 11.6565 1.11439 0.00000 1.00000 -1.11439 - 11.6750 2.04788 0.00000 1.00000 -2.04788 - 11.6935 1.49867 0.00000 1.00000 -1.49867 - 11.7120 -0.451611 0.00000 1.00000 0.451611 - 11.7305 -3.42848 0.00000 1.00000 3.42848 - 11.7490 -6.82125 0.00000 1.00000 6.82125 - 11.7675 -9.88740 0.00000 1.00000 9.88740 - 11.7860 -11.8896 0.00000 1.00000 11.8896 - 11.8045 -12.2430 0.00000 1.00000 12.2430 - 11.8230 -10.6446 0.00000 1.00000 10.6446 - 11.8415 -7.15722 0.00000 1.00000 7.15722 - 11.8600 -2.22583 0.00000 1.00000 2.22583 - 11.8785 3.38458 0.00000 1.00000 -3.38458 - 11.8970 8.72108 0.00000 1.00000 -8.72108 - 11.9155 12.8213 0.00000 1.00000 -12.8213 - 11.9340 14.9032 0.00000 1.00000 -14.9032 - 11.9525 14.5281 0.00000 1.00000 -14.5281 - 11.9710 11.6999 0.00000 1.00000 -11.6999 - 11.9895 6.87776 0.00000 1.00000 -6.87776 - 12.0080 0.891504 0.00000 1.00000 -0.891504 - 12.0265 -5.22565 0.00000 1.00000 5.22565 - 12.0450 -10.4522 0.00000 1.00000 10.4522 - 12.0635 -13.9931 0.00000 1.00000 13.9931 - 12.0820 -15.4435 0.00000 1.00000 15.4435 - 12.1005 -14.8644 0.00000 1.00000 14.8644 - 12.1190 -12.7520 0.00000 1.00000 12.7520 - 12.1375 -9.90845 0.00000 1.00000 9.90845 - 12.1560 -7.24453 0.00000 1.00000 7.24453 - 12.1745 -5.56166 0.00000 1.00000 5.56166 - 12.1930 -5.36161 0.00000 1.00000 5.36161 - 12.2115 -6.72586 0.00000 1.00000 6.72586 - 12.2300 -9.28835 0.00000 1.00000 9.28835 - 12.2485 -12.3067 0.00000 1.00000 12.3067 - 12.2670 -14.8178 0.00000 1.00000 14.8178 - 12.2855 -15.8476 0.00000 1.00000 15.8476 - 12.3040 -14.6332 0.00000 1.00000 14.6332 - 12.3225 -10.8097 0.00000 1.00000 10.8097 - 12.3410 -4.52145 0.00000 1.00000 4.52145 - 12.3595 3.57058 0.00000 1.00000 -3.57058 - 12.3780 12.3893 0.00000 1.00000 -12.3893 - 12.3965 20.6314 0.00000 1.00000 -20.6314 - 12.4150 27.0092 0.00000 1.00000 -27.0092 - 12.4335 30.4959 0.00000 1.00000 -30.4959 - 12.4520 30.5247 0.00000 1.00000 -30.5247 - 12.4705 27.1034 0.00000 1.00000 -27.1034 - 12.4890 20.8197 0.00000 1.00000 -20.8197 - 12.5075 12.7348 0.00000 1.00000 -12.7348 - 12.5260 4.18409 0.00000 1.00000 -4.18409 - 12.5445 -3.47600 0.00000 1.00000 3.47600 - 12.5630 -9.12640 0.00000 1.00000 9.12640 - 12.5815 -12.0958 0.00000 1.00000 12.0958 - 12.6000 -12.2803 0.00000 1.00000 12.2803 - 12.6185 -10.1467 0.00000 1.00000 10.1467 - 12.6370 -6.61573 0.00000 1.00000 6.61573 - 12.6555 -2.84816 0.00000 1.00000 2.84816 - 12.6740 0.0234471 0.00000 1.00000 -0.0234471 - 12.6925 1.16051 0.00000 1.00000 -1.16051 - 12.7110 0.222329 0.00000 1.00000 -0.222329 - 12.7295 -2.53923 0.00000 1.00000 2.53923 - 12.7480 -6.31966 0.00000 1.00000 6.31966 - 12.7665 -9.93250 0.00000 1.00000 9.93250 - 12.7850 -12.0782 0.00000 1.00000 12.0782 - 12.8035 -11.6556 0.00000 1.00000 11.6556 - 12.8220 -8.04822 0.00000 1.00000 8.04822 - 12.8405 -1.31753 0.00000 1.00000 1.31753 - 12.8590 7.74657 0.00000 1.00000 -7.74657 - 12.8775 17.7420 0.00000 1.00000 -17.7420 - 12.8960 26.9214 0.00000 1.00000 -26.9214 - 12.9145 33.5578 0.00000 1.00000 -33.5578 - 12.9330 36.3277 0.00000 1.00000 -36.3277 - 12.9515 34.6234 0.00000 1.00000 -34.6234 - 12.9700 28.7156 0.00000 1.00000 -28.7156 - 12.9885 19.7233 0.00000 1.00000 -19.7233 - 13.0070 9.38804 0.00000 1.00000 -9.38804 - 13.0255 -0.297908 0.00000 1.00000 0.297908 - 13.0440 -7.52791 0.00000 1.00000 7.52791 - 13.0625 -11.0794 0.00000 1.00000 11.0794 - 13.0810 -10.5807 0.00000 1.00000 10.5807 - 13.0995 -6.58087 0.00000 1.00000 6.58087 - 13.1180 -0.404585 0.00000 1.00000 0.404585 - 13.1365 6.17556 0.00000 1.00000 -6.17556 - 13.1550 11.3708 0.00000 1.00000 -11.3708 - 13.1735 13.8053 0.00000 1.00000 -13.8053 - 13.1920 12.8357 0.00000 1.00000 -12.8357 - 13.2105 8.68336 0.00000 1.00000 -8.68336 - 13.2290 2.34908 0.00000 1.00000 -2.34908 - 13.2475 -4.66287 0.00000 1.00000 4.66287 - 13.2660 -10.7379 0.00000 1.00000 10.7379 - 13.2845 -14.5602 0.00000 1.00000 14.5602 - 13.3030 -15.4343 0.00000 1.00000 15.4343 - 13.3215 -13.4393 0.00000 1.00000 13.4393 - 13.3400 -9.37967 0.00000 1.00000 9.37967 - 13.3585 -4.55053 0.00000 1.00000 4.55053 - 13.3770 -0.382431 0.00000 1.00000 0.382431 - 13.3955 1.93839 0.00000 1.00000 -1.93839 - 13.4140 1.77366 0.00000 1.00000 -1.77366 - 13.4325 -0.818874 0.00000 1.00000 0.818874 - 13.4510 -5.13072 0.00000 1.00000 5.13072 - 13.4695 -10.0255 0.00000 1.00000 10.0255 - 13.4880 -14.2744 0.00000 1.00000 14.2744 - 13.5065 -16.9060 0.00000 1.00000 16.9060 - 13.5250 -17.4714 0.00000 1.00000 17.4714 - 13.5435 -16.1512 0.00000 1.00000 16.1512 - 13.5620 -13.6784 0.00000 1.00000 13.6784 - 13.5805 -11.1043 0.00000 1.00000 11.1043 - 13.5990 -9.47288 0.00000 1.00000 9.47288 - 13.6175 -9.49567 0.00000 1.00000 9.49567 - 13.6360 -11.3153 0.00000 1.00000 11.3153 - 13.6545 -14.4268 0.00000 1.00000 14.4268 - 13.6730 -17.7824 0.00000 1.00000 17.7824 - 13.6915 -20.0552 0.00000 1.00000 20.0552 - 13.7100 -19.9965 0.00000 1.00000 19.9965 - 13.7285 -16.7898 0.00000 1.00000 16.7898 - 13.7470 -10.3089 0.00000 1.00000 10.3089 - 13.7655 -1.20781 0.00000 1.00000 1.20781 - 13.7840 9.18567 0.00000 1.00000 -9.18567 - 13.8025 19.1488 0.00000 1.00000 -19.1488 - 13.8210 26.9489 0.00000 1.00000 -26.9489 - 13.8395 31.2366 0.00000 1.00000 -31.2366 - 13.8580 31.3496 0.00000 1.00000 -31.3496 - 13.8765 27.4511 0.00000 1.00000 -27.4511 - 13.8950 20.4697 0.00000 1.00000 -20.4697 - 13.9135 11.8582 0.00000 1.00000 -11.8582 - 13.9320 3.23523 0.00000 1.00000 -3.23523 - 13.9505 -3.99882 0.00000 1.00000 3.99882 - 13.9690 -8.96984 0.00000 1.00000 8.96984 - 13.9875 -11.4848 0.00000 1.00000 11.4848 - 14.0060 -11.9967 0.00000 1.00000 11.9967 - 14.0245 -11.3970 0.00000 1.00000 11.3970 - 14.0430 -10.7008 0.00000 1.00000 10.7008 - 14.0615 -10.7168 0.00000 1.00000 10.7168 - 14.0800 -11.7936 0.00000 1.00000 11.7936 - 14.0985 -13.7115 0.00000 1.00000 13.7115 - 14.1170 -15.7457 0.00000 1.00000 15.7457 - 14.1355 -16.8835 0.00000 1.00000 16.8835 - 14.1540 -16.1342 0.00000 1.00000 16.1342 - 14.1725 -12.8466 0.00000 1.00000 12.8466 - 14.1910 -6.94542 0.00000 1.00000 6.94542 - 14.2095 0.982134 0.00000 1.00000 -0.982134 - 14.2280 9.77953 0.00000 1.00000 -9.77953 - 14.2465 17.9729 0.00000 1.00000 -17.9729 - 14.2650 24.1178 0.00000 1.00000 -24.1178 - 14.2835 27.1485 0.00000 1.00000 -27.1485 - 14.3020 26.6355 0.00000 1.00000 -26.6355 - 14.3205 22.8839 0.00000 1.00000 -22.8839 - 14.3390 16.8479 0.00000 1.00000 -16.8479 - 14.3575 9.88786 0.00000 1.00000 -9.88786 - 14.3760 3.43554 0.00000 1.00000 -3.43554 - 14.3945 -1.34253 0.00000 1.00000 1.34253 - 14.4130 -3.79922 0.00000 1.00000 3.79922 - 14.4315 -3.91650 0.00000 1.00000 3.91650 - 14.4500 -2.25034 0.00000 1.00000 2.25034 - 14.4685 0.265934 0.00000 1.00000 -0.265934 - 14.4870 2.60091 0.00000 1.00000 -2.60091 - 14.5055 3.90902 0.00000 1.00000 -3.90902 - 14.5240 3.74411 0.00000 1.00000 -3.74411 - 14.5425 2.15013 0.00000 1.00000 -2.15013 - 14.5610 -0.388481 0.00000 1.00000 0.388481 - 14.5795 -3.11515 0.00000 1.00000 3.11515 - 14.5980 -5.23631 0.00000 1.00000 5.23631 - 14.6165 -6.15513 0.00000 1.00000 6.15513 - 14.6350 -5.63898 0.00000 1.00000 5.63898 - 14.6535 -3.87566 0.00000 1.00000 3.87566 - 14.6720 -1.40645 0.00000 1.00000 1.40645 - 14.6905 1.04029 0.00000 1.00000 -1.04029 - 14.7090 2.76304 0.00000 1.00000 -2.76304 - 14.7275 3.28473 0.00000 1.00000 -3.28473 - 14.7460 2.47788 0.00000 1.00000 -2.47788 - 14.7645 0.584519 0.00000 1.00000 -0.584519 - 14.7830 -1.87052 0.00000 1.00000 1.87052 - 14.8015 -4.24417 0.00000 1.00000 4.24417 - 14.8200 -5.96765 0.00000 1.00000 5.96765 - 14.8385 -6.70965 0.00000 1.00000 6.70965 - 14.8570 -6.46211 0.00000 1.00000 6.46211 - 14.8755 -5.52356 0.00000 1.00000 5.52356 - 14.8940 -4.38544 0.00000 1.00000 4.38544 - 14.9125 -3.55512 0.00000 1.00000 3.55512 - 14.9310 -3.36898 0.00000 1.00000 3.36898 - 14.9495 -3.85281 0.00000 1.00000 3.85281 - 14.9680 -4.67590 0.00000 1.00000 4.67590 - 14.9865 -5.21922 0.00000 1.00000 5.21922 - 15.0050 -4.74479 0.00000 1.00000 4.74479 - 15.0235 -2.62144 0.00000 1.00000 2.62144 - 15.0420 1.45687 0.00000 1.00000 -1.45687 - 15.0605 7.32500 0.00000 1.00000 -7.32500 - 15.0790 14.3193 0.00000 1.00000 -14.3193 - 15.0975 21.3835 0.00000 1.00000 -21.3835 - 15.1160 27.2852 0.00000 1.00000 -27.2852 - 15.1345 30.8902 0.00000 1.00000 -30.8902 - 15.1530 31.4245 0.00000 1.00000 -31.4245 - 15.1715 28.6588 0.00000 1.00000 -28.6588 - 15.1900 22.9682 0.00000 1.00000 -22.9682 - 15.2085 15.2541 0.00000 1.00000 -15.2541 - 15.2270 6.74712 0.00000 1.00000 -6.74712 - 15.2455 -1.25964 0.00000 1.00000 1.25964 - 15.2640 -7.68049 0.00000 1.00000 7.68049 - 15.2825 -11.8442 0.00000 1.00000 11.8442 - 15.3010 -13.5919 0.00000 1.00000 13.5919 - 15.3195 -13.2493 0.00000 1.00000 13.2493 - 15.3380 -11.4916 0.00000 1.00000 11.4916 - 15.3565 -9.14144 0.00000 1.00000 9.14144 - 15.3750 -6.95504 0.00000 1.00000 6.95504 - 15.3935 -5.44896 0.00000 1.00000 5.44896 - 15.4120 -4.80772 0.00000 1.00000 4.80772 - 15.4305 -4.88897 0.00000 1.00000 4.88897 - 15.4490 -5.31706 0.00000 1.00000 5.31706 - 15.4675 -5.63285 0.00000 1.00000 5.63285 - 15.4860 -5.45462 0.00000 1.00000 5.45462 - 15.5045 -4.60459 0.00000 1.00000 4.60459 - 15.5230 -3.16776 0.00000 1.00000 3.16776 - 15.5415 -1.46992 0.00000 1.00000 1.46992 - 15.5600 0.0157586 0.00000 1.00000 -0.0157586 - 15.5785 0.806047 0.00000 1.00000 -0.806047 - 15.5970 0.550242 0.00000 1.00000 -0.550242 - 15.6155 -0.861348 0.00000 1.00000 0.861348 - 15.6340 -3.25430 0.00000 1.00000 3.25430 - 15.6525 -6.20584 0.00000 1.00000 6.20584 - 15.6710 -9.14992 0.00000 1.00000 9.14992 - 15.6895 -11.5204 0.00000 1.00000 11.5204 - 15.7080 -12.8909 0.00000 1.00000 12.8909 - 15.7265 -13.0717 0.00000 1.00000 13.0717 - 15.7450 -12.1417 0.00000 1.00000 12.1417 - 15.7635 -10.4097 0.00000 1.00000 10.4097 - 15.7820 -8.32011 0.00000 1.00000 8.32011 - 15.8005 -6.33136 0.00000 1.00000 6.33136 - 15.8190 -4.80087 0.00000 1.00000 4.80087 - 15.8375 -3.90675 0.00000 1.00000 3.90675 - 15.8560 -3.62474 0.00000 1.00000 3.62474 - 15.8745 -3.76225 0.00000 1.00000 3.76225 - 15.8930 -4.03596 0.00000 1.00000 4.03596 - 15.9115 -4.16761 0.00000 1.00000 4.16761 - 15.9300 -3.96959 0.00000 1.00000 3.96959 - 15.9485 -3.39629 0.00000 1.00000 3.39629 - 15.9670 -2.54969 0.00000 1.00000 2.54969 - 15.9855 -1.64188 0.00000 1.00000 1.64188 - 16.0040 -0.928772 0.00000 1.00000 0.928772 - 16.0225 -0.634845 0.00000 1.00000 0.634845 - 16.0410 -0.888145 0.00000 1.00000 0.888145 - 16.0595 -1.67980 0.00000 1.00000 1.67980 - 16.0780 -2.85514 0.00000 1.00000 2.85514 - 16.0965 -4.13661 0.00000 1.00000 4.13661 - 16.1150 -5.17310 0.00000 1.00000 5.17310 - 16.1335 -5.60636 0.00000 1.00000 5.60636 - 16.1520 -5.14159 0.00000 1.00000 5.14159 - 16.1705 -3.60734 0.00000 1.00000 3.60734 - 16.1890 -0.992023 0.00000 1.00000 0.992023 - 16.2075 2.54958 0.00000 1.00000 -2.54958 - 16.2260 6.71807 0.00000 1.00000 -6.71807 - 16.2445 11.1120 0.00000 1.00000 -11.1120 - 16.2630 15.2812 0.00000 1.00000 -15.2812 - 16.2815 18.7822 0.00000 1.00000 -18.7822 - 16.3000 21.2269 0.00000 1.00000 -21.2269 - 16.3185 22.3212 0.00000 1.00000 -22.3212 - 16.3370 21.8912 0.00000 1.00000 -21.8912 - 16.3555 19.8991 0.00000 1.00000 -19.8991 - 16.3740 16.4493 0.00000 1.00000 -16.4493 - 16.3925 11.7863 0.00000 1.00000 -11.7863 - 16.4110 6.28331 0.00000 1.00000 -6.28331 - 16.4295 0.418687 0.00000 1.00000 -0.418687 - 16.4480 -5.25963 0.00000 1.00000 5.25963 - 16.4665 -10.1842 0.00000 1.00000 10.1842 - 16.4850 -13.8295 0.00000 1.00000 13.8295 - 16.5035 -15.7785 0.00000 1.00000 15.7785 - 16.5220 -15.7830 0.00000 1.00000 15.7830 - 16.5405 -13.8070 0.00000 1.00000 13.8070 - 16.5590 -10.0391 0.00000 1.00000 10.0391 - 16.5775 -4.87264 0.00000 1.00000 4.87264 - 16.5960 1.14589 0.00000 1.00000 -1.14589 - 16.6145 7.38649 0.00000 1.00000 -7.38649 - 16.6330 13.2091 0.00000 1.00000 -13.2091 - 16.6515 18.0296 0.00000 1.00000 -18.0296 - 16.6700 21.3708 0.00000 1.00000 -21.3708 - 16.6885 22.8991 0.00000 1.00000 -22.8991 - 16.7070 22.4456 0.00000 1.00000 -22.4456 - 16.7255 20.0158 0.00000 1.00000 -20.0158 - 16.7440 15.7881 0.00000 1.00000 -15.7881 - 16.7625 10.1035 0.00000 1.00000 -10.1035 - 16.7810 3.44424 0.00000 1.00000 -3.44424 - 16.7995 -3.59847 0.00000 1.00000 3.59847 - 16.8180 -10.3717 0.00000 1.00000 10.3717 - 16.8365 -16.2205 0.00000 1.00000 16.2205 - 16.8550 -20.5580 0.00000 1.00000 20.5580 - 16.8735 -22.9372 0.00000 1.00000 22.9372 - 16.8920 -23.1129 0.00000 1.00000 23.1129 - 16.9105 -21.0837 0.00000 1.00000 21.0837 - 16.9290 -17.1032 0.00000 1.00000 17.1032 - 16.9475 -11.6563 0.00000 1.00000 11.6563 - 16.9660 -5.39998 0.00000 1.00000 5.39998 - 16.9845 0.923758 0.00000 1.00000 -0.923758 - 17.0030 6.59122 0.00000 1.00000 -6.59122 - 17.0215 10.9979 0.00000 1.00000 -10.9979 - 17.0400 13.7383 0.00000 1.00000 -13.7383 - 17.0585 14.6477 0.00000 1.00000 -14.6477 - 17.0770 13.7998 0.00000 1.00000 -13.7998 - 17.0955 11.4638 0.00000 1.00000 -11.4638 - 17.1140 8.03578 0.00000 1.00000 -8.03578 - 17.1325 3.96378 0.00000 1.00000 -3.96378 - 17.1510 -0.316698 0.00000 1.00000 0.316698 - 17.1695 -4.42438 0.00000 1.00000 4.42438 - 17.1880 -8.04681 0.00000 1.00000 8.04681 - 17.2065 -10.9324 0.00000 1.00000 10.9324 - 17.2250 -12.8725 0.00000 1.00000 12.8725 - 17.2435 -13.6898 0.00000 1.00000 13.6898 - 17.2620 -13.2456 0.00000 1.00000 13.2456 - 17.2805 -11.4675 0.00000 1.00000 11.4675 - 17.2990 -8.39144 0.00000 1.00000 8.39144 - 17.3175 -4.20001 0.00000 1.00000 4.20001 - 17.3360 0.758004 0.00000 1.00000 -0.758004 - 17.3545 5.98116 0.00000 1.00000 -5.98116 - 17.3730 10.8661 0.00000 1.00000 -10.8661 - 17.3915 14.7906 0.00000 1.00000 -14.7906 - 17.4100 17.2137 0.00000 1.00000 -17.2137 - 17.4285 17.7745 0.00000 1.00000 -17.7745 - 17.4470 16.3661 0.00000 1.00000 -16.3661 - 17.4655 13.1690 0.00000 1.00000 -13.1690 - 17.4840 8.63053 0.00000 1.00000 -8.63053 - 17.5025 3.39246 0.00000 1.00000 -3.39246 - 17.5210 -1.82203 0.00000 1.00000 1.82203 - 17.5395 -6.33848 0.00000 1.00000 6.33848 - 17.5580 -9.64981 0.00000 1.00000 9.64981 - 17.5765 -11.4978 0.00000 1.00000 11.4978 - 17.5950 -11.9009 0.00000 1.00000 11.9009 - 17.6135 -11.1239 0.00000 1.00000 11.1239 - 17.6320 -9.59944 0.00000 1.00000 9.59944 - 17.6505 -7.81972 0.00000 1.00000 7.81972 - 17.6690 -6.22442 0.00000 1.00000 6.22442 - 17.6875 -5.11122 0.00000 1.00000 5.11122 - 17.7060 -4.58875 0.00000 1.00000 4.58875 - 17.7245 -4.58029 0.00000 1.00000 4.58029 - 17.7430 -4.87225 0.00000 1.00000 4.87225 - 17.7615 -5.18968 0.00000 1.00000 5.18968 - 17.7800 -5.27616 0.00000 1.00000 5.27616 - 17.7985 -4.95771 0.00000 1.00000 4.95771 - 17.8170 -4.17763 0.00000 1.00000 4.17763 - 17.8355 -2.99861 0.00000 1.00000 2.99861 - 17.8540 -1.57655 0.00000 1.00000 1.57655 - 17.8725 -0.115674 0.00000 1.00000 0.115674 - 17.8910 1.18232 0.00000 1.00000 -1.18232 - 17.9095 2.16253 0.00000 1.00000 -2.16253 - 17.9280 2.74507 0.00000 1.00000 -2.74507 - 17.9465 2.93310 0.00000 1.00000 -2.93310 - 17.9650 2.80225 0.00000 1.00000 -2.80225 - 17.9835 2.47685 0.00000 1.00000 -2.47685 - 18.0020 2.09940 0.00000 1.00000 -2.09940 - 18.0205 1.79907 0.00000 1.00000 -1.79907 - 18.0390 1.66403 0.00000 1.00000 -1.66403 - 18.0575 1.72260 0.00000 1.00000 -1.72260 - 18.0760 1.93703 0.00000 1.00000 -1.93703 - 18.0945 2.21113 0.00000 1.00000 -2.21113 - 18.1130 2.40837 0.00000 1.00000 -2.40837 - 18.1315 2.37442 0.00000 1.00000 -2.37442 - 18.1500 1.95988 0.00000 1.00000 -1.95988 - 18.1685 1.04724 0.00000 1.00000 -1.04724 - 18.1870 -0.426523 0.00000 1.00000 0.426523 - 18.2055 -2.45315 0.00000 1.00000 2.45315 - 18.2240 -4.90773 0.00000 1.00000 4.90773 - 18.2425 -7.52944 0.00000 1.00000 7.52944 - 18.2610 -9.92715 0.00000 1.00000 9.92715 - 18.2795 -11.6174 0.00000 1.00000 11.6174 - 18.2980 -12.0956 0.00000 1.00000 12.0956 - 18.3165 -10.9327 0.00000 1.00000 10.9327 - 18.3350 -7.88331 0.00000 1.00000 7.88331 - 18.3535 -2.98071 0.00000 1.00000 2.98071 - 18.3720 3.40650 0.00000 1.00000 -3.40650 - 18.3905 10.5811 0.00000 1.00000 -10.5811 - 18.4090 17.5968 0.00000 1.00000 -17.5968 - 18.4275 23.4036 0.00000 1.00000 -23.4036 - 18.4460 27.0310 0.00000 1.00000 -27.0310 - 18.4645 27.7731 0.00000 1.00000 -27.7731 - 18.4830 25.3345 0.00000 1.00000 -25.3345 - 18.5015 19.9052 0.00000 1.00000 -19.9052 - 18.5200 12.1472 0.00000 1.00000 -12.1472 - 18.5385 3.09099 0.00000 1.00000 -3.09099 - 18.5570 -6.03798 0.00000 1.00000 6.03798 - 18.5755 -14.0281 0.00000 1.00000 14.0281 - 18.5940 -19.8843 0.00000 1.00000 19.8843 - 18.6125 -22.9844 0.00000 1.00000 22.9844 - 18.6310 -23.1597 0.00000 1.00000 23.1597 - 18.6495 -20.6881 0.00000 1.00000 20.6881 - 18.6680 -16.2075 0.00000 1.00000 16.2075 - 18.6865 -10.5714 0.00000 1.00000 10.5714 - 18.7050 -4.68098 0.00000 1.00000 4.68098 - 18.7235 0.671251 0.00000 1.00000 -0.671251 - 18.7420 4.91529 0.00000 1.00000 -4.91529 - 18.7605 7.75797 0.00000 1.00000 -7.75797 - 18.7790 9.17588 0.00000 1.00000 -9.17588 - 18.7975 9.35965 0.00000 1.00000 -9.35965 - 18.8160 8.63035 0.00000 1.00000 -8.63035 - 18.8345 7.35145 0.00000 1.00000 -7.35145 - 18.8530 5.85510 0.00000 1.00000 -5.85510 - 18.8715 4.39513 0.00000 1.00000 -4.39513 - 18.8900 3.13002 0.00000 1.00000 -3.13002 - 18.9085 2.13168 0.00000 1.00000 -2.13168 - 18.9270 1.40976 0.00000 1.00000 -1.40976 - 18.9455 0.939913 0.00000 1.00000 -0.939913 - 18.9640 0.686429 0.00000 1.00000 -0.686429 - 18.9825 0.614229 0.00000 1.00000 -0.614229 - 19.0010 0.690570 0.00000 1.00000 -0.690570 - 19.0195 0.880032 0.00000 1.00000 -0.880032 - 19.0380 1.13788 0.00000 1.00000 -1.13788 - 19.0565 1.40627 0.00000 1.00000 -1.40627 - 19.0750 1.61604 0.00000 1.00000 -1.61604 - 19.0935 1.69418 0.00000 1.00000 -1.69418 - 19.1120 1.57467 0.00000 1.00000 -1.57467 - 19.1305 1.20912 0.00000 1.00000 -1.20912 - 19.1490 0.574418 0.00000 1.00000 -0.574418 - 19.1675 -0.322868 0.00000 1.00000 0.322868 - 19.1860 -1.44364 0.00000 1.00000 1.44364 - 19.2045 -2.71278 0.00000 1.00000 2.71278 - 19.2230 -4.01492 0.00000 1.00000 4.01492 - 19.2415 -5.19189 0.00000 1.00000 5.19189 - 19.2600 -6.04623 0.00000 1.00000 6.04623 - 19.2785 -6.35560 0.00000 1.00000 6.35560 - 19.2970 -5.90135 0.00000 1.00000 5.90135 - 19.3155 -4.51168 0.00000 1.00000 4.51168 - 19.3340 -2.11474 0.00000 1.00000 2.11474 - 19.3525 1.20914 0.00000 1.00000 -1.20914 - 19.3710 5.19105 0.00000 1.00000 -5.19105 - 19.3895 9.36912 0.00000 1.00000 -9.36912 - 19.4080 13.1271 0.00000 1.00000 -13.1271 - 19.4265 15.7779 0.00000 1.00000 -15.7779 - 19.4450 16.6827 0.00000 1.00000 -16.6827 - 19.4635 15.3867 0.00000 1.00000 -15.3867 - 19.4820 11.7418 0.00000 1.00000 -11.7418 - 19.5005 5.98757 0.00000 1.00000 -5.98757 - 19.5190 -1.23710 0.00000 1.00000 1.23710 - 19.5375 -8.96359 0.00000 1.00000 8.96359 - 19.5560 -16.0382 0.00000 1.00000 16.0382 - 19.5745 -21.3164 0.00000 1.00000 21.3164 - 19.5930 -23.8699 0.00000 1.00000 23.8699 - 19.6115 -23.1644 0.00000 1.00000 23.1644 - 19.6300 -19.1740 0.00000 1.00000 19.1740 - 19.6485 -12.4057 0.00000 1.00000 12.4057 - 19.6670 -3.82669 0.00000 1.00000 3.82669 - 19.6855 5.29471 0.00000 1.00000 -5.29471 - 19.7040 13.6058 0.00000 1.00000 -13.6058 - 19.7225 19.9014 0.00000 1.00000 -19.9014 - 19.7410 23.3260 0.00000 1.00000 -23.3260 - 19.7595 23.5068 0.00000 1.00000 -23.5068 - 19.7780 20.5929 0.00000 1.00000 -20.5929 - 19.7965 15.1973 0.00000 1.00000 -15.1973 - 19.8150 8.25741 0.00000 1.00000 -8.25741 - 19.8335 0.846490 0.00000 1.00000 -0.846490 - 19.8520 -6.02165 0.00000 1.00000 6.02165 - 19.8705 -11.5565 0.00000 1.00000 11.5565 - 19.8890 -15.2939 0.00000 1.00000 15.2939 - 19.9075 -17.1257 0.00000 1.00000 17.1257 - 19.9260 -17.2573 0.00000 1.00000 17.2573 - 19.9445 -16.1119 0.00000 1.00000 16.1119 - 19.9630 -14.2055 0.00000 1.00000 14.2055 - 19.9815 -12.0275 0.00000 1.00000 12.0275 - 20.0000 -9.95383 0.00000 1.00000 9.95383 diff --git a/diffpy/pdffit2/tests/testdata/badNi.stru b/diffpy/pdffit2/tests/testdata/badNi.stru deleted file mode 100644 index d0b980cb..00000000 --- a/diffpy/pdffit2/tests/testdata/badNi.stru +++ /dev/null @@ -1,32 +0,0 @@ -title structure Ni FCC -format pdffit -scale 1.000000 -sharp 0.000000, 1.000000, 0.000000 -spcgr Fm-3m -cell 3.520000, 3.520000, 3.520000, 90.000000, 90.000000, 90.000000 -dcell 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000 -ncell 1, 1, 1, 4 -atoms -NI 0.00000000 0.00000000 0.00000000 1.0000 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.00126651 0.00126651 0.00126651 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -NI 0.00000000 0.50000000 0.50000000 1.0000 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -NI 0.50000000 0.00000000 0.50000000 1.0000 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.00126651 0.00126651 0.00126651 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -NI 0.50000000 0.50000000 0.00000000 1.0000 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.00126651 0.00126651 0.00126651 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 diff --git a/diffpy/pdffit2/tests/testdata/badNiZeroVolume.stru b/diffpy/pdffit2/tests/testdata/badNiZeroVolume.stru deleted file mode 100644 index 089db0da..00000000 --- a/diffpy/pdffit2/tests/testdata/badNiZeroVolume.stru +++ /dev/null @@ -1,33 +0,0 @@ -title structure Ni FCC -format pdffit -scale 1.000000 -sharp 0.000000, 1.000000, 0.000000 -spcgr Fm-3m -cell 3.520000, 3.520000, 3.520000, 90.000000, 90.000000, 0.000000 -dcell 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000 -ncell 1, 1, 1, 4 -atoms -NI 0.00000000 0.00000000 0.00000000 1.0000 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.00126651 0.00126651 0.00126651 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -NI 0.00000000 0.50000000 0.50000000 1.0000 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.00126651 0.00126651 0.00126651 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -NI 0.50000000 0.00000000 0.50000000 1.0000 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.00126651 0.00126651 0.00126651 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -NI 0.50000000 0.50000000 0.00000000 1.0000 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.00126651 0.00126651 0.00126651 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 diff --git a/diffpy/pdffit2/tests/testdata/noLattice.stru b/diffpy/pdffit2/tests/testdata/noLattice.stru deleted file mode 100644 index 4f8e7212..00000000 --- a/diffpy/pdffit2/tests/testdata/noLattice.stru +++ /dev/null @@ -1,32 +0,0 @@ -title structure Ni FCC -format pdffit -scale 1.000000 -sharp 0.000000, 1.000000, 0.000000 -spcgr Fm-3m -cell 3.520000, 3.520000, -3.520000, 90.000000, 90.000000, 90.000000 -dcell 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000 -ncell 1, 1, 1, 4 -atoms -NI 0.00000000 0.00000000 0.00000000 1.0000 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.00126651 0.00126651 0.00126651 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -NI 0.50000000 0.50000000 0.00000000 1.0000 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -NI 0.50000000 0.00000000 0.50000000 1.0000 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.00126651 0.00126651 0.00126651 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -NI 0.50000000 0.50000000 0.00000000 1.0000 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.00126651 0.00126651 0.00126651 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 diff --git a/diffpy/pdffit2/version.py b/diffpy/pdffit2/version.py deleted file mode 100644 index 0e60302c..00000000 --- a/diffpy/pdffit2/version.py +++ /dev/null @@ -1,54 +0,0 @@ -#!/usr/bin/env python -############################################################################## -# -# pdffit2 by DANSE Diffraction group -# Simon J. L. Billinge -# (c) 2008 trustees of the Michigan State University. -# All rights reserved. -# -# File coded by: Pavol Juhas -# -# See AUTHORS.txt for a list of people who contributed. -# See LICENSE.txt for license information. -# -############################################################################## - -""" -Definition of __version__, __date__, __timestamp__, __git_commit__. - -Notes ------ -Variable `__gitsha__` is deprecated as of version 1.2. -Use `__git_commit__` instead. -""" - -__all__ = ["__date__", "__git_commit__", "__timestamp__", "__version__"] - -import os.path - -from pkg_resources import resource_filename - -# obtain version information from the version.cfg file -cp = dict(version="", date="", commit="", timestamp="0") -fcfg = resource_filename(__name__, "version.cfg") -if not os.path.isfile(fcfg): # pragma: no cover - from warnings import warn - - warn('Package metadata not found, execute "./setup.py egg_info".') - fcfg = os.devnull -with open(fcfg) as fp: - kwords = [[w.strip() for w in line.split(" = ", 1)] for line in fp if line[:1].isalpha() and " = " in line] -assert all(w[0] in cp for w in kwords), "received unrecognized keyword" -cp.update(kwords) - -__version__ = cp["version"] -__date__ = cp["date"] -__git_commit__ = cp["commit"] -__timestamp__ = int(cp["timestamp"]) - -# TODO remove deprecated __gitsha__ in version 1.3. -__gitsha__ = __git_commit__ - -del cp, fcfg, fp, kwords - -# End of file diff --git a/libpdffit2/Atom.cc b/libpdffit2/Atom.cc deleted file mode 100644 index aa2e66f2..00000000 --- a/libpdffit2/Atom.cc +++ /dev/null @@ -1,104 +0,0 @@ -/*********************************************************************** -* -* pdffit2 by DANSE Diffraction group -* Simon J. L. Billinge -* (c) 2006 trustees of the Michigan State University -* All rights reserved. -* -* File coded by: Pavol Juhas -* -* See AUTHORS.txt for a list of people who contributed. -* See LICENSE.txt for license information. -* -************************************************************************ -* -* class Atom -* -* Comments: -* -***********************************************************************/ - -#include - -#include "Atom.h" -#include "MathUtils.h" -#include "LocalPeriodicTable.h" - -using namespace std; - -// class data - private - - -Atom::AtomFormat Atom::streamformat = Atom::DISCUS; - - -// public class methods - - -void Atom::setDiscusFormat() -{ - Atom::streamformat = DISCUS; -} - - -void Atom::setPdffitFormat() -{ - Atom::streamformat = PDFFIT; -} - - -// private methods - - -istream& Atom::read_discus_atom(istream& in) -{ - double B; - string symbol; - const double fac = 1.0 / (8.0*M_PI*M_PI); - in >> symbol >> pos[0] >> pos[1] >> pos[2] >> B; - if (!in) return in; - // here we read successfully - const LocalPeriodicTable* lpt = LocalPeriodicTable::instance(); - atom_type = lpt->lookup(symbol); - fill_n(u, 3, fac*B); - fill_n(u+3, 3, 0.0); - occ = 1.0; - docc = 0.0; - fill_n(dpos, 3, 0.0); - fill_n(du, 6, 0.0); - return in; -} - - -istream& Atom::read_pdffit_atom(istream& in) -{ - string symbol; - in >> symbol >> pos[0] >> pos[1] >> pos[2] >> occ >> - dpos[0] >> dpos[1] >> dpos[2] >> docc >> - u[0] >> u[1] >> u[2] >> - du[0] >> du[1] >> du[2] >> - u[3] >> u[4] >> u[5] >> - du[3] >> du[4] >> du[5]; - if (!in) return in; - // here we read successfully - const LocalPeriodicTable* lpt = LocalPeriodicTable::instance(); - atom_type = lpt->lookup(symbol); - return in; -} - - -// non-member operators - - -istream& operator>>(istream& in, Atom& a) -{ - switch (Atom::streamformat) - { - case Atom::DISCUS: return a.read_discus_atom(in); - case Atom::PDFFIT: return a.read_pdffit_atom(in); - }; - return in; -} - - -// End of file diff --git a/libpdffit2/Atom.h b/libpdffit2/Atom.h deleted file mode 100644 index 11955036..00000000 --- a/libpdffit2/Atom.h +++ /dev/null @@ -1,70 +0,0 @@ -/*********************************************************************** -* -* pdffit2 by DANSE Diffraction group -* Simon J. L. Billinge -* (c) 2006 trustees of the Michigan State University -* All rights reserved. -* -* File coded by: Pavol Juhas -* -* See AUTHORS.txt for a list of people who contributed. -* See LICENSE.txt for license information. -* -************************************************************************ -* -* class Atom -* -* Comments: -* -***********************************************************************/ - -#ifndef ATOM_H_INCLUDED -#define ATOM_H_INCLUDED - -#include -#include "AtomType.h" - -class PdfFit; -class DataSet; -class Phase; - -class Atom -{ - // friends who need to touch offset - friend class PdfFit; - friend class DataSet; - friend class Phase; - friend std::istream& operator>>(std::istream& in, Atom& a); - - public: - - // class methods - static void setDiscusFormat(); - static void setPdffitFormat(); - - // data - const AtomType* atom_type; - double weight; // normalized scattering factor - double pos[3], dpos[3]; - double u[6], du[6]; - double occ, docc; - - private: - - // types and class data - enum AtomFormat { DISCUS, PDFFIT }; - static AtomFormat streamformat; - - // data - int offset; - - // methods - std::istream& read_discus_atom(std::istream& in); - std::istream& read_pdffit_atom(std::istream& in); -}; - -// non-member operators - -std::istream& operator>>(std::istream& in, Atom& a); - -#endif // ATOM_H_INCLUDED diff --git a/libpdffit2/AtomType.h b/libpdffit2/AtomType.h deleted file mode 100644 index 4c002e8d..00000000 --- a/libpdffit2/AtomType.h +++ /dev/null @@ -1,76 +0,0 @@ -/*********************************************************************** -* -* pdffit2 by DANSE Diffraction group -* Simon J. L. Billinge -* (c) 2006 trustees of the Michigan State University -* All rights reserved. -* -* File coded by: Pavol Juhas -* -* See AUTHORS.txt for a list of people who contributed. -* See LICENSE.txt for license information. -* -************************************************************************ -* -* class AtomType -* -* Comments: storage of element properties like name, symbol, -* atomic mass or scattering power -* -***********************************************************************/ - -#ifndef ATOMTYPE_H_INCLUDED -#define ATOMTYPE_H_INCLUDED - -#include -#include -#include - -class AtomType -{ - public: - // Data - std::string symbol; // element symbol - std::string name; // element name - bool isotope; // flag for isotopes - int z; // atomic number - double M; // atomic mass - int charge; // total charge in e - double radius; // ionic radius - double xsf; // x-ray scattering factor - double nsf; // neutron scattering factor - - // Constructor - AtomType() - { - z = 0; - M = 0.0; - isotope = false; - charge = 0; - radius = 0.0; - xsf = 0.0; - nsf = 0.0; - } - - // Methods - double sf(char scattering_type) const - { - switch (scattering_type) - { - case 'x': - case 'X': - return xsf; - case 'n': - case 'N': - return nsf; - default: - std::ostringstream emsg; - emsg << "Invalid scattering type '" << - scattering_type << "'"; - throw std::runtime_error(emsg.str()); - } - return 0.0; - } -}; - -#endif // ATOMTYPE_H_INCLUDED diff --git a/libpdffit2/LocalPeriodicTable.cc b/libpdffit2/LocalPeriodicTable.cc deleted file mode 100644 index 482f2f10..00000000 --- a/libpdffit2/LocalPeriodicTable.cc +++ /dev/null @@ -1,147 +0,0 @@ -/*********************************************************************** -* -* pdffit2 by DANSE Diffraction group -* Simon J. L. Billinge -* (c) 2008 trustees of the Michigan State University -* All rights reserved. -* -* File coded by: Pavol Juhas -* -* See AUTHORS.txt for a list of people who contributed. -* See LICENSE.txt for license information. -* -************************************************************************ -* -* class LocalPeriodicTable -* -* Comments: Light-weight class which allows redefinitions of scattering -* factors. This class throws ValueError for unknown elements. -* -***********************************************************************/ - -#include -#include "LocalPeriodicTable.h" -#include "exceptions.h" - -using namespace std; - - -// public class methods - - -const LocalPeriodicTable* LocalPeriodicTable::instance() -{ - static unique_ptr the_table(new LocalPeriodicTable()); - return the_table.get(); -} - - -// constructor - - -LocalPeriodicTable::LocalPeriodicTable() -{ - // private data - this->_periodic_table = PeriodicTable::instance(); -} - - -// public methods - - -const AtomType* LocalPeriodicTable::name(const string& nm) const -{ - const AtomType* atp0; - try { - atp0 = this->_periodic_table->name(nm); - } - catch (runtime_error e) { - throw ValueError(e.what()); - } - const AtomType* atp = local_symbol(atp0->symbol); - return atp; -} - - -const AtomType* LocalPeriodicTable::symbol(const string& smbl) const -{ - const AtomType* atp = local_symbol(smbl); - return atp; -} - - -const AtomType* LocalPeriodicTable::lookup(const string& pat) const -{ - const AtomType* atp0; - try { - atp0 = this->_periodic_table->lookup(pat); - } - catch (runtime_error e) { - throw ValueError(e.what()); - } - const AtomType* atp = local_symbol(atp0->symbol); - return atp; -} - - -bool LocalPeriodicTable::has(const string& pat) const -{ - return this->_periodic_table->has(pat); -} - - -void LocalPeriodicTable::reset(const string& smbl) -{ - const AtomType* atp0; - try { - atp0 = this->_periodic_table->symbol(smbl); - } - catch (runtime_error e) { - throw ValueError(e.what()); - } - // overwrite with default only when smbl is in the local table - if (this->_local_table.count(smbl)) - { - this->_local_table[smbl] = *atp0; - } -} - - -void LocalPeriodicTable::setXsf(const string& smbl, double xsf) -{ - AtomType* atp = this->local_symbol(smbl); - atp->xsf = xsf; -} - - -void LocalPeriodicTable::setNsf(const string& smbl, double nsf) -{ - AtomType* atp = this->local_symbol(smbl); - atp->nsf = nsf; -} - - -// private methods - - -AtomType* LocalPeriodicTable::local_symbol(const string& smbl) const -{ - map::iterator atplocal; - atplocal = this->_local_table.find(smbl); - if (atplocal == this->_local_table.end()) - { - const AtomType* atp0; - try { - atp0 = this->_periodic_table->symbol(smbl); - } - catch (runtime_error e) { - throw ValueError(e.what()); - } - atplocal = this->_local_table.insert(make_pair(smbl, *atp0)).first; - } - AtomType* atp = &(atplocal->second); - return atp; -} - - -// End of file diff --git a/libpdffit2/LocalPeriodicTable.h b/libpdffit2/LocalPeriodicTable.h deleted file mode 100644 index 551faee5..00000000 --- a/libpdffit2/LocalPeriodicTable.h +++ /dev/null @@ -1,63 +0,0 @@ -/*********************************************************************** -* -* pdffit2 by DANSE Diffraction group -* Simon J. L. Billinge -* (c) 2008 trustees of the Michigan State University -* All rights reserved. -* -* File coded by: Pavol Juhas -* -* See AUTHORS.txt for a list of people who contributed. -* See LICENSE.txt for license information. -* -************************************************************************ -* -* class LocalPeriodicTable -* -* Comments: Light-weight class which allows redefinitions of scattering -* factors. It keeps a local copy of each looked up species, -* which can be redefined. -* This class also throws ValueError for unknown elements. -* -***********************************************************************/ - -#ifndef LOCALPERIODICTABLE_H_INCLUDED -#define LOCALPERIODICTABLE_H_INCLUDED - -#include -#include -#include "PeriodicTable.h" - -class LocalPeriodicTable -{ - public: - - // class methods - - // common instance for clients that do not need to own one - static const LocalPeriodicTable* instance(); - - // constructor - LocalPeriodicTable(); - - // methods - const AtomType* name(const std::string& nm) const; - const AtomType* symbol(const std::string& smbl) const; - const AtomType* lookup(const std::string& pat) const; - bool has(const std::string& pat) const; - void reset(const std::string& smbl); - void setXsf(const std::string& smbl, double xsf); - void setNsf(const std::string& smbl, double nsf); - - private: - - // data - PeriodicTable* _periodic_table; - mutable std::map _local_table; - - // methods - AtomType* local_symbol(const std::string& smbl) const; - -}; - -#endif // LOCALPERIODICTABLE_H_INCLUDED diff --git a/libpdffit2/MathUtils.h b/libpdffit2/MathUtils.h deleted file mode 100644 index 21240276..00000000 --- a/libpdffit2/MathUtils.h +++ /dev/null @@ -1,94 +0,0 @@ -/*********************************************************************** -* -* pdffit2 by DANSE Diffraction group -* Simon J. L. Billinge -* (c) 2007 trustees of the Michigan State University -* All rights reserved. -* -* File coded by: Jacques Bloch, Pavol Juhas -* -* See AUTHORS.txt for a list of people who contributed. -* See LICENSE.txt for license information. -* -************************************************************************ -* -* Math functions and numerical constants for pdffit2 and formula parser. -* -* Comments: -* -***********************************************************************/ - -#ifndef MATHUTILS_H_INCLUDED -#define MATHUTILS_H_INCLUDED - -#include -#include - -// numerical constants -const double rad = M_PI/180.0; -const double double_eps = (1.0 + sqrt(std::numeric_limits().epsilon())) - 1.0; -const double double_max = std::numeric_limits().max(); -const double deltar_tol = 1.0e-3; - -// MS compatibility fix - define functions not provided by MSVC cmath -#ifdef _MSC_VER -#include - -#if _MSC_VER < 1800 // log2 has been available since MSVC 2013 -inline double log2(double x) { return log(x)/log(2.0); } -#endif - -inline int isnan(double x) { return _isnan(x); } -inline double round(double x) { return (x < 0) ? ceil(x - 0.5) : floor(x + 0.5); } - -#endif // _MSC_VER - -// nearest integer -inline int nint(const double x) -{ - return (int) round(x); -} - -// math functions and derivatives used in formula parser - -inline double neg(double x) { return -x; } -inline double dneg(double x) { return -1.0; } - -inline double sqr(double x) { return x*x; } -inline double dsqr(double x) { return 2.0*x; } - -inline double cube(double x) { return x*x*x; } -inline double dcube(double x) { return 3.0*sqr(x); } - -inline double dsqrt(double x) { return 0.5/sqrt(x); } - -inline double dexp(double x) { return exp(x); } -inline double dlog(double x) { return 1.0/x; } - -inline double sind(double x) { return sin(rad*x); } -inline double dsind(double x) { return rad*cos(rad*x); } - -inline double cosd(double x) { return cos(rad*x); } -inline double dcosd(double x) { return -rad*sin(rad*x); } - -inline double tand(double x) { return tan(rad*x); } -inline double dtand(double x) { return rad/sqr(cosd(x)); } - -inline double dsin(double x) { return cos(x); } -inline double dcos(double x) { return -sin(x); } -inline double dtan(double x) { return 1.0/sqr(cos(x)); } - -inline double dasin(double x) { return 1.0/sqrt(1.0 - x*x); } -inline double dacos(double x) { return -1.0/sqrt(1.0 - x*x); } -inline double datan(double x) { return 1/(1+sqr(x)); } - -inline double asind(double x) { return asin(x)/rad; } -inline double dasind(double x) { return dasin(x)/rad; } - -inline double acosd(double x) { return acos(x)/rad; } -inline double dacosd(double x) { return dacos(x)/rad; } - -inline double atand(double x) { return atan(x)/rad; } -inline double datand(double x) { return datan(x)/rad; } - -#endif // MATHUTILS_H_INCLUDED diff --git a/libpdffit2/OutputStreams.cc b/libpdffit2/OutputStreams.cc deleted file mode 100644 index 6bacc8c1..00000000 --- a/libpdffit2/OutputStreams.cc +++ /dev/null @@ -1,24 +0,0 @@ -/*********************************************************************** -* -* pdffit2 by DANSE Diffraction group -* Simon J. L. Billinge -* (c) 2006 trustees of the Michigan State University -* All rights reserved. -* -* File coded by: Pavol Juhas -* -* See AUTHORS.txt for a list of people who contributed. -* See LICENSE.txt for license information. -* -************************************************************************ -* -* Custom output and error streams. -* -***********************************************************************/ - -#include "OutputStreams.h" - -std::ostream* NS_PDFFIT2::pout = &std::cout; -std::ostream* NS_PDFFIT2::perr = &std::cerr; - -// End of file diff --git a/libpdffit2/OutputStreams.h b/libpdffit2/OutputStreams.h deleted file mode 100644 index d269b6b3..00000000 --- a/libpdffit2/OutputStreams.h +++ /dev/null @@ -1,31 +0,0 @@ -/*********************************************************************** -* -* pdffit2 by DANSE Diffraction group -* Simon J. L. Billinge -* (c) 2006 trustees of the Michigan State University -* All rights reserved. -* -* File coded by: Pavol Juhas -* -* See AUTHORS.txt for a list of people who contributed. -* See LICENSE.txt for license information. -* -************************************************************************ -* -* Custom output and error streams. -* -***********************************************************************/ - -#ifndef OUTPUTSTREAMS_H_INCLUDED -#define OUTPUTSTREAMS_H_INCLUDED - -#include - -namespace NS_PDFFIT2 { - -extern std::ostream* pout; -extern std::ostream* perr; - -} - -#endif // OUTPUTSTREAMS_H_INCLUDED diff --git a/libpdffit2/PairDistance.h b/libpdffit2/PairDistance.h deleted file mode 100644 index 92c375f3..00000000 --- a/libpdffit2/PairDistance.h +++ /dev/null @@ -1,42 +0,0 @@ -/*********************************************************************** -* -* pdffit2 by DANSE Diffraction group -* Simon J. L. Billinge -* (c) 2006 trustees of the Michigan State University -* All rights reserved. -* -* File coded by: Pavol Juhas -* -* See AUTHORS.txt for a list of people who contributed. -* See LICENSE.txt for license information. -* -************************************************************************ -* -* Simple struct for pair distance and indices of atoms in the pair -* -***********************************************************************/ - -#ifndef PAIRDISTANCE_H_INCLUDED -#define PAIRDISTANCE_H_INCLUDED - -struct PairDistance -{ - // Data members - double dij; // distance - double ddij; // standard deviation - int i; // first index based from 1 - int j; // second index based from 1 - - // Constructor - PairDistance() : dij(0.0), ddij(0.0), i(0), j(0) - { } - -}; - -// Comparison operator -inline bool operator<(const PairDistance& pd0, const PairDistance& pd1) -{ - return (pd0.dij < pd1.dij); -} - -#endif // PAIRDISTANCE_H_INCLUDED diff --git a/libpdffit2/PeriodicTable.cc b/libpdffit2/PeriodicTable.cc deleted file mode 100644 index dd1b4481..00000000 --- a/libpdffit2/PeriodicTable.cc +++ /dev/null @@ -1,3459 +0,0 @@ -/*********************************************************************** -* -* pdffit2 by DANSE Diffraction group -* Simon J. L. Billinge -* (c) 2006 trustees of the Michigan State University -* All rights reserved. -* -* File coded by: Pavol Juhas -* -* See AUTHORS.txt for a list of people who contributed. -* See LICENSE.txt for license information. -* -************************************************************************ -* -* class PeriodicTable -* -* Comments: singleton class, use PeriodicTable::instance() -* for its pointer -* -***********************************************************************/ - -#include -#include -#include - -// MS compatibility fix -#include - -#include "PeriodicTable.h" - -using namespace std; - -//////////////////////////////////////////////////////////////////////// -// helper function -//////////////////////////////////////////////////////////////////////// -namespace { - -inline bool isalphachar(const char& c) -{ - return isalpha(c); -} - -} // namespace - -//////////////////////////////////////////////////////////////////////// -// PeriodicTable definitions -//////////////////////////////////////////////////////////////////////// - -PeriodicTable::PeriodicTable() -{ - init(); -} - -PeriodicTable::~PeriodicTable() -{ - clear(); -} - -AtomType* PeriodicTable::name(const string& s) -{ - map::iterator ii; - ii = name_index.find(s); - if (ii == name_index.end()) - { - ostringstream emsg; - emsg << "Element or isotope '" << s << "' is not defined."; - throw runtime_error(emsg.str()); - } - return ii->second; -} - -AtomType* PeriodicTable::symbol(const string& s) -{ - map::iterator ii; - ii = symbol_index.find(s); - if (ii == symbol_index.end()) - { - ostringstream emsg; - emsg << "Element or isotope '" << s << "' is not defined."; - throw runtime_error(emsg.str()); - } - return ii->second; -} - -AtomType* PeriodicTable::lookup(string s) -{ - // force standard case - string::iterator sii = find_if(s.begin(), s.end(), isalphachar); - if (sii != s.end()) - { - *sii = toupper(*sii); - for (sii++; sii != s.end(); ++sii) *sii = tolower(*sii); - } - map::iterator ii; - ii = symbol_index.find(s); - if ( ii == symbol_index.end() && - (ii = name_index.find(s)) == name_index.end() ) - { - ostringstream emsg; - emsg << "Element or isotope '" << s << "' is not defined."; - throw runtime_error(emsg.str()); - } - return ii->second; -} - -bool PeriodicTable::has(const std::string& s) -{ - bool rv; - try - { - lookup(s); - rv = true; - } - catch(runtime_error) - { - rv = false; - } - return rv; -} - -void PeriodicTable::defAtomType(const AtomType& atp) -{ - // check if already defined - if (symbol_index.count(atp.symbol)) - { - ostringstream emsg; - emsg << "Element symbol '" << atp.symbol - << "' already defined."; - throw runtime_error(emsg.str()); - } - if (name_index.count(atp.name)) - { - ostringstream emsg; - emsg << "Element name '" << atp.name - << "' already defined."; - throw runtime_error(emsg.str()); - } - // all should be fine here - pt_backup.push_back(new AtomType(atp)); - AtomType* newatp = new AtomType(atp); - pt_public.push_back(newatp); - symbol_index[newatp->symbol] = newatp; - name_index[newatp->name] = newatp; -} - -void PeriodicTable::deleteAtomType(const AtomType* atp) -{ - deque::iterator ii; - ii = find(pt_public.begin(), pt_public.end(), atp); - if (ii == pt_public.end()) return; - // here we need to free and remove atp related data - symbol_index.erase(atp->symbol); - name_index.erase(atp->name); - size_t idx = ii - pt_public.begin(); - delete pt_public[idx]; pt_public.erase(pt_public.begin() + idx); - delete pt_backup[idx]; pt_backup.erase(pt_backup.begin() + idx); -} - -void PeriodicTable::reset(AtomType* atp) -{ - deque::iterator ii; - if (!count(pt_backup.begin(), pt_backup.end(), atp)) - { - ostringstream emsg; - emsg << "Element '" << atp->symbol << "' is not defined."; - throw runtime_error(emsg.str()); - } - size_t idx = ii - pt_backup.begin(); - *(pt_public[idx]) = *(pt_backup[idx]); -} - -void PeriodicTable::resetAll() -{ - deque::iterator iipub = pt_public.begin(); - deque::iterator iibak = pt_backup.begin(); - for ( ; iipub != pt_public.end(); ++iipub, ++iibak) - { - **iipub = **iibak; - } -} - -void PeriodicTable::init() -{ - // load element data to pt_backup - fill_pt_backup(); - // make public copy and initialize lookup maps - pt_public.resize(pt_backup.size()); - // fill in lookup map - deque::iterator iipub = pt_public.begin(); - deque::iterator iibak = pt_backup.begin(); - for ( ; iipub != pt_public.end(); ++iipub, ++iibak) - { - *iipub = new AtomType(**iibak); - symbol_index[(*iipub)->symbol] = *iipub; - name_index[(*iipub)->name] = *iipub; - } - // add standard symbols for deuterium and tritium - symbol_index["2-H"] = lookup("D"); - symbol_index["3-H"] = lookup("T"); -} - -void PeriodicTable::clear() -{ - deque::iterator iipub = pt_public.begin(); - deque::iterator iibak = pt_backup.begin(); - for ( ; iipub != pt_public.end(); ++iipub, ++iibak) - { - delete *iipub; *iipub = NULL; - delete *iibak; *iibak = NULL; - } - pt_public.clear(); - pt_backup.clear(); -} - -void PeriodicTable::fill_pt_backup() -{ - // Refs: - // 1. Albert-Jose Dianoux, Gerry Lander, Neutron Data Booklet, - // Second Edition, ILL 2003 - // 2. ionic radii: http://www.fhi-berlin.mpg.de/th/balsac/balm.47.html - AtomType* atp; - AtomType* itp; - // hydrogen - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "H"; - atp->name = "Hydrogen"; - atp->z = 1; - atp->M = 1.007947; - atp->radius = 0.4350; - atp->xsf = 1.0; - atp->nsf = -3.7409; - // isotopes - // 1-hydrogen - itp = new AtomType(*atp); - itp->symbol = "1-H"; - itp->name = "1-Hydrogen"; - itp->isotope = true; - itp->M = 1.0078250321; - itp->nsf = -3.7423; - pt_backup.push_back(itp); - // deuterium - itp = new AtomType(*atp); - itp->symbol = "D"; - itp->name = "Deuterium"; - itp->isotope = true; - itp->M = 2.0141017780; - itp->nsf = 6.674; - pt_backup.push_back(itp); - // tritium - itp = new AtomType(*atp); - itp->symbol = "T"; - itp->name = "Tritium"; - itp->isotope = true; - itp->M = 3.0160492675; - itp->nsf = 4.792; - pt_backup.push_back(itp); - } - // helium - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "He"; - atp->name = "Helium"; - atp->z = 2; - atp->M = 4.0026022; - atp->radius = 1.4000; - atp->xsf = 2.0; - atp->nsf = 3.263; - // isotopes - // 3-helium - itp = new AtomType(*atp); - itp->symbol = "3-He"; - itp->name = "3-Helium"; - itp->isotope = true; - itp->M = 3.0160293097; - itp->nsf = 5.74; - pt_backup.push_back(itp); - // 4-helium - itp = new AtomType(*atp); - itp->symbol = "4-He"; - itp->name = "4-Helium"; - itp->isotope = true; - itp->M = 4.0026032497; - itp->nsf = 3.26; - pt_backup.push_back(itp); - } - // lithium - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Li"; - atp->name = "Lithium"; - atp->z = 3; - atp->M = 6.9412; - atp->radius = 1.5199; - atp->xsf = 3.0; - atp->nsf = -1.903; - // isotopes - // 6-lithium - itp = new AtomType(*atp); - itp->symbol = "6-Li"; - itp->name = "6-Lithium"; - itp->isotope = true; - itp->M = 6.0151223; - itp->nsf = 2.0; - pt_backup.push_back(itp); - // 7-lithium - itp = new AtomType(*atp); - itp->symbol = "7-Li"; - itp->name = "7-Lithium"; - itp->isotope = true; - itp->M = 7.0160040; - itp->nsf = -2.22; - pt_backup.push_back(itp); - } - // beryllium - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Be"; - atp->name = "Beryllium"; - atp->z = 4; - atp->M = 9.0121823; - atp->radius = 1.1430; - atp->xsf = 4.0; - atp->nsf = 7.791; - } - // boron - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "B"; - atp->name = "Boron"; - atp->z = 5; - atp->M = 10.8117; - atp->radius = 0.9750; - atp->xsf = 5.0; - atp->nsf = 5.304; - // isotopes - // 10-boron - itp = new AtomType(*atp); - itp->symbol = "10-B"; - itp->name = "10-Boron"; - itp->isotope = true; - itp->M = 10.0129370; - itp->nsf = -0.2; - pt_backup.push_back(itp); - // 11-boron - itp = new AtomType(*atp); - itp->symbol = "11-B"; - itp->name = "11-Boron"; - itp->isotope = true; - itp->M = 11.0093055; - itp->nsf = 6.65; - pt_backup.push_back(itp); - } - // carbon - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "C"; - atp->name = "Carbon"; - atp->z = 6; - atp->M = 12.01078; - atp->radius = 0.6550; - atp->xsf = 6.0; - atp->nsf = 6.648413; - // isotopes - // 12-carbon - itp = new AtomType(*atp); - itp->symbol = "12-C"; - itp->name = "12-Carbon"; - itp->isotope = true; - itp->M = 12.0; - itp->nsf = 6.6535; - pt_backup.push_back(itp); - // 13-carbon - itp = new AtomType(*atp); - itp->symbol = "13-C"; - itp->name = "13-Carbon"; - itp->isotope = true; - itp->M = 13.0033548378; - itp->nsf = 6.19; - pt_backup.push_back(itp); - } - // nitrogen - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "N"; - atp->name = "Nitrogen"; - atp->z = 7; - atp->M = 14.00672; - atp->radius = 0.7500; - atp->xsf = 7.0; - atp->nsf = 9.36; - // isotopes - // 14-nitrogen - itp = new AtomType(*atp); - itp->symbol = "14-N"; - itp->name = "14-Nitrogen"; - itp->isotope = true; - itp->M = 14.0030740052; - itp->nsf = 9.37; - pt_backup.push_back(itp); - // 15-nitrogen - itp = new AtomType(*atp); - itp->symbol = "15-N"; - itp->name = "15-Nitrogen"; - itp->isotope = true; - itp->M = 15.0001088984; - itp->nsf = 6.44; - pt_backup.push_back(itp); - } - // oxygen - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "O"; - atp->name = "Oxygen"; - atp->z = 8; - atp->M = 15.99943; - atp->radius = 0.7300; - atp->xsf = 8.0; - atp->nsf = 5.8054; - // isotopes - // 16-oxygen - itp = new AtomType(*atp); - itp->symbol = "16-O"; - itp->name = "16-Oxygen"; - itp->isotope = true; - itp->M = 15.9949146221; - itp->nsf = 5.805; - pt_backup.push_back(itp); - // 17-oxygen - itp = new AtomType(*atp); - itp->symbol = "17-O"; - itp->name = "17-Oxygen"; - itp->isotope = true; - itp->M = 16.99913150; - itp->nsf = 5.6; - pt_backup.push_back(itp); - // 18-oxygen - itp = new AtomType(*atp); - itp->symbol = "18-O"; - itp->name = "18-Oxygen"; - itp->isotope = true; - itp->M = 17.9991604; - itp->nsf = 5.84; - pt_backup.push_back(itp); - } - // fluorine - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "F"; - atp->name = "Fluorine"; - atp->z = 9; - atp->M = 18.99840325; - atp->radius = 0.7200; - atp->xsf = 9.0; - atp->nsf = 5.65412; - } - // neon - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Ne"; - atp->name = "Neon"; - atp->z = 10; - atp->M = 20.17976; - atp->radius = 1.6000; - atp->xsf = 10.0; - atp->nsf = 4.5666; - // isotopes - // 20-neon - itp = new AtomType(*atp); - itp->symbol = "20-Ne"; - itp->name = "20-Neon"; - itp->isotope = true; - itp->M = 19.9924401759; - itp->nsf = 4.631; - pt_backup.push_back(itp); - // 21-neon - itp = new AtomType(*atp); - itp->symbol = "21-Ne"; - itp->name = "21-Neon"; - itp->isotope = true; - itp->M = 20.99384674; - itp->nsf = 6.66; - pt_backup.push_back(itp); - // 22-neon - itp = new AtomType(*atp); - itp->symbol = "22-Ne"; - itp->name = "22-Neon"; - itp->isotope = true; - itp->M = 21.99138551; - itp->nsf = 3.87; - pt_backup.push_back(itp); - } - // sodium - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Na"; - atp->name = "Sodium"; - atp->z = 11; - atp->M = 22.9897702; - atp->radius = 1.8579; - atp->xsf = 11.0; - atp->nsf = 3.632; - } - // magnesium - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Mg"; - atp->name = "Magnesium"; - atp->z = 12; - atp->M = 24.30506; - atp->radius = 1.6047; - atp->xsf = 12.0; - atp->nsf = 5.3754; - // isotopes - // 24-magnesium - itp = new AtomType(*atp); - itp->symbol = "24-Mg"; - itp->name = "24-Magnesium"; - itp->isotope = true; - itp->M = 23.98504190; - itp->nsf = 5.49; - pt_backup.push_back(itp); - // 25-magnesium - itp = new AtomType(*atp); - itp->symbol = "25-Mg"; - itp->name = "25-Magnesium"; - itp->isotope = true; - itp->M = 24.98583702; - itp->nsf = 3.62; - pt_backup.push_back(itp); - // 26-magnesium - itp = new AtomType(*atp); - itp->symbol = "26-Mg"; - itp->name = "26-Magnesium"; - itp->isotope = true; - itp->M = 25.98259304; - itp->nsf = 4.89; - pt_backup.push_back(itp); - } - // aluminium - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Al"; - atp->name = "Aluminium"; - atp->z = 13; - atp->M = 26.9815382; - atp->radius = 1.4318; - atp->xsf = 13.0; - atp->nsf = 3.4495; - } - // silicon - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Si"; - atp->name = "Silicon"; - atp->z = 14; - atp->M = 28.08553; - atp->radius = 1.1758; - atp->xsf = 14.0; - atp->nsf = 4.15071; - // isotopes - // 28-silicon - itp = new AtomType(*atp); - itp->symbol = "28-Si"; - itp->name = "28-Silicon"; - itp->isotope = true; - itp->M = 27.9769265327; - itp->nsf = 4.106; - pt_backup.push_back(itp); - // 29-silicon - itp = new AtomType(*atp); - itp->symbol = "29-Si"; - itp->name = "29-Silicon"; - itp->isotope = true; - itp->M = 28.97649472; - itp->nsf = 4.7; - pt_backup.push_back(itp); - // 30-silicon - itp = new AtomType(*atp); - itp->symbol = "30-Si"; - itp->name = "30-Silicon"; - itp->isotope = true; - itp->M = 29.97377022; - itp->nsf = 4.58; - pt_backup.push_back(itp); - } - // phosphorus - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "P"; - atp->name = "Phosphorus"; - atp->z = 15; - atp->M = 30.9737612; - atp->radius = 1.0600; - atp->xsf = 15.0; - atp->nsf = 5.131; - } - // sulfur - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "S"; - atp->name = "Sulfur"; - atp->z = 16; - atp->M = 32.0655; - atp->radius = 1.0200; - atp->xsf = 16.0; - atp->nsf = 2.8471; - // isotopes - // 32-sulfur - itp = new AtomType(*atp); - itp->symbol = "32-S"; - itp->name = "32-Sulfur"; - itp->isotope = true; - itp->M = 31.97207069; - itp->nsf = 2.804; - pt_backup.push_back(itp); - // 33-sulfur - itp = new AtomType(*atp); - itp->symbol = "33-S"; - itp->name = "33-Sulfur"; - itp->isotope = true; - itp->M = 32.97145850; - itp->nsf = 4.74; - pt_backup.push_back(itp); - // 34-sulfur - itp = new AtomType(*atp); - itp->symbol = "34-S"; - itp->name = "34-Sulfur"; - itp->isotope = true; - itp->M = 33.96786683; - itp->nsf = 3.48; - pt_backup.push_back(itp); - // 36-sulfur - itp = new AtomType(*atp); - itp->symbol = "36-S"; - itp->name = "36-Sulfur"; - itp->isotope = true; - itp->M = 35.96708088; - itp->nsf = 3.0; - pt_backup.push_back(itp); - } - // chlorine - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Cl"; - atp->name = "Chlorine"; - atp->z = 17; - atp->M = 35.4532; - atp->radius = 0.9900; - atp->xsf = 17.0; - atp->nsf = 9.57928; - // isotopes - // 35-chlorine - itp = new AtomType(*atp); - itp->symbol = "35-Cl"; - itp->name = "35-Chlorine"; - itp->isotope = true; - itp->M = 34.96885271; - itp->nsf = 11.7; - pt_backup.push_back(itp); - // 37-chlorine - itp = new AtomType(*atp); - itp->symbol = "37-Cl"; - itp->name = "37-Chlorine"; - itp->isotope = true; - itp->M = 36.96590260; - itp->nsf = 3.08; - pt_backup.push_back(itp); - } - // argon - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Ar"; - atp->name = "Argon"; - atp->z = 18; - atp->M = 39.9481; - atp->radius = 1.9000; - atp->xsf = 18.0; - atp->nsf = 1.9096; - // isotopes - // 36-argon - itp = new AtomType(*atp); - itp->symbol = "36-Ar"; - itp->name = "36-Argon"; - itp->isotope = true; - itp->M = 35.96754628; - itp->nsf = 24.9; - pt_backup.push_back(itp); - // 38-argon - itp = new AtomType(*atp); - itp->symbol = "38-Ar"; - itp->name = "38-Argon"; - itp->isotope = true; - itp->M = 37.9627322; - itp->nsf = 3.5; - pt_backup.push_back(itp); - // 40-argon - itp = new AtomType(*atp); - itp->symbol = "40-Ar"; - itp->name = "40-Argon"; - itp->isotope = true; - itp->M = 39.962383123; - itp->nsf = 1.7; - pt_backup.push_back(itp); - } - // potassium - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "K"; - atp->name = "Potassium"; - atp->z = 19; - atp->M = 39.09831; - atp->radius = 2.2620; - atp->xsf = 19.0; - atp->nsf = 3.672; - // isotopes - // 39-potassium - itp = new AtomType(*atp); - itp->symbol = "39-K"; - itp->name = "39-Potassium"; - itp->isotope = true; - itp->M = 38.9637069; - itp->nsf = 3.79; - pt_backup.push_back(itp); - // 40-potassium - itp = new AtomType(*atp); - itp->symbol = "40-K"; - itp->name = "40-Potassium"; - itp->isotope = true; - itp->M = 39.96399867; - itp->nsf = 3.1; - pt_backup.push_back(itp); - // 41-potassium - itp = new AtomType(*atp); - itp->symbol = "41-K"; - itp->name = "41-Potassium"; - itp->isotope = true; - itp->M = 40.96182597; - itp->nsf = 2.69; - pt_backup.push_back(itp); - } - // calcium - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Ca"; - atp->name = "Calcium"; - atp->z = 20; - atp->M = 40.0784; - atp->radius = 1.9758; - atp->xsf = 20.0; - atp->nsf = 4.702; - // isotopes - // 40-calcium - itp = new AtomType(*atp); - itp->symbol = "40-Ca"; - itp->name = "40-Calcium"; - itp->isotope = true; - itp->M = 39.9625912; - itp->nsf = 4.78; - pt_backup.push_back(itp); - // 42-calcium - itp = new AtomType(*atp); - itp->symbol = "42-Ca"; - itp->name = "42-Calcium"; - itp->isotope = true; - itp->M = 41.9586183; - itp->nsf = 3.36; - pt_backup.push_back(itp); - // 43-calcium - itp = new AtomType(*atp); - itp->symbol = "43-Ca"; - itp->name = "43-Calcium"; - itp->isotope = true; - itp->M = 42.9587668; - itp->nsf = -1.56; - pt_backup.push_back(itp); - // 44-calcium - itp = new AtomType(*atp); - itp->symbol = "44-Ca"; - itp->name = "44-Calcium"; - itp->isotope = true; - itp->M = 43.9554811; - itp->nsf = 1.42; - pt_backup.push_back(itp); - // 46-calcium - itp = new AtomType(*atp); - itp->symbol = "46-Ca"; - itp->name = "46-Calcium"; - itp->isotope = true; - itp->M = 45.9536928; - itp->nsf = 3.55; - pt_backup.push_back(itp); - // 48-calcium - itp = new AtomType(*atp); - itp->symbol = "48-Ca"; - itp->name = "48-Calcium"; - itp->isotope = true; - itp->M = 47.952534; - itp->nsf = 0.39; - pt_backup.push_back(itp); - } - // scandium - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Sc"; - atp->name = "Scandium"; - atp->z = 21; - atp->M = 44.9559108; - atp->radius = 1.6545; - atp->xsf = 21.0; - atp->nsf = 12.11; - } - // titanium - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Ti"; - atp->name = "Titanium"; - atp->z = 22; - atp->M = 47.8671; - atp->radius = 1.4755; - atp->xsf = 22.0; - atp->nsf = -3.37013; - // isotopes - // 46-titanium - itp = new AtomType(*atp); - itp->symbol = "46-Ti"; - itp->name = "46-Titanium"; - itp->isotope = true; - itp->M = 45.9526295; - itp->nsf = 4.72; - pt_backup.push_back(itp); - // 47-titanium - itp = new AtomType(*atp); - itp->symbol = "47-Ti"; - itp->name = "47-Titanium"; - itp->isotope = true; - itp->M = 46.9517638; - itp->nsf = 3.53; - pt_backup.push_back(itp); - // 48-titanium - itp = new AtomType(*atp); - itp->symbol = "48-Ti"; - itp->name = "48-Titanium"; - itp->isotope = true; - itp->M = 47.9479471; - itp->nsf = -5.86; - pt_backup.push_back(itp); - // 49-titanium - itp = new AtomType(*atp); - itp->symbol = "49-Ti"; - itp->name = "49-Titanium"; - itp->isotope = true; - itp->M = 48.9478708; - itp->nsf = 0.98; - pt_backup.push_back(itp); - // 50-titanium - itp = new AtomType(*atp); - itp->symbol = "50-Ti"; - itp->name = "50-Titanium"; - itp->isotope = true; - itp->M = 49.9447921; - itp->nsf = 5.88; - pt_backup.push_back(itp); - } - // vanadium - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "V"; - atp->name = "Vanadium"; - atp->z = 23; - atp->M = 50.94151; - atp->radius = 1.3090; - atp->xsf = 23.0; - atp->nsf = -0.44314; - // isotopes - // 50-vanadium - itp = new AtomType(*atp); - itp->symbol = "50-V"; - itp->name = "50-Vanadium"; - itp->isotope = true; - itp->M = 49.9471628; - itp->nsf = 7.6; - pt_backup.push_back(itp); - // 51-vanadium - itp = new AtomType(*atp); - itp->symbol = "51-V"; - itp->name = "51-Vanadium"; - itp->isotope = true; - itp->M = 50.9439637; - itp->nsf = -0.402; - pt_backup.push_back(itp); - } - // chromium - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Cr"; - atp->name = "Chromium"; - atp->z = 24; - atp->M = 51.99616; - atp->radius = 1.2490; - atp->xsf = 24.0; - atp->nsf = 3.6357; - // isotopes - // 50-chromium - itp = new AtomType(*atp); - itp->symbol = "50-Cr"; - itp->name = "50-Chromium"; - itp->isotope = true; - itp->M = 49.9460496; - itp->nsf = -4.50; - pt_backup.push_back(itp); - // 52-chromium - itp = new AtomType(*atp); - itp->symbol = "52-Cr"; - itp->name = "52-Chromium"; - itp->isotope = true; - itp->M = 51.9405119; - itp->nsf = 4.914; - pt_backup.push_back(itp); - // 0-chromium - itp = new AtomType(*atp); - itp->symbol = "53-Cr"; - itp->name = "53-Chromium"; - itp->isotope = true; - itp->M = 52.9406538; - itp->nsf = -4.20; - pt_backup.push_back(itp); - // 54-chromium - itp = new AtomType(*atp); - itp->symbol = "54-Cr"; - itp->name = "54-Chromium"; - itp->isotope = true; - itp->M = 53.9388849; - itp->nsf = 4.55; - pt_backup.push_back(itp); - } - // manganese - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Mn"; - atp->name = "Manganese"; - atp->z = 25; - atp->M = 54.9380499; - atp->radius = 1.3500; - atp->xsf = 25.0; - atp->nsf = -3.75018; - } - // iron - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Fe"; - atp->name = "Iron"; - atp->z = 26; - atp->M = 55.8452; - atp->radius = 1.2411; - atp->xsf = 26.0; - atp->nsf = 9.452; - // isotopes - // 54-iron - itp = new AtomType(*atp); - itp->symbol = "54-Fe"; - itp->name = "54-Iron"; - itp->isotope = true; - itp->M = 53.9396148; - itp->nsf = 4.2; - pt_backup.push_back(itp); - // 56-iron - itp = new AtomType(*atp); - itp->symbol = "56-Fe"; - itp->name = "56-Iron"; - itp->isotope = true; - itp->M = 55.9349421; - itp->nsf = 10.1; - pt_backup.push_back(itp); - // 57-iron - itp = new AtomType(*atp); - itp->symbol = "57-Fe"; - itp->name = "57-Iron"; - itp->isotope = true; - itp->M = 56.9353987; - itp->nsf = 2.3; - pt_backup.push_back(itp); - // 58-iron - itp = new AtomType(*atp); - itp->symbol = "58-Fe"; - itp->name = "58-Iron"; - itp->isotope = true; - itp->M = 57.9332805; - itp->nsf = 15; - pt_backup.push_back(itp); - } - // cobalt - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Co"; - atp->name = "Cobalt"; - atp->z = 27; - atp->M = 58.9332009; - atp->radius = 1.2535; - atp->xsf = 27.0; - atp->nsf = 2.492; - } - // nickel - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Ni"; - atp->name = "Nickel"; - atp->z = 28; - atp->M = 58.69342; - atp->radius = 1.2460; - atp->xsf = 28.0; - atp->nsf = 10.31; - // isotopes - // 58-nickel - itp = new AtomType(*atp); - itp->symbol = "58-Ni"; - itp->name = "58-Nickel"; - itp->isotope = true; - itp->M = 57.9353479; - itp->nsf = 14.4; - pt_backup.push_back(itp); - // 60-nickel - itp = new AtomType(*atp); - itp->symbol = "60-Ni"; - itp->name = "60-Nickel"; - itp->isotope = true; - itp->M = 59.9307906; - itp->nsf = 2.8; - pt_backup.push_back(itp); - // 61-nickel - itp = new AtomType(*atp); - itp->symbol = "61-Ni"; - itp->name = "61-Nickel"; - itp->isotope = true; - itp->M = 60.9310604; - itp->nsf = 7.60; - pt_backup.push_back(itp); - // 62-nickel - itp = new AtomType(*atp); - itp->symbol = "62-Ni"; - itp->name = "62-Nickel"; - itp->isotope = true; - itp->M = 61.9283488; - itp->nsf = -8.7; - pt_backup.push_back(itp); - // 64-nickel - itp = new AtomType(*atp); - itp->symbol = "64-Ni"; - itp->name = "64-Nickel"; - itp->isotope = true; - itp->M = 63.9279696; - itp->nsf = -0.37; - pt_backup.push_back(itp); - } - // copper - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Cu"; - atp->name = "Copper"; - atp->z = 29; - atp->M = 63.5463; - atp->radius = 1.2780; - atp->xsf = 29.0; - atp->nsf = 7.7184; - // isotopes - // 63-copper - itp = new AtomType(*atp); - itp->symbol = "63-Cu"; - itp->name = "63-Copper"; - itp->isotope = true; - itp->M = 62.9296011; - itp->nsf = 6.477; - pt_backup.push_back(itp); - // 65-copper - itp = new AtomType(*atp); - itp->symbol = "65-Cu"; - itp->name = "65-Copper"; - itp->isotope = true; - itp->M = 64.9277937; - itp->nsf = 10.204; - pt_backup.push_back(itp); - } - // zinc - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Zn"; - atp->name = "Zinc"; - atp->z = 30; - atp->M = 65.4094; - atp->radius = 1.3325; - atp->xsf = 30.0; - atp->nsf = 5.6805; - // isotopes - // 64-zinc - itp = new AtomType(*atp); - itp->symbol = "64-Zn"; - itp->name = "64-Zinc"; - itp->isotope = true; - itp->M = 63.9291466; - itp->nsf = 5.23; - pt_backup.push_back(itp); - // 66-zinc - itp = new AtomType(*atp); - itp->symbol = "66-Zn"; - itp->name = "66-Zinc"; - itp->isotope = true; - itp->M = 65.9260368; - itp->nsf = 5.98; - pt_backup.push_back(itp); - // 67-zinc - itp = new AtomType(*atp); - itp->symbol = "67-Zn"; - itp->name = "67-Zinc"; - itp->isotope = true; - itp->M = 66.9271309; - itp->nsf = 7.58; - pt_backup.push_back(itp); - // 68-zinc - itp = new AtomType(*atp); - itp->symbol = "68-Zn"; - itp->name = "68-Zinc"; - itp->isotope = true; - itp->M = 67.9248476; - itp->nsf = 6.04; - pt_backup.push_back(itp); - // 70-zinc - itp = new AtomType(*atp); - itp->symbol = "70-Zn"; - itp->name = "70-Zinc"; - itp->isotope = true; - itp->M = 69.925325; - itp->nsf = 6.9; - pt_backup.push_back(itp); - } - // gallium - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Ga"; - atp->name = "Gallium"; - atp->z = 31; - atp->M = 69.7231; - atp->radius = 1.3501; - atp->xsf = 31.0; - atp->nsf = 7.2882; - // isotopes - // 69-gallium - itp = new AtomType(*atp); - itp->symbol = "69-Ga"; - itp->name = "69-Gallium"; - itp->isotope = true; - itp->M = 68.925581; - itp->nsf = 8.043; - pt_backup.push_back(itp); - // 71-gallium - itp = new AtomType(*atp); - itp->symbol = "71-Ga"; - itp->name = "71-Gallium"; - itp->isotope = true; - itp->M = 70.9247050; - itp->nsf = 6.170; - pt_backup.push_back(itp); - } - // germanium - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Ge"; - atp->name = "Germanium"; - atp->z = 32; - atp->M = 72.641; - atp->radius = 1.2248; - atp->xsf = 32.0; - atp->nsf = 8.18520; - // isotopes - // 70-germanium - itp = new AtomType(*atp); - itp->symbol = "70-Ge"; - itp->name = "70-Germanium"; - itp->isotope = true; - itp->M = 69.9242504; - itp->nsf = 10.0; - pt_backup.push_back(itp); - // 72-germanium - itp = new AtomType(*atp); - itp->symbol = "72-Ge"; - itp->name = "72-Germanium"; - itp->isotope = true; - itp->M = 71.9220762; - itp->nsf = 8.51; - pt_backup.push_back(itp); - // 73-germanium - itp = new AtomType(*atp); - itp->symbol = "73-Ge"; - itp->name = "73-Germanium"; - itp->isotope = true; - itp->M = 72.9234594; - itp->nsf = 5.02; - pt_backup.push_back(itp); - // 74-germanium - itp = new AtomType(*atp); - itp->symbol = "74-Ge"; - itp->name = "74-Germanium"; - itp->isotope = true; - itp->M = 73.9211782; - itp->nsf = 7.58; - pt_backup.push_back(itp); - // 76-germanium - itp = new AtomType(*atp); - itp->symbol = "76-Ge"; - itp->name = "76-Germanium"; - itp->isotope = true; - itp->M = 75.9214027; - itp->nsf = 8.2; - pt_backup.push_back(itp); - } - // arsenic - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "As"; - atp->name = "Arsenic"; - atp->z = 33; - atp->M = 74.921602; - atp->radius = 1.2000; - atp->xsf = 33.0; - atp->nsf = 6.581; - } - // selenium - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Se"; - atp->name = "Selenium"; - atp->z = 34; - atp->M = 78.963; - atp->radius = 1.1600; - atp->xsf = 34.0; - atp->nsf = 7.9709; - // isotopes - // 74-selenium - itp = new AtomType(*atp); - itp->symbol = "74-Se"; - itp->name = "74-Selenium"; - itp->isotope = true; - itp->M = 73.9224766; - itp->nsf = 0.8; - pt_backup.push_back(itp); - // 76-selenium - itp = new AtomType(*atp); - itp->symbol = "76-Se"; - itp->name = "76-Selenium"; - itp->isotope = true; - itp->M = 75.9192141; - itp->nsf = 12.2; - pt_backup.push_back(itp); - // 77-selenium - itp = new AtomType(*atp); - itp->symbol = "77-Se"; - itp->name = "77-Selenium"; - itp->isotope = true; - itp->M = 76.9199146; - itp->nsf = 8.25; - pt_backup.push_back(itp); - // 78-selenium - itp = new AtomType(*atp); - itp->symbol = "78-Se"; - itp->name = "78-Selenium"; - itp->isotope = true; - itp->M = 77.9173095; - itp->nsf = 8.24; - pt_backup.push_back(itp); - // 80-selenium - itp = new AtomType(*atp); - itp->symbol = "80-Se"; - itp->name = "80-Selenium"; - itp->isotope = true; - itp->M = 79.9165218; - itp->nsf = 7.48; - pt_backup.push_back(itp); - // 82-selenium - itp = new AtomType(*atp); - itp->symbol = "82-Se"; - itp->name = "82-Selenium"; - itp->isotope = true; - itp->M = 81.9167000; - itp->nsf = 6.34; - pt_backup.push_back(itp); - } - // bromine - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Br"; - atp->name = "Bromine"; - atp->z = 35; - atp->M = 79.9041; - atp->radius = 1.1400; - atp->xsf = 35.0; - atp->nsf = 6.792; - // isotopes - // 79-bromine - itp = new AtomType(*atp); - itp->symbol = "79-Br"; - itp->name = "79-Bromine"; - itp->isotope = true; - itp->M = 78.9183376; - itp->nsf = 6.79; - pt_backup.push_back(itp); - // 81-bromine - itp = new AtomType(*atp); - itp->symbol = "81-Br"; - itp->name = "81-Bromine"; - itp->isotope = true; - itp->M = 80.916291; - itp->nsf = 6.78; - pt_backup.push_back(itp); - } - // krypton - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Kr"; - atp->name = "Krypton"; - atp->z = 36; - atp->M = 83.7982; - atp->radius = 2.0000; - atp->xsf = 36.0; - atp->nsf = 7.812; - // isotopes - // 86-krypton - itp = new AtomType(*atp); - itp->symbol = "86-Kr"; - itp->name = "86-Krypton"; - itp->isotope = true; - itp->M = 85.9106103; - itp->nsf = 8.07; - pt_backup.push_back(itp); - } - // rubidium - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Rb"; - atp->name = "Rubidium"; - atp->z = 37; - atp->M = 85.46783; - atp->radius = 2.4700; - atp->xsf = 37.0; - atp->nsf = 7.082; - // isotopes - // 85-rubidium - itp = new AtomType(*atp); - itp->symbol = "85-Rb"; - itp->name = "85-Rubidium"; - itp->isotope = true; - itp->M = 84.9117893; - itp->nsf = 7.07; - pt_backup.push_back(itp); - // 87-rubidium - itp = new AtomType(*atp); - itp->symbol = "87-Rb"; - itp->name = "87-Rubidium"; - itp->isotope = true; - itp->M = 86.9091835; - itp->nsf = 7.27; - pt_backup.push_back(itp); - } - // strontium - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Sr"; - atp->name = "Strontium"; - atp->z = 38; - atp->M = 87.621; - atp->radius = 2.1513; - atp->xsf = 38.0; - atp->nsf = 7.022; - // isotopes - // 84-strontium - itp = new AtomType(*atp); - itp->symbol = "84-Sr"; - itp->name = "84-Strontium"; - itp->isotope = true; - itp->M = 83.913425; - itp->nsf = 5.0; - pt_backup.push_back(itp); - // 86-strontium - itp = new AtomType(*atp); - itp->symbol = "86-Sr"; - itp->name = "86-Strontium"; - itp->isotope = true; - itp->M = 85.9092624; - itp->nsf = 5.68; - pt_backup.push_back(itp); - // 87-strontium - itp = new AtomType(*atp); - itp->symbol = "87-Sr"; - itp->name = "87-Strontium"; - itp->isotope = true; - itp->M = 86.9088793; - itp->nsf = 7.41; - pt_backup.push_back(itp); - // 88-strontium - itp = new AtomType(*atp); - itp->symbol = "88-Sr"; - itp->name = "88-Strontium"; - itp->isotope = true; - itp->M = 87.9056143; - itp->nsf = 7.16; - pt_backup.push_back(itp); - } - // yttrium - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Y"; - atp->name = "Yttrium"; - atp->z = 39; - atp->M = 88.905852; - atp->radius = 1.8237; - atp->xsf = 39.0; - atp->nsf = 7.752; - } - // zirconium - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Zr"; - atp->name = "Zirconium"; - atp->z = 40; - atp->M = 91.2242; - atp->radius = 1.6156; - atp->xsf = 40.0; - atp->nsf = 7.163; - // isotopes - // 90-zirconium - itp = new AtomType(*atp); - itp->symbol = "90-Zr"; - itp->name = "90-Zirconium"; - itp->isotope = true; - itp->M = 89.9047037; - itp->nsf = 6.5; - pt_backup.push_back(itp); - // 91-zirconium - itp = new AtomType(*atp); - itp->symbol = "91-Zr"; - itp->name = "91-Zirconium"; - itp->isotope = true; - itp->M = 90.9056450; - itp->nsf = 8.8; - pt_backup.push_back(itp); - // 92-zirconium - itp = new AtomType(*atp); - itp->symbol = "92-Zr"; - itp->name = "92-Zirconium"; - itp->isotope = true; - itp->M = 91.9050401; - itp->nsf = 7.5; - pt_backup.push_back(itp); - // 94-zirconium - itp = new AtomType(*atp); - itp->symbol = "94-Zr"; - itp->name = "94-Zirconium"; - itp->isotope = true; - itp->M = 93.9063158; - itp->nsf = 8.3; - pt_backup.push_back(itp); - // 96-zirconium - itp = new AtomType(*atp); - itp->symbol = "96-Zr"; - itp->name = "96-Zirconium"; - itp->isotope = true; - itp->M = 95.908276; - itp->nsf = 5.5; - pt_backup.push_back(itp); - } - // niobium - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Nb"; - atp->name = "Niobium"; - atp->z = 41; - atp->M = 92.906382; - atp->radius = 1.4318; - atp->xsf = 41.0; - atp->nsf = 7.0543; - } - // molybdenum - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Mo"; - atp->name = "Molybdenum"; - atp->z = 42; - atp->M = 95.942; - atp->radius = 1.3626; - atp->xsf = 42.0; - atp->nsf = 6.71520; - // isotopes - // 92-molybdenum - itp = new AtomType(*atp); - itp->symbol = "92-Mo"; - itp->name = "92-Molybdenum"; - itp->isotope = true; - itp->M = 91.906810; - itp->nsf = 6.93; - pt_backup.push_back(itp); - // 94-molybdenum - itp = new AtomType(*atp); - itp->symbol = "94-Mo"; - itp->name = "94-Molybdenum"; - itp->isotope = true; - itp->M = 93.9050876; - itp->nsf = 6.82; - pt_backup.push_back(itp); - // 95-molybdenum - itp = new AtomType(*atp); - itp->symbol = "95-Mo"; - itp->name = "95-Molybdenum"; - itp->isotope = true; - itp->M = 94.9058415; - itp->nsf = 6.93; - pt_backup.push_back(itp); - // 96-molybdenum - itp = new AtomType(*atp); - itp->symbol = "96-Mo"; - itp->name = "96-Molybdenum"; - itp->isotope = true; - itp->M = 95.9046789; - itp->nsf = 6.22; - pt_backup.push_back(itp); - // 97-molybdenum - itp = new AtomType(*atp); - itp->symbol = "97-Mo"; - itp->name = "97-Molybdenum"; - itp->isotope = true; - itp->M = 96.9060210; - itp->nsf = 7.26; - pt_backup.push_back(itp); - // 98-molybdenum - itp = new AtomType(*atp); - itp->symbol = "98-Mo"; - itp->name = "98-Molybdenum"; - itp->isotope = true; - itp->M = 97.9054078; - itp->nsf = 6.60; - pt_backup.push_back(itp); - // 100-molybdenum - itp = new AtomType(*atp); - itp->symbol = "100-Mo"; - itp->name = "100-Molybdenum"; - itp->isotope = true; - itp->M = 99.907477; - itp->nsf = 6.75; - pt_backup.push_back(itp); - } - // technetium - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Tc"; - atp->name = "Technetium"; - atp->z = 43; - atp->M = 98.0; - atp->radius = 1.3675; - atp->xsf = 43.0; - atp->nsf = 6.83; - } - // ruthenium - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Ru"; - atp->name = "Ruthenium"; - atp->z = 44; - atp->M = 101.072; - atp->radius = 1.3529; - atp->xsf = 44.0; - atp->nsf = 7.022; - } - // rhodium - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Rh"; - atp->name = "Rhodium"; - atp->z = 45; - atp->M = 102.905502; - atp->radius = 1.3450; - atp->xsf = 45.0; - atp->nsf = 5.904; - } - // palladium - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Pd"; - atp->name = "Palladium"; - atp->z = 46; - atp->M = 106.421; - atp->radius = 1.3755; - atp->xsf = 46.0; - atp->nsf = 5.916; - // isotopes - // 102-palladium - itp = new AtomType(*atp); - itp->symbol = "102-Pd"; - itp->name = "102-Palladium"; - itp->isotope = true; - itp->M = 101.905608; - itp->nsf = 7.7; - pt_backup.push_back(itp); - // 104-palladium - itp = new AtomType(*atp); - itp->symbol = "104-Pd"; - itp->name = "104-Palladium"; - itp->isotope = true; - itp->M = 103.904035; - itp->nsf = 7.7; - pt_backup.push_back(itp); - // 105-palladium - itp = new AtomType(*atp); - itp->symbol = "105-Pd"; - itp->name = "105-Palladium"; - itp->isotope = true; - itp->M = 104.905084; - itp->nsf = 5.5; - pt_backup.push_back(itp); - // 106-palladium - itp = new AtomType(*atp); - itp->symbol = "106-Pd"; - itp->name = "106-Palladium"; - itp->isotope = true; - itp->M = 105.903483; - itp->nsf = 6.4; - pt_backup.push_back(itp); - // 108-palladium - itp = new AtomType(*atp); - itp->symbol = "108-Pd"; - itp->name = "108-Palladium"; - itp->isotope = true; - itp->M = 107.903894; - itp->nsf = 4.1; - pt_backup.push_back(itp); - // 110-palladium - itp = new AtomType(*atp); - itp->symbol = "110-Pd"; - itp->name = "110-Palladium"; - itp->isotope = true; - itp->M = 109.905152; - itp->nsf = 7.7; - pt_backup.push_back(itp); - } - // silver - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Ag"; - atp->name = "Silver"; - atp->z = 47; - atp->M = 107.86822; - atp->radius = 1.4447; - atp->xsf = 47.0; - atp->nsf = 5.9227; - // isotopes - // 107-silver - itp = new AtomType(*atp); - itp->symbol = "107-Ag"; - itp->name = "107-Silver"; - itp->isotope = true; - itp->M = 106.905093; - itp->nsf = 7.555; - pt_backup.push_back(itp); - // 109-silver - itp = new AtomType(*atp); - itp->symbol = "109-Ag"; - itp->name = "109-Silver"; - itp->isotope = true; - itp->M = 108.904756; - itp->nsf = 4.165; - pt_backup.push_back(itp); - } - // cadmium - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Cd"; - atp->name = "Cadmium"; - atp->z = 48; - atp->M = 112.4118; - atp->radius = 1.4894; - atp->xsf = 48.0; - atp->nsf = 4.835; - // isotopes - // 106-cadmium - itp = new AtomType(*atp); - itp->symbol = "106-Cd"; - itp->name = "106-Cadmium"; - itp->isotope = true; - itp->M = 105.906458; - itp->nsf = 5.0; - pt_backup.push_back(itp); - // 108-cadmium - itp = new AtomType(*atp); - itp->symbol = "108-Cd"; - itp->name = "108-Cadmium"; - itp->isotope = true; - itp->M = 107.904183; - itp->nsf = 5.31; - pt_backup.push_back(itp); - // 110-cadmium - itp = new AtomType(*atp); - itp->symbol = "110-Cd"; - itp->name = "110-Cadmium"; - itp->isotope = true; - itp->M = 109.903006; - itp->nsf = 5.78; - pt_backup.push_back(itp); - // 111-cadmium - itp = new AtomType(*atp); - itp->symbol = "111-Cd"; - itp->name = "111-Cadmium"; - itp->isotope = true; - itp->M = 110.904182; - itp->nsf = 6.47; - pt_backup.push_back(itp); - // 112-cadmium - itp = new AtomType(*atp); - itp->symbol = "112-Cd"; - itp->name = "112-Cadmium"; - itp->isotope = true; - itp->M = 111.9027572; - itp->nsf = 6.34; - pt_backup.push_back(itp); - // 113-cadmium - itp = new AtomType(*atp); - itp->symbol = "113-Cd"; - itp->name = "113-Cadmium"; - itp->isotope = true; - itp->M = 112.9044009; - itp->nsf = -8.0; - pt_backup.push_back(itp); - // 114-cadmium - itp = new AtomType(*atp); - itp->symbol = "114-Cd"; - itp->name = "114-Cadmium"; - itp->isotope = true; - itp->M = 113.9033581; - itp->nsf = 7.48; - pt_backup.push_back(itp); - // 116-cadmium - itp = new AtomType(*atp); - itp->symbol = "116-Cd"; - itp->name = "116-Cadmium"; - itp->isotope = true; - itp->M = 115.904755; - itp->nsf = 6.26; - pt_backup.push_back(itp); - } - // indium - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "In"; - atp->name = "Indium"; - atp->z = 49; - atp->M = 114.8183; - atp->radius = 1.6662; - atp->xsf = 49.0; - atp->nsf = 4.0652; - // isotopes - // 113-indium - itp = new AtomType(*atp); - itp->symbol = "113-In"; - itp->name = "113-Indium"; - itp->isotope = true; - itp->M = 112.904061; - itp->nsf = 5.39; - pt_backup.push_back(itp); - // 115-indium - itp = new AtomType(*atp); - itp->symbol = "115-In"; - itp->name = "115-Indium"; - itp->isotope = true; - itp->M = 114.903878; - itp->nsf = 4.00; - pt_backup.push_back(itp); - } - // tin - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Sn"; - atp->name = "Tin"; - atp->z = 50; - atp->M = 118.7107; - atp->radius = 1.5375; - atp->xsf = 50.0; - atp->nsf = 6.2252; - // isotopes - // 112-tin - itp = new AtomType(*atp); - itp->symbol = "112-Sn"; - itp->name = "112-Tin"; - itp->isotope = true; - itp->M = 111.904821; - itp->nsf = 6.0; - pt_backup.push_back(itp); - // 114-tin - itp = new AtomType(*atp); - itp->symbol = "114-Sn"; - itp->name = "114-Tin"; - itp->isotope = true; - itp->M = 113.902782; - itp->nsf = 6.0; - pt_backup.push_back(itp); - // 115-tin - itp = new AtomType(*atp); - itp->symbol = "115-Sn"; - itp->name = "115-Tin"; - itp->isotope = true; - itp->M = 114.903346; - itp->nsf = 6.0; - pt_backup.push_back(itp); - // 116-tin - itp = new AtomType(*atp); - itp->symbol = "116-Sn"; - itp->name = "116-Tin"; - itp->isotope = true; - itp->M = 115.901744; - itp->nsf = 6.1; - pt_backup.push_back(itp); - // 117-tin - itp = new AtomType(*atp); - itp->symbol = "117-Sn"; - itp->name = "117-Tin"; - itp->isotope = true; - itp->M = 116.902954; - itp->nsf = 6.59; - pt_backup.push_back(itp); - // 118-tin - itp = new AtomType(*atp); - itp->symbol = "118-Sn"; - itp->name = "118-Tin"; - itp->isotope = true; - itp->M = 117.901606; - itp->nsf = 6.23; - pt_backup.push_back(itp); - // 119-tin - itp = new AtomType(*atp); - itp->symbol = "119-Sn"; - itp->name = "119-Tin"; - itp->isotope = true; - itp->M = 118.903309; - itp->nsf = 6.28; - pt_backup.push_back(itp); - // 120-tin - itp = new AtomType(*atp); - itp->symbol = "120-Sn"; - itp->name = "120-Tin"; - itp->isotope = true; - itp->M = 119.9021966; - itp->nsf = 6.67; - pt_backup.push_back(itp); - // 122-tin - itp = new AtomType(*atp); - itp->symbol = "122-Sn"; - itp->name = "122-Tin"; - itp->isotope = true; - itp->M = 121.9034401; - itp->nsf = 5.93; - pt_backup.push_back(itp); - // 124-tin - itp = new AtomType(*atp); - itp->symbol = "124-Sn"; - itp->name = "124-Tin"; - itp->isotope = true; - itp->M = 123.9052746; - itp->nsf = 6.15; - pt_backup.push_back(itp); - } - // antimony - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Sb"; - atp->name = "Antimony"; - atp->z = 51; - atp->M = 121.7601; - atp->radius = 1.4000; - atp->xsf = 51.0; - atp->nsf = 5.573; - // isotopes - // 121-antimony - itp = new AtomType(*atp); - itp->symbol = "121-Sb"; - itp->name = "121-Antimony"; - itp->isotope = true; - itp->M = 120.9038180; - itp->nsf = 5.71; - pt_backup.push_back(itp); - // 123-antimony - itp = new AtomType(*atp); - itp->symbol = "123-Sb"; - itp->name = "123-Antimony"; - itp->isotope = true; - itp->M = 122.9042157; - itp->nsf = 5.38; - pt_backup.push_back(itp); - } - // tellurium - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Te"; - atp->name = "Tellurium"; - atp->z = 52; - atp->M = 127.603; - atp->radius = 1.3600; - atp->xsf = 52.0; - atp->nsf = 5.682; - // isotopes - // 120-tellurium - itp = new AtomType(*atp); - itp->symbol = "120-Te"; - itp->name = "120-Tellurium"; - itp->isotope = true; - itp->M = 119.904020; - itp->nsf = 5.3; - pt_backup.push_back(itp); - // 122-tellurium - itp = new AtomType(*atp); - itp->symbol = "122-Te"; - itp->name = "122-Tellurium"; - itp->isotope = true; - itp->M = 121.9030471; - itp->nsf = 3.8; - pt_backup.push_back(itp); - // 123-tellurium - itp = new AtomType(*atp); - itp->symbol = "123-Te"; - itp->name = "123-Tellurium"; - itp->isotope = true; - itp->M = 122.9042730; - itp->nsf = -0.05; - pt_backup.push_back(itp); - // 124-tellurium - itp = new AtomType(*atp); - itp->symbol = "124-Te"; - itp->name = "124-Tellurium"; - itp->isotope = true; - itp->M = 123.9028195; - itp->nsf = 7.95; - pt_backup.push_back(itp); - // 125-tellurium - itp = new AtomType(*atp); - itp->symbol = "125-Te"; - itp->name = "125-Tellurium"; - itp->isotope = true; - itp->M = 124.9044247; - itp->nsf = 5.01; - pt_backup.push_back(itp); - // 126-tellurium - itp = new AtomType(*atp); - itp->symbol = "126-Te"; - itp->name = "126-Tellurium"; - itp->isotope = true; - itp->M = 125.9033055; - itp->nsf = 5.55; - pt_backup.push_back(itp); - // 128-tellurium - itp = new AtomType(*atp); - itp->symbol = "128-Te"; - itp->name = "128-Tellurium"; - itp->isotope = true; - itp->M = 127.9044614; - itp->nsf = 5.88; - pt_backup.push_back(itp); - // 130-tellurium - itp = new AtomType(*atp); - itp->symbol = "130-Te"; - itp->name = "130-Tellurium"; - itp->isotope = true; - itp->M = 129.9062228; - itp->nsf = 6.01; - pt_backup.push_back(itp); - } - // iodine - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "I"; - atp->name = "Iodine"; - atp->z = 53; - atp->M = 126.904473; - atp->radius = 1.3300; - atp->xsf = 53.0; - atp->nsf = 5.282; - } - // xenon - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Xe"; - atp->name = "Xenon"; - atp->z = 54; - atp->M = 131.2936; - atp->radius = 2.2000; - atp->xsf = 54.0; - atp->nsf = 4.694; - } - // cesium - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Cs"; - atp->name = "Cesium"; - atp->z = 55; - atp->M = 132.905452; - atp->radius = 2.6325; - atp->xsf = 55.0; - atp->nsf = 5.422; - } - // barium - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Ba"; - atp->name = "Barium"; - atp->z = 56; - atp->M = 137.3277; - atp->radius = 2.1705; - atp->xsf = 56.0; - atp->nsf = 5.073; - // isotopes - // 130-barium - itp = new AtomType(*atp); - itp->symbol = "130-Ba"; - itp->name = "130-Barium"; - itp->isotope = true; - itp->M = 129.906310; - itp->nsf = -3.6; - pt_backup.push_back(itp); - // 132-barium - itp = new AtomType(*atp); - itp->symbol = "132-Ba"; - itp->name = "132-Barium"; - itp->isotope = true; - itp->M = 131.905056; - itp->nsf = 7.8; - pt_backup.push_back(itp); - // 134-barium - itp = new AtomType(*atp); - itp->symbol = "134-Ba"; - itp->name = "134-Barium"; - itp->isotope = true; - itp->M = 133.904503; - itp->nsf = 5.7; - pt_backup.push_back(itp); - // 135-barium - itp = new AtomType(*atp); - itp->symbol = "135-Ba"; - itp->name = "135-Barium"; - itp->isotope = true; - itp->M = 134.905683; - itp->nsf = 4.66; - pt_backup.push_back(itp); - // 136-barium - itp = new AtomType(*atp); - itp->symbol = "136-Ba"; - itp->name = "136-Barium"; - itp->isotope = true; - itp->M = 135.904570; - itp->nsf = 4.90; - pt_backup.push_back(itp); - // 137-barium - itp = new AtomType(*atp); - itp->symbol = "137-Ba"; - itp->name = "137-Barium"; - itp->isotope = true; - itp->M = 136.905821; - itp->nsf = 6.82; - pt_backup.push_back(itp); - // 138-barium - itp = new AtomType(*atp); - itp->symbol = "138-Ba"; - itp->name = "138-Barium"; - itp->isotope = true; - itp->M = 137.905241; - itp->nsf = 4.83; - pt_backup.push_back(itp); - } - // lanthanum - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "La"; - atp->name = "Lanthanum"; - atp->z = 57; - atp->M = 138.90552; - atp->radius = 1.8725; - atp->xsf = 57.0; - atp->nsf = 8.244; - // isotopes - // 138-lanthanum - itp = new AtomType(*atp); - itp->symbol = "138-La"; - itp->name = "138-Lanthanum"; - itp->isotope = true; - itp->M = 137.907107; - itp->nsf = 8.0; - pt_backup.push_back(itp); - // 139-lanthanum - itp = new AtomType(*atp); - itp->symbol = "139-La"; - itp->name = "139-Lanthanum"; - itp->isotope = true; - itp->M = 138.906348; - itp->nsf = 8.24; - pt_backup.push_back(itp); - } - // cerium - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Ce"; - atp->name = "Cerium"; - atp->z = 58; - atp->M = 140.1161; - atp->radius = 1.8243; - atp->xsf = 58.0; - atp->nsf = 4.842; - // isotopes - // 136-cerium - itp = new AtomType(*atp); - itp->symbol = "136-Ce"; - itp->name = "136-Cerium"; - itp->isotope = true; - itp->M = 135.907140; - itp->nsf = 5.76; - pt_backup.push_back(itp); - // 138-cerium - itp = new AtomType(*atp); - itp->symbol = "138-Ce"; - itp->name = "138-Cerium"; - itp->isotope = true; - itp->M = 137.905986; - itp->nsf = 6.65; - pt_backup.push_back(itp); - // 140-cerium - itp = new AtomType(*atp); - itp->symbol = "140-Ce"; - itp->name = "140-Cerium"; - itp->isotope = true; - itp->M = 139.905434; - itp->nsf = 4.81; - pt_backup.push_back(itp); - // 142-cerium - itp = new AtomType(*atp); - itp->symbol = "142-Ce"; - itp->name = "142-Cerium"; - itp->isotope = true; - itp->M = 141.909240; - itp->nsf = 4.72; - pt_backup.push_back(itp); - } - // praseodymium - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Pr"; - atp->name = "Praseodymium"; - atp->z = 59; - atp->M = 140.907652; - atp->radius = 1.8362; - atp->xsf = 59.0; - atp->nsf = 4.585; - } - // neodymium - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Nd"; - atp->name = "Neodymium"; - atp->z = 60; - atp->M = 144.243; - atp->radius = 1.8295; - atp->xsf = 60.0; - atp->nsf = 7.695; - // isotopes - // 142-neodymium - itp = new AtomType(*atp); - itp->symbol = "142-Nd"; - itp->name = "142-Neodymium"; - itp->isotope = true; - itp->M = 141.907719; - itp->nsf = 7.7; - pt_backup.push_back(itp); - // 143-neodymium - itp = new AtomType(*atp); - itp->symbol = "143-Nd"; - itp->name = "143-Neodymium"; - itp->isotope = true; - itp->M = 142.909810; - itp->nsf = 14.0; - pt_backup.push_back(itp); - // 144-neodymium - itp = new AtomType(*atp); - itp->symbol = "144-Nd"; - itp->name = "144-Neodymium"; - itp->isotope = true; - itp->M = 143.910083; - itp->nsf = 2.8; - pt_backup.push_back(itp); - // 145-neodymium - itp = new AtomType(*atp); - itp->symbol = "145-Nd"; - itp->name = "145-Neodymium"; - itp->isotope = true; - itp->M = 144.912569; - itp->nsf = 14.0; - pt_backup.push_back(itp); - // 146-neodymium - itp = new AtomType(*atp); - itp->symbol = "146-Nd"; - itp->name = "146-Neodymium"; - itp->isotope = true; - itp->M = 145.913112; - itp->nsf = 8.7; - pt_backup.push_back(itp); - // 148-neodymium - itp = new AtomType(*atp); - itp->symbol = "148-Nd"; - itp->name = "148-Neodymium"; - itp->isotope = true; - itp->M = 147.916889; - itp->nsf = 5.7; - pt_backup.push_back(itp); - // 150-neodymium - itp = new AtomType(*atp); - itp->symbol = "150-Nd"; - itp->name = "150-Neodymium"; - itp->isotope = true; - itp->M = 149.920887; - itp->nsf = 5.28; - pt_backup.push_back(itp); - } - // promethium - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Pm"; - atp->name = "Promethium"; - atp->z = 61; - atp->M = 145.0; - atp->radius = 1.8090; - atp->xsf = 61.0; - atp->nsf = 12.64; - } - // samarium - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Sm"; - atp->name = "Samarium"; - atp->z = 62; - atp->M = 150.363; - atp->radius = 1.8040; - atp->xsf = 62.0; - atp->nsf = 0.005; - // isotopes - // 144-samarium - itp = new AtomType(*atp); - itp->symbol = "144-Sm"; - itp->name = "144-Samarium"; - itp->isotope = true; - itp->M = 143.911995; - itp->nsf = -3.0; - pt_backup.push_back(itp); - // 147-samarium - itp = new AtomType(*atp); - itp->symbol = "147-Sm"; - itp->name = "147-Samarium"; - itp->isotope = true; - itp->M = 146.914893; - itp->nsf = 14.0; - pt_backup.push_back(itp); - // 148-samarium - itp = new AtomType(*atp); - itp->symbol = "148-Sm"; - itp->name = "148-Samarium"; - itp->isotope = true; - itp->M = 147.914818; - itp->nsf = -3.0; - pt_backup.push_back(itp); - // 149-samarium - itp = new AtomType(*atp); - itp->symbol = "149-Sm"; - itp->name = "149-Samarium"; - itp->isotope = true; - itp->M = 148.917180; - itp->nsf = 18.7; - pt_backup.push_back(itp); - // 150-samarium - itp = new AtomType(*atp); - itp->symbol = "150-Sm"; - itp->name = "150-Samarium"; - itp->isotope = true; - itp->M = 149.917271; - itp->nsf = 14.0; - pt_backup.push_back(itp); - // 152-samarium - itp = new AtomType(*atp); - itp->symbol = "152-Sm"; - itp->name = "152-Samarium"; - itp->isotope = true; - itp->M = 151.919728; - itp->nsf = -5.0; - pt_backup.push_back(itp); - // 154-samarium - itp = new AtomType(*atp); - itp->symbol = "154-Sm"; - itp->name = "154-Samarium"; - itp->isotope = true; - itp->M = 153.922205; - itp->nsf = 8.0; - pt_backup.push_back(itp); - } - // europium - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Eu"; - atp->name = "Europium"; - atp->z = 63; - atp->M = 151.9641; - atp->radius = 1.9840; - atp->xsf = 63.0; - atp->nsf = 5.33; - // isotopes - // 153-europium - itp = new AtomType(*atp); - itp->symbol = "153-Eu"; - itp->name = "153-Europium"; - itp->isotope = true; - itp->M = 152.921226; - itp->nsf = 8.22; - pt_backup.push_back(itp); - } - // gadolinium - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Gd"; - atp->name = "Gadolinium"; - atp->z = 64; - atp->M = 157.253; - atp->radius = 1.8180; - atp->xsf = 64.0; - atp->nsf = 9.52; - // isotopes - // 152-gadolinium - itp = new AtomType(*atp); - itp->symbol = "152-Gd"; - itp->name = "152-Gadolinium"; - itp->isotope = true; - itp->M = 151.919788; - itp->nsf = 10.0; - pt_backup.push_back(itp); - // 154-gadolinium - itp = new AtomType(*atp); - itp->symbol = "154-Gd"; - itp->name = "154-Gadolinium"; - itp->isotope = true; - itp->M = 153.920862; - itp->nsf = 10.0; - pt_backup.push_back(itp); - // 155-gadolinium - itp = new AtomType(*atp); - itp->symbol = "155-Gd"; - itp->name = "155-Gadolinium"; - itp->isotope = true; - itp->M = 154.922619; - itp->nsf = 13.8; - pt_backup.push_back(itp); - // 156-gadolinium - itp = new AtomType(*atp); - itp->symbol = "156-Gd"; - itp->name = "156-Gadolinium"; - itp->isotope = true; - itp->M = 155.922120; - itp->nsf = 6.3; - pt_backup.push_back(itp); - // 157-gadolinium - itp = new AtomType(*atp); - itp->symbol = "157-Gd"; - itp->name = "157-Gadolinium"; - itp->isotope = true; - itp->M = 156.923957; - itp->nsf = 4.0; - pt_backup.push_back(itp); - // 158-gadolinium - itp = new AtomType(*atp); - itp->symbol = "158-Gd"; - itp->name = "158-Gadolinium"; - itp->isotope = true; - itp->M = 157.924101; - itp->nsf = 9.0; - pt_backup.push_back(itp); - // 160-gadolinium - itp = new AtomType(*atp); - itp->symbol = "160-Gd"; - itp->name = "160-Gadolinium"; - itp->isotope = true; - itp->M = 159.927051; - itp->nsf = 9.15; - pt_backup.push_back(itp); - } - // terbium - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Tb"; - atp->name = "Terbium"; - atp->z = 65; - atp->M = 158.925342; - atp->radius = 1.8005; - atp->xsf = 65.0; - atp->nsf = 7.342; - } - // dysprosium - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Dy"; - atp->name = "Dysprosium"; - atp->z = 66; - atp->M = 162.5001; - atp->radius = 1.7951; - atp->xsf = 66.0; - atp->nsf = 16.93; - // isotopes - // 156-dysprosium - itp = new AtomType(*atp); - itp->symbol = "156-Dy"; - itp->name = "156-Dysprosium"; - itp->isotope = true; - itp->M = 155.924278; - itp->nsf = 6.1; - pt_backup.push_back(itp); - // 158-dysprosium - itp = new AtomType(*atp); - itp->symbol = "158-Dy"; - itp->name = "158-Dysprosium"; - itp->isotope = true; - itp->M = 157.924405; - itp->nsf = 6.0; - pt_backup.push_back(itp); - // 160-dysprosium - itp = new AtomType(*atp); - itp->symbol = "160-Dy"; - itp->name = "160-Dysprosium"; - itp->isotope = true; - itp->M = 159.925194; - itp->nsf = 6.7; - pt_backup.push_back(itp); - // 161-dysprosium - itp = new AtomType(*atp); - itp->symbol = "161-Dy"; - itp->name = "161-Dysprosium"; - itp->isotope = true; - itp->M = 160.926930; - itp->nsf = 10.3; - pt_backup.push_back(itp); - // 162-dysprosium - itp = new AtomType(*atp); - itp->symbol = "162-Dy"; - itp->name = "162-Dysprosium"; - itp->isotope = true; - itp->M = 161.926795; - itp->nsf = -1.4; - pt_backup.push_back(itp); - // 163-dysprosium - itp = new AtomType(*atp); - itp->symbol = "163-Dy"; - itp->name = "163-Dysprosium"; - itp->isotope = true; - itp->M = 162.928728; - itp->nsf = 5.0; - pt_backup.push_back(itp); - // 164-dysprosium - itp = new AtomType(*atp); - itp->symbol = "164-Dy"; - itp->name = "164-Dysprosium"; - itp->isotope = true; - itp->M = 163.929171; - itp->nsf = 49.4; - pt_backup.push_back(itp); - } - // holmium - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Ho"; - atp->name = "Holmium"; - atp->z = 67; - atp->M = 164.930322; - atp->radius = 1.7886; - atp->xsf = 67.0; - atp->nsf = 8.443; - } - // erbium - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Er"; - atp->name = "Erbium"; - atp->z = 68; - atp->M = 167.2593; - atp->radius = 1.7794; - atp->xsf = 68.0; - atp->nsf = 7.792; - // isotopes - // 162-erbium - itp = new AtomType(*atp); - itp->symbol = "162-Er"; - itp->name = "162-Erbium"; - itp->isotope = true; - itp->M = 161.928775; - itp->nsf = 9.01; - pt_backup.push_back(itp); - // 164-erbium - itp = new AtomType(*atp); - itp->symbol = "164-Er"; - itp->name = "164-Erbium"; - itp->isotope = true; - itp->M = 163.929197; - itp->nsf = 7.95; - pt_backup.push_back(itp); - // 166-erbium - itp = new AtomType(*atp); - itp->symbol = "166-Er"; - itp->name = "166-Erbium"; - itp->isotope = true; - itp->M = 165.930290; - itp->nsf = 10.51; - pt_backup.push_back(itp); - // 167-erbium - itp = new AtomType(*atp); - itp->symbol = "167-Er"; - itp->name = "167-Erbium"; - itp->isotope = true; - itp->M = 166.932045; - itp->nsf = 3.06; - pt_backup.push_back(itp); - // 168-erbium - itp = new AtomType(*atp); - itp->symbol = "168-Er"; - itp->name = "168-Erbium"; - itp->isotope = true; - itp->M = 167.932368; - itp->nsf = 7.43; - pt_backup.push_back(itp); - // 170-erbium - itp = new AtomType(*atp); - itp->symbol = "170-Er"; - itp->name = "170-Erbium"; - itp->isotope = true; - itp->M = 169.935460; - itp->nsf = 9.61; - pt_backup.push_back(itp); - } - // thulium - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Tm"; - atp->name = "Thulium"; - atp->z = 69; - atp->M = 168.934212; - atp->radius = 1.7687; - atp->xsf = 69.0; - atp->nsf = 7.073; - } - // ytterbium - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Yb"; - atp->name = "Ytterbium"; - atp->z = 70; - atp->M = 173.043; - atp->radius = 1.9396; - atp->xsf = 70.0; - atp->nsf = 12.413; - // isotopes - // 168-ytterbium - itp = new AtomType(*atp); - itp->symbol = "168-Yb"; - itp->name = "168-Ytterbium"; - itp->isotope = true; - itp->M = 167.933894; - itp->nsf = -4.07; - pt_backup.push_back(itp); - // 170-ytterbium - itp = new AtomType(*atp); - itp->symbol = "170-Yb"; - itp->name = "170-Ytterbium"; - itp->isotope = true; - itp->M = 169.934759; - itp->nsf = 6.8; - pt_backup.push_back(itp); - // 171-ytterbium - itp = new AtomType(*atp); - itp->symbol = "171-Yb"; - itp->name = "171-Ytterbium"; - itp->isotope = true; - itp->M = 170.936322; - itp->nsf = 9.7; - pt_backup.push_back(itp); - // 172-ytterbium - itp = new AtomType(*atp); - itp->symbol = "172-Yb"; - itp->name = "172-Ytterbium"; - itp->isotope = true; - itp->M = 171.9363777; - itp->nsf = 9.5; - pt_backup.push_back(itp); - // 173-ytterbium - itp = new AtomType(*atp); - itp->symbol = "173-Yb"; - itp->name = "173-Ytterbium"; - itp->isotope = true; - itp->M = 172.9382068; - itp->nsf = 9.56; - pt_backup.push_back(itp); - // 174-ytterbium - itp = new AtomType(*atp); - itp->symbol = "174-Yb"; - itp->name = "174-Ytterbium"; - itp->isotope = true; - itp->M = 173.9388581; - itp->nsf = 19.2; - pt_backup.push_back(itp); - // 176-ytterbium - itp = new AtomType(*atp); - itp->symbol = "176-Yb"; - itp->name = "176-Ytterbium"; - itp->isotope = true; - itp->M = 175.942568; - itp->nsf = 8.7; - pt_backup.push_back(itp); - } - // lutetium - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Lu"; - atp->name = "Lutetium"; - atp->z = 71; - atp->M = 174.9671; - atp->radius = 1.7515; - atp->xsf = 71.0; - atp->nsf = 7.213; - // isotopes - // 175-lutetium - itp = new AtomType(*atp); - itp->symbol = "175-Lu"; - itp->name = "175-Lutetium"; - itp->isotope = true; - itp->M = 174.9407679; - itp->nsf = 7.28; - pt_backup.push_back(itp); - // 176-lutetium - itp = new AtomType(*atp); - itp->symbol = "176-Lu"; - itp->name = "176-Lutetium"; - itp->isotope = true; - itp->M = 175.9426824; - itp->nsf = 6.1; - pt_backup.push_back(itp); - } - // hafnium - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Hf"; - atp->name = "Hafnium"; - atp->z = 72; - atp->M = 178.492; - atp->radius = 1.5973; - atp->xsf = 72.0; - atp->nsf = 7.7714; - // isotopes - // 174-hafnium - itp = new AtomType(*atp); - itp->symbol = "174-Hf"; - itp->name = "174-Hafnium"; - itp->isotope = true; - itp->M = 173.940040; - itp->nsf = 10.9; - pt_backup.push_back(itp); - // 176-hafnium - itp = new AtomType(*atp); - itp->symbol = "176-Hf"; - itp->name = "176-Hafnium"; - itp->isotope = true; - itp->M = 175.9414018; - itp->nsf = 6.61; - pt_backup.push_back(itp); - // 177-hafnium - itp = new AtomType(*atp); - itp->symbol = "177-Hf"; - itp->name = "177-Hafnium"; - itp->isotope = true; - itp->M = 176.9432200; - itp->nsf = 0.8; - pt_backup.push_back(itp); - // 178-hafnium - itp = new AtomType(*atp); - itp->symbol = "178-Hf"; - itp->name = "178-Hafnium"; - itp->isotope = true; - itp->M = 177.9436977; - itp->nsf = 5.9; - pt_backup.push_back(itp); - // 179-hafnium - itp = new AtomType(*atp); - itp->symbol = "179-Hf"; - itp->name = "179-Hafnium"; - itp->isotope = true; - itp->M = 178.9458151; - itp->nsf = 7.46; - pt_backup.push_back(itp); - // 180-hafnium - itp = new AtomType(*atp); - itp->symbol = "180-Hf"; - itp->name = "180-Hafnium"; - itp->isotope = true; - itp->M = 179.9465488; - itp->nsf = 13.2; - pt_backup.push_back(itp); - } - // tantalum - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Ta"; - atp->name = "Tantalum"; - atp->z = 73; - atp->M = 180.94791; - atp->radius = 1.4280; - atp->xsf = 73.0; - atp->nsf = 6.917; - // isotopes - // 180-tantalum - itp = new AtomType(*atp); - itp->symbol = "180-Ta"; - itp->name = "180-Tantalum"; - itp->isotope = true; - itp->M = 179.947466; - itp->nsf = 7.0; - pt_backup.push_back(itp); - // 181-tantalum - itp = new AtomType(*atp); - itp->symbol = "181-Ta"; - itp->name = "181-Tantalum"; - itp->isotope = true; - itp->M = 180.947996; - itp->nsf = 6.91; - pt_backup.push_back(itp); - } - // tungsten - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "W"; - atp->name = "Tungsten"; - atp->z = 74; - atp->M = 183.841; - atp->radius = 1.3705; - atp->xsf = 74.0; - atp->nsf = 4.75518; - // isotopes - // 180-tungsten - itp = new AtomType(*atp); - itp->symbol = "180-W"; - itp->name = "180-Tungsten"; - itp->isotope = true; - itp->M = 179.946706; - itp->nsf = 5.0; - pt_backup.push_back(itp); - // 182-tungsten - itp = new AtomType(*atp); - itp->symbol = "182-W"; - itp->name = "182-Tungsten"; - itp->isotope = true; - itp->M = 181.948206; - itp->nsf = 7.04; - pt_backup.push_back(itp); - // 183-tungsten - itp = new AtomType(*atp); - itp->symbol = "183-W"; - itp->name = "183-Tungsten"; - itp->isotope = true; - itp->M = 182.9502245; - itp->nsf = 6.59; - pt_backup.push_back(itp); - // 184-tungsten - itp = new AtomType(*atp); - itp->symbol = "184-W"; - itp->name = "184-Tungsten"; - itp->isotope = true; - itp->M = 183.9509326; - itp->nsf = 7.55; - pt_backup.push_back(itp); - // 186-tungsten - itp = new AtomType(*atp); - itp->symbol = "186-W"; - itp->name = "186-Tungsten"; - itp->isotope = true; - itp->M = 185.954362; - itp->nsf = -0.73; - pt_backup.push_back(itp); - } - // rhenium - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Re"; - atp->name = "Rhenium"; - atp->z = 75; - atp->M = 186.2071; - atp->radius = 1.3800; - atp->xsf = 75.0; - atp->nsf = 9.22; - // isotopes - // 185-rhenium - itp = new AtomType(*atp); - itp->symbol = "185-Re"; - itp->name = "185-Rhenium"; - itp->isotope = true; - itp->M = 184.9529557; - itp->nsf = 9.0; - pt_backup.push_back(itp); - // 187-rhenium - itp = new AtomType(*atp); - itp->symbol = "187-Re"; - itp->name = "187-Rhenium"; - itp->isotope = true; - itp->M = 186.9557508; - itp->nsf = 9.3; - pt_backup.push_back(itp); - } - // osmium - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Os"; - atp->name = "Osmium"; - atp->z = 76; - atp->M = 190.233; - atp->radius = 1.3676; - atp->xsf = 76.0; - atp->nsf = 10.72; - // isotopes - // 184-osmium - itp = new AtomType(*atp); - itp->symbol = "184-Os"; - itp->name = "184-Osmium"; - itp->isotope = true; - itp->M = 183.952491; - itp->nsf = 10.0; - pt_backup.push_back(itp); - // 186-osmium - itp = new AtomType(*atp); - itp->symbol = "186-Os"; - itp->name = "186-Osmium"; - itp->isotope = true; - itp->M = 185.953838; - itp->nsf = 12.0; - pt_backup.push_back(itp); - // 187-osmium - itp = new AtomType(*atp); - itp->symbol = "187-Os"; - itp->name = "187-Osmium"; - itp->isotope = true; - itp->M = 186.9557479; - itp->nsf = 10.0; - pt_backup.push_back(itp); - // 188-osmium - itp = new AtomType(*atp); - itp->symbol = "188-Os"; - itp->name = "188-Osmium"; - itp->isotope = true; - itp->M = 187.9558360; - itp->nsf = 7.8; - pt_backup.push_back(itp); - // 189-osmium - itp = new AtomType(*atp); - itp->symbol = "189-Os"; - itp->name = "189-Osmium"; - itp->isotope = true; - itp->M = 188.9581449; - itp->nsf = 11.0; - pt_backup.push_back(itp); - // 190-osmium - itp = new AtomType(*atp); - itp->symbol = "190-Os"; - itp->name = "190-Osmium"; - itp->isotope = true; - itp->M = 189.958445; - itp->nsf = 11.4; - pt_backup.push_back(itp); - // 192-osmium - itp = new AtomType(*atp); - itp->symbol = "192-Os"; - itp->name = "192-Osmium"; - itp->isotope = true; - itp->M = 191.961479; - itp->nsf = 11.9; - pt_backup.push_back(itp); - } - // iridium - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Ir"; - atp->name = "Iridium"; - atp->z = 77; - atp->M = 192.2173; - atp->radius = 1.3573; - atp->xsf = 77.0; - atp->nsf = 10.63; - } - // platinum - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Pt"; - atp->name = "Platinum"; - atp->z = 78; - atp->M = 195.0782; - atp->radius = 1.3873; - atp->xsf = 78.0; - atp->nsf = 9.601; - // isotopes - // 190-platinum - itp = new AtomType(*atp); - itp->symbol = "190-Pt"; - itp->name = "190-Platinum"; - itp->isotope = true; - itp->M = 189.959930; - itp->nsf = 9.0; - pt_backup.push_back(itp); - // 192-platinum - itp = new AtomType(*atp); - itp->symbol = "192-Pt"; - itp->name = "192-Platinum"; - itp->isotope = true; - itp->M = 191.961035; - itp->nsf = 9.9; - pt_backup.push_back(itp); - // 194-platinum - itp = new AtomType(*atp); - itp->symbol = "194-Pt"; - itp->name = "194-Platinum"; - itp->isotope = true; - itp->M = 193.962664; - itp->nsf = 10.55; - pt_backup.push_back(itp); - // 195-platinum - itp = new AtomType(*atp); - itp->symbol = "195-Pt"; - itp->name = "195-Platinum"; - itp->isotope = true; - itp->M = 194.964774; - itp->nsf = 8.91; - pt_backup.push_back(itp); - // 196-platinum - itp = new AtomType(*atp); - itp->symbol = "196-Pt"; - itp->name = "196-Platinum"; - itp->isotope = true; - itp->M = 195.964935; - itp->nsf = 9.89; - pt_backup.push_back(itp); - // 198-platinum - itp = new AtomType(*atp); - itp->symbol = "198-Pt"; - itp->name = "198-Platinum"; - itp->isotope = true; - itp->M = 197.967876; - itp->nsf = 7.8; - pt_backup.push_back(itp); - } - // gold - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Au"; - atp->name = "Gold"; - atp->z = 79; - atp->M = 196.966552; - atp->radius = 1.4419; - atp->xsf = 79.0; - atp->nsf = 7.907; - } - // mercury - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Hg"; - atp->name = "Mercury"; - atp->z = 80; - atp->M = 200.592; - atp->radius = 1.5025; - atp->xsf = 80.0; - atp->nsf = 12.59545; - // isotopes - // 196-mercury - itp = new AtomType(*atp); - itp->symbol = "196-Hg"; - itp->name = "196-Mercury"; - itp->isotope = true; - itp->M = 195.965815; - itp->nsf = 30.3; - pt_backup.push_back(itp); - // 199-mercury - itp = new AtomType(*atp); - itp->symbol = "199-Hg"; - itp->name = "199-Mercury"; - itp->isotope = true; - itp->M = 198.968262; - itp->nsf = 16.9; - pt_backup.push_back(itp); - // 202-mercury - itp = new AtomType(*atp); - itp->symbol = "202-Hg"; - itp->name = "202-Mercury"; - itp->isotope = true; - itp->M = 201.970626; - itp->nsf = 11.002; - pt_backup.push_back(itp); - } - // thallium - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Tl"; - atp->name = "Thallium"; - atp->z = 81; - atp->M = 204.38332; - atp->radius = 1.7283; - atp->xsf = 81.0; - atp->nsf = 8.7765; - // isotopes - // 203-thalium - itp = new AtomType(*atp); - itp->symbol = "203-Tl"; - itp->name = "203-Thallium"; - itp->isotope = true; - itp->M = 202.972329; - itp->nsf = 8.51; - pt_backup.push_back(itp); - // 205-thalium - itp = new AtomType(*atp); - itp->symbol = "205-Tl"; - itp->name = "205-Thallium"; - itp->isotope = true; - itp->M = 204.974412; - itp->nsf = 8.87; - pt_backup.push_back(itp); - } - // lead - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Pb"; - atp->name = "Lead"; - atp->z = 82; - atp->M = 207.21; - atp->radius = 1.7501; - atp->xsf = 82.0; - atp->nsf = 9.4012; - // isotopes - // 204-lead - itp = new AtomType(*atp); - itp->symbol = "204-Pb"; - itp->name = "204-Lead"; - itp->isotope = true; - itp->M = 203.973029; - itp->nsf = 10.893; - pt_backup.push_back(itp); - // 206-lead - itp = new AtomType(*atp); - itp->symbol = "206-Pb"; - itp->name = "206-Lead"; - itp->isotope = true; - itp->M = 205.974449; - itp->nsf = 9.2221; - pt_backup.push_back(itp); - // 207-lead - itp = new AtomType(*atp); - itp->symbol = "207-Pb"; - itp->name = "207-Lead"; - itp->isotope = true; - itp->M = 206.975881; - itp->nsf = 9.286; - pt_backup.push_back(itp); - // 208-lead - itp = new AtomType(*atp); - itp->symbol = "208-Pb"; - itp->name = "208-Lead"; - itp->isotope = true; - itp->M = 207.976636; - itp->nsf = 9.494; - pt_backup.push_back(itp); - } - // bismuth - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Bi"; - atp->name = "Bismuth"; - atp->z = 83; - atp->M = 208.980382; - atp->radius = 1.4600; - atp->xsf = 83.0; - atp->nsf = 8.5322; - } - // polonium - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Po"; - atp->name = "Polonium"; - atp->z = 84; - atp->M = 209.0; - atp->radius = 1.4600; - atp->xsf = 84.0; - atp->nsf = 0.0; - } - // astatine - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "At"; - atp->name = "Astatine"; - atp->z = 85; - atp->M = 210.0; - atp->radius = 1.4500; - atp->xsf = 85.0; - atp->nsf = 0.0; - } - // radon - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Rn"; - atp->name = "Radon"; - atp->z = 86; - atp->M = 222.0; - atp->radius = 1.4300; - atp->xsf = 86.0; - atp->nsf = 0.0; - } - // francium - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Fr"; - atp->name = "Francium"; - atp->z = 87; - atp->M = 223.0; - atp->radius = 2.5000; - atp->xsf = 87.0; - atp->nsf = 0.0; - } - // radium - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Ra"; - atp->name = "Radium"; - atp->z = 88; - atp->M = 226.0; - atp->radius = 2.1400; - atp->xsf = 88.0; - atp->nsf = 10.0; - } - // actinium - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Ac"; - atp->name = "Actinium"; - atp->z = 89; - atp->M = 227.0; - atp->radius = 1.8775; - atp->xsf = 89.0; - atp->nsf = 0.0; - } - // thorium - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Th"; - atp->name = "Thorium"; - atp->z = 90; - atp->M = 232.03811; - atp->radius = 1.7975; - atp->xsf = 90.0; - atp->nsf = 10.31; - } - // protactinium - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Pa"; - atp->name = "Protactinium"; - atp->z = 91; - atp->M = 231.035882; - atp->radius = 1.6086; - atp->xsf = 91.0; - atp->nsf = 9.13; - } - // uranium - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "U"; - atp->name = "Uranium"; - atp->z = 92; - atp->M = 238.028913; - atp->radius = 1.5683; - atp->xsf = 92.0; - atp->nsf = 8.417; - // isotopes - // 233-uranium - itp = new AtomType(*atp); - itp->symbol = "233-U"; - itp->name = "233-Uranium"; - itp->isotope = true; - itp->M = 233.039628; - itp->nsf = 10.1; - pt_backup.push_back(itp); - // 234-uranium - itp = new AtomType(*atp); - itp->symbol = "234-U"; - itp->name = "234-Uranium"; - itp->isotope = true; - itp->M = 234.0409456; - itp->nsf = 12.4; - pt_backup.push_back(itp); - // 235-uranium - itp = new AtomType(*atp); - itp->symbol = "235-U"; - itp->name = "235-Uranium"; - itp->isotope = true; - itp->M = 235.0439231; - itp->nsf = 10.50; - pt_backup.push_back(itp); - // 238-uranium - itp = new AtomType(*atp); - itp->symbol = "238-U"; - itp->name = "238-Uranium"; - itp->isotope = true; - itp->M = 238.0507826; - itp->nsf = 8.407; - pt_backup.push_back(itp); - } - // neptunium - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Np"; - atp->name = "Neptunium"; - atp->z = 93; - atp->M = 237.0; - atp->radius = 1.0000; - atp->xsf = 93.0; - atp->nsf = 10.55; - } - // plutonium - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Pu"; - atp->name = "Plutonium"; - atp->z = 94; - atp->M = 244.0; - atp->radius = 1.0000; - atp->xsf = 94.0; - atp->nsf = 7.71; - // isotopes - // 240-plutonium - itp = new AtomType(*atp); - itp->symbol = "240-Pu"; - itp->name = "240-Plutonium"; - itp->isotope = true; - itp->M = 240.0538075; - itp->nsf = 3.5; - pt_backup.push_back(itp); - // 242-plutonium - itp = new AtomType(*atp); - itp->symbol = "242-Pu"; - itp->name = "242-Plutonium"; - itp->isotope = true; - itp->M = 242.0587368; - itp->nsf = 8.1; - pt_backup.push_back(itp); - } - // americium - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Am"; - atp->name = "Americium"; - atp->z = 95; - atp->M = 243.0; - atp->radius = 1.0000; - atp->xsf = 95.0; - atp->nsf = 8.32; - } - // curium - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Cm"; - atp->name = "Curium"; - atp->z = 96; - atp->M = 247.0; - atp->radius = 1.0000; - atp->xsf = 96.0; - atp->nsf = 9.53; - // isotopes - // 246-curium - itp = new AtomType(*atp); - itp->symbol = "246-Cm"; - itp->name = "246-Curium"; - itp->isotope = true; - itp->M = 246.0672176; - itp->nsf = 9.3; - pt_backup.push_back(itp); - // 248-curium - itp = new AtomType(*atp); - itp->symbol = "248-Cm"; - itp->name = "248-Curium"; - itp->isotope = true; - itp->M = 248.072342; - itp->nsf = 7.7; - pt_backup.push_back(itp); - } - // berkelium - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Bk"; - atp->name = "Berkelium"; - atp->z = 97; - atp->M = 247.0; - atp->radius = 1.0000; - atp->xsf = 97.0; - atp->nsf = 0.0; - } - // californium - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Cf"; - atp->name = "Californium"; - atp->z = 98; - atp->M = 251.0; - atp->radius = 1.0000; - atp->xsf = 98.0; - atp->nsf = 0.0; - } - // einsteinium - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Es"; - atp->name = "Einsteinium"; - atp->z = 99; - atp->M = 252.0; - atp->radius = 1.0000; - atp->xsf = 99.0; - atp->nsf = 0.0; - } - // fermium - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Fm"; - atp->name = "Fermium"; - atp->z = 100; - atp->M = 257.0; - atp->radius = 1.0000; - atp->xsf = 100.0; - atp->nsf = 0.0; - } - // mendelevium - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Md"; - atp->name = "Mendelevium"; - atp->z = 101; - atp->M = 258.0; - atp->radius = 1.0000; - atp->xsf = 101.0; - atp->nsf = 0.0; - } - // nobelium - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "No"; - atp->name = "Nobelium"; - atp->z = 102; - atp->M = 259.0; - atp->radius = 1.0000; - atp->xsf = 102.0; - atp->nsf = 0.0; - } - // lawrencium - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Lr"; - atp->name = "Lawrencium"; - atp->z = 103; - atp->M = 262.0; - atp->radius = 1.0000; - atp->xsf = 103.0; - atp->nsf = 0.0; - } - // rutherfordium - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Rf"; - atp->name = "Rutherfordium"; - atp->z = 104; - atp->M = 261.0; - atp->radius = 1.0000; - atp->xsf = 104.0; - atp->nsf = 0.0; - } - // dubnium - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Db"; - atp->name = "Dubnium"; - atp->z = 105; - atp->M = 262.0; - atp->radius = 1.0000; - atp->xsf = 105.0; - atp->nsf = 0.0; - } - // seaborgium - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Sg"; - atp->name = "Seaborgium"; - atp->z = 106; - atp->M = 266.0; - atp->radius = 1.0000; - atp->xsf = 106.0; - atp->nsf = 0.0; - } - // bohrium - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Bh"; - atp->name = "Bohrium"; - atp->z = 107; - atp->M = 264.0; - atp->radius = 1.0000; - atp->xsf = 107.0; - atp->nsf = 0.0; - } - // hassium - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Hs"; - atp->name = "Hassium"; - atp->z = 108; - atp->M = 277.0; - atp->radius = 1.0000; - atp->xsf = 108.0; - atp->nsf = 0.0; - } - // meitnerium - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Mt"; - atp->name = "Meitnerium"; - atp->z = 109; - atp->M = 268.0; - atp->radius = 1.0000; - atp->xsf = 109.0; - atp->nsf = 0.0; - } - // darmstadtium - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Ds"; - atp->name = "Darmstadtium"; - atp->z = 110; - atp->M = 281.0; - atp->radius = 1.0000; - atp->xsf = 110.0; - atp->nsf = 0.0; - } - // roentgenium - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Rg"; - atp->name = "Roentgenium"; - atp->z = 111; - atp->M = 272.0; - atp->radius = 1.0000; - atp->xsf = 111.0; - atp->nsf = 0.0; - } -} - -// End of file diff --git a/libpdffit2/PeriodicTable.h b/libpdffit2/PeriodicTable.h deleted file mode 100644 index 99949031..00000000 --- a/libpdffit2/PeriodicTable.h +++ /dev/null @@ -1,75 +0,0 @@ -/*********************************************************************** -* -* pdffit2 by DANSE Diffraction group -* Simon J. L. Billinge -* (c) 2006 trustees of the Michigan State University -* All rights reserved. -* -* File coded by: Pavol Juhas -* -* See AUTHORS.txt for a list of people who contributed. -* See LICENSE.txt for license information. -* -************************************************************************ -* -* class PeriodicTable -* -* Comments: singleton class, use PeriodicTable::instance() -* for its pointer -* -***********************************************************************/ - -#ifndef PERIODICTABLE_H_INCLUDED -#define PERIODICTABLE_H_INCLUDED - -#include -#include -#include -#include -#include "AtomType.h" -#include "support_msvc9.h" - -// PeriodicTable -class PeriodicTable -{ - private: - - // PeriodicTable is a singleton class - PeriodicTable(); - - public: - - // Access to singleton instance - static PeriodicTable* instance() - { - static std::unique_ptr the_table(new PeriodicTable()); - return the_table.get(); - } - // Destructor - ~PeriodicTable(); - - // Methods - AtomType* name(const std::string& s); - AtomType* symbol(const std::string& s); - AtomType* lookup(std::string s); // icase lookup - bool has(const std::string& s); - void defAtomType(const AtomType& atp); - void deleteAtomType(const AtomType* atp); - void reset(AtomType* atp); // retrieve atp from pt_backup - void resetAll(); // reset all elements - - private: - - // Data Members - std::map name_index; - std::map symbol_index; - std::deque pt_public; - std::deque pt_backup; - - // Methods - void init(); - void clear(); - void fill_pt_backup(); -}; - -#endif // PERIODICTABLE_H_INCLUDED diff --git a/libpdffit2/PointsInSphere.cc b/libpdffit2/PointsInSphere.cc deleted file mode 100644 index 8e51c575..00000000 --- a/libpdffit2/PointsInSphere.cc +++ /dev/null @@ -1,243 +0,0 @@ -/*********************************************************************** -* -* pdffit2 by DANSE Diffraction group -* Simon J. L. Billinge -* (c) 2006 trustees of the Michigan State University -* All rights reserved. -* -* File coded by: Pavol Juhas -* -* See AUTHORS.txt for a list of people who contributed. -* See LICENSE.txt for license information. -* -************************************************************************ -* -* classes PointsInSphere, ReflectionsInQminQmax, ReflectionsInDmaxDmin -* -* Comments: sequencers for lattice points insided 3D sphere -* -***********************************************************************/ - -#include -#include "PointsInSphere.h" - -using namespace NS_POINTSINSPHERE; - -//////////////////////////////////////////////////////////////////////// -// LatticeParameters -//////////////////////////////////////////////////////////////////////// - -LatticeParameters::LatticeParameters( double _a, double _b, double _c, - double _alpha, double _beta, double _gamma ) : - a(_a), b(_b), c(_c), - alpha(_alpha), beta(_beta), gamma(_gamma) -{ - update(); -} - -LatticeParameters& LatticeParameters::update() -{ - ca = cosd(alpha); cb = cosd(beta); cg = cosd(gamma); - sa = sind(alpha); sb = sind(beta); sg = sind(gamma); - // Vunit is a volume of unit cell with a=b=c=1 - const double Vunit = sqrt(1.0 + 2.0*ca*cb*cg - ca*ca - cb*cb - cg*cg); - ar = sa/(a*Vunit); - br = sb/(b*Vunit); - cr = sg/(c*Vunit); - car = (cb*cg - ca)/(sb*sg); sar = sqrt(1.0 - car*car); - cbr = (ca*cg - cb)/(sa*sg); sbr = sqrt(1.0 - cbr*cbr); - cgr = (ca*cb - cg)/(sa*sb); sgr = sqrt(1.0 - cgr*cgr); - alphar = 180.0/M_PI*acos(car); - betar = 180.0/M_PI*acos(cbr); - gammar = 180.0/M_PI*acos(cgr); - return *this; -} - -LatticeParameters LatticeParameters::reciprocal() const -{ - using namespace std; - LatticeParameters rec(*this); - swap(rec.a, rec.ar); - swap(rec.b, rec.br); - swap(rec.c, rec.cr); - swap(rec.alpha, rec.alphar); - swap(rec.beta, rec.betar); - swap(rec.gamma, rec.gammar); - swap(rec.ca, rec.car); - swap(rec.cb, rec.cbr); - swap(rec.cg, rec.cgr); - swap(rec.sa, rec.sar); - swap(rec.sb, rec.sbr); - swap(rec.sg, rec.sgr); - return rec; -} - - -//////////////////////////////////////////////////////////////////////// -// PointsInSphere -//////////////////////////////////////////////////////////////////////// - -PointsInSphere::PointsInSphere( double _Rmin, double _Rmax, - const LatticeParameters& _latpar ) : - m(mno[0]), n(mno[1]), o(mno[2]), - Rmin(_Rmin), Rmax(_Rmax), latpar(_latpar) -{ - init(); - rewind(); -} - -PointsInSphere::PointsInSphere( double _Rmin, double _Rmax, - double _a, double _b, double _c, - double _alpha, double _beta, double _gamma ) : - m(mno[0]), n(mno[1]), o(mno[2]), - Rmin(_Rmin), Rmax(_Rmax), - latpar(_a, _b, _c, _alpha, _beta, _gamma) -{ - init(); - rewind(); -} - -void PointsInSphere::init() -{ - RminSquare = (Rmin < 0.0) ? -(Rmin*Rmin) : Rmin*Rmin; - RmaxSquare = (Rmax < 0.0) ? -(Rmax*Rmax) : Rmax*Rmax; - dn0dm = latpar.cgr*latpar.br/latpar.ar; - do0dm = latpar.cbr*latpar.cr/latpar.ar; - // 2D reciprocal parameters in bc plane - b2r = 1.0/(latpar.b*latpar.sa); - c2r = 1.0/(latpar.c*latpar.sa); - ca2r = -latpar.ca; - do0dn = ca2r*c2r/b2r; - // 1D reciprocal along c axis - c1r = 1.0/latpar.c; -} - -void PointsInSphere::rewind() -{ - mHalfSpan = Rmax*latpar.ar; - hi_m = int(ceil(mHalfSpan)); - m = -hi_m; - // make indices n, o invalid, reset the neares point - n = hi_n = 0; - o = hi_o = outside_o = 0; - n0plane = o0plane = o0line = 0.0; - // unset excluded zone - oExclHalfSpan = 0.0; - // get the first inside point - next_o(); -} - -void PointsInSphere::next_o() -{ - do - { - o++; - if (o < hi_o) - { - return; - } - if (hi_o != outside_o) - { - hi_o = outside_o; - o = int( ceil(o0line+oExclHalfSpan) ) - 1; - continue; - } - next_n(); - } - while (!finished()); -} - -void PointsInSphere::next_n() -{ - do - { - n++; - if (n < hi_n) - { - o0line = o0plane + (n-n0plane)*do0dn; - double RlineSquare = RplaneSquare - pow((n-n0plane)/b2r,2); - oHalfSpan = RlineSquare > 0.0 ? sqrt(RlineSquare)*c1r : 0.0; - // parentheses improve round-off errors around [0,0,0] - double RExclSquare = RminSquare + (RlineSquare - RmaxSquare); - oExclHalfSpan = RExclSquare > 0.0 ? sqrt(RExclSquare)*c1r : 0.0; - o = int(floor(o0line - oHalfSpan)); - outside_o = int(ceil(o0line + oHalfSpan)); - hi_o = outside_o; - if (oExclHalfSpan) - { - int hole_o = int(ceil(o0line - oExclHalfSpan)); - if (fabs(hole_o-o0line) < oExclHalfSpan) hi_o = hole_o; - } - return; - } - next_m(); - } - while (!finished()); -} - -void PointsInSphere::next_m() -{ - m++; - if (finished()) - { - return; - } - // not finished here - n0plane = m*dn0dm; - o0plane = m*do0dm; - RplaneSquare = RmaxSquare - pow(m/latpar.ar,2); - nHalfSpan = RplaneSquare > 0.0 ? sqrt(RplaneSquare)*b2r : 0.0; - n = int(floor(n0plane - nHalfSpan)); - hi_n = int(ceil(n0plane + nHalfSpan)); -} - -double PointsInSphere::r() const -{ - const double &a = latpar.a, &b = latpar.b, &c = latpar.c; - const double &ca = latpar.ca, &cb = latpar.cb, &cg = latpar.cg; - return sqrt( m*m*a*a + n*n*b*b + o*o*c*c - + 2*m*n*a*b*cg + 2*m*o*a*c*cb + 2*n*o*b*c*ca ); -} - - -//////////////////////////////////////////////////////////////////////// -// ReflectionsInQminQmax -//////////////////////////////////////////////////////////////////////// - -ReflectionsInQminQmax::ReflectionsInQminQmax( double _Qmin, double _Qmax, - const LatticeParameters& _latpar ) : - Qmin(_Qmin), Qmax(_Qmax), - latpar(_latpar), - sph(Qmin*M_1_PI/2.0, Qmax*M_1_PI/2.0, latpar.reciprocal()), - hkl(sph.mno), h(hkl[0]), k(hkl[1]), l(hkl[2]) -{ } - -ReflectionsInQminQmax::ReflectionsInQminQmax( double _Qmin, double _Qmax, - double _a, double _b, double _c, - double _alpha, double _beta, double _gamma ) : - Qmin(_Qmin), Qmax(_Qmax), - latpar(_a, _b, _c, _alpha, _beta, _gamma), - sph(Qmin*M_1_PI/2.0, Qmax*M_1_PI/2.0, latpar.reciprocal()), - hkl(sph.mno), h(hkl[0]), k(hkl[1]), l(hkl[2]) -{ } - - -//////////////////////////////////////////////////////////////////////// -// ReflectionsInDmaxDmin -//////////////////////////////////////////////////////////////////////// - -ReflectionsInDmaxDmin::ReflectionsInDmaxDmin( double _Dmax, double _Dmin, - const LatticeParameters& _latpar ) : - ReflectionsInQminQmax(2.0*M_PI/_Dmax, 2.0*M_PI/_Dmin, _latpar), - Dmax(_Dmax), Dmin(_Dmin) -{ } - -ReflectionsInDmaxDmin::ReflectionsInDmaxDmin( double _Dmax, double _Dmin, - double _a, double _b, double _c, - double _alpha, double _beta, double _gamma ) : - ReflectionsInQminQmax( 2.0*M_PI/_Dmax, 2.0*M_PI/_Dmin, - _a, _b, _c, _alpha, _beta, _gamma ), - Dmax(_Dmax), Dmin(_Dmin) -{ } - -// End of file diff --git a/libpdffit2/PointsInSphere.h b/libpdffit2/PointsInSphere.h deleted file mode 100644 index 2c3b5d45..00000000 --- a/libpdffit2/PointsInSphere.h +++ /dev/null @@ -1,182 +0,0 @@ -/*********************************************************************** -* -* pdffit2 by DANSE Diffraction group -* Simon J. L. Billinge -* (c) 2006 trustees of the Michigan State University -* All rights reserved. -* -* File coded by: Pavol Juhas -* -* See AUTHORS.txt for a list of people who contributed. -* See LICENSE.txt for license information. -* -************************************************************************ -* -* classes PointsInSphere, ReflectionsInQminQmax, ReflectionsInDmaxDmin -* -* Constructors: -* -* PointsInSphere(Rmin, Rmax, a, b, c, alpha, beta, gamma) -* ReflectionsInQminQmax(Qmin, Qmax, a, b, c, alpha, beta, gamma) -* ReflectionsInDmaxDmin(Dmax, Dmin, a, b, c, alpha, beta, gamma) -* -* Examples: -* -* PointsInSphere sph(Rmin, Rmax, a, b, c, alpha, beta, gamma) -* for (sph.rewind(); !sph.finished(); sph.next()) -* { -* // lattice indices are in sph.m, sph.n, sph.o or sph.mno[3] -* // sph.r() is distance from origin, -* // where Rmin < sph.r() < Rmax -* } -* -* ReflectionsInQminQmax refl(Qmin, Qmax, a, b, c, alpha, beta, gamma) -* for (ReflectionsInQminQmax ref(Qmin, Qmax, a, b, c, alpha, beta, gamma); -* !ref.finished(); ref.next() ) -* { -* // Miller indices are in ref.h, ref.k, ref.l or ref.hkl[3] -* // ref.Q() is magnitude of Q vector -* // ref.d() is lattice plane spacing -* } -* -* Tip: add epsilon to Rmax to avoid roundoff issues -* -***********************************************************************/ - -#ifndef POINTSINSPHERE_H_INCLUDED -#define POINTSINSPHERE_H_INCLUDED - -#include - - -namespace NS_POINTSINSPHERE { - -class LatticeParameters -{ -public: - LatticeParameters( double _a, double _b, double _c, - double _alpha, double _beta, double _gamma ); - // calculate all properties from current lattice parameters - LatticeParameters& update(); - // return a reciprocal of this lattice - LatticeParameters reciprocal() const; - // input arguments - double a, b, c, alpha, beta, gamma; - // cosines and sines of direct lattice angles - double ca, cb, cg, sa, sb, sg; - // reciprocal lattice and its cosines and sines - double ar, br, cr, alphar, betar, gammar; - double car, cbr, cgr, sar, sbr, sgr; -private: - // helper functions - inline double cosd(double x) { return cos(M_PI/180.0*x); } - inline double sind(double x) { return sin(M_PI/180.0*x); } -}; - -class PointsInSphere -{ -public: - PointsInSphere( double _Rmin, double _Rmax, - const LatticeParameters& _latpar ); - PointsInSphere( double _Rmin, double _Rmax, - double _a, double _b, double _c, - double _alpha, double _beta, double _gamma ); - void rewind(); - inline void next() - { - next_o(); - } - inline bool finished() - { - return !(m < hi_m); - } - // mno array and m, n, o aliases are supposed to be read only - int mno[3]; - int &m, &n, &o; - double r() const; - // input arguments - const double Rmin, Rmax; - const LatticeParameters latpar; -private: - // loop advance functions - void next_m(); - void next_n(); - void next_o(); - void init(); - // calculated constants set by init() - double RminSquare, RmaxSquare; - // 2D reciprocal parameters and cosine in bc plane - double b2r, c2r, ca2r; - // reciprocal c - double c1r; - // offset of the nearest point to [0,0,0] - double dn0dm, do0dm, do0dn; - // loop variables - double n0plane, o0plane, o0line; - double mHalfSpan, nHalfSpan, oHalfSpan; - // o indices excluded due to Rmin - double oExclHalfSpan; - int hi_m, hi_n, hi_o, outside_o; - double RplaneSquare; -}; - -class ReflectionsInQminQmax -{ -public: - ReflectionsInQminQmax( double _Qmin, double _Qmax, - const LatticeParameters& _latpar ); - ReflectionsInQminQmax( double _Qmin, double _Qmax, - double _a, double _b, double _c, - double _alpha, double _beta, double _gamma ); - inline void rewind() - { - sph.rewind(); - } - inline void next() - { - sph.next(); - } - inline bool finished() - { - return sph.finished(); - } - // input arguments - const double Qmin, Qmax; - const LatticeParameters latpar; -private: - // sph must be initialized before hkl and h, k, l - PointsInSphere sph; -public: - // hkl array and h, k, l aliases are supposed to be read only - int *hkl; - int &h, &k, &l; - inline double Q() const - { - return 2.0*M_PI*sph.r(); - } - inline double d() const - { - return 1.0/sph.r(); - } -}; - -class ReflectionsInDmaxDmin : ReflectionsInQminQmax -{ -public: - ReflectionsInDmaxDmin( double _Dmax, double _Dmin, - const LatticeParameters& _latpar ); - ReflectionsInDmaxDmin( double _Dmax, double _Dmin, - double _a, double _b, double _c, - double _alpha, double _beta, double _gamma ); - // input arguments - const double Dmax, Dmin; -}; - - -} // namespace NS_POINTSINSPHERE - -using NS_POINTSINSPHERE::PointsInSphere; -using NS_POINTSINSPHERE::ReflectionsInQminQmax; -using NS_POINTSINSPHERE::ReflectionsInDmaxDmin; - -#endif // POINTSINSPHERE_H_INCLUDED diff --git a/libpdffit2/ShapeFactors.h b/libpdffit2/ShapeFactors.h deleted file mode 100644 index 031efe66..00000000 --- a/libpdffit2/ShapeFactors.h +++ /dev/null @@ -1,43 +0,0 @@ -/*********************************************************************** -* -* pdffit2 by DANSE Diffraction group -* Simon J. L. Billinge -* (c) 2007 trustees of the Michigan State University -* All rights reserved. -* -* File coded by: Pavol Juhas -* -* See AUTHORS.txt for a list of people who contributed. -* See LICENSE.txt for license information. -* -************************************************************************ -* -* PDF corrections due to particle shape. -* -* Comments: -* PDF correction for spherical particles obtained from -* R.C. Howell et al, Phys. Rev. B 73, 094107 (2006) -* http://link.aps.org/abstract/PRB/v73/e094107 -* -***********************************************************************/ - -#ifndef SHAPEFACTORS_H_INCLUDED -#define SHAPEFACTORS_H_INCLUDED - -#include - -// envelope function for spherical nanoparticle with diameter d -inline double sphereEnvelope(double r, double d) -{ - double rdratio = r/d; - return (rdratio < 1.0) ? (1.0 - 1.5*rdratio + 0.5*pow(rdratio, 3)) : 0.0; -} - -// derivative of sphereEnvelope by diameter d -inline double dsphereEnvelope(double r, double d) -{ - double rdratio = r/d; - return (rdratio < 1.0) ? (1.5*rdratio/d - 1.5*pow(rdratio, 3)/d) : 0.0; -} - -#endif // SHAPEFACTORS_H_INCLUDED diff --git a/libpdffit2/StringUtils.cc b/libpdffit2/StringUtils.cc deleted file mode 100644 index 73fc04da..00000000 --- a/libpdffit2/StringUtils.cc +++ /dev/null @@ -1,58 +0,0 @@ -/*********************************************************************** -* -* pdffit2 by DANSE Diffraction group -* Simon J. L. Billinge -* (c) 2006 trustees of the Michigan State University -* All rights reserved. -* -* File coded by: Jacques Bloch, Pavol Juhas -* -* See AUTHORS.txt for a list of people who contributed. -* See LICENSE.txt for license information. -* -************************************************************************ -* -* Utilities for string formatting. -* -***********************************************************************/ - -#include -#include - -#include "StringUtils.h" -#include "MathUtils.h" - -using namespace std; - -// return an uppercase copy of string s -string toupper(string s) -{ - for (string::iterator ii = s.begin(); ii != s.end(); ++ii) - { - *ii = toupper(*ii); - } - return s; -} - -// class FormatValueWithStd -string FormatValueWithStd::operator() (double x, double dx) -{ - ostringstream out(f_leading_blank ? " " : "", ios_base::app); - out << x << setprecision(f_std_precision); - // do not write dx when it is too small - if (dx > fabs(x)*1e-8) out << " (" << dx << ')'; - else if (std::isnan(dx)) out << " (NaN)"; - // left-pad string to the width - string rv = out.str(); - int rvlen = rv.size(); - // pad or prepend blanks as necessary - if (rvlen < f_width) - { - size_t nblanks = f_width - rvlen; - if (f_left) rv.append(nblanks, ' '); - else rv.insert(0, nblanks, ' '); - } - return rv; -} - -// End of file diff --git a/libpdffit2/StringUtils.h b/libpdffit2/StringUtils.h deleted file mode 100644 index edb74a96..00000000 --- a/libpdffit2/StringUtils.h +++ /dev/null @@ -1,71 +0,0 @@ -/*********************************************************************** -* -* pdffit2 by DANSE Diffraction group -* Simon J. L. Billinge -* (c) 2006 trustees of the Michigan State University -* All rights reserved. -* -* File coded by: Pavol Juhas -* -* See AUTHORS.txt for a list of people who contributed. -* See LICENSE.txt for license information. -* -************************************************************************ -* -* Utilities for string formatting. -* -***********************************************************************/ - -#ifndef STRINGUTILS_H_INCLUDED -#define STRINGUTILS_H_INCLUDED - -#include - -std::string toupper(std::string s); - -class FormatValueWithStd -{ - private: - - // Data members - int f_width; - bool f_left; - bool f_leading_blank; - int f_std_precision; - - public: - - // Constructor: - FormatValueWithStd() - { - f_width = 0; - f_left = false; - f_leading_blank = false; - f_std_precision = 2; - } - - // Methods: - std::string operator() (double x, double dx); - inline FormatValueWithStd& width(int w) - { - f_width = w; - return *this; - } - inline FormatValueWithStd& left() - { - f_left = true; - return *this; - } - inline FormatValueWithStd& right() - { - f_left = false; - return *this; - } - inline FormatValueWithStd& leading_blank(bool flag) - { - f_leading_blank = flag; - return *this; - } -}; - -#endif // STRINGUTILS_H_INCLUDED diff --git a/libpdffit2/exceptions.h b/libpdffit2/exceptions.h deleted file mode 100644 index 738ce1a6..00000000 --- a/libpdffit2/exceptions.h +++ /dev/null @@ -1,95 +0,0 @@ -/*********************************************************************** -* -* pdffit2 by DANSE Diffraction group -* Simon J. L. Billinge -* (c) 2006 trustees of the Michigan State University -* All rights reserved. -* -* File coded by: Chris Farrow, Pavol Juhas -* -* See AUTHORS.txt for a list of people who contributed. -* See LICENSE.txt for license information. -* -************************************************************************ -* -* Exceptions used in pdffit2. -* -* Comments: -* -***********************************************************************/ - -#ifndef EXCEPTIONS_H_INCLUDED -#define EXCEPTIONS_H_INCLUDED - -#include -#include - -class Exception -{ - private: - std::string msg; - public: - Exception(std::string _msg) : msg(_msg) {} - std::string GetMsg() - { - return msg; - } -}; - -//specific exceptions - mimic python names -class ValueError : public Exception -{ - public: - ValueError(std::string _msg) : Exception(_msg) {} -}; - -class unassignedError : public Exception -{ - public: - unassignedError(std::string _msg) : Exception(_msg) {} -}; - -class IOError : public Exception -{ - public: - IOError(std::string _msg) : Exception(_msg) {} -}; - -class dataError : public Exception -{ - public: - dataError(std::string _msg) : Exception(_msg) {} -}; - -class structureError : public Exception -{ - public: - structureError(std::string _msg) : Exception(_msg) {} -}; - -class constraintError : public Exception -{ - public: - constraintError(std::string _msg) : Exception(_msg) {} -}; - -class calculationError : public Exception -{ - public: - calculationError(std::string _msg) : Exception(_msg) {} -}; - -class parseError : public Exception -{ - public: - parseError(std::string _msg) : Exception(_msg) {} -}; - -//This one is used internally, and should not make it to the python layer. -class vgetException : public Exception -{ - public: - vgetException(std::string _msg) : Exception(_msg) {} -}; - -#endif // EXCEPTIONS_H_INCLUDED diff --git a/libpdffit2/fit.cc b/libpdffit2/fit.cc deleted file mode 100644 index 4426aa29..00000000 --- a/libpdffit2/fit.cc +++ /dev/null @@ -1,836 +0,0 @@ -/*********************************************************************** -* -* pdffit2 by DANSE Diffraction group -* Simon J. L. Billinge -* (c) 2006 trustees of the Michigan State University -* All rights reserved. -* -* File coded by: Jacques Bloch, Chris Farrow -* -* See AUTHORS.txt for a list of people who contributed. -* See LICENSE.txt for license information. -* -************************************************************************ -* -* Mixed definitions of several DataSet, Fit and PdfFit methods -* -* Comments: Up to date with 1.3.10 Fortran version. -* What a spagetti. -* -***********************************************************************/ - -#include -#include -#include -#include -#include - -#include "MathUtils.h" -#include "ShapeFactors.h" -#include "pdffit.h" - -using NS_PDFFIT2::pout; - -/************************* - Main fit routine -**************************/ -// Command called in Fortran -// Now called - -int PdfFit::refine(bool deriv, double toler) { - int finished = 0; - while( !finished ) - { - finished = refine_step(deriv, toler); - } - return 1; -} - - -// CLF Wed May 25 2005 -// Added one-step refinement so that the progress can be checked after each -// refinement step. Many parameters made into public data members of Fit. This -// function is for use in higher level refinement routines. -int PdfFit::refine_step(bool deriv, double toler) -{ - static bool fit_running = false; - const int NSTAG = 3, MINITER = 3, MAXITER = 100; - - fit_running = fit_running && (fit.iter != 0); - // If fit_running flag is down, this is the first iteration. - // If so, then set up the fit. - if(!fit_running) - { - fit.iter = 0; - fit.alambda = -1; - fit.stagnating = 0; - fit.chisq = double_max; - fit_running = true; - - *pout << - "*******************\n" << - "Starting refinement\n" << - "*******************\n"; - - for (int is=0; isiset << " Phase: "; - for (unsigned int ip=0; ippsel.size(); ip++) - if (datasets[is]->psel[ip]) *pout << phase[ip]->iphase << " "; - *pout << endl; - - } - - fit_setup(); - } - - - //------ Here starts the fitting - - // setting the offset for all refinable variables - - if( (fit.iter order = this->order_by_id(); - vector::iterator i; - int j; - for (i = order.begin(), j = 0; i != order.end(); ++i) - { - if (ip[*i]) - { - *pout << setw(4) << id[*i] << ": " << setw(9) << fixed << p[*i]; - j++; - if (j % 4) *pout << " "; - else *pout << endl; - } - } - if (j % 4) *pout << endl; - *pout << endl; - (*pout).unsetf(ios_base::fixed); -} - -/********************************************************** - Setting the offset for all refinable variables -**********************************************************/ -void PdfFit::fit_setup() -{ - // initialize the array with the addresses of refinable variable - // and initialize the offset pointers to be used in derivative routines - // also makes a vector containing the address of the error of each - // refinable variable - //int ip, ia, is, j; - int j; - - // First we make an initial fill of all constrained equations - // to detect missing parameters but mainly to detect the fixed constraints, - // i.e. constraints without parameters or with only fixed parameters - - fit.fill_variables(); - - // for each refinable variable detect the corresponding constraint - - fit.refvar.clear(); - fit.sdptr.clear(); - - for (int ip=0; ipphase[ip]; - - phase.offset = fit.refvar.size(); - - for (j=0;j<3;j++) - { - fit.refvar.push_back(fit.vfind(phase.a0[j])); - fit.sdptr.push_back(&phase.da0[j]); - } - for (j=0;j<3;j++) - { - fit.refvar.push_back(fit.vfind(phase.win[j])); - fit.sdptr.push_back(&phase.dwin[j]); - - } - fit.refvar.push_back(fit.vfind(phase.delta2)); - fit.sdptr.push_back(&phase.ddelta2); - - fit.refvar.push_back(fit.vfind(phase.delta1)); - fit.sdptr.push_back(&phase.ddelta1); - - fit.refvar.push_back(fit.vfind(phase.pscale)); - fit.sdptr.push_back(&phase.dpscale); - - fit.refvar.push_back(fit.vfind(phase.spdiameter)); - fit.sdptr.push_back(&phase.dspdiameter); - - fit.refvar.push_back(fit.vfind(phase.sratio)); - fit.sdptr.push_back(&phase.dsratio); - - for (int ia=0; iadatasets[is]; - - ds.offset = fit.refvar.size(); - - fit.refvar.push_back(fit.vfind(ds.dscale)); - fit.sdptr.push_back(&ds.ddscale); - - fit.refvar.push_back(fit.vfind(ds.qdamp)); - fit.sdptr.push_back(&ds.dqdamp); - - fit.refvar.push_back(fit.vfind(ds.qbroad)); - fit.sdptr.push_back(&ds.dqbroad); - } - - // maximum number of refinable variables - int maxvar = fit.refvar.size(); - - // fill the vector pointing from available refinable variables to - // actual constrained variables - - if (maxvar != getnpar() ) - { - throw constraintError("Parameter set but not constrained."); - } - - fit.ndof = 0; - - for (int i=0; idatasets.empty()) - { - throw unassignedError("Space for calculation must be alloc'ed first"); - } - fit_theory(false, true); - *pout << "\n================================== DONE =================================\n"; - return; -} - -/*********************************************************** - Here we calculate PDF and derivatives during LS fit - (previously known as fit_theory) -************************************************************/ -void PdfFit::fit_theory(bool ldiff, bool lout) -{ - int is, ip, ia, i; - - -// ------ First we compute all constrained equations and the PDF - - fit.fill_variables(); - - // reposition atoms in the elementary unit cells - // Check if this is the correct wayto do things - for (ip=0; ipnatoms; ia++) - { - for(i=0; i<3; i++) - { - phase[ip]->atom[ia].pos[i] = fmod(phase[ip]->atom[ia].pos[i], phase[ip]->icc[i]); - } - } - } - - for (ip=0; iplattice(); - - // determine pdf for each dataset - fit.ntot = 0; - fit.wnorm = 0.0; - - for (is=0; isdatasets[is]; - - ds.determine(ldiff, lout, fit); - - // compute variables for reduced chi-squared and Rw - fit.ntot += ds.nfmax - ds.nfmin + 1; - fit.wnorm += ds.weighedSquareObs(); - } -} - - -double PdfFit::totalWeighedSquareObs() const -{ - return fit.wnorm; -} - - -int PdfFit::totalReducedObservations() const -{ - return fit.ntot - fit.ndof; -} - - -/*********************************************************************** - This routine sets up the matrix A with the derivatives d(PDF)/dx -************************************************************************/ - -void DataSet::fit_setup_derivatives(Fit &fit) -{ - int i, j, ia, ipar, offset; - unsigned int ip; - double fac, facs, facp, ddrho; - double r, bk; - fac = facs = facp = ddrho = r = bk = 0; - - DataSet& ds = *this; - - //------ Loop over all data points - - for (i = ds.ncmin; i <= ds.ncmax; i++) - { - // --- Some common variables - - r = i*ds.deltar + ds.rmin; - - // background envelope due to Q resolution - bk = (ds.qdamp > 0.0) ? exp(-sqr(r*ds.qdamp)/2.0) : 1.0; - - - //------ ---------------------------------------------------------------- - //------ Derivatives per atom : x,y,z,u,o - //------ ---------------------------------------------------------------- - - for (ip=0; ip 0.0 && r > phase.stepcut) - { - shape_env = 0.0; - } - - facp = phase.pscale * shape_env * ds.dscale * bk; - facs = 1.0 / (phase.np*r); - fac = facs*facp; - - for (ia=0; ia, so every contribution to - // the pdf contributes to the derivatives - ds.fit_a[i][ipar] += phase.pscale * ds.dscale * - (1.0 - 2.0 * atom.weight) / phase.np * - (calc[i][ip] + - 4.0*M_PI * r * phase.rho0 * phase.dnorm * bk * shape_env); - } - } - - //------ ---------------------------------------------------------------- - //------ Derivatives per phase : lat, delta2, pscale, spdiameter, sratio - //------ ---------------------------------------------------------------- - - // ----- ----- d/d(lat[j] for j=1,2,3) - - offset = phase.offset; - - for (j=0;j<3;j++) - { - if ( (ipar=fit.refvar[offset++]) != -1) - ds.fit_a[i][ipar] = facp*(facs*ds.fit_a[i][ipar] + - 4.0*M_PI*r*phase.dnorm*phase.rho0/phase.a0[j]); - } - - // ----- ----- d/d(lat[4]) - - if ( (ipar=fit.refvar[offset++]) != -1) - { - ddrho = sqr(phase.a0[0]*phase.a0[1]*phase.a0[2]/phase.v)* - rad*phase.sina*(phase.cosa - phase.cosb*phase.cosg); - ds.fit_a[i][ipar] = facp*(facs*ds.fit_a[i][ipar] + - 4.0*M_PI*r*phase.dnorm*phase.rho0*ddrho); - } - - // ----- ----- d/d(lat[5]) - - if ( (ipar=fit.refvar[offset++]) != -1) - { - ddrho = sqr(phase.a0[0]*phase.a0[1]*phase.a0[2]/phase.v)* - rad*phase.sinb*(phase.cosb - phase.cosa*phase.cosg); - ds.fit_a[i][ipar] = facp*(facs*ds.fit_a[i][ipar] + - 4.0*M_PI*r*phase.dnorm*phase.rho0*ddrho); - } - - // ----- ----- d/d(lat[6]) - - if ( (ipar=fit.refvar[offset++]) != -1) - { - ddrho = sqr(phase.a0[0]*phase.a0[1]*phase.a0[2]/phase.v)* - rad*phase.sing*(phase.cosg - phase.cosa*phase.cosb); - ds.fit_a[i][ipar] = facp*(facs*ds.fit_a[i][ipar] + - 4.0*M_PI*r*phase.dnorm*phase.rho0*ddrho); - } - - // ----- ----- d/d(delta2[ip]) - - if ( (ipar=fit.refvar[offset++]) != -1) - ds.fit_a[i][ipar] *= fac; - - - // ----- ----- d/d(delta1[ip]) - - if ( (ipar=fit.refvar[offset++]) != -1) - ds.fit_a[i][ipar] *= fac; - - //----- ----- d/d(pscale[ip]) - - if ( (ipar=fit.refvar[offset++]) != -1) - ds.fit_a[i][ipar] = ds.calc[i][ip] * ds.dscale; - - // ----- --- d/d(spdiameter) - if ( (ipar=fit.refvar[offset++]) != -1) - { - ds.fit_a[i][ipar] = (phase.spdiameter <= 0.0) ? 0.0 : - ds.calc[i][ip] * ds.dscale * phase.pscale * - dsphereEnvelope(r, phase.spdiameter) / - ((shape_env > 0.0) ? shape_env : 1.0); - } - - // ----- ----- d/d(sratio[ip]) - - if ( (ipar=fit.refvar[offset++]) != -1) - ds.fit_a[i][ipar] *= fac; - } - - //------ ---------------------------------------------------------------- - //------ Derivatives per dataset : dscale, qdamp, qbroad - //------ ---------------------------------------------------------------- - - offset = ds.offset; - - // ----- --- d/d(dscale[is]) - - if ( (ipar=fit.refvar[offset++]) != -1) - ds.fit_a[i][ipar] = ds.pdftot[i] / ds.dscale; - - // ----- --- d/d(qdamp[is]) - - if ( (ipar=fit.refvar[offset++]) != -1) - { - if (ds.qdamp > 0.0) - ds.fit_a[i][ipar] = -r*r * ds.qdamp * ds.pdftot[i]; - else - ds.fit_a[i][ipar] = 0; - } - - // ----- --- d/d(qbroad[ip]) - - if ( (ipar=fit.refvar[offset++]) != -1) - ds.fit_a[i][ipar] *= fac; - - } - -//------ Finally we need to apply Qmax cutoff on the derivatives - - if (ds.qmax > 0.0) - { - int nclen = ds.ncmax + 1 - ds.ncmin; - // matrix column is not a continuous data block, a copy is required - valarray col_ip_array(nclen); - double* col_ip = &(col_ip_array[0]); - for(ip=0; ip::iterator apos; - apos = find(var.begin(), var.end(), &a); - if (apos == var.end()) return -1; - // variable is found here, now check if it is refinable - int idx = apos - var.begin(); - return vref[idx] ? idx : -1; -} - - -void Fit::constrain(double &a, string inpform, fcon f, int ipar, FCON type) -{ - int ivar; - if ( (ivar=vfind(a)) != -1) - { - form[ivar] = inpform; - fconstraint[ivar] = f; - idef[ivar] = ipar; - ctype[ivar] = type; - vref[ivar] = true; - *pout << "Warning: replacing existing constraint\n\n"; - } - else - { - var.push_back(&a); - form.push_back(inpform); - fconstraint.push_back(f); - idef.push_back(ipar); - ctype.push_back(type); - vref.push_back(true); - } -} - - -void Fit::constrain(double &a, string inpform) -{ - constrain(a, inpform, NULL, -1, USER); -} - -void Fit::constrain(double &a, fcon f ) -{ - constrain(a, string(), f, -1, USER); -} - -// if a # is passed instead of a function, then the default function will be used -// which is just var = p[ipar] -void Fit::constrain(double &a, int ipar) -{ - constrain(a, ipar, IDENT); -} - -// if a # and the FCOMP-type are passed instead of a function, then the -// complement function will be used: -// which is just var = 1-p[ipar] -void Fit::constrain(double &a, int ipar, FCON type) -{ - if ( (type == IDENT) || (type == FCOMP) || (type == FSQR) ) - constrain(a, string(), NULL, ipar, type); - else - throw constraintError("Unknown constraint"); -} - -void Fit::fill_variables() -{ - dvdp.resize(var.size(),p.size()); - - for (unsigned int i=0; i dnumdp; - - *var[i] = parse(form[i],dnumdp); - - // store numerical derivatives - for(unsigned int iu=0; iuip[ip]; - - // calculate derivative wrt to p[ip] if parameter is free - if (this->ip[ip]) - { - dvdp[i][ip] = dnumdp[iu]; - } - } - } - else if (f) - { - //try - //{ - vector dvdp_i(dvdp.rowVector(i)); - *var[i] = f(p, dvdp_i); - copy(dvdp_i.begin(), dvdp_i.end(), dvdp[i]); - for(int ipar=0; iparip[ipar]); - } - } - else - { - int ipar = parfind(idef[i]); - - if (ipar == -1) - { - ostringstream msg; - msg << "parameter " << idef[i] << " undefined"; - throw constraintError( msg.str() ); - } - - // constraint is fixed if parameter ipar is fixed - vref[i] = this->ip[ipar]; - - if (ctype[i] == IDENT) - { - *var[i] = p[ipar]; - dvdp[i][ipar] = 1.0; - } - else if (ctype[i] == FCOMP) - { - *var[i] = 1.0 - p[ipar]; - dvdp[i][ipar] = -1.0; - } - else if (ctype[i] == FSQR) - { - *var[i] = sqr(p[ipar]); - dvdp[i][ipar] = 2.0*p[ipar]; - } - } - } -} - -int Fit::parfind(unsigned int pidx) -{ - // find the position of pidx in parameter indices vector id - // return -1 if not found - vector::iterator pos; - pos = find(id.begin(), id.end(), pidx); - if (pos == id.end()) - { - return -1; - } - return int(pos - id.begin()); -} - -void Fit::setpar(unsigned int pidx, double val) -{ - int ipar = parfind(pidx); - if (ipar != -1) - { - p[ipar] = val; - } - else - { - p.push_back(val); - ip.push_back(1); // select refinement "ON" when par gets defined - id.push_back(pidx); // store the parameter identifier - } -} - -double Fit::getpar(unsigned int pidx) -{ - int ipar = parfind(pidx); - if (ipar < 0) - { - ostringstream msg; - msg << "Parameter " << pidx << " does not exist"; - throw unassignedError( msg.str() ); - } - return p[ipar]; -} - -void Fit::fixpar(int pidx) -{ - if (pidx == ALL) - { - fill(ip.begin(), ip.end(), false); - return; - } - int ipar = parfind(pidx); - if (ipar == -1) - { - ostringstream emsg; - emsg << "Parameter " << pidx << " not defined."; - throw unassignedError(emsg.str()); - } - ip[ipar] = false; -} - -void Fit::freepar(int pidx) -{ - if (pidx == ALL) - { - fill(ip.begin(), ip.end(), true); - return; - } - int ipar = parfind(pidx); - if (ipar == -1) - { - ostringstream emsg; - emsg << "Parameter " << pidx << " not defined."; - throw unassignedError(emsg.str()); - } - ip[ipar] = true; -} - -/************************************************************************** - This routine calculates errors dx from dp ... - - The covariance of the constrained variables is given by the left and right - matrix multiplication of the dvdp matrix with the covariance matrix - (based on a Taylor expansion of each constraint around the mean parameter values). - The old Fortran program had a sqrt(sum of squares) as error. This - does not take into account parameter correlations, and implicitly considers - the parameters uncorrelated, which is an under-estimation of the parameters. -****************************************************************************/ -void PdfFit::fit_errors() -{ - int ip; - matrix dvdpt = fit.dvdp.transposed(); - - // compute the errors on the parameters as sqrt of diagonal elements of - // covariance matrix - fit.dp = fit.covar.sd(); - - // compute errors on refined variables: left and right matrix multiplication - // of covariance matrix with dvdp - fit.vcovar = fit.dvdp * fit.covar * dvdpt; - - fit.dvar = fit.vcovar.sd(); - - //for(int i=0;ilattice(); -} - -/*********************************************************************** - This routine converts the errors on the constraints to - errors on the actual pdf-paramters -************************************************************************/ - -void Fit::fill_errors() -{ - // transfers the errors on the constrained variables to the corresponding - // pdf error-variables - - int icon; - - // loop over all refinable variables and transfer the sd on any constrained - // variable into the sd on the refinable variable - for (unsigned int i=0; i= big) - { - big=fabs(a[j][k]); - irow=j; - icol=k; - } - } - } - } - } - ++(ipiv[icol]); - /*We now have the pivot element, so we interchange rows, if needed, to put the pivot - element on the diagonal. The columns are not physically interchanged, only relabeled: - indxc[i], the column of the ith pivot element, is the ith column that is reduced, while - indxr[i] is the row in which that pivot element was originally located. If indxr[i] - != indxc[i] there is an implied column interchange. With this form of bookkeeping, the - solution b's will end up in the correct order, and the inverse matrix will be scrambled - by columns.*/ - if (irow != icol) { - for (l=1;l<=n;l++) swap(a[irow][l],a[icol][l]); - for (l=1;l<=m;l++) swap(b[irow][l],b[icol][l]); - } - indxr[i]=irow; // We are now ready to divide the pivot row by the - // pivot element, located at irow and icol. - indxc[i]=icol; - - // Indices of a start at 1, make sure we don't reference invalid - // index of a. When icol is 0, all checked elements of the matrix - // a were zero and it is probably singular as well. - if (icol == 0 || a[icol][icol] == 0.0) - { - throw calculationError("Singular matrix during minimization"); - } - pivinv=1.0/a[icol][icol]; - a[icol][icol]=1.0; - for (l=1;l<=n;l++) a[icol][l] *= pivinv; - for (l=1;l<=m;l++) b[icol][l] *= pivinv; - for (ll=1;ll<=n;ll++) // Next, we reduce the rows... - if (ll != icol) { // ...except for the pivot one, of course. - dum=a[ll][icol]; - a[ll][icol]=0.0; - for (l=1;l<=n;l++) a[ll][l] -= a[icol][l]*dum; - for (l=1;l<=m;l++) b[ll][l] -= b[icol][l]*dum; - } - } - /*This is the end of the main loop over columns of the reduction. It only remains to unscram- - ble the solution in view of the column interchanges. We do this by interchanging pairs of - columns in the reverse order that the permutation was built up.*/ - for (l=n;l>=1;l--) - { - if (indxr[l] == indxc[l]) continue; - for (k=1;k<=n;k++) swap(a[k][indxr[l]],a[k][indxc[l]]); - } // And we are done. - free_ivector(ipiv,1,n); - free_ivector(indxr,1,n); - free_ivector(indxc,1,n); -} - -// End of file diff --git a/libpdffit2/matrix.h b/libpdffit2/matrix.h deleted file mode 100644 index bc80b8ca..00000000 --- a/libpdffit2/matrix.h +++ /dev/null @@ -1,239 +0,0 @@ -/*********************************************************************** -* -* pdffit2 by DANSE Diffraction group -* Simon J. L. Billinge -* (c) 2006 trustees of the Michigan State University -* All rights reserved. -* -* File coded by: Pavol Juhas -* -* See AUTHORS.txt for a list of people who contributed. -* See LICENSE.txt for license information. -* -************************************************************************ -* -* template class matrix -* -* Comments: optimized from original vector of vectors -* -***********************************************************************/ - -#ifndef MATRIX_H_INCLUDED -#define MATRIX_H_INCLUDED - -#include -#include -#include - -#include "OutputStreams.h" -using NS_PDFFIT2::pout; - -template class matrix -{ - private: - - // Data Methods - T* mdata; - size_t mrows; - size_t mcols; - size_t msize; - - public: - - // Constructors - matrix() : - mdata(NULL), mrows(0), mcols(0), msize(0) - { } - matrix(const matrix& src) : - mdata(new T[src.mrows*src.mcols]), - mrows(src.mrows), mcols(src.mcols), msize(src.msize) - { - std::copy(src.mdata, src.mdata + src.msize, mdata); - } - matrix(size_t m, size_t n) : - mrows(m), mcols(n), msize(mrows*mcols) - { - mdata = new T[mrows*mcols]; - std::fill(mdata, mdata + msize, T(0)); - } - // Destructor - ~matrix() - { - delete[] mdata; - } - // Methods - matrix& operator=(const matrix& src) - { - if (this == &src) return *this; - delete[] mdata; - mdata = new T[src.msize]; - std::copy(src.mdata, src.mdata + src.msize, mdata); - mrows = src.mrows; - mcols = src.mcols; - msize = src.msize; - return *this; - } - matrix& operator=(T value) - { - std::fill_n(mdata, msize, value); - return *this; - } - void resize(size_t m, size_t n, T value=T(0)) - { - if (m == mrows && n == mcols) return; - T* resized = new T[m*n]; - std::fill(resized, resized + m*n, value); - for ( size_t i = 0, offset = 0; - i != std::min(m, mrows); ++i, offset += n ) - { - for (size_t j = 0; j != std::min(n, mcols); ++j) - { - resized[offset+j] = (*this)(i, j); - } - } - delete[] mdata; - mdata = resized; - mrows = m; - mcols = n; - msize = m*n; - } - void clear() - { - delete[] mdata; - mdata = NULL; - mrows = mcols = msize = 0; - } - std::vector rowVector(size_t i) - { - return std::vector(mdata + mcols*i, mdata + mcols*(i+1)); - } - std::vector colVector(size_t j) - { - std::vector column(mrows); - typename std::vector::iterator vii; - vii = column.begin(); - T* pt = mdata + j; - for (; vii != column.end(); ++vii, pt += mcols) *vii = *pt; - return column; - } - inline size_t getrows() - { - return mrows; - } - inline size_t getcols() - { - return mcols; - } - inline T* operator[](size_t i) - { - return mdata + mcols*i; - } - inline T& operator()(size_t i, size_t j) - { - return *(mdata + i*mcols + j); - } - matrix transposed() - { - matrix mxt(mcols, mrows); - T* pt = mxt.mdata; - for (size_t j = 0; j != mcols; ++j) - { - for (size_t i = 0; i != mrows; ++i, ++pt) - { - *pt = (*this)(i, j); - } - } - return mxt; - } - // returns standard deviation vector from covariance matrix - std::vector sd() - { - std::vector v(mcols); - if (mcols != mrows) - { - const char* emsg = "Matrix not square in "; - throw emsg; - } - typename std::vector::iterator vii; - vii = v.begin(); - for (T* pii = mdata; pii < mdata + msize; pii += mcols + 1, ++vii) - { - *vii = sqrt(*pii); - } - return v; - } - matrix operator*(matrix& B) - { - matrix& A = *this; - matrix C(A.mrows, B.mcols); - if (A.mcols != B.mrows) - { - const char* emsg = "Inconsistent matrix multiplication"; - throw emsg; - } - for (size_t i = 0; i != A.mrows; ++i) - { - for (size_t j = 0; j != B.mcols; ++j) - { - T& Cij = C(i,j); - Cij = 0; - for (size_t k = 0; k != A.mcols; ++k) - { - Cij += A(i,k)*B(k,j); - } - } - } - return C; - } - template - friend std::ostream& operator<<(std::ostream &out, matrix &mx); - void print() - { - using namespace std; - for (size_t i = 0; i != mrows; ++i) - { - *pout << i << ": "; - for (size_t j = 0; j != mcols; ++j) - { - *pout << (*this)(i,j) << " "; - } - *pout << endl; - } - } -}; - -template -std::ostream &operator<<(std::ostream &out, std::vector &v) -{ - using namespace std; - out << "("; - for (size_t i=0; i != v.size(); ++i) - { - out << v[i]; - if (i != (v.size()-1)) out << ", "; - else out << ")\n"; - } - return out; -} - -template -std::ostream& operator<<(std::ostream &out, matrix &mx) -{ - using namespace std; - out << "( "; - for (size_t i = 0; i != mx.mrows; ++i) - { - out << "("; - for (size_t j = 0; j != mx.mcols; ++j) - { - *pout << mx(i,j); - if (j != (mx.mcols-1)) *pout << ", "; - else *pout << ")"; - } - if (i != (mx.mrows-1)) *pout << ", "; - else *pout << " )\n"; - } - return out; -} - -#endif // MATRIX_H_INCLUDED diff --git a/libpdffit2/metric.cc b/libpdffit2/metric.cc deleted file mode 100644 index 5f696495..00000000 --- a/libpdffit2/metric.cc +++ /dev/null @@ -1,341 +0,0 @@ -/*********************************************************************** -* -* pdffit2 by DANSE Diffraction group -* Simon J. L. Billinge -* (c) 2006 trustees of the Michigan State University -* All rights reserved. -* -* File coded by: Jacques Bloch -* -* See AUTHORS.txt for a list of people who contributed. -* See LICENSE.txt for license information. -* -************************************************************************ -* -* Definitions of several Phase methods -* -* Comments: -* -***********************************************************************/ - -#include - -#include "MathUtils.h" -#include "StringUtils.h" -#include "pdffit.h" -using NS_PDFFIT2::pout; - -/********************************************************************* - Calculates lattice constants, metric and reciprocal metric - tensor, permutation tensors and unit cell volume. - It's done quite some old fashioned way, rather than calculating - the direct metric tensor and its inverse. - - This extended version calculates standard deviations as well - **********************************************************************/ -void Phase::lattice() -{ - double abscosa, abscosb, abscosg, arg, darg; - double dcosa, dcosb, dcosg, voll, dvoll; - double cos1, cos2, cosi, sin1, sin2, sini; - double dcos1, dcos2, dcosi, dsin1, dsin2, dsini; - int i, i1, i2, j, k, ncc; - - cosa = cosd(win[0]); - cosb = cosd(win[1]); - cosg = cosd(win[2]); - - sina = sind(win[0]); - sinb = sind(win[1]); - sing = sind(win[2]); - - abscosa = fabs(cosa); - abscosb = fabs(cosb); - abscosg = fabs(cosg); - - dcosa = fabs(sina*rad*dwin[0]); - dcosb = fabs(sinb*rad*dwin[1]); - dcosg = fabs(sing*rad*dwin[2]); - - voll = 1.0 - sqr(cosa) - sqr(cosb) - sqr(cosg) + 2.0*cosa*cosb*cosg; - - if (voll <= double_eps) - { - throw structureError("Unit cell volume is not positive."); - } - v = sqrt(voll)*a0[0]*a0[1]*a0[2]; - - dvoll = 2.0*(abscosa*dcosa + abscosb*dcosb + abscosg*dcosg + - dcosa*abscosb*abscosg + abscosa*dcosb*abscosg + abscosa*abscosb*dcosg); - dv = 0.5/sqrt(voll)*dvoll*a0[0]*a0[1]*a0[2] - + sqrt(voll)*(da0[0]*a0[1]*a0[2] + a0[0]*da0[1]*a0[2] + a0[0]*a0[1]*da0[2]); - - vr = 1.0/v; - dvr = 1.0/(v*v)*dv; - - //------ - calculate direct metric tensor - - tensor(gten,a0,win); - dtensor(a0,win,dgten,da0,dwin); - - //------ - calculate reciprocal lattice constants - - // WHY ARE THERE NO ABSOLUTE VALUES IN THE FOLLOWING FORMULAE FOR THE STANDARD - // DEVIATIONS?? - for (i=0; i<3; i++) // i = 0,1,2 - { - i1 = (i+1) % 3; // i1 = 1,2,0 - i2 = (i+2) % 3; // i2 = 2,0,1 - - cos1 = cosd(win[i1]); - cos2 = cosd(win[i2]); - cosi = cosd(win[i]); - sin1 = sind(win[i1]); - sin2 = sind(win[i2]); - sini = sind(win[i]); - - ar[i] = a0[i1]*a0[i2]*sini/v; - arg = (cos1*cos2-cosi)/(sin1*sin2); - wrez[i] = acosd(arg); - - dcos1 = sin1*rad*dwin[i1]; - dcos2 = sin2*rad*dwin[i2]; - dcosi = sini*rad*dwin[i]; - dsin1 = cos1*rad*dwin[i1]; - dsin2 = cos2*rad*dwin[i2]; - dsini = cosi*rad*dwin[i]; - - dar[i] = ( (da0[i1]*a0[i2] + a0[i1]*da0[i2])*sini + - a0[i1]*a0[i2]*dsini) /v + a0[i1]*a0[i2]*sini/(v*v)*dv; - darg = (dcos1*cos2 + cos1*dcos2 + dcosi)/(sin1*sin2) - + arg/sin1*dsin1 + arg/sin2*dsin2; - dwrez[i] = 1./sqrt(1-arg*arg)*darg/rad; - } - - //------ - calculate reciprocal tensor - - tensor(rten,ar,wrez); - dtensor(ar,wrez,drten,dar,dwrez); - - //------ - calculate permutation tensors - - for (i=0; i<3; i++) - { - for (j=0; j<3; j++) - { - for (k=0; k<3; k++) - { - eps(i,j,k) = 0.0; - reps(i,j,k) = 0.0; - deps(i,j,k) = 0.0; - dreps(i,j,k) = 0.0; - } - } - } - - eps(0,1,2) = v; - eps(1,2,0) = v; - eps(2,0,1) = v; - eps(0,2,1) = -v; - eps(2,1,0) = -v; - eps(1,0,2) = -v; - reps(0,1,2) = vr; - reps(1,2,0) = vr; - reps(2,0,1) = vr; - reps(0,2,1) = -vr; - reps(2,1,0) = -vr; - reps(1,0,2) = -vr; - - deps(0,1,2) = dv; - deps(1,2,0) = dv; - deps(2,0,1) = dv; - deps(0,2,1) = -dv; - deps(2,1,0) = -dv; - deps(1,0,2) = -dv; - dreps(0,1,2) = dvr; - dreps(1,2,0) = dvr; - dreps(2,0,1) = dvr; - dreps(0,2,1) = -dvr; - dreps(2,1,0) = -dvr; - dreps(1,0,2) = -dvr; - - //------ - Calculate number density - - np = 0.0; - dnp = 0.0; - - for (i=0; i -#include - -const int getNR_END() -{ - return 1; -} - -static void nrerror(char error_text[]) - /* Numerical Recipes standard error handler */ -{ - fprintf(stderr,"Numerical Recipes run-time error...\n"); - fprintf(stderr,"%s\n",error_text); - fprintf(stderr,"...now exiting to system...\n"); - exit(1); -} - -template T *_vector(long nl, long nh) - /* allocate a vector with subscript range v[nl..nh] */ -{ - T *v = NULL; - if (nl > nh) return v; - v=(T *)malloc((size_t) ((nh-nl+1+getNR_END())*sizeof(T))); - if (!v) nrerror("allocation failure in _vector()"); - return v-nl+getNR_END(); -} - -double *dvector(long nl, long nh) - /* allocate a double vector with subscript range v[nl..nh] */ -{ - return _vector(nl, nh); -} - -int *ivector(long nl, long nh) - /* allocate an int vector with subscript range v[nl..nh] */ -{ - return _vector(nl, nh); -} - -template void _free_vector(T *v, long nl, long nh) - /* free a vector allocated with vector() */ -{ - if (nl > nh) return; - free((T*) (v+nl-getNR_END())); -} - -void free_dvector(double *v, long nl, long nh) - /* free a double vector allocated with vector() */ -{ - _free_vector(v, nl, nh); -} - - -void free_ivector(int *v, long nl, long nh) - /* free an int vector allocated with ivector() */ -{ - _free_vector(v, nl, nh); -} - -template T **_matrix(long nrl, long nrh, long ncl, long nch) - /* allocate a matrix with subscript range m[nrl..nrh][ncl..nch] */ -{ - long i, nrow=nrh-nrl+1,ncol=nch-ncl+1; - T **m = NULL; - if (nrl > nrh || ncl > nch) return m; - - /* allocate pointers to rows */ - m=(T **) malloc((size_t)((nrow+getNR_END())*sizeof(T*))); - if (!m) nrerror("allocation failure 1 in matrix()"); - m += getNR_END(); - m -= nrl; - /* allocate rows and set pointers to them */ - m[nrl]=(T *) malloc((size_t)((nrow*ncol+getNR_END())*sizeof(T))); - if (!m[nrl]) nrerror("allocation failure 2 in matrix()"); - m[nrl] += getNR_END(); - m[nrl] -= ncl; - for(i=nrl+1;i<=nrh;i++) m[i]=m[i-1]+ncol; - /* return pointer to array of pointers to rows */ - return m; -} - -double **dmatrix(long nrl, long nrh, long ncl, long nch) - /* allocate a double matrix with subscript range m[nrl..nrh][ncl..nch] */ -{ - return _matrix(nrl, nrh, ncl, nch); -} - -template void _free_matrix(T **m, long nrl, long nrh, long ncl, long nch) - /* free a double matrix allocated by matrix() */ -{ - if (nrl > nrh || ncl > nch) return; - free((T*) (m[nrl]+ncl-getNR_END())); - free((T**) (m+nrl-getNR_END())); -} - -void free_dmatrix(double **m, long nrl, long nrh, long ncl, long nch) - /* free a double matrix allocated by matrix() */ -{ - _free_matrix(m, nrl, nrh, ncl, nch); -} - -// End of file diff --git a/libpdffit2/nrutil.h b/libpdffit2/nrutil.h deleted file mode 100644 index ee1bd4cb..00000000 --- a/libpdffit2/nrutil.h +++ /dev/null @@ -1,34 +0,0 @@ -/*********************************************************************** -* -* pdffit2 by DANSE Diffraction group -* Simon J. L. Billinge -* (c) 2006 trustees of the Michigan State University -* All rights reserved. -* -* File coded by: Jacques Bloch -* -* See AUTHORS.txt for a list of people who contributed. -* See LICENSE.txt for license information. -* -************************************************************************ -* -* Utilities from numerical recipies. -* -* Comments: -* -***********************************************************************/ - -#ifndef NRUTIL_H_INCLUDED -#define NRUTIL_H_INCLUDED - -#include - -void nrerror(char error_text[]); -int *ivector(long nl, long nh); -double *dvector(long nl, long nh); -double **dmatrix(long nrl, long nrh, long ncl, long nch); -void free_ivector(int *v, long nl, long nh); -void free_dvector(double *v, long nl, long nh); -void free_dmatrix(double **m, long nrl, long nrh, long ncl, long nch); - -#endif // NRUTIL_H_INCLUDED diff --git a/libpdffit2/output.cc b/libpdffit2/output.cc deleted file mode 100644 index 36928794..00000000 --- a/libpdffit2/output.cc +++ /dev/null @@ -1,350 +0,0 @@ -/*********************************************************************** -* -* pdffit2 by DANSE Diffraction group -* Simon J. L. Billinge -* (c) 2006 trustees of the Michigan State University -* All rights reserved. -* -* File coded by: Jacques Bloch -* -* See AUTHORS.txt for a list of people who contributed. -* See LICENSE.txt for license information. -* -************************************************************************ -* -* Output methods for Phase, DataSet and Fit classes -* -* Comments: -* -***********************************************************************/ - -#include -#include -#include -#include -#include -#include -#include - -#include "pdffit.h" -#include "StringUtils.h" - -/************************************************************ - * Outputs phase information for phase 'ipha' on file 'id' - * Thu Oct 13 2005 - CLF Modified code to handle - * general types of streams. - *************************************************************/ -void Phase::output(ostream &fout) -{ - FormatValueWithStd value_std; - value_std.left(); - - fout << " " << string(78,'-') << '\n' - << " PHASE " << iphase << " : " << name << '\n' - << " " << string(78,'-') << endl; - - fout << " Scale factor : " << - value_std(pscale, dpscale) << endl; - - fout << " Particle diameter : "; - if (spdiameter <= 0.0) fout << "not applied\n"; - else fout << value_std(spdiameter, dspdiameter) << " A\n"; - - fout << " Step cutoff : "; - if (stepcut <= 0.0) fout << "not applied\n"; - else fout << value_std(stepcut, 0.0) << " A\n"; - - if (corr_max > 0.0) - { - fout << " Correlation limit [A] : " << corr_max << endl; - } - - fout << " Quad. corr. factor : " - << value_std(delta2, ddelta2) << endl; - - fout << " Lin. corr. factor : " - << value_std(delta1, ddelta1) << endl; - - fout << " Low r sigma ratio : " << value_std(sratio, dsratio) << '\n' - << " R cutoff [A] : " << value_std(rcut, 0.0) << endl; - - value_std.leading_blank(true).left(); - fout << " Lattice parameters :" - << value_std.width(20)(a0[0], da0[0]) - << value_std.width(20)(a0[1], da0[1]) - << value_std.width(0)(a0[2], da0[2]) << '\n'; - - fout << " & angles :" - << value_std.width(20)(win[0], dwin[0]) - << value_std.width(20)(win[1], dwin[1]) - << value_std.width(0)(win[2], dwin[2]) << '\n'; - - fout << endl; - - fout << " Atom positions & occupancies :" << endl; - for (VAIT ai = atom.begin(); ai != atom.end(); ++ai) - { - fout << " " - << setw(4) << left << toupper(ai->atom_type->symbol) << setw(0); - value_std.width(20); - for (int i = 0; i < 3; i++) - { - fout << value_std(ai->pos[i], ai->dpos[i]); - } - fout << value_std.width(0)(ai->occ,ai->docc) << endl; - } - fout << endl; - - fout << " Anisotropic temperature factors :" << endl; - for (VAIT ai = atom.begin(); ai != atom.end(); ++ai) - { - fout << " " << setw(4) << toupper(ai->atom_type->symbol); - for (int i = 0; i < 3; i++) - { - fout << value_std.width(i == 2 ? 0 : 20)(ai->u[i], ai->du[i]); - } - fout << endl; - if ( ai->u[3] || ai->u[4] || ai->u[5]) - { - fout << " "; - for (int i = 3; i < 6; i++) - { - fout << value_std.width(i == 5 ? 0 : 20)(ai->u[i], ai->du[i]); - } - fout << endl; - } - } -} - -string DataSet::selectedAtomsString(int ip, char ijchar) -{ - if (!psel[ip]) return string(""); - if (ijchar != 'i' && ijchar != 'j') - { - ostringstream emsg; - emsg << "Invalid value of ijchar '" << ijchar << "'"; - throw ValueError(emsg.str()); - } - // build string of selected indices per each atom type - // also check if any type is selected and ignored at the same time - map selidxstr; - set ignored_types; - Phase* ph = psel[ip]; - set& ignored = ijchar == 'i' ? phase_ignore_i[ph] : phase_ignore_j[ph]; - for (int aidx = 0; aidx < ph->natoms; ++aidx) - { - const AtomType* atp = ph->atom[aidx].atom_type; - if (ignored.count(aidx)) ignored_types.insert(atp); - else - { - ostringstream sidx; - sidx << ' ' << aidx + 1; - selidxstr[atp] += sidx.str(); - } - } - ostringstream ssel; - for ( vector::iterator atp = ph->atom_types.begin(); - atp != ph->atom_types.end(); ++atp ) - { - if (!selidxstr.count(*atp)) continue; - ssel << " " << toupper((*atp)->symbol); - if (ignored_types.count(*atp)) ssel << selidxstr[*atp]; - } - return ssel.str(); -} - -/*********************************************************** - Outputs information about this data set - Thu Oct 13 2005 - CLF - Modified code to handle general types of - streams. -************************************************************/ -void DataSet::output(ostream& fout) -{ - FormatValueWithStd value_std; - - fout << " " << string(78,'-') << '\n' - << " DATA SET : " << iset << " (" << name << ")" << '\n' - << " " << string(78,'-') << endl; - - fout << " Data range in r [A] : " << setw(8) << left << rmin << " -> " - << setw(8) << rmax << " Step dr : " << setw(0) << deltar << endl; - - fout << " Calculated range : " << setw(8) << rcmin << " -> " - << setw(0) << rcmax << endl; - - fout << " Refinement r range : " << setw(8) << rfmin << " -> " - << setw(8) << rfmax - << " Data pts : " << setw(5) << nfmin << " -> " - << setw(0) << nfmax << endl; - - fout << - " Reduced chi squared : " << this->getdsredchisq() << '\n' << - " Rw - value : " << this->getdsrw() << '\n' << endl; - - fout << endl << " Experimental settings :" << endl; - - if (scattering_type == 'X') - fout << " Radiation : X-Rays\n"; - else - fout << " Radiation : Neutrons\n"; - - if (qmax <= 0.0) - fout << " Termination at Qmax : not applied\n"; - else - fout << " Termination at Qmax : " << qmax << " A**-1\n"; - - if (qdamp <= 0.0) - fout << " DQ dampening Qdamp : not applied\n"; - else - fout << " DQ dampening Qdamp : " << value_std(qdamp, dqdamp) << " A**-1\n"; - - if (qbroad <= 0.0) - fout << " DQ broadening Qbroad : not applied\n"; - else - fout << " DQ broadening Qbroad : " << value_std(qbroad, dqbroad) << " A**-1\n"; - - fout << " Scale factor : " << value_std(dscale, ddscale) << endl; - - fout << endl; - - fout << " Selected phases and atoms for this data set :\n"; - - for(size_t ip = 0; ip != psel.size(); ip++) - { - if (!psel[ip]) continue; - fout << " Phase " << ip+1 << " :\n"; - - fout << " Atoms (i) :"; - fout << selectedAtomsString(ip, 'i') << '\n'; - fout << " Atoms (j) :"; - fout << selectedAtomsString(ip, 'j') << '\n'; - } - fout << '\n'; - - fout << " Relative phase content in terms of\n"; - fout << " atoms unit cells mass\n"; - vector< pair > atomfractions; - vector< pair > cellfractions; - vector< pair > massfractions; - atomfractions = getAtomPhaseFractions(); - cellfractions = getCellPhaseFractions(); - massfractions = getMassPhaseFractions(); - for(size_t ip = 0; ip != psel.size(); ip++) - { - fout << " Phase " << ip + 1 << " :"; - value_std.left().width(24).leading_blank(true); - fout << value_std(atomfractions[ip].first, atomfractions[ip].second); - fout << value_std(cellfractions[ip].first, cellfractions[ip].second); - value_std.width(0); - fout << value_std(massfractions[ip].first, massfractions[ip].second); - fout << '\n'; - } - fout << endl; -} - -/************************************************* - Outputs parameter information - Thu Oct 13 2005 - CLF - Modified code to handle general types of - streams. -**************************************************/ -void Fit::output(ostream &fout) -{ - fout << " " << string(78,'-') << '\n' - << " PARAMETER INFORMATION :" << '\n' - << " " << string(78,'-') << endl; - - int npar = 0; - - for (int i=0; i order = this->order_by_id(); - vector::iterator i; - for (i = order.begin(); i != order.end(); ++i) - { - int nword = i - order.begin(); - bool lastword = (nword + 1) % 3 == 0 || nword + 1 == psize(); - double dpi = ip[*i] ? dp[*i] : 0.0; - fout << right << ' ' << setw(3) << id[*i] << setw(0) << ":" - << value_std.width(lastword ? 0 : 20)(p[*i], dpi); - fout << (lastword ? "\n" : " "); - } - - fout << " " << string(78,'-') << '\n' - << " REFINEMENT INFORMATION:\n" - << " " << string(78,'-') << endl; - - fout << " Number of iterations : " << iter << endl; - - fout << " Reduced chi squared : " << redchisq << '\n' - << " Rw - value : " << fit_rw << '\n' << endl; - - fout << " Correlations greater than 0.8 :\n\n"; - - bool lkor = false; - - for (i = order.begin(); i != order.end(); ++i) - { - if (!ip[*i]) continue; - - vector::iterator j; - for (j = i + 1; j != order.end(); ++j) - { - if (!ip[*j]) continue; - - double corr = covar[*i][*j]/dp[*i]/dp[*j]; - - if (fabs(corr) > 0.8) - { - fout << " Corr(p[" << id[*i] << "], p[" << id[*j] << "]) = " << corr << endl; - lkor = true; - } - } - } - if (!lkor) - fout << " *** none ***\n"; - } -} - - -// Parameter indices in the vector id are not ordered by default. -// Return a proper order indices for id. This method is used -// for parameters printout. -vector Fit::order_by_id() const -{ - assert(this->psize() == int(this->id.size())); - typedef pair IdIndex; - vector id_with_idx; - for (size_t i = 0; i < id.size(); ++i) - { - id_with_idx.push_back(IdIndex(id[i], i)); - } - sort(id_with_idx.begin(), id_with_idx.end()); - // build return value - vector rv; - rv.reserve(id_with_idx.size()); - vector::iterator ii; - for (ii = id_with_idx.begin(); ii != id_with_idx.end(); ++ii) - { - rv.push_back(ii->second); - } - return rv; -} - - -// End of file diff --git a/libpdffit2/parser.cc b/libpdffit2/parser.cc deleted file mode 100644 index 46a5157c..00000000 --- a/libpdffit2/parser.cc +++ /dev/null @@ -1,402 +0,0 @@ -/*********************************************************************** -* -* pdffit2 by DANSE Diffraction group -* Simon J. L. Billinge -* (c) 2006 trustees of the Michigan State University -* All rights reserved. -* -* File coded by: Jacques Bloch -* -* See AUTHORS.txt for a list of people who contributed. -* See LICENSE.txt for license information. -* -************************************************************************ -* -* Formula parser implemented as methods of Fit class -* -* Comments: -* -***********************************************************************/ - -#include -#include -#include -#include -#include - -#include "MathUtils.h" -#include "pdffit.h" - -static vector vstack; -static vector > dstack; // stack with derivative vectors -static bool deriv; - -string stackvar(int i) -{ - ostringstream expr; - expr << '#' << i; - return(expr.str()); -} - -/***************************************************************************************** - Searches for all parameters in the expression and replace them by stack pointers - *****************************************************************************************/ -string Fit::substitute_pars(string &expr) -{ - int ipos=-1, bopen, bclose; - unsigned int i; - string idexpr; - - // search the expression for the next @-sign - while((bopen=expr.find('@',ipos+1)) != (int) string::npos) - { - int id; - - istringstream inexpr(expr); - inexpr.seekg(bopen+1); - - inexpr >> id; - - if (!inexpr) - throw parseError(expr); - - bclose = inexpr.tellg(); - - // expression must be a valid parameter id - int ipar = parfind(id); - - if (ipar == -1) - { - ostringstream msg; - msg << "parameter " << id << " undefined"; - throw constraintError(msg.str()); - } - - // check if same parameter already occurred in this formula - for (i=0; i dnumdp(used.size()); - for (i=0; i()); - } - } - - return expr; // okay -} - -// get next number from expression -// only fill derivatives if that number has derivatives -double Fit::getnum(istringstream &inexpr, vector &dnumdp) -{ - double num; - char c; - int id; - map::iterator iter; - - // Various possibilities when reading the next value inside the - // unbracketted expression - - if (deriv) dnumdp.clear(); - - inexpr >> c; - - if (inexpr.eof()) - throw parseError("Error while reading value"); - - // if first character is a minus sign, call getnum again with expression stripped - // from its minus sign - if ((c=='-') || (c=='+')) - { - num = getnum(inexpr, dnumdp); - if (deriv && !dnumdp.empty() && (c=='-')) - { - for (unsigned int i=0; i check for built-in function - // read-up to next # - else if ((c>='a') && (c<='z')) - { - int start=inexpr.tellg(); - start--; - string::size_type end; - end = inexpr.str().find('#', start); - if (end == string::npos) - { - throw parseError("Error while reading builtin function arguments"); - } - - string sbuiltin = inexpr.str().substr(start,end-start); - if ((iter=builtin.find(sbuiltin)) == builtin.end()) - { - throw parseError("Unknown builtin function"); - } - - // set read pointer behind #-sign - inexpr.seekg(end+1); - - // read argument number - inexpr >> id; - if (!inexpr) - throw parseError(inexpr.str()); - num = iter->second.func(vstack[id]); - - // fill the partial derivatives if function argument had derivatives - if (deriv && !dstack[id].empty()) - { - double fder=iter->second.deriv(vstack[id]); - dnumdp = vector(used.size()); - for(unsigned int i=0; i> id; - if (!inexpr) - throw parseError(inexpr.str()); - num = vstack[id]; - if (deriv && !dstack[id].empty()) dnumdp = dstack[id]; - } - else - { - inexpr.unget(); - inexpr >> num; - - if (!inexpr) - throw parseError("Error while reading value"); - } - return num; -} - -/********************************************** - computes a basic expression without brackets - ***********************************************/ -double Fit::compute(string &expr, vector &dnumdp) -{ - ostringstream ostreamexpr; - string opstring="*/+-"; - double num1, num2, num; - vector dnum1dp, dnum2dp; - char op; // operator - - // transform string to string stream to read numbers more easily - istringstream inexpr(expr); - - // Two parsing passes are performed to ensure correct precedence of - // operators: first for * and /, then for + and - - int pass = 1; - - while(1) - { - int pos, end; - - if (deriv) dnumdp.clear(); - - pos = inexpr.tellg(); - - num1 = getnum(inexpr, dnum1dp); - - inexpr >> op; - - // check if this ends the expression - // if pass==2: expression completely parsed - // if pass==1: go to pass 2 - if (inexpr.eof()) - { - if (pass==2) - { - num = num1; - if (deriv && !dnum1dp.empty()) - dnumdp = dnum1dp; - break; - } - else - { - pass = 2; - inexpr.clear(); - inexpr.str(expr); - continue; - } - } - - if (!inexpr) - throw parseError(expr); - - if (opstring.find(op) == string::npos) - throw parseError(expr); - - // if a + or - operation is encountered in pass 1 -> look for next operation - if ( (pass==1) && ((op == '+') || op == '-') ) - { - continue; - } - - num2 = getnum(inexpr,dnum2dp); - - if (!dnum1dp.empty() || !dnum2dp.empty()) - dnumdp = vector(used.size()); - - switch (op) - { - case '+': - num = num1+num2; - - if (deriv) - { - if (!dnum1dp.empty()) dnumdp = dnum1dp; - if (!dnum2dp.empty()) - for (unsigned int i=0; i< used.size(); i++) - dnumdp[i] += dnum2dp[i]; - } - break; - - case '-': - num = num1-num2; - - if (deriv) - { - if (!dnum1dp.empty()) dnumdp = dnum1dp; - if (!dnum2dp.empty()) - for (unsigned int i=0; i< used.size(); i++) - dnumdp[i] -= dnum2dp[i]; - } - break; - - case '*': - num = num1*num2; - - if (deriv) - { - if (!dnum1dp.empty()) - for (unsigned int i=0; i< used.size(); i++) - dnumdp[i] += dnum1dp[i]*num2; - if (!dnum2dp.empty()) - for (unsigned int i=0; i< used.size(); i++) - dnumdp[i] += num1*dnum2dp[i]; - } - break; - - case '/': - num = num1/num2; - - if (deriv) - { - if (!dnum1dp.empty()) - for (unsigned int i=0; i< used.size(); i++) - dnumdp[i] += dnum1dp[i]/num2; - if (!dnum2dp.empty()) - for (unsigned int i=0; i< used.size(); i++) - dnumdp[i] -= num1*dnum2dp[i]/sqr(num2); - } - break; - } - - end = inexpr.tellg(); - - // replace computed substring by stack pointer, and push value on the stack - expr.replace(pos,end-pos,stackvar(vstack.size())); - vstack.push_back(num); - - // store the derivatives as well. Note that the derivative vector may be empty - // if no derivatives was non-zero. - if (deriv) - dstack.push_back(dnumdp); - - inexpr.clear(); - inexpr.str(expr); - inexpr.seekg(pos); - } - - // the expression has been reduced to just one number - return num; -} - -/*************************************************************************************** - Searches the formula for bracketted expressions replace them by their numerical values - ****************************************************************************************/ - -double Fit::parse(string line, vector &dnumdp) -{ - int bopen, bclose; - string expression; - double num; - - if (line.find('#') != string::npos) - throw parseError("Illegal character in formula"); - - // the first elements on the stack will be the used parameter values - vstack.clear(); - used.clear(); - - // Search for parameters, check their existence and put on the stack - line = substitute_pars(line); - - // look for first closing bracket - while( (bclose=line.find(')')) != (int) string::npos) - { - // look for closest opening bracket in front of closing bracket - if ( (bopen=line.rfind('(',bclose-1)) == (int) string::npos) - throw parseError("Unmatched brackets in formula"); - - // isolate expression within the brackets - expression = line.substr(bopen+1,bclose-bopen-1); - - // compute isolated expression - num = compute(expression, dnumdp); - - // put the bracket-value on the stack and replace substring by stack pointer, - // and push new value on the stack - line.replace(bopen,bclose-bopen+1,stackvar(vstack.size())); - vstack.push_back(num); - - if (deriv) - dstack.push_back(dnumdp); - - } - - // After all brackets have been worked out, the final expression is evaluated - num = compute(line, dnumdp); - - return num; // okay -} - -// End of file diff --git a/libpdffit2/pdf.cc b/libpdffit2/pdf.cc deleted file mode 100644 index 0ab857b6..00000000 --- a/libpdffit2/pdf.cc +++ /dev/null @@ -1,1776 +0,0 @@ -/*********************************************************************** -* -* pdffit2 by DANSE Diffraction group -* Simon J. L. Billinge -* (c) 2006 trustees of the Michigan State University -* All rights reserved. -* -* File coded by: Jacques Bloch, Pavol Juhas -* -* See AUTHORS.txt for a list of people who contributed. -* See LICENSE.txt for license information. -* -************************************************************************ -* -* Mixed methods for PDF calculation from PdfFit, DataSet and Phase -* -* Comments: Up to date with 1.3.10 Fortran version. -* What a spagetti. -* -***********************************************************************/ - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "PointsInSphere.h" -#include "StringUtils.h" -#include "LocalPeriodicTable.h" -#include "MathUtils.h" -#include "ShapeFactors.h" - -#include "pdffit.h" - -using NS_PDFFIT2::pout; - -#define NEW_SHARP - -/***************************************************************** - Allocating space for dummy dataset when calculating PDF - without data -******************************************************************/ -void PdfFit::alloc(char tp, double qmax, double qdamp, double rmin, double rmax, int bin) -{ - - DataSet* pds = new DataSet(this); - int i; - if (rmax < rmin || rmin < 0 || rmax < 0) - { - throw ValueError("Check rmin, rmax"); - } - if (bin <= 1) - { - throw ValueError("bin must be > 1"); - } - if( qmax < 0.0 ) - { - throw ValueError("qmax must be >= 0"); - } - if( qdamp < 0 ) - { - throw ValueError("qdamp must be >= 0"); - } - - // 2009-03-11 PJ: Removed check if a structure has been loaded before. - // It can be now loaded after calling alloc. - - pds->iset = nset+1; - - pds->scattering_type = tp; - - pds->qmax = qmax; - pds->qdamp = qdamp; - pds->rmin = pds->rfmin = rmin; - pds->rmax = pds->rfmax = rmax; - pds->bin = bin; - pds->deltar = (rmax-rmin)/double(bin-1); - pds->name = "Dummy set"; - - pds->obs.resize(bin); - pds->wic.resize(bin); - - for (i=0; iobs[i] = 0.0; - pds->wic[i] = 1.0; - } - - *pout << " Allocated PDF data set " << pds->iset << " (r = " - << rmin << " to " << rmax << " A, " << bin << " points) ..." << endl; - - // automatically select existing phases and its atoms for the new dataset - for (int ip=0; ipselphase(ip, this->phase[ip]); - - this->datasets.push_back(pds); - nset++; - setdata(nset); -} - -// cut-away high Q harmonics using fast Fourier transformation -void DataSet::applyQmaxCutoff(double* y, size_t len) -{ - // pad y with the same number of zeros up to the next power of 2 - size_t padlen = 2*len; - // MS compatibility fix - padlen = (size_t) pow(2.0, ceil(log2(padlen))) ; - // ycpad is complex, so it needs to be twice as long - valarray ycpad_array(2*padlen); - double* ycpad = &(ycpad_array[0]); - fill_n(ycpad, 2*padlen, 0.0); - // copy y to real components of ycpad - for (size_t i = 0; i != len; ++i) ycpad[2*i] = y[i]; - // apply fft - int status; - status = gsl_fft_complex_radix2_forward(ycpad, 1, padlen); - if (status != GSL_SUCCESS) - { - throw calculationError("Fourier Transformation failed."); - } - // Q step for ycpad - double dQ = 2*M_PI/((padlen-1)*deltar); - // loQidx, hiQidx correspond to Qmax and -Qmax frequencies - // they need to be integer to catch cases with huge qmax/dQ - int loQidx = int( ceil(qmax/dQ) ); - int hiQidx = padlen + 1 - loQidx; - // zero high Q components in ycpad - for (int i = loQidx; i < hiQidx; ++i) - { - ycpad[2*i] = ycpad[2*i+1] = 0.0; - } - // transform back - status = gsl_fft_complex_radix2_inverse(ycpad, 1, padlen); - if (status != GSL_SUCCESS) - { - throw calculationError("Fourier Transformation failed."); - } - // copy real components - for (size_t i = 0; i != len; ++i) y[i] = ycpad[2*i]; -} - - -/***************************************************** - Calculate PDF for dataset with current structure - - In initial version: one phase -******************************************************/ - -void DataSet::determine(bool ldiff, bool lout, Fit &fit) -{ - //int kk, ibin, ip; - int ib, ie, ig; - double rmax2, rmin2, gaus, rk, rb,re, rtot, ract; - vector ppp; - double dd[3], d[3], dist2, dist, rg, r; - double sigmap, sigma, gnorm, ampl; - long totcalc=0; - - if (lout) *pout << " Calculating PDF ...\n"; - - // total # points to be fitted - nfmin = nint((rfmin-rmin)/deltar); - nfmax = nint((rfmax-rmin)/deltar); - - // extend calculation range before applying Qmax cutoff - extendCalculationRange(lout); - - rmax2 = sqr(rcmax+1.0); - rmin2 = sqr(rcmin-1.0) * ((rcmin-1.0) < 0.0 ? -1.0 : 1.0); - rmin2 = max(0.01,rmin2); - - pdftot.resize(ncmax+1); - fill(pdftot.begin(), pdftot.end(), 0.0); - calc.resize(ncmax+1,psel.size()); - ppp.resize(ncmax+1); - - if (ldiff) - { - fit_a.resize(ncmax+1, fit.varsize()); - fit_a = 0.0; - } - - // ------ Loop over all phases - - for (unsigned ip=0; ip ignore_i(phase.natoms); - valarray ignore_j(phase.natoms); - for (int aidx = 0; aidx < phase.natoms; ++aidx) - { - ignore_i[aidx] = phase_ignore_i[&phase].count(aidx); - ignore_j[aidx] = phase_ignore_j[&phase].count(aidx); - } - - // ------ Get the ratio total pairs/selected weight in structure - - rtot = 0.0; - ract = 0.0; - for (int iidx = 0; iidx < phase.natoms; ++iidx) - { - Atom& ai = phase.atom[iidx]; - for (int jidx = iidx; jidx < phase.natoms; ++jidx) - { - Atom& aj = phase.atom[jidx]; - double halfloopscale = (iidx == jidx) ? 1.0 : 2.0; - rtot += halfloopscale * ai.weight * aj.weight; - // skip ignored pair - bool skip = (ignore_i[iidx] || ignore_j[jidx]) && - (ignore_i[jidx] || ignore_j[iidx]); - if (skip) continue; - ract += halfloopscale * ai.weight * aj.weight; - } - } - phase.dnorm = ract/rtot; - - //-------------------------------------------------------------- - - fill(ppp.begin() + ncmin, ppp.begin() + ncmax + 1, 0.0); - - // calculate range for PointsInSphere sequencer - // (negative rsphmin is no problem) - double buffzone = phase.circum_diameter(); - double rsphmin = sqrt(rmin2) - buffzone; - double rsphmax = sqrt(rmax2) + buffzone; - // limit rsphmax, when stepcut has been set for the phase - if (phase.stepcut > 0.0) - { - rsphmax = min(rsphmax, phase.stepcut + buffzone); - } - PointsInSphere sph( rsphmin, rsphmax, phase.a0[0]*phase.icc[0], - phase.a0[1]*phase.icc[1], phase.a0[2]*phase.icc[2], - phase.win[0], phase.win[1], phase.win[2] ); - - // loop only over selected atom indexes - for (int iidx = 0; iidx < phase.natoms; ++iidx) - { - Atom& ai = phase.atom[iidx]; - for (int jidx = iidx; jidx < phase.natoms; ++jidx) - { - Atom& aj = phase.atom[jidx]; - - // skip ignored pair - bool skip = (ignore_i[iidx] || ignore_j[jidx]) && - (ignore_i[jidx] || ignore_j[iidx]); - if (skip) continue; - - for (sph.rewind(); !sph.finished(); sph.next()) - { - for (int i=0; i<3; i++) - { - dd[i] = ai.pos[i] - aj.pos[i] - - sph.mno[i]*phase.icc[i]; - d[i] = dd[i] * phase.a0[i]; - } - dist2 = phase.skalpro(dd,dd); - - // check if pair distance is within dataset r limits - if ((dist2 < rmin2) || (dist2 > rmax2)) continue; - - // dist is distance r_ij - dist = sqrt(dist2); - - //------ Setting up 'thermal' Gaussian - sigmap = sqrt(phase.msdAtoms(ai, aj, dd)); - // neglect unphysical summed square displacements - if (sigmap <= 0.0) continue; - - //- PDF peak width modifications - new 07/2003 - -#if defined(NEW_SHARP) - // Computation of peak sharpening sigma - // sigma = sigmap* sqrt(1 - delta2/r_ij^2 - delta1/r_ij + qbroad*r_ij^2) - double corfact; - corfact = 1 - phase.delta2/dist2 - - phase.delta1/dist + sqr(qbroad)*dist2; - - // if sigma negative: set it back to 1e-5 just for this point - // note: derivative will be incorrect in this case - if (corfact <= 0) - { - continue; // neglect contribution - } - else - { - sigma = sigmap * sqrt(corfact); - } -#else - // Computation of peak sharpening sigma - // sigma = sqrt(sqr(sigmap) - delta2/r_ij^2 - delta1/r_ij + qbroad*r_ij^2) - double sigma2; - sigma2 = sqr(sigmap) - phase.delta2/dist2 - - phase.delta1/dist + sqr(qbroad)*dist2; - - // if sigma2 negative: set it back to 1e-5 just for this point - // note: derivative will be incorrect in this case - if (sigma2 <= 1e-10) - { - sigma = 1e-5; // neglect contribution - } - else - { - sigma = sqrt(sigma2); - } -#endif - // apply rcut if requested - if (dist < phase.rcut) - { - sigma *= phase.sratio; - } - - // The gaus curve is computed up to distance of 5 sigma - gnorm = 1.0/(sqrt(2.0*M_PI)*sigma); - ampl = ai.occ * ai.weight * aj.occ * aj.weight; - - if (iidx != jidx) ampl += ampl; - - rb = max(rcmin, dist - 5.0*sigma); - re = min(rcmax, dist + 5.0*sigma); - if (phase.stepcut > 0.0) - { - re = min(re, phase.stepcut); - } - - ib = nint((rb-rmin)/deltar); - ie = nint((re-rmin)/deltar); - - for(ig=ib; ig<=ie; ig++) - { - totcalc++; - rk = rmin + ig*deltar; - rg = rk-dist; - gaus = gnorm * exp(-0.5*sqr(rg/sigma)); - ppp[ig] += ampl*gaus; - - // if derivative are needed - if (ldiff) - { - pdf_derivative(phase, ai, aj, rk, - sigma, sigmap, dist, d, ampl, gaus, - fit, fit_a[ig]); - } - } - } - } - } - - //------ - Convert to proper G(r) and add to total PDF - - for (int i = ncmin; i<=ncmax; i++) - { - r = i*deltar + rmin; - - calc[i][ip] = ppp[i]/phase.np/r - 4.0*M_PI*r*phase.rho0*phase.dnorm; - - // Q-resolution envelope - if (qdamp > 0.0) - { - calc[i][ip] *= exp(-sqr(r*qdamp)/2.0); - } - - // PDF envelope for spherical nano particles - if (phase.spdiameter > 0.0) - { - calc[i][ip] *= sphereEnvelope(r, phase.spdiameter); - } - - // Empirical shape step cutoff of the PDF - if (phase.stepcut > 0.0) - { - double stepfactor = (r <= phase.stepcut) ? 1.0 : 0.0; - calc[i][ip] *= stepfactor; - } - - //if ( (r <= phase.corr_max) || (phase.corr_max <= 0.0) ) - pdftot[i] += this->dscale * phase.pscale * calc[i][ip]; - } - } - - // finalize computation of derivatives if required - // this HAS to happen before the multiplication by deltar/pi and before - // the convolution to avoid "double operations" on the derivatives, - // as this will be taken care of in the derivatives. - if (ldiff) - { - fit_setup_derivatives(fit); // computes matrix dpdf/dvar - } - - //for (i=ncmin;i<=ncmax;i++) - // *pout << i << " " << pdftot[i] << endl; - - // From here on we can restrict ourselves to the range [nfmin,nfmax] - // for the outerloop - - // Apply Qmax cutoff - if (qmax > 0.0) - { - applyQmaxCutoff(&pdftot[ncmin], ncmax-ncmin+1); - } -} - -/***************************************************************** - This routine calculates the sums over 'ij' needed for the - derivatives - this is faster than doing the complete loop - in 'pdf_determine' again .. - gaus: gaus[igaus+kk] from -******************************************************************/ -void DataSet::pdf_derivative (Phase &phase, - const Atom& atomi, const Atom& atomj, double rk, double sigma, - double sigmap, double dist, double d[3], double ampl,double gaus, - Fit &fit, double* fit_a_i) -{ - double rd,dg; - rd = dg = 0.0; - double s11,s22,s33,s12,s13,s23; - double drdx, drda, phi, dsdphi, dspdx, dspda; - int ipar, i, ioffset, joffset; - - //------ Some common calculations - - s11 = atomi.u[0] + atomj.u[0]; - s22 = atomi.u[1] + atomj.u[1]; - s33 = atomi.u[2] + atomj.u[2]; - s12 = atomi.u[3] + atomj.u[3]; - s13 = atomi.u[4] + atomj.u[4]; - s23 = atomi.u[5] + atomj.u[5]; - - rd = (rk-dist)/sigma; - - if (dist < phase.rcut) - { - phi = phase.sratio; - dsdphi = sigma/phi; - } - else - { - phi = 1.0; - dsdphi = 0.0; - } - - // derivative of T_ij wrt sigma - double T = ampl*gaus; - double dTds = T/sigma*(rd*rd-1); - double dTdr = (rk-dist)/sqr(sigma)*T; - -#if defined(NEW_SHARP) - // define s2 = sp**2 - delta2/sqr(rij) - delta1/rij + alpha*sqr(rij) - // then s = phi*sqrt(s2) - double dsds2 = sqr(phi*sigmap)/(2.0*sigma); - double dsdsp = sigma/sigmap; - double dsdr = dsds2*(2.0*phase.delta2/cube(dist) - + phase.delta1/sqr(dist) + 2.0*sqr(qbroad)*dist); -#else - // define s2 = sp**2 - delta2/sqr(rij) - delta1/rij + alpha*sqr(rij) - // then s = phi*sqrt(s2) - double dsds2 = sqr(phi)/(2.0*sigma); - if (sigma==1e-5) dsds2 = 0; - - double dsdsp = 2.0*sigmap*dsds2; - double dsdr = dsds2*(2.0*phase.delta2/cube(dist) - + phase.delta1/sqr(dist) + 2.0*sqr(qbroad)*dist); -#endif - double dspdr = - sigmap/dist; - - - - /*---------------------------------------------------------------- - //------ Derivatives per atom : x,y,z,u,o - //- ------------------------------------------------------------- - - dTdx = dTds.(dsdsp.(dspdr.drdx+dspdx) + dsdr.drdx) + dTdr.drdx - */ - - ioffset = atomi.offset; - joffset = atomj.offset; - - // ----- d/dx[ip,ia] - - if ( (fit.refvar[ioffset] != -1) || (fit.refvar[joffset] != -1) ) - { - drdx = phase.a0[0]/dist*(d[0] + phase.cosg*d[1] + phase.cosb*d[2]); - dspdx = phase.a0[0]*(d[0]*s11 + d[1]*s12 + d[2]*s13)/sqr(dist)/sigmap; - - dg = dTds*(dsdsp*(dspdr*drdx+dspdx) + dsdr*drdx) + dTdr*drdx; - } - - if ( (ipar=fit.refvar[ioffset++]) != -1) - { - fit_a_i[ipar] += dg; - } - - if ( (ipar=fit.refvar[joffset++]) != -1) - { - fit_a_i[ipar] -= dg; - } - - - // ----- d/dy[ip,ia] - - if ( (fit.refvar[ioffset] != -1) || (fit.refvar[joffset] != -1) ) - { - drdx = phase.a0[1]/dist*(phase.cosg*d[0] + d[1] + phase.cosa*d[2]); - dspdx = phase.a0[1]*(d[0]*s12 + d[1]*s22 + d[2]*s23)/sqr(dist)/sigmap; - - dg = dTds*(dsdsp*(dspdr*drdx+dspdx) + dsdr*drdx) + dTdr*drdx; - } - - if ( (ipar=fit.refvar[ioffset++]) != -1) - { - fit_a_i[ipar] += dg; - } - - if ( (ipar=fit.refvar[joffset++]) != -1) - { - fit_a_i[ipar] -= dg; - } - - - // ----- d/dz[ip,ia] - - if ( (fit.refvar[ioffset] != -1) || (fit.refvar[joffset] != -1) ) - { - drdx = phase.a0[2]/dist*(phase.cosb*d[0] + phase.cosa*d[1] + d[2]); - dspdx = phase.a0[2]*(d[0]*s13 + d[1]*s23 + d[2]*s33)/sqr(dist)/sigmap; - - dg = dTds*(dsdsp*(dspdr*drdx+dspdx) + dsdr*drdx) + dTdr*drdx; - } - - if ( (ipar=fit.refvar[ioffset++]) != -1) - { - fit_a_i[ipar] += dg; - } - - if ( (ipar=fit.refvar[joffset++]) != -1) - { - fit_a_i[ipar] -= dg; - } - - - // ----- d/du[j,ip,ia] (j=11,22,33,12,13,23) - - /* - dTdu = dTds.dsdsp.dspdu - */ - - // u[0], u[1], u[2] - - double dspdu = 1/(2.0*sigmap*sqr(dist)); - - double fsimp = dTds*dsdsp*dspdu; - - for (i=0; i<3; i++) - { - dg = fsimp*sqr(d[i]); - - if ( (ipar=fit.refvar[ioffset++]) != -1) - { - fit_a_i[ipar] += dg; - } - //*pout << phase.a0[i] << " " << d[i] << " " << ig << " " << i << " " << fit_a_i[ipar] << endl; - - if ( (ipar=fit.refvar[joffset++]) != -1) - { - fit_a_i[ipar] += dg; - } - } - - // u[3] - - dg = 2.0*fsimp*d[0]*d[1]; - - if ( (ipar=fit.refvar[ioffset++]) != -1) - { - fit_a_i[ipar] += dg; - } - - if ( (ipar=fit.refvar[joffset++]) != -1) - { - fit_a_i[ipar] += dg; - } - - // u[4] - - dg = 2.0*fsimp*d[0]*d[2]; - - if ( (ipar=fit.refvar[ioffset++]) != -1) - { - fit_a_i[ipar] += dg; - } - - if ( (ipar=fit.refvar[joffset++]) != -1) - { - fit_a_i[ipar] += dg; - } - - // u[5] - - dg = 2.0*fsimp*d[1]*d[2]; - - if ( (ipar=fit.refvar[ioffset++]) != -1) - { - fit_a_i[ipar] += dg; - } - - if ( (ipar=fit.refvar[joffset++]) != -1) - { - fit_a_i[ipar] += dg; - } - - - // ----- d/d occ[ip,ia], d/d occ[ip,ja] - - if ( (ipar=fit.refvar[ioffset++]) != -1) - { - fit_a_i[ipar] += T/atomi.occ; - } - - if ( (ipar=fit.refvar[joffset++]) != -1) - { - fit_a_i[ipar] += T/atomj.occ; - } - - //------ ---------------------------------------------------------------- - //------ Derivatives per phase : lat,delta2,delta1 - //------ ---------------------------------------------------------------- - - // ----- d/d(lattice parameter a) - - ioffset = phase.offset; - - if ( (ipar=fit.refvar[ioffset++]) != -1) - { - drda = (d[0] + phase.cosg*d[1] + phase.cosb*d[2])*d[0]/phase.a0[0]/dist; - dspda = (d[0]*s11 + d[1]*s12 + d[2]*s13)*d[0]/phase.a0[0]/sqr(dist)/sigmap; - - dg = (dTds*(dsdsp*dspdr+dsdr) + dTdr)*drda + dTds*dsdsp*dspda; - - fit_a_i[ipar] += dg; - } - - // ----- d/d(lattice parameter b) - - if ( (ipar=fit.refvar[ioffset++]) != -1) - { - drda = (phase.cosg*d[0] + d[1] + phase.cosa*d[2])*d[1]/phase.a0[1]/dist; - dspda = (d[0]*s12 + d[1]*s22 + d[2]*s23)*d[1]/phase.a0[1]/sqr(dist)/sigmap; - - dg = (dTds*(dsdsp*dspdr+dsdr) + dTdr)*drda + dTds*dsdsp*dspda; - - fit_a_i[ipar] += dg; - } - - // ----- d/d(lattice parameter c) - - if ( (ipar=fit.refvar[ioffset++]) != -1) - { - drda = (phase.cosb*d[0] + phase.cosa*d[1] + d[2])*d[2]/phase.a0[2]/dist; - dspda = (d[0]*s13 + d[1]*s23 + d[2]*s33)*d[2]/phase.a0[2]/sqr(dist)/sigmap; - - dg = (dTds*(dsdsp*dspdr+dsdr) + dTdr)*drda + dTds*dsdsp*dspda; - - fit_a_i[ipar] += dg; - } - - - // ----- d/d(lattice angle alpha) - - if ( (ipar=fit.refvar[ioffset++]) != -1) - { - drda = - rad*phase.sina*d[1]*d[2]/dist; - - dg = (dTds*(dsdsp*dspdr+dsdr) + dTdr)*drda; - - fit_a_i[ipar] += dg; - } - - // ----- d/d(lattice angle beta) - - if ( (ipar=fit.refvar[ioffset++]) != -1) - { - drda = - rad*phase.sinb*d[0]*d[2]/dist; - - dg = (dTds*(dsdsp*dspdr+dsdr) + dTdr)*drda; - - fit_a_i[ipar] += dg; - } - - // ----- d/d(lattice angle gamma) - - if ( (ipar=fit.refvar[ioffset++]) != -1) - { - drda = - rad*phase.sing*d[0]*d[1]/dist; - - dg = (dTds*(dsdsp*dspdr+dsdr) + dTdr)*drda; - - fit_a_i[ipar] += dg; - } - - // Derivatives wrt the peak sharpening parameters - - // ----- d/d(delta2) - - - if ( (ipar=fit.refvar[ioffset++]) != -1) - { - dg = -dTds*dsds2/sqr(dist); - fit_a_i[ipar] += dg; - } - - // ----- d/d(delta1) - - if ( (ipar=fit.refvar[ioffset++]) != -1) - { - dg = -dTds*dsds2/dist; - fit_a_i[ipar] += dg; - } - - // ----- d/d(pscale) - - ioffset++; - - // ----- d/d(spdiameter) - - ioffset++; - - // ----- d/d(sratio) - - if ( (ipar=fit.refvar[ioffset++]) != -1) - { - dg = dTds*dsdphi; - fit_a_i[ipar] += dg; - } - - - //------ ---------------------------------------------------------------- - //------ Derivatives per data set : dscale, qdamp, qbroad - //------ ---------------------------------------------------------------- - - ioffset = this->offset; - - // ----- d/d(dscale[is]) - - ioffset++; - - // ----- d/d(qdamp[is]) - - ioffset++; - - // ----- d/d(qbroad[ip]) - - if( (ipar=fit.refvar[ioffset++]) != -1) - { - dg = dTds*dsds2*(2.0*qbroad*sqr(dist)); - fit_a_i[ipar] += dg; - } - -} - - -/**************************************************************** -* Calculated average atom mass in this phase -*****************************************************************/ -double Phase::averageAtomicMass() -{ - double mavg = 0.0; - for (VAIT ai = atom.begin(); ai != atom.end(); ++ai) - { - mavg += ai->occ * ai->atom_type->M; - } - mavg /= np; - return mavg; -} - -/**************************************************************** -* Calculated average scattering factor for given radiation type -*****************************************************************/ -double Phase::averageScatteringFactor(char tp) -{ - double bavg = 0.0; - for (VAIT ai = atom.begin(); ai != atom.end(); ++ai) - { - bavg += ai->occ * ai->atom_type->sf(tp); - } - bavg /= np; - return bavg; -} - -/**************************************************************** -* Update atom weights for given scattering type -*****************************************************************/ -void Phase::setup_weights(char tp) -{ - // calculate average scattering factor - double bavg = averageScatteringFactor(tp); - // get normalized weight of each atom - for (VAIT ai = atom.begin(); ai != atom.end(); ++ai) - { - ai->weight = ai->atom_type->sf(tp) / bavg; - } -} - -/************************************************************************ -* Extend r-range by 6 ripples of sinc before applying Qmax cutoff. -* Contributions from peaks outside should be less than 1.5%. -* -* todo: should also extend by the 5*max(sigma) -************************************************************************/ -void DataSet::extendCalculationRange(bool lout) -{ - const int nripples = 6; - // initialize calculation range to fitting range - rcmin = rfmin; - rcmax = rfmax; - ncmin = nint((rcmin - rmin)/deltar); - ncmax = nint((rcmax - rmin)/deltar); - // check if Qmax cutoff is applied - if (!(0.0 < qmax)) return; - // get extension width - double rext = nripples*2*M_PI/qmax; - // FIXME - it should be possible to have rcmin smaller than rmin, - // but there is too much spaghetti that depends on it. - rcmin = max(rmin, rfmin - rext); - rcmax = rfmax + rext; - ncmin = nint((rcmin - rmin)/deltar); - ncmax = nint((rcmax - rmin)/deltar); - if (lout) - { - *pout << " Extending PDF search distance to " << - rcmin << " -> " << rcmax << " A ...\n"; - } -} - -/************************************************************************ - * Diameter of sphere that can enclose primitive cell. - * This is equal to the longest unit cell diagonal. - ************************************************************************/ -double Phase::circum_diameter() -{ - if (atom.empty()) return 0.0; - // array of all 4 diagonals - const size_t numdiags = 4; - static double ucdiagonals[numdiags][3] = { - {+1.0, +1.0, +1.0}, - {-1.0, +1.0, +1.0}, - {+1.0, -1.0, +1.0}, - {+1.0, +1.0, -1.0} - }; - double maxnorm = -1; - for (size_t idx = 0; idx != numdiags; ++idx) - { - const double* ucd = ucdiagonals[idx]; - double normucd = sqrt(skalpro(ucd, ucd)); - if (normucd > maxnorm) - { - maxnorm = normucd; - } - } - // adjust to round-off errors - const double epsilond = sqrt(numeric_limits().epsilon()); - maxnorm = maxnorm*(1.0+epsilond) + epsilond; - return maxnorm; -} - -/************************************************************************ - * combined mean square displacements of 2 atoms along lattice vector - ************************************************************************/ -double Phase::msdAtoms(const Atom& ai, const Atom& aj, double* vl) -{ - // msd = transpose(gten*vln) * ar[i]*U[i,j]*ar[j] * gten*vln - // normalize vl - double vlnorm = sqrt(skalpro(vl,vl)); - double vln[3] = { vl[0]/vlnorm, vl[1]/vlnorm, vl[2]/vlnorm }; - // combine squared atom displacements - double U[6]; - for (size_t i = 0; i != 6; ++i) - { - U[i] = ai.u[i] + aj.u[i]; - } - // Un = ar[i]*U[i,j]*ar[j] - double Un[6] = { U[0]*ar[0]*ar[0], U[1]*ar[1]*ar[1], U[2]*ar[2]*ar[2], - U[3]*ar[0]*ar[1], U[4]*ar[0]*ar[2], U[5]*ar[1]*ar[2] }; - // rhs = gten*vln - double rhs[3] = { 0.0, 0.0, 0.0 }; - for (size_t i = 0; i != 3; ++i) - { - for (size_t j = 0; j != 3; ++j) - { - rhs[i] += gten[i][j] * vln[j]; - } - } - // msd = transpose(rhs) * Un * rhs - double msd; - msd = Un[0]*rhs[0]*rhs[0] + Un[1]*rhs[1]*rhs[1] + Un[2]*rhs[2]*rhs[2] + - 2*Un[3]*rhs[0]*rhs[1] + 2*Un[4]*rhs[0]*rhs[2] + 2*Un[5]*rhs[1]*rhs[2]; - return msd; -} - -/********************************* ------- - Save fit results - Thu Oct 13 2005 - CLF - Changed code to return a string of the - saved file. Actually saving the file is - optional. -*********************************/ -string PdfFit::save_res(string fname) -{ - //check to see if a refinement has even been done. - //after a refinement is finished, fit.iter = -1 - if(fit.iter == 0) - { - throw unassignedError("Refinement must be performed first"); - } - ofstream fout; - stringstream outfilestream; - string outfilestring = ""; - - outfilestream << " " << string(78,'=') << endl - << " PDF REFINEMENT\n" - << " Using PDFFIT version : " << PdfFit::version() << endl - << " " << string(78,'=') << endl; - - for(int ip=0; ipoutput(outfilestream); - - fit.output(outfilestream); - - outfilestream << " " << string(78,'=') << endl; - - if( fname != "" ) - { - fout.open(fname.c_str()); - - if (!fout) - { - throw IOError("Cannot create output file"); - } - - *pout << " Saving fit results to file : " << fname << endl; - - fout << outfilestream.str(); - //fout.setf(ios::showpoint); - - fout.close(); - } - - return outfilestream.str(); -} - -/************************************************* - ------- Save PDF, structure or complete result - Thu Oct 13 2005 - CLF - Changed code to return a string of the - saved file. Actually saving the file is - optional. -**************************************************/ -string PdfFit::save_pdf(int iset, string fname) -{ - string outfilestring = ""; - - //------ - Save PDF (G(r)) - - if ( (iset < 1) || (iset > nset) ) - { - throw unassignedError("data set does not exist"); - } - else if( fname != "" ) - { - ofstream fout; - fout.open(fname.c_str()); - - if (!fout) - { - throw IOError("cannot create output file"); - } - - *pout << " Saving PDF data set " << iset << " to file : " << fname << endl; - - outfilestring = datasets[iset-1]->build_pdf_file(); - - fout << outfilestring; - fout.close(); - } - else - { - outfilestring = datasets[iset-1]->build_pdf_file(); - } - - return outfilestring; -} - - -/* - Thu Oct 13 2005 - CLF - Changed code to return a string of the - saved file. -*/ -string DataSet::build_pdf_file() -{ - string blank=string(4,' '); - stringstream outfilestream; - outfilestream.setf(ios::showpoint); - - for (int i=nfmin;i<=nfmax;i++) - { - double r = i*deltar + rmin; - outfilestream << setw(12) << r << blank << setw(12) << pdftot[i] << blank << setw(12) << 0.0 - << blank << setw(12) << 1.0/sqrt(wic[i]) << blank << setw(12) - << obs[i]-pdftot[i] << endl; - } - - return outfilestream.str(); -} - -//------ - Save DIF file (Gobs-G(r)) -/* - Thu Oct 13 2005 - CLF - Changed code to return a string of the - saved file. Actually saving the file - is optional. -*/ - -string PdfFit::save_dif(int iset, string fname) -{ - - ofstream fout; - string outfilestring = ""; - - if ( (iset < 1) || (iset > nset) ) - { - throw unassignedError("Data set does not exist"); - } - else if (fname != "" ) - { - fout.open(fname.c_str()); - - if (!fout) - { - throw IOError("Cannot create output file"); - } - - *pout << " Saving difference data set " << iset << " to file : " << fname << endl; - - outfilestring = datasets[iset-1]->build_dif_file(); - - fout << outfilestring; - fout.close(); - } - else - { - outfilestring = datasets[iset-1]->build_dif_file(); - } - - return outfilestring; -} - -/* - Thu Oct 13 2005 - CLF - Changed code to return a string of the saved file. -*/ -string DataSet::build_dif_file() -{ - string blank=string(4,' '); - stringstream outfilestream; - outfilestream.setf(ios::showpoint); - - for (int i=nfmin;i<=nfmax;i++) - { - double r = i*deltar + rmin; - outfilestream << setw(12) << r << blank << setw(12) << obs[i]-pdftot[i] << endl; - } - - return outfilestream.str(); -} - -void PdfFit::selphase(int ip) -{ - if (!curset) - { - throw unassignedError("No data set selected"); - } - assert(nphase == (int)phase.size()); - if (ip == ALL) - { - curset->psel = phase; - } - else - { - // check if one-based index ip is out of bounds - if (ip < 1 || ip > nphase) - { - stringstream eout; - eout << "Phase " << ip << " undefined"; - throw unassignedError(eout.str()); - } - curset->selphase(ip - 1, phase[ip - 1]); - } -} - -void DataSet::selphase(int ip, Phase *phase) -{ - if (int(psel.size()) <= ip) - { - psel.resize(ip+1); - } - psel[ip] = phase; -} - - -vector DataSet::getcrw() const -{ - assert(mowner); - double wsqobs = mowner->totalWeighedSquareObs(); - // Get reciprocal value of wsqobs. - // Do not normalize when wsqobs is zero. - double recwsqobs = (wsqobs > 0) ? (1.0 / wsqobs) : 1.0; - vector rv = this->cumchisq; - vector::iterator xi; - for (xi = rv.begin(); xi != rv.end(); ++xi) - { - *xi = sqrt(*xi * recwsqobs); - } - return rv; -} - - -double DataSet::weighedSquareObs() const -{ - double rv = 0; - for (int i = nfmin; i <= nfmax; i++) - { - rv += wic[i] * obs[i] * obs[i]; - } - return rv; -} - - -double DataSet::getdsrw() const -{ - vector crw = this->getcrw(); - double rv = crw.empty() ? 0.0 : crw.back(); - return rv; -} - - -double DataSet::getdsredchisq() const -{ - assert(mowner); - int nredobs = mowner->totalReducedObservations(); - double c2 = this->cumchisq.empty() ? 0.0 : this->cumchisq.back(); - double rv = (nredobs > 0) ? (c2 / nredobs) : 0.0; - return rv; -} - - -void PdfFit::pdesel(int ip) -{ - if (!curset) - { - throw unassignedError("No data set selected"); - } - assert(nphase == (int)curset->psel.size()); - if (ip == ALL) - { - fill(curset->psel.begin(), curset->psel.end(), - static_cast(NULL)); - } - else - { - // check if one-based index ip is out of bounds - if (ip < 1 || ip > nphase) - { - stringstream eout; - eout << "phase " << ip << " undefined"; - throw unassignedError(eout.str()); - } - curset->psel[ip - 1] = NULL; - } -} - -// phase[ip-1] or curphase for ip == 0 -Phase* PdfFit::getphase(int ip) -{ - Phase* ph = (0 < ip && ip <= nphase) ? phase[ip-1] : curphase; - if (!ph || ip < 0 || ip > nphase) - { - throw unassignedError("Phase does not exist."); - } - return ph; -} - -void PdfFit::check_sel_args(int ip, char ijchar, int aidx1) -{ - ostringstream emsg; - if (!curset) - { - throw unassignedError("No data set selected"); - } - if (ip < 1 || ip > int(curset->psel.size())) - { - emsg << "phase " << ip << " undefined or not selected\n"; - throw unassignedError(emsg.str()); - } - if (ijchar != 'i' && ijchar != 'j') - { - ostringstream emsg; - emsg << "Invalid value of ijchar '" << ijchar << "'"; - throw ValueError(emsg.str()); - } - if (aidx1 < 1 || aidx1 > (curset->psel[ip - 1]->natoms)) - { - emsg << "invalid atom index " << aidx1 << ".\n"; - throw ValueError(emsg.str()); - } -} - -void PdfFit::selphaseForEachDataSet(Phase* ph) -{ - // find 0-based index of ph in PdfFit::phase vector - assert(count(this->phase.begin(), this->phase.end(), ph) > 0); - int phidx0 = find(this->phase.begin(), this->phase.end(), ph) - - this->phase.begin(); - vector::iterator dsi; - for (dsi = this->datasets.begin(); dsi != this->datasets.end(); ++dsi) - { - DataSet* pds = *dsi; - pds->selphase(phidx0, ph); - } -} - -void PdfFit::selectAtomType(int ip, char ijchar, char* symbol, bool select) -{ - check_sel_args(ip, ijchar); - Phase* ph = curset->psel[ip - 1]; - const LocalPeriodicTable* lpt = ph->getPeriodicTable(); - const AtomType* atp = lpt->lookup(symbol); - set& ignored = ijchar == 'i' ? - curset->phase_ignore_i[ph] : curset->phase_ignore_j[ph]; - for (int aidx = 0; aidx < ph->natoms; ++aidx) - { - if (atp != ph->atom[aidx].atom_type) continue; - if (select) ignored.erase(aidx); - else ignored.insert(aidx); - } -} - -void PdfFit::selectAtomIndex(int ip, char ijchar, int aidx1, bool select) -{ - check_sel_args(ip, ijchar, aidx1); - Phase* ph = curset->psel[ip - 1]; - set& ignored = ijchar == 'i' ? - curset->phase_ignore_i[ph] : curset->phase_ignore_j[ph]; - int aidx = aidx1 - 1; - if (select) ignored.erase(aidx); - else ignored.insert(aidx); -} - -void PdfFit::selectAll(int ip, char ijchar) -{ - check_sel_args(ip, ijchar); - Phase* ph = curset->psel[ip - 1]; - set& ignored = ijchar == 'i' ? - curset->phase_ignore_i[ph] : curset->phase_ignore_j[ph]; - ignored.clear(); -} - -void PdfFit::selectNone(int ip, char ijchar) -{ - check_sel_args(ip, ijchar); - Phase* ph = curset->psel[ip - 1]; - set& ignored = ijchar == 'i' ? - curset->phase_ignore_i[ph] : curset->phase_ignore_j[ph]; - for (int aidx = 0; aidx < ph->natoms; ++aidx) ignored.insert(aidx); -} - -/***************************************** - Wed Oct 12 2005 - CLF - Reads observed PDF from arrays. -******************************************/ -int PdfFit::read_data_arrays(char tp, double qmax, double qdamp, - int length, double * r_data, double * Gr_data, double * dGr_data, string _name) -{ - DataSet* pds = new DataSet(this); - - try { - pds->read_data_arrays(nset+1, tp, qmax, qdamp, length, - r_data, Gr_data, dGr_data, _name); - } - catch(Exception e) { - delete pds; - throw; - } - - // automatically select existing phases and its atoms for the new dataset - for (int ip=0; ipselphase(ip, this->phase[ip]); - - this->datasets.push_back(pds); - nset++; - setdata(nset); - - return 1; -} - -/***************************************** - Wed Oct 12 2005 - CLF - Reads observed PDF from a c-style string. -******************************************/ - -int PdfFit::read_data_string(string& buffer, char tp, double qmax, double qdamp, string _name) -{ - DataSet* pds = new DataSet(this); - try { - pds->read_data_string(nset+1, buffer, tp, qmax, qdamp); - } - catch(Exception e) { - delete pds; - throw; - } - // automatically select existing phases and its atoms for the new dataset - for (int ip = 0; ip < nphase; ip++) pds->selphase(ip, this->phase[ip]); - - this->datasets.push_back(pds); - nset++; - setdata(nset); - - return 1; -} - -/***************************************** - Reads observed PDF as xy ASCII file. -******************************************/ - -int PdfFit::read_data(string datafile, char tp, double qmax, double qdamp) -{ - DataSet* pds = new DataSet(this); - try { - pds->read_data(nset+1, datafile, tp, qmax, qdamp); - } - catch(Exception e) { - delete pds; - throw; - } - - // automatically select existing phases and its atoms for the new dataset - for (int ip=0; ipselphase(ip, this->phase[ip]); - - this->datasets.push_back(pds); - nset++; - setdata(nset); - - return 1; -} - -// local helper to check for regular spacing in sequence -namespace { - -template -bool isRegular(Iterator first, Iterator last) -{ - if (last - first < 2) return true; - double dx = double( *(last-1) - *first ) / double(last - first - 1); - for (Iterator p0 = first, p1 = first + 1; p1 != last; ++p0, ++p1) - { - if (fabs(*p1 - *p0 - dx) > deltar_tol) return false; - } - return true; -} - -} // local namespace - - -/* Wed Oct 12 2005 - CLF - * Using read_data_arrays adds functionality - * to pdffit2, allowing one to read data that is alread stored as arrays. - */ -void DataSet::read_data_arrays(int _iset, char tp, double _qmax, double _qdamp, - int length, double * r_data, double * Gr_data, - double * dGr_data, string _name ) -{ - iset = _iset; - - //------ Now analyse given parameters - - //------ - get exp. method (neutron/x-ray) - - scattering_type = tp; - - //------ - get QMAX and Qdamp - - qmax = _qmax; - qdamp = _qdamp; - - //------ Finally we actually read the data - - bool lwei = true; - - /* Only really care about G(r) and dG(r), the uncertainty */ - for( int i = 0; i < length; i++ ) - { - double wic; - - if( dGr_data == NULL ) - { - wic = 1.0; - lwei = false; - } - else - { - wic = 1.0/sqrt( dGr_data[i] ); - } - - this->obs.push_back( Gr_data[i] ); - this->wic.push_back(wic); - - } - - *pout << " Reading data from arrays...\n"; - - rmin = rfmin = r_data[0]; - rmax = rfmax = r_data[length - 1]; - bin = length; - deltar = (rmax - rmin)/double(bin-1); - // check if r has equidistant spacing - if (!isRegular(r_data, r_data + length)) - { - throw dataError("Irregular spacing of r values."); - } - name = _name; - - *pout << " Read PDF data set " << iset << - " (r = " << rmin << " to " << rmax << " A, " << - bin << " points) ...\n"; - if (!lwei) this->warningOnMissingWeights(); - *pout << endl; - - return; -} - -void DataSet::read_data_stream(int _iset, istream& fdata, - char tp, double _qmax, double _qdamp, string _name) -{ - string line; - - iset = _iset; - - //------ - get exp. method (neutron/x-ray) - - scattering_type = tp; - - //------ - get QMAX and Qdamp - - qmax = _qmax; - qdamp = _qdamp; - - //------ Ignore header lines - getline(fdata, line); - if (line.compare(0, 7, "History") == 0) - { - for ( ; !fdata.eof(); getline(fdata,line)) - { - if (line[0] != '#') continue; - // get 3 words from line - string w0, w1, w2; - istringstream fline(line); - fline >> w0 >> w1 >> w2; - if ( w0.find_first_not_of('#') == string::npos && - w1 == "start" && w2 == "data" ) break; - } - } - //------ Any other header lines starting with # ? - while (line[0] == '#') getline(fdata,line); - - //------ Finally we actually read the data - - // find number of columns - int ncol = 0; - if (!line.empty()) - { - double x; - istringstream sline(line); - while (sline >> x) ++ncol; - } - - vector r_data; - bool lwei = (ncol > 2); // flag for weights defined by dGr - - while (true) - { - double ri, obs; - double val, wic; - istringstream sline(line); - - sline >> ri >> obs; - if (!sline) break; - - // Obtain weights from dGr. Use dGr values only when they are all - // positive, otherwise set all weights to 1. - wic = 1.0; - switch (ncol) - { - case 3: - if (sline >> val && val > 0.0) - { - wic = 1.0/sqr(val); - } - else - { - lwei = false; - } - break; - case 4: - // skip one value - if (sline >> val >> val && val > 0.0) - { - wic = 1.0/sqr(val); - } - else - { - lwei = false; - } - break; - } - - // copy values to data arrays - r_data.push_back(ri); - this->obs.push_back(obs); - this->wic.push_back(wic); - - if (!getline(fdata, line)) break; - } - - // make sure all wic values are one when lwei is false, because - // lwei could be reset due to zero dGr value - if (!lwei) - { - fill(this->wic.begin(), this->wic.end(), 1.0); - } - - *pout << " Reading " << ncol << " columns ...\n"; - - if (!isRegular(r_data.begin(), r_data.end())) - { - throw dataError("Irregular spacing of r values."); - } - if (this->obs.size() < 2) - { - throw dataError("Incredibly short data set."); - } - bin = this->obs.size(); - this->rmin = this->rfmin = r_data.front(); - this->rmax = this->rfmax = r_data.back(); - this->nfmin = 0; - this->nfmax = bin - 1; - this->deltar = (rmax - rmin)/double(bin-1); - this->name = _name; - - *pout << " Read PDF data set " << iset << " (r = " << rmin - << " to " << rmax << " A, " << bin << " points) ...\n"; - - if (!lwei) this->warningOnMissingWeights(); - - *pout << endl; - - return; -} - -/* Wed Oct 12 2005 - CLF - * Using read_data_string adds functionality - * to pdffit2, allowing one to read data that has already been loaded. - * - * - * Thu Nov 3 2005 - CLF - * Need to add some data checking routines! - */ -void DataSet::read_data_string(int _iset, string& buffer, char tp, double _qmax, - double _qdamp, string _name) -{ - istringstream fdata(buffer); - read_data_stream(_iset, fdata, tp, _qmax, _qdamp, _name); - return; -} - -/* Wed Oct 12 2005 - CLF - * Using read_data and the above read_data_string adds functionality - * to pdffit2, allowing one to read data that has already been loaded. - */ -void DataSet::read_data(int _iset, string pfile, char tp, double _qmax, - double _qdamp) -{ - // open and check pfile - ifstream fdata(pfile.c_str()); - if (!fdata) throw IOError("File does not exist"); - // read the data - read_data_stream(_iset, fdata, tp, _qmax, _qdamp, pfile); - return; -} - -/********************************* - Sets R-range for fitting -**********************************/ -void PdfFit::range(int is, double rmin, double rmax) -{ - if( rmin >= rmax ) - { - throw ValueError("rmin must be < rmax"); - } - if (is == ALL) - { - for(is = 0; is < nset; is++) datasets[is]->range(rmin,rmax); - } - else - { - if ( (is >= 1) && (is <= nset) ) - { - datasets[is-1]->range(rmin,rmax); - } - else - { - throw ValueError("Invalid data set number"); - } - } -} - -void DataSet::range(double rmin, double rmax) -{ - if ( (rmin >= this->rmin) && (rmin <= this->rmax) - && (rmax <= this->rmax) && (rmin < rmax) ) - { - this->rfmin = rmin; - this->rfmax = rmax; - } - else - { - throw ValueError("Range outside data set limits"); - } -} - -vector< pair > DataSet::getAtomPhaseFractions() -{ - size_t nphase = psel.size(); - valarray xi(nphase); - valarray dxi(nphase); - for (size_t ip = 0; ip < nphase; ip++) - { - Phase* ph = psel[ip]; - if (!ph) - { - xi[ip] = 0.0; - dxi[ip] = 0.0; - } - else - { - double bavg = ph->averageScatteringFactor(scattering_type); - xi[ip] = ph->pscale / (bavg*bavg); - dxi[ip] = ph->dpscale / (bavg*bavg); - } - } - double xtot = xi.sum(); - vector< pair > rv(nphase, make_pair(0.0, 0.0)); - double dx2tot = (dxi * dxi).sum(); - // get normalized phase fractions fi, do this only when xtot > 0 - for (size_t ip = 0; ip < nphase && 0.0 < xtot; ip++) - { - double fi = xi[ip] / xtot; - double dfi2 = ( dxi[ip]*dxi[ip] * (xtot*xtot - 2*xtot*xi[ip]) + - xi[ip]*xi[ip]*dx2tot ) / pow(xtot, 4); - double dfi = sqrt(dfi2); - rv[ip].first = fi; - rv[ip].second = dfi; - } - return rv; -} - -vector< pair > DataSet::getCellPhaseFractions() -{ - size_t nphase = psel.size(); - valarray xi(nphase); - valarray dxi(nphase); - for (size_t ip = 0; ip < nphase; ip++) - { - Phase* ph = psel[ip]; - if (!ph) - { - xi[ip] = 0.0; - dxi[ip] = 0.0; - } - else - { - double bavg = ph->averageScatteringFactor(scattering_type); - xi[ip] = ph->pscale / (bavg*bavg * ph->np); - dxi[ip] = ph->dpscale / (bavg*bavg * ph->np); - } - } - double xtot = xi.sum(); - vector< pair > rv(nphase, make_pair(0.0, 0.0)); - double dx2tot = (dxi * dxi).sum(); - // get normalized phase fractions fi, do this only when xtot > 0 - for (size_t ip = 0; ip < nphase && 0.0 < xtot; ip++) - { - double fi = xi[ip] / xtot; - double dfi2 = ( dxi[ip]*dxi[ip] * (xtot*xtot - 2*xtot*xi[ip]) + - xi[ip]*xi[ip]*dx2tot ) / pow(xtot, 4); - double dfi = sqrt(dfi2); - rv[ip].first = fi; - rv[ip].second = dfi; - } - return rv; -} - -vector< pair > DataSet::getMassPhaseFractions() -{ - size_t nphase = psel.size(); - valarray xi(nphase); - valarray dxi(nphase); - for (size_t ip = 0; ip < nphase; ip++) - { - Phase* ph = psel[ip]; - if (!ph) - { - xi[ip] = 0.0; - dxi[ip] = 0.0; - } - else - { - double bavg = ph->averageScatteringFactor(scattering_type); - double mavg = ph->averageAtomicMass(); - xi[ip] = ph->pscale * mavg / (bavg*bavg); - dxi[ip] = ph->dpscale * mavg / (bavg*bavg); - } - } - double xtot = xi.sum(); - vector< pair > rv(nphase, make_pair(0.0, 0.0)); - double dx2tot = (dxi * dxi).sum(); - // get normalized phase fractions fi, do this only when xtot > 0 - for (size_t ip = 0; ip < nphase && 0.0 < xtot; ip++) - { - double fi = xi[ip] / xtot; - double dfi2 = ( dxi[ip]*dxi[ip] * (xtot*xtot - 2*xtot*xi[ip]) + - xi[ip]*xi[ip]*dx2tot ) / pow(xtot, 4); - double dfi = sqrt(dfi2); - rv[ip].first = fi; - rv[ip].second = dfi; - } - return rv; -} - - -void DataSet::warningOnMissingWeights() const -{ - *pout << - " ****WARN****\n" << - " Uncertainties on G(r) were absent or unreadable in your input\n" << - " data. The program reset these uncertainties to unity. This\n" << - " does not affect at all the refined parameter values. However,\n" << - " the values of the estimated uncertainties on these refined\n" << - " parameter values are not reliable.\n" << - " ****WARN****\n"; -} - -// End of file diff --git a/libpdffit2/pdffit.cc b/libpdffit2/pdffit.cc deleted file mode 100644 index 7eaa5f49..00000000 --- a/libpdffit2/pdffit.cc +++ /dev/null @@ -1,372 +0,0 @@ -/*********************************************************************** -* -* pdffit2 by DANSE Diffraction group -* Simon J. L. Billinge -* (c) 2006 trustees of the Michigan State University -* All rights reserved. -* -* File coded by: Jacques Bloch, Chris Farrow -* -* See AUTHORS.txt for a list of people who contributed. -* See LICENSE.txt for license information. -* -************************************************************************ -* -* PdfFit and Fit methods for implementing PDFFIT1 interpreter commands. -* -* Comments: -* -***********************************************************************/ - -#include -#include -#include -#include -#include - -#include "MathUtils.h" -#include "pdffit.h" - - -// class methods - -const string& PdfFit::version(const char* ver) -{ - static unique_ptr vervalue; - static const string undefined_version = "1.0?"; - // definition of the version value. This should be only called once, - // when the pdffit2 module is initialized. We allow redefinition - // with the same version as this may happen when pdffit2 gets reloaded. - if (ver) - { - if (!vervalue.get()) - { - vervalue.reset(new string(ver)); - } - else if (*vervalue != ver) - { - ostringstream emsg; - emsg << "Invalid redefinition of PdfFit::version."; - throw invalid_argument(emsg.str()); - } - } - // take care of return value rv. - const string& rv = vervalue.get() ? *vervalue : undefined_version; - return rv; -} - - -// constructor and destructor - - -PdfFit::PdfFit() -{ - reset(); - init(); -} - - -PdfFit::~PdfFit() -{ - reset(); -} - - -/********************************************************** - resets the data sets and crystal structures to empty -***********************************************************/ - -void PdfFit::reset() -{ - //------ Data sets - - vector::iterator dsi = this->datasets.begin(); - for (; dsi != this->datasets.end(); ++dsi) delete *dsi; - this->datasets.clear(); - this->nset = 0; - this->curset = NULL; - - //------ Structure - - vector::iterator phi = this->phase.begin(); - for (; phi != this->phase.end(); ++phi) delete *phi; - this->phase.clear(); - this->nphase = 0; - this->curphase = NULL; - this->total = 0; - - // ------ Fit - - this->fit.reset(); -} - -void Fit::reset() -{ - // reset all data members to initial values - alambda = chisq = ochisq = fit_rw = redchisq = wnorm = 1.0; - stagnating = ntot = ndof = 1; - iter = 0; - // clean all arrays - p.clear(); - dp.clear(); - id.clear(); - ip.clear(); - covar.clear(); - alpha.clear(); - var.clear(); - dvar.clear(); - vref.clear(); - vcovar.clear(); - fconstraint.clear(); - form.clear(); - idef.clear(); - ctype.clear(); - used.clear(); - dvdp.clear(); - sdptr.clear(); - refvar.clear(); -} - - -void Fit::init_builtins() -{ - typedef pair entry; - builtin.insert(entry("-",Builtin(neg,dneg))); - builtin.insert(entry("sin",Builtin(sin,dsin))); - builtin.insert(entry("cos",Builtin(cos,dcos))); - builtin.insert(entry("tan",Builtin(tan,dtan))); - builtin.insert(entry("sind",Builtin(sind,dsind))); - builtin.insert(entry("cosd",Builtin(cosd,dcosd))); - builtin.insert(entry("tand",Builtin(tand,dtand))); - builtin.insert(entry("asin",Builtin(asin,dasin))); - builtin.insert(entry("acos",Builtin(acos,dacos))); - builtin.insert(entry("atan",Builtin(atan,datan))); - builtin.insert(entry("asind",Builtin(asind,dasind))); - builtin.insert(entry("acosd",Builtin(acosd,dacosd))); - builtin.insert(entry("atand",Builtin(atand,datand))); - builtin.insert(entry("exp",Builtin(exp,dexp))); - builtin.insert(entry("log",Builtin(log,dlog))); - builtin.insert(entry("sqr",Builtin(sqr,dsqr))); - builtin.insert(entry("cube",Builtin(cube,dcube))); - builtin.insert(entry("sqrt",Builtin(sqrt,dsqrt))); -} - -/* - Initialization routine -*/ -void PdfFit::init() // called setup in Fortran program -{ - fit.init_builtins(); -} - -void PdfFit::setphase(int ip) -{ - if ((ip<1) || (ip > nphase)) - { - stringstream eout; - eout << "Warning: phase " << ip << " undefined"; - throw unassignedError(eout.str()); - } - - Phase &phase=*this->phase[ip-1]; - - curphase = &phase; - - lat.resize(6); - lat[0].setptr(&phase.a0[0]); - lat[1].setptr(&phase.a0[1]); - lat[2].setptr(&phase.a0[2]); - lat[3].setptr(&phase.win[0]); - lat[4].setptr(&phase.win[1]); - lat[5].setptr(&phase.win[2]); - - pscale.setptr(&phase.pscale); - spdiameter.setptr(&phase.spdiameter); - stepcut.setptr(&phase.stepcut); - delta2.setptr(&phase.delta2); - delta1.setptr(&phase.delta1); - sratio.setptr(&phase.sratio); - rcut.setptr(&phase.rcut); - - x.resize(phase.natoms); - y.resize(phase.natoms); - z.resize(phase.natoms); - u11.resize(phase.natoms); - u22.resize(phase.natoms); - u33.resize(phase.natoms); - u12.resize(phase.natoms); - u13.resize(phase.natoms); - u23.resize(phase.natoms); - occ.resize(phase.natoms); - - for(int ia=0; ia nset)) - { - stringstream eout; - eout << "Warning: set " << is << " undefined"; - throw unassignedError(eout.str()); - } - - DataSet* pds = this->datasets[is-1]; - - curset = pds; - - dscale.setptr( &(pds->dscale) ); - qdamp.setptr( &(pds->qdamp) ); - qbroad.setptr( &(pds->qbroad) ); -} - - -const vector& DataSet::getpdf_obs() -{ - return this->obs; -} - - -const vector& DataSet::getpdf_fit() -{ - if (this->pdftot.empty()) - { - size_t n = this->obs.size(); - this->pdftot.assign(n, 0.0); - } - return this->pdftot; -} - - -vector PdfFit::getpdf_obs() -{ - if (!curset) - { - throw unassignedError("No data loaded"); - } - return curset->getpdf_obs(); -} - -vector PdfFit::getpdf_fit() -{ - if (!curset) - { - throw unassignedError("No fit data"); - } - return curset->getpdf_fit(); -} - -int PdfFit::getnfmin() -{ - if (!curset) - { - throw unassignedError("No data loaded"); - } - return curset->nfmin; -} - -int PdfFit::getnfmax() -{ - if (!curset) - { - throw unassignedError("No data loaded"); - } - return curset->nfmax; -} - -double PdfFit::getdeltar() -{ - if (!curset) - { - throw unassignedError("No data loaded"); - } - return curset->deltar; -} - -double PdfFit::getrmin() -{ - if (!curset) - { - throw unassignedError("No data loaded"); - } - return curset->rmin; -} - -double PdfFit::getrmax() -{ - if (!curset) - { - throw unassignedError("No data loaded"); - } - return curset->rmax; -} - -vector PdfFit::getcrw() const -{ - if (!curset) - { - throw unassignedError("No data loaded"); - } - return curset->getcrw(); -} - -map > PdfFit::getPhaseFractions() -{ - if (!curset) - { - const char* emsg = "Dataset not defined, unknown scattering type"; - throw unassignedError(emsg); - } - map > rv; - vector< pair > atomfractions; - vector< pair > cellfractions; - vector< pair > massfractions; - atomfractions = curset->getAtomPhaseFractions(); - cellfractions = curset->getCellPhaseFractions(); - massfractions = curset->getMassPhaseFractions(); - size_t n = atomfractions.size(); - for (size_t i = 0; i != n; ++i) - { - rv["atom"].push_back(atomfractions[i].first); - rv["stdatom"].push_back(atomfractions[i].second); - rv["cell"].push_back(cellfractions[i].first); - rv["stdcell"].push_back(cellfractions[i].second); - rv["mass"].push_back(massfractions[i].first); - rv["stdmass"].push_back(massfractions[i].second); - } - return rv; -} - -double PdfFit::get_scat(char tp, string smbpat) -{ - double rv; - const LocalPeriodicTable* lpt = this->curphase ? - this->curphase->getPeriodicTable() : - LocalPeriodicTable::instance(); - const AtomType* atp = lpt->lookup(smbpat); - try { - rv = atp->sf(tp); - } - catch (runtime_error e) { - throw ValueError(e.what()); - } - return rv; -} - -// End of file diff --git a/libpdffit2/pdffit.h b/libpdffit2/pdffit.h deleted file mode 100644 index a4b030ac..00000000 --- a/libpdffit2/pdffit.h +++ /dev/null @@ -1,611 +0,0 @@ -/*********************************************************************** -* -* pdffit2 by DANSE Diffraction group -* Simon J. L. Billinge -* (c) 2006 trustees of the Michigan State University -* All rights reserved. -* -* File coded by: Jacques Bloch -* -* See AUTHORS.txt for a list of people who contributed. -* See LICENSE.txt for license information. -* -************************************************************************ -* -* classes Phase, DataSet, Fit, Pdf, PdfFit, RefVar, NonRefVar, Builtin -* -* Comments: Main header file included by all others. Big mess. -* -***********************************************************************/ - -#ifndef PDFFIT_H_INCLUDED -#define PDFFIT_H_INCLUDED - -#include -#include -#include -#include -#include -#include - -#include "AtomType.h" -#include "Atom.h" -#include "PairDistance.h" -#include "matrix.h" -#include "exceptions.h" -#include "LocalPeriodicTable.h" -#include "OutputStreams.h" - -using namespace std; - -/*********************************************************************** - * Here are constants for the parameter coding - DO NOT CHANGE - * unless you are rewriting the program !!!!!!!!!!!!!!!!!!!!!! - *********************************************************************** - * - * n_st : Number of global structural parameters per phase - * n_at : Number of parameters for each atom - * n_ex : Number of experimental parameters per dataset - * - ***********************************************************************/ - -const int n_st = 11; -const int n_at = 10; -const int n_ex = 3; - -const int ALL = -1; -typedef vector::iterator VAIT; - -enum FCON { USER, IDENT, FCOMP, FSQR }; - -typedef double (*fbuiltin)(double); - -class Fit; -class PdfFit; -class DataSet; -class Phase; -class NonRefVar; -class RefVar; - - -// non-refinable variables accessible to the users -class NonRefVar -{ - friend class PdfFit; - double *a; - - public: - NonRefVar() : a(NULL) - { - mtype = "NonRefVar"; - } - bool isAssigned() { return (a != NULL); } - void setptr(double* a) { this->a = a; } - void setval(double a) { *this->a = a; } - double get() { - double rv = (a) ? *a : 0.0; - return rv; - } - const string& type() const - { - return mtype; - } - - protected: - string mtype; -}; - -// Refinable variables accessible to the users -class RefVar: public NonRefVar -{ - friend class PdfFit; - public: - RefVar() : NonRefVar() - { - mtype = "RefVar"; - } -}; - - -typedef double (*fcon)(vector&, vector&); -typedef double (*fbuiltin) (double); - -// TK commented out 03/31/05 -// class Builtin { fbuiltin func, deriv; -// public: -// Builtin(fbuiltin func, fbuiltin deriv): func(func), deriv(deriv) {} -// }; - -// TK 03/31/05 replaced above with -class Builtin { - public: - fbuiltin func, deriv; // made these public. - // Really should just be a struct, or provide - // const pointers. - Builtin(fbuiltin func, fbuiltin deriv): func(func), deriv(deriv) {} -}; - -// contains the address of the variable, and the current value of the parameter -class Fit -{ - friend class PdfFit; - - map builtin; - - double parse(string line, vector &dnumdp); - double compute(string &expr, vector &dnumdp); - string substitute_pars(string &expr); - double getnum(istringstream &inexpr, vector &dnumdp); - void init_builtins(); - void reset(); - - public: - Fit() - { - reset(); - } - - // CLF Wed May 25 2005 - // Made these members of fit. Were local variables to - // refine function. - double alambda, chisq, ochisq; - int stagnating; - // CLF - - int iter; - double fit_rw; - double redchisq; // reduced chi-squared - double wnorm; // sum of weighted squared datapoints - int ntot, ndof; // total # of points, number of degrees of freedom - // parameter related variables - vector p; // fit-parameters - vector dp; // errors on the refined parameters; - vector id; // parameter identification number (arbitrary integer) - vector ip; // parameter selection - matrix covar, alpha; // covariance matrix and curvature - - // constraint related variables - vector var; // constrained variables - vector dvar; // errors on the constrained variables - vector vref; // true if variable contains free parameters - matrix vcovar; // covariance matrix on constrained variables - vector fconstraint; // constraint equations - vector form; // constraint formula - vector idef; // default parameter if no explicit constraint - vector ctype; // type of constraint - - vector used; // vector of used parameter indices (not ids) in the current constraint - - // variables relating constraint-parameter - matrix dvdp; // derivative of var wrt p - - // variables relating to refinable variables - vector sdptr; // pointer to standard deviation of refinable variable - - vector refvar; // integer pointer from refinable variable to actual constraint # - - void fixpar(int pidx); - void freepar(int pidx); - void setpar(unsigned int pidx, double val); - double getpar(unsigned int pidx); - void constrain(double &a, string form); - void constrain(double &a, double f(vector&, vector&) ); - void constrain(double &a, int ipar ); - void constrain(double &a, int ipar, FCON type); - void constrain(double &a, string inpform, fcon f, int idef, FCON type); - int vfind(double &a); // look for variable in list of constraints - int parfind(unsigned int j); - void fill_variables(); - void fill_errors(); - int varsize() const { return var.size(); } - int psize() const { return p.size(); } - //Thu Oct 13 2005 - CLF - void output(ostream &fout); - void out(); - - private: - vector order_by_id() const; - -}; - -class PdfFit -{ - // class methods - - public: - static const string& version(const char* ver=NULL); - - private: - - //Struct cr; - int nphase; - int total; // total # of atoms - vector phase; - - Fit fit; - - // Dataset parameters - int nset; - vector datasets; - DataSet *curset; - - void init(); - - public: - - void fit_setup(); - void fit_errors(); - void fit_theory(bool ldiff, bool lout); - double totalWeighedSquareObs() const; - int totalReducedObservations() const; - - private: - - void initarrays(); - - void mrqmin(vector &a, vector &ia, matrix &covar, - matrix &alpha, double &chisq, double &alamda, - bool deriv); - void mrqmin(double a[], int ia[], int ma, double **covar, - double **alpha, double *chisq, double *alamda, bool deriv); - void mrqcof(double*, int*, int, double**, double*, double*, bool deriv); - void fill_variables(vector a); - int getnpar() { return nset*n_ex + nphase*n_st + total*n_at; } - - public: - - Phase* curphase; - PdfFit(); - ~PdfFit(); - - void alloc(char tp, double qmax, double qdamp, - double rmin, double rmax, int bin); - void calc(); - int read_struct(string fname); // returns 1:OK, 0:Error - int read_data(string fname, char tp, double qmax, double qdamp); - //Wed Oct 12 2005 - CLF - int read_struct_string(char * buffer); // returns 1:OK, 0:Error - int read_data_string(string& buffer, char tp, double qmax, double - qdamp, string name = "string"); - int read_data_arrays(char tp, double qmax, double qdamp, int length, - double * r_data, double * Gr_data, double * dGr_data = NULL, - string name = "array"); - void reset(); - //Thu Oct 13 2005 - CLF - string save_pdf(int iset, string fname = ""); - string save_dif(int iset, string fname = ""); - string save_res(string fname = ""); - string save_struct(int ip, string strucfile = ""); - string show_struct(int ip); - // - int refine(bool deriv, double toler = 0.00000001); - int refine_step(bool deriv, double toler = 0.00000001); - double getrw(void) - { - return fit.fit_rw; - } - void setpar(unsigned int pidx, double val) - { - fit.setpar(pidx, val); - } - void setpar(unsigned int pidx, RefVar v) - { - fit.setpar(pidx, *v.a); - } - double getpar(unsigned int pidx) - { - return fit.getpar(pidx); - } - void fixpar(int pidx) - { - fit.fixpar(pidx); - } - void freepar(int pidx) - { - fit.freepar(pidx); - } - void range(int iset, double rmin, double rmax); - - void constrain(RefVar v, double f(vector&, vector&)) - { - fit.constrain(*v.a,f); - } - void constrain(RefVar v, string form) - { - fit.constrain(*v.a,form); - } - void constrain(RefVar v, int ipar) - { - fit.constrain(*v.a,ipar); - } - void constrain(RefVar v, int ipar, FCON type) - { - fit.constrain(*v.a,ipar,type); - } - void setphase(int ip); - void setdata(int is); - void setvar(RefVar v, double a) { v.setval(a); } - double getvar(RefVar v) { return v.get(); } - void setvar(NonRefVar v, double a) { v.setval(a); } - double getvar(NonRefVar v) { return v.get(); } - - void selphase(int ip); - void pdesel(int ip); - Phase* getphase(int ip); - int num_phases() { return this->nphase; } - int num_datasets() { return this->nset; } - - private: - - void check_sel_args(int ip, char ijchar, int aidx1=1); - void selphaseForEachDataSet(Phase*); - - public: - - void selectAtomType(int ip, char ijchar, char* symbol, bool select); - void selectAtomIndex(int ip, char ijchar, int aidx1, bool select); - void selectAll(int ip, char ijchar); - void selectNone(int ip, char ijchar); - - pair bond_angle(int ia, int ja, int ka); - PairDistance bond_length_atoms(int ia, int ja); - vector bond_length_types(string symi, string symj, - double bmin, double bmax); - - vector getpdf_obs(); - vector getpdf_fit(); - - // current phase and set refinable variable pointers - vector lat, x, y, z, u11, u22, u33, u12, u13, u23, occ; - RefVar pscale; - RefVar spdiameter; - NonRefVar stepcut; - RefVar sratio; - RefVar delta2, delta1; - RefVar dscale, qdamp, qbroad; - NonRefVar rcut; - int getnfmin(); - int getnfmax(); - double getdeltar(); - double getrmin(); - double getrmax(); - vector getcrw() const; - map > getPhaseFractions(); - double get_scat(char tp, string smbpat); -}; - -class Pdf -{ - public: - - int nfmin, nfmax, ncmin, ncmax; - double qmax, qdamp, rmin, rmax, deltar; - double rfmin, rfmax; // fit range - double rcmin, rcmax; // extended calculation range - double dscale, ddscale, qbroad, dqbroad, dqdamp; - - Pdf() - { - nfmin = nfmax = ncmin = ncmax = 0; - qmax = qdamp = rmin = rmax = deltar = 0.0; - rfmin = rfmax = rcmin = rcmax = 0.0; - dscale = 0.0; ddscale = 0.0; - qbroad = dqbroad = dqdamp = 0.0; - } - - vector pdftot; // total pdf - matrix calc; // ?? pdf for each phase and each point in the dataset -}; - -class DataSet: public Pdf -{ - - private: - int offset; - const PdfFit* mowner; - void applyQmaxCutoff(double* y, size_t len); - void extendCalculationRange(bool lout); - string selectedAtomsString(int ip, char ijchar); - void read_data_stream(int iset, istream& fdata, - char tp, double qmax, double qdamp, string name); - void warningOnMissingWeights() const; - - public: - - int iset; // Dataset index - char scattering_type; - string name; - - DataSet(const PdfFit* owner) : Pdf(), mowner(owner) - { - dscale = 1.0; ddscale = 0; - qbroad = dqbroad = 0.0; - }; - // pdf-related - void determine(bool ldiff, bool lout, Fit &par); - void pdf_derivative (Phase& phase, - const Atom& atomi, const Atom& atomj, double rk, double sigma, - double sigmap, double dist, double d[3], double ampl, - double gaus, Fit &fit, double* fit_a_i); - - const vector& getpdf_fit(); - const vector& getpdf_obs(); - //Thu Oct 13 2005 - CLF - string build_pdf_file(); - string build_dif_file(); - // - void read_data(int iset, string fname, char tp, double qmax, double qdamp); - //Wed Oct 12 2005 - CLF - void read_data_string(int iset, string& buffer, char tp, double qmax, double qdamp, - string name = "string"); - void read_data_arrays(int iset, char tp, double qmax, double qdamp, - int length, double * r_data, double * Gr_data, double * dGr_data = NULL, string name = "array"); - // - //Thu Oct 13 2005 - CLF - void output(ostream &fout); - void range(double rmin, double rmax); - - void fit_setup_derivatives(Fit &par); - void selphase(int ip, Phase *phase); - - vector getcrw() const; - double weighedSquareObs() const; - double getdsrw() const; - double getdsredchisq() const; - - // phase fraction calculations - vector< pair > getAtomPhaseFractions(); - vector< pair > getCellPhaseFractions(); - vector< pair > getMassPhaseFractions(); - - // fit related - matrix fit_a, fit_b; // nbin*npar - - int bin; - vector obs, wic; - - // phase specific information this dataset: selected, allowed atoms - vector psel; // phase selection - // i and j indices to be ignored when calculating PDF - map > phase_ignore_i; - map > phase_ignore_j; - vector cumchisq; - friend void PdfFit::fit_setup(); - -}; - -class Phase { - - private: - - // data - string spcgr, name; - int offset; - LocalPeriodicTable _local_periodic_table; - - double ar[3], wrez[3], dar[3], dwrez[3]; - double gten[3][3], dgten[3][3]; // tensor and sd - double rten[3][3], drten[3][3]; // tensor and sd - double _eps[3][3][3], _reps[3][3][3], _deps[3][3][3], _dreps[3][3][3]; - double &eps(int i, int j, int k) { return _eps[i][j][k]; } - double &reps(int i, int j, int k) { return _reps[i][j][k]; } - double &deps(int i, int j, int k) { return _deps[i][j][k]; } - double &dreps(int i, int j, int k) { return _dreps[i][j][k]; } - - // methods - - set selectAtomsOf(string symbol); - - // Added a return value - string get_scat_string(char tp, const AtomType* atp); - - // shift to equivalent lattice position nearest to the origin - void make_nearest(double xyz[3]); - - public: - - vector atom_types; - int iphase; - double cosa, cosb, cosg, sina, sinb, sing; - double v, dv, vr, dvr; - int icc[3]; - // Phase has a number of public elements as it is often cross-referenced - - int natoms; // total number of atoms in multicell icc0 x icc1 x icc2 - int ncatoms; // number of atoms in one cell - - // IMPORTANT: atom[i].atom_type must be a pointer to AtomType - // from _local_periodic_table. Insertion of a new entry to - // vector atom must be followed by reassign_atom_type(entry); - vector atom; - - double pscale, dpscale; - double a0[3], win[3], da0[3], dwin[3]; - double np, dnp, rho0, drho0; // np: total occupance, rho0: number density - - // pdf-related - double delta2, sratio, rcut; - double ddelta2, dsratio, delta1, ddelta1; - double spdiameter, dspdiameter; // spherical particle diameter - double stepcut; - double dnorm, corr_max; - - - Phase() - { - pscale = 1.0; dpscale = 0.0; - sratio=1.0; - a0[0] = a0[1] = a0[2] = da0[0] = da0[1] = da0[2] = - win[0] = win[1] = win[2] = dwin[0] = dwin[1] = dwin[2] = - delta2 = ddelta2 = dsratio = rcut = 0.0; - delta1 = ddelta1 = corr_max = 0.0; - spdiameter = dspdiameter = 0.0; - stepcut = 0.0; - icc[0] = icc[1] = icc[2] = ncatoms = natoms = 0; - spcgr = "P1"; - name = "UNNAMED"; - } - inline size_t nscat() - { - return atom_types.size(); - } - void read_struct(int iphase, string fname); - void read_struct_string(int iphase, char * buffer); - private: - void read_struct_stream(int _iphase, istream& fstruct); - void read_header(istream &fstruct, bool &ldiscus); - void read_atoms(istream &fstruct); - // Reset atom_type to point to an entry from _local_periodic_table - void reassign_atom_type(Atom* ap); - - public: - //Thu Oct 13 2005 - CLF - void output(ostream &fout); - template void save_struct(Stream &fout); - - void lattice(); - void show_lattice(); - void tensor(double ten[3][3], double vec[3], double win[3]); - void dtensor(double vec[3], double win[3], double dten[3][3], double dvec[3], double dwin[3]); - - double skalpro(const double h[3], const double k[3]); - double dskalpro(double h[3], double k[3], double dh[3], double dk[3]); - - double circum_diameter(); // diameter of a sphere enclosing unit cell - // mean square displacement of 2 atoms - double msdAtoms(const Atom& ai, const Atom& aj, double* vl); - // reference to the local periodic table - LocalPeriodicTable* getPeriodicTable(); - - // pdf-related - - double averageAtomicMass(); - double averageScatteringFactor(char tp); - void setup_weights(char tp); - - pair bond_angle(int ia, int ja, int ka); - PairDistance bond_length_atoms(int ia, int ja); - vector bond_length_types(string symi, string symj, - double bmin, double bmax); - // Fri Oct 28 2005 - CLF - // Added a return value - void show_scat(char tp); - string get_scat_string(char tp); - string get_scat_string(char tp, string smbpat); - void set_scat(char tp, const string& smbpat, double value); - void reset_scat(const string& smbpat); - - friend class Atom; - friend class DataSet; - friend void PdfFit::fit_setup(); - friend void DataSet::fit_setup_derivatives(Fit &par); - friend void DataSet::determine(bool ldiff, bool lout, Fit &par); - friend void DataSet::pdf_derivative (Phase& phase, - const Atom& atomi, const Atom& atomj, double rk, double sigma, - double sigmap, double dist, double d[3], double ampl, - double gaus, Fit &fit, double* fit_a_i); - friend void PdfFit::fit_theory(bool ldiff, bool lout); -}; - - -#endif // PDFFIT_H_INCLUDED diff --git a/libpdffit2/pdflsmin.cc b/libpdffit2/pdflsmin.cc deleted file mode 100644 index 078d2754..00000000 --- a/libpdffit2/pdflsmin.cc +++ /dev/null @@ -1,326 +0,0 @@ -/*********************************************************************** -* -* pdffit2 by DANSE Diffraction group -* Simon J. L. Billinge -* (c) 2006 trustees of the Michigan State University -* All rights reserved. -* -* File coded by: Jacques Bloch -* -* See AUTHORS.txt for a list of people who contributed. -* See LICENSE.txt for license information. -* -************************************************************************ -* -* PdfFit methods for Levenberg-Marquardt least-squares minimization. -* -* Comments: -* -***********************************************************************/ - -//#define CHECK_DERIVATIVES - -#include -#include -#include -#include -#include - -#include "MathUtils.h" -#include "matrix.h" -#include "nrutil.h" -#include "pdffit.h" - -using NS_PDFFIT2::pout; - -void PdfFit::mrqmin(vector &a, vector &ia, matrix &covar, - matrix &alpha, double &chisq, double &alamda, bool deriv) -{ - using std::copy; - - int ma = a.size(); - double** _covar = new double*[ma]; - double** _alpha = new double*[ma]; - double* _a = new double[ma]; - - copy(a.begin(), a.end(), _a); - - for (int i = 0; i < ma; i++) - { - _covar[i] = &covar[i][0]-1; - _alpha[i] = &alpha[i][0]-1; - } - - int* iaptr = ia.size() ? &(ia[0]) - 1 : NULL; - mrqmin(_a-1, iaptr, ma, _covar-1, _alpha-1, &chisq, &alamda, deriv); - - copy(_a, _a + ma, a.begin()); - - delete [] _a; - delete [] _alpha; - delete [] _covar; -} - - -// Levenberg-Marquardt method, attempting to reduce the value Chi2 of a fit -// between a set of data points x[1..ndata], y[1..ndata] with individual -// standard deviations sig[1..ndata], and a nonlinear function dependent on ma -// coeffcients a[1..ma]. The input array ia[1..ma] indicates by nonzero -// entries those components of a that should be fitted for, and by zero entries -// those components that should be held fixed at their input values. The -// program re- turns current best-fit values for the parameters a[1..ma], and -// Chi2=chisq. The arrays covar[1..ma][1..ma], alpha[1..ma][1..ma] are used as -// working space during most iterations. Supply a routine -// funcs(x,a,yfit,dyda,ma) that evaluates the fitting function yfit, and its -// derivatives dyda[1..ma] with respect to the fitting parameters a at x. On -// the first call provide an initial guess for the parameters a, and set -// alamda<0 for initialization (which then sets alamda=.001). If a step -// succeeds chisq becomes smaller and alamda de- creases by a factor of 10. If -// a step fails alamda grows by a factor of 10. You must call this routine -// repeatedly until convergence is achieved. Then, make one final call with -// alamda=0, so that covar[1..ma][1..ma] returns the covariance matrix, and -// alpha the curvature matrix. (Parameters held fixed will return zero -// covariances.) -void PdfFit::mrqmin(double a[], int ia[], int ma, double **covar, double **alpha, double *chisq, double *alamda, bool deriv) -{ - void covsrt(double **covar, int ma, int ia[], int mfit); - void gaussj(double **a, int n, double **b, int m); - - int j, k, l; - static int mfit; - static double ochisq, *atry, *beta, *da, **oneda; - - if (*alamda < 0.0) - { - // Initialization. - atry = dvector(1, ma); - beta = dvector(1, ma); - da = dvector(1, ma); - - for (mfit = 0, j = 1; j <= ma; j++) - if (ia[j]) mfit++; - - oneda = dmatrix(1, mfit, 1, 1); - *alamda = 0.001; - mrqcof(a, ia, ma, alpha, beta, chisq, deriv); - ochisq=(*chisq); - for (j = 1; j <= ma; j++) atry[j]=a[j]; - - *pout << "\n******************************** ITER: " << fit.iter << " ********************************\n"; - fit.fit_rw = sqrt(ochisq/fit.wnorm); - fit.redchisq = ochisq/(fit.ntot-fit.ndof); - fit.out(); - *pout << " chisq.: " << ochisq << " red.chisq.: " << fit.redchisq << " Rw: " << fit.fit_rw << endl; - } - // Alter linearized fitting matrix, by augmenting diagonal elements. - for (j = 1; j <= mfit; j++) - { - for (k = 1; k <= mfit; k++) covar[j][k]=alpha[j][k]; - covar[j][j]=alpha[j][j]*(1.0+(*alamda)); - oneda[j][1]=beta[j]; - } - - //=================================================================== -#if defined(TEST) - print(covar, mfit); double **save = dmatrix(1, mfit, 1, mfit); - for(int i = 1; i <= mfit; i++) for(j = 1; j <= mfit; j++) save[i][j] = covar[i][j]; - for(int i = 1; i <= mfit; i++) printf("%lg ", oneda[i][1]); printf("\n"); -#endif - //=================================================================== - - gaussj(covar, mfit, oneda, 1); // Matrix solution. - - //=================================================================== -#if defined(TEST) - double res; - for(int i = 1; i <= mfit; i++) - { - res = 0; - for(j = 1; j <= mfit; j++) - res += save[i][j]*oneda[j][1]; printf("%lg ", res); - } - printf("\n"); -#endif - //================================================================= - - for (j = 1; j <= mfit; j++) da[j]=oneda[j][1]; - if (*alamda == 0.0) { // Once converged, evaluate covariance matrix. - covsrt(covar, ma, ia, mfit); - covsrt(alpha, ma, ia, mfit); // Spread out alpha to its full size too. - free_dmatrix(oneda, 1, mfit, 1, 1); - free_dvector(da, 1, ma); - free_dvector(beta, 1, ma); - free_dvector(atry, 1, ma); - return; - } - for (j = 0, l = 1; l <= ma; l++) // Did the trial succeed? - if (ia[l]) atry[l]=a[l]+da[++j]; - mrqcof(atry, ia, ma, covar, da, chisq, deriv); - if (*chisq < ochisq) { // Success, accept the new solution. - *alamda *= 0.1; - ochisq=(*chisq); - for (j = 1; j <= mfit; j++) { - for (k = 1; k <= mfit; k++) alpha[j][k]=covar[j][k]; - beta[j]=da[j]; - } - for (l = 1; l <= ma; l++) a[l]=atry[l]; - } else { // Failure, increase alamda and return. - *alamda *= 10.0; - *chisq = ochisq; - } -} - -// Used by mrqmin to evaluate the linearized fitting matrix alpha, and -// vector beta as in (15.5.8), and calculate Chi2. -void PdfFit::mrqcof(double a[], int ia[], int ma, double **alpha, double beta[], double *chisq, bool deriv) -{ - int i, j, k, l, m, mfit = 0; - double wt, sig2i, dy, *dyda; - //double ymod; - - dyda = dvector(1, ma); - for (j = 1; j <= ma; j++) - if (ia[j]) mfit++; - for (j = 1; j <= mfit; j++) { // Initialize (symmetric) alpha, beta. - for (k = 1; k <= j; k++) alpha[j][k]=0.0; - beta[j]=0.0; - } - - // careful: a of mrqcof is in fact atry of mrqmin! - for (j = 1; j <= ma; j++) - fit.p[j-1] = a[j]; - - // printf("a=%.12lg %.12lg %.12lg\n", a[1], a[2], a[3]); - - fit_theory(deriv, false); // yields pdftot and derivatives wrt parameters - - //============================================================================= -#if !defined(CHECK_DERIVATIVES) - // deriv: true for analytic derivatives, false for numerical ones - if (!deriv) -#endif - { -#if defined(CHECK_DERIVATIVES) - matrix dersave = datasets[0]->fit_b; -#endif - - // numerical derivative - vector > pdfsave; - for (int is = 0; is < nset; is++) - { - pdfsave.push_back(datasets[is]->pdftot); - - // fit_b used both in numerical and analytical derivative case - datasets[is]->fit_b.clear(); - datasets[is]->fit_b.resize(datasets[is]->ncmax+1, fit.psize()); - } - - double psave; - - if (fit.psize() != ma) { - throw constraintError("Inconsistent number of parameters"); - } - - for (int ip = 0; ip < fit.psize(); ip++) - { - if (!fit.ip[ip]) continue; - - double delta = double_eps*fit.p[ip]; - if (fabs(delta) < double_eps/100) delta = double_eps; - psave = fit.p[ip]; - fit.p[ip] += delta; - fit_theory(false, false); // yields pdftot and derivatives wrt parameters - fit.p[ip] = psave; - - for (int is = 0; is < nset; is++) - { - DataSet* pds = this->datasets[is]; - - for (i = pds->nfmin; i <= pds->nfmax; i++) - { - pds->fit_b[i][ip] = (pds->pdftot[i]-pdfsave[is][i])/delta; - } - } - -#if defined(CHECK_DERIVATIVES) - i = 200; - { - *pout << "DERIVATIVES:: ANALYTIC : " << dersave[i][ip] << endl; - *pout << " NUMERICAL: " << (datasets[0]->pdftot[i]-pdfsave[0][i])/delta - << " (delta[" << fit.id[ip] << "]=" << delta << ")" << endl << endl; - } -#endif - } - for (int is = 0; is < nset; is++) datasets[is]->pdftot = pdfsave[is]; - -#if defined(CHECK_DERIVATIVES) - exit(0); -#endif - } - //============================================================================= - - *chisq = 0.0; - - for (int is = 0; is < nset; is++) - { - DataSet* pds = this->datasets[is]; - pds->cumchisq.clear(); - - for (i = pds->nfmin; i <= pds->nfmax; i++) - { // Summation loop over all data. - - //(*funcs)(x[i], a, &ymod, dyda, ma); - sig2i = pds->wic[i]; - dy = pds->obs[i] - pds->pdftot[i]; - - for (j = 1; j <= ma; j++) - dyda[j] = pds->fit_b[i][j-1]; // of course use fit_b, NOT fit_a - - //if (i==0) printf("dyda=%.12lg %.12lg %.12lg\n", dyda[1], dyda[2], dyda[3]); - - for (j = 0, l = 1; l <= ma; l++) { - if (ia[l]) { - wt = dyda[l]*sig2i; - for (j++, k = 0, m = 1; m <= l; m++) - if (ia[m]) alpha[j][++k] += wt*dyda[m]; - beta[j] += dy*wt; - } - } - double prev = pds->cumchisq.empty() ? 0.0 : pds->cumchisq.back(); - double chisq_contribution = dy * dy * sig2i; - pds->cumchisq.push_back(prev + chisq_contribution); - } - *chisq += pds->cumchisq.empty() ? 0.0 : pds->cumchisq.back(); - } - for (j = 2; j <= mfit; j++) // Fill in the symmetric side. - for (k = 1; k < j; k++) alpha[k][j]=alpha[j][k]; - free_dvector(dyda, 1, ma); - //print(alpha, ma); -} - - -// Expand in storage the covariance matrix covar, so as to take into account -// parameters that are being held fixed. (For the latter, return zero -// covariances.) -void covsrt(double **covar, int ma, int ia[], int mfit) -{ - int i, j, k; - for (i = mfit+1; i <= ma; i++) - { - for (j = 1; j <= i; j++) - { - covar[i][j]=covar[j][i]=0.0; - } - } - k = mfit; - for (j = ma; j >= 1; j--) { - if (ia[j]) - { - for (i = 1; i <= ma; i++) swap(covar[i][k], covar[i][j]); - for (i = 1; i <= ma; i++) swap(covar[k][i], covar[j][i]); - k--; - } - } -} - -// End of file diff --git a/libpdffit2/scatlen.cc b/libpdffit2/scatlen.cc deleted file mode 100644 index 81beee03..00000000 --- a/libpdffit2/scatlen.cc +++ /dev/null @@ -1,114 +0,0 @@ -/*********************************************************************** -* -* pdffit2 by DANSE Diffraction group -* Simon J. L. Billinge -* (c) 2006 trustees of the Michigan State University -* All rights reserved. -* -* File coded by: Pavol Juhas -* -* See AUTHORS.txt for a list of people who contributed. -* See LICENSE.txt for license information. -* -************************************************************************ -* -* Phase methods for accessing scattering factors. -* -* Comments: Up to date with 1.3.10 Fortran version. -* In Fortran this was fourier.f -* -***********************************************************************/ - -#include -#include - -#include "LocalPeriodicTable.h" -#include "StringUtils.h" -#include "pdffit.h" - -using NS_PDFFIT2::pout; - -void Phase::show_scat(char tp) -{ - *pout << get_scat_string(tp); -} - -string Phase::get_scat_string(char tp) -{ - stringstream sout; - vector::iterator atp; - for (atp = atom_types.begin(); atp != atom_types.end(); ++atp) - { - sout << get_scat_string(tp, *atp); - } - return sout.str(); -} - -string Phase::get_scat_string(char tp, string smbpat) -{ - const LocalPeriodicTable* lpt = getPeriodicTable(); - const AtomType* atp = lpt->lookup(smbpat); - return get_scat_string(tp, atp); -} - -string Phase::get_scat_string(char tp, const AtomType* atp) -{ - stringstream sout; - string usymbol = toupper(atp->symbol); - switch(tp) - { - case 'n': - case 'N': - sout << "Neutron scattering length for " << usymbol << " : "; - break; - case 'x': - case 'X': - sout << "X-ray scattering factor for " << usymbol << " : "; - break; - } - // this also throws runtime_error for invalid tp value - sout << atp->sf(tp); - return sout.str(); -} - -void Phase::set_scat(char tp, const string& smbpat, double value) -{ - LocalPeriodicTable* lpt = getPeriodicTable(); - const string& stdsmbl = lpt->lookup(smbpat)->symbol; - switch (tp) - { - case 'n': - case 'N': - lpt->setNsf(stdsmbl, value); - break; - case 'x': - case 'X': - lpt->setXsf(stdsmbl, value); - break; - default: - ostringstream emsg; - emsg << "Invalid scattering type '" << tp << "'"; - throw runtime_error(emsg.str()); - } - const AtomType* atp = lpt->symbol(stdsmbl); - *pout << get_scat_string(tp, atp); -} - -void Phase::reset_scat(const string& smbpat) -{ - LocalPeriodicTable* lpt = getPeriodicTable(); - const AtomType* atp = lpt->lookup(smbpat); - const string& stdsmbl = atp->symbol; - lpt->reset(stdsmbl); - *pout << get_scat_string('N', stdsmbl); - *pout << get_scat_string('X', stdsmbl); -} - - -LocalPeriodicTable* Phase::getPeriodicTable() -{ - return &this->_local_periodic_table; -} - - -// End of file diff --git a/libpdffit2/stru.cc b/libpdffit2/stru.cc deleted file mode 100644 index f9022f23..00000000 --- a/libpdffit2/stru.cc +++ /dev/null @@ -1,837 +0,0 @@ -/*********************************************************************** -* -* pdffit2 by DANSE Diffraction group -* Simon J. L. Billinge -* (c) 2006 trustees of the Michigan State University -* All rights reserved. -* -* File coded by: Jacques Bloch -* -* See AUTHORS.txt for a list of people who contributed. -* See LICENSE.txt for license information. -* -************************************************************************ -* -* PdfFit and Phase methods for reading and saving the structure, -* and for calculating bond lengths and angles. -* -* Comments: -* -***********************************************************************/ - -// Up to date with 1.3.10 Fortran version - -#include -#include -#include -#include - -#include "PointsInSphere.h" -#include "LocalPeriodicTable.h" -#include "Atom.h" -#include "StringUtils.h" -#include "PairDistance.h" -#include "MathUtils.h" -#include "pdffit.h" - -using NS_PDFFIT2::pout; - - -/*********************************************************************** -* local helper routines -***********************************************************************/ - -namespace { - -// Read a number and an eventual comma delimiter or EOF -template Type vget(istringstream &fin, char delim) -{ - char c; - Type val; - - fin >> val; - - // Return if reading error - if (!fin) { - string line; - fin.clear(); - fin >> line; - throw vgetException(line); - } - if (!fin) return 0; - - // check on end of file before looking for delimiter - if (fin.eof()) return val; - - // read eventual delimiter - fin >> c; - - // if a character c has been read and it is not the expected - // delimiter: put back for next reading - if (fin && c != delim) fin.unget(); - - // clear any error in case no delimiter could be read - if (!fin) fin.clear(); - - return val; -} - -// read space delimited value -template Type vget(istringstream &fin) -{ - Type val; - fin >> val; - return val; -} - -// read space or comma delimited double -double dget(istringstream &fin) -{ - return vget(fin, ','); -} - -// read space or comma delimited integer -int iget(istringstream &fin) -{ - return vget(fin, ','); -} - - -// strip leading spaces -string lstrip(const string &line) -{ - string naked; - string::size_type i = line.find_first_not_of(" \t"); - if (i != string::npos) naked = line.substr(i); - return naked; -} - -// substitute all occurences of literal pattern with new string -void substitute(string& s, const string& pat, const string& sub) -{ - string::size_type p; - string::size_type start = 0; - for (p = s.find(pat, start); p != string::npos; p = s.find(pat, start)) - { - s = s.replace(p, pat.size(), sub); - start = p + sub.size(); - } -} - - -} // local namespace - - -/*********************************************************************** -* Read a structure file. -***********************************************************************/ -int PdfFit::read_struct(string structfile) -{ - Phase* ph = new Phase(); - try { - ph->read_struct(nphase+1, structfile); - } - catch(Exception e) { - delete ph; - // Moved error catching to python bindings. - throw; - } - this->phase.push_back(ph); - this->total += ph->natoms; - this->nphase++; - this->selphaseForEachDataSet(ph); - this->setphase(this->nphase); - ph->show_lattice(); - return 1; -} - -/*********************************************************************** - Wed Oct 12 2005 - CLF - Read a structure from a storage string. -*************************************************************************/ -int PdfFit::read_struct_string(char * buffer) -{ - Phase* ph = new Phase(); - try { - ph->read_struct_string(nphase+1, buffer); - } - catch(Exception e) { - delete ph; - throw; - } - this->phase.push_back(ph); - this->total += ph->natoms; - this->nphase++; - this->selphaseForEachDataSet(ph); - this->setphase(this->nphase); - ph->show_lattice(); - return 1; -} - -void Phase::read_struct(int _iphase, string structfile) -{ - ifstream fstruct; - - fstruct.open(structfile.c_str()); - if (!fstruct) throw IOError("File does not exist"); - - read_struct_stream(_iphase, fstruct); -} - -void Phase::read_struct_string(int _iphase, char * buffer) -{ - istringstream fstruct(buffer); - read_struct_stream(_iphase, fstruct); -} - -void Phase::read_struct_stream(int _iphase, istream& fstruct) -{ - double tot; - bool ldiscus; - - iphase = _iphase; - natoms = 0; - - read_header(fstruct, ldiscus); - - if (ldiscus) - { - *pout << " Structure file format : DISCUS (converting B -> Uij) \n"; - Atom::streamformat = Atom::DISCUS; - } - else - { - *pout << " Structure file format : PDFFIT\n"; - Atom::streamformat = Atom::PDFFIT; - } - - read_atoms(fstruct); - // update atom_types - atom_types.clear(); - for (VAIT ai = atom.begin(); ai != atom.end(); ++ai) - { - if (!count(atom_types.begin(), atom_types.end(), ai->atom_type)) - { - atom_types.push_back(ai->atom_type); - } - } - - lattice(); - - tot = icc[0]*icc[1]*icc[2]*ncatoms; - - if (tot != natoms) - { - throw structureError("Inconsistent # of atoms in structure"); - } -} - - -/****************************************************************** - This subroutine reads the header of a structure file - Wed Oct 12 2005 - CLF - Changed ifstream to istream to accomodate stringstreams - as well. -********************************************************************/ - -void Phase::read_header(istream &fstruct, bool &ldiscus) -{ - string ier_msg; - string befehl, line; - - - // initialize format type to discuss format - ldiscus = true; - - /* parse structure file header and fill phase variables */ - - while (getline(fstruct, line)) - { - istringstream sline(line); - string action; - - // try to read a command from structure file - // if an error occurs, an exception will be caught - try{ - sline >> befehl; - - // get out if we get to atom positions - if (befehl == "atoms") break; - - // skip comments, i.e., when befehl starts with '#' - else if (befehl.find('#') == 0) continue; - - // format - else if (befehl == "format") - { - string format; - sline >> format; - ldiscus = (format != "pdffit"); - } - - // scale factor (PDFFIT) - else if (befehl == "scale") - { - action = "Reading scale factor"; - this->pscale = dget(sline); - this->dpscale = 0.0; - if (!sline) - { - throw structureError(action); - } - } - - // peak sharpening factors (PDFFIT) - else if (befehl == "sharp") - { - action = "reading sharpening parameters"; - double v0 = 0.0, v1 = 0.0, v2 = 0.0, v3 = 0.0; - // at least 3-parameters must be read without error - v0 = dget(sline); - v1 = dget(sline); - v2 = dget(sline); - // we have new format if we can read the 4th parameter - try { - v3 = dget(sline); - delta2 = v0; - delta1 = v1; - sratio = v2; - rcut = v3; - } - // if reading of 4th parameter fails, assume old format - catch(vgetException) { - delta2 = v0; - delta1 = 0.0; - sratio = v1; - rcut = v2; - } - ddelta2 = 0.0; - dsratio = 0.0; - ddelta1 = 0.0; - } - - // space group symbol (only to save it later for DISCUS use) - else if (befehl == "spcgr") - { - sline >> spcgr; - } - - // particle shape corrections - else if (befehl == "shape") - { - action = "reading particle shape correction data"; - string shapedata; - getline(sline, shapedata); - substitute(shapedata, ",", " "); - istringstream shapestream(shapedata); - string w; - shapestream >> w; - if (w == "sphere") - { - this->spdiameter = dget(shapestream); - } - else if (w == "stepcut") - { - this->stepcut = dget(shapestream); - } - else - { - ostringstream emsg; - emsg << " Unknown shape correction: " << w; - throw structureError(emsg.str()); - } - } - - // title / name for structure - else if (befehl == "title") - { - getline(sline, name); - // getline keeps leading whitespace - name = lstrip(name); - } - - // cell constants - else if (befehl == "cell") - { - action = "reading unit cell parameters"; - a0[0] = dget(sline); - a0[1] = dget(sline); - a0[2] = dget(sline); - win[0] = dget(sline); - win[1] = dget(sline); - win[2] = dget(sline); - } - - // standard deviation of cell constants - else if (befehl == "dcell") - { - action = "reading standard deviation of unit cell parameters"; - da0[0] = dget(sline); - da0[1] = dget(sline); - da0[2] = dget(sline); - dwin[0] = dget(sline); - dwin[1] = dget(sline); - dwin[2] = dget(sline); - } - - // crystal dimensions and number of atoms per unit cell 'ncell' - else if (befehl == "ncell") - { - action = "reading # atoms/unit cell"; - icc[0] = iget(sline); - icc[1] = iget(sline); - icc[2] = iget(sline); - ncatoms = iget(sline); - } - - // show warning message otherwise - else - { - *pout << " ****WARN**** Unknown keyword: " << - befehl << " (ignored) ****\n"; - } - } // end of try - // catch vget-exception and throw the specific exception - catch(vgetException e) { throw structureError(action+e.GetMsg()); } - } -} - -void Phase::read_atoms(istream& fstruct) -{ - Atom a; - while (fstruct >> a) - { - reassign_atom_type(&a); - this->atom.push_back(a); - natoms++; - } - return; -} - - -void Phase::reassign_atom_type(Atom* ap) -{ - LocalPeriodicTable* lpt = getPeriodicTable(); - const string& smbl = ap->atom_type->symbol; - ap->atom_type = lpt->symbol(smbl); -} - - - -/******************************************* -c------ - Save structure for given phase - Thu Oct 13 2005 - CLF - Changed code to return a string of the - saved file. Actually saving the file is - optional. -*******************************************/ -string PdfFit::show_struct(int ip) -{ - string filestring = save_struct(ip,""); - return filestring; -} - -string PdfFit::save_struct(int ip, string strucfile) -{ - - stringstream outfilestream; - - if ( (ip < 1) || (ip > nphase) ) - { - throw unassignedError("phase does not exist"); - } - else - { - bool ldiscus=false; - ofstream fout; - - if (!strucfile.empty()) - { - if (ldiscus) - *pout << " Saving structure (DISCUS format) phase " << ip - << " to file : " << strucfile << endl; - else - *pout << " Saving structure phase " << ip << " to file : " - << strucfile << endl; - - phase[ip-1]->save_struct(outfilestream); - - fout.open(strucfile.c_str()); - if (!fout) { - throw IOError("cannot create output file"); - } - fout << outfilestream.str(); - fout.close(); - } - else - { - phase[ip-1]->save_struct(outfilestream); - } - } - - return outfilestream.str(); -} - -/*************************************************************** -c This subroutine saves the structure and/or the unit cell -c onto a file. The format uses keyword description. -****************************************************************/ -template void Phase::save_struct(Stream &fout) -{ - const double fac = 8.0*M_PI*M_PI /3.0; - bool ldis=false; - - // -- Write new type of structure file - - fout << "title " << name << endl; - - fout << setprecision(6) << fixed; - - if (!ldis) - { - fout << "format pdffit" << endl; - fout << "scale " << setw(9) << pscale << endl; - fout << "sharp " << setw(9) << delta2 << ", " << setw(9) << delta1 << ", " - << setw(9) << sratio << ", " << setw(9) << rcut << endl; - } - - fout << "spcgr " << spcgr << endl; - - if (spdiameter > 0.0) - { - fout << "shape sphere, " << spdiameter << endl; - } - - if (stepcut > 0.0) - { - fout << "shape stepcut, " << stepcut << endl; - } - - fout << "cell "; - for (int i=0; i<3; i++) - fout << setw(9) << a0[i] << ", "; - - for (int i=0; i<3; i++) - { - fout << setw(9) << win[i]; - if (i!=2) - fout << ", "; - else - fout << endl; - } - - if (!ldis) - { - fout << "dcell "; - for (int i=0; i<3; i++) - fout << setw(9) << da0[i] << ", "; - - for (int i=0; i<3; i++) - { - fout << setw(9) << dwin[i]; - if (i!=2) - fout << ", "; - else - fout << endl; - } - } - - fout << "ncell "; - for (int i=0; i<3; i++) - fout << setw(9) << icc[i] << ", "; - fout << setw(9) << ncatoms << endl; - - fout << "atoms" << endl; - for (VAIT ai = atom.begin(); ai != atom.end(); ++ai) - { - - if (ldis) - { - double dw = fac*(ai->u[1]+ai->u[2]+ai->u[3]); - fout << setw(4) << left << ai->atom_type->symbol; - fout << right << setprecision(8); - for (int i=0; i<3; i++) fout << ' ' << setw(17) << ai->pos[i]; - fout << ' ' << setw(12) << dw << endl; - } - else - { - fout << setw(4) << left << ai->atom_type->symbol; - fout << right << setprecision(8); - for (int i=0; i<3; i++) fout << ' ' << setw(17) << ai->pos[i]; - fout << ' ' << setw(12) << setprecision(4) << ai->occ << endl; - - fout << " "; - fout << setprecision(8); - for (int i=0; i<3; i++) fout << ' ' << setw(17) << ai->dpos[i]; - fout << ' ' << setw(12) << setprecision(4) << ai->docc << endl; - - fout << " "; - fout << setprecision(8); - for (int i=0; i<3; i++) fout << ' ' << setw(17) << ai->u[i]; - fout << endl; - - fout << " "; - for (int i=0; i<3; i++) fout << ' ' << setw(17) << ai->du[i]; - fout << endl; - - fout << " "; - for (int i=3; i<6; i++) fout << ' ' << setw(17) << ai->u[i]; - fout << endl; - - fout << " "; - for (int i=3; i<6; i++) fout << ' ' << setw(17) << ai->du[i]; - fout << endl; - } - } -} - - -/*************************************** -c Calculate bond angles with errors -****************************************/ -pair PdfFit::bond_angle(int ia, int ja, int ka) -{ - if (!curphase) - { - throw unassignedError("Must read structure first"); - } - return curphase->bond_angle(ia, ja, ka); -} - -/*********************************************************************** -* shift to equivalent lattice position that is nearest to the origin -***********************************************************************/ -void Phase::make_nearest(double xyz[3]) -{ - // first shift to the first unit cell - for (int i = 0; i !=3; ++i) - { - // MS compatibility - use fmod instead of remainder - xyz[i] = fmod(xyz[i], icc[i]); - } - // that is all in orthogonal cell or if we get to the origin - if ( (xyz[0] == 0.0 && xyz[1] == 0.0 && xyz[2] == 0.0) || - (win[0] == 90.0 && win[1] == 90.0 && win[2] == 90.0) ) - { - return; - } - // otherwise we need to check all cells around - // first, let us shift to octant with xyz[i] <= 0.0 - for (int i = 0; i != 3; ++i) - { - if (xyz[i] > 0.0) xyz[i] -= icc[i]; - } - double nearest[3] = { xyz[0], xyz[1], xyz[2] }; - double mindsquare = skalpro(nearest, nearest); - double test[3]; - for (test[0] = xyz[0]; test[0] < icc[0]; test[0] += icc[0]) - { - for (test[1] = xyz[1]; test[1] < icc[1]; test[1] += icc[1]) - { - for (test[2] = xyz[2]; test[2] < icc[2]; test[2] += icc[2]) - { - double dsquare = skalpro(test,test); - if (dsquare < mindsquare) - { - copy(test, test+3, nearest); - dsquare = mindsquare; - } - } - } - } - copy(nearest, nearest+3, xyz); -} - -pair Phase::bond_angle(int ia, int ja, int ka) -{ - double x[3], y[3], dx[3], dy[3], xx, yy, xy, dxx, dyy, dxy, arg, darg, ang, dang; - - - if ( (ia < 1) || (ia > natoms) || (ja < 1) || (ja > natoms) - || (ka < 1) || (ka > natoms)) - { - stringstream eout; - eout << "Incorrect atom number(s): " << ia << ", " << ja << ", " << ka; - throw ValueError(eout.str()); - } - if ( ia == ja || ia == ka || ja == ka ) - { - stringstream eout; - eout << "All atoms must be different: " << ia << ", "; - eout << ja << ", " << ka; - throw ValueError(eout.str()); - } - - Atom& ai = atom[ia - 1]; - Atom& aj = atom[ja - 1]; - Atom& ak = atom[ka - 1]; - - for (int i=0; i<3; i++) - { - x[i] = aj.pos[i] - ai.pos[i]; - y[i] = aj.pos[i] - ak.pos[i]; - dx[i] = aj.dpos[i] + ai.dpos[i]; - dy[i] = aj.dpos[i] + ak.dpos[i]; - } - - make_nearest(x); - make_nearest(y); - xx = sqrt(skalpro(x,x)); - yy = sqrt(skalpro(y,y)); - xy = skalpro(x,y); - - dxx = 0.5/xx*dskalpro(x,x,dx,dx); - dyy = 0.5/yy*dskalpro(y,y,dy,dy); - dxy = dskalpro(x,y,dx,dy); - arg = xy/(xx*yy); - ang = acosd(arg); - darg = (1.0/(xx*yy)*dxy + arg/xx*dxx +arg/yy*dyy); - if (arg != 1.0) - dang = fabs(1.0/sqrt(1.0-arg*arg)/rad*darg); - else - dang = 0.0; - - pair rv(ang, dang); - - return rv; -} - -/*************************************** -c Calculate bond lengths with errors -****************************************/ -PairDistance PdfFit::bond_length_atoms(int ia, int ja) -{ - if (!curphase) - { - throw unassignedError("Must read structure first"); - } - return curphase->bond_length_atoms(ia, ja); -} - -PairDistance Phase::bond_length_atoms(int ia, int ja) -{ - double d[3], dd[3], dist, ddist; - - // -- Simple distance between given atoms - - if ( (ia < 1) || (ia > natoms) || (ja < 1) || (ja > natoms) ) - { - - stringstream eout; - eout << "Incorrect atom number(s): " << ia << ", " << ja; - throw ValueError(eout.str()); - } - - Atom& ai = atom[ia-1]; - Atom& aj = atom[ja-1]; - - for (int jj=0; jj<3; jj++) - { - d[jj] = ai.pos[jj] - aj.pos[jj]; - dd[jj] = ai.dpos[jj] + aj.dpos[jj]; - } - make_nearest(d); - dist = sqrt(skalpro(d,d)); - ddist = (dist > 0) ? 0.5/dist * dskalpro(d,d,dd,dd) : 0.0; - - PairDistance pd; - pd.dij = dist; - pd.ddij = ddist; - pd.i = ia; - pd.j = ja; - - return pd; -} - - -vector PdfFit::bond_length_types(string symi, string symj, - double bmin, double bmax) -{ - if (!curphase) - { - throw unassignedError("Must read structure first"); - } - return curphase->bond_length_types(symi, symj, bmin, bmax); -} - -vector Phase::bond_length_types(string symi, string symj, - double bmin, double bmax) -{ - double d[3], dd[3], dist, ddist; - set iselection, jselection; - iselection = selectAtomsOf(symi); - jselection = selectAtomsOf(symj); - - // ---- Get all bonds in specified range - - // calculate range for PointsInSphere sequencer - // (negative rsphmin is no problem) - double buffzone = circum_diameter(); - double rsphmin = bmin - buffzone; - double rsphmax = bmax + buffzone; - PointsInSphere sph( rsphmin, rsphmax, a0[0]*icc[0], - a0[1]*icc[1], a0[2]*icc[2], - win[0], win[1], win[2] ); - - // -- Loop over all atoms within the crystal - vector rv; - set::iterator ia, ja; - for (ia = iselection.begin(); ia != iselection.end(); ++ia) - { - for (ja = jselection.begin(); ja != jselection.end(); ++ja) - { - for (sph.rewind(); !sph.finished(); sph.next()) - { - for (int jj=0; jj<3; jj++) - { - d[jj] = atom[*ia].pos[jj] - atom[*ja].pos[jj] - - sph.mno[jj]*icc[jj]; - dd[jj] = atom[*ia].dpos[jj] + atom[*ja].dpos[jj]; - } - dist = sqrt(skalpro(d,d)); - if ( (dist >= bmin) && (dist <= bmax) ) - { - ddist = (dist > 0) ? 0.5/dist * dskalpro(d,d,dd,dd) : 0.0; - PairDistance pd; - pd.dij = dist; - pd.ddij = ddist; - pd.i = *ia + 1; - pd.j = *ja + 1; - rv.push_back(pd); - } - } - } - } - stable_sort(rv.begin(), rv.end()); - return rv; -} - -set Phase::selectAtomsOf(string symbol) -{ - set selection; - if (toupper(symbol) == "ALL") - { - for (size_t i = 0; i != size_t(natoms); ++i) selection.insert(i); - return selection; - } - // here we need to find AtomType - LocalPeriodicTable* lpt = getPeriodicTable(); - const AtomType* atp; - try - { - atp = lpt->lookup(symbol); - } - catch (ValueError e) - { - ostringstream emsg; - emsg << "Incorrect atom type '" << symbol << "'"; - throw ValueError(emsg.str()); - } - for (size_t i = 0; i != size_t(natoms); ++i) - { - if (atom[i].atom_type == atp) selection.insert(i); - } - return selection; -} - -// End of file diff --git a/libpdffit2/support_msvc9.h b/libpdffit2/support_msvc9.h deleted file mode 100644 index cb4bbf70..00000000 --- a/libpdffit2/support_msvc9.h +++ /dev/null @@ -1,13 +0,0 @@ -/*********************************************************************** -* Python 2.7 needs MSVC 9.0 which does not have unique_ptr. -* Work around by substituting auto_ptr instead. -***********************************************************************/ - -#ifdef _MSC_VER - -// workarounds for MSVC 9.0 -------------------------------------------- -#if _MSC_VER <= 1500 -#define unique_ptr auto_ptr -#endif - -#endif // _MSC_VER diff --git a/libpdffit2/tests/Makefile b/libpdffit2/tests/Makefile deleted file mode 100644 index f6bfe566..00000000 --- a/libpdffit2/tests/Makefile +++ /dev/null @@ -1,32 +0,0 @@ -######################################################################## -# Targets: alltests unittests -# -# Comments: This Makefile is for building and running C++ unit tests -# on the libpdffit2 sources. Intended for developers, not for the end -# users who just want to build pdffit2 from sources. -# -######################################################################## - - -# compiler options -CPPFLAGS += -I../ $(shell cppunit-config --cflags) -LDLIBS += $(shell cppunit-config --libs) - - -# default target -all: unittest - - -# build unit test driver -alltests: alltests.cc \ - TestPointsInSphere.cc ../PointsInSphere.cc - - -# execute unit tests -unittest: alltests - ./alltests - - -# clean up any generated files -clean: - rm -f alltests diff --git a/libpdffit2/tests/TestPointsInSphere.cc b/libpdffit2/tests/TestPointsInSphere.cc deleted file mode 100644 index b82fcb31..00000000 --- a/libpdffit2/tests/TestPointsInSphere.cc +++ /dev/null @@ -1,228 +0,0 @@ -/*********************************************************************** -* -* pdffit2 by DANSE Diffraction group -* Simon J. L. Billinge -* (c) 2006 trustees of the Michigan State University -* All rights reserved. -* -* File coded by: Pavol Juhas -* -* See AUTHORS.txt for a list of people who contributed. -* See LICENSE.txt for license information. -* -************************************************************************ -* -* Unit tests for PointsInSphere module -* -* Comments: -* -***********************************************************************/ - -#include -#include -#include -#include - -#include "PointsInSphere.h" - -using namespace std; -using namespace NS_POINTSINSPHERE; - -namespace { - -const double eps = 1.0e-12; - -struct vidxgroup -{ - double vijk[4]; - vidxgroup(double v, int* ijk) - { - vijk[0] = v; - for (size_t i = 0; i != 3; ++i) { vijk[i+1] = ijk[i]; } - } - vidxgroup(double v, int i, int j, int k) - { - vijk[0] = v; vijk[1] = i; vijk[2] = j; vijk[3] = k; - } -}; - -bool operator<(const vidxgroup &x, const vidxgroup &y) -{ - return (x.vijk[0] < y.vijk[0] - eps) || - lexicographical_compare(x.vijk+1, x.vijk+4, y.vijk+1, y.vijk+4); -} - -bool operator==(const vidxgroup &x, const vidxgroup &y) -{ - bool eq = (fabs(x.vijk[0] - y.vijk[0]) < eps) && - equal(x.vijk+1, x.vijk+4, y.vijk+1); - return eq; -} - -ostream& operator<<(ostream &s, const vidxgroup &x) -{ - return s << "<" << x.vijk[0] << ";" << int(x.vijk[1]) - << ',' << int(x.vijk[2]) << ',' << int(x.vijk[3]) << '>'; -} - -} // namespace - -//////////////////////////////////////////////////////////////////////// -// TestPointsInSphere -//////////////////////////////////////////////////////////////////////// - -class TestPointsInSphere : public CppUnit::TestFixture -{ - - CPPUNIT_TEST_SUITE(TestPointsInSphere); - CPPUNIT_TEST(test_Cubic); - CPPUNIT_TEST(test_Orthorombic); - CPPUNIT_TEST(test_Hexagonal); - CPPUNIT_TEST(test_FCC); - CPPUNIT_TEST_SUITE_END(); - -private: - - LatticeParameters* latpar; - -public: - - void setUp() - { - latpar = new LatticeParameters(1, 1, 1, 90, 90, 90); - } - - void tearDown() - { - delete latpar; - } - -private: - - int count(double Rmin, double Rmax) - { - int c = 0; - for ( PointsInSphere sph(Rmin, Rmax, *latpar); - not sph.finished(); sph.next(), ++c ) - { } - return c; - } - - vector sortedPoints(double Rmin, double Rmax) - { - vector ridx; - for ( PointsInSphere sph(Rmin, Rmax, *latpar); - not sph.finished(); sph.next() ) - { - ridx.push_back(vidxgroup(sph.r(), sph.mno)); - } - sort(ridx.begin(), ridx.end()); - return ridx; - } - -public: - - void test_Cubic() - { - latpar->a = latpar->b = latpar->c = 1.0; - latpar->alpha = latpar->beta = latpar->gamma = 90.0; - latpar->update(); - CPPUNIT_ASSERT_EQUAL(0, count(0.0, 0.0)); - CPPUNIT_ASSERT_EQUAL(0, count(eps, 0.5)); - CPPUNIT_ASSERT_EQUAL(0, count(1.0 + eps, 1.1)); - CPPUNIT_ASSERT_EQUAL(1, count(0.0, eps)); - CPPUNIT_ASSERT_EQUAL(7, count(0.0, 1 + eps)); - CPPUNIT_ASSERT_EQUAL(19, count(0.0, sqrt(2.0) + eps)); - CPPUNIT_ASSERT_EQUAL(12, count(1.0 + eps, sqrt(2.0) + eps)); - } - - void test_Orthorombic() - { - latpar->a = 1.0; latpar->b = 2.0; latpar->c = 3.0; - latpar->alpha = latpar->beta = latpar->gamma = 90.0; - latpar->update(); - CPPUNIT_ASSERT_EQUAL(3, count(0.0, 1.1)); - CPPUNIT_ASSERT_EQUAL(4, count(1.9, 2.1)); - vidxgroup ep[] = { - vidxgroup(0, 0, 0, 0), - vidxgroup(1, -1, 0, 0), - vidxgroup(1, 1, 0, 0), - vidxgroup(2, -2, 0, 0), - vidxgroup(2, 0, -1, 0), - vidxgroup(2, 0, 1, 0), - vidxgroup(2, 2, 0, 0), - vidxgroup(sqrt(5.0), -1, -1, 0), - vidxgroup(sqrt(5.0), -1, 1, 0), - vidxgroup(sqrt(5.0), 1, -1, 0), - vidxgroup(sqrt(5.0), 1, 1, 0), - vidxgroup(sqrt(8.0), -2, -1, 0), - vidxgroup(sqrt(8.0), -2, 1, 0), - vidxgroup(sqrt(8.0), 2, -1, 0), - vidxgroup(sqrt(8.0), 2, 1, 0), - vidxgroup(3, -3, 0, 0), - vidxgroup(3, 0, 0, -1), - vidxgroup(3, 0, 0, 1), - vidxgroup(3, 3, 0, 0), - }; - vector exp_pts(ep, ep + sizeof(ep)/sizeof(vidxgroup)); - vector act_pts = sortedPoints(0.0, 3.0+eps); - CPPUNIT_ASSERT_EQUAL(exp_pts.size(), act_pts.size()); - for (size_t i = 0; i != exp_pts.size(); ++i) - { - CPPUNIT_ASSERT_EQUAL(exp_pts[i], act_pts[i]); - } - } - - void test_Hexagonal() - { - latpar->a = 1.0; latpar->b = 1.0; latpar->c = 2.0; - latpar->alpha = latpar->beta = 90.0; latpar->gamma = 120.0; - latpar->update(); - CPPUNIT_ASSERT_EQUAL(7, count(0.0, 1+eps)); - vidxgroup ep[] = { - vidxgroup(0, 0, 0, 0), - vidxgroup(1, -1, -1, 0), - vidxgroup(1, -1, 0, 0), - vidxgroup(1, 0, -1, 0), - vidxgroup(1, 0, 1, 0), - vidxgroup(1, 1, 0, 0), - vidxgroup(1, 1, 1, 0), - vidxgroup(sqrt(3.0), -2, -1, 0), - vidxgroup(sqrt(3.0), -1, -2, 0), - vidxgroup(sqrt(3.0), -1, 1, 0), - vidxgroup(sqrt(3.0), 1, -1, 0), - vidxgroup(sqrt(3.0), 1, 2, 0), - vidxgroup(sqrt(3.0), 2, 1, 0), - vidxgroup(2, -2, -2, 0), - vidxgroup(2, -2, 0, 0), - vidxgroup(2, 0, -2, 0), - vidxgroup(2, 0, 0, -1), - vidxgroup(2, 0, 0, 1), - vidxgroup(2, 0, 2, 0), - vidxgroup(2, 2, 0, 0), - vidxgroup(2, 2, 2, 0), - }; - vector exp_pts(ep, ep + sizeof(ep)/sizeof(vidxgroup)); - vector act_pts = sortedPoints(0.0, 2.0+eps); - CPPUNIT_ASSERT_EQUAL(exp_pts.size(), act_pts.size()); - for (size_t i = 0; i != exp_pts.size(); ++i) - { - CPPUNIT_ASSERT_EQUAL(exp_pts[i], act_pts[i]); - } - } - - void test_FCC() - { - latpar->a = latpar->b = latpar->c = sqrt(0.5); - latpar->alpha = latpar->beta = latpar->gamma = 60.0; - latpar->update(); - CPPUNIT_ASSERT_EQUAL(13, count(0.0, sqrt(0.5)+eps)); - CPPUNIT_ASSERT_EQUAL(19, count(0.0, 1.0+eps)); - } - -}; - -// Registers the fixture into the 'registry' -CPPUNIT_TEST_SUITE_REGISTRATION(TestPointsInSphere); - -// End of file diff --git a/libpdffit2/tests/alltests.cc b/libpdffit2/tests/alltests.cc deleted file mode 100644 index 318cb4b3..00000000 --- a/libpdffit2/tests/alltests.cc +++ /dev/null @@ -1,46 +0,0 @@ -/*********************************************************************** -* -* pdffit2 by DANSE Diffraction group -* Simon J. L. Billinge -* (c) 2006 trustees of the Michigan State University -* All rights reserved. -* -* File coded by: Pavol Juhas -* -* See AUTHORS.txt for a list of people who contributed. -* See LICENSE.txt for license information. -* -************************************************************************ -* -* Unit tests driver -* -***********************************************************************/ - -#include -#include -#include -#include -#include - -using namespace std; -using namespace CppUnit; - -int main() -{ - // Get the top level suite from the registry - Test *suite = TestFactoryRegistry::getRegistry().makeTest(); - - // Adds the test to the list of test to run - TextUi::TestRunner runner; - runner.addTest( suite ); - - // Change the default outputter to a compiler error format outputter - runner.setOutputter( new CompilerOutputter(&runner.result(), cerr) ); - // Run the tests. - bool wasSucessful = runner.run(); - - // Return error code 1 if the one of test failed. - return wasSucessful ? EXIT_SUCCESS : EXIT_FAILURE; -} - -// End of file diff --git a/pdffit2module/PyFileStreambuf.h b/pdffit2module/PyFileStreambuf.h deleted file mode 100644 index 3a2bc383..00000000 --- a/pdffit2module/PyFileStreambuf.h +++ /dev/null @@ -1,97 +0,0 @@ -/*********************************************************************** -* -* pdffit2 by DANSE Diffraction group -* Simon J. L. Billinge -* (c) 2007 trustees of the Michigan State University -* All rights reserved. -* -* File coded by: Pavol Juhas -* -* See AUTHORS.txt for a list of people who contributed. -* See LICENSE.txt for license information. -* -************************************************************************ -* -* class PyFileStreambuf -* -* Comments: PyFileStreambuf is a C++ streambuf which writes to a python -* file-like object. The python file can be changed anytime by -* calling the redirect() method. -* -* Examples: // redirect std::cout -* std::cout.rdbuf( PyFileStreambuf(PyObject* python_file) ); -* -***********************************************************************/ - -#ifndef PYFILESTREAMBUF_H_INCLUDED -#define PYFILESTREAMBUF_H_INCLUDED -#define PY_SSIZE_T_CLEAN - -#include -#include - -// MS compatibility fix -#include - -class PyFileStreambuf : public std::streambuf -{ - private: - - // Data members - PyObject* py_file; - - public: - - // Constructor - PyFileStreambuf(PyObject* f) : py_file(f) - { - Py_INCREF(py_file); - } - - // Destructor - ~PyFileStreambuf() - { - Py_DECREF(py_file); - } - - // Methods - PyObject* redirect(PyObject* f) - { - Py_INCREF(f); - Py_DECREF(py_file); - py_file = f; - return py_file; - } - - protected: - - virtual int_type overflow( int_type c) - { - PyObject* rv; - rv = PyObject_CallMethod(py_file, "write", "(s#)", &c, 1); - if (rv) { Py_DECREF(rv); } - return c; - } - - virtual std::streamsize xsputn(const char_type* s, std::streamsize n) - { - PyObject* rv; - rv = PyObject_CallMethod(py_file, "write", "(s#)", s, n); - if (rv) { Py_DECREF(rv); } - return n; - } - - virtual int sync() - { - if (PyObject_HasAttrString(py_file, "flush")) - { - PyObject* rv; - rv = PyObject_CallMethod(py_file, "flush", NULL); - if (rv) { Py_DECREF(rv); } - } - return 0; - } - -}; - -#endif // PYFILESTREAMBUF_H_INCLUDED diff --git a/pdffit2module/bindings.cc b/pdffit2module/bindings.cc deleted file mode 100644 index 568e1dd1..00000000 --- a/pdffit2module/bindings.cc +++ /dev/null @@ -1,341 +0,0 @@ -/*********************************************************************** -* -* pdffit2 by DANSE Diffraction group -* Simon J. L. Billinge -* (c) 2006 trustees of the Michigan State University -* All rights reserved. -* -* File coded by: Chris Farrow -* -* See AUTHORS.txt for a list of people who contributed. -* See LICENSE.txt for license information. -* -************************************************************************ -* -* Method table for python module bindings. -* -* Comments: -* -***********************************************************************/ -#define PY_SSIZE_T_CLEAN -#include - -#include "bindings.h" -#include "misc.h" - -// the method table -struct PyMethodDef pypdffit2_methods[] = { - - //copyright - {pypdffit2_copyright__name__, pypdffit2_copyright, - METH_VARARGS, pypdffit2_copyright__doc__}, - - //create - {pypdffit2_create__name__, pypdffit2_create, - METH_VARARGS, pypdffit2_create__doc__}, - - //read_struct - {pypdffit2_read_struct__name__, pypdffit2_read_struct, - METH_VARARGS, pypdffit2_read_struct__doc__}, - - //read_struct_string - {pypdffit2_read_struct_string__name__, pypdffit2_read_struct_string, - METH_VARARGS, pypdffit2_read_struct_string__doc__}, - - //read_data - {pypdffit2_read_data__name__, pypdffit2_read_data, - METH_VARARGS, pypdffit2_read_data__doc__}, - - //read_data_string - {pypdffit2_read_data_string__name__, pypdffit2_read_data_string, - METH_VARARGS, pypdffit2_read_data_string__doc__}, - - //read_data_arrays - {pypdffit2_read_data_arrays__name__, pypdffit2_read_data_arrays, - METH_VARARGS, pypdffit2_read_data_arrays__doc__}, - - //pdfrange - {pypdffit2_pdfrange__name__, pypdffit2_pdfrange, - METH_VARARGS, pypdffit2_pdfrange__doc__}, - - //reset - {pypdffit2_reset__name__, pypdffit2_reset, - METH_VARARGS, pypdffit2_reset__doc__}, - - //alloc - {pypdffit2_alloc__name__, pypdffit2_alloc, - METH_VARARGS, pypdffit2_alloc__doc__}, - - //calc - {pypdffit2_calc__name__, pypdffit2_calc, - METH_VARARGS, pypdffit2_calc__doc__}, - - //refine - {pypdffit2_refine__name__, pypdffit2_refine, - METH_VARARGS, pypdffit2_refine__doc__}, - - //refine_step - {pypdffit2_refine_step__name__, pypdffit2_refine_step, - METH_VARARGS, pypdffit2_refine_step__doc__}, - - //save_pdf - {pypdffit2_save_pdf__name__, pypdffit2_save_pdf, - METH_VARARGS, pypdffit2_save_pdf__doc__}, - - //save_dif - {pypdffit2_save_dif__name__, pypdffit2_save_dif, - METH_VARARGS, pypdffit2_save_dif__doc__}, - - //save_res - {pypdffit2_save_res__name__, pypdffit2_save_res, - METH_VARARGS, pypdffit2_save_res__doc__}, - - //save_struct - {pypdffit2_save_struct__name__, pypdffit2_save_struct, - METH_VARARGS, pypdffit2_save_struct__doc__}, - - //show_struct - {pypdffit2_show_struct__name__, pypdffit2_show_struct, - METH_VARARGS, pypdffit2_show_struct__doc__}, - - //constrain_int - {pypdffit2_constrain_int__name__, pypdffit2_constrain_int, - METH_VARARGS, pypdffit2_constrain_int__doc__}, - - //constrain_str - {pypdffit2_constrain_str__name__, pypdffit2_constrain_str, - METH_VARARGS, pypdffit2_constrain_str__doc__}, - - //setpar_dbl - {pypdffit2_setpar_dbl__name__, pypdffit2_setpar_dbl, - METH_VARARGS, pypdffit2_setpar_dbl__doc__}, - - //setpar_RV - {pypdffit2_setpar_RV__name__, pypdffit2_setpar_RV, - METH_VARARGS, pypdffit2_setpar_RV__doc__}, - - //setvar - {pypdffit2_setvar__name__, pypdffit2_setvar, - METH_VARARGS, pypdffit2_setvar__doc__}, - - //getvar - {pypdffit2_getvar__name__, pypdffit2_getvar, - METH_VARARGS, pypdffit2_getvar__doc__}, - - //getR - {pypdffit2_getR__name__, pypdffit2_getR, - METH_VARARGS, pypdffit2_getR__doc__}, - - //getpdf_fit - {pypdffit2_getpdf_fit__name__, pypdffit2_getpdf_fit, - METH_VARARGS, pypdffit2_getpdf_fit__doc__}, - - //getpdf_obs - {pypdffit2_getpdf_obs__name__, pypdffit2_getpdf_obs, - METH_VARARGS, pypdffit2_getpdf_obs__doc__}, - - //getpdf_diff - {pypdffit2_getpdf_diff__name__, pypdffit2_getpdf_diff, - METH_VARARGS, pypdffit2_getpdf_diff__doc__}, - - //getcrw - {pypdffit2_getcrw__name__, pypdffit2_getcrw, - METH_VARARGS, pypdffit2_getcrw__doc__}, - - //getrw - {pypdffit2_getrw__name__, pypdffit2_getrw, - METH_VARARGS, pypdffit2_getrw__doc__}, - - //getpar - {pypdffit2_getpar__name__, pypdffit2_getpar, - METH_VARARGS, pypdffit2_getpar__doc__}, - - //fixpar - {pypdffit2_fixpar__name__, pypdffit2_fixpar, - METH_VARARGS, pypdffit2_fixpar__doc__}, - - //freepar - {pypdffit2_freepar__name__, pypdffit2_freepar, - METH_VARARGS, pypdffit2_freepar__doc__}, - - //setphase - {pypdffit2_setphase__name__, pypdffit2_setphase, - METH_VARARGS, pypdffit2_setphase__doc__}, - - //setdata - {pypdffit2_setdata__name__, pypdffit2_setdata, - METH_VARARGS, pypdffit2_setdata__doc__}, - - //psel - {pypdffit2_psel__name__, pypdffit2_psel, - METH_VARARGS, pypdffit2_psel__doc__}, - - //pdesel - {pypdffit2_pdesel__name__, pypdffit2_pdesel, - METH_VARARGS, pypdffit2_pdesel__doc__}, - - //selectAtomType - {pypdffit2_selectAtomType__name__, pypdffit2_selectAtomType, - METH_VARARGS, pypdffit2_selectAtomType__doc__}, - - //selectAtomIndex - {pypdffit2_selectAtomIndex__name__, pypdffit2_selectAtomIndex, - METH_VARARGS, pypdffit2_selectAtomIndex__doc__}, - - //selectAll - {pypdffit2_selectAll__name__, pypdffit2_selectAll, - METH_VARARGS, pypdffit2_selectAll__doc__}, - - //selectNone - {pypdffit2_selectNone__name__, pypdffit2_selectNone, - METH_VARARGS, pypdffit2_selectNone__doc__}, - - //bond_angle - {pypdffit2_bond_angle__name__, pypdffit2_bond_angle, - METH_VARARGS, pypdffit2_bond_angle__doc__}, - - //bond_length_atoms - {pypdffit2_bond_length_atoms__name__, pypdffit2_bond_length_atoms, - METH_VARARGS, pypdffit2_bond_length_atoms__doc__}, - - //bond_length_types - {pypdffit2_bond_length_types__name__, pypdffit2_bond_length_types, - METH_VARARGS, pypdffit2_bond_length_types__doc__}, - - //get_scat_string - {pypdffit2_get_scat_string__name__, pypdffit2_get_scat_string, - METH_VARARGS, pypdffit2_get_scat_string__doc__}, - - //get_scat - {pypdffit2_get_scat__name__, pypdffit2_get_scat, - METH_VARARGS, pypdffit2_get_scat__doc__}, - - //set_scat - {pypdffit2_set_scat__name__, pypdffit2_set_scat, - METH_VARARGS, pypdffit2_set_scat__doc__}, - - //reset_scat - {pypdffit2_reset_scat__name__, pypdffit2_reset_scat, - METH_VARARGS, pypdffit2_reset_scat__doc__}, - - //lat - {pypdffit2_lat__name__, pypdffit2_lat, - METH_VARARGS, pypdffit2_lat__doc__}, - - //x - {pypdffit2_x__name__, pypdffit2_x, - METH_VARARGS, pypdffit2_x__doc__}, - - //y - {pypdffit2_y__name__, pypdffit2_y, - METH_VARARGS, pypdffit2_y__doc__}, - - //z - {pypdffit2_z__name__, pypdffit2_z, - METH_VARARGS, pypdffit2_z__doc__}, - - //u11 - {pypdffit2_u11__name__, pypdffit2_u11, - METH_VARARGS, pypdffit2_u11__doc__}, - - //u22 - {pypdffit2_u22__name__, pypdffit2_u22, - METH_VARARGS, pypdffit2_u22__doc__}, - - //u33 - {pypdffit2_u33__name__, pypdffit2_u33, - METH_VARARGS, pypdffit2_u33__doc__}, - - //u12 - {pypdffit2_u12__name__, pypdffit2_u12, - METH_VARARGS, pypdffit2_u12__doc__}, - - //u13 - {pypdffit2_u13__name__, pypdffit2_u13, - METH_VARARGS, pypdffit2_u13__doc__}, - - //u23 - {pypdffit2_u23__name__, pypdffit2_u23, - METH_VARARGS, pypdffit2_u23__doc__}, - - //occ - {pypdffit2_occ__name__, pypdffit2_occ, - METH_VARARGS, pypdffit2_occ__doc__}, - - //pscale - {pypdffit2_pscale__name__, pypdffit2_pscale, - METH_VARARGS, pypdffit2_pscale__doc__}, - - //spdiameter - {pypdffit2_spdiameter__name__, pypdffit2_spdiameter, - METH_VARARGS, pypdffit2_spdiameter__doc__}, - - //stepcut - {pypdffit2_stepcut__name__, pypdffit2_stepcut, - METH_VARARGS, pypdffit2_stepcut__doc__}, - - //sratio - {pypdffit2_sratio__name__, pypdffit2_sratio, - METH_VARARGS, pypdffit2_sratio__doc__}, - - //delta2 - {pypdffit2_delta2__name__, pypdffit2_delta2, - METH_VARARGS, pypdffit2_delta2__doc__}, - - //delta1 - {pypdffit2_delta1__name__, pypdffit2_delta1, - METH_VARARGS, pypdffit2_delta1__doc__}, - - //dscale - {pypdffit2_dscale__name__, pypdffit2_dscale, - METH_VARARGS, pypdffit2_dscale__doc__}, - - //qdamp - {pypdffit2_qdamp__name__, pypdffit2_qdamp, - METH_VARARGS, pypdffit2_qdamp__doc__}, - - //qbroad - {pypdffit2_qbroad__name__, pypdffit2_qbroad, - METH_VARARGS, pypdffit2_qbroad__doc__}, - - //rcut - {pypdffit2_rcut__name__, pypdffit2_rcut, - METH_VARARGS, pypdffit2_rcut__doc__}, - - //get_atoms - {pypdffit2_get_atoms__name__, pypdffit2_get_atoms, - METH_VARARGS, pypdffit2_get_atoms__doc__}, - - //num_atoms - {pypdffit2_num_atoms__name__, pypdffit2_num_atoms, - METH_VARARGS, pypdffit2_num_atoms__doc__}, - - //get_atom_types - {pypdffit2_get_atom_types__name__, pypdffit2_get_atom_types, - METH_VARARGS, pypdffit2_get_atom_types__doc__}, - - //num_phases - {pypdffit2_num_phases__name__, pypdffit2_num_phases, - METH_VARARGS, pypdffit2_num_phases__doc__}, - - //num_datasets - {pypdffit2_num_datasets__name__, pypdffit2_num_datasets, - METH_VARARGS, pypdffit2_num_datasets__doc__}, - - //phase_fractions - {pypdffit2_phase_fractions__name__, pypdffit2_phase_fractions, - METH_VARARGS, pypdffit2_phase_fractions__doc__}, - - //redirect_stdout - {pypdffit2_redirect_stdout__name__, pypdffit2_redirect_stdout, - METH_VARARGS, pypdffit2_redirect_stdout__doc__}, - - //is_element - {pypdffit2_is_element__name__, pypdffit2_is_element, - METH_VARARGS, pypdffit2_is_element__doc__}, - -// Sentinel - {0, 0} -}; - -// End of file diff --git a/pdffit2module/bindings.h b/pdffit2module/bindings.h deleted file mode 100644 index bf1e1406..00000000 --- a/pdffit2module/bindings.h +++ /dev/null @@ -1,27 +0,0 @@ -/*********************************************************************** -* -* pdffit2 by DANSE Diffraction group -* Simon J. L. Billinge -* (c) 2006 trustees of the Michigan State University -* All rights reserved. -* -* File coded by: Chris Farrow -* -* See AUTHORS.txt for a list of people who contributed. -* See LICENSE.txt for license information. -* -************************************************************************ -* -* Method table for python module bindings. -* -* Comments: -* -***********************************************************************/ - -#ifndef PYPDFFIT2_BINDINGS_H -#define PYPDFFIT2_BINDINGS_H - -// the method table -extern struct PyMethodDef pypdffit2_methods[]; - -#endif // PYPDFFIT2_BINDINGS_H diff --git a/pdffit2module/misc.cc b/pdffit2module/misc.cc deleted file mode 100644 index 80198049..00000000 --- a/pdffit2module/misc.cc +++ /dev/null @@ -1,2219 +0,0 @@ -/*********************************************************************** -* -* pdffit2 by DANSE Diffraction group -* Simon J. L. Billinge -* (c) 2006 trustees of the Michigan State University -* All rights reserved. -* -* File coded by: Chris Farrow -* -* See AUTHORS.txt for a list of people who contributed. -* See LICENSE.txt for license information. -* -************************************************************************ -* -* Bindings from python to c++ PdfFit class. -* -* Comments: -* -***********************************************************************/ -#define PY_SSIZE_T_CLEAN -#include -#include -#include -#include -#include -#include -#include -#include - -#include "misc.h" -#include "pyexceptions.h" -#include "PyFileStreambuf.h" -#include "libpdffit2/StringUtils.h" -#include "libpdffit2/LocalPeriodicTable.h" -#include "libpdffit2/pdffit.h" - -// ostream buffer used for engine output redirection -PyFileStreambuf* py_stdout_streambuf = NULL; - -// copyright -char pypdffit2_copyright__doc__[] = ""; -char pypdffit2_copyright__name__[] = "copyright"; - -static char pypdffit2_copyright_note[] = - "pdffit2 python module: Copyright (c) 2005-2016 Simon J. L. Billinge et al."; - -// constant strings for python capsule names (cn) -static char* cnpfit = "pdffit"; -static char* cnvar = "pdfvar"; - -PyObject * pypdffit2_copyright(PyObject *, PyObject *) -{ - return Py_BuildValue("s", pypdffit2_copyright_note); -} - -//helper function to convert a pylist to a double array. -void double_array_from_pylist(PyObject *pylist, double *d_array, int const length) -{ - //length is the size of the d_array and not necessarily equal to the length - //of the pylist - PyObject *pyval = 0; - - for(int i = 0; i < length; i++) { - pyval = PyList_GetItem(pylist, i); - d_array[i] = PyFloat_AsDouble(pyval); - } -} - -// helper function to delete PdfFit object -static void deletePdfFit(PyObject* ptr) -{ - PdfFit *pdf = (PdfFit *)PyCapsule_GetPointer(ptr, cnpfit); - delete pdf; - return; -} - -// create a PdfFit instance -char pypdffit2_create__doc__[] = ""; -char pypdffit2_create__name__[] = "create"; - -PyObject * pypdffit2_create(PyObject *, PyObject *args) -{ - PdfFit *ppdf = new PdfFit(); - PyObject *py_ppdf = PyCapsule_New((void *)ppdf, cnpfit, deletePdfFit); - return py_ppdf; -} - - -// read_struct -char pypdffit2_read_struct__doc__[] = "Read structure file into memory."; -char pypdffit2_read_struct__name__[] = "read_struct"; - -PyObject * pypdffit2_read_struct(PyObject *, PyObject *args) -{ - char *fname; - PyObject *py_ppdf = 0; - int ok = PyArg_ParseTuple(args, "Os", &py_ppdf, &fname); - if (!ok) return 0; - PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); - try { - ppdf->read_struct(fname); - } - catch(structureError e) { - PyErr_SetString(pypdffit2_structureError, e.GetMsg().c_str()); - return 0; - } - catch(ValueError e) { - PyErr_SetString(pypdffit2_structureError, e.GetMsg().c_str()); - return 0; - } - catch(calculationError e) { - PyErr_SetString(pypdffit2_calculationError, e.GetMsg().c_str()); - return 0; - } - catch(IOError e) { - PyErr_SetString(PyExc_IOError, e.GetMsg().c_str()); - return 0; - } - Py_INCREF(Py_None); - return Py_None; -} - -// read_struct_string -char pypdffit2_read_struct_string__doc__[] = "Read structure file into memory from a c-string."; -char pypdffit2_read_struct_string__name__[] = "read_struct_string"; - -PyObject * pypdffit2_read_struct_string(PyObject *, PyObject *args) -{ - char *buffer; - PyObject *py_ppdf = 0; - int ok = PyArg_ParseTuple(args, "Os", &py_ppdf, &buffer); - if (!ok) return 0; - PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); - try { - ppdf->read_struct_string(buffer); - } - catch(structureError e) { - PyErr_SetString(pypdffit2_structureError, e.GetMsg().c_str()); - return 0; - } - catch(ValueError e) { - PyErr_SetString(pypdffit2_structureError, e.GetMsg().c_str()); - return 0; - } - catch(calculationError e) { - PyErr_SetString(pypdffit2_calculationError, e.GetMsg().c_str()); - return 0; - } - Py_INCREF(Py_None); - return Py_None; -} - - -// read_data -char pypdffit2_read_data__doc__[] = "Read data file into memory."; -char pypdffit2_read_data__name__[] = "read_data"; - -PyObject * pypdffit2_read_data(PyObject *, PyObject *args) -{ - char *fname; - char stype; - double qmax, qdamp; - PyObject *py_ppdf = 0; - int ok = PyArg_ParseTuple(args, "Oscdd", &py_ppdf, &fname, &stype, &qmax, &qdamp); - if (!ok) return 0; - PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); - try { - ppdf->read_data(fname, stype, qmax, qdamp); - } - catch(IOError e) { - PyErr_SetString(PyExc_IOError, e.GetMsg().c_str()); - return 0; - } - catch(dataError e) { - PyErr_SetString(pypdffit2_dataError, e.GetMsg().c_str()); - return 0; - } - Py_INCREF(Py_None); - return Py_None; -} - -// read_data_string -char pypdffit2_read_data_string__doc__[] = "Read data from string into memory."; -char pypdffit2_read_data_string__name__[] = "read_data_string"; - -PyObject * pypdffit2_read_data_string(PyObject *, PyObject *args) -{ - char *buffer; - char *c_name = NULL; - char stype; - double qmax, qdamp; - PyObject *py_ppdf = 0; - int ok = PyArg_ParseTuple(args, "Oscdd|s", &py_ppdf, &buffer, &stype, &qmax, &qdamp, &c_name); - if (!ok) return 0; - PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); - string name = c_name ? c_name : ""; - try { - string sbuffer(buffer); - ppdf->read_data_string(sbuffer, stype, qmax, qdamp, name); - } - catch(IOError e) { - PyErr_SetString(PyExc_IOError, e.GetMsg().c_str()); - return 0; - } - catch(dataError e) { - PyErr_SetString(pypdffit2_dataError, e.GetMsg().c_str()); - return 0; - } - Py_INCREF(Py_None); - return Py_None; -} - -// read_data_arrays - read_data_lists in PdfFit class -char pypdffit2_read_data_arrays__doc__[] = "Read data from arrays into memory."; -char pypdffit2_read_data_arrays__name__[] = "read_data_arrays"; - -PyObject * pypdffit2_read_data_arrays(PyObject *, PyObject *args) -{ - char stype; - double qmax, qdamp; - int length; - char * c_name = NULL; - double *r_data = NULL; - double *Gr_data = NULL; - double *dGr_data = NULL; - PyObject *py_r_data = Py_None; - PyObject *py_Gr_data = Py_None; - PyObject *py_dGr_data = Py_None; - PyObject *py_ppdf = NULL; - int ok = PyArg_ParseTuple(args, "OcddOO|Os", &py_ppdf, &stype, &qmax, &qdamp, - &py_r_data, &py_Gr_data, &py_dGr_data, &c_name); - if (!ok) return 0; - PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); - - length = PyList_Size(py_Gr_data); - //quick check that the arrays are all the same length // - int r_len = PyList_Size(py_r_data); - int dGr_len = length; - if(py_dGr_data != Py_None) { - dGr_len = PyList_Size(py_dGr_data); - } - if(r_len != length || dGr_len != length) - { - string err_string = "Data arrays have different lengths"; - PyErr_SetString(PyExc_ValueError, err_string.c_str()); - return 0; - } - - // create data arrays - r_data = new double [length]; - double_array_from_pylist(py_r_data, r_data, length); - Gr_data = new double [length]; - double_array_from_pylist(py_Gr_data, Gr_data, length); - if(py_dGr_data != Py_None) { - dGr_data = new double [length]; - double_array_from_pylist(py_dGr_data, dGr_data, length); - } - string name = c_name; - try { - ppdf->read_data_arrays(stype, qmax, qdamp, length, - r_data, Gr_data, dGr_data, name); - } - catch(dataError e) { - PyErr_SetString(pypdffit2_dataError, e.GetMsg().c_str()); - return 0; - } - - // read_data_arrays creates its own copy of the data, so we must delete our - // copies here. - delete [] r_data; - delete [] Gr_data; - if( dGr_data != NULL ) delete [] dGr_data; - Py_INCREF(Py_None); - return Py_None; -} - -// pdfrange (range in c) -char pypdffit2_pdfrange__doc__[] = "Set r-range of pdf."; -char pypdffit2_pdfrange__name__[] = "pdfrange"; - -PyObject * pypdffit2_pdfrange(PyObject *, PyObject *args) -{ - int iset; - double rmin, rmax; - PyObject *py_ppdf = 0; - int ok = PyArg_ParseTuple(args, "Oidd", &py_ppdf, &iset, &rmin, &rmax); - if (!ok) return 0; - PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); - try { - ppdf->range(iset, rmin, rmax); - } - catch (ValueError e) { - PyErr_SetString(PyExc_ValueError, e.GetMsg().c_str()); - return 0; - } - Py_INCREF(Py_None); - return Py_None; -} - -// reset -char pypdffit2_reset__doc__[] = "reset pdf data"; -char pypdffit2_reset__name__[] = "reset"; - -PyObject * pypdffit2_reset(PyObject *, PyObject *args) -{ - PyObject *py_ppdf = 0; - int ok = PyArg_ParseTuple(args, "O", &py_ppdf); - if (!ok) return 0; - PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); - ppdf->reset(); - Py_INCREF(Py_None); - return Py_None; -} - -// alloc -char pypdffit2_alloc__doc__[] = "Allocate space for pdf data"; -char pypdffit2_alloc__name__[] = "alloc"; - -PyObject * pypdffit2_alloc(PyObject *, PyObject *args) -{ - char stype; - double qmax, qdamp, rmin, rmax; - int bin; - PyObject *py_ppdf = 0; - int ok = PyArg_ParseTuple(args, "Ocddddi", &py_ppdf, &stype, &qmax, &qdamp, &rmin, &rmax, &bin); - if (!ok) return 0; - PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); - try { - ppdf->alloc(stype, qmax, qdamp, rmin, rmax, bin); - } - catch (ValueError e) { - PyErr_SetString(PyExc_ValueError, e.GetMsg().c_str()); - return 0; - } - catch (unassignedError e) { - PyErr_SetString(pypdffit2_unassignedError, e.GetMsg().c_str()); - return 0; - } - Py_INCREF(Py_None); - return Py_None; -} - -// calc -char pypdffit2_calc__doc__[] = "calculate pdf from data"; -char pypdffit2_calc__name__[] = "calc"; - -PyObject * pypdffit2_calc(PyObject *, PyObject *args) -{ - PyObject *py_ppdf = 0; - int ok = PyArg_ParseTuple(args, "O", &py_ppdf); - if (!ok) return 0; - PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); - try { - ppdf->calc(); - } - catch (calculationError e) { - PyErr_SetString(pypdffit2_calculationError, e.GetMsg().c_str()); - return 0; - } - catch (unassignedError e) { - PyErr_SetString(pypdffit2_unassignedError, e.GetMsg().c_str()); - return 0; - } - catch (parseError e) { - PyErr_SetString(pypdffit2_constraintError, e.GetMsg().c_str()); - return 0; - } - Py_INCREF(Py_None); - return Py_None; -} - -// refine -char pypdffit2_refine__doc__[] = "refine model to pdf data"; -char pypdffit2_refine__name__[] = "refine"; - -PyObject * pypdffit2_refine(PyObject *, PyObject *args) -{ - PyObject *py_ppdf = 0; - double toler; - int ok = PyArg_ParseTuple(args, "Od", &py_ppdf, &toler); - if (!ok) return 0; - PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); - try { - ppdf->refine(true, toler); - } - catch(constraintError e) { - PyErr_SetString(pypdffit2_constraintError, e.GetMsg().c_str()); - return 0; - } - catch(calculationError e) { - PyErr_SetString(pypdffit2_calculationError, e.GetMsg().c_str()); - return 0; - } - Py_INCREF(Py_None); - return Py_None; -} - -// local helper class for background thread in pypdffit2_refine_step() -namespace { - -class RefineStepHelper -{ - private: - PyThreadState* thread_state; - ostringstream msgout; - - public: - // Constructor saves thread state and arranges for holding - // engine output when redirected - RefineStepHelper() - { - if (py_stdout_streambuf) - { - NS_PDFFIT2::pout->rdbuf(msgout.rdbuf()); - } - thread_state = PyEval_SaveThread(); - } - - // method for restoring thread state and writing any outstanding output - void clean() - { - PyEval_RestoreThread(thread_state); - if (py_stdout_streambuf) - { - NS_PDFFIT2::pout->rdbuf(py_stdout_streambuf); - *NS_PDFFIT2::pout << msgout.str(); - } - } -}; - -} // local namespace - -// refine_step -char pypdffit2_refine_step__doc__[] = "Make one step in the refinement process."; -char pypdffit2_refine_step__name__[] = "refine_step"; - -PyObject * pypdffit2_refine_step(PyObject *, PyObject *args) -{ - PyObject *py_ppdf = 0; - double toler; - int ok = PyArg_ParseTuple(args, "Od", &py_ppdf, &toler); - if (!ok) return 0; - PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); - RefineStepHelper janitor; // takes care of thread an output issues - int finished = 1; - try { - finished = ppdf->refine_step(true, toler); - } - catch(parseError e) { - // parseError is due to invalid constraint - janitor.clean(); - PyErr_SetString(pypdffit2_constraintError, e.GetMsg().c_str()); - return 0; - } - catch(constraintError e) { - janitor.clean(); - PyErr_SetString(pypdffit2_constraintError, e.GetMsg().c_str()); - return 0; - } - catch(calculationError e) { - janitor.clean(); - PyErr_SetString(pypdffit2_calculationError, e.GetMsg().c_str()); - return 0; - } - catch(unassignedError e) { - janitor.clean(); - PyErr_SetString(pypdffit2_unassignedError, e.GetMsg().c_str()); - return 0; - } - catch(...) { - janitor.clean(); - return 0; - } - janitor.clean(); - - return Py_BuildValue("i", finished); -} - -// save_pdf -char pypdffit2_save_pdf__doc__[] = "Save calculated pdf to file"; -char pypdffit2_save_pdf__name__[] = "save_pdf"; - -PyObject * pypdffit2_save_pdf(PyObject *, PyObject *args) -{ - char *fname; - int iset; - PyObject *py_ppdf = 0; - int ok = PyArg_ParseTuple(args, "Ois", &py_ppdf, &iset, &fname); - if (!ok) return 0; - PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); - try - { - string outfilestring = ppdf->save_pdf(iset, fname); - return Py_BuildValue("s", outfilestring.c_str()); - } - catch(IOError e) - { - PyErr_SetString(PyExc_IOError, e.GetMsg().c_str()); - return 0; - } - catch(unassignedError e) - { - PyErr_SetString(pypdffit2_unassignedError, e.GetMsg().c_str()); - return 0; - } - Py_INCREF(Py_None); - return Py_None; -} - -// save_dif -char pypdffit2_save_dif__doc__[] = "Save pdf difference to file"; -char pypdffit2_save_dif__name__[] = "save_dif"; - -PyObject * pypdffit2_save_dif(PyObject *, PyObject *args) -{ - char *fname; - int iset; - PyObject *py_ppdf = 0; - int ok = PyArg_ParseTuple(args, "Ois", &py_ppdf, &iset, &fname); - if (!ok) return 0; - PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); - try - { - string outfilestring = ppdf->save_dif(iset, fname); - return Py_BuildValue("s", outfilestring.c_str()); - } - catch(IOError e) - { - PyErr_SetString(PyExc_IOError, e.GetMsg().c_str()); - return 0; - } - catch(unassignedError e) - { - PyErr_SetString(pypdffit2_unassignedError, e.GetMsg().c_str()); - return 0; - } - Py_INCREF(Py_None); - return Py_None; -} - -// save_res -char pypdffit2_save_res__doc__[] = "Save residual to file"; -char pypdffit2_save_res__name__[] = "save_res"; - -PyObject * pypdffit2_save_res(PyObject *, PyObject *args) -{ - char *fname; - PyObject *py_ppdf = 0; - int ok = PyArg_ParseTuple(args, "Os", &py_ppdf, &fname); - if (!ok) return 0; - PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); - try - { - string outfilestring = ppdf->save_res(fname); - return Py_BuildValue("s", outfilestring.c_str()); - } - catch(IOError e) - { - PyErr_SetString(PyExc_IOError, e.GetMsg().c_str()); - return 0; - } - catch(unassignedError e) - { - PyErr_SetString(pypdffit2_unassignedError, e.GetMsg().c_str()); - return 0; - } - Py_INCREF(Py_None); - return Py_None; -} - -// save_struct -char pypdffit2_save_struct__doc__[] = "Save refined structure to file"; -char pypdffit2_save_struct__name__[] = "save_struct"; - -PyObject * pypdffit2_save_struct(PyObject *, PyObject *args) -{ - char *fname; - int iset; - PyObject *py_ppdf = 0; - int ok = PyArg_ParseTuple(args, "Ois", &py_ppdf, &iset, &fname); - if (!ok) return 0; - PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); - try - { - string outfilestring = ppdf->save_struct(iset, fname); - return Py_BuildValue("s", outfilestring.c_str()); - } - catch(IOError e) - { - PyErr_SetString(PyExc_IOError, e.GetMsg().c_str()); - return 0; - } - catch(unassignedError e) - { - PyErr_SetString(pypdffit2_unassignedError, e.GetMsg().c_str()); - return 0; - } - Py_INCREF(Py_None); - return Py_None; -} - -// show_struct -char pypdffit2_show_struct__doc__[] = "Show structure."; -char pypdffit2_show_struct__name__[] = "show_struct"; - -PyObject * pypdffit2_show_struct(PyObject *, PyObject *args) -{ - int ip; - PyObject *py_ppdf = 0; - int ok = PyArg_ParseTuple(args, "Oi", &py_ppdf, &ip); - if (!ok) return 0; - PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); - try - { - string outfilestring = ppdf->show_struct(ip); - return Py_BuildValue("s", outfilestring.c_str()); - } - catch(unassignedError e) - { - PyErr_SetString(pypdffit2_unassignedError, e.GetMsg().c_str()); - return 0; - } - Py_INCREF(Py_None); - return Py_None; -} - -// constrain to string -char pypdffit2_constrain_str__doc__[] = "Constrain refined variable to string."; -char pypdffit2_constrain_str__name__[] = "constrain_str"; - -PyObject* pypdffit2_constrain_str(PyObject*, PyObject* args) -{ - PyObject* py_v = 0; - char* vname; - char* form; - PyObject* py_ppdf = 0; - int ok = PyArg_ParseTuple(args, "OOss", &py_ppdf, &py_v, &vname, &form); - if (!ok) return 0; - PdfFit* ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); - RefVar* v = (RefVar *) PyCapsule_GetPointer(py_v, cnvar); - if (v->type() != "RefVar") - { - string emsg = "cannot constrain non-refinable variable "; - emsg += vname; - PyErr_SetString(pypdffit2_constraintError, emsg.c_str()); - return 0; - } - if (v->isAssigned()) { - try { - ppdf->constrain(*v, form); - } - catch (constraintError e) { - PyErr_SetString(pypdffit2_constraintError, e.GetMsg().c_str()); - return 0; - } - catch (unassignedError e) { - PyErr_SetString(pypdffit2_unassignedError, e.GetMsg().c_str()); - return 0; - } - } - else { - ostringstream emsg; - emsg << "Variable " << vname << " was not yet assigned"; - PyErr_SetString(pypdffit2_unassignedError, emsg.str().c_str()); - } - Py_INCREF(Py_None); - return Py_None; -} - -// constrain to integer. -char pypdffit2_constrain_int__doc__[] = "Constrain refined variable to integer."; -char pypdffit2_constrain_int__name__[] = "constrain_int"; - -PyObject* pypdffit2_constrain_int(PyObject*, PyObject* args) -{ - PyObject* py_v = 0; - int ftype = 0; - char* vname; - int ipar; - PyObject* py_ppdf = 0; - int ok = PyArg_ParseTuple(args, "OOsi|i", &py_ppdf, &py_v, &vname, &ipar, &ftype); - if (!ok) return 0; - PdfFit* ppdf = (PdfFit*) PyCapsule_GetPointer(py_ppdf, cnpfit); - RefVar* v = (RefVar*) PyCapsule_GetPointer(py_v, cnvar); - if (v->type() != "RefVar") - { - string emsg = "cannot constrain non-refinable variable "; - emsg += vname; - PyErr_SetString(pypdffit2_constraintError, emsg.c_str()); - return 0; - } - if (v->isAssigned()) { - try { - if (ftype) - { - ppdf->constrain(*v, ipar, (FCON)ftype); - } - else ppdf->constrain(*v, ipar); - } - catch (constraintError e) { - PyErr_SetString(pypdffit2_constraintError, e.GetMsg().c_str()); - return 0; - } - catch (unassignedError e) { - PyErr_SetString(pypdffit2_unassignedError, e.GetMsg().c_str()); - return 0; - } - } - else { - ostringstream emsg; - emsg << "Variable " << vname << " was not yet assigned"; - PyErr_SetString(pypdffit2_unassignedError, emsg.str().c_str()); - return 0; - } - Py_INCREF(Py_None); - return Py_None; -} - -// setpar with value of double -char pypdffit2_setpar_dbl__doc__[] = "Set parameter value."; -char pypdffit2_setpar_dbl__name__[] = "setpar_dbl"; - -PyObject * pypdffit2_setpar_dbl(PyObject *, PyObject *args) -{ - unsigned int n; - double val; - PyObject *py_ppdf = 0; - int ok = PyArg_ParseTuple(args, "OId", &py_ppdf, &n, &val); - if (!ok) return 0; - PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); - try - { - ppdf->setpar(n, val); - } - catch(unassignedError e) - { - PyErr_SetString(pypdffit2_unassignedError, e.GetMsg().c_str()); - return 0; - } - Py_INCREF(Py_None); - return Py_None; -} - -// setpar with value of RefVar -char pypdffit2_setpar_RV__doc__[] = "Set parameter value via refined variable."; -char pypdffit2_setpar_RV__name__[] = "setpar_RV"; - -PyObject * pypdffit2_setpar_RV(PyObject *, PyObject *args) -{ - unsigned int n; - RefVar *v; - PyObject *py_v; - PyObject *py_ppdf = 0; - int ok = PyArg_ParseTuple(args, "OIO", &py_ppdf, &n, &py_v); - if (!ok) return 0; - PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); - v = (RefVar *) PyCapsule_GetPointer(py_v, cnvar); - if( v->isAssigned() ) { - try - { - ppdf->setpar(n, *v); - } - catch(unassignedError e) - { - PyErr_SetString(pypdffit2_unassignedError, e.GetMsg().c_str()); - return 0; - } - } - else { - string eout = "Variable not yet assigned"; - PyErr_SetString(pypdffit2_unassignedError, eout.c_str()); - return 0; - } - Py_INCREF(Py_None); - return Py_None; -} - -// setvar -char pypdffit2_setvar__doc__[] = "Set variable to value."; -char pypdffit2_setvar__name__[] = "setvar"; - -PyObject * pypdffit2_setvar(PyObject *, PyObject *args) -{ - double a; - NonRefVar *v; - PyObject *py_v; - PyObject *py_ppdf = 0; - int ok = PyArg_ParseTuple(args, "OOd", &py_ppdf, &py_v, &a); - if (!ok) return 0; - PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); - v = (NonRefVar *) PyCapsule_GetPointer(py_v, cnvar); - if( v->isAssigned() ) { - ppdf->setvar(*v, a); - } - else { - string eout = "Must import a structure"; - PyErr_SetString(pypdffit2_unassignedError, eout.c_str()); - return 0; - } - Py_INCREF(Py_None); - return Py_None; -} - -// getvar -char pypdffit2_getvar__doc__[] = "Get variable value."; -char pypdffit2_getvar__name__[] = "getvar"; - -PyObject * pypdffit2_getvar(PyObject *, PyObject *args) -{ - NonRefVar *v = 0; - PyObject *py_v = 0; - PyObject *py_ppdf = 0; - int ok = PyArg_ParseTuple(args, "OO", &py_ppdf, &py_v); - if (!ok) return 0; - PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); - v = (NonRefVar *) PyCapsule_GetPointer(py_v, cnvar); - if(v->isAssigned()) { - double crval = ppdf->getvar(*v); - return Py_BuildValue("d", crval); - } - else { - string eout = "Variable not yet assigned"; - PyErr_SetString(pypdffit2_unassignedError, eout.c_str()); - return 0; - Py_INCREF(Py_None); - return Py_None; - } -} - -// getcrw -char pypdffit2_getcrw__doc__[] = "Get cumulative Rw for the current dataset."; -char pypdffit2_getcrw__name__[] = "getcrw"; - -PyObject * pypdffit2_getcrw(PyObject *, PyObject *args) -{ - PyObject *py_ppdf = 0; - int ok = PyArg_ParseTuple(args, "O", &py_ppdf); - if (!ok) return 0; - PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); - try - { - vector crw = ppdf->getcrw(); - PyObject *py_r; - py_r = PyList_New(crw.size()); - for (int i = 0; i != int(crw.size()); ++i) - { - PyList_SetItem(py_r, i, PyFloat_FromDouble(crw[i])); - } - return py_r; - } - catch(unassignedError e) - { - PyErr_SetString(pypdffit2_unassignedError, e.GetMsg().c_str()); - return 0; - } -} - -// getrw -char pypdffit2_getrw__doc__[] = "Get rw of fit."; -char pypdffit2_getrw__name__[] = "getrw"; - -PyObject * pypdffit2_getrw(PyObject *, PyObject *args) -{ - PyObject *py_ppdf = 0; - int ok = PyArg_ParseTuple(args, "O", &py_ppdf); - if (!ok) return 0; - PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); - double crval = ppdf->getrw(); - return Py_BuildValue("d", crval); -} - -// getR -char pypdffit2_getR__doc__[] = "Get list of r-values for plotting."; -char pypdffit2_getR__name__[] = "getR"; - -PyObject * pypdffit2_getR(PyObject *, PyObject *args) -{ - PyObject *py_ppdf = 0; - int ok = PyArg_ParseTuple(args, "O", &py_ppdf); - if (!ok) return 0; - PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); - /* One should not put functionality in the bindings. However, - * this function is meant to create a python object from a - * c-object that does not actually exist. All that is stored - * in pdffit about the fitted R-range is the minimum, maximum, - * and step size. This binding turns that info into a python - * list. If the number of fit points stored in nfmax and nfmin - * have not yet been assigned, then this falls back on the - * r-points. This is crucial so that one can investigate the - * PDF before any fitting has been done. Once fit parameters - * have been established, they can be used and the r list, - * pdf-obs list, and pdf-fit list will be the same size. - * Also see getpdf_obs(). - */ - try - { - int nfmin = ppdf->getnfmin(); - int nfmax = ppdf->getnfmax(); - int len = nfmax - nfmin + 1; - double rmin = ppdf->getrmin(); - double rmax = ppdf->getrmax(); - double deltar = ppdf->getdeltar(); - PyObject *py_r; - if(len == 1) - { - nfmin = 0; - nfmax = (int) ((rmax - rmin)/deltar); - len = nfmax + 1; - } - py_r = PyList_New(len); - for (int i=nfmin;i<=nfmax;i++) - { - PyList_SetItem(py_r, i-nfmin, Py_BuildValue("d", i*deltar + rmin)); - } - - return py_r; - } - catch(unassignedError e) - { - PyErr_SetString(pypdffit2_unassignedError, e.GetMsg().c_str()); - return 0; - } -} - - -// getpdf_fit -char pypdffit2_getpdf_fit__doc__[] = "Get list of calculated pdf points."; -char pypdffit2_getpdf_fit__name__[] = "getpdf_fit"; - -PyObject * pypdffit2_getpdf_fit(PyObject *, PyObject *args) -{ - PyObject *py_ppdf = 0; - int ok = PyArg_ParseTuple(args, "O", &py_ppdf); - if (!ok) return 0; - PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); - //Return only the data range used in the fit - try - { - int min = ppdf->getnfmin(); - int max = ppdf->getnfmax(); - int len = max - min + 1; - vector v_pdfdata = ppdf->getpdf_fit(); - PyObject *py_r; - py_r = PyList_New(len); - for (int i=min;i<=max;i++) { - PyList_SetItem(py_r, i-min, Py_BuildValue("d", v_pdfdata[i])); - } - return py_r; - } - catch(unassignedError e) - { - PyErr_SetString(pypdffit2_unassignedError, e.GetMsg().c_str()); - return 0; - } -} - - -// getpdf_obs -char pypdffit2_getpdf_obs__doc__[] = "Get list of observed (theory) pdf points."; -char pypdffit2_getpdf_obs__name__[] = "getpdf_obs"; - -PyObject * pypdffit2_getpdf_obs(PyObject *, PyObject *args) -{ - PyObject *py_ppdf = 0; - int ok = PyArg_ParseTuple(args, "O", &py_ppdf); - if (!ok) return 0; - PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); - try - { - vector v_pdfdata = ppdf->getpdf_obs(); - int nfmin = ppdf->getnfmin(); - int nfmax = ppdf->getnfmax(); - int len = nfmax - nfmin + 1; - //Return only the data range used in the fit - PyObject *py_r; - py_r = PyList_New(len); - for (int i=nfmin;i<=nfmax;i++) { - PyList_SetItem(py_r, i-nfmin, Py_BuildValue("d", v_pdfdata[i])); - } - return py_r; - } - catch(unassignedError e) - { - PyErr_SetString(pypdffit2_unassignedError, e.GetMsg().c_str()); - return 0; - } -} - -// getpdf_diff -char pypdffit2_getpdf_diff__doc__[] = "Get list of differences between observed and fitted PDF points."; -char pypdffit2_getpdf_diff__name__[] = "getpdf_diff"; - -PyObject * pypdffit2_getpdf_diff(PyObject *, PyObject *args) -{ - PyObject *py_ppdf = 0; - int ok = PyArg_ParseTuple(args, "O", &py_ppdf); - if (!ok) return 0; - PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); - try - { - vector Gobs = ppdf->getpdf_obs(); - vector Gfit = ppdf->getpdf_fit(); - int nfmin = ppdf->getnfmin(); - int nfmax = ppdf->getnfmax(); - int len = nfmax - nfmin + 1; - //Return only the data range used in the fit - PyObject *py_r; - py_r = PyList_New(len); - for (int i = nfmin; i <= nfmax; i++) { - double Gdiff_i = Gobs[i] - Gfit[i]; - PyList_SetItem(py_r, i-nfmin, Py_BuildValue("d", Gdiff_i)); - } - return py_r; - } - catch(unassignedError e) - { - PyErr_SetString(pypdffit2_unassignedError, e.GetMsg().c_str()); - return 0; - } -} - - -// getpar -char pypdffit2_getpar__doc__[] = "Get value of parameter"; -char pypdffit2_getpar__name__[] = "getpar"; - -PyObject * pypdffit2_getpar(PyObject *, PyObject *args) -{ - unsigned int n; - PyObject *py_ppdf = 0; - int ok = PyArg_ParseTuple(args, "OI", &py_ppdf, &n); - if (!ok) return 0; - PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); - try - { - double crval = ppdf->getpar(n); - return Py_BuildValue("d", crval); - } - catch(unassignedError e) - { - PyErr_SetString(pypdffit2_unassignedError, e.GetMsg().c_str()); - return 0; - } -} - -// fixpar -char pypdffit2_fixpar__doc__[] = "Fix value of parameter."; -char pypdffit2_fixpar__name__[] = "fixpar"; - -PyObject * pypdffit2_fixpar(PyObject *, PyObject *args) -{ - int n; - PyObject *py_ppdf = 0; - int ok = PyArg_ParseTuple(args, "Oi", &py_ppdf, &n); - if (!ok) return 0; - PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); - try - { - ppdf->fixpar(n); - } - catch(unassignedError e) - { - PyErr_SetString(pypdffit2_unassignedError, e.GetMsg().c_str()); - return 0; - } - Py_INCREF(Py_None); - return Py_None; -} - -// freepar -char pypdffit2_freepar__doc__[] = "Free parameter."; -char pypdffit2_freepar__name__[] = "freepar"; - -PyObject * pypdffit2_freepar(PyObject *, PyObject *args) -{ - int n; - PyObject *py_ppdf = 0; - int ok = PyArg_ParseTuple(args, "Oi", &py_ppdf, &n); - if (!ok) return 0; - PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); - try - { - ppdf->freepar(n); - } - catch(unassignedError e) - { - PyErr_SetString(pypdffit2_unassignedError, e.GetMsg().c_str()); - return 0; - } - Py_INCREF(Py_None); - return Py_None; -} - -// setphase -char pypdffit2_setphase__doc__[] = "Set phase in focus."; -char pypdffit2_setphase__name__[] = "setphase"; - -PyObject * pypdffit2_setphase(PyObject *, PyObject *args) -{ - int ip; - PyObject *py_ppdf = 0; - int ok = PyArg_ParseTuple(args, "Oi", &py_ppdf, &ip); - if (!ok) return 0; - PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); - try - { - ppdf->setphase(ip); - } - catch(unassignedError e) - { - PyErr_SetString(pypdffit2_unassignedError, e.GetMsg().c_str()); - return 0; - } - Py_INCREF(Py_None); - return Py_None; -} - -// setdata -char pypdffit2_setdata__doc__[] = "Set data in focus."; -char pypdffit2_setdata__name__[] = "setdata"; - -PyObject * pypdffit2_setdata(PyObject *, PyObject *args) -{ - int is; - PyObject *py_ppdf = 0; - int ok = PyArg_ParseTuple(args, "Oi", &py_ppdf, &is); - if (!ok) return 0; - PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); - try - { - ppdf->setdata(is); - } - catch(unassignedError e) - { - PyErr_SetString(pypdffit2_unassignedError, e.GetMsg().c_str()); - return 0; - } - Py_INCREF(Py_None); - return Py_None; -} - -// psel -char pypdffit2_psel__doc__[] = "Select phase in focus."; -char pypdffit2_psel__name__[] = "psel"; - -PyObject * pypdffit2_psel(PyObject *, PyObject *args) -{ - int ip; - PyObject *py_ppdf = 0; - int ok = PyArg_ParseTuple(args, "Oi", &py_ppdf, &ip); - if (!ok) return 0; - PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); - try - { - ppdf->selphase(ip); - } - catch(unassignedError e) - { - // PyErr_Warn(PyExc_Warning, e.GetMsg().c_str()); - PyErr_SetString(pypdffit2_unassignedError, e.GetMsg().c_str()); - return 0; - } - Py_INCREF(Py_None); - return Py_None; -} - -// pdesel -char pypdffit2_pdesel__doc__[] = "Deselect phase in focus."; -char pypdffit2_pdesel__name__[] = "pdesel"; - -PyObject * pypdffit2_pdesel(PyObject *, PyObject *args) -{ - int ip; - PyObject *py_ppdf = 0; - int ok = PyArg_ParseTuple(args, "Oi", &py_ppdf, &ip); - if (!ok) return 0; - PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); - try - { - ppdf->pdesel(ip); - } - catch(unassignedError e) - { - // PyErr_Warn(PyExc_Warning, e.GetMsg().c_str()); - PyErr_SetString(pypdffit2_unassignedError, e.GetMsg().c_str()); - return 0; - } - Py_INCREF(Py_None); - return Py_None; -} - -// selectAtomType -char pypdffit2_selectAtomType__doc__[] = "Include element in 'i' or 'j' pair of PDF calculation."; -char pypdffit2_selectAtomType__name__[] = "selectAtomType"; - -PyObject * pypdffit2_selectAtomType(PyObject *, PyObject *args) -{ - PyObject *py_ppdf = 0; - int ip; - char ijchar; - char* smbpat; - bool select; - int ok = PyArg_ParseTuple(args, "Oicsb", &py_ppdf, &ip, &ijchar, &smbpat, &select); - if (!ok) return 0; - PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); - try - { - ppdf->selectAtomType(ip, ijchar, smbpat, select); - } - catch(unassignedError e) - { - PyErr_SetString(pypdffit2_unassignedError, e.GetMsg().c_str()); - return 0; - } - catch(ValueError e) - { - PyErr_SetString(PyExc_ValueError, e.GetMsg().c_str()); - return 0; - } - Py_INCREF(Py_None); - return Py_None; -} - -// selectAtomIndex -char pypdffit2_selectAtomIndex__doc__[] = "Include atom of given index in 'i' or 'j' pair of PDF calculation."; -char pypdffit2_selectAtomIndex__name__[] = "selectAtomIndex"; - -PyObject * pypdffit2_selectAtomIndex(PyObject *, PyObject *args) -{ - PyObject *py_ppdf = 0; - int ip; - char ijchar; - int aidx1; - bool select; - int ok = PyArg_ParseTuple(args, "Oicib", &py_ppdf, &ip, &ijchar, &aidx1, &select); - if (!ok) return 0; - PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); - try - { - ppdf->selectAtomIndex(ip, ijchar, aidx1, select); - } - catch(unassignedError e) - { - PyErr_SetString(pypdffit2_unassignedError, e.GetMsg().c_str()); - return 0; - } - catch(ValueError e) - { - PyErr_SetString(PyExc_ValueError, e.GetMsg().c_str()); - return 0; - } - Py_INCREF(Py_None); - return Py_None; -} - -// selectAll -char pypdffit2_selectAll__doc__[] = "Include all atoms in 'i' or 'j' pair of PDF calculation."; -char pypdffit2_selectAll__name__[] = "selectAll"; - -PyObject * pypdffit2_selectAll(PyObject *, PyObject *args) -{ - PyObject *py_ppdf = 0; - int ip; - char ijchar; - int ok = PyArg_ParseTuple(args, "Oic", &py_ppdf, &ip, &ijchar); - if (!ok) return 0; - PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); - try - { - ppdf->selectAll(ip, ijchar); - } - catch(unassignedError e) - { - PyErr_SetString(pypdffit2_unassignedError, e.GetMsg().c_str()); - return 0; - } - catch(ValueError e) - { - PyErr_SetString(PyExc_ValueError, e.GetMsg().c_str()); - return 0; - } - Py_INCREF(Py_None); - return Py_None; -} - -// selectNone -char pypdffit2_selectNone__doc__[] = "Include all atoms in 'i' or 'j' pair of PDF calculation."; -char pypdffit2_selectNone__name__[] = "selectNone"; - -PyObject * pypdffit2_selectNone(PyObject *, PyObject *args) -{ - PyObject *py_ppdf = 0; - int ip; - char ijchar; - int ok = PyArg_ParseTuple(args, "Oic", &py_ppdf, &ip, &ijchar); - if (!ok) return 0; - PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); - try - { - ppdf->selectNone(ip, ijchar); - } - catch(unassignedError e) - { - PyErr_SetString(pypdffit2_unassignedError, e.GetMsg().c_str()); - return 0; - } - catch(ValueError e) - { - PyErr_SetString(PyExc_ValueError, e.GetMsg().c_str()); - return 0; - } - Py_INCREF(Py_None); - return Py_None; -} - -// bond_angle -char pypdffit2_bond_angle__doc__[] = "Return bond angle between three atoms."; -char pypdffit2_bond_angle__name__[] = "bond_angle"; - -PyObject * pypdffit2_bond_angle(PyObject *, PyObject *args) -{ - int ia, ja, ka; - PyObject *py_ppdf = 0; - int ok = PyArg_ParseTuple(args, "Oiii", &py_ppdf, &ia, &ja, &ka); - if (!ok) return 0; - PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); - try { - pair angstd = ppdf->bond_angle(ia, ja, ka); - PyObject* py_tpl; - py_tpl = Py_BuildValue("(d,d)", angstd.first, angstd.second); - return py_tpl; - } - catch (ValueError e) { - PyErr_SetString(PyExc_ValueError, e.GetMsg().c_str()); - return 0; - } - catch (unassignedError e) { - PyErr_SetString(pypdffit2_unassignedError, e.GetMsg().c_str()); - return 0; - } -} - -// bond_length_atoms (nearest bond length between two atoms) -char pypdffit2_bond_length_atoms__doc__[] = - "Return a tuple of (dij, ddij) for distance between two atoms\n" - "and its standard deviation."; -char pypdffit2_bond_length_atoms__name__[] = "bond_length_atoms"; - -PyObject * pypdffit2_bond_length_atoms(PyObject *, PyObject *args) -{ - int ia, ja; - PyObject *py_ppdf = 0; - int ok = PyArg_ParseTuple(args, "Oii", &py_ppdf, &ia, &ja); - PairDistance pd; - if (!ok) return 0; - PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); - try { - pd = ppdf->bond_length_atoms(ia, ja); - PyObject *py_tpl; - py_tpl = Py_BuildValue("(d,d)", pd.dij, pd.ddij); - return py_tpl; - } - catch (ValueError e) { - PyErr_SetString(PyExc_ValueError, e.GetMsg().c_str()); - return 0; - } - catch (unassignedError e) { - PyErr_SetString(pypdffit2_unassignedError, e.GetMsg().c_str()); - return 0; - } -} - -// bond_length_types (bond lengths between two elements inside given bounds) -char pypdffit2_bond_length_types__doc__[] = - "Return bond lengths between two elements within given bounds\n" - "\n" - "a1 -- symbol of the first element in pair or 'ALL'\n" - "a2 -- symbol of the second element in pair or 'ALL'\n" - "lb -- lower bound for bond lengths\n" - "ub -- upper bound for bond lengths\n" - "\n" - "Return a dictionary of distance data containing:\n" - "\n" - "dij : list of bond lenghts within given bounds\n" - "ddij : list of bond legnth standard deviations\n" - "ij0 : list of tupled pairs of indices starting at 0\n" - "ij1 : list of tupled pairs of indices starting at 1"; -char pypdffit2_bond_length_types__name__[] = "bond_length_types"; - -PyObject * pypdffit2_bond_length_types(PyObject *, PyObject *args) -{ - char* symi; - char* symj; - double bmin = 0; - double bmax = 0; - PyObject *py_ppdf = 0; - int ok = PyArg_ParseTuple(args, "Ossdd", &py_ppdf, &symi, &symj, &bmin, &bmax); - vector pdvec; - if (!ok) return 0; - PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); - try { - pdvec = ppdf->bond_length_types(symi, symj, bmin, bmax); - int np = pdvec.size(); - PyObject* py_dij; - PyObject* py_ddij; - PyObject* py_ij0; - PyObject* py_ij1; - py_dij = PyList_New(np); - py_ddij = PyList_New(np); - py_ij0 = PyList_New(np); - py_ij1 = PyList_New(np); - for (int i = 0; i < np; ++i) - { - PairDistance& pd = pdvec[i]; - PyObject *py_item; - py_item = PyFloat_FromDouble(pd.dij); - PyList_SetItem(py_dij, i, py_item); - py_item = PyFloat_FromDouble(pd.ddij); - PyList_SetItem(py_ddij, i, py_item); - py_item = Py_BuildValue("(i,i)", pd.i - 1, pd.j - 1); - PyList_SetItem(py_ij0, i, py_item); - py_item = Py_BuildValue("(i,i)", pd.i, pd.j); - PyList_SetItem(py_ij1, i, py_item); - } - PyObject* py_rv; - py_rv = PyDict_New(); - PyDict_SetItemString(py_rv, "dij", py_dij); - PyDict_SetItemString(py_rv, "ddij", py_ddij); - PyDict_SetItemString(py_rv, "ij0", py_ij0); - PyDict_SetItemString(py_rv, "ij1", py_ij1); - return py_rv; - } - catch (ValueError e) { - PyErr_SetString(PyExc_ValueError, e.GetMsg().c_str()); - return 0; - } - catch (unassignedError e) { - PyErr_SetString(pypdffit2_unassignedError, e.GetMsg().c_str()); - return 0; - } -} - -// get_scat_string -char pypdffit2_get_scat_string__doc__[] = "Return string with scatter details."; -char pypdffit2_get_scat_string__name__[] = "get_scat_string"; - -PyObject * pypdffit2_get_scat_string(PyObject *, PyObject *args) -{ - char stype; - PyObject *py_ppdf = 0; - int ok = PyArg_ParseTuple(args, "Oc", &py_ppdf, &stype); - if (!ok) return 0; - PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); - string outstring; - if (!ppdf->curphase) - { - PyErr_SetString(pypdffit2_unassignedError, "No scatterers exist"); - return 0; - } - // here curphase exists, get_scat_string throws runtime error - // for invalid stype. - try { - outstring = (ppdf->curphase)->get_scat_string(stype); - } - catch (runtime_error e) { - PyErr_SetString(PyExc_ValueError, e.what()); - return 0; - } - return Py_BuildValue("s", outstring.c_str()); -} - -// get_scat -char pypdffit2_get_scat__doc__[] = "Return scattering factor for given element."; -char pypdffit2_get_scat__name__[] = "get_scat"; - -PyObject * pypdffit2_get_scat(PyObject *, PyObject *args) -{ - char stype; - char* smbpat; - PyObject *py_ppdf = 0; - int ok = PyArg_ParseTuple(args, "Ocs", &py_ppdf, &stype, &smbpat); - if (!ok) return 0; - PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); - double value; - try { - value = ppdf->get_scat(stype, smbpat); - } - catch (ValueError e) { - PyErr_SetString(PyExc_ValueError, e.GetMsg().c_str()); - return 0; - } - PyObject* py_rv; - py_rv = PyFloat_FromDouble(value); - return py_rv; -} - -// set_scat -char pypdffit2_set_scat__doc__[] = "Set custom scattering factor for given element."; -char pypdffit2_set_scat__name__[] = "set_scat"; - -PyObject * pypdffit2_set_scat(PyObject *, PyObject *args) -{ - char stype; - char* smbpat; - double value; - PyObject *py_ppdf = 0; - int ok = PyArg_ParseTuple(args, "Ocsd", &py_ppdf, &stype, &smbpat, &value); - if (!ok) return 0; - PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); - if (!ppdf->curphase) - { - PyErr_SetString(pypdffit2_unassignedError, "phase does not exist"); - return 0; - } - // Here curphase exists. set_scat may throw - // runtime or ValueError for invalid arguments - try { - ppdf->curphase->set_scat(stype, smbpat, value); - } - catch (ValueError e) { - PyErr_SetString(PyExc_ValueError, e.GetMsg().c_str()); - return 0; - } - catch (runtime_error e) { - PyErr_SetString(PyExc_ValueError, e.what()); - return 0; - } - Py_INCREF(Py_None); - return Py_None; -} - -// reset_scat -char pypdffit2_reset_scat__doc__[] = "Reset scattering factor for given element."; -char pypdffit2_reset_scat__name__[] = "reset_scat"; - -PyObject * pypdffit2_reset_scat(PyObject *, PyObject *args) -{ - char* smbpat; - PyObject *py_ppdf = 0; - int ok = PyArg_ParseTuple(args, "Os", &py_ppdf, &smbpat); - if (!ok) return 0; - PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); - if (!ppdf->curphase) - { - PyErr_SetString(pypdffit2_unassignedError, "phase does not exist"); - return 0; - } - // Here curphase exists. reset_scat may throw - // runtime or ValueError for invalid arguments - try { - ppdf->curphase->reset_scat(smbpat); - } - catch (ValueError e) { - PyErr_SetString(PyExc_ValueError, e.GetMsg().c_str()); - return 0; - } - Py_INCREF(Py_None); - return Py_None; -} - -//throw-away variable that helps with exception handling -//RefVar *_junkRV = new RefVar(); -// utility function (not available from Python) -RefVar *getRefVar(vector &v, unsigned int i) -{ - if (v.size() == 0) - { - throw unassignedError("Variable not yet assigned"); - } - else if (i > v.size() || i < 1) - { - stringstream errstr; - errstr << "Index " << i << " out of bounds"; - throw ValueError(errstr.str()); - } - return &v[i-1]; -} - -//current phase and set refinable variable pointers - -// lat -char pypdffit2_lat__doc__[] = "Pointer to refinable variable lat."; -char pypdffit2_lat__name__[] = "lat"; - -PyObject * pypdffit2_lat(PyObject *, PyObject *args) -{ - int i; - PyObject *py_ppdf = 0; - int ok = PyArg_ParseTuple(args, "Oi", &py_ppdf, &i); - if (!ok) return 0; - PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); - try { - RefVar *v = getRefVar(ppdf->lat,i); - PyObject *py_v = PyCapsule_New(v, cnvar, NULL); - return py_v; - } - catch(unassignedError e) { - PyErr_SetString(pypdffit2_unassignedError, e.GetMsg().c_str()); - return 0; - } - catch(ValueError e) { - PyErr_SetString(PyExc_ValueError, e.GetMsg().c_str()); - return 0; - } -} - -// x -char pypdffit2_x__doc__[] = "Pointer to refinable variable x."; -char pypdffit2_x__name__[] = "x"; - -PyObject * pypdffit2_x(PyObject *, PyObject *args) -{ - int i; - PyObject *py_ppdf = 0; - int ok = PyArg_ParseTuple(args, "Oi", &py_ppdf, &i); - if (!ok) return 0; - PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); - try { - RefVar *v = getRefVar(ppdf->x,i); - PyObject *py_v = PyCapsule_New(v, cnvar, NULL); - return py_v; - } - catch(unassignedError e) { - PyErr_SetString(pypdffit2_unassignedError, e.GetMsg().c_str()); - return 0; - } - catch(ValueError e) { - PyErr_SetString(PyExc_ValueError, e.GetMsg().c_str()); - return 0; - } -} - -// y -char pypdffit2_y__doc__[] = "Pointer to refinable variable y."; -char pypdffit2_y__name__[] = "y"; - -PyObject * pypdffit2_y(PyObject *, PyObject *args) -{ - int i; - PyObject *py_ppdf = 0; - int ok = PyArg_ParseTuple(args, "Oi", &py_ppdf, &i); - if (!ok) return 0; - PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); - try { - RefVar *v = getRefVar(ppdf->y,i); - PyObject *py_v = PyCapsule_New(v, cnvar, NULL); - return py_v; - } - catch(unassignedError e) { - PyErr_SetString(pypdffit2_unassignedError, e.GetMsg().c_str()); - return 0; - } - catch(ValueError e) { - PyErr_SetString(PyExc_ValueError, e.GetMsg().c_str()); - return 0; - } -} - -// z -char pypdffit2_z__doc__[] = "Pointer to refinable variable z."; -char pypdffit2_z__name__[] = "z"; - -PyObject * pypdffit2_z(PyObject *, PyObject *args) -{ - int i; - PyObject *py_ppdf = 0; - int ok = PyArg_ParseTuple(args, "Oi", &py_ppdf, &i); - if (!ok) return 0; - PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); - try { - RefVar *v = getRefVar(ppdf->z,i); - PyObject *py_v = PyCapsule_New(v, cnvar, NULL); - return py_v; - } - catch(unassignedError e) { - PyErr_SetString(pypdffit2_unassignedError, e.GetMsg().c_str()); - return 0; - } - catch(ValueError e) { - PyErr_SetString(PyExc_ValueError, e.GetMsg().c_str()); - return 0; - } -} - -// u11 -char pypdffit2_u11__doc__[] = "Pointer to refinable variable u11."; -char pypdffit2_u11__name__[] = "u11"; - -PyObject * pypdffit2_u11(PyObject *, PyObject *args) -{ - int i; - PyObject *py_ppdf = 0; - int ok = PyArg_ParseTuple(args, "Oi", &py_ppdf, &i); - if (!ok) return 0; - PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); - try { - RefVar *v = getRefVar(ppdf->u11,i); - PyObject *py_v = PyCapsule_New(v, cnvar, NULL); - return py_v; - } - catch(unassignedError e) { - PyErr_SetString(pypdffit2_unassignedError, e.GetMsg().c_str()); - return 0; - } - catch(ValueError e) { - PyErr_SetString(PyExc_ValueError, e.GetMsg().c_str()); - return 0; - } -} - -// u22 -char pypdffit2_u22__doc__[] = "Pointer to refinable variable u22."; -char pypdffit2_u22__name__[] = "u22"; - -PyObject * pypdffit2_u22(PyObject *, PyObject *args) -{ - int i; - PyObject *py_ppdf = 0; - int ok = PyArg_ParseTuple(args, "Oi", &py_ppdf, &i); - if (!ok) return 0; - PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); - try { - RefVar *v = getRefVar(ppdf->u22,i); - PyObject *py_v = PyCapsule_New(v, cnvar, NULL); - return py_v; - } - catch(unassignedError e) { - PyErr_SetString(pypdffit2_unassignedError, e.GetMsg().c_str()); - return 0; - } - catch(ValueError e) { - PyErr_SetString(PyExc_ValueError, e.GetMsg().c_str()); - return 0; - } -} - -// u33 -char pypdffit2_u33__doc__[] = "Pointer to refinable variable u33."; -char pypdffit2_u33__name__[] = "u33"; - -PyObject * pypdffit2_u33(PyObject *, PyObject *args) -{ - int i; - PyObject *py_ppdf = 0; - int ok = PyArg_ParseTuple(args, "Oi", &py_ppdf, &i); - if (!ok) return 0; - PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); - try { - RefVar *v = getRefVar(ppdf->u33,i); - PyObject *py_v = PyCapsule_New(v, cnvar, NULL); - return py_v; - } - catch(unassignedError e) { - PyErr_SetString(pypdffit2_unassignedError, e.GetMsg().c_str()); - return 0; - } - catch(ValueError e) { - PyErr_SetString(PyExc_ValueError, e.GetMsg().c_str()); - return 0; - } -} - -// u12 -char pypdffit2_u12__doc__[] = "Pointer to refinable variable u12."; -char pypdffit2_u12__name__[] = "u12"; - -PyObject * pypdffit2_u12(PyObject *, PyObject *args) -{ - int i; - PyObject *py_ppdf = 0; - int ok = PyArg_ParseTuple(args, "Oi", &py_ppdf, &i); - if (!ok) return 0; - PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); - try { - RefVar *v = getRefVar(ppdf->u12,i); - PyObject *py_v = PyCapsule_New(v, cnvar, NULL); - return py_v; - } - catch(unassignedError e) { - PyErr_SetString(pypdffit2_unassignedError, e.GetMsg().c_str()); - return 0; - } - catch(ValueError e) { - PyErr_SetString(PyExc_ValueError, e.GetMsg().c_str()); - return 0; - } -} - -// u13 -char pypdffit2_u13__doc__[] = "Pointer to refinable variable u13."; -char pypdffit2_u13__name__[] = "u13"; - -PyObject * pypdffit2_u13(PyObject *, PyObject *args) -{ - int i; - PyObject *py_ppdf = 0; - int ok = PyArg_ParseTuple(args, "Oi", &py_ppdf, &i); - if (!ok) return 0; - PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); - try { - RefVar *v = getRefVar(ppdf->u13,i); - PyObject *py_v = PyCapsule_New(v, cnvar, NULL); - return py_v; - } - catch(unassignedError e) { - PyErr_SetString(pypdffit2_unassignedError, e.GetMsg().c_str()); - return 0; - } - catch(ValueError e) { - PyErr_SetString(PyExc_ValueError, e.GetMsg().c_str()); - return 0; - } -} - -// u23 -char pypdffit2_u23__doc__[] = "Pointer to refinable variable u23."; -char pypdffit2_u23__name__[] = "u23"; - -PyObject * pypdffit2_u23(PyObject *, PyObject *args) -{ - int i; - PyObject *py_ppdf = 0; - int ok = PyArg_ParseTuple(args, "Oi", &py_ppdf, &i); - if (!ok) return 0; - PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); - try { - RefVar *v = getRefVar(ppdf->u23,i); - PyObject *py_v = PyCapsule_New(v, cnvar, NULL); - return py_v; - } - catch(unassignedError e) { - PyErr_SetString(pypdffit2_unassignedError, e.GetMsg().c_str()); - return 0; - } - catch(ValueError e) { - PyErr_SetString(PyExc_ValueError, e.GetMsg().c_str()); - return 0; - } -} - -// occ -char pypdffit2_occ__doc__[] = "Pointer to refinable variable occ."; -char pypdffit2_occ__name__[] = "occ"; - -PyObject * pypdffit2_occ(PyObject *, PyObject *args) -{ - int i; - PyObject *py_ppdf = 0; - int ok = PyArg_ParseTuple(args, "Oi", &py_ppdf, &i); - if (!ok) return 0; - PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); - try { - RefVar *v = getRefVar(ppdf->occ,i); - PyObject *py_v = PyCapsule_New(v, cnvar, NULL); - return py_v; - } - catch(unassignedError e) { - PyErr_SetString(pypdffit2_unassignedError, e.GetMsg().c_str()); - return 0; - } - catch(ValueError e) { - PyErr_SetString(PyExc_ValueError, e.GetMsg().c_str()); - return 0; - } -} - -// pscale -char pypdffit2_pscale__doc__[] = "Pointer to variable pscale."; -char pypdffit2_pscale__name__[] = "pscale"; - -PyObject * pypdffit2_pscale(PyObject *, PyObject *args) -{ - PyObject *py_ppdf = 0; - int ok = PyArg_ParseTuple(args, "O", &py_ppdf); - if (!ok) return 0; - PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); - PyObject *py_v = PyCapsule_New(&(ppdf->pscale), cnvar, NULL); - return py_v; -} - -// spdiameter -char pypdffit2_spdiameter__doc__[] = "Pointer to variable spdiameter."; -char pypdffit2_spdiameter__name__[] = "spdiameter"; - -PyObject * pypdffit2_spdiameter(PyObject *, PyObject *args) -{ - PyObject *py_ppdf = 0; - int ok = PyArg_ParseTuple(args, "O", &py_ppdf); - if (!ok) return 0; - PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); - PyObject *py_v = PyCapsule_New(&(ppdf->spdiameter), cnvar, NULL); - return py_v; -} - -// stepcut -char pypdffit2_stepcut__doc__[] = "Pointer to nonvariable stepcut."; -char pypdffit2_stepcut__name__[] = "stepcut"; - -PyObject * pypdffit2_stepcut(PyObject *, PyObject *args) -{ - PyObject *py_ppdf = 0; - int ok = PyArg_ParseTuple(args, "O", &py_ppdf); - if (!ok) return 0; - PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); - PyObject *py_v = PyCapsule_New(&(ppdf->stepcut), cnvar, NULL); - return py_v; -} - -// sratio -char pypdffit2_sratio__doc__[] = "Pointer to variable sratio."; -char pypdffit2_sratio__name__[] = "sratio"; - -PyObject * pypdffit2_sratio(PyObject *, PyObject *args) -{ - PyObject *py_ppdf = 0; - int ok = PyArg_ParseTuple(args, "O", &py_ppdf); - if (!ok) return 0; - PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); - PyObject *py_v = PyCapsule_New(&(ppdf->sratio), cnvar, NULL); - return py_v; -} - -// delta2 -char pypdffit2_delta2__doc__[] = "Pointer to variable delta2."; -char pypdffit2_delta2__name__[] = "delta2"; - -PyObject * pypdffit2_delta2(PyObject *, PyObject *args) -{ - PyObject *py_ppdf = 0; - int ok = PyArg_ParseTuple(args, "O", &py_ppdf); - if (!ok) return 0; - PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); - PyObject *py_v = PyCapsule_New(&(ppdf->delta2), cnvar, NULL); - return py_v; -} - -// delta1 -char pypdffit2_delta1__doc__[] = "Pointer to variable delta1."; -char pypdffit2_delta1__name__[] = "delta1"; - -PyObject * pypdffit2_delta1(PyObject *, PyObject *args) -{ - PyObject *py_ppdf = 0; - int ok = PyArg_ParseTuple(args, "O", &py_ppdf); - if (!ok) return 0; - PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); - PyObject *py_v = PyCapsule_New(&(ppdf->delta1), cnvar, NULL); - return py_v; -} - -// dscale -char pypdffit2_dscale__doc__[] = "Pointer to variable dscale."; -char pypdffit2_dscale__name__[] = "dscale"; - -PyObject * pypdffit2_dscale(PyObject *, PyObject *args) -{ - PyObject *py_ppdf = 0; - int ok = PyArg_ParseTuple(args, "O", &py_ppdf); - if (!ok) return 0; - PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); - PyObject *py_v = PyCapsule_New(&(ppdf->dscale), cnvar, NULL); - return py_v; -} - -// qdamp -char pypdffit2_qdamp__doc__[] = "Pointer to variable qdamp."; -char pypdffit2_qdamp__name__[] = "qdamp"; - -PyObject * pypdffit2_qdamp(PyObject *, PyObject *args) -{ - PyObject *py_ppdf = 0; - int ok = PyArg_ParseTuple(args, "O", &py_ppdf); - if (!ok) return 0; - PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); - PyObject *py_v = PyCapsule_New(&(ppdf->qdamp), cnvar, NULL); - return py_v; -} - -// qbroad -char pypdffit2_qbroad__doc__[] = "Pointer to variable qbroad."; -char pypdffit2_qbroad__name__[] = "qbroad"; - -PyObject * pypdffit2_qbroad(PyObject *, PyObject *args) -{ - PyObject *py_ppdf = 0; - int ok = PyArg_ParseTuple(args, "O", &py_ppdf); - if (!ok) return 0; - PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); - PyObject *py_v = PyCapsule_New(&(ppdf->qbroad), cnvar, NULL); - return py_v; -} - -// rcut -char pypdffit2_rcut__doc__[] = "Pointer to nonvariable rcut."; -char pypdffit2_rcut__name__[] = "rcut"; - -PyObject * pypdffit2_rcut(PyObject *, PyObject *args) -{ - PyObject *py_ppdf = 0; - int ok = PyArg_ParseTuple(args, "O", &py_ppdf); - if (!ok) return 0; - PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); - PyObject *py_v = PyCapsule_New(&(ppdf->rcut), cnvar, NULL); - return py_v; -} - -// get_atoms -char pypdffit2_get_atoms__doc__[] = "Get element symbols of atoms in the phase."; -char pypdffit2_get_atoms__name__[] = "get_atoms"; - -PyObject * pypdffit2_get_atoms(PyObject *, PyObject *args) -{ - PyObject *py_ppdf = 0; - int ip = 0; - int ok = PyArg_ParseTuple(args, "O|i", &py_ppdf, &ip); - if (!ok) return 0; - PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); - Phase* ph; - try { - ph = ppdf->getphase(ip); - } - catch (unassignedError e) { - PyErr_SetString(pypdffit2_unassignedError, e.GetMsg().c_str()); - return 0; - } - // Phase ph is defined here - PyObject *py_atoms = PyList_New(ph->natoms); - for (int i = 0; i < ph->natoms; ++i) - { - string usymbol = toupper(ph->atom[i].atom_type->symbol); - PyList_SetItem(py_atoms, i, PyUnicode_FromString(usymbol.c_str())); - } - return py_atoms; -} - -// num_atoms -char pypdffit2_num_atoms__doc__[] = "Get the number of atoms in the current phase."; -char pypdffit2_num_atoms__name__[] = "num_atoms"; - -PyObject * pypdffit2_num_atoms(PyObject *, PyObject *args) -{ - int retval = 0; - PyObject *py_ppdf = 0; - int ok = PyArg_ParseTuple(args, "O", &py_ppdf); - if (!ok) return 0; - PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); - if (ppdf->curphase) - { - retval = (ppdf->curphase)->natoms; - } - else - { - PyErr_SetString(pypdffit2_unassignedError, "No data loaded"); - return 0; - } - return Py_BuildValue("i", retval); -} - -// get_atom_types -char pypdffit2_get_atom_types__doc__[] = "Get ordered unique symbols of atoms in the phase."; -char pypdffit2_get_atom_types__name__[] = "get_atom_types"; - -PyObject * pypdffit2_get_atom_types(PyObject *, PyObject *args) -{ - PyObject *py_ppdf = 0; - int ip = 0; - int ok = PyArg_ParseTuple(args, "O|i", &py_ppdf, &ip); - if (!ok) return 0; - PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); - Phase* ph; - try { - ph = ppdf->getphase(ip); - } - catch (unassignedError e) { - PyErr_SetString(pypdffit2_unassignedError, e.GetMsg().c_str()); - return 0; - } - // Phase ph is defined here - PyObject *py_atom_types = PyList_New(ph->atom_types.size()); - for (int i = 0; i < int(ph->atom_types.size()); ++i) - { - string usymbol = toupper(ph->atom_types[i]->symbol); - PyList_SetItem(py_atom_types, i, PyUnicode_FromString(usymbol.c_str())); - } - return py_atom_types; -} - - -// num_phases -char pypdffit2_num_phases__doc__[] = "Get the number of loaded phases."; -char pypdffit2_num_phases__name__[] = "num_phases"; - -PyObject * pypdffit2_num_phases(PyObject *, PyObject *args) -{ - int retval = 0; - PyObject *py_ppdf = 0; - int ok = PyArg_ParseTuple(args, "O", &py_ppdf); - if (!ok) return 0; - PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); - retval = ppdf->num_phases(); - return Py_BuildValue("i", retval); -} - - -// num_datasets -char pypdffit2_num_datasets__doc__[] = "Get the number of loaded datasets."; -char pypdffit2_num_datasets__name__[] = "num_datasets"; - -PyObject * pypdffit2_num_datasets(PyObject *, PyObject *args) -{ - int retval = 0; - PyObject *py_ppdf = 0; - int ok = PyArg_ParseTuple(args, "O", &py_ppdf); - if (!ok) return 0; - PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); - retval = ppdf->num_datasets(); - return Py_BuildValue("i", retval); -} - - -// phase_fractions -char pypdffit2_phase_fractions__doc__[] = - "Return relative phase fractions for current dataset scattering type\n" - "\n" - "Return a dictionary of relative phase fractions:\n" - "\n" - "atom -- list of fractions normalized to atom count\n" - "stdatom -- errors of atom count fractions\n" - "cell -- list of fractions normalized to unit cell count\n" - "stdcell -- errors of unit cell count fractions\n" - "mass -- list of relative weight fractions\n" - "stdmass -- errors of relative weight fractions\n" - ; -char pypdffit2_phase_fractions__name__[] = "phase_fractions"; - -PyObject * pypdffit2_phase_fractions(PyObject *, PyObject *args) -{ - PyObject *py_ppdf = 0; - int ok = PyArg_ParseTuple(args, "O", &py_ppdf); - if (!ok) return 0; - PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); - map > fractions; - try - { - fractions = ppdf->getPhaseFractions(); - } - catch(unassignedError e) - { - PyErr_SetString(pypdffit2_unassignedError, e.GetMsg().c_str()); - return 0; - } - // convert fractions map to an equivalent python dictionary - map >::iterator ii; - PyObject* py_rv; - py_rv = PyDict_New(); - for (ii = fractions.begin(); ii != fractions.end(); ++ii) - { - int n = ii->second.size(); - PyObject* py_lst; - py_lst = PyList_New(n); - for (int i = 0; i < n; ++i) - { - PyObject* py_value; - py_value = PyFloat_FromDouble(ii->second.at(i)); - PyList_SetItem(py_lst, i, py_value); - } - PyDict_SetItemString(py_rv, ii->first.c_str(), py_lst); - } - return py_rv; -} - -// redirect_stdout -char pypdffit2_redirect_stdout__doc__[] = "Redirect engine output to a file-like object."; -char pypdffit2_redirect_stdout__name__[] = "redirect_stdout"; - -PyObject * pypdffit2_redirect_stdout(PyObject *, PyObject *args) -{ - // instance of PyFileStreambuf which takes care of redirection - PyObject *py_file = 0; - int ok = PyArg_ParseTuple(args, "O", &py_file); - if (!ok) return 0; - // check if py_file has write and flush attributes - if ( !PyObject_HasAttrString(py_file, "write") || - !PyObject_HasAttrString(py_file, "flush") ) - { - PyErr_SetString(PyExc_TypeError, "expected file-like argument"); - return 0; - } - // create py_stdout_streambuf if necessary - if (!py_stdout_streambuf) - { - py_stdout_streambuf = new PyFileStreambuf(py_file); - } - py_stdout_streambuf->redirect(py_file); - // on first redirection we need to assign new ostream to NS_PDFFIT2::pout - if (NS_PDFFIT2::pout == &std::cout) - { - NS_PDFFIT2::pout = new ostream(py_stdout_streambuf); - } - Py_INCREF(Py_None); - return Py_None; -} - -// is_element -char pypdffit2_is_element__doc__[] = "Check if element or isotope is defined in the built-in periodic table."; -char pypdffit2_is_element__name__[] = "is_element"; - -PyObject * pypdffit2_is_element(PyObject *, PyObject *args) -{ - // instance of PyFileStreambuf which takes care of redirection - char *smbpat; - int ok = PyArg_ParseTuple(args, "s", &smbpat); - if (!ok) return 0; - const LocalPeriodicTable* lpt = LocalPeriodicTable::instance(); - PyObject *rv = PyBool_FromLong(lpt->has(smbpat)); - return rv; -} - -// End of file diff --git a/pdffit2module/misc.h b/pdffit2module/misc.h deleted file mode 100644 index f8782307..00000000 --- a/pdffit2module/misc.h +++ /dev/null @@ -1,486 +0,0 @@ -/*********************************************************************** -* -* pdffit2 by DANSE Diffraction group -* Simon J. L. Billinge -* (c) 2006 trustees of the Michigan State University -* All rights reserved. -* -* File coded by: Chris Farrow -* -* See AUTHORS.txt for a list of people who contributed. -* See LICENSE.txt for license information. -* -************************************************************************ -* -* Bindings from python to c++ PdfFit class. -* -* Comments: -* -***********************************************************************/ - -#ifndef PYPDFFIT2_MISC_H -#define PYPDFFIT2_MISC_H - -// copyright -extern char pypdffit2_copyright__name__[]; -extern char pypdffit2_copyright__doc__[]; -extern "C" -PyObject * pypdffit2_copyright(PyObject *, PyObject *); - -// create -extern char pypdffit2_create__name__[]; -extern char pypdffit2_create__doc__[]; -extern "C" -PyObject * pypdffit2_create(PyObject *, PyObject *); - -// read_struct -extern char pypdffit2_read_struct__name__[]; -extern char pypdffit2_read_struct__doc__[]; -extern "C" -PyObject * pypdffit2_read_struct(PyObject *, PyObject *); - -// read_struct_string -extern char pypdffit2_read_struct_string__name__[]; -extern char pypdffit2_read_struct_string__doc__[]; -extern "C" -PyObject * pypdffit2_read_struct_string(PyObject *, PyObject *); - -// read_data -extern char pypdffit2_read_data__name__[]; -extern char pypdffit2_read_data__doc__[]; -extern "C" -PyObject * pypdffit2_read_data(PyObject *, PyObject *); - -// read_data_string -extern char pypdffit2_read_data_string__name__[]; -extern char pypdffit2_read_data_string__doc__[]; -extern "C" -PyObject * pypdffit2_read_data_string(PyObject *, PyObject *); - -// read_data_arrays -extern char pypdffit2_read_data_arrays__name__[]; -extern char pypdffit2_read_data_arrays__doc__[]; -extern "C" -PyObject * pypdffit2_read_data_arrays(PyObject *, PyObject *); - -// pdfrange -extern char pypdffit2_pdfrange__doc__[]; -extern char pypdffit2_pdfrange__name__[]; -extern "C" -PyObject * pypdffit2_pdfrange(PyObject *, PyObject *); - -// reset -extern char pypdffit2_reset__doc__[]; -extern char pypdffit2_reset__name__[]; -extern "C" -PyObject * pypdffit2_reset(PyObject *, PyObject *); - -// alloc -extern char pypdffit2_alloc__doc__[]; -extern char pypdffit2_alloc__name__[]; -extern "C" -PyObject * pypdffit2_alloc(PyObject *, PyObject *); - -// calc -extern char pypdffit2_calc__doc__[]; -extern char pypdffit2_calc__name__[]; -extern "C" -PyObject * pypdffit2_calc(PyObject *, PyObject *); - -// refine -extern char pypdffit2_refine__doc__[]; -extern char pypdffit2_refine__name__[]; -extern "C" -PyObject * pypdffit2_refine(PyObject *, PyObject *); - -// refine_step -extern char pypdffit2_refine_step__doc__[]; -extern char pypdffit2_refine_step__name__[]; -extern "C" -PyObject * pypdffit2_refine_step(PyObject *, PyObject *); - -// save_pdf -extern char pypdffit2_save_pdf__doc__[]; -extern char pypdffit2_save_pdf__name__[]; -extern "C" -PyObject * pypdffit2_save_pdf(PyObject *, PyObject *); - -// save_dif -extern char pypdffit2_save_dif__doc__[]; -extern char pypdffit2_save_dif__name__[]; -extern "C" -PyObject * pypdffit2_save_dif(PyObject *, PyObject *); - -// save_res -extern char pypdffit2_save_res__doc__[]; -extern char pypdffit2_save_res__name__[]; -extern "C" -PyObject * pypdffit2_save_res(PyObject *, PyObject *); - -// save_struct -extern char pypdffit2_save_struct__doc__[]; -extern char pypdffit2_save_struct__name__[]; -extern "C" -PyObject * pypdffit2_save_struct(PyObject *, PyObject *); - -// show_struct -extern char pypdffit2_show_struct__doc__[]; -extern char pypdffit2_show_struct__name__[]; -extern "C" -PyObject * pypdffit2_show_struct(PyObject *, PyObject *); - -// constrain to string -extern char pypdffit2_constrain_str__doc__[]; -extern char pypdffit2_constrain_str__name__[]; -extern "C" -PyObject * pypdffit2_constrain_str(PyObject *, PyObject *); - -// constrain_int to integer -extern char pypdffit2_constrain_int__doc__[]; -extern char pypdffit2_constrain_int__name__[]; -extern "C" -PyObject * pypdffit2_constrain_int(PyObject *, PyObject *); - -// setpar_dbl -extern char pypdffit2_setpar_dbl__doc__[]; -extern char pypdffit2_setpar_dbl__name__[]; -extern "C" -PyObject * pypdffit2_setpar_dbl(PyObject *, PyObject *); - -// setpar with RefVar -extern char pypdffit2_setpar_RV__doc__[]; -extern char pypdffit2_setpar_RV__name__[]; -extern "C" -PyObject * pypdffit2_setpar_RV(PyObject *, PyObject *); - -// setvar -extern char pypdffit2_setvar__doc__[]; -extern char pypdffit2_setvar__name__[]; -extern "C" -PyObject * pypdffit2_setvar(PyObject *, PyObject *); - -// getvar -extern char pypdffit2_getvar__doc__[]; -extern char pypdffit2_getvar__name__[]; -extern "C" -PyObject * pypdffit2_getvar(PyObject *, PyObject *); - -// getR -extern char pypdffit2_getR__doc__[]; -extern char pypdffit2_getR__name__[]; -extern "C" -PyObject * pypdffit2_getR(PyObject *, PyObject *); - -// getpdf_fit -extern char pypdffit2_getpdf_fit__doc__[]; -extern char pypdffit2_getpdf_fit__name__[]; -extern "C" -PyObject * pypdffit2_getpdf_fit(PyObject *, PyObject *); - -// getpdf_obs -extern char pypdffit2_getpdf_obs__doc__[]; -extern char pypdffit2_getpdf_obs__name__[]; -extern "C" -PyObject * pypdffit2_getpdf_obs(PyObject *, PyObject *); - -// getpdf_diff -extern char pypdffit2_getpdf_diff__doc__[]; -extern char pypdffit2_getpdf_diff__name__[]; -extern "C" -PyObject * pypdffit2_getpdf_diff(PyObject *, PyObject *); - -// getcrw -extern char pypdffit2_getcrw__doc__[]; -extern char pypdffit2_getcrw__name__[]; -extern "C" -PyObject * pypdffit2_getcrw(PyObject *, PyObject *); - -// getrw -extern char pypdffit2_getrw__doc__[]; -extern char pypdffit2_getrw__name__[]; -extern "C" -PyObject * pypdffit2_getrw(PyObject *, PyObject *); - -// getpar -extern char pypdffit2_getpar__doc__[]; -extern char pypdffit2_getpar__name__[]; -extern "C" -PyObject * pypdffit2_getpar(PyObject *, PyObject *); - -// fixpar -extern char pypdffit2_fixpar__doc__[]; -extern char pypdffit2_fixpar__name__[]; -extern "C" -PyObject * pypdffit2_fixpar(PyObject *, PyObject *); - -// freepar -extern char pypdffit2_freepar__doc__[]; -extern char pypdffit2_freepar__name__[]; -extern "C" -PyObject * pypdffit2_freepar(PyObject *, PyObject *); - -// setphase -extern char pypdffit2_setphase__doc__[]; -extern char pypdffit2_setphase__name__[]; -extern "C" -PyObject * pypdffit2_setphase(PyObject *, PyObject *); - -// setdata -extern char pypdffit2_setdata__doc__[]; -extern char pypdffit2_setdata__name__[]; -extern "C" -PyObject * pypdffit2_setdata(PyObject *, PyObject *); - -// psel -extern char pypdffit2_psel__doc__[]; -extern char pypdffit2_psel__name__[]; -extern "C" -PyObject * pypdffit2_psel(PyObject *, PyObject *); - -// pdesel -extern char pypdffit2_pdesel__doc__[]; -extern char pypdffit2_pdesel__name__[]; -extern "C" -PyObject * pypdffit2_pdesel(PyObject *, PyObject *); - -// selectAtomType -extern char pypdffit2_selectAtomType__doc__[]; -extern char pypdffit2_selectAtomType__name__[]; -extern "C" -PyObject * pypdffit2_selectAtomType(PyObject *, PyObject *); - -// selectAtomIndex -extern char pypdffit2_selectAtomIndex__doc__[]; -extern char pypdffit2_selectAtomIndex__name__[]; -extern "C" -PyObject * pypdffit2_selectAtomIndex(PyObject *, PyObject *); - -// selectAll -extern char pypdffit2_selectAll__doc__[]; -extern char pypdffit2_selectAll__name__[]; -extern "C" -PyObject * pypdffit2_selectAll(PyObject *, PyObject *); - -// selectNone -extern char pypdffit2_selectNone__doc__[]; -extern char pypdffit2_selectNone__name__[]; -extern "C" -PyObject * pypdffit2_selectNone(PyObject *, PyObject *); - -// bond_angle -extern char pypdffit2_bond_angle__doc__[]; -extern char pypdffit2_bond_angle__name__[]; -extern "C" -PyObject * pypdffit2_bond_angle(PyObject *, PyObject *); - -// bond_length_atoms -extern char pypdffit2_bond_length_atoms__doc__[]; -extern char pypdffit2_bond_length_atoms__name__[]; -extern "C" -PyObject * pypdffit2_bond_length_atoms(PyObject *, PyObject *); - -// bond_length_types -extern char pypdffit2_bond_length_types__doc__[]; -extern char pypdffit2_bond_length_types__name__[]; -extern "C" -PyObject * pypdffit2_bond_length_types(PyObject *, PyObject *); - -// get_scat_string -extern char pypdffit2_get_scat_string__doc__[]; -extern char pypdffit2_get_scat_string__name__[]; -extern "C" -PyObject * pypdffit2_get_scat_string(PyObject *, PyObject *); - -// get_scat -extern char pypdffit2_get_scat__doc__[]; -extern char pypdffit2_get_scat__name__[]; -extern "C" -PyObject * pypdffit2_get_scat(PyObject *, PyObject *); - -// set_scat -extern char pypdffit2_set_scat__doc__[]; -extern char pypdffit2_set_scat__name__[]; -extern "C" -PyObject * pypdffit2_set_scat(PyObject *, PyObject *); - -// reset_scat -extern char pypdffit2_reset_scat__doc__[]; -extern char pypdffit2_reset_scat__name__[]; -extern "C" -PyObject * pypdffit2_reset_scat(PyObject *, PyObject *); - -// lat -extern char pypdffit2_lat__doc__[]; -extern char pypdffit2_lat__name__[]; -extern "C" -PyObject * pypdffit2_lat(PyObject *, PyObject *); - -// x -extern char pypdffit2_x__doc__[]; -extern char pypdffit2_x__name__[]; -extern "C" -PyObject * pypdffit2_x(PyObject *, PyObject *); - -// y -extern char pypdffit2_y__doc__[]; -extern char pypdffit2_y__name__[]; -extern "C" -PyObject * pypdffit2_y(PyObject *, PyObject *); - -// z -extern char pypdffit2_z__doc__[]; -extern char pypdffit2_z__name__[]; -extern "C" -PyObject * pypdffit2_z(PyObject *, PyObject *); - -// u11 -extern char pypdffit2_u11__doc__[]; -extern char pypdffit2_u11__name__[]; -extern "C" -PyObject * pypdffit2_u11(PyObject *, PyObject *); - -// u22 -extern char pypdffit2_u22__doc__[]; -extern char pypdffit2_u22__name__[]; -extern "C" -PyObject * pypdffit2_u22(PyObject *, PyObject *); - -// u33 -extern char pypdffit2_u33__doc__[]; -extern char pypdffit2_u33__name__[]; -extern "C" -PyObject * pypdffit2_u33(PyObject *, PyObject *); - -// u12 -extern char pypdffit2_u12__doc__[]; -extern char pypdffit2_u12__name__[]; -extern "C" -PyObject * pypdffit2_u12(PyObject *, PyObject *); - -// u13 -extern char pypdffit2_u13__doc__[]; -extern char pypdffit2_u13__name__[]; -extern "C" -PyObject * pypdffit2_u13(PyObject *, PyObject *); - -// u23 -extern char pypdffit2_u23__doc__[]; -extern char pypdffit2_u23__name__[]; -extern "C" -PyObject * pypdffit2_u23(PyObject *, PyObject *); - -// occ -extern char pypdffit2_occ__doc__[]; -extern char pypdffit2_occ__name__[]; -extern "C" -PyObject * pypdffit2_occ(PyObject *, PyObject *); - -// pscale -extern char pypdffit2_pscale__doc__[]; -extern char pypdffit2_pscale__name__[]; -extern "C" -PyObject * pypdffit2_pscale(PyObject *, PyObject *); - -// spdiameter -extern char pypdffit2_spdiameter__doc__[]; -extern char pypdffit2_spdiameter__name__[]; -extern "C" -PyObject * pypdffit2_spdiameter(PyObject *, PyObject *); - -// stepcut -extern char pypdffit2_stepcut__doc__[]; -extern char pypdffit2_stepcut__name__[]; -extern "C" -PyObject * pypdffit2_stepcut(PyObject *, PyObject *); - -// sratio -extern char pypdffit2_sratio__doc__[]; -extern char pypdffit2_sratio__name__[]; -extern "C" -PyObject * pypdffit2_sratio(PyObject *, PyObject *); - -// delta2 -extern char pypdffit2_delta2__doc__[]; -extern char pypdffit2_delta2__name__[]; -extern "C" -PyObject * pypdffit2_delta2(PyObject *, PyObject *); - -// delta1 -extern char pypdffit2_delta1__doc__[]; -extern char pypdffit2_delta1__name__[]; -extern "C" -PyObject * pypdffit2_delta1(PyObject *, PyObject *); - -// dscale -extern char pypdffit2_dscale__doc__[]; -extern char pypdffit2_dscale__name__[]; -extern "C" -PyObject * pypdffit2_dscale(PyObject *, PyObject *); - -// qdamp -extern char pypdffit2_qdamp__doc__[]; -extern char pypdffit2_qdamp__name__[]; -extern "C" -PyObject * pypdffit2_qdamp(PyObject *, PyObject *); - -// qbroad -extern char pypdffit2_qbroad__doc__[]; -extern char pypdffit2_qbroad__name__[]; -extern "C" -PyObject * pypdffit2_qbroad(PyObject *, PyObject *); - -// rcut -extern char pypdffit2_rcut__doc__[]; -extern char pypdffit2_rcut__name__[]; -extern "C" -PyObject * pypdffit2_rcut(PyObject *, PyObject *); - -// get_atoms -extern char pypdffit2_get_atoms__doc__[]; -extern char pypdffit2_get_atoms__name__[]; -extern "C" -PyObject * pypdffit2_get_atoms(PyObject *, PyObject *); - -// num_atoms -extern char pypdffit2_num_atoms__doc__[]; -extern char pypdffit2_num_atoms__name__[]; -extern "C" -PyObject * pypdffit2_num_atoms(PyObject *, PyObject *); - -// get_atom_types -extern char pypdffit2_get_atom_types__doc__[]; -extern char pypdffit2_get_atom_types__name__[]; -extern "C" -PyObject * pypdffit2_get_atom_types(PyObject *, PyObject *); - -// num_phases -extern char pypdffit2_num_phases__doc__[]; -extern char pypdffit2_num_phases__name__[]; -extern "C" -PyObject * pypdffit2_num_phases(PyObject *, PyObject *); - -// num_datasets -extern char pypdffit2_num_datasets__doc__[]; -extern char pypdffit2_num_datasets__name__[]; -extern "C" -PyObject * pypdffit2_num_datasets(PyObject *, PyObject *); - -// phase_fractions -extern char pypdffit2_phase_fractions__doc__[]; -extern char pypdffit2_phase_fractions__name__[]; -extern "C" -PyObject * pypdffit2_phase_fractions(PyObject *, PyObject *); - -// redirect_stdout -extern char pypdffit2_redirect_stdout__doc__[]; -extern char pypdffit2_redirect_stdout__name__[]; -extern "C" -PyObject * pypdffit2_redirect_stdout(PyObject *, PyObject *); - -// is_element -extern char pypdffit2_is_element__doc__[]; -extern char pypdffit2_is_element__name__[]; -extern "C" -PyObject * pypdffit2_is_element(PyObject *, PyObject *); - -#endif // PYPDFFIT2_MISC_H diff --git a/pdffit2module/pdffit2module.cc b/pdffit2module/pdffit2module.cc deleted file mode 100644 index acf89fa3..00000000 --- a/pdffit2module/pdffit2module.cc +++ /dev/null @@ -1,150 +0,0 @@ -/*********************************************************************** -* -* pdffit2 by DANSE Diffraction group -* Simon J. L. Billinge -* (c) 2006 trustees of the Michigan State University -* All rights reserved. -* -* File coded by: Chris Farrow -* -* See AUTHORS.txt for a list of people who contributed. -* See LICENSE.txt for license information. -* -************************************************************************ -* -* The python pdffit2 module. -* -* Comments: -* -***********************************************************************/ -#define PY_SSIZE_T_CLEAN -#include -#include - -#include "pyexceptions.h" -#include "bindings.h" -#include "libpdffit2/pdffit.h" - -using namespace std; - -char pypdffit2_module__doc__[] = - "pdffit2 - interface to the core calculation routines in C++"; - -// local helper for transfer version information from -// Python to C++ PdfFit class. - -namespace { - -void transfer_version() -{ - // obtain version information from the Python module - PyObject* mdiffpy_pdffit2; - mdiffpy_pdffit2 = PyImport_ImportModule("diffpy.pdffit2"); - if (!mdiffpy_pdffit2) return; - PyObject* pyversion; - pyversion = PyObject_GetAttrString(mdiffpy_pdffit2, "__version__"); - Py_DECREF(mdiffpy_pdffit2); - if (!pyversion) return; - const char* cversion; -#if PY_MAJOR_VERSION >= 3 - cversion = PyUnicode_AsUTF8(pyversion); -#else - cversion = PyString_AsString(pyversion); -#endif - // copy version information to C++ constant - if (cversion) PdfFit::version(cversion); - Py_DECREF(pyversion); -} - - -void setup_module_contents(PyObject* d) -{ - // install the module exceptions - pypdffit2_runtimeError = PyErr_NewException("pdffit2.runtime", 0, 0); - PyDict_SetItemString(d, "RuntimeException", pypdffit2_runtimeError); - - pypdffit2_unassignedError = PyErr_NewException( - "pdffit2.unassignedError", 0, 0); - PyDict_SetItemString(d, "unassignedError", pypdffit2_unassignedError); - - pypdffit2_dataError = PyErr_NewException( - "pdffit2.dataError", 0, 0); - PyDict_SetItemString(d, "dataError", pypdffit2_dataError); - - pypdffit2_structureError = PyErr_NewException( - "pdffit2.structureError", 0, 0); - PyDict_SetItemString(d, "structureError", pypdffit2_structureError); - - pypdffit2_calculationError = PyErr_NewException( - "pdffit2.calculationError", 0, 0); - PyDict_SetItemString(d, "calculationError", pypdffit2_calculationError); - - pypdffit2_constraintError = PyErr_NewException( - "pdffit2.constraintError", 0, 0); - PyDict_SetItemString(d, "constraintError", pypdffit2_constraintError); - - transfer_version(); -} - -} // namespace ------------------------------------------------------------- - -// TODO remove PY_MAJOR_VERSION blocks after ending support for Python 2.7 - -#if PY_MAJOR_VERSION == 2 - -// Initialization function for the module (*must* be called initpdffit2) -extern "C" -void -initpdffit2() -{ - // create the module and add the functions - PyObject * m = Py_InitModule4( - "pdffit2", pypdffit2_methods, - pypdffit2_module__doc__, 0, PYTHON_API_VERSION); - - // get its dictionary - PyObject * d = PyModule_GetDict(m); - - // check for errors - if (PyErr_Occurred()) { - Py_FatalError("can't initialize module pdffit2"); - } - - // install the module exceptions and version string - setup_module_contents(d); - - return; -} - -#else - -// Module initialization for Python 3 ---------------------------------------- - -static struct PyModuleDef pdffit2moduledef = { - PyModuleDef_HEAD_INIT, - // .m_name = - "pdffit2", - // .m_doc = - pypdffit2_module__doc__, - // .m_size = - -1, - // .m_methods = - pypdffit2_methods, -}; - - -PyMODINIT_FUNC -PyInit_pdffit2(void) - -{ - PyObject *module = PyModule_Create(&pdffit2moduledef); - if (module == NULL) return NULL; - - PyObject* d = PyModule_GetDict(module); - setup_module_contents(d); - return module; -} - -#endif // PY_MAJOR_VERSION == 2 - -// End of file diff --git a/pdffit2module/pyexceptions.cc b/pdffit2module/pyexceptions.cc deleted file mode 100644 index e94b3d16..00000000 --- a/pdffit2module/pyexceptions.cc +++ /dev/null @@ -1,30 +0,0 @@ -/*********************************************************************** -* -* pdffit2 by DANSE Diffraction group -* Simon J. L. Billinge -* (c) 2006 trustees of the Michigan State University -* All rights reserved. -* -* File coded by: Chris Farrow -* -* See AUTHORS.txt for a list of people who contributed. -* See LICENSE.txt for license information. -* -************************************************************************ -* -* Exceptions for pdffit2 python module. -* -* Comments: -* -***********************************************************************/ -#define PY_SSIZE_T_CLEAN -#include - -PyObject *pypdffit2_runtimeError = 0; -PyObject *pypdffit2_unassignedError = 0; -PyObject *pypdffit2_dataError = 0; -PyObject *pypdffit2_structureError = 0; -PyObject *pypdffit2_calculationError = 0; -PyObject *pypdffit2_constraintError = 0; - -// End of file diff --git a/pdffit2module/pyexceptions.h b/pdffit2module/pyexceptions.h deleted file mode 100644 index 09bd942b..00000000 --- a/pdffit2module/pyexceptions.h +++ /dev/null @@ -1,33 +0,0 @@ -/*********************************************************************** -* -* pdffit2 by DANSE Diffraction group -* Simon J. L. Billinge -* (c) 2006 trustees of the Michigan State University -* All rights reserved. -* -* File coded by: Chris Farrow -* -* See AUTHORS.txt for a list of people who contributed. -* See LICENSE.txt for license information. -* -************************************************************************ -* -* Exceptions for pdffit2 python module. -* -* Comments: -* -***********************************************************************/ - -#ifndef PYPDFFIT2_EXCEPTIONS_H -#define PYPDFFIT2_EXCEPTIONS_H - -// exceptions - -extern PyObject *pypdffit2_runtimeError; -extern PyObject *pypdffit2_unassignedError; -extern PyObject *pypdffit2_dataError; -extern PyObject *pypdffit2_structureError; -extern PyObject *pypdffit2_constraintError; -extern PyObject *pypdffit2_calculationError; - -#endif // PYPDFFIT2_EXCEPTIONS_H From c6d6cffc62c54bd1dabc7a74994d3c6f77d41e1d Mon Sep 17 00:00:00 2001 From: Sam Andrello Date: Tue, 23 Jul 2024 12:02:27 -0400 Subject: [PATCH 032/104] Update init py files --- src/diffpy/__init__.py | 6 +- src/diffpy/pdffit2/__init__.py | 9 ++- src/diffpy/pdffit2/tests/__init__.py | 102 +++++++++++++++++++++++++++ 3 files changed, 115 insertions(+), 2 deletions(-) diff --git a/src/diffpy/__init__.py b/src/diffpy/__init__.py index 5b3af482..e1ae0400 100644 --- a/src/diffpy/__init__.py +++ b/src/diffpy/__init__.py @@ -1,6 +1,8 @@ #!/usr/bin/env python ############################################################################## # +# (c) 2008 trustees of the Michigan State University. +# All rights reserved. # (c) 2024 The Trustees of Columbia University in the City of New York. # All rights reserved. # @@ -13,7 +15,9 @@ # ############################################################################## -"""Blank namespace package for module diffpy.""" +"""diffpy - tools for structure analysis by diffraction. + +Blank namespace package for module diffpy.""" from pkgutil import extend_path diff --git a/src/diffpy/pdffit2/__init__.py b/src/diffpy/pdffit2/__init__.py index e12b2fb9..c5a8e039 100644 --- a/src/diffpy/pdffit2/__init__.py +++ b/src/diffpy/pdffit2/__init__.py @@ -1,6 +1,8 @@ #!/usr/bin/env python ############################################################################## # +# (c) 2006 trustees of the Michigan State University. +# All rights reserved. # (c) 2024 The Trustees of Columbia University in the City of New York. # All rights reserved. # @@ -16,9 +18,14 @@ """PDFfit2 - real space structure refinement program.""" # package version -from diffpy.pdffit2.version import __version__ +from diffpy.pdffit2.version import __version__, __date__ +from diffpy.pdffit2.pdffit import PdfFit +from diffpy.pdffit2.output import redirect_stdout +from diffpy.pdffit2.pdffit2 import is_element # silence the pyflakes syntax checker assert __version__ or True +assert __date__ or True +assert all((PdfFit, redirect_stdout, is_element)) # End of file diff --git a/src/diffpy/pdffit2/tests/__init__.py b/src/diffpy/pdffit2/tests/__init__.py index e69de29b..174b14d2 100644 --- a/src/diffpy/pdffit2/tests/__init__.py +++ b/src/diffpy/pdffit2/tests/__init__.py @@ -0,0 +1,102 @@ +#!/usr/bin/env python +############################################################################## +# +# (c) 2012 Trustees of the Columbia University in the City of New York. +# All rights reserved. +# (c) 2024 The Trustees of Columbia University in the City of New York. +# All rights reserved. +# +# File coded by: Billinge Group members and community contributors. +# +# See GitHub contributions for a more detailed list of contributors. +# https://github.com/diffpy/diffpy.pdffit2/graphs/contributors +# +# See LICENSE.rst for license information. +# +############################################################################## + +"""Unit tests for the diffpy.pdffit2 package. +""" + +import unittest + +def testsuite(pattern=''): + '''Create a unit tests suite for the diffpy.pdffit2 package. + + Parameters + ---------- + pattern : str, optional + Regular expression pattern for selecting test cases. + Select all tests when empty. Ignore the pattern when + any of unit test modules fails to import. + + Returns + ------- + suite : `unittest.TestSuite` + The TestSuite object containing the matching tests. + ''' + import re + from os.path import dirname + from itertools import chain + from pkg_resources import resource_filename + loader = unittest.defaultTestLoader + thisdir = resource_filename(__name__, '') + depth = __name__.count('.') + 1 + topdir = thisdir + for i in range(depth): + topdir = dirname(topdir) + suite_all = loader.discover(thisdir, pattern='*Test*.py', + top_level_dir=topdir) + # always filter the suite by pattern to test-cover the selection code. + suite = unittest.TestSuite() + rx = re.compile(pattern) + tsuites = list(chain.from_iterable(suite_all)) + tsok = all(isinstance(ts, unittest.TestSuite) for ts in tsuites) + if not tsok: # pragma: no cover + return suite_all + tcases = chain.from_iterable(tsuites) + for tc in tcases: + tcwords = tc.id().split('.') + shortname = '.'.join(tcwords[-3:]) + if rx.search(shortname): + suite.addTest(tc) + # verify all tests are found for an empty pattern. + assert pattern or suite_all.countTestCases() == suite.countTestCases() + return suite + + +def test(): + '''Execute all unit tests for the diffpy.pdffit2 package. + + Returns + ------- + result : `unittest.TestResult` + ''' + suite = testsuite() + runner = unittest.TextTestRunner() + result = runner.run(suite) + return result + + +def testdeps(): + '''Execute all unit tests for diffpy.pdffit2 and its dependencies. + + Returns + ------- + result : `unittest.TestResult` + ''' + from importlib import import_module + modulenames = ''' + diffpy.pdffit2.tests + diffpy.structure.tests + '''.split() + suite = unittest.TestSuite() + for mname in modulenames: + mod = import_module(mname) + suite.addTests(mod.testsuite()) + runner = unittest.TextTestRunner() + result = runner.run(suite) + return result + + +# End of file From 055ccd04a1fd78ed618aecf740d61321b1b60267 Mon Sep 17 00:00:00 2001 From: Sam Andrello Date: Tue, 23 Jul 2024 12:06:22 -0400 Subject: [PATCH 033/104] add six to requirements --- requirements/run.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/requirements/run.txt b/requirements/run.txt index 9cc306b0..33133cd6 100644 --- a/requirements/run.txt +++ b/requirements/run.txt @@ -1 +1,2 @@ diffpy.structure +six From e77515def0e4e488648e4450e315f750985bf214 Mon Sep 17 00:00:00 2001 From: Sam Andrello Date: Tue, 23 Jul 2024 12:09:54 -0400 Subject: [PATCH 034/104] run.py without pytest --- src/diffpy/pdffit2/tests/run.py | 42 +++++++++++++++++++++++---------- 1 file changed, 30 insertions(+), 12 deletions(-) diff --git a/src/diffpy/pdffit2/tests/run.py b/src/diffpy/pdffit2/tests/run.py index 463f010e..39ae1dcf 100644 --- a/src/diffpy/pdffit2/tests/run.py +++ b/src/diffpy/pdffit2/tests/run.py @@ -1,6 +1,8 @@ #!/usr/bin/env python ############################################################################## # +# (c) 2012 Trustees of the Columbia University in the City of New York. +# All rights reserved. # (c) 2024 The Trustees of Columbia University in the City of New York. # All rights reserved. # @@ -12,23 +14,39 @@ # See LICENSE.rst for license information. # ############################################################################## + """Convenience module for executing all unit tests with python -m diffpy.pdffit2.tests.run """ -import sys -import pytest +if __name__ == '__main__': + import sys + # show warnings by default + if not sys.warnoptions: + import os, warnings + warnings.simplefilter("default") + # also affect subprocesses + os.environ["PYTHONWARNINGS"] = "default" + from diffpy.pdffit2.tests import test + # produce zero exit code for a successful test + sys.exit(not test().wasSuccessful()) + -if __name__ == "__main__": - # show output results from every test function - args = ["-v"] - # show the message output for skipped and expected failure tests - if len(sys.argv) > 1: - args.extend(sys.argv[1:]) - print("pytest arguments: {}".format(args)) - # call pytest and exit with the return code from pytest - exit_res = pytest.main(args) - sys.exit(exit_res) +# Consider upgrading to pytest +# import sys +# +# import pytest +# +# if __name__ == "__main__": +# # show output results from every test function +# args = ["-v"] +# # show the message output for skipped and expected failure tests +# if len(sys.argv) > 1: +# args.extend(sys.argv[1:]) +# print("pytest arguments: {}".format(args)) +# # call pytest and exit with the return code from pytest +# exit_res = pytest.main(args) +# sys.exit(exit_res) # End of file From 29d68a277e06e4ee5b6d04c8e5159a230f8cc4cf Mon Sep 17 00:00:00 2001 From: Sam Andrello Date: Tue, 23 Jul 2024 12:25:08 -0400 Subject: [PATCH 035/104] add other vars in version.py --- src/diffpy/pdffit2/version.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/diffpy/pdffit2/version.py b/src/diffpy/pdffit2/version.py index 69e4d1b2..478a5ca7 100644 --- a/src/diffpy/pdffit2/version.py +++ b/src/diffpy/pdffit2/version.py @@ -16,11 +16,14 @@ """Definition of __version__.""" # We do not use the other three variables, but can be added back if needed. -# __all__ = ["__date__", "__git_commit__", "__timestamp__", "__version__"] +__all__ = ["__date__", "__git_commit__", "__timestamp__", "__version__"] # obtain version information from importlib.metadata import version __version__ = version("diffpy.pdffit2") +__date__ = __all__[0] +__git_commit__ = __all__[1] +__timestamp__ = __all__[2] -# End of file +# End of file \ No newline at end of file From 7f6ca7cd7e4ba4f879dd4133634c7bbc33b27bf4 Mon Sep 17 00:00:00 2001 From: Sam Andrello Date: Tue, 23 Jul 2024 12:30:12 -0400 Subject: [PATCH 036/104] pre-commit fixes --- src/diffpy/pdffit2/tests/__init__.py | 37 +++++++++++++++------------- src/diffpy/pdffit2/tests/run.py | 8 ++++-- src/diffpy/pdffit2/version.py | 2 +- 3 files changed, 27 insertions(+), 20 deletions(-) diff --git a/src/diffpy/pdffit2/tests/__init__.py b/src/diffpy/pdffit2/tests/__init__.py index 174b14d2..4ffdb21c 100644 --- a/src/diffpy/pdffit2/tests/__init__.py +++ b/src/diffpy/pdffit2/tests/__init__.py @@ -20,8 +20,9 @@ import unittest -def testsuite(pattern=''): - '''Create a unit tests suite for the diffpy.pdffit2 package. + +def testsuite(pattern=""): + """Create a unit tests suite for the diffpy.pdffit2 package. Parameters ---------- @@ -34,30 +35,31 @@ def testsuite(pattern=''): ------- suite : `unittest.TestSuite` The TestSuite object containing the matching tests. - ''' + """ import re - from os.path import dirname from itertools import chain + from os.path import dirname + from pkg_resources import resource_filename + loader = unittest.defaultTestLoader - thisdir = resource_filename(__name__, '') - depth = __name__.count('.') + 1 + thisdir = resource_filename(__name__, "") + depth = __name__.count(".") + 1 topdir = thisdir for i in range(depth): topdir = dirname(topdir) - suite_all = loader.discover(thisdir, pattern='*Test*.py', - top_level_dir=topdir) + suite_all = loader.discover(thisdir, pattern="*Test*.py", top_level_dir=topdir) # always filter the suite by pattern to test-cover the selection code. suite = unittest.TestSuite() rx = re.compile(pattern) tsuites = list(chain.from_iterable(suite_all)) tsok = all(isinstance(ts, unittest.TestSuite) for ts in tsuites) - if not tsok: # pragma: no cover + if not tsok: # pragma: no cover return suite_all tcases = chain.from_iterable(tsuites) for tc in tcases: - tcwords = tc.id().split('.') - shortname = '.'.join(tcwords[-3:]) + tcwords = tc.id().split(".") + shortname = ".".join(tcwords[-3:]) if rx.search(shortname): suite.addTest(tc) # verify all tests are found for an empty pattern. @@ -66,12 +68,12 @@ def testsuite(pattern=''): def test(): - '''Execute all unit tests for the diffpy.pdffit2 package. + """Execute all unit tests for the diffpy.pdffit2 package. Returns ------- result : `unittest.TestResult` - ''' + """ suite = testsuite() runner = unittest.TextTestRunner() result = runner.run(suite) @@ -79,17 +81,18 @@ def test(): def testdeps(): - '''Execute all unit tests for diffpy.pdffit2 and its dependencies. + """Execute all unit tests for diffpy.pdffit2 and its dependencies. Returns ------- result : `unittest.TestResult` - ''' + """ from importlib import import_module - modulenames = ''' + + modulenames = """ diffpy.pdffit2.tests diffpy.structure.tests - '''.split() + """.split() suite = unittest.TestSuite() for mname in modulenames: mod = import_module(mname) diff --git a/src/diffpy/pdffit2/tests/run.py b/src/diffpy/pdffit2/tests/run.py index 39ae1dcf..d5c4ea41 100644 --- a/src/diffpy/pdffit2/tests/run.py +++ b/src/diffpy/pdffit2/tests/run.py @@ -20,15 +20,19 @@ """ -if __name__ == '__main__': +if __name__ == "__main__": import sys + # show warnings by default if not sys.warnoptions: - import os, warnings + import os + import warnings + warnings.simplefilter("default") # also affect subprocesses os.environ["PYTHONWARNINGS"] = "default" from diffpy.pdffit2.tests import test + # produce zero exit code for a successful test sys.exit(not test().wasSuccessful()) diff --git a/src/diffpy/pdffit2/version.py b/src/diffpy/pdffit2/version.py index 478a5ca7..60d34a97 100644 --- a/src/diffpy/pdffit2/version.py +++ b/src/diffpy/pdffit2/version.py @@ -26,4 +26,4 @@ __git_commit__ = __all__[1] __timestamp__ = __all__[2] -# End of file \ No newline at end of file +# End of file From 26776a3b492df4203483e3343651b1b299b61695 Mon Sep 17 00:00:00 2001 From: Sam Andrello Date: Tue, 23 Jul 2024 12:32:42 -0400 Subject: [PATCH 037/104] isort fix --- .pre-commit-config.yaml | 2 +- src/diffpy/pdffit2/__init__.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 0ab2ecdd..8aedd156 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -31,7 +31,7 @@ repos: hooks: - id: isort args: ["--profile", "black", "--order-by-type"] - exclude: ^diffpy/pdffit2/__init__\.py$ + exclude: ^src/diffpy/pdffit2/__init__\.py$ - repo: https://github.com/kynan/nbstripout rev: 0.7.1 hooks: diff --git a/src/diffpy/pdffit2/__init__.py b/src/diffpy/pdffit2/__init__.py index c5a8e039..fe3fbce3 100644 --- a/src/diffpy/pdffit2/__init__.py +++ b/src/diffpy/pdffit2/__init__.py @@ -18,9 +18,9 @@ """PDFfit2 - real space structure refinement program.""" # package version +from diffpy.pdffit2.output import redirect_stdout from diffpy.pdffit2.version import __version__, __date__ from diffpy.pdffit2.pdffit import PdfFit -from diffpy.pdffit2.output import redirect_stdout from diffpy.pdffit2.pdffit2 import is_element # silence the pyflakes syntax checker From 3490497e46ee87948cee5e8888373d9cc90dbf90 Mon Sep 17 00:00:00 2001 From: Sam Andrello Date: Tue, 23 Jul 2024 13:57:09 -0400 Subject: [PATCH 038/104] Add cookiecutter doc files --- doc/Makefile | 194 ++++++++++++ doc/make.bat | 36 +++ doc/source/_static/.placeholder | 0 .../api/diffpy.pdffit2.example_package.rst | 31 ++ doc/source/api/diffpy.pdffit2.rst | 30 ++ doc/source/conf.py | 289 ++++++++++++++++++ doc/source/index.rst | 44 +++ doc/source/license.rst | 39 +++ doc/source/release.rst | 5 + 9 files changed, 668 insertions(+) create mode 100644 doc/Makefile create mode 100644 doc/make.bat create mode 100644 doc/source/_static/.placeholder create mode 100644 doc/source/api/diffpy.pdffit2.example_package.rst create mode 100644 doc/source/api/diffpy.pdffit2.rst create mode 100644 doc/source/conf.py create mode 100644 doc/source/index.rst create mode 100644 doc/source/license.rst create mode 100644 doc/source/release.rst diff --git a/doc/Makefile b/doc/Makefile new file mode 100644 index 00000000..ef016bb8 --- /dev/null +++ b/doc/Makefile @@ -0,0 +1,194 @@ +# Makefile for Sphinx documentation +# + +# You can set these variables from the command line. +SPHINXOPTS = +SPHINXBUILD = sphinx-build +PAPER = +BUILDDIR = build +BASENAME = $(subst .,,$(subst $() $(),,diffpy.pdffit2)) + +# User-friendly check for sphinx-build +ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1) +$(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/) +endif + +# Internal variables. +PAPEROPT_a4 = -D latex_paper_size=a4 +PAPEROPT_letter = -D latex_paper_size=letter +ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source +# the i18n builder cannot share the environment and doctrees with the others +I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source + +.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext + +help: + @echo "Please use \`make ' where is one of" + @echo " html to make standalone HTML files" + @echo " dirhtml to make HTML files named index.html in directories" + @echo " singlehtml to make a single large HTML file" + @echo " pickle to make pickle files" + @echo " json to make JSON files" + @echo " htmlhelp to make HTML files and a HTML help project" + @echo " qthelp to make HTML files and a qthelp project" + @echo " devhelp to make HTML files and a Devhelp project" + @echo " epub to make an epub" + @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" + @echo " latexpdf to make LaTeX files and run them through pdflatex" + @echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx" + @echo " text to make text files" + @echo " man to make manual pages" + @echo " texinfo to make Texinfo files" + @echo " info to make Texinfo files and run them through makeinfo" + @echo " gettext to make PO message catalogs" + @echo " changes to make an overview of all changed/added/deprecated items" + @echo " xml to make Docutils-native XML files" + @echo " pseudoxml to make pseudoxml-XML files for display purposes" + @echo " linkcheck to check all external links for integrity" + @echo " doctest to run all doctests embedded in the documentation (if enabled)" + +clean: + rm -rf $(BUILDDIR)/* + +html: + $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html + @echo + @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." + +dirhtml: + $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml + @echo + @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." + +singlehtml: + $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml + @echo + @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." + +pickle: + $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle + @echo + @echo "Build finished; now you can process the pickle files." + +json: + $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json + @echo + @echo "Build finished; now you can process the JSON files." + +htmlhelp: + $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp + @echo + @echo "Build finished; now you can run HTML Help Workshop with the" \ + ".hhp project file in $(BUILDDIR)/htmlhelp." + +qthelp: + $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp + @echo + @echo "Build finished; now you can run "qcollectiongenerator" with the" \ + ".qhcp project file in $(BUILDDIR)/qthelp, like this:" + @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/$(BASENAME).qhcp" + @echo "To view the help file:" + @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/$(BASENAME).qhc" + +devhelp: + $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp + @echo + @echo "Build finished." + @echo "To view the help file:" + @echo "# mkdir -p $$HOME/.local/share/devhelp/$(BASENAME)" + @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/$(BASENAME)" + @echo "# devhelp" + +epub: + $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub + @echo + @echo "Build finished. The epub file is in $(BUILDDIR)/epub." + +latex: + $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex + @echo + @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." + @echo "Run \`make' in that directory to run these through (pdf)latex" \ + "(use \`make latexpdf' here to do that automatically)." + +latexpdf: + $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex + @echo "Running LaTeX files through pdflatex..." + $(MAKE) -C $(BUILDDIR)/latex all-pdf + @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." + +latexpdfja: + $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex + @echo "Running LaTeX files through platex and dvipdfmx..." + $(MAKE) -C $(BUILDDIR)/latex all-pdf-ja + @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." + +text: + $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text + @echo + @echo "Build finished. The text files are in $(BUILDDIR)/text." + +man: + $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man + @echo + @echo "Build finished. The manual pages are in $(BUILDDIR)/man." + +texinfo: + $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo + @echo + @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo." + @echo "Run \`make' in that directory to run these through makeinfo" \ + "(use \`make info' here to do that automatically)." + +info: + $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo + @echo "Running Texinfo files through makeinfo..." + make -C $(BUILDDIR)/texinfo info + @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo." + +gettext: + $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale + @echo + @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale." + +changes: + $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes + @echo + @echo "The overview file is in $(BUILDDIR)/changes." + +linkcheck: + $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck + @echo + @echo "Link check complete; look for any errors in the above output " \ + "or in $(BUILDDIR)/linkcheck/output.txt." + +doctest: + $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest + @echo "Testing of doctests in the sources finished, look at the " \ + "results in $(BUILDDIR)/doctest/output.txt." + +# Manual publishing to the gh-pages branch + +GITREPOPATH = $(shell cd $(CURDIR) && git rev-parse --git-dir) +GITREMOTE = origin +GITREMOTEURL = $(shell git config --get remote.$(GITREMOTE).url) +GITLASTCOMMIT = $(shell git rev-parse --short HEAD) + +publish: + @test -d build/html || \ + ( echo >&2 "Run 'make html' first!"; false ) + git show-ref --verify --quiet refs/heads/gh-pages || \ + git branch --track gh-pages $(GITREMOTE)/gh-pages + test -d build/gh-pages || \ + git clone -s -b gh-pages $(GITREPOPATH) build/gh-pages + cd build/gh-pages && \ + git pull $(GITREMOTEURL) gh-pages + rsync -acv --delete --exclude=.git --exclude=.rsync-exclude \ + --exclude-from=build/gh-pages/.rsync-exclude \ + --link-dest=$(CURDIR)/build/html build/html/ build/gh-pages/ + cd build/gh-pages && \ + git add --all . && \ + git diff --cached --quiet || \ + git commit -m "Sync with the source at $(GITLASTCOMMIT)." + cd build/gh-pages && \ + git push origin gh-pages diff --git a/doc/make.bat b/doc/make.bat new file mode 100644 index 00000000..2be83069 --- /dev/null +++ b/doc/make.bat @@ -0,0 +1,36 @@ +@ECHO OFF + +pushd %~dp0 + +REM Command file for Sphinx documentation + +if "%SPHINXBUILD%" == "" ( + set SPHINXBUILD=sphinx-build +) +set SOURCEDIR=source +set BUILDDIR=build +set SPHINXPROJ=PackagingScientificPython + +if "%1" == "" goto help + +%SPHINXBUILD% >NUL 2>NUL +if errorlevel 9009 ( + echo. + echo.The 'sphinx-build' command was not found. Make sure you have Sphinx + echo.installed, then set the SPHINXBUILD environment variable to point + echo.to the full path of the 'sphinx-build' executable. Alternatively you + echo.may add the Sphinx directory to PATH. + echo. + echo.If you don't have Sphinx installed, grab it from + echo.http://sphinx-doc.org/ + exit /b 1 +) + +%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% +goto end + +:help +%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% + +:end +popd diff --git a/doc/source/_static/.placeholder b/doc/source/_static/.placeholder new file mode 100644 index 00000000..e69de29b diff --git a/doc/source/api/diffpy.pdffit2.example_package.rst b/doc/source/api/diffpy.pdffit2.example_package.rst new file mode 100644 index 00000000..1c6346c7 --- /dev/null +++ b/doc/source/api/diffpy.pdffit2.example_package.rst @@ -0,0 +1,31 @@ +.. _example_package documentation: + +|title| +======= + +.. |title| replace:: diffpy.pdffit2.example_package package + +.. automodule:: diffpy.pdffit2.example_package + :members: + :undoc-members: + :show-inheritance: + +|foo| +----- + +.. |foo| replace:: diffpy.pdffit2.example_package.foo module + +.. automodule:: diffpy.pdffit2.example_package.foo + :members: + :undoc-members: + :show-inheritance: + +|bar| +----- + +.. |bar| replace:: diffpy.pdffit2.example_package.bar module + +.. automodule:: diffpy.pdffit2.example_package.foo + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/source/api/diffpy.pdffit2.rst b/doc/source/api/diffpy.pdffit2.rst new file mode 100644 index 00000000..70ca1b77 --- /dev/null +++ b/doc/source/api/diffpy.pdffit2.rst @@ -0,0 +1,30 @@ +:tocdepth: -1 + +|title| +======= + +.. |title| replace:: diffpy.pdffit2 package + +.. automodule:: diffpy.pdffit2 + :members: + :undoc-members: + :show-inheritance: + +Subpackages +----------- + +.. toctree:: + diffpy.pdffit2.example_package + +Submodules +---------- + +|module| +-------- + +.. |module| replace:: diffpy.pdffit2.example_submodule module + +.. automodule:: diffpy.pdffit2.example_submodule + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/source/conf.py b/doc/source/conf.py new file mode 100644 index 00000000..c15e8639 --- /dev/null +++ b/doc/source/conf.py @@ -0,0 +1,289 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- +# +# diffpy.pdffit2 documentation build configuration file, created by +# sphinx-quickstart on Thu Jan 30 15:49:41 2014. +# +# This file is execfile()d with the current directory set to its +# containing dir. +# +# Note that not all possible configuration values are present in this +# autogenerated file. +# +# All configuration values have a default; values that are commented out +# serve to show the default. + +import sys +import time +from importlib.metadata import version +from pathlib import Path + +# If extensions (or modules to document with autodoc) are in another directory, +# add these directories to sys.path here. If the directory is relative to the +# documentation root, use Path().resolve() to make it absolute, like shown here. +# sys.path.insert(0, str(Path(".").resolve())) +sys.path.insert(0, str(Path("../..").resolve())) +sys.path.insert(0, str(Path("../../src").resolve())) + +# abbreviations +ab_authors = "Billinge Group members and community contributors" + +# -- General configuration ------------------------------------------------ + +# If your documentation needs a minimal Sphinx version, state it here. +# needs_sphinx = '1.0' + +# Add any Sphinx extension module names here, as strings. They can be +# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom +# ones. +extensions = [ + "sphinx.ext.autodoc", + "sphinx.ext.napoleon", + "sphinx.ext.todo", + "sphinx.ext.viewcode", + "sphinx.ext.intersphinx", + "sphinx_rtd_theme", + "m2r", +] + +# Add any paths that contain templates here, relative to this directory. +templates_path = ["_templates"] + +# The suffix(es) of source filenames. +# You can specify multiple suffix as a list of string: +# +source_suffix = [".rst", ".md"] + +# The encoding of source files. +# source_encoding = 'utf-8-sig' + +# The master toctree document. +master_doc = "index" + +# General information about the project. +project = "diffpy.pdffit2" +copyright = "%Y, The Trustees of Columbia University in the City of New York" + +# The version info for the project you're documenting, acts as replacement for +# |version| and |release|, also used in various other places throughout the +# built documents. + +fullversion = version(project) +# The short X.Y version. +version = "".join(fullversion.split(".post")[:1]) +# The full version, including alpha/beta/rc tags. +release = fullversion + +# The language for content autogenerated by Sphinx. Refer to documentation +# for a list of supported languages. +# language = None + +# There are two options for replacing |today|: either, you set today to some +# non-false value, then it is used: +# today = '' +today = time.strftime("%B %d, %Y", time.localtime()) +year = today.split()[-1] +# Else, today_fmt is used as the format for a strftime call. +# today_fmt = '%B %d, %Y' +# substitute YEAR in the copyright string +copyright = copyright.replace("%Y", year) + +# List of patterns, relative to source directory, that match files and +# directories to ignore when looking for source files. +exclude_patterns = ["build"] + +# The reST default role (used for this markup: `text`) to use for all +# documents. +# default_role = None + +# If true, '()' will be appended to :func: etc. cross-reference text. +# add_function_parentheses = True + +# If true, the current module name will be prepended to all description +# unit titles (such as .. function::). +# add_module_names = True + +# If true, sectionauthor and moduleauthor directives will be shown in the +# output. They are ignored by default. +# show_authors = False + +# The name of the Pygments (syntax highlighting) style to use. +pygments_style = "sphinx" + +# A list of ignored prefixes for module index sorting. +modindex_common_prefix = ["diffpy.pdffit2"] + +# Display all warnings for missing links. +nitpicky = True + +# -- Options for HTML output ---------------------------------------------- + +# The theme to use for HTML and HTML Help pages. See the documentation for +# a list of builtin themes. +# +html_theme = "sphinx_rtd_theme" + +# Theme options are theme-specific and customize the look and feel of a theme +# further. For a list of options available for each theme, see the +# documentation. +# +html_theme_options = { + "navigation_with_keys": "true", +} + +# Add any paths that contain custom themes here, relative to this directory. +# html_theme_path = [] + +# The name for this set of Sphinx documents. If None, it defaults to +# " v documentation". +# html_title = None + +# A shorter title for the navigation bar. Default is the same as html_title. +# html_short_title = None + +# The name of an image file (relative to this directory) to place at the top +# of the sidebar. +# html_logo = None + +# The name of an image file (within the static path) to use as favicon of the +# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 +# pixels large. +# html_favicon = None + +# Add any paths that contain custom static files (such as style sheets) here, +# relative to this directory. They are copied after the builtin static files, +# so a file named "default.css" will overwrite the builtin "default.css". +# html_static_path = ['_static'] + +# Add any extra paths that contain custom files (such as robots.txt or +# .htaccess) here, relative to this directory. These files are copied +# directly to the root of the documentation. +# html_extra_path = [] + +# If not '', a 'Last updated on:' timestamp is inserted at every page bottom, +# using the given strftime format. +# html_last_updated_fmt = '%b %d, %Y' + +# If true, SmartyPants will be used to convert quotes and dashes to +# typographically correct entities. +# html_use_smartypants = True + +# Custom sidebar templates, maps document names to template names. +# html_sidebars = {} + +# Additional templates that should be rendered to pages, maps page names to +# template names. +# html_additional_pages = {} + +# If false, no module index is generated. +# html_domain_indices = True + +# If false, no index is generated. +# html_use_index = True + +# If true, the index is split into individual pages for each letter. +# html_split_index = False + +# If true, links to the reST sources are added to the pages. +# html_show_sourcelink = True + +# If true, "Created using Sphinx" is shown in the HTML footer. Default is True. +# html_show_sphinx = True + +# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. +# html_show_copyright = True + +# If true, an OpenSearch description file will be output, and all pages will +# contain a tag referring to it. The value of this option must be the +# base URL from which the finished HTML is served. +# html_use_opensearch = '' + +# This is the file name suffix for HTML files (e.g. ".xhtml"). +# html_file_suffix = None + +# Output file base name for HTML help builder. +basename = "diffpy.pdffit2".replace(" ", "").replace(".", "") +htmlhelp_basename = basename + "doc" + + +# -- Options for LaTeX output --------------------------------------------- + +latex_elements = { + # The paper size ('letterpaper' or 'a4paper'). + # 'papersize': 'letterpaper', + # The font size ('10pt', '11pt' or '12pt'). + # 'pointsize': '10pt', + # Additional stuff for the LaTeX preamble. + # 'preamble': '', +} + +# Grouping the document tree into LaTeX files. List of tuples +# (source start file, target name, title, +# author, documentclass [howto, manual, or own class]). +latex_documents = [ + ("index", "diffpy.pdffit2.tex", "diffpy.pdffit2 Documentation", ab_authors, "manual"), +] + +# The name of an image file (relative to this directory) to place at the top of +# the title page. +# latex_logo = None + +# For "manual" documents, if this is true, then toplevel headings are parts, +# not chapters. +# latex_use_parts = False + +# If true, show page references after internal links. +# latex_show_pagerefs = False + +# If true, show URL addresses after external links. +# latex_show_urls = False + +# Documents to append as an appendix to all manuals. +# latex_appendices = [] + +# If false, no module index is generated. +# latex_domain_indices = True + + +# -- Options for manual page output --------------------------------------- + +# One entry per manual page. List of tuples +# (source start file, name, description, authors, manual section). +man_pages = [("index", "diffpy.pdffit2", "diffpy.pdffit2 Documentation", ab_authors, 1)] + +# If true, show URL addresses after external links. +# man_show_urls = False + + +# -- Options for Texinfo output ------------------------------------------- + +# Grouping the document tree into Texinfo files. List of tuples +# (source start file, target name, title, author, +# dir menu entry, description, category) +texinfo_documents = [ + ( + "index", + "diffpy.pdffit2", + "diffpy.pdffit2 Documentation", + ab_authors, + "diffpy.pdffit2", + "One line description of project.", + "Miscellaneous", + ), +] + +# Documents to append as an appendix to all manuals. +# texinfo_appendices = [] + +# If false, no module index is generated. +# texinfo_domain_indices = True + +# How to display URL addresses: 'footnote', 'no', or 'inline'. +# texinfo_show_urls = 'footnote' + +# If true, do not generate a @detailmenu in the "Top" node's menu. +# texinfo_no_detailmenu = False + + +# Example configuration for intersphinx: refer to the Python standard library. +# intersphinx_mapping = {'http://docs.python.org/': None} diff --git a/doc/source/index.rst b/doc/source/index.rst new file mode 100644 index 00000000..bc6f0043 --- /dev/null +++ b/doc/source/index.rst @@ -0,0 +1,44 @@ +####### +|title| +####### + +.. |title| replace:: diffpy.pdffit2 documentation + +diffpy.pdffit2 - PDFfit2 - real space structure refinement program.. + +| Software version |release|. +| Last updated |today|. + +======= +Authors +======= + +diffpy.pdffit2 is developed by Billinge Group +and its community contributors. + +For a detailed list of contributors see +https://github.com/diffpy/diffpy.pdffit2/graphs/contributors. + +============ +Installation +============ + +See the `README `_ +file included with the distribution. + +================= +Table of contents +================= +.. toctree:: + :titlesonly: + + license + release + Package API + +======= +Indices +======= + +* :ref:`genindex` +* :ref:`search` diff --git a/doc/source/license.rst b/doc/source/license.rst new file mode 100644 index 00000000..cfab61c2 --- /dev/null +++ b/doc/source/license.rst @@ -0,0 +1,39 @@ +:tocdepth: -1 + +.. index:: license + +License +####### + +OPEN SOURCE LICENSE AGREEMENT +============================= +BSD 3-Clause License + +Copyright (c) 2024, The Trustees of Columbia University in +the City of New York. +All Rights Reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/doc/source/release.rst b/doc/source/release.rst new file mode 100644 index 00000000..27cd0cc9 --- /dev/null +++ b/doc/source/release.rst @@ -0,0 +1,5 @@ +:tocdepth: -1 + +.. index:: release notes + +.. include:: ../../CHANGELOG.rst From 30ffb875e73b7d370c2af5248b2538ab8b977963 Mon Sep 17 00:00:00 2001 From: Sam Andrello Date: Tue, 23 Jul 2024 14:00:21 -0400 Subject: [PATCH 039/104] Add epydoc from uncookiecut version --- doc/source/epydoc/Makefile | 17 ++++++++++++ doc/source/epydoc/epydoc.cfg | 54 ++++++++++++++++++++++++++++++++++++ 2 files changed, 71 insertions(+) create mode 100644 doc/source/epydoc/Makefile create mode 100644 doc/source/epydoc/epydoc.cfg diff --git a/doc/source/epydoc/Makefile b/doc/source/epydoc/Makefile new file mode 100644 index 00000000..756095f5 --- /dev/null +++ b/doc/source/epydoc/Makefile @@ -0,0 +1,17 @@ +PKGNAME = diffpy.pdffit2 +OUTPUT = html +WEBDOCDIR = login.cacr.caltech.edu:/cacr/home/proj/danse/docs.danse.us/docroot/diffraction + + +all: + epydoc --config=epydoc.cfg --output=$(OUTPUT) \ + --name=$(PKGNAME) $(PKGNAME) + + +clean: + /bin/rm -rf $(OUTPUT) + + +publish: + rsync -e /usr/bin/ssh -va --chmod=a+rwx,o-w,Dg+s,Fa-x \ + $(OUTPUT)/ $(WEBDOCDIR)/$(PKGNAME) diff --git a/doc/source/epydoc/epydoc.cfg b/doc/source/epydoc/epydoc.cfg new file mode 100644 index 00000000..dddbcd90 --- /dev/null +++ b/doc/source/epydoc/epydoc.cfg @@ -0,0 +1,54 @@ +[epydoc] + +# docformat +# The default markup language for docstrings, for modules that do +# not define __docformat__. Defaults to epytext. +docformat: plaintext + +# The type of output that should be generated. Should be one +# of: html, text, latex, dvi, ps, pdf. +output: html + +# An integer indicating how verbose epydoc should be. The default +# value is 0; negative values will supress warnings and errors; +# positive values will give more verbose output. +verbosity: 0 + +# A boolean value indicating that Epydoc should show a tracaback +# in case of unexpected error. By default don't show tracebacks +debug: 0 + +# If True, don't try to use colors or cursor control when doing +# textual output. The default False assumes a rich text prompt +simple-term: 1 + +# The format for showing inheritance objects. +# It should be one of: 'grouped', 'listed', 'included'. +inheritance: grouped + +# Whether or not to inclue private variables. (Even if included, +# private variables will be hidden by default.) +private: yes + +# Whether or not to list each module's imports. +imports: yes + +# Whether or not to include syntax highlighted source code in +# the output (HTML only). +sourcecode: yes + +# Whether or not to includea a page with Epydoc log, containing +# effective option at the time of generation and the reported logs. +include-log: no + +### Output options + +# The documented project's name. +#name: diffpy.FIXME + +# The CSS stylesheet for HTML output. Can be the name of a builtin +# stylesheet, or the name of a file. +css: white + +# The documented project's URL. +url: http://www.diffpy.org/ From 43f040687c226bca13771dc52b961940c7005691 Mon Sep 17 00:00:00 2001 From: Sam Andrello Date: Tue, 23 Jul 2024 16:23:29 -0400 Subject: [PATCH 040/104] Added workflow files --- .github/workflows/docs.yml | 43 +++++++++++++++++++++++++ .github/workflows/main.yml | 54 ++++++++++++++++++++++++++++++++ .github/workflows/pre-commit.yml | 19 +++++++++++ 3 files changed, 116 insertions(+) create mode 100644 .github/workflows/docs.yml create mode 100644 .github/workflows/main.yml create mode 100644 .github/workflows/pre-commit.yml diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 00000000..a4661f5c --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,43 @@ +name: Build Documentation + +on: + push: + branches: + - main + release: + +jobs: + test: + runs-on: ubuntu-latest + defaults: + run: + shell: bash -l {0} + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - uses: conda-incubator/setup-miniconda@v2 + with: + activate-environment: build + auto-update-conda: true + + - name: install requirements + run: >- + conda install -n build -c conda-forge + --file requirements/build.txt + --file requirements/run.txt + --file requirements/docs.txt + --quiet --yes + + - name: install the package + run: python -m pip install . --no-deps + + - name: build documents + run: make -C doc html + + - name: Deploy + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./doc/build/html diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 00000000..f306d0a8 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,54 @@ +name: CI + +on: + push: + branches: + - main + - CI + pull_request: + workflow_dispatch: + +jobs: + miniconda: + name: Miniconda ${{ matrix.os }} + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: ["ubuntu-latest"] + steps: + - name: check out diffpy.pdffit2 + uses: actions/checkout@v3 + with: + repository: diffpy/diffpy.pdffit2 + path: . + fetch-depth: 0 # avoid shallow clone with no tags + + - name: initialize miniconda + # this uses a marketplace action that sets up miniconda in a way that makes + # it easier to use. I tried setting it up without this and it was a pain + uses: conda-incubator/setup-miniconda@v2 + with: + activate-environment: test + # environment.yml file is needed by this action. Because I don't want + # maintain this but rather maintain the requirements files it just has + # basic things in it like conda and pip + environment-file: ./environment.yml + python-version: 3 + auto-activate-base: false + + - name: install diffpy.pdffit2 requirements + shell: bash -l {0} + run: | + conda config --set always_yes yes --set changeps1 no + conda config --add channels conda-forge + conda activate test + conda install --file requirements/run.txt + conda install --file requirements/test.txt + pip install . + - name: Validate diffpy.pdffit2 + shell: bash -l {0} + run: | + conda activate test + coverage run -m pytest -vv -s + coverage report -m + codecov diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml new file mode 100644 index 00000000..f2ff7e42 --- /dev/null +++ b/.github/workflows/pre-commit.yml @@ -0,0 +1,19 @@ +name: pre-commit + +on: + pull_request: + push: + workflow_dispatch: + +jobs: + pre-commit: + # pull requests are a duplicate of a branch push if within the same repo. + if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository + + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-python@v4 + - uses: pre-commit/action@v3.0.0 + with: + extra_args: --all-files From b1dcb4d4b2b0a3b6838091ab138e7e42b0541824 Mon Sep 17 00:00:00 2001 From: Sam Andrello Date: Tue, 23 Jul 2024 16:49:18 -0400 Subject: [PATCH 041/104] update testing in main.yml --- .github/workflows/main.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f306d0a8..083672bd 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -49,6 +49,8 @@ jobs: shell: bash -l {0} run: | conda activate test - coverage run -m pytest -vv -s + coverage run src/diffpy/pdffit2/tests/run.py +# uncover this after migrating to pytest +# coverage run -m pytest -vv -s coverage report -m codecov From 57ac92abb90fb88b36c025d5861bf3e34cbece50 Mon Sep 17 00:00:00 2001 From: Sam Andrello Date: Tue, 23 Jul 2024 16:53:09 -0400 Subject: [PATCH 042/104] pre-commit fixes --- .github/workflows/main.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 083672bd..00f20efe 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -50,7 +50,14 @@ jobs: run: | conda activate test coverage run src/diffpy/pdffit2/tests/run.py -# uncover this after migrating to pytest -# coverage run -m pytest -vv -s coverage report -m codecov + +# Use this after migrating to pytest +# - name: Validate diffpy.pdffit2 +# shell: bash -l {0} +# run: | +# conda activate test +# coverage run -m pytest -vv -s +# coverage report -m +# codecov From 200318cf8c07c13b7f7d956c865c73f59c5872f6 Mon Sep 17 00:00:00 2001 From: Sam Andrello Date: Tue, 23 Jul 2024 17:00:07 -0400 Subject: [PATCH 043/104] use editable mode w/ main.yml --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 00f20efe..73a63006 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -44,7 +44,7 @@ jobs: conda activate test conda install --file requirements/run.txt conda install --file requirements/test.txt - pip install . + pip install -e . - name: Validate diffpy.pdffit2 shell: bash -l {0} run: | From d020dbbf1b35ad5e6d1afa3a270a7abddb0626c1 Mon Sep 17 00:00:00 2001 From: Sam Andrello Date: Wed, 24 Jul 2024 12:30:24 -0400 Subject: [PATCH 044/104] added AUTHORS.rst --- AUTHORS.rst | 68 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 AUTHORS.rst diff --git a/AUTHORS.rst b/AUTHORS.rst new file mode 100644 index 00000000..c7329e2f --- /dev/null +++ b/AUTHORS.rst @@ -0,0 +1,68 @@ +Authors +======= + +Billinge Group and community contibutors. + +---- + +This code was derived from the first PDFFIT program by Thomas Proffen. +The sources were converted to C++ by Jacques Bloch and then extensively hacked, +extended and purged from most glaring bugs by Chris Farrow and Pavol Juhas. +This code is currently maintained as part of the DiffPy project to create +python modules for structure investigations from diffraction data. + +The DiffPy team is located in the Billinge-group at the Applied Physics +and Applied Mathematics Department of the Columbia University in New York. +Currently the team consists of + + Simon Billinge + + Pavol Juhas + + Chris Farrow + + Emil Bozin + + Wenduo Zhou + + Peng Tian + + Timur Dykhne + +Please see the header of each source file for a detailed list of +contributors. This is an open-source project and we hope and expect +that the list of contributors will expand with time. Many thanks to +all current and future contributors! + +For more information on the DiffPy project email sb2896@columbia.edu + +DiffPy was initiated as part of the Distributed Data Analysis of Neutron +Scattering Experiments (DANSE) project, funded by the National Science +Foundation under grant DMR-0520547. More information on DANSE can be +found at http://danse.us. Any opinions, findings, and conclusions or +recommendations expressed in this material are those of the author(s) +and do not necessarily reflect the views of the NSF. + +Acknowledgments +--------------- + +We are truly grateful to all the people who have contributed, in all +different ways, to this project: Thomas Proffen, Xiangyun Qiu, Pete +Peterson and Jacques Bloch, previous Billinge-group members whose +contributions to the codes are living well beyond their affiliation with +the group; The hard working DANSE group at Caltech, University of +Maryland, Iowa State and University of Tennessee, especially Brent Fultz +for doggedly putting DANSE all together and Michael Aivazis, and the +indomitable Mike McKerns for their design input and MM's gargantuan +excel spreadsheets; The former members of the Billinge-group members, +especially HyunJeong Kim and Ahmad Masadeh for enthusiastic testing and +feature requests; Last but not least, our long suffering family members, +and the whole coffee and tea industries at large, without whom none of +this would have been possible. + + +Contributors +------------ + +For a list of contributors, visit +https://github.com/diffpy/diffpy.pdffit2/graphs/contributors \ No newline at end of file From 806a9b263c025d9294cc219ed8c84fdb884aec4c Mon Sep 17 00:00:00 2001 From: Sam Andrello Date: Wed, 24 Jul 2024 12:31:17 -0400 Subject: [PATCH 045/104] Added CHANGELOG.rst --- CHANGELOG.rst | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 CHANGELOG.rst diff --git a/CHANGELOG.rst b/CHANGELOG.rst new file mode 100644 index 00000000..843c40a4 --- /dev/null +++ b/CHANGELOG.rst @@ -0,0 +1,26 @@ +============= +Release Notes +============= + +No notable functional changes from 1.4.1 + +-------------------------- +Version 1.4.2 – 2023-12-09 +-------------------------- + +Added +===== + +- Support for Python 3.11, 3.12 + +Changed +======= + +Deprecated +========== + +Removed +======= + +Fixed +===== \ No newline at end of file From eb866303629376fde3e13168e32005fff63928b0 Mon Sep 17 00:00:00 2001 From: Sam Andrello Date: Wed, 24 Jul 2024 12:31:38 -0400 Subject: [PATCH 046/104] Added code of conduct --- CODE_OF_CONDUCT.rst | 133 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 133 insertions(+) create mode 100644 CODE_OF_CONDUCT.rst diff --git a/CODE_OF_CONDUCT.rst b/CODE_OF_CONDUCT.rst new file mode 100644 index 00000000..ff9c3561 --- /dev/null +++ b/CODE_OF_CONDUCT.rst @@ -0,0 +1,133 @@ +===================================== + Contributor Covenant Code of Conduct +===================================== + +Our Pledge +---------- + +We as members, contributors, and leaders pledge to make participation in our +community a harassment-free experience for everyone, regardless of age, body +size, visible or invisible disability, ethnicity, sex characteristics, gender +identity and expression, level of experience, education, socio-economic status, +nationality, personal appearance, race, caste, color, religion, or sexual +identity and orientation. + +We pledge to act and interact in ways that contribute to an open, welcoming, +diverse, inclusive, and healthy community. + +Our Standards +------------- + +Examples of behavior that contributes to a positive environment for our +community include: + +* Demonstrating empathy and kindness toward other people +* Being respectful of differing opinions, viewpoints, and experiences +* Giving and gracefully accepting constructive feedback +* Accepting responsibility and apologizing to those affected by our mistakes, + and learning from the experience +* Focusing on what is best not just for us as individuals, but for the overall + community + +Examples of unacceptable behavior include: + +* The use of sexualized language or imagery, and sexual attention or advances of + any kind +* Trolling, insulting or derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or email address, + without their explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +Enforcement Responsibilities +---------------------------- + +Community leaders are responsible for clarifying and enforcing our standards of +acceptable behavior and will take appropriate and fair corrective action in +response to any behavior that they deem inappropriate, threatening, offensive, +or harmful. + +Community leaders have the right and responsibility to remove, edit, or reject +comments, commits, code, wiki edits, issues, and other contributions that are +not aligned to this Code of Conduct, and will communicate reasons for moderation +decisions when appropriate. + +Scope +----- + +This Code of Conduct applies within all community spaces, and also applies when +an individual is officially representing the community in public spaces. +Examples of representing our community include using an official email address, +posting via an official social media account, or acting as an appointed +representative at an online or offline event. + +Enforcement +----------- + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported to the community leaders responsible for enforcement at +sb2896@columbia.edu. All complaints will be reviewed and investigated promptly and fairly. + +All community leaders are obligated to respect the privacy and security of the +reporter of any incident. + +Enforcement Guidelines +---------------------- + +Community leaders will follow these Community Impact Guidelines in determining +the consequences for any action they deem in violation of this Code of Conduct: + +1. Correction +**************** + +**Community Impact**: Use of inappropriate language or other behavior deemed +unprofessional or unwelcome in the community. + +**Consequence**: A private, written warning from community leaders, providing +clarity around the nature of the violation and an explanation of why the +behavior was inappropriate. A public apology may be requested. + +2. Warning +************* + +**Community Impact**: A violation through a single incident or series of +actions. + +**Consequence**: A warning with consequences for continued behavior. No +interaction with the people involved, including unsolicited interaction with +those enforcing the Code of Conduct, for a specified period of time. This +includes avoiding interactions in community spaces as well as external channels +like social media. Violating these terms may lead to a temporary or permanent +ban. + +3. Temporary Ban +****************** + +**Community Impact**: A serious violation of community standards, including +sustained inappropriate behavior. + +**Consequence**: A temporary ban from any sort of interaction or public +communication with the community for a specified period of time. No public or +private interaction with the people involved, including unsolicited interaction +with those enforcing the Code of Conduct, is allowed during this period. +Violating these terms may lead to a permanent ban. + +4. Permanent Ban +****************** + +**Community Impact**: Demonstrating a pattern of violation of community +standards, including sustained inappropriate behavior, harassment of an +individual, or aggression toward or disparagement of classes of individuals. + +**Consequence**: A permanent ban from any sort of public interaction within the +community. + +Attribution +----------- + +This Code of Conduct is adapted from the `Contributor Covenant `_. + +Community Impact Guidelines were inspired by `Mozilla's code of conduct enforcement ladder `_. + +For answers to common questions about this code of conduct, see the `FAQ `_. `Translations are available `_ From 04c9200447bba7ed273d99c3180c280ede555a21 Mon Sep 17 00:00:00 2001 From: Sam Andrello Date: Wed, 24 Jul 2024 12:36:13 -0400 Subject: [PATCH 047/104] Added LICENSE.rst --- LICENSE.rst | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 LICENSE.rst diff --git a/LICENSE.rst b/LICENSE.rst new file mode 100644 index 00000000..3949fdf0 --- /dev/null +++ b/LICENSE.rst @@ -0,0 +1,50 @@ +This program is part of the DiffPy and DANSE open-source projects +and is available subject to the conditions and terms laid out below. + +If you use this program to do productive scientific research that leads +to publication, we ask that you acknowledge use of the program by citing +the following paper in your publication: + + C. L. Farrow, P. Juhas, J. W. Liu, D. Bryndin, E. S. Bozin, + J. Bloch, Th. Proffen and S. J. L. Billinge, PDFfit2 and + PDFgui: computer programs for studying nanostructure in + crystals, J. Phys.: Condens. Matter 19, 335219 (2007) + +Copyright 2006-2007, Board of Trustees of Michigan State University, +Copyright 2008-2019, Board of Trustees of Columbia University in the +city of New York. (Copyright holder indicated in each source file). + +For more information please visit the project web-page: + http://www.diffpy.org/ +or email Prof. Simon Billinge at sb2896@columbia.edu + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + * Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY COPYRIGHT HOLDER "AS IS". COPYRIGHT HOLDER +EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES AND CONDITIONS, EITHER +EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY, TITLE, FITNESS, ADEQUACY OR SUITABILITY +FOR A PARTICULAR PURPOSE, AND ANY WARRANTIES OF FREEDOM FROM +INFRINGEMENT OF ANY DOMESTIC OR FOREIGN PATENT, COPYRIGHTS, TRADE +SECRETS OR OTHER PROPRIETARY RIGHTS OF ANY PARTY. IN NO EVENT SHALL +COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF +USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE OR RELATING TO THIS AGREEMENT, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. From 880acae5ceaa98db118c2b9d2a438979db1847d9 Mon Sep 17 00:00:00 2001 From: Sam Andrello Date: Wed, 24 Jul 2024 12:37:05 -0400 Subject: [PATCH 048/104] Added isort config --- .isort.cfg | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 .isort.cfg diff --git a/.isort.cfg b/.isort.cfg new file mode 100644 index 00000000..e0926f42 --- /dev/null +++ b/.isort.cfg @@ -0,0 +1,4 @@ +[settings] +line_length = 115 +multi_line_output = 3 +include_trailing_comma = True From a09972c36b33e7c7f88f664d11bb25db15f4142a Mon Sep 17 00:00:00 2001 From: Sam Andrello Date: Wed, 24 Jul 2024 12:41:46 -0400 Subject: [PATCH 049/104] Added news directory w/ template --- news/TEMPLATE.rst | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 news/TEMPLATE.rst diff --git a/news/TEMPLATE.rst b/news/TEMPLATE.rst new file mode 100644 index 00000000..790d30b1 --- /dev/null +++ b/news/TEMPLATE.rst @@ -0,0 +1,23 @@ +**Added:** + +* + +**Changed:** + +* + +**Deprecated:** + +* + +**Removed:** + +* + +**Fixed:** + +* + +**Security:** + +* From ee4dbba608bd6a8a1581a3f5857756987052a121 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 24 Jul 2024 16:56:44 +0000 Subject: [PATCH 050/104] [pre-commit.ci] auto fixes from pre-commit hooks --- AUTHORS.rst | 2 +- CHANGELOG.rst | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/AUTHORS.rst b/AUTHORS.rst index c7329e2f..8cae8521 100644 --- a/AUTHORS.rst +++ b/AUTHORS.rst @@ -65,4 +65,4 @@ Contributors ------------ For a list of contributors, visit -https://github.com/diffpy/diffpy.pdffit2/graphs/contributors \ No newline at end of file +https://github.com/diffpy/diffpy.pdffit2/graphs/contributors diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 843c40a4..55012a9d 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -23,4 +23,4 @@ Removed ======= Fixed -===== \ No newline at end of file +===== From 9fa82c95a8b5c03c66a68014286ade2613976a63 Mon Sep 17 00:00:00 2001 From: Sam Andrello Date: Wed, 24 Jul 2024 13:24:36 -0400 Subject: [PATCH 051/104] Move examples/ and devutils/ to src/ --- {devutils => src/devutils}/makesdist | 0 {examples => src/examples}/Ni-xray.gr | 0 {examples => src/examples}/Ni.stru | 0 {examples => src/examples}/Ni_calculation.py | 0 {examples => src/examples}/Ni_plot_pdf.py | 0 {examples => src/examples}/Ni_refinement.py | 0 6 files changed, 0 insertions(+), 0 deletions(-) rename {devutils => src/devutils}/makesdist (100%) rename {examples => src/examples}/Ni-xray.gr (100%) rename {examples => src/examples}/Ni.stru (100%) rename {examples => src/examples}/Ni_calculation.py (100%) rename {examples => src/examples}/Ni_plot_pdf.py (100%) rename {examples => src/examples}/Ni_refinement.py (100%) diff --git a/devutils/makesdist b/src/devutils/makesdist similarity index 100% rename from devutils/makesdist rename to src/devutils/makesdist diff --git a/examples/Ni-xray.gr b/src/examples/Ni-xray.gr similarity index 100% rename from examples/Ni-xray.gr rename to src/examples/Ni-xray.gr diff --git a/examples/Ni.stru b/src/examples/Ni.stru similarity index 100% rename from examples/Ni.stru rename to src/examples/Ni.stru diff --git a/examples/Ni_calculation.py b/src/examples/Ni_calculation.py similarity index 100% rename from examples/Ni_calculation.py rename to src/examples/Ni_calculation.py diff --git a/examples/Ni_plot_pdf.py b/src/examples/Ni_plot_pdf.py similarity index 100% rename from examples/Ni_plot_pdf.py rename to src/examples/Ni_plot_pdf.py diff --git a/examples/Ni_refinement.py b/src/examples/Ni_refinement.py similarity index 100% rename from examples/Ni_refinement.py rename to src/examples/Ni_refinement.py From a354607544fe7e7e5f22bc17660bd4922d4bb680 Mon Sep 17 00:00:00 2001 From: Sam Andrello Date: Wed, 24 Jul 2024 13:27:15 -0400 Subject: [PATCH 052/104] update codecov.yml --- .codecov.yml | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/.codecov.yml b/.codecov.yml index 86671410..505809d2 100644 --- a/.codecov.yml +++ b/.codecov.yml @@ -1,2 +1,37 @@ +# codecov can find this file anywhere in the repo, so we don't need to clutter +# the root folder. +#comment: false + fixes: - ".*/site-packages/::src/" + +codecov: + notify: + require_ci_to_pass: no + +coverage: + status: + patch: + default: + target: '70' + if_no_uploads: error + if_not_found: success + if_ci_failed: failure + project: + default: false + library: + target: auto + if_no_uploads: error + if_not_found: success + if_ci_failed: error + paths: '!*/tests/.*' + + tests: + target: 97.9% + paths: '*/tests/.*' + if_not_found: success + +flags: + tests: + paths: + - tests/ From 66d4eb94c84e687fb68b472cc037cd9eab55c29d Mon Sep 17 00:00:00 2001 From: Sam Andrello Date: Wed, 24 Jul 2024 13:27:36 -0400 Subject: [PATCH 053/104] update coveragerc --- .coveragerc | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/.coveragerc b/.coveragerc index d0a0d16d..e20b9438 100644 --- a/.coveragerc +++ b/.coveragerc @@ -1,6 +1,16 @@ -# Configuration of the coverage.py tool for reporting test coverage. - +[run] +source = + diffpy.pdffit2 +omit = + ## exclude debug.py from codecov report + */tests/debug.py [report] +omit = + */python?.?/* + */site-packages/nose/* + # ignore _version.py and versioneer.py + .*version.* + *_version.py # RE patterns for lines to be excluded from consideration. exclude_lines = ## Have to re-enable the standard pragma @@ -13,10 +23,4 @@ exclude_lines = ## Don't complain if non-runnable code isn't run: ^[ ]*@unittest.skip\b ^[ ]{4}unittest.main() - if __name__ == .__main__.: - - -[run] -omit = - ## exclude debug.py from codecov report - */tests/debug.py + if __name__ == '__main__': From 9ad618b9ffaddb15a0ff2f38d7d0b0a4082572a8 Mon Sep 17 00:00:00 2001 From: Sam Andrello Date: Wed, 24 Jul 2024 13:45:40 -0400 Subject: [PATCH 054/104] update MANIFEST.in --- MANIFEST.in | 32 ++++++++++++++++++++------------ 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/MANIFEST.in b/MANIFEST.in index 1b41a5df..68709887 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,20 +1,28 @@ -recursive-include diffpy * -recursive-exclude diffpy *.py[co] *.so -recursive-include libpdffit2 *.[ch]* -recursive-include pdffit2module *.[ch]* -recursive-include examples * -include AUTHORS.txt LICENSE*.txt README* -include Makefile -prune libpdffit2/tests +recursive-include src/diffpy * +recursive-exclude src/diffpy *.py[co] *.so +recursive-include docs *.rst conf.py Makefile make.bat + +recursive-include src/extensions/libpdffit2 *.[ch]* +recursive-include src/extensions/pdffit2module *.[ch]* +recursive-include src/examples * +include AUTHORS.rst +include diffpy.pdffit2/version.py +include LICENSE.rst +include README.rst +include requirements/ +prune src/extensions/libpdffit2/tests global-exclude .gitattributes .gitignore .gitarchive.cfg global-exclude .DS_Store +recursive-exclude * __pycache__ +recursive-exclude * *.py[co] + +# If including data files in the package, add them like: +# include path/to/data_file # Avoid user content in setup.cfg to make distribution reproducible. exclude setup.cfg # Exclude git-tracked files spuriously added by setuptools_scm exclude .coveragerc -exclude .travis* -prune conda-recipe -prune devutils -prune doc +prune src/devutils +prune doc \ No newline at end of file From b8e6a4d0d5c346643a430f7f47780be7f2407e58 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 24 Jul 2024 17:45:50 +0000 Subject: [PATCH 055/104] [pre-commit.ci] auto fixes from pre-commit hooks --- MANIFEST.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MANIFEST.in b/MANIFEST.in index 68709887..3089ae64 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -25,4 +25,4 @@ exclude setup.cfg # Exclude git-tracked files spuriously added by setuptools_scm exclude .coveragerc prune src/devutils -prune doc \ No newline at end of file +prune doc From 93107b1f18c58717556953e1a8c78f374115891d Mon Sep 17 00:00:00 2001 From: Sam Andrello Date: Wed, 24 Jul 2024 13:50:40 -0400 Subject: [PATCH 056/104] remove "-e" from pip installation - fixed with MANIFEST.in change --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 73a63006..00f20efe 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -44,7 +44,7 @@ jobs: conda activate test conda install --file requirements/run.txt conda install --file requirements/test.txt - pip install -e . + pip install . - name: Validate diffpy.pdffit2 shell: bash -l {0} run: | From 8337426df40d59b0286cdb2ec70e915171f54d64 Mon Sep 17 00:00:00 2001 From: Sam Andrello Date: Wed, 24 Jul 2024 15:09:48 -0400 Subject: [PATCH 057/104] move makesdist to main repo dir to match diffpy.utils --- {src/devutils => devutils}/makesdist | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {src/devutils => devutils}/makesdist (100%) diff --git a/src/devutils/makesdist b/devutils/makesdist similarity index 100% rename from src/devutils/makesdist rename to devutils/makesdist From bcb722cd8229ecc7f178ac90707f8c0847b6b374 Mon Sep 17 00:00:00 2001 From: Sam Andrello Date: Wed, 24 Jul 2024 15:10:34 -0400 Subject: [PATCH 058/104] MANIFEST.in devuitls fix --- MANIFEST.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MANIFEST.in b/MANIFEST.in index 3089ae64..9902cd57 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -24,5 +24,5 @@ exclude setup.cfg # Exclude git-tracked files spuriously added by setuptools_scm exclude .coveragerc -prune src/devutils +prune devutils prune doc From 13c21502b41ead898a5b44bd13b2c042744ea2a6 Mon Sep 17 00:00:00 2001 From: Simon Billinge Date: Thu, 25 Jul 2024 01:22:48 -0400 Subject: [PATCH 059/104] Update AUTHORS.rst --- AUTHORS.rst | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/AUTHORS.rst b/AUTHORS.rst index 8cae8521..d6679278 100644 --- a/AUTHORS.rst +++ b/AUTHORS.rst @@ -13,23 +13,12 @@ python modules for structure investigations from diffraction data. The DiffPy team is located in the Billinge-group at the Applied Physics and Applied Mathematics Department of the Columbia University in New York. -Currently the team consists of +Previous significant contributors to this code were - Simon Billinge + Pavol Juhas, Chris Farrow, Jacques Bloch, Wenduo Zhou - Pavol Juhas - - Chris Farrow - - Emil Bozin - - Wenduo Zhou - - Peng Tian - - Timur Dykhne - -Please see the header of each source file for a detailed list of +Please see the github contributions and the header of each source file +for a detailed list of contributors. This is an open-source project and we hope and expect that the list of contributors will expand with time. Many thanks to all current and future contributors! From b52e7b442a512e90309783ec9a85b2d308d4864a Mon Sep 17 00:00:00 2001 From: Simon Billinge Date: Thu, 25 Jul 2024 01:24:11 -0400 Subject: [PATCH 060/104] columbia copyright updated to 2024 --- LICENSE.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LICENSE.rst b/LICENSE.rst index 3949fdf0..9618d51a 100644 --- a/LICENSE.rst +++ b/LICENSE.rst @@ -11,7 +11,7 @@ the following paper in your publication: crystals, J. Phys.: Condens. Matter 19, 335219 (2007) Copyright 2006-2007, Board of Trustees of Michigan State University, -Copyright 2008-2019, Board of Trustees of Columbia University in the +Copyright 2008-2024, Board of Trustees of Columbia University in the city of New York. (Copyright holder indicated in each source file). For more information please visit the project web-page: From 7750f1a6a8196168e528cfdc9cbb121adc07e9cb Mon Sep 17 00:00:00 2001 From: Sam Andrello Date: Thu, 25 Jul 2024 11:41:46 -0400 Subject: [PATCH 061/104] Move examples/ to doc/ --- {src => doc}/examples/Ni-xray.gr | 0 {src => doc}/examples/Ni.stru | 0 {src => doc}/examples/Ni_calculation.py | 0 {src => doc}/examples/Ni_plot_pdf.py | 0 {src => doc}/examples/Ni_refinement.py | 0 5 files changed, 0 insertions(+), 0 deletions(-) rename {src => doc}/examples/Ni-xray.gr (100%) rename {src => doc}/examples/Ni.stru (100%) rename {src => doc}/examples/Ni_calculation.py (100%) rename {src => doc}/examples/Ni_plot_pdf.py (100%) rename {src => doc}/examples/Ni_refinement.py (100%) diff --git a/src/examples/Ni-xray.gr b/doc/examples/Ni-xray.gr similarity index 100% rename from src/examples/Ni-xray.gr rename to doc/examples/Ni-xray.gr diff --git a/src/examples/Ni.stru b/doc/examples/Ni.stru similarity index 100% rename from src/examples/Ni.stru rename to doc/examples/Ni.stru diff --git a/src/examples/Ni_calculation.py b/doc/examples/Ni_calculation.py similarity index 100% rename from src/examples/Ni_calculation.py rename to doc/examples/Ni_calculation.py diff --git a/src/examples/Ni_plot_pdf.py b/doc/examples/Ni_plot_pdf.py similarity index 100% rename from src/examples/Ni_plot_pdf.py rename to doc/examples/Ni_plot_pdf.py diff --git a/src/examples/Ni_refinement.py b/doc/examples/Ni_refinement.py similarity index 100% rename from src/examples/Ni_refinement.py rename to doc/examples/Ni_refinement.py From 350600044634e044668c5619cd67d60a31bc1a64 Mon Sep 17 00:00:00 2001 From: Sam Andrello Date: Thu, 25 Jul 2024 11:43:54 -0400 Subject: [PATCH 062/104] Removed .idea directory --- .idea/.gitignore | 8 -------- 1 file changed, 8 deletions(-) delete mode 100644 .idea/.gitignore diff --git a/.idea/.gitignore b/.idea/.gitignore deleted file mode 100644 index 13566b81..00000000 --- a/.idea/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -# Default ignored files -/shelf/ -/workspace.xml -# Editor-based HTTP Client requests -/httpRequests/ -# Datasource local storage ignored files -/dataSources/ -/dataSources.local.xml From 305c32515c814514be5a5b61b4c504de8b550f0b Mon Sep 17 00:00:00 2001 From: Sam Andrello Date: Thu, 25 Jul 2024 11:44:22 -0400 Subject: [PATCH 063/104] Removed build.yaml --- .github/workflows/build.yaml | 67 ------------------------------------ 1 file changed, 67 deletions(-) delete mode 100644 .github/workflows/build.yaml diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml deleted file mode 100644 index 9f8369e5..00000000 --- a/.github/workflows/build.yaml +++ /dev/null @@ -1,67 +0,0 @@ -name: build and upload - -on: - push: - branches: - - main - pull_request: - branches: - - main - -jobs: - build: - strategy: - max-parallel: 4 - matrix: - python-version: ['3.8', '3.9', '3.10', '3.11', '3.12'] - os: [ubuntu-latest, macos-latest, windows-latest] - - runs-on: ${{ matrix.os }} - steps: - - name: Check-out repository - uses: actions/checkout@v2 - - - name: set up conda - uses: s-weigand/setup-conda@v1 - with: - update-conda: true - python-version: ${{ matrix.python-version }} - - - name: Install dependencies - run: | - conda install -c conda-forge twine - conda install -c conda-forge wheel - conda install -c conda-forge setuptools - conda install -c conda-forge pip - conda install -c conda-forge gsl - - - name: Build wheels - run: | - python setup.py sdist bdist_wheel - - - name: Run tests - run: | - conda install -c conda-forge numpy - python setup.py install - python conda-recipe/run_test.py - - - name: Upload Artifacts GitHub releases - uses: ncipollo/release-action@v1 - with: - draft: false - prerelease: true - allowUpdates: true - replacesArtifacts: true - token: ${{ secrets.GITHUB_TOKEN }} - artifacts: ${{ github.workspace }}/dist/*.whl - tag: 1.4.1 - body: This is an alpha build of the pdffit2 library (1.4.2) - - # This step will upload tagged commits to pypi. - # The pypi token must be added to GH secrets - # - # - name: Publish package - # if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') - # uses: pypa/gh-action-pypi-publish@release/v1 - # with: - # password: ${{ secrets.PYPI_API_TOKEN }} From de29675a757a507186d0e4ff3f98b17a61362a59 Mon Sep 17 00:00:00 2001 From: Sam Andrello Date: Thu, 25 Jul 2024 11:44:34 -0400 Subject: [PATCH 064/104] Removed travis.yml --- .travis.yml | 108 ---------------------------------------------------- 1 file changed, 108 deletions(-) delete mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index d5979526..00000000 --- a/.travis.yml +++ /dev/null @@ -1,108 +0,0 @@ -dist: xenial -language: generic - -os: - - linux - - osx - -env: - - MYUSEMC=true MYPYTHON_VERSION=2.7 - - MYUSEMC=true MYPYTHON_VERSION=3.7 - - MYUSEMC=true MYPYTHON_VERSION=3.8 - - MYUSEMC=true MYPYTHON_VERSION=3.9 - - MYUSEMC=true MYPYTHON_VERSION=3.10 - - MYUSEMC=true MYPYTHON_VERSION=3.11 - - MYUSEMC=true MYPYTHON_VERSION=3.12 - - MYUSEMC=false - -matrix: - exclude: - - os: osx - env: MYUSEMC=false - -git: - depth: 999999 - -branches: - except: - - /^v[0-9]/ - - -before_install: - - MYNAME=diffpy.pdffit2 - - MYCOMMIT="$(git rev-parse HEAD)" - - umask 022 - - git fetch origin --tags - - if ${MYUSEMC}; then - NOAPT=true; NOMC=false; - else - NOAPT=false; NOMC=true; - MYPIPFLAGS="--user"; - fi - - MYMCREPO=https://repo.anaconda.com/miniconda - - case ${TRAVIS_OS_NAME} in - linux) - MYMCBUNDLE=Miniconda3-latest-Linux-x86_64.sh ;; - osx) - MYMCBUNDLE=Miniconda3-latest-MacOSX-x86_64.sh ;; - *) - echo "Unsupported operating system." >&2; - exit 2 ;; - esac - - MYRUNDIR=${PWD}/build/rundir - - - mkdir -p ~/pkgs - - mkdir -p ${MYRUNDIR} - - cp .coveragerc ${MYRUNDIR}/ - - - $NOMC || pushd ~/pkgs - - $NOMC || wget --timestamping ${MYMCREPO}/${MYMCBUNDLE} - - $NOMC || test -x ~/mc/bin/conda || bash ${MYMCBUNDLE} -b -f -p ~/mc - - $NOMC || popd - - $NOMC || source ~/mc/bin/activate base - - $NOMC || conda update --yes conda - - $NOMC || conda install --yes conda-build conda-verify jinja2 - # avoid warnings from setup.py - - $NOMC || conda install --yes gsl - - $NOMC || conda create --name=testenv --yes python=${MYPYTHON_VERSION} coverage - - $NOMC || conda config --add channels diffpy - - - $NOAPT || test "${TRAVIS_OS_NAME}" = "linux" || exit $? - - $NOAPT || PATH="$(echo "$PATH" | sed 's,:/opt/pyenv/[^:]*,,g')" - - $NOAPT || test "$(which python)" = "/usr/bin/python" || ( - which python; exit 1) - - $NOAPT || sudo apt-get update -qq - - $NOAPT || sudo apt-get install -y - build-essential libgsl0-dev python-dev - python-numpy python-setuptools python-pip - - $NOAPT || devutils/makesdist - - $NOAPT || MYTARBUNDLE="$(ls -t "${PWD}"/dist/*.tar.gz | head -1)" - - -install: - - $NOMC || conda build --python=${MYPYTHON_VERSION} conda-recipe - - $NOMC || conda render --python=${MYPYTHON_VERSION} --output conda-recipe | - sed 's,.*/,,; s/[.]tar[.]bz2$//; s/-/=/g' > /tmp/mypackage.txt - - $NOMC || source activate testenv - - $NOMC || conda install --yes --use-local --file=/tmp/mypackage.txt - - - $NOAPT || pip install $MYPIPFLAGS coverage - # TODO - restore pip install once it works. - # - $NOAPT || pip install $MYPIPFLAGS "${MYTARBUNDLE}" - - $NOAPT || easy_install --user "${MYTARBUNDLE}" - - - cd ${MYRUNDIR} - - MYGIT_REV=$(python -c "import ${MYNAME}.version as v; print(v.__git_commit__)") - - if [[ "${MYCOMMIT}" != "${MYGIT_REV}" ]]; then - echo "Version mismatch ${MYCOMMIT} vs ${MYGIT_REV}."; - exit 1; - fi - - -script: - - coverage run --source ${MYNAME} -m ${MYNAME}.tests.rundeps - - -after_success: - - pip install $MYPIPFLAGS codecov - - codecov From b51f396376c53fe99d7edd21a8055207343a7186 Mon Sep 17 00:00:00 2001 From: Sam Andrello Date: Thu, 25 Jul 2024 11:44:47 -0400 Subject: [PATCH 065/104] Removed AUTHORS.txt --- AUTHORS.txt | 47 ----------------------------------------------- 1 file changed, 47 deletions(-) delete mode 100644 AUTHORS.txt diff --git a/AUTHORS.txt b/AUTHORS.txt deleted file mode 100644 index 2c1d7f81..00000000 --- a/AUTHORS.txt +++ /dev/null @@ -1,47 +0,0 @@ -This code was derived from the first PDFFIT program by Thomas Proffen. -The sources were converted to C++ by Jacques Bloch and then extensively hacked, -extended and purged from most glaring bugs by Chris Farrow and Pavol Juhas. -This code is currently maintained as part of the DiffPy project to create -python modules for structure investigations from diffraction data. - -The DiffPy team is located in the Billinge-group at the Applied Physics -and Applied Mathematics Department of the Columbia University in New York. -Currently the team consists of - - Simon Billinge - Pavol Juhas - Chris Farrow - Emil Bozin - Wenduo Zhou - Peng Tian - Timur Dykhne - -Please see the header of each source file for a detailed list of -contributors. This is an open-source project and we hope and expect -that the list of contributors will expand with time. Many thanks to -all current and future contributors! - -For more information on the DiffPy project email sb2896@columbia.edu - -DiffPy was initiated as part of the Distributed Data Analysis of Neutron -Scattering Experiments (DANSE) project, funded by the National Science -Foundation under grant DMR-0520547. More information on DANSE can be -found at http://danse.us. Any opinions, findings, and conclusions or -recommendations expressed in this material are those of the author(s) -and do not necessarily reflect the views of the NSF. - -Acknowledgments: - -We are truly grateful to all the people who have contributed, in all -different ways, to this project: Thomas Proffen, Xiangyun Qiu, Pete -Peterson and Jacques Bloch, previous Billinge-group members whose -contributions to the codes are living well beyond their affiliation with -the group; The hard working DANSE group at Caltech, University of -Maryland, Iowa State and University of Tennessee, especially Brent Fultz -for doggedly putting DANSE all together and Michael Aivazis, and the -indomitable Mike McKerns for their design input and MM's gargantuan -excel spreadsheets; The former members of the Billinge-group members, -especially HyunJeong Kim and Ahmad Masadeh for enthusiastic testing and -feature requests; Last but not least, our long suffering family members, -and the whole coffee and tea industries at large, without whom none of -this would have been possible. From 3f0bcc2d7e2441e45ca1df8b3f931dcc8d6615b8 Mon Sep 17 00:00:00 2001 From: Sam Andrello Date: Thu, 25 Jul 2024 11:45:00 -0400 Subject: [PATCH 066/104] Removed CHANGELOG.md --- CHANGELOG.md | 17 ----------------- 1 file changed, 17 deletions(-) delete mode 100644 CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md deleted file mode 100644 index b101ecc6..00000000 --- a/CHANGELOG.md +++ /dev/null @@ -1,17 +0,0 @@ -# Release notes - -No notable functional changes from 1.4.1 - -## Version 1.4.2 – 2023-12-09 - -### Added - -- Support for Python 3.11, 3.12 - -### Changed - -### Deprecated - -### Removed - -### Fixed From 9daab27c10b92b54f21e84eb517550d98b847ce7 Mon Sep 17 00:00:00 2001 From: Sam Andrello Date: Thu, 25 Jul 2024 11:45:13 -0400 Subject: [PATCH 067/104] Removed LICENSE.txt --- LICENSE.txt | 50 -------------------------------------------------- 1 file changed, 50 deletions(-) delete mode 100644 LICENSE.txt diff --git a/LICENSE.txt b/LICENSE.txt deleted file mode 100644 index 3949fdf0..00000000 --- a/LICENSE.txt +++ /dev/null @@ -1,50 +0,0 @@ -This program is part of the DiffPy and DANSE open-source projects -and is available subject to the conditions and terms laid out below. - -If you use this program to do productive scientific research that leads -to publication, we ask that you acknowledge use of the program by citing -the following paper in your publication: - - C. L. Farrow, P. Juhas, J. W. Liu, D. Bryndin, E. S. Bozin, - J. Bloch, Th. Proffen and S. J. L. Billinge, PDFfit2 and - PDFgui: computer programs for studying nanostructure in - crystals, J. Phys.: Condens. Matter 19, 335219 (2007) - -Copyright 2006-2007, Board of Trustees of Michigan State University, -Copyright 2008-2019, Board of Trustees of Columbia University in the -city of New York. (Copyright holder indicated in each source file). - -For more information please visit the project web-page: - http://www.diffpy.org/ -or email Prof. Simon Billinge at sb2896@columbia.edu - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - - * Neither the name of the copyright holder nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY COPYRIGHT HOLDER "AS IS". COPYRIGHT HOLDER -EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES AND CONDITIONS, EITHER -EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY, TITLE, FITNESS, ADEQUACY OR SUITABILITY -FOR A PARTICULAR PURPOSE, AND ANY WARRANTIES OF FREEDOM FROM -INFRINGEMENT OF ANY DOMESTIC OR FOREIGN PATENT, COPYRIGHTS, TRADE -SECRETS OR OTHER PROPRIETARY RIGHTS OF ANY PARTY. IN NO EVENT SHALL -COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF -USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE OR RELATING TO THIS AGREEMENT, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. From b00d64b3f65fda72e59596edee0781f865d04714 Mon Sep 17 00:00:00 2001 From: Simon Billinge Date: Fri, 26 Jul 2024 02:52:58 -0400 Subject: [PATCH 068/104] news --- news/news.rst | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 news/news.rst diff --git a/news/news.rst b/news/news.rst new file mode 100644 index 00000000..e9bf5d01 --- /dev/null +++ b/news/news.rst @@ -0,0 +1,24 @@ +**Added:** + +* + +**Changed:** + +* + +**Deprecated:** + +* + +**Removed:** + +* + +**Fixed:** + +* Code linted to group flake8 standards +* Package structure moved to diffpy standard structure + +**Security:** + +* From 50c92e51d459948826c3ce67bf7c00a6264af23a Mon Sep 17 00:00:00 2001 From: Simon Billinge Date: Fri, 26 Jul 2024 02:54:28 -0400 Subject: [PATCH 069/104] remove travis badge --- README.rst | 2 -- 1 file changed, 2 deletions(-) diff --git a/README.rst b/README.rst index bef2a4ce..6bc9518f 100644 --- a/README.rst +++ b/README.rst @@ -1,5 +1,3 @@ -.. image:: https://travis-ci.org/diffpy/diffpy.pdffit2.svg?branch=master - :target: https://travis-ci.org/diffpy/diffpy.pdffit2 .. image:: https://codecov.io/gh/diffpy/diffpy.pdffit2/branch/master/graph/badge.svg :target: https://codecov.io/gh/diffpy/diffpy.pdffit2 From 04bfea045f4a3911d26a5a714501fe007df23576 Mon Sep 17 00:00:00 2001 From: Sam Andrello Date: Fri, 26 Jul 2024 12:19:26 -0400 Subject: [PATCH 070/104] run auto_api - build API --- .../api/diffpy.pdffit2..git.branches.rst | 10 +++++ doc/source/api/diffpy.pdffit2..git.hooks.rst | 10 +++++ doc/source/api/diffpy.pdffit2..git.info.rst | 10 +++++ .../diffpy.pdffit2..git.logs.refs.heads.rst | 10 +++++ ....pdffit2..git.logs.refs.remotes.origin.rst | 10 +++++ .../diffpy.pdffit2..git.logs.refs.remotes.rst | 18 +++++++++ .../api/diffpy.pdffit2..git.logs.refs.rst | 19 ++++++++++ doc/source/api/diffpy.pdffit2..git.logs.rst | 18 +++++++++ .../api/diffpy.pdffit2..git.objects.info.rst | 10 +++++ .../api/diffpy.pdffit2..git.objects.pack.rst | 10 +++++ .../api/diffpy.pdffit2..git.objects.rst | 19 ++++++++++ .../api/diffpy.pdffit2..git.refs.heads.rst | 10 +++++ ...iffpy.pdffit2..git.refs.remotes.origin.rst | 10 +++++ .../api/diffpy.pdffit2..git.refs.remotes.rst | 18 +++++++++ doc/source/api/diffpy.pdffit2..git.refs.rst | 20 ++++++++++ .../api/diffpy.pdffit2..git.refs.tags.rst | 10 +++++ doc/source/api/diffpy.pdffit2..git.rst | 23 ++++++++++++ doc/source/api/diffpy.pdffit2..github.rst | 18 +++++++++ .../api/diffpy.pdffit2..github.workflows.rst | 10 +++++ ...iffpy.pdffit2..idea.inspectionProfiles.rst | 10 +++++ doc/source/api/diffpy.pdffit2..idea.rst | 18 +++++++++ .../api/diffpy.pdffit2.conda-recipe.rst | 21 +++++++++++ doc/source/api/diffpy.pdffit2.devutils.rst | 10 +++++ doc/source/api/diffpy.pdffit2.dist.rst | 10 +++++ doc/source/api/diffpy.pdffit2.doc.epydoc.rst | 10 +++++ .../api/diffpy.pdffit2.doc.examples.rst | 37 +++++++++++++++++++ doc/source/api/diffpy.pdffit2.doc.rst | 20 ++++++++++ .../api/diffpy.pdffit2.doc.source._static.rst | 10 +++++ .../api/diffpy.pdffit2.doc.source.api.rst | 10 +++++ .../api/diffpy.pdffit2.doc.source.epydoc.rst | 10 +++++ doc/source/api/diffpy.pdffit2.doc.source.rst | 31 ++++++++++++++++ .../api/diffpy.pdffit2.example_package.rst | 31 ---------------- doc/source/api/diffpy.pdffit2.news.rst | 10 +++++ .../api/diffpy.pdffit2.requirements.rst | 10 +++++ doc/source/api/diffpy.pdffit2.rst | 28 +++++++++----- ...py.pdffit2.src.diffpy.pdffit2.egg-info.rst | 10 +++++ .../api/diffpy.pdffit2.src.diffpy.pdffit2.rst | 37 +++++++++++++++++++ doc/source/api/diffpy.pdffit2.src.diffpy.rst | 18 +++++++++ ...ffpy.pdffit2.src.extensions.libpdffit2.rst | 10 +++++ ...y.pdffit2.src.extensions.pdffit2module.rst | 10 +++++ .../api/diffpy.pdffit2.src.extensions.rst | 19 ++++++++++ doc/source/api/diffpy.pdffit2.src.rst | 20 ++++++++++ 42 files changed, 622 insertions(+), 41 deletions(-) create mode 100644 doc/source/api/diffpy.pdffit2..git.branches.rst create mode 100644 doc/source/api/diffpy.pdffit2..git.hooks.rst create mode 100644 doc/source/api/diffpy.pdffit2..git.info.rst create mode 100644 doc/source/api/diffpy.pdffit2..git.logs.refs.heads.rst create mode 100644 doc/source/api/diffpy.pdffit2..git.logs.refs.remotes.origin.rst create mode 100644 doc/source/api/diffpy.pdffit2..git.logs.refs.remotes.rst create mode 100644 doc/source/api/diffpy.pdffit2..git.logs.refs.rst create mode 100644 doc/source/api/diffpy.pdffit2..git.logs.rst create mode 100644 doc/source/api/diffpy.pdffit2..git.objects.info.rst create mode 100644 doc/source/api/diffpy.pdffit2..git.objects.pack.rst create mode 100644 doc/source/api/diffpy.pdffit2..git.objects.rst create mode 100644 doc/source/api/diffpy.pdffit2..git.refs.heads.rst create mode 100644 doc/source/api/diffpy.pdffit2..git.refs.remotes.origin.rst create mode 100644 doc/source/api/diffpy.pdffit2..git.refs.remotes.rst create mode 100644 doc/source/api/diffpy.pdffit2..git.refs.rst create mode 100644 doc/source/api/diffpy.pdffit2..git.refs.tags.rst create mode 100644 doc/source/api/diffpy.pdffit2..git.rst create mode 100644 doc/source/api/diffpy.pdffit2..github.rst create mode 100644 doc/source/api/diffpy.pdffit2..github.workflows.rst create mode 100644 doc/source/api/diffpy.pdffit2..idea.inspectionProfiles.rst create mode 100644 doc/source/api/diffpy.pdffit2..idea.rst create mode 100644 doc/source/api/diffpy.pdffit2.conda-recipe.rst create mode 100644 doc/source/api/diffpy.pdffit2.devutils.rst create mode 100644 doc/source/api/diffpy.pdffit2.dist.rst create mode 100644 doc/source/api/diffpy.pdffit2.doc.epydoc.rst create mode 100644 doc/source/api/diffpy.pdffit2.doc.examples.rst create mode 100644 doc/source/api/diffpy.pdffit2.doc.rst create mode 100644 doc/source/api/diffpy.pdffit2.doc.source._static.rst create mode 100644 doc/source/api/diffpy.pdffit2.doc.source.api.rst create mode 100644 doc/source/api/diffpy.pdffit2.doc.source.epydoc.rst create mode 100644 doc/source/api/diffpy.pdffit2.doc.source.rst delete mode 100644 doc/source/api/diffpy.pdffit2.example_package.rst create mode 100644 doc/source/api/diffpy.pdffit2.news.rst create mode 100644 doc/source/api/diffpy.pdffit2.requirements.rst create mode 100644 doc/source/api/diffpy.pdffit2.src.diffpy.pdffit2.egg-info.rst create mode 100644 doc/source/api/diffpy.pdffit2.src.diffpy.pdffit2.rst create mode 100644 doc/source/api/diffpy.pdffit2.src.diffpy.rst create mode 100644 doc/source/api/diffpy.pdffit2.src.extensions.libpdffit2.rst create mode 100644 doc/source/api/diffpy.pdffit2.src.extensions.pdffit2module.rst create mode 100644 doc/source/api/diffpy.pdffit2.src.extensions.rst create mode 100644 doc/source/api/diffpy.pdffit2.src.rst diff --git a/doc/source/api/diffpy.pdffit2..git.branches.rst b/doc/source/api/diffpy.pdffit2..git.branches.rst new file mode 100644 index 00000000..e448ee3b --- /dev/null +++ b/doc/source/api/diffpy.pdffit2..git.branches.rst @@ -0,0 +1,10 @@ +:tocdepth: -1 + +diffpy.pdffit2..git.branches package +==================================== + +.. automodule:: diffpy.pdffit2..git.branches + :members: + :undoc-members: + :show-inheritance: + diff --git a/doc/source/api/diffpy.pdffit2..git.hooks.rst b/doc/source/api/diffpy.pdffit2..git.hooks.rst new file mode 100644 index 00000000..21156bde --- /dev/null +++ b/doc/source/api/diffpy.pdffit2..git.hooks.rst @@ -0,0 +1,10 @@ +:tocdepth: -1 + +diffpy.pdffit2..git.hooks package +================================= + +.. automodule:: diffpy.pdffit2..git.hooks + :members: + :undoc-members: + :show-inheritance: + diff --git a/doc/source/api/diffpy.pdffit2..git.info.rst b/doc/source/api/diffpy.pdffit2..git.info.rst new file mode 100644 index 00000000..6af4f94a --- /dev/null +++ b/doc/source/api/diffpy.pdffit2..git.info.rst @@ -0,0 +1,10 @@ +:tocdepth: -1 + +diffpy.pdffit2..git.info package +================================ + +.. automodule:: diffpy.pdffit2..git.info + :members: + :undoc-members: + :show-inheritance: + diff --git a/doc/source/api/diffpy.pdffit2..git.logs.refs.heads.rst b/doc/source/api/diffpy.pdffit2..git.logs.refs.heads.rst new file mode 100644 index 00000000..1f33cefe --- /dev/null +++ b/doc/source/api/diffpy.pdffit2..git.logs.refs.heads.rst @@ -0,0 +1,10 @@ +:tocdepth: -1 + +diffpy.pdffit2..git.logs.refs.heads package +=========================================== + +.. automodule:: diffpy.pdffit2..git.logs.refs.heads + :members: + :undoc-members: + :show-inheritance: + diff --git a/doc/source/api/diffpy.pdffit2..git.logs.refs.remotes.origin.rst b/doc/source/api/diffpy.pdffit2..git.logs.refs.remotes.origin.rst new file mode 100644 index 00000000..3d46f4d2 --- /dev/null +++ b/doc/source/api/diffpy.pdffit2..git.logs.refs.remotes.origin.rst @@ -0,0 +1,10 @@ +:tocdepth: -1 + +diffpy.pdffit2..git.logs.refs.remotes.origin package +==================================================== + +.. automodule:: diffpy.pdffit2..git.logs.refs.remotes.origin + :members: + :undoc-members: + :show-inheritance: + diff --git a/doc/source/api/diffpy.pdffit2..git.logs.refs.remotes.rst b/doc/source/api/diffpy.pdffit2..git.logs.refs.remotes.rst new file mode 100644 index 00000000..c6b1133a --- /dev/null +++ b/doc/source/api/diffpy.pdffit2..git.logs.refs.remotes.rst @@ -0,0 +1,18 @@ +:tocdepth: -1 + +diffpy.pdffit2..git.logs.refs.remotes package +============================================= + +.. automodule:: diffpy.pdffit2..git.logs.refs.remotes + :members: + :undoc-members: + :show-inheritance: + +Subpackages +----------- + +.. toctree:: + :titlesonly: + + diffpy.pdffit2..git.logs.refs.remotes.origin + diff --git a/doc/source/api/diffpy.pdffit2..git.logs.refs.rst b/doc/source/api/diffpy.pdffit2..git.logs.refs.rst new file mode 100644 index 00000000..f3f52bb6 --- /dev/null +++ b/doc/source/api/diffpy.pdffit2..git.logs.refs.rst @@ -0,0 +1,19 @@ +:tocdepth: -1 + +diffpy.pdffit2..git.logs.refs package +===================================== + +.. automodule:: diffpy.pdffit2..git.logs.refs + :members: + :undoc-members: + :show-inheritance: + +Subpackages +----------- + +.. toctree:: + :titlesonly: + + diffpy.pdffit2..git.logs.refs.remotes + diffpy.pdffit2..git.logs.refs.heads + diff --git a/doc/source/api/diffpy.pdffit2..git.logs.rst b/doc/source/api/diffpy.pdffit2..git.logs.rst new file mode 100644 index 00000000..b0a95a07 --- /dev/null +++ b/doc/source/api/diffpy.pdffit2..git.logs.rst @@ -0,0 +1,18 @@ +:tocdepth: -1 + +diffpy.pdffit2..git.logs package +================================ + +.. automodule:: diffpy.pdffit2..git.logs + :members: + :undoc-members: + :show-inheritance: + +Subpackages +----------- + +.. toctree:: + :titlesonly: + + diffpy.pdffit2..git.logs.refs + diff --git a/doc/source/api/diffpy.pdffit2..git.objects.info.rst b/doc/source/api/diffpy.pdffit2..git.objects.info.rst new file mode 100644 index 00000000..e0d5cfd8 --- /dev/null +++ b/doc/source/api/diffpy.pdffit2..git.objects.info.rst @@ -0,0 +1,10 @@ +:tocdepth: -1 + +diffpy.pdffit2..git.objects.info package +======================================== + +.. automodule:: diffpy.pdffit2..git.objects.info + :members: + :undoc-members: + :show-inheritance: + diff --git a/doc/source/api/diffpy.pdffit2..git.objects.pack.rst b/doc/source/api/diffpy.pdffit2..git.objects.pack.rst new file mode 100644 index 00000000..e499b2ef --- /dev/null +++ b/doc/source/api/diffpy.pdffit2..git.objects.pack.rst @@ -0,0 +1,10 @@ +:tocdepth: -1 + +diffpy.pdffit2..git.objects.pack package +======================================== + +.. automodule:: diffpy.pdffit2..git.objects.pack + :members: + :undoc-members: + :show-inheritance: + diff --git a/doc/source/api/diffpy.pdffit2..git.objects.rst b/doc/source/api/diffpy.pdffit2..git.objects.rst new file mode 100644 index 00000000..51819b09 --- /dev/null +++ b/doc/source/api/diffpy.pdffit2..git.objects.rst @@ -0,0 +1,19 @@ +:tocdepth: -1 + +diffpy.pdffit2..git.objects package +=================================== + +.. automodule:: diffpy.pdffit2..git.objects + :members: + :undoc-members: + :show-inheritance: + +Subpackages +----------- + +.. toctree:: + :titlesonly: + + diffpy.pdffit2..git.objects.info + diffpy.pdffit2..git.objects.pack + diff --git a/doc/source/api/diffpy.pdffit2..git.refs.heads.rst b/doc/source/api/diffpy.pdffit2..git.refs.heads.rst new file mode 100644 index 00000000..355dce1d --- /dev/null +++ b/doc/source/api/diffpy.pdffit2..git.refs.heads.rst @@ -0,0 +1,10 @@ +:tocdepth: -1 + +diffpy.pdffit2..git.refs.heads package +====================================== + +.. automodule:: diffpy.pdffit2..git.refs.heads + :members: + :undoc-members: + :show-inheritance: + diff --git a/doc/source/api/diffpy.pdffit2..git.refs.remotes.origin.rst b/doc/source/api/diffpy.pdffit2..git.refs.remotes.origin.rst new file mode 100644 index 00000000..9c8826ef --- /dev/null +++ b/doc/source/api/diffpy.pdffit2..git.refs.remotes.origin.rst @@ -0,0 +1,10 @@ +:tocdepth: -1 + +diffpy.pdffit2..git.refs.remotes.origin package +=============================================== + +.. automodule:: diffpy.pdffit2..git.refs.remotes.origin + :members: + :undoc-members: + :show-inheritance: + diff --git a/doc/source/api/diffpy.pdffit2..git.refs.remotes.rst b/doc/source/api/diffpy.pdffit2..git.refs.remotes.rst new file mode 100644 index 00000000..dd7dd110 --- /dev/null +++ b/doc/source/api/diffpy.pdffit2..git.refs.remotes.rst @@ -0,0 +1,18 @@ +:tocdepth: -1 + +diffpy.pdffit2..git.refs.remotes package +======================================== + +.. automodule:: diffpy.pdffit2..git.refs.remotes + :members: + :undoc-members: + :show-inheritance: + +Subpackages +----------- + +.. toctree:: + :titlesonly: + + diffpy.pdffit2..git.refs.remotes.origin + diff --git a/doc/source/api/diffpy.pdffit2..git.refs.rst b/doc/source/api/diffpy.pdffit2..git.refs.rst new file mode 100644 index 00000000..8b77b9d1 --- /dev/null +++ b/doc/source/api/diffpy.pdffit2..git.refs.rst @@ -0,0 +1,20 @@ +:tocdepth: -1 + +diffpy.pdffit2..git.refs package +================================ + +.. automodule:: diffpy.pdffit2..git.refs + :members: + :undoc-members: + :show-inheritance: + +Subpackages +----------- + +.. toctree:: + :titlesonly: + + diffpy.pdffit2..git.refs.tags + diffpy.pdffit2..git.refs.remotes + diffpy.pdffit2..git.refs.heads + diff --git a/doc/source/api/diffpy.pdffit2..git.refs.tags.rst b/doc/source/api/diffpy.pdffit2..git.refs.tags.rst new file mode 100644 index 00000000..53acf633 --- /dev/null +++ b/doc/source/api/diffpy.pdffit2..git.refs.tags.rst @@ -0,0 +1,10 @@ +:tocdepth: -1 + +diffpy.pdffit2..git.refs.tags package +===================================== + +.. automodule:: diffpy.pdffit2..git.refs.tags + :members: + :undoc-members: + :show-inheritance: + diff --git a/doc/source/api/diffpy.pdffit2..git.rst b/doc/source/api/diffpy.pdffit2..git.rst new file mode 100644 index 00000000..95e2b35b --- /dev/null +++ b/doc/source/api/diffpy.pdffit2..git.rst @@ -0,0 +1,23 @@ +:tocdepth: -1 + +diffpy.pdffit2..git package +=========================== + +.. automodule:: diffpy.pdffit2..git + :members: + :undoc-members: + :show-inheritance: + +Subpackages +----------- + +.. toctree:: + :titlesonly: + + diffpy.pdffit2..git.hooks + diffpy.pdffit2..git.info + diffpy.pdffit2..git.branches + diffpy.pdffit2..git.objects + diffpy.pdffit2..git.logs + diffpy.pdffit2..git.refs + diff --git a/doc/source/api/diffpy.pdffit2..github.rst b/doc/source/api/diffpy.pdffit2..github.rst new file mode 100644 index 00000000..01859fde --- /dev/null +++ b/doc/source/api/diffpy.pdffit2..github.rst @@ -0,0 +1,18 @@ +:tocdepth: -1 + +diffpy.pdffit2..github package +============================== + +.. automodule:: diffpy.pdffit2..github + :members: + :undoc-members: + :show-inheritance: + +Subpackages +----------- + +.. toctree:: + :titlesonly: + + diffpy.pdffit2..github.workflows + diff --git a/doc/source/api/diffpy.pdffit2..github.workflows.rst b/doc/source/api/diffpy.pdffit2..github.workflows.rst new file mode 100644 index 00000000..9f1daf12 --- /dev/null +++ b/doc/source/api/diffpy.pdffit2..github.workflows.rst @@ -0,0 +1,10 @@ +:tocdepth: -1 + +diffpy.pdffit2..github.workflows package +======================================== + +.. automodule:: diffpy.pdffit2..github.workflows + :members: + :undoc-members: + :show-inheritance: + diff --git a/doc/source/api/diffpy.pdffit2..idea.inspectionProfiles.rst b/doc/source/api/diffpy.pdffit2..idea.inspectionProfiles.rst new file mode 100644 index 00000000..929148cf --- /dev/null +++ b/doc/source/api/diffpy.pdffit2..idea.inspectionProfiles.rst @@ -0,0 +1,10 @@ +:tocdepth: -1 + +diffpy.pdffit2..idea.inspectionProfiles package +=============================================== + +.. automodule:: diffpy.pdffit2..idea.inspectionProfiles + :members: + :undoc-members: + :show-inheritance: + diff --git a/doc/source/api/diffpy.pdffit2..idea.rst b/doc/source/api/diffpy.pdffit2..idea.rst new file mode 100644 index 00000000..7cf242f0 --- /dev/null +++ b/doc/source/api/diffpy.pdffit2..idea.rst @@ -0,0 +1,18 @@ +:tocdepth: -1 + +diffpy.pdffit2..idea package +============================ + +.. automodule:: diffpy.pdffit2..idea + :members: + :undoc-members: + :show-inheritance: + +Subpackages +----------- + +.. toctree:: + :titlesonly: + + diffpy.pdffit2..idea.inspectionProfiles + diff --git a/doc/source/api/diffpy.pdffit2.conda-recipe.rst b/doc/source/api/diffpy.pdffit2.conda-recipe.rst new file mode 100644 index 00000000..c9da6edb --- /dev/null +++ b/doc/source/api/diffpy.pdffit2.conda-recipe.rst @@ -0,0 +1,21 @@ +:tocdepth: -1 + +diffpy.pdffit2.conda-recipe package +=================================== + +.. automodule:: diffpy.pdffit2.conda-recipe + :members: + :undoc-members: + :show-inheritance: + +Submodules +---------- + +diffpy.pdffit2.conda-recipe.run_test module +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. automodule:: diffpy.pdffit2.conda-recipe.run_test + :members: + :undoc-members: + :show-inheritance: + diff --git a/doc/source/api/diffpy.pdffit2.devutils.rst b/doc/source/api/diffpy.pdffit2.devutils.rst new file mode 100644 index 00000000..bfdb4551 --- /dev/null +++ b/doc/source/api/diffpy.pdffit2.devutils.rst @@ -0,0 +1,10 @@ +:tocdepth: -1 + +diffpy.pdffit2.devutils package +=============================== + +.. automodule:: diffpy.pdffit2.devutils + :members: + :undoc-members: + :show-inheritance: + diff --git a/doc/source/api/diffpy.pdffit2.dist.rst b/doc/source/api/diffpy.pdffit2.dist.rst new file mode 100644 index 00000000..0baee332 --- /dev/null +++ b/doc/source/api/diffpy.pdffit2.dist.rst @@ -0,0 +1,10 @@ +:tocdepth: -1 + +diffpy.pdffit2.dist package +=========================== + +.. automodule:: diffpy.pdffit2.dist + :members: + :undoc-members: + :show-inheritance: + diff --git a/doc/source/api/diffpy.pdffit2.doc.epydoc.rst b/doc/source/api/diffpy.pdffit2.doc.epydoc.rst new file mode 100644 index 00000000..09cc3203 --- /dev/null +++ b/doc/source/api/diffpy.pdffit2.doc.epydoc.rst @@ -0,0 +1,10 @@ +:tocdepth: -1 + +diffpy.pdffit2.doc.epydoc package +================================= + +.. automodule:: diffpy.pdffit2.doc.epydoc + :members: + :undoc-members: + :show-inheritance: + diff --git a/doc/source/api/diffpy.pdffit2.doc.examples.rst b/doc/source/api/diffpy.pdffit2.doc.examples.rst new file mode 100644 index 00000000..70e0eb3a --- /dev/null +++ b/doc/source/api/diffpy.pdffit2.doc.examples.rst @@ -0,0 +1,37 @@ +:tocdepth: -1 + +diffpy.pdffit2.doc.examples package +=================================== + +.. automodule:: diffpy.pdffit2.doc.examples + :members: + :undoc-members: + :show-inheritance: + +Submodules +---------- + +diffpy.pdffit2.doc.examples.Ni_plot_pdf module +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. automodule:: diffpy.pdffit2.doc.examples.Ni_plot_pdf + :members: + :undoc-members: + :show-inheritance: + +diffpy.pdffit2.doc.examples.Ni_calculation module +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. automodule:: diffpy.pdffit2.doc.examples.Ni_calculation + :members: + :undoc-members: + :show-inheritance: + +diffpy.pdffit2.doc.examples.Ni_refinement module +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. automodule:: diffpy.pdffit2.doc.examples.Ni_refinement + :members: + :undoc-members: + :show-inheritance: + diff --git a/doc/source/api/diffpy.pdffit2.doc.rst b/doc/source/api/diffpy.pdffit2.doc.rst new file mode 100644 index 00000000..c7240e08 --- /dev/null +++ b/doc/source/api/diffpy.pdffit2.doc.rst @@ -0,0 +1,20 @@ +:tocdepth: -1 + +diffpy.pdffit2.doc package +========================== + +.. automodule:: diffpy.pdffit2.doc + :members: + :undoc-members: + :show-inheritance: + +Subpackages +----------- + +.. toctree:: + :titlesonly: + + diffpy.pdffit2.doc.epydoc + diffpy.pdffit2.doc.source + diffpy.pdffit2.doc.examples + diff --git a/doc/source/api/diffpy.pdffit2.doc.source._static.rst b/doc/source/api/diffpy.pdffit2.doc.source._static.rst new file mode 100644 index 00000000..74e4514d --- /dev/null +++ b/doc/source/api/diffpy.pdffit2.doc.source._static.rst @@ -0,0 +1,10 @@ +:tocdepth: -1 + +diffpy.pdffit2.doc.source._static package +========================================= + +.. automodule:: diffpy.pdffit2.doc.source._static + :members: + :undoc-members: + :show-inheritance: + diff --git a/doc/source/api/diffpy.pdffit2.doc.source.api.rst b/doc/source/api/diffpy.pdffit2.doc.source.api.rst new file mode 100644 index 00000000..f4fa7c73 --- /dev/null +++ b/doc/source/api/diffpy.pdffit2.doc.source.api.rst @@ -0,0 +1,10 @@ +:tocdepth: -1 + +diffpy.pdffit2.doc.source.api package +===================================== + +.. automodule:: diffpy.pdffit2.doc.source.api + :members: + :undoc-members: + :show-inheritance: + diff --git a/doc/source/api/diffpy.pdffit2.doc.source.epydoc.rst b/doc/source/api/diffpy.pdffit2.doc.source.epydoc.rst new file mode 100644 index 00000000..c3c73d02 --- /dev/null +++ b/doc/source/api/diffpy.pdffit2.doc.source.epydoc.rst @@ -0,0 +1,10 @@ +:tocdepth: -1 + +diffpy.pdffit2.doc.source.epydoc package +======================================== + +.. automodule:: diffpy.pdffit2.doc.source.epydoc + :members: + :undoc-members: + :show-inheritance: + diff --git a/doc/source/api/diffpy.pdffit2.doc.source.rst b/doc/source/api/diffpy.pdffit2.doc.source.rst new file mode 100644 index 00000000..56eebb22 --- /dev/null +++ b/doc/source/api/diffpy.pdffit2.doc.source.rst @@ -0,0 +1,31 @@ +:tocdepth: -1 + +diffpy.pdffit2.doc.source package +================================= + +.. automodule:: diffpy.pdffit2.doc.source + :members: + :undoc-members: + :show-inheritance: + +Subpackages +----------- + +.. toctree:: + :titlesonly: + + diffpy.pdffit2.doc.source.epydoc + diffpy.pdffit2.doc.source._static + diffpy.pdffit2.doc.source.api + +Submodules +---------- + +diffpy.pdffit2.doc.source.conf module +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. automodule:: diffpy.pdffit2.doc.source.conf + :members: + :undoc-members: + :show-inheritance: + diff --git a/doc/source/api/diffpy.pdffit2.example_package.rst b/doc/source/api/diffpy.pdffit2.example_package.rst deleted file mode 100644 index 1c6346c7..00000000 --- a/doc/source/api/diffpy.pdffit2.example_package.rst +++ /dev/null @@ -1,31 +0,0 @@ -.. _example_package documentation: - -|title| -======= - -.. |title| replace:: diffpy.pdffit2.example_package package - -.. automodule:: diffpy.pdffit2.example_package - :members: - :undoc-members: - :show-inheritance: - -|foo| ------ - -.. |foo| replace:: diffpy.pdffit2.example_package.foo module - -.. automodule:: diffpy.pdffit2.example_package.foo - :members: - :undoc-members: - :show-inheritance: - -|bar| ------ - -.. |bar| replace:: diffpy.pdffit2.example_package.bar module - -.. automodule:: diffpy.pdffit2.example_package.foo - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/api/diffpy.pdffit2.news.rst b/doc/source/api/diffpy.pdffit2.news.rst new file mode 100644 index 00000000..eeef3a39 --- /dev/null +++ b/doc/source/api/diffpy.pdffit2.news.rst @@ -0,0 +1,10 @@ +:tocdepth: -1 + +diffpy.pdffit2.news package +=========================== + +.. automodule:: diffpy.pdffit2.news + :members: + :undoc-members: + :show-inheritance: + diff --git a/doc/source/api/diffpy.pdffit2.requirements.rst b/doc/source/api/diffpy.pdffit2.requirements.rst new file mode 100644 index 00000000..eb7c9dd3 --- /dev/null +++ b/doc/source/api/diffpy.pdffit2.requirements.rst @@ -0,0 +1,10 @@ +:tocdepth: -1 + +diffpy.pdffit2.requirements package +=================================== + +.. automodule:: diffpy.pdffit2.requirements + :members: + :undoc-members: + :show-inheritance: + diff --git a/doc/source/api/diffpy.pdffit2.rst b/doc/source/api/diffpy.pdffit2.rst index 70ca1b77..98892ba0 100644 --- a/doc/source/api/diffpy.pdffit2.rst +++ b/doc/source/api/diffpy.pdffit2.rst @@ -1,9 +1,7 @@ :tocdepth: -1 -|title| -======= - -.. |title| replace:: diffpy.pdffit2 package +diffpy.pdffit2 package +====================== .. automodule:: diffpy.pdffit2 :members: @@ -14,17 +12,27 @@ Subpackages ----------- .. toctree:: - diffpy.pdffit2.example_package + :titlesonly: + + diffpy.pdffit2.conda-recipe + diffpy.pdffit2.doc + diffpy.pdffit2.dist + diffpy.pdffit2..idea + diffpy.pdffit2.src + diffpy.pdffit2.news + diffpy.pdffit2..github + diffpy.pdffit2.devutils + diffpy.pdffit2.requirements + diffpy.pdffit2..git Submodules ---------- -|module| --------- - -.. |module| replace:: diffpy.pdffit2.example_submodule module +diffpy.pdffit2.setup module +^^^^^^^^^^^^^^^^^^^^^^^^^^^ -.. automodule:: diffpy.pdffit2.example_submodule +.. automodule:: diffpy.pdffit2.setup :members: :undoc-members: :show-inheritance: + diff --git a/doc/source/api/diffpy.pdffit2.src.diffpy.pdffit2.egg-info.rst b/doc/source/api/diffpy.pdffit2.src.diffpy.pdffit2.egg-info.rst new file mode 100644 index 00000000..566bf83f --- /dev/null +++ b/doc/source/api/diffpy.pdffit2.src.diffpy.pdffit2.egg-info.rst @@ -0,0 +1,10 @@ +:tocdepth: -1 + +diffpy.pdffit2.src.diffpy.pdffit2.egg-info package +================================================== + +.. automodule:: diffpy.pdffit2.src.diffpy.pdffit2.egg-info + :members: + :undoc-members: + :show-inheritance: + diff --git a/doc/source/api/diffpy.pdffit2.src.diffpy.pdffit2.rst b/doc/source/api/diffpy.pdffit2.src.diffpy.pdffit2.rst new file mode 100644 index 00000000..e51749be --- /dev/null +++ b/doc/source/api/diffpy.pdffit2.src.diffpy.pdffit2.rst @@ -0,0 +1,37 @@ +:tocdepth: -1 + +diffpy.pdffit2.src.diffpy.pdffit2 package +========================================= + +.. automodule:: diffpy.pdffit2.src.diffpy.pdffit2 + :members: + :undoc-members: + :show-inheritance: + +Submodules +---------- + +diffpy.pdffit2.src.diffpy.pdffit2.ipy_ext module +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. automodule:: diffpy.pdffit2.src.diffpy.pdffit2.ipy_ext + :members: + :undoc-members: + :show-inheritance: + +diffpy.pdffit2.src.diffpy.pdffit2.pdffit module +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. automodule:: diffpy.pdffit2.src.diffpy.pdffit2.pdffit + :members: + :undoc-members: + :show-inheritance: + +diffpy.pdffit2.src.diffpy.pdffit2.output module +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. automodule:: diffpy.pdffit2.src.diffpy.pdffit2.output + :members: + :undoc-members: + :show-inheritance: + diff --git a/doc/source/api/diffpy.pdffit2.src.diffpy.rst b/doc/source/api/diffpy.pdffit2.src.diffpy.rst new file mode 100644 index 00000000..7362896e --- /dev/null +++ b/doc/source/api/diffpy.pdffit2.src.diffpy.rst @@ -0,0 +1,18 @@ +:tocdepth: -1 + +diffpy.pdffit2.src.diffpy package +================================= + +.. automodule:: diffpy.pdffit2.src.diffpy + :members: + :undoc-members: + :show-inheritance: + +Subpackages +----------- + +.. toctree:: + :titlesonly: + + diffpy.pdffit2.src.diffpy.pdffit2 + diff --git a/doc/source/api/diffpy.pdffit2.src.extensions.libpdffit2.rst b/doc/source/api/diffpy.pdffit2.src.extensions.libpdffit2.rst new file mode 100644 index 00000000..7e55fcaa --- /dev/null +++ b/doc/source/api/diffpy.pdffit2.src.extensions.libpdffit2.rst @@ -0,0 +1,10 @@ +:tocdepth: -1 + +diffpy.pdffit2.src.extensions.libpdffit2 package +================================================ + +.. automodule:: diffpy.pdffit2.src.extensions.libpdffit2 + :members: + :undoc-members: + :show-inheritance: + diff --git a/doc/source/api/diffpy.pdffit2.src.extensions.pdffit2module.rst b/doc/source/api/diffpy.pdffit2.src.extensions.pdffit2module.rst new file mode 100644 index 00000000..58f71017 --- /dev/null +++ b/doc/source/api/diffpy.pdffit2.src.extensions.pdffit2module.rst @@ -0,0 +1,10 @@ +:tocdepth: -1 + +diffpy.pdffit2.src.extensions.pdffit2module package +=================================================== + +.. automodule:: diffpy.pdffit2.src.extensions.pdffit2module + :members: + :undoc-members: + :show-inheritance: + diff --git a/doc/source/api/diffpy.pdffit2.src.extensions.rst b/doc/source/api/diffpy.pdffit2.src.extensions.rst new file mode 100644 index 00000000..1813199f --- /dev/null +++ b/doc/source/api/diffpy.pdffit2.src.extensions.rst @@ -0,0 +1,19 @@ +:tocdepth: -1 + +diffpy.pdffit2.src.extensions package +===================================== + +.. automodule:: diffpy.pdffit2.src.extensions + :members: + :undoc-members: + :show-inheritance: + +Subpackages +----------- + +.. toctree:: + :titlesonly: + + diffpy.pdffit2.src.extensions.libpdffit2 + diffpy.pdffit2.src.extensions.pdffit2module + diff --git a/doc/source/api/diffpy.pdffit2.src.rst b/doc/source/api/diffpy.pdffit2.src.rst new file mode 100644 index 00000000..4d61d91a --- /dev/null +++ b/doc/source/api/diffpy.pdffit2.src.rst @@ -0,0 +1,20 @@ +:tocdepth: -1 + +diffpy.pdffit2.src package +========================== + +.. automodule:: diffpy.pdffit2.src + :members: + :undoc-members: + :show-inheritance: + +Subpackages +----------- + +.. toctree:: + :titlesonly: + + diffpy.pdffit2.src.diffpy + diffpy.pdffit2.src.diffpy.pdffit2.egg-info + diffpy.pdffit2.src.extensions + From a7be96bbc11fef4ba864acb362378d13155ff40c Mon Sep 17 00:00:00 2001 From: Sam Andrello Date: Fri, 26 Jul 2024 12:26:24 -0400 Subject: [PATCH 071/104] remove duplicate epydoc/ folder in doc/ --- doc/epydoc/Makefile | 17 -------------- doc/epydoc/epydoc.cfg | 54 ------------------------------------------- 2 files changed, 71 deletions(-) delete mode 100644 doc/epydoc/Makefile delete mode 100644 doc/epydoc/epydoc.cfg diff --git a/doc/epydoc/Makefile b/doc/epydoc/Makefile deleted file mode 100644 index 756095f5..00000000 --- a/doc/epydoc/Makefile +++ /dev/null @@ -1,17 +0,0 @@ -PKGNAME = diffpy.pdffit2 -OUTPUT = html -WEBDOCDIR = login.cacr.caltech.edu:/cacr/home/proj/danse/docs.danse.us/docroot/diffraction - - -all: - epydoc --config=epydoc.cfg --output=$(OUTPUT) \ - --name=$(PKGNAME) $(PKGNAME) - - -clean: - /bin/rm -rf $(OUTPUT) - - -publish: - rsync -e /usr/bin/ssh -va --chmod=a+rwx,o-w,Dg+s,Fa-x \ - $(OUTPUT)/ $(WEBDOCDIR)/$(PKGNAME) diff --git a/doc/epydoc/epydoc.cfg b/doc/epydoc/epydoc.cfg deleted file mode 100644 index dddbcd90..00000000 --- a/doc/epydoc/epydoc.cfg +++ /dev/null @@ -1,54 +0,0 @@ -[epydoc] - -# docformat -# The default markup language for docstrings, for modules that do -# not define __docformat__. Defaults to epytext. -docformat: plaintext - -# The type of output that should be generated. Should be one -# of: html, text, latex, dvi, ps, pdf. -output: html - -# An integer indicating how verbose epydoc should be. The default -# value is 0; negative values will supress warnings and errors; -# positive values will give more verbose output. -verbosity: 0 - -# A boolean value indicating that Epydoc should show a tracaback -# in case of unexpected error. By default don't show tracebacks -debug: 0 - -# If True, don't try to use colors or cursor control when doing -# textual output. The default False assumes a rich text prompt -simple-term: 1 - -# The format for showing inheritance objects. -# It should be one of: 'grouped', 'listed', 'included'. -inheritance: grouped - -# Whether or not to inclue private variables. (Even if included, -# private variables will be hidden by default.) -private: yes - -# Whether or not to list each module's imports. -imports: yes - -# Whether or not to include syntax highlighted source code in -# the output (HTML only). -sourcecode: yes - -# Whether or not to includea a page with Epydoc log, containing -# effective option at the time of generation and the reported logs. -include-log: no - -### Output options - -# The documented project's name. -#name: diffpy.FIXME - -# The CSS stylesheet for HTML output. Can be the name of a builtin -# stylesheet, or the name of a file. -css: white - -# The documented project's URL. -url: http://www.diffpy.org/ From 0f460fd23398e69715843e30613f7f1ba830cb20 Mon Sep 17 00:00:00 2001 From: Sam Andrello Date: Fri, 26 Jul 2024 12:34:30 -0400 Subject: [PATCH 072/104] prevent autodoc warning --- doc/source/conf.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/doc/source/conf.py b/doc/source/conf.py index c15e8639..7052bc79 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -18,6 +18,10 @@ from importlib.metadata import version from pathlib import Path + +# Eliminate autodoc warning +autodoc_mock_imports = ["diffpy.pdffit2"] + # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use Path().resolve() to make it absolute, like shown here. From 856d6d2d5aae9e760809f8e5f713f2def36c6d5a Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 26 Jul 2024 16:49:07 +0000 Subject: [PATCH 073/104] [pre-commit.ci] auto fixes from pre-commit hooks --- doc/source/api/diffpy.pdffit2..git.branches.rst | 1 - doc/source/api/diffpy.pdffit2..git.hooks.rst | 1 - doc/source/api/diffpy.pdffit2..git.info.rst | 1 - doc/source/api/diffpy.pdffit2..git.logs.refs.heads.rst | 1 - doc/source/api/diffpy.pdffit2..git.logs.refs.remotes.origin.rst | 1 - doc/source/api/diffpy.pdffit2..git.logs.refs.remotes.rst | 1 - doc/source/api/diffpy.pdffit2..git.logs.refs.rst | 1 - doc/source/api/diffpy.pdffit2..git.logs.rst | 1 - doc/source/api/diffpy.pdffit2..git.objects.info.rst | 1 - doc/source/api/diffpy.pdffit2..git.objects.pack.rst | 1 - doc/source/api/diffpy.pdffit2..git.objects.rst | 1 - doc/source/api/diffpy.pdffit2..git.refs.heads.rst | 1 - doc/source/api/diffpy.pdffit2..git.refs.remotes.origin.rst | 1 - doc/source/api/diffpy.pdffit2..git.refs.remotes.rst | 1 - doc/source/api/diffpy.pdffit2..git.refs.rst | 1 - doc/source/api/diffpy.pdffit2..git.refs.tags.rst | 1 - doc/source/api/diffpy.pdffit2..git.rst | 1 - doc/source/api/diffpy.pdffit2..github.rst | 1 - doc/source/api/diffpy.pdffit2..github.workflows.rst | 1 - doc/source/api/diffpy.pdffit2..idea.inspectionProfiles.rst | 1 - doc/source/api/diffpy.pdffit2..idea.rst | 1 - doc/source/api/diffpy.pdffit2.conda-recipe.rst | 1 - doc/source/api/diffpy.pdffit2.devutils.rst | 1 - doc/source/api/diffpy.pdffit2.dist.rst | 1 - doc/source/api/diffpy.pdffit2.doc.epydoc.rst | 1 - doc/source/api/diffpy.pdffit2.doc.examples.rst | 1 - doc/source/api/diffpy.pdffit2.doc.rst | 1 - doc/source/api/diffpy.pdffit2.doc.source._static.rst | 1 - doc/source/api/diffpy.pdffit2.doc.source.api.rst | 1 - doc/source/api/diffpy.pdffit2.doc.source.epydoc.rst | 1 - doc/source/api/diffpy.pdffit2.doc.source.rst | 1 - doc/source/api/diffpy.pdffit2.news.rst | 1 - doc/source/api/diffpy.pdffit2.requirements.rst | 1 - doc/source/api/diffpy.pdffit2.rst | 1 - doc/source/api/diffpy.pdffit2.src.diffpy.pdffit2.egg-info.rst | 1 - doc/source/api/diffpy.pdffit2.src.diffpy.pdffit2.rst | 1 - doc/source/api/diffpy.pdffit2.src.diffpy.rst | 1 - doc/source/api/diffpy.pdffit2.src.extensions.libpdffit2.rst | 1 - doc/source/api/diffpy.pdffit2.src.extensions.pdffit2module.rst | 1 - doc/source/api/diffpy.pdffit2.src.extensions.rst | 1 - doc/source/api/diffpy.pdffit2.src.rst | 1 - doc/source/conf.py | 1 - 42 files changed, 42 deletions(-) diff --git a/doc/source/api/diffpy.pdffit2..git.branches.rst b/doc/source/api/diffpy.pdffit2..git.branches.rst index e448ee3b..0c6e73ab 100644 --- a/doc/source/api/diffpy.pdffit2..git.branches.rst +++ b/doc/source/api/diffpy.pdffit2..git.branches.rst @@ -7,4 +7,3 @@ diffpy.pdffit2..git.branches package :members: :undoc-members: :show-inheritance: - diff --git a/doc/source/api/diffpy.pdffit2..git.hooks.rst b/doc/source/api/diffpy.pdffit2..git.hooks.rst index 21156bde..d3ff7bd8 100644 --- a/doc/source/api/diffpy.pdffit2..git.hooks.rst +++ b/doc/source/api/diffpy.pdffit2..git.hooks.rst @@ -7,4 +7,3 @@ diffpy.pdffit2..git.hooks package :members: :undoc-members: :show-inheritance: - diff --git a/doc/source/api/diffpy.pdffit2..git.info.rst b/doc/source/api/diffpy.pdffit2..git.info.rst index 6af4f94a..df4ba70f 100644 --- a/doc/source/api/diffpy.pdffit2..git.info.rst +++ b/doc/source/api/diffpy.pdffit2..git.info.rst @@ -7,4 +7,3 @@ diffpy.pdffit2..git.info package :members: :undoc-members: :show-inheritance: - diff --git a/doc/source/api/diffpy.pdffit2..git.logs.refs.heads.rst b/doc/source/api/diffpy.pdffit2..git.logs.refs.heads.rst index 1f33cefe..c488622f 100644 --- a/doc/source/api/diffpy.pdffit2..git.logs.refs.heads.rst +++ b/doc/source/api/diffpy.pdffit2..git.logs.refs.heads.rst @@ -7,4 +7,3 @@ diffpy.pdffit2..git.logs.refs.heads package :members: :undoc-members: :show-inheritance: - diff --git a/doc/source/api/diffpy.pdffit2..git.logs.refs.remotes.origin.rst b/doc/source/api/diffpy.pdffit2..git.logs.refs.remotes.origin.rst index 3d46f4d2..730c957e 100644 --- a/doc/source/api/diffpy.pdffit2..git.logs.refs.remotes.origin.rst +++ b/doc/source/api/diffpy.pdffit2..git.logs.refs.remotes.origin.rst @@ -7,4 +7,3 @@ diffpy.pdffit2..git.logs.refs.remotes.origin package :members: :undoc-members: :show-inheritance: - diff --git a/doc/source/api/diffpy.pdffit2..git.logs.refs.remotes.rst b/doc/source/api/diffpy.pdffit2..git.logs.refs.remotes.rst index c6b1133a..387272a7 100644 --- a/doc/source/api/diffpy.pdffit2..git.logs.refs.remotes.rst +++ b/doc/source/api/diffpy.pdffit2..git.logs.refs.remotes.rst @@ -15,4 +15,3 @@ Subpackages :titlesonly: diffpy.pdffit2..git.logs.refs.remotes.origin - diff --git a/doc/source/api/diffpy.pdffit2..git.logs.refs.rst b/doc/source/api/diffpy.pdffit2..git.logs.refs.rst index f3f52bb6..725a8650 100644 --- a/doc/source/api/diffpy.pdffit2..git.logs.refs.rst +++ b/doc/source/api/diffpy.pdffit2..git.logs.refs.rst @@ -16,4 +16,3 @@ Subpackages diffpy.pdffit2..git.logs.refs.remotes diffpy.pdffit2..git.logs.refs.heads - diff --git a/doc/source/api/diffpy.pdffit2..git.logs.rst b/doc/source/api/diffpy.pdffit2..git.logs.rst index b0a95a07..9414abd1 100644 --- a/doc/source/api/diffpy.pdffit2..git.logs.rst +++ b/doc/source/api/diffpy.pdffit2..git.logs.rst @@ -15,4 +15,3 @@ Subpackages :titlesonly: diffpy.pdffit2..git.logs.refs - diff --git a/doc/source/api/diffpy.pdffit2..git.objects.info.rst b/doc/source/api/diffpy.pdffit2..git.objects.info.rst index e0d5cfd8..89d50d6d 100644 --- a/doc/source/api/diffpy.pdffit2..git.objects.info.rst +++ b/doc/source/api/diffpy.pdffit2..git.objects.info.rst @@ -7,4 +7,3 @@ diffpy.pdffit2..git.objects.info package :members: :undoc-members: :show-inheritance: - diff --git a/doc/source/api/diffpy.pdffit2..git.objects.pack.rst b/doc/source/api/diffpy.pdffit2..git.objects.pack.rst index e499b2ef..0193d5c0 100644 --- a/doc/source/api/diffpy.pdffit2..git.objects.pack.rst +++ b/doc/source/api/diffpy.pdffit2..git.objects.pack.rst @@ -7,4 +7,3 @@ diffpy.pdffit2..git.objects.pack package :members: :undoc-members: :show-inheritance: - diff --git a/doc/source/api/diffpy.pdffit2..git.objects.rst b/doc/source/api/diffpy.pdffit2..git.objects.rst index 51819b09..c498320d 100644 --- a/doc/source/api/diffpy.pdffit2..git.objects.rst +++ b/doc/source/api/diffpy.pdffit2..git.objects.rst @@ -16,4 +16,3 @@ Subpackages diffpy.pdffit2..git.objects.info diffpy.pdffit2..git.objects.pack - diff --git a/doc/source/api/diffpy.pdffit2..git.refs.heads.rst b/doc/source/api/diffpy.pdffit2..git.refs.heads.rst index 355dce1d..0d457843 100644 --- a/doc/source/api/diffpy.pdffit2..git.refs.heads.rst +++ b/doc/source/api/diffpy.pdffit2..git.refs.heads.rst @@ -7,4 +7,3 @@ diffpy.pdffit2..git.refs.heads package :members: :undoc-members: :show-inheritance: - diff --git a/doc/source/api/diffpy.pdffit2..git.refs.remotes.origin.rst b/doc/source/api/diffpy.pdffit2..git.refs.remotes.origin.rst index 9c8826ef..c3ad19c3 100644 --- a/doc/source/api/diffpy.pdffit2..git.refs.remotes.origin.rst +++ b/doc/source/api/diffpy.pdffit2..git.refs.remotes.origin.rst @@ -7,4 +7,3 @@ diffpy.pdffit2..git.refs.remotes.origin package :members: :undoc-members: :show-inheritance: - diff --git a/doc/source/api/diffpy.pdffit2..git.refs.remotes.rst b/doc/source/api/diffpy.pdffit2..git.refs.remotes.rst index dd7dd110..dadf4c86 100644 --- a/doc/source/api/diffpy.pdffit2..git.refs.remotes.rst +++ b/doc/source/api/diffpy.pdffit2..git.refs.remotes.rst @@ -15,4 +15,3 @@ Subpackages :titlesonly: diffpy.pdffit2..git.refs.remotes.origin - diff --git a/doc/source/api/diffpy.pdffit2..git.refs.rst b/doc/source/api/diffpy.pdffit2..git.refs.rst index 8b77b9d1..86ab1649 100644 --- a/doc/source/api/diffpy.pdffit2..git.refs.rst +++ b/doc/source/api/diffpy.pdffit2..git.refs.rst @@ -17,4 +17,3 @@ Subpackages diffpy.pdffit2..git.refs.tags diffpy.pdffit2..git.refs.remotes diffpy.pdffit2..git.refs.heads - diff --git a/doc/source/api/diffpy.pdffit2..git.refs.tags.rst b/doc/source/api/diffpy.pdffit2..git.refs.tags.rst index 53acf633..c323a1ca 100644 --- a/doc/source/api/diffpy.pdffit2..git.refs.tags.rst +++ b/doc/source/api/diffpy.pdffit2..git.refs.tags.rst @@ -7,4 +7,3 @@ diffpy.pdffit2..git.refs.tags package :members: :undoc-members: :show-inheritance: - diff --git a/doc/source/api/diffpy.pdffit2..git.rst b/doc/source/api/diffpy.pdffit2..git.rst index 95e2b35b..c8c7eb31 100644 --- a/doc/source/api/diffpy.pdffit2..git.rst +++ b/doc/source/api/diffpy.pdffit2..git.rst @@ -20,4 +20,3 @@ Subpackages diffpy.pdffit2..git.objects diffpy.pdffit2..git.logs diffpy.pdffit2..git.refs - diff --git a/doc/source/api/diffpy.pdffit2..github.rst b/doc/source/api/diffpy.pdffit2..github.rst index 01859fde..3dc15783 100644 --- a/doc/source/api/diffpy.pdffit2..github.rst +++ b/doc/source/api/diffpy.pdffit2..github.rst @@ -15,4 +15,3 @@ Subpackages :titlesonly: diffpy.pdffit2..github.workflows - diff --git a/doc/source/api/diffpy.pdffit2..github.workflows.rst b/doc/source/api/diffpy.pdffit2..github.workflows.rst index 9f1daf12..cb2abea2 100644 --- a/doc/source/api/diffpy.pdffit2..github.workflows.rst +++ b/doc/source/api/diffpy.pdffit2..github.workflows.rst @@ -7,4 +7,3 @@ diffpy.pdffit2..github.workflows package :members: :undoc-members: :show-inheritance: - diff --git a/doc/source/api/diffpy.pdffit2..idea.inspectionProfiles.rst b/doc/source/api/diffpy.pdffit2..idea.inspectionProfiles.rst index 929148cf..553c86d6 100644 --- a/doc/source/api/diffpy.pdffit2..idea.inspectionProfiles.rst +++ b/doc/source/api/diffpy.pdffit2..idea.inspectionProfiles.rst @@ -7,4 +7,3 @@ diffpy.pdffit2..idea.inspectionProfiles package :members: :undoc-members: :show-inheritance: - diff --git a/doc/source/api/diffpy.pdffit2..idea.rst b/doc/source/api/diffpy.pdffit2..idea.rst index 7cf242f0..a12d7ab7 100644 --- a/doc/source/api/diffpy.pdffit2..idea.rst +++ b/doc/source/api/diffpy.pdffit2..idea.rst @@ -15,4 +15,3 @@ Subpackages :titlesonly: diffpy.pdffit2..idea.inspectionProfiles - diff --git a/doc/source/api/diffpy.pdffit2.conda-recipe.rst b/doc/source/api/diffpy.pdffit2.conda-recipe.rst index c9da6edb..576bf96a 100644 --- a/doc/source/api/diffpy.pdffit2.conda-recipe.rst +++ b/doc/source/api/diffpy.pdffit2.conda-recipe.rst @@ -18,4 +18,3 @@ diffpy.pdffit2.conda-recipe.run_test module :members: :undoc-members: :show-inheritance: - diff --git a/doc/source/api/diffpy.pdffit2.devutils.rst b/doc/source/api/diffpy.pdffit2.devutils.rst index bfdb4551..672e2769 100644 --- a/doc/source/api/diffpy.pdffit2.devutils.rst +++ b/doc/source/api/diffpy.pdffit2.devutils.rst @@ -7,4 +7,3 @@ diffpy.pdffit2.devutils package :members: :undoc-members: :show-inheritance: - diff --git a/doc/source/api/diffpy.pdffit2.dist.rst b/doc/source/api/diffpy.pdffit2.dist.rst index 0baee332..92f64b29 100644 --- a/doc/source/api/diffpy.pdffit2.dist.rst +++ b/doc/source/api/diffpy.pdffit2.dist.rst @@ -7,4 +7,3 @@ diffpy.pdffit2.dist package :members: :undoc-members: :show-inheritance: - diff --git a/doc/source/api/diffpy.pdffit2.doc.epydoc.rst b/doc/source/api/diffpy.pdffit2.doc.epydoc.rst index 09cc3203..6805542b 100644 --- a/doc/source/api/diffpy.pdffit2.doc.epydoc.rst +++ b/doc/source/api/diffpy.pdffit2.doc.epydoc.rst @@ -7,4 +7,3 @@ diffpy.pdffit2.doc.epydoc package :members: :undoc-members: :show-inheritance: - diff --git a/doc/source/api/diffpy.pdffit2.doc.examples.rst b/doc/source/api/diffpy.pdffit2.doc.examples.rst index 70e0eb3a..a65270c0 100644 --- a/doc/source/api/diffpy.pdffit2.doc.examples.rst +++ b/doc/source/api/diffpy.pdffit2.doc.examples.rst @@ -34,4 +34,3 @@ diffpy.pdffit2.doc.examples.Ni_refinement module :members: :undoc-members: :show-inheritance: - diff --git a/doc/source/api/diffpy.pdffit2.doc.rst b/doc/source/api/diffpy.pdffit2.doc.rst index c7240e08..677d88a1 100644 --- a/doc/source/api/diffpy.pdffit2.doc.rst +++ b/doc/source/api/diffpy.pdffit2.doc.rst @@ -17,4 +17,3 @@ Subpackages diffpy.pdffit2.doc.epydoc diffpy.pdffit2.doc.source diffpy.pdffit2.doc.examples - diff --git a/doc/source/api/diffpy.pdffit2.doc.source._static.rst b/doc/source/api/diffpy.pdffit2.doc.source._static.rst index 74e4514d..91e43b85 100644 --- a/doc/source/api/diffpy.pdffit2.doc.source._static.rst +++ b/doc/source/api/diffpy.pdffit2.doc.source._static.rst @@ -7,4 +7,3 @@ diffpy.pdffit2.doc.source._static package :members: :undoc-members: :show-inheritance: - diff --git a/doc/source/api/diffpy.pdffit2.doc.source.api.rst b/doc/source/api/diffpy.pdffit2.doc.source.api.rst index f4fa7c73..ac900b93 100644 --- a/doc/source/api/diffpy.pdffit2.doc.source.api.rst +++ b/doc/source/api/diffpy.pdffit2.doc.source.api.rst @@ -7,4 +7,3 @@ diffpy.pdffit2.doc.source.api package :members: :undoc-members: :show-inheritance: - diff --git a/doc/source/api/diffpy.pdffit2.doc.source.epydoc.rst b/doc/source/api/diffpy.pdffit2.doc.source.epydoc.rst index c3c73d02..42d5a199 100644 --- a/doc/source/api/diffpy.pdffit2.doc.source.epydoc.rst +++ b/doc/source/api/diffpy.pdffit2.doc.source.epydoc.rst @@ -7,4 +7,3 @@ diffpy.pdffit2.doc.source.epydoc package :members: :undoc-members: :show-inheritance: - diff --git a/doc/source/api/diffpy.pdffit2.doc.source.rst b/doc/source/api/diffpy.pdffit2.doc.source.rst index 56eebb22..7d962e6e 100644 --- a/doc/source/api/diffpy.pdffit2.doc.source.rst +++ b/doc/source/api/diffpy.pdffit2.doc.source.rst @@ -28,4 +28,3 @@ diffpy.pdffit2.doc.source.conf module :members: :undoc-members: :show-inheritance: - diff --git a/doc/source/api/diffpy.pdffit2.news.rst b/doc/source/api/diffpy.pdffit2.news.rst index eeef3a39..6eeeb455 100644 --- a/doc/source/api/diffpy.pdffit2.news.rst +++ b/doc/source/api/diffpy.pdffit2.news.rst @@ -7,4 +7,3 @@ diffpy.pdffit2.news package :members: :undoc-members: :show-inheritance: - diff --git a/doc/source/api/diffpy.pdffit2.requirements.rst b/doc/source/api/diffpy.pdffit2.requirements.rst index eb7c9dd3..c1174b54 100644 --- a/doc/source/api/diffpy.pdffit2.requirements.rst +++ b/doc/source/api/diffpy.pdffit2.requirements.rst @@ -7,4 +7,3 @@ diffpy.pdffit2.requirements package :members: :undoc-members: :show-inheritance: - diff --git a/doc/source/api/diffpy.pdffit2.rst b/doc/source/api/diffpy.pdffit2.rst index 98892ba0..01fff3d2 100644 --- a/doc/source/api/diffpy.pdffit2.rst +++ b/doc/source/api/diffpy.pdffit2.rst @@ -35,4 +35,3 @@ diffpy.pdffit2.setup module :members: :undoc-members: :show-inheritance: - diff --git a/doc/source/api/diffpy.pdffit2.src.diffpy.pdffit2.egg-info.rst b/doc/source/api/diffpy.pdffit2.src.diffpy.pdffit2.egg-info.rst index 566bf83f..1c4e8989 100644 --- a/doc/source/api/diffpy.pdffit2.src.diffpy.pdffit2.egg-info.rst +++ b/doc/source/api/diffpy.pdffit2.src.diffpy.pdffit2.egg-info.rst @@ -7,4 +7,3 @@ diffpy.pdffit2.src.diffpy.pdffit2.egg-info package :members: :undoc-members: :show-inheritance: - diff --git a/doc/source/api/diffpy.pdffit2.src.diffpy.pdffit2.rst b/doc/source/api/diffpy.pdffit2.src.diffpy.pdffit2.rst index e51749be..af492535 100644 --- a/doc/source/api/diffpy.pdffit2.src.diffpy.pdffit2.rst +++ b/doc/source/api/diffpy.pdffit2.src.diffpy.pdffit2.rst @@ -34,4 +34,3 @@ diffpy.pdffit2.src.diffpy.pdffit2.output module :members: :undoc-members: :show-inheritance: - diff --git a/doc/source/api/diffpy.pdffit2.src.diffpy.rst b/doc/source/api/diffpy.pdffit2.src.diffpy.rst index 7362896e..d49a5646 100644 --- a/doc/source/api/diffpy.pdffit2.src.diffpy.rst +++ b/doc/source/api/diffpy.pdffit2.src.diffpy.rst @@ -15,4 +15,3 @@ Subpackages :titlesonly: diffpy.pdffit2.src.diffpy.pdffit2 - diff --git a/doc/source/api/diffpy.pdffit2.src.extensions.libpdffit2.rst b/doc/source/api/diffpy.pdffit2.src.extensions.libpdffit2.rst index 7e55fcaa..7179332d 100644 --- a/doc/source/api/diffpy.pdffit2.src.extensions.libpdffit2.rst +++ b/doc/source/api/diffpy.pdffit2.src.extensions.libpdffit2.rst @@ -7,4 +7,3 @@ diffpy.pdffit2.src.extensions.libpdffit2 package :members: :undoc-members: :show-inheritance: - diff --git a/doc/source/api/diffpy.pdffit2.src.extensions.pdffit2module.rst b/doc/source/api/diffpy.pdffit2.src.extensions.pdffit2module.rst index 58f71017..7cfa4606 100644 --- a/doc/source/api/diffpy.pdffit2.src.extensions.pdffit2module.rst +++ b/doc/source/api/diffpy.pdffit2.src.extensions.pdffit2module.rst @@ -7,4 +7,3 @@ diffpy.pdffit2.src.extensions.pdffit2module package :members: :undoc-members: :show-inheritance: - diff --git a/doc/source/api/diffpy.pdffit2.src.extensions.rst b/doc/source/api/diffpy.pdffit2.src.extensions.rst index 1813199f..83339b3a 100644 --- a/doc/source/api/diffpy.pdffit2.src.extensions.rst +++ b/doc/source/api/diffpy.pdffit2.src.extensions.rst @@ -16,4 +16,3 @@ Subpackages diffpy.pdffit2.src.extensions.libpdffit2 diffpy.pdffit2.src.extensions.pdffit2module - diff --git a/doc/source/api/diffpy.pdffit2.src.rst b/doc/source/api/diffpy.pdffit2.src.rst index 4d61d91a..2fbc5dbc 100644 --- a/doc/source/api/diffpy.pdffit2.src.rst +++ b/doc/source/api/diffpy.pdffit2.src.rst @@ -17,4 +17,3 @@ Subpackages diffpy.pdffit2.src.diffpy diffpy.pdffit2.src.diffpy.pdffit2.egg-info diffpy.pdffit2.src.extensions - diff --git a/doc/source/conf.py b/doc/source/conf.py index 7052bc79..e5e8dace 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -18,7 +18,6 @@ from importlib.metadata import version from pathlib import Path - # Eliminate autodoc warning autodoc_mock_imports = ["diffpy.pdffit2"] From 79fd7d05207fd15ab714f771dbec5a59df358168 Mon Sep 17 00:00:00 2001 From: Sam Andrello Date: Fri, 26 Jul 2024 13:21:02 -0400 Subject: [PATCH 074/104] modify README.rst to be like cookiecutter --- README.rst | 138 +++++++++++++++++++++++++++++++++++++---------------- 1 file changed, 96 insertions(+), 42 deletions(-) diff --git a/README.rst b/README.rst index 6bc9518f..e4ddb15e 100644 --- a/README.rst +++ b/README.rst @@ -1,10 +1,39 @@ +|Icon| |title|_ +=============== -.. image:: https://codecov.io/gh/diffpy/diffpy.pdffit2/branch/master/graph/badge.svg - :target: https://codecov.io/gh/diffpy/diffpy.pdffit2 +.. |title| replace:: diffpy.pdffit2 +.. _title: https://diffpy.github.io/diffpy.pdffit2 +.. |Icon| image:: https://avatars.githubusercontent.com/diffpy + :target: https://diffpy.github.io/diffpy.pdffit2 + :height: 100px -PDFfit2 -======================================================================== +|PyPi| |Forge| |PythonVersion| |PR| + +|CI| |Codecov| |Black| |Tracking| + +.. |Black| image:: https://img.shields.io/badge/code_style-black-black + :target: https://github.com/psf/black + +.. |CI| image:: https://github.com/diffpy/diffpy.pdffit2/actions/workflows/main.yml/badge.svg + :target: https://github.com/diffpy/diffpy.pdffit2/actions/workflows/main.yml + +.. |Codecov| image:: https://codecov.io/gh/diffpy/diffpy.pdffit2/branch/main/graph/badge.svg + :target: https://codecov.io/gh/diffpy/diffpy.pdffit2 + +.. |Forge| image:: https://img.shields.io/conda/vn/conda-forge/diffpy.pdffit2 + :target: https://anaconda.org/conda-forge/diffpy.pdffit2 + +.. |PR| image:: https://img.shields.io/badge/PR-Welcome-29ab47ff + +.. |PyPi| image:: https://img.shields.io/pypi/v/diffpy.pdffit2 + :target: https://pypi.org/project/diffpy.pdffit2/ + +.. |PythonVersion| image:: https://img.shields.io/pypi/pyversions/diffpy.pdffit2 + :target: https://pypi.org/project/diffpy.pdffit2/ + +.. |Tracking| image:: https://img.shields.io/badge/issue_tracking-github-blue + :target: https://github.com/diffpy/diffpy.pdffit2/issues Real space structure refinement to atomic pair distribution function. @@ -29,11 +58,18 @@ To learn more about diffpy.pdffit2 library, see the examples directory included in this distribution or the API documentation at http://www.diffpy.org/doc/pdffit2. +Citation +-------- + +If you use diffpy.pdffit2 in a scientific publication, we would like you to cite this package as + + diffpy.pdffit2 Package, https://github.com/diffpy/diffpy.pdffit2 -REQUIREMENTS ------------------------------------------------------------------------- -diffpy.pdffit2 requires Python 3.7 or later or 2.7 and +Installation +------------ + +diffpy.pdffit2 requires Python 3.10 or later and the following external software: * ``setuptools`` - software distribution tools for Python @@ -43,50 +79,44 @@ the following external software: * ``diffpy.structure`` - simple storage and manipulation of atomic structures, https://github.com/diffpy/diffpy.structure -We recommend to use `Anaconda Python `_ -as it allows to install all software dependencies together with -PDFfit2. For other Python distributions it is necessary to -install the required software separately. As an example, on Ubuntu -Linux some of the required software can be installed using :: - - sudo apt-get install \ - python-setuptools python-dev libgsl0-dev build-essential +---- +The preferred method is to use `Miniconda Python +`_ +and install from the "conda-forge" channel of Conda packages. -INSTALLATION ------------------------------------------------------------------------- +To add "conda-forge" to the conda channels, run the following in a terminal. :: -The preferred method is to use Anaconda Python and install from the -"conda-forge" channel of Anaconda packages :: + conda config --add channels conda-forge - conda install -c conda-forge diffpy.pdffit2 +We want to install our packages in a suitable conda environment. +The following creates and activates a new environment named ``diffpy.pdffit2_env`` :: -If you don't use Anaconda or prefer to install from sources, make -sure the required software is in place and run :: + conda create -n diffpy.pdffit2_env python=3 + conda activate diffpy.pdffit2_env - python setup.py install +Then, to fully install ``diffpy.pdffit2`` in our active environment, run :: -By default the files get installed to standard system directories, -which may require the use of ``sudo`` for write permissions. If -administrator (root) access is not available, consult the output from -``python setup.py install --help`` for options to install as a regular -user to other locations. The installation integrity can be -verified by changing to the HOME directory and running :: + conda install diffpy.pdffit2 - python -m diffpy.pdffit2.tests.rundeps +Another option is to use ``pip`` to download and install the latest release from +`Python Package Index `_. +To install using ``pip`` into your ``diffpy.pdffit2_env`` environment, we will also have to install dependencies :: -Anaconda Python allows to later update PDFfit2 using :: + pip install -r https://raw.githubusercontent.com/diffpy/diffpy.pdffit2/main/requirements/run.txt - conda update diffpy.pdffit2 +and then install the package :: -With other Python distributions use the easy_install program to -upgraded to the latest version :: + pip install diffpy.pdffit2 - easy_install --upgrade diffpy.pdffit2 +If you prefer to install from sources, after installing the dependencies, obtain the source archive from +`GitHub `_. Once installed, ``cd`` into your ``diffpy.pdffit2`` directory +and run the following :: + pip install . -DEVELOPMENT ------------------------------------------------------------------------- +Support and Contribute +---------------------- PDFfit2 is not developed anymore and is only maintained due to its status of a sole computational engine for PDFgui. We don't expect any @@ -97,12 +127,36 @@ at https://github.com/diffpy/diffpy.pdffit2. For an actively developed codes for PDF simulations see the DiffPy-CMI framework at http://www.diffpy.org. +---- + +`Diffpy user group `_ is the discussion forum for general questions and discussions about the use of diffpy.pdffit2. Please join the diffpy.pdffit2 users community by joining the Google group. The diffpy.pdffit2 project welcomes your expertise and enthusiasm! + +If you see a bug or want to request a feature, please `report it as an issue `_ and/or `submit a fix as a PR `_. You can also post it to the `Diffpy user group `_. + +Feel free to fork the project and contribute. To install diffpy.pdffit2 +in a development mode, with its sources being directly used by Python +rather than copied to a package directory, use the following in the root +directory :: + + pip install -e . + +To ensure code quality and to prevent accidental commits into the default branch, please set up the use of our pre-commit +hooks. + +1. Install pre-commit in your working environment by running ``conda install pre-commit``. + +2. Initialize pre-commit (one time only) ``pre-commit install``. + +Thereafter your code will be linted by black and isort and checked against flake8 before you can commit. +If it fails by black or isort, just rerun and it should pass (black and isort will modify the files so should +pass after they are modified). If the flake8 test fails please see the error messages and fix them manually before +trying to commit again. -CONTACTS ------------------------------------------------------------------------- +Improvements and fixes are always appreciated. -For more information on diffpy.pdffit2 please visit the project web-page: +Before contributing, please read our `Code of Conduct `_. -http://www.diffpy.org/ +Contact +------- -or email Prof. Simon Billinge at sb2896@columbia.edu. +For more information on diffpy.pdffit2 please visit the project `web-page `_ or email Prof. Simon Billinge at sb2896@columbia.edu. From d59c6ec50fa4d2aa0c19236b65b9216e6213135e Mon Sep 17 00:00:00 2001 From: Sam Andrello Date: Fri, 26 Jul 2024 13:32:43 -0400 Subject: [PATCH 075/104] cite paper instead of repo --- README.rst | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/README.rst b/README.rst index e4ddb15e..702131a4 100644 --- a/README.rst +++ b/README.rst @@ -61,10 +61,11 @@ http://www.diffpy.org/doc/pdffit2. Citation -------- -If you use diffpy.pdffit2 in a scientific publication, we would like you to cite this package as - - diffpy.pdffit2 Package, https://github.com/diffpy/diffpy.pdffit2 +If you use diffpy.pdffit2 in a scientific publication, we would like you to cite the following paper: + C\. L. Farrow, P. Juhás, J. W. Liu, D. Bryndin, E. S. Božin, J. Bloch, Th. Proffen + and S. J. L. Billinge, PDFfit2 and PDFgui: computer programs for studying nanostructure + in crystals (https://stacks.iop.org/0953-8984/19/335219), *J. Phys.: Condens. Matter*, 19, 335219 (2007) Installation ------------ From a70155143d60dc4f9923031427474fd0aaa3d2e8 Mon Sep 17 00:00:00 2001 From: Sam Andrello Date: Fri, 26 Jul 2024 13:35:18 -0400 Subject: [PATCH 076/104] fix citation in LICENSE.rst --- LICENSE.rst | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/LICENSE.rst b/LICENSE.rst index 9618d51a..daeacb69 100644 --- a/LICENSE.rst +++ b/LICENSE.rst @@ -5,10 +5,9 @@ If you use this program to do productive scientific research that leads to publication, we ask that you acknowledge use of the program by citing the following paper in your publication: - C. L. Farrow, P. Juhas, J. W. Liu, D. Bryndin, E. S. Bozin, - J. Bloch, Th. Proffen and S. J. L. Billinge, PDFfit2 and - PDFgui: computer programs for studying nanostructure in - crystals, J. Phys.: Condens. Matter 19, 335219 (2007) + C\. L. Farrow, P. Juhás, J. W. Liu, D. Bryndin, E. S. Božin, J. Bloch, Th. Proffen + and S. J. L. Billinge, PDFfit2 and PDFgui: computer programs for studying nanostructure + in crystals (https://stacks.iop.org/0953-8984/19/335219), *J. Phys.: Condens. Matter*, 19, 335219 (2007) Copyright 2006-2007, Board of Trustees of Michigan State University, Copyright 2008-2024, Board of Trustees of Columbia University in the From d6c6713ddfffbbd3eefb4098fcb76fa196e989c3 Mon Sep 17 00:00:00 2001 From: Sam Andrello Date: Sat, 27 Jul 2024 13:28:18 -0400 Subject: [PATCH 077/104] make docs.yml run on "cookie" branch (temp) --- .github/workflows/docs.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index a4661f5c..bbe70f33 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -4,6 +4,7 @@ on: push: branches: - main + - cookie # to be removed during merge to main release: jobs: From 93d5839fb24a6d872289ad1ff49461bfc1f01039 Mon Sep 17 00:00:00 2001 From: Sam Andrello Date: Sat, 27 Jul 2024 13:31:48 -0400 Subject: [PATCH 078/104] make docs.yml run on PRs --- .github/workflows/docs.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index bbe70f33..0b130f3d 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -5,6 +5,10 @@ on: branches: - main - cookie # to be removed during merge to main + pull_request: # to be removed during merge to main + branches: + - main + - cookie release: jobs: From 1fc8abdc2655b5b0c508c75bca91b4eb108cff8a Mon Sep 17 00:00:00 2001 From: Sam Andrello Date: Sat, 27 Jul 2024 14:13:12 -0400 Subject: [PATCH 079/104] only use diffpy.utils.rst docs API file --- .../api/diffpy.pdffit2..git.branches.rst | 9 ---- doc/source/api/diffpy.pdffit2..git.hooks.rst | 9 ---- doc/source/api/diffpy.pdffit2..git.info.rst | 9 ---- .../diffpy.pdffit2..git.logs.refs.heads.rst | 9 ---- ....pdffit2..git.logs.refs.remotes.origin.rst | 9 ---- .../diffpy.pdffit2..git.logs.refs.remotes.rst | 17 -------- .../api/diffpy.pdffit2..git.logs.refs.rst | 18 -------- doc/source/api/diffpy.pdffit2..git.logs.rst | 17 -------- .../api/diffpy.pdffit2..git.objects.info.rst | 9 ---- .../api/diffpy.pdffit2..git.objects.pack.rst | 9 ---- .../api/diffpy.pdffit2..git.objects.rst | 18 -------- .../api/diffpy.pdffit2..git.refs.heads.rst | 9 ---- ...iffpy.pdffit2..git.refs.remotes.origin.rst | 9 ---- .../api/diffpy.pdffit2..git.refs.remotes.rst | 17 -------- doc/source/api/diffpy.pdffit2..git.refs.rst | 19 --------- .../api/diffpy.pdffit2..git.refs.tags.rst | 9 ---- doc/source/api/diffpy.pdffit2..git.rst | 22 ---------- doc/source/api/diffpy.pdffit2..github.rst | 17 -------- .../api/diffpy.pdffit2..github.workflows.rst | 9 ---- ...iffpy.pdffit2..idea.inspectionProfiles.rst | 9 ---- doc/source/api/diffpy.pdffit2..idea.rst | 17 -------- .../api/diffpy.pdffit2.conda-recipe.rst | 20 --------- doc/source/api/diffpy.pdffit2.devutils.rst | 9 ---- doc/source/api/diffpy.pdffit2.dist.rst | 9 ---- doc/source/api/diffpy.pdffit2.doc.epydoc.rst | 9 ---- .../api/diffpy.pdffit2.doc.examples.rst | 36 ---------------- doc/source/api/diffpy.pdffit2.doc.rst | 19 --------- .../api/diffpy.pdffit2.doc.source._static.rst | 9 ---- .../api/diffpy.pdffit2.doc.source.api.rst | 9 ---- .../api/diffpy.pdffit2.doc.source.epydoc.rst | 9 ---- doc/source/api/diffpy.pdffit2.doc.source.rst | 30 -------------- doc/source/api/diffpy.pdffit2.news.rst | 9 ---- .../api/diffpy.pdffit2.requirements.rst | 9 ---- doc/source/api/diffpy.pdffit2.rst | 41 +++++++++---------- ...py.pdffit2.src.diffpy.pdffit2.egg-info.rst | 9 ---- .../api/diffpy.pdffit2.src.diffpy.pdffit2.rst | 36 ---------------- doc/source/api/diffpy.pdffit2.src.diffpy.rst | 17 -------- ...ffpy.pdffit2.src.extensions.libpdffit2.rst | 9 ---- ...y.pdffit2.src.extensions.pdffit2module.rst | 9 ---- .../api/diffpy.pdffit2.src.extensions.rst | 18 -------- doc/source/api/diffpy.pdffit2.src.rst | 19 --------- 41 files changed, 20 insertions(+), 585 deletions(-) delete mode 100644 doc/source/api/diffpy.pdffit2..git.branches.rst delete mode 100644 doc/source/api/diffpy.pdffit2..git.hooks.rst delete mode 100644 doc/source/api/diffpy.pdffit2..git.info.rst delete mode 100644 doc/source/api/diffpy.pdffit2..git.logs.refs.heads.rst delete mode 100644 doc/source/api/diffpy.pdffit2..git.logs.refs.remotes.origin.rst delete mode 100644 doc/source/api/diffpy.pdffit2..git.logs.refs.remotes.rst delete mode 100644 doc/source/api/diffpy.pdffit2..git.logs.refs.rst delete mode 100644 doc/source/api/diffpy.pdffit2..git.logs.rst delete mode 100644 doc/source/api/diffpy.pdffit2..git.objects.info.rst delete mode 100644 doc/source/api/diffpy.pdffit2..git.objects.pack.rst delete mode 100644 doc/source/api/diffpy.pdffit2..git.objects.rst delete mode 100644 doc/source/api/diffpy.pdffit2..git.refs.heads.rst delete mode 100644 doc/source/api/diffpy.pdffit2..git.refs.remotes.origin.rst delete mode 100644 doc/source/api/diffpy.pdffit2..git.refs.remotes.rst delete mode 100644 doc/source/api/diffpy.pdffit2..git.refs.rst delete mode 100644 doc/source/api/diffpy.pdffit2..git.refs.tags.rst delete mode 100644 doc/source/api/diffpy.pdffit2..git.rst delete mode 100644 doc/source/api/diffpy.pdffit2..github.rst delete mode 100644 doc/source/api/diffpy.pdffit2..github.workflows.rst delete mode 100644 doc/source/api/diffpy.pdffit2..idea.inspectionProfiles.rst delete mode 100644 doc/source/api/diffpy.pdffit2..idea.rst delete mode 100644 doc/source/api/diffpy.pdffit2.conda-recipe.rst delete mode 100644 doc/source/api/diffpy.pdffit2.devutils.rst delete mode 100644 doc/source/api/diffpy.pdffit2.dist.rst delete mode 100644 doc/source/api/diffpy.pdffit2.doc.epydoc.rst delete mode 100644 doc/source/api/diffpy.pdffit2.doc.examples.rst delete mode 100644 doc/source/api/diffpy.pdffit2.doc.rst delete mode 100644 doc/source/api/diffpy.pdffit2.doc.source._static.rst delete mode 100644 doc/source/api/diffpy.pdffit2.doc.source.api.rst delete mode 100644 doc/source/api/diffpy.pdffit2.doc.source.epydoc.rst delete mode 100644 doc/source/api/diffpy.pdffit2.doc.source.rst delete mode 100644 doc/source/api/diffpy.pdffit2.news.rst delete mode 100644 doc/source/api/diffpy.pdffit2.requirements.rst delete mode 100644 doc/source/api/diffpy.pdffit2.src.diffpy.pdffit2.egg-info.rst delete mode 100644 doc/source/api/diffpy.pdffit2.src.diffpy.pdffit2.rst delete mode 100644 doc/source/api/diffpy.pdffit2.src.diffpy.rst delete mode 100644 doc/source/api/diffpy.pdffit2.src.extensions.libpdffit2.rst delete mode 100644 doc/source/api/diffpy.pdffit2.src.extensions.pdffit2module.rst delete mode 100644 doc/source/api/diffpy.pdffit2.src.extensions.rst delete mode 100644 doc/source/api/diffpy.pdffit2.src.rst diff --git a/doc/source/api/diffpy.pdffit2..git.branches.rst b/doc/source/api/diffpy.pdffit2..git.branches.rst deleted file mode 100644 index 0c6e73ab..00000000 --- a/doc/source/api/diffpy.pdffit2..git.branches.rst +++ /dev/null @@ -1,9 +0,0 @@ -:tocdepth: -1 - -diffpy.pdffit2..git.branches package -==================================== - -.. automodule:: diffpy.pdffit2..git.branches - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/api/diffpy.pdffit2..git.hooks.rst b/doc/source/api/diffpy.pdffit2..git.hooks.rst deleted file mode 100644 index d3ff7bd8..00000000 --- a/doc/source/api/diffpy.pdffit2..git.hooks.rst +++ /dev/null @@ -1,9 +0,0 @@ -:tocdepth: -1 - -diffpy.pdffit2..git.hooks package -================================= - -.. automodule:: diffpy.pdffit2..git.hooks - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/api/diffpy.pdffit2..git.info.rst b/doc/source/api/diffpy.pdffit2..git.info.rst deleted file mode 100644 index df4ba70f..00000000 --- a/doc/source/api/diffpy.pdffit2..git.info.rst +++ /dev/null @@ -1,9 +0,0 @@ -:tocdepth: -1 - -diffpy.pdffit2..git.info package -================================ - -.. automodule:: diffpy.pdffit2..git.info - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/api/diffpy.pdffit2..git.logs.refs.heads.rst b/doc/source/api/diffpy.pdffit2..git.logs.refs.heads.rst deleted file mode 100644 index c488622f..00000000 --- a/doc/source/api/diffpy.pdffit2..git.logs.refs.heads.rst +++ /dev/null @@ -1,9 +0,0 @@ -:tocdepth: -1 - -diffpy.pdffit2..git.logs.refs.heads package -=========================================== - -.. automodule:: diffpy.pdffit2..git.logs.refs.heads - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/api/diffpy.pdffit2..git.logs.refs.remotes.origin.rst b/doc/source/api/diffpy.pdffit2..git.logs.refs.remotes.origin.rst deleted file mode 100644 index 730c957e..00000000 --- a/doc/source/api/diffpy.pdffit2..git.logs.refs.remotes.origin.rst +++ /dev/null @@ -1,9 +0,0 @@ -:tocdepth: -1 - -diffpy.pdffit2..git.logs.refs.remotes.origin package -==================================================== - -.. automodule:: diffpy.pdffit2..git.logs.refs.remotes.origin - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/api/diffpy.pdffit2..git.logs.refs.remotes.rst b/doc/source/api/diffpy.pdffit2..git.logs.refs.remotes.rst deleted file mode 100644 index 387272a7..00000000 --- a/doc/source/api/diffpy.pdffit2..git.logs.refs.remotes.rst +++ /dev/null @@ -1,17 +0,0 @@ -:tocdepth: -1 - -diffpy.pdffit2..git.logs.refs.remotes package -============================================= - -.. automodule:: diffpy.pdffit2..git.logs.refs.remotes - :members: - :undoc-members: - :show-inheritance: - -Subpackages ------------ - -.. toctree:: - :titlesonly: - - diffpy.pdffit2..git.logs.refs.remotes.origin diff --git a/doc/source/api/diffpy.pdffit2..git.logs.refs.rst b/doc/source/api/diffpy.pdffit2..git.logs.refs.rst deleted file mode 100644 index 725a8650..00000000 --- a/doc/source/api/diffpy.pdffit2..git.logs.refs.rst +++ /dev/null @@ -1,18 +0,0 @@ -:tocdepth: -1 - -diffpy.pdffit2..git.logs.refs package -===================================== - -.. automodule:: diffpy.pdffit2..git.logs.refs - :members: - :undoc-members: - :show-inheritance: - -Subpackages ------------ - -.. toctree:: - :titlesonly: - - diffpy.pdffit2..git.logs.refs.remotes - diffpy.pdffit2..git.logs.refs.heads diff --git a/doc/source/api/diffpy.pdffit2..git.logs.rst b/doc/source/api/diffpy.pdffit2..git.logs.rst deleted file mode 100644 index 9414abd1..00000000 --- a/doc/source/api/diffpy.pdffit2..git.logs.rst +++ /dev/null @@ -1,17 +0,0 @@ -:tocdepth: -1 - -diffpy.pdffit2..git.logs package -================================ - -.. automodule:: diffpy.pdffit2..git.logs - :members: - :undoc-members: - :show-inheritance: - -Subpackages ------------ - -.. toctree:: - :titlesonly: - - diffpy.pdffit2..git.logs.refs diff --git a/doc/source/api/diffpy.pdffit2..git.objects.info.rst b/doc/source/api/diffpy.pdffit2..git.objects.info.rst deleted file mode 100644 index 89d50d6d..00000000 --- a/doc/source/api/diffpy.pdffit2..git.objects.info.rst +++ /dev/null @@ -1,9 +0,0 @@ -:tocdepth: -1 - -diffpy.pdffit2..git.objects.info package -======================================== - -.. automodule:: diffpy.pdffit2..git.objects.info - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/api/diffpy.pdffit2..git.objects.pack.rst b/doc/source/api/diffpy.pdffit2..git.objects.pack.rst deleted file mode 100644 index 0193d5c0..00000000 --- a/doc/source/api/diffpy.pdffit2..git.objects.pack.rst +++ /dev/null @@ -1,9 +0,0 @@ -:tocdepth: -1 - -diffpy.pdffit2..git.objects.pack package -======================================== - -.. automodule:: diffpy.pdffit2..git.objects.pack - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/api/diffpy.pdffit2..git.objects.rst b/doc/source/api/diffpy.pdffit2..git.objects.rst deleted file mode 100644 index c498320d..00000000 --- a/doc/source/api/diffpy.pdffit2..git.objects.rst +++ /dev/null @@ -1,18 +0,0 @@ -:tocdepth: -1 - -diffpy.pdffit2..git.objects package -=================================== - -.. automodule:: diffpy.pdffit2..git.objects - :members: - :undoc-members: - :show-inheritance: - -Subpackages ------------ - -.. toctree:: - :titlesonly: - - diffpy.pdffit2..git.objects.info - diffpy.pdffit2..git.objects.pack diff --git a/doc/source/api/diffpy.pdffit2..git.refs.heads.rst b/doc/source/api/diffpy.pdffit2..git.refs.heads.rst deleted file mode 100644 index 0d457843..00000000 --- a/doc/source/api/diffpy.pdffit2..git.refs.heads.rst +++ /dev/null @@ -1,9 +0,0 @@ -:tocdepth: -1 - -diffpy.pdffit2..git.refs.heads package -====================================== - -.. automodule:: diffpy.pdffit2..git.refs.heads - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/api/diffpy.pdffit2..git.refs.remotes.origin.rst b/doc/source/api/diffpy.pdffit2..git.refs.remotes.origin.rst deleted file mode 100644 index c3ad19c3..00000000 --- a/doc/source/api/diffpy.pdffit2..git.refs.remotes.origin.rst +++ /dev/null @@ -1,9 +0,0 @@ -:tocdepth: -1 - -diffpy.pdffit2..git.refs.remotes.origin package -=============================================== - -.. automodule:: diffpy.pdffit2..git.refs.remotes.origin - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/api/diffpy.pdffit2..git.refs.remotes.rst b/doc/source/api/diffpy.pdffit2..git.refs.remotes.rst deleted file mode 100644 index dadf4c86..00000000 --- a/doc/source/api/diffpy.pdffit2..git.refs.remotes.rst +++ /dev/null @@ -1,17 +0,0 @@ -:tocdepth: -1 - -diffpy.pdffit2..git.refs.remotes package -======================================== - -.. automodule:: diffpy.pdffit2..git.refs.remotes - :members: - :undoc-members: - :show-inheritance: - -Subpackages ------------ - -.. toctree:: - :titlesonly: - - diffpy.pdffit2..git.refs.remotes.origin diff --git a/doc/source/api/diffpy.pdffit2..git.refs.rst b/doc/source/api/diffpy.pdffit2..git.refs.rst deleted file mode 100644 index 86ab1649..00000000 --- a/doc/source/api/diffpy.pdffit2..git.refs.rst +++ /dev/null @@ -1,19 +0,0 @@ -:tocdepth: -1 - -diffpy.pdffit2..git.refs package -================================ - -.. automodule:: diffpy.pdffit2..git.refs - :members: - :undoc-members: - :show-inheritance: - -Subpackages ------------ - -.. toctree:: - :titlesonly: - - diffpy.pdffit2..git.refs.tags - diffpy.pdffit2..git.refs.remotes - diffpy.pdffit2..git.refs.heads diff --git a/doc/source/api/diffpy.pdffit2..git.refs.tags.rst b/doc/source/api/diffpy.pdffit2..git.refs.tags.rst deleted file mode 100644 index c323a1ca..00000000 --- a/doc/source/api/diffpy.pdffit2..git.refs.tags.rst +++ /dev/null @@ -1,9 +0,0 @@ -:tocdepth: -1 - -diffpy.pdffit2..git.refs.tags package -===================================== - -.. automodule:: diffpy.pdffit2..git.refs.tags - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/api/diffpy.pdffit2..git.rst b/doc/source/api/diffpy.pdffit2..git.rst deleted file mode 100644 index c8c7eb31..00000000 --- a/doc/source/api/diffpy.pdffit2..git.rst +++ /dev/null @@ -1,22 +0,0 @@ -:tocdepth: -1 - -diffpy.pdffit2..git package -=========================== - -.. automodule:: diffpy.pdffit2..git - :members: - :undoc-members: - :show-inheritance: - -Subpackages ------------ - -.. toctree:: - :titlesonly: - - diffpy.pdffit2..git.hooks - diffpy.pdffit2..git.info - diffpy.pdffit2..git.branches - diffpy.pdffit2..git.objects - diffpy.pdffit2..git.logs - diffpy.pdffit2..git.refs diff --git a/doc/source/api/diffpy.pdffit2..github.rst b/doc/source/api/diffpy.pdffit2..github.rst deleted file mode 100644 index 3dc15783..00000000 --- a/doc/source/api/diffpy.pdffit2..github.rst +++ /dev/null @@ -1,17 +0,0 @@ -:tocdepth: -1 - -diffpy.pdffit2..github package -============================== - -.. automodule:: diffpy.pdffit2..github - :members: - :undoc-members: - :show-inheritance: - -Subpackages ------------ - -.. toctree:: - :titlesonly: - - diffpy.pdffit2..github.workflows diff --git a/doc/source/api/diffpy.pdffit2..github.workflows.rst b/doc/source/api/diffpy.pdffit2..github.workflows.rst deleted file mode 100644 index cb2abea2..00000000 --- a/doc/source/api/diffpy.pdffit2..github.workflows.rst +++ /dev/null @@ -1,9 +0,0 @@ -:tocdepth: -1 - -diffpy.pdffit2..github.workflows package -======================================== - -.. automodule:: diffpy.pdffit2..github.workflows - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/api/diffpy.pdffit2..idea.inspectionProfiles.rst b/doc/source/api/diffpy.pdffit2..idea.inspectionProfiles.rst deleted file mode 100644 index 553c86d6..00000000 --- a/doc/source/api/diffpy.pdffit2..idea.inspectionProfiles.rst +++ /dev/null @@ -1,9 +0,0 @@ -:tocdepth: -1 - -diffpy.pdffit2..idea.inspectionProfiles package -=============================================== - -.. automodule:: diffpy.pdffit2..idea.inspectionProfiles - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/api/diffpy.pdffit2..idea.rst b/doc/source/api/diffpy.pdffit2..idea.rst deleted file mode 100644 index a12d7ab7..00000000 --- a/doc/source/api/diffpy.pdffit2..idea.rst +++ /dev/null @@ -1,17 +0,0 @@ -:tocdepth: -1 - -diffpy.pdffit2..idea package -============================ - -.. automodule:: diffpy.pdffit2..idea - :members: - :undoc-members: - :show-inheritance: - -Subpackages ------------ - -.. toctree:: - :titlesonly: - - diffpy.pdffit2..idea.inspectionProfiles diff --git a/doc/source/api/diffpy.pdffit2.conda-recipe.rst b/doc/source/api/diffpy.pdffit2.conda-recipe.rst deleted file mode 100644 index 576bf96a..00000000 --- a/doc/source/api/diffpy.pdffit2.conda-recipe.rst +++ /dev/null @@ -1,20 +0,0 @@ -:tocdepth: -1 - -diffpy.pdffit2.conda-recipe package -=================================== - -.. automodule:: diffpy.pdffit2.conda-recipe - :members: - :undoc-members: - :show-inheritance: - -Submodules ----------- - -diffpy.pdffit2.conda-recipe.run_test module -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. automodule:: diffpy.pdffit2.conda-recipe.run_test - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/api/diffpy.pdffit2.devutils.rst b/doc/source/api/diffpy.pdffit2.devutils.rst deleted file mode 100644 index 672e2769..00000000 --- a/doc/source/api/diffpy.pdffit2.devutils.rst +++ /dev/null @@ -1,9 +0,0 @@ -:tocdepth: -1 - -diffpy.pdffit2.devutils package -=============================== - -.. automodule:: diffpy.pdffit2.devutils - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/api/diffpy.pdffit2.dist.rst b/doc/source/api/diffpy.pdffit2.dist.rst deleted file mode 100644 index 92f64b29..00000000 --- a/doc/source/api/diffpy.pdffit2.dist.rst +++ /dev/null @@ -1,9 +0,0 @@ -:tocdepth: -1 - -diffpy.pdffit2.dist package -=========================== - -.. automodule:: diffpy.pdffit2.dist - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/api/diffpy.pdffit2.doc.epydoc.rst b/doc/source/api/diffpy.pdffit2.doc.epydoc.rst deleted file mode 100644 index 6805542b..00000000 --- a/doc/source/api/diffpy.pdffit2.doc.epydoc.rst +++ /dev/null @@ -1,9 +0,0 @@ -:tocdepth: -1 - -diffpy.pdffit2.doc.epydoc package -================================= - -.. automodule:: diffpy.pdffit2.doc.epydoc - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/api/diffpy.pdffit2.doc.examples.rst b/doc/source/api/diffpy.pdffit2.doc.examples.rst deleted file mode 100644 index a65270c0..00000000 --- a/doc/source/api/diffpy.pdffit2.doc.examples.rst +++ /dev/null @@ -1,36 +0,0 @@ -:tocdepth: -1 - -diffpy.pdffit2.doc.examples package -=================================== - -.. automodule:: diffpy.pdffit2.doc.examples - :members: - :undoc-members: - :show-inheritance: - -Submodules ----------- - -diffpy.pdffit2.doc.examples.Ni_plot_pdf module -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. automodule:: diffpy.pdffit2.doc.examples.Ni_plot_pdf - :members: - :undoc-members: - :show-inheritance: - -diffpy.pdffit2.doc.examples.Ni_calculation module -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. automodule:: diffpy.pdffit2.doc.examples.Ni_calculation - :members: - :undoc-members: - :show-inheritance: - -diffpy.pdffit2.doc.examples.Ni_refinement module -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. automodule:: diffpy.pdffit2.doc.examples.Ni_refinement - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/api/diffpy.pdffit2.doc.rst b/doc/source/api/diffpy.pdffit2.doc.rst deleted file mode 100644 index 677d88a1..00000000 --- a/doc/source/api/diffpy.pdffit2.doc.rst +++ /dev/null @@ -1,19 +0,0 @@ -:tocdepth: -1 - -diffpy.pdffit2.doc package -========================== - -.. automodule:: diffpy.pdffit2.doc - :members: - :undoc-members: - :show-inheritance: - -Subpackages ------------ - -.. toctree:: - :titlesonly: - - diffpy.pdffit2.doc.epydoc - diffpy.pdffit2.doc.source - diffpy.pdffit2.doc.examples diff --git a/doc/source/api/diffpy.pdffit2.doc.source._static.rst b/doc/source/api/diffpy.pdffit2.doc.source._static.rst deleted file mode 100644 index 91e43b85..00000000 --- a/doc/source/api/diffpy.pdffit2.doc.source._static.rst +++ /dev/null @@ -1,9 +0,0 @@ -:tocdepth: -1 - -diffpy.pdffit2.doc.source._static package -========================================= - -.. automodule:: diffpy.pdffit2.doc.source._static - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/api/diffpy.pdffit2.doc.source.api.rst b/doc/source/api/diffpy.pdffit2.doc.source.api.rst deleted file mode 100644 index ac900b93..00000000 --- a/doc/source/api/diffpy.pdffit2.doc.source.api.rst +++ /dev/null @@ -1,9 +0,0 @@ -:tocdepth: -1 - -diffpy.pdffit2.doc.source.api package -===================================== - -.. automodule:: diffpy.pdffit2.doc.source.api - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/api/diffpy.pdffit2.doc.source.epydoc.rst b/doc/source/api/diffpy.pdffit2.doc.source.epydoc.rst deleted file mode 100644 index 42d5a199..00000000 --- a/doc/source/api/diffpy.pdffit2.doc.source.epydoc.rst +++ /dev/null @@ -1,9 +0,0 @@ -:tocdepth: -1 - -diffpy.pdffit2.doc.source.epydoc package -======================================== - -.. automodule:: diffpy.pdffit2.doc.source.epydoc - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/api/diffpy.pdffit2.doc.source.rst b/doc/source/api/diffpy.pdffit2.doc.source.rst deleted file mode 100644 index 7d962e6e..00000000 --- a/doc/source/api/diffpy.pdffit2.doc.source.rst +++ /dev/null @@ -1,30 +0,0 @@ -:tocdepth: -1 - -diffpy.pdffit2.doc.source package -================================= - -.. automodule:: diffpy.pdffit2.doc.source - :members: - :undoc-members: - :show-inheritance: - -Subpackages ------------ - -.. toctree:: - :titlesonly: - - diffpy.pdffit2.doc.source.epydoc - diffpy.pdffit2.doc.source._static - diffpy.pdffit2.doc.source.api - -Submodules ----------- - -diffpy.pdffit2.doc.source.conf module -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. automodule:: diffpy.pdffit2.doc.source.conf - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/api/diffpy.pdffit2.news.rst b/doc/source/api/diffpy.pdffit2.news.rst deleted file mode 100644 index 6eeeb455..00000000 --- a/doc/source/api/diffpy.pdffit2.news.rst +++ /dev/null @@ -1,9 +0,0 @@ -:tocdepth: -1 - -diffpy.pdffit2.news package -=========================== - -.. automodule:: diffpy.pdffit2.news - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/api/diffpy.pdffit2.requirements.rst b/doc/source/api/diffpy.pdffit2.requirements.rst deleted file mode 100644 index c1174b54..00000000 --- a/doc/source/api/diffpy.pdffit2.requirements.rst +++ /dev/null @@ -1,9 +0,0 @@ -:tocdepth: -1 - -diffpy.pdffit2.requirements package -=================================== - -.. automodule:: diffpy.pdffit2.requirements - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/api/diffpy.pdffit2.rst b/doc/source/api/diffpy.pdffit2.rst index 01fff3d2..67d7d4d9 100644 --- a/doc/source/api/diffpy.pdffit2.rst +++ b/doc/source/api/diffpy.pdffit2.rst @@ -1,37 +1,36 @@ :tocdepth: -1 diffpy.pdffit2 package -====================== +==================== -.. automodule:: diffpy.pdffit2 +.. automodule:: diffpy.utils :members: :undoc-members: :show-inheritance: -Subpackages ------------ +Submodules +---------- -.. toctree:: - :titlesonly: +diffpy.pdffit2.ipy_ext module +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - diffpy.pdffit2.conda-recipe - diffpy.pdffit2.doc - diffpy.pdffit2.dist - diffpy.pdffit2..idea - diffpy.pdffit2.src - diffpy.pdffit2.news - diffpy.pdffit2..github - diffpy.pdffit2.devutils - diffpy.pdffit2.requirements - diffpy.pdffit2..git +.. automodule:: diffpy.pdffit2.ipy_ext + :members: + :undoc-members: + :show-inheritance: -Submodules ----------- +diffpy.pdffit2.pdffit module +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. automodule:: diffpy.pdffit2.pdffit + :members: + :undoc-members: + :show-inheritance: -diffpy.pdffit2.setup module -^^^^^^^^^^^^^^^^^^^^^^^^^^^ +diffpy.pdffit2.output module +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -.. automodule:: diffpy.pdffit2.setup +.. automodule:: diffpy.pdffit2.output :members: :undoc-members: :show-inheritance: diff --git a/doc/source/api/diffpy.pdffit2.src.diffpy.pdffit2.egg-info.rst b/doc/source/api/diffpy.pdffit2.src.diffpy.pdffit2.egg-info.rst deleted file mode 100644 index 1c4e8989..00000000 --- a/doc/source/api/diffpy.pdffit2.src.diffpy.pdffit2.egg-info.rst +++ /dev/null @@ -1,9 +0,0 @@ -:tocdepth: -1 - -diffpy.pdffit2.src.diffpy.pdffit2.egg-info package -================================================== - -.. automodule:: diffpy.pdffit2.src.diffpy.pdffit2.egg-info - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/api/diffpy.pdffit2.src.diffpy.pdffit2.rst b/doc/source/api/diffpy.pdffit2.src.diffpy.pdffit2.rst deleted file mode 100644 index af492535..00000000 --- a/doc/source/api/diffpy.pdffit2.src.diffpy.pdffit2.rst +++ /dev/null @@ -1,36 +0,0 @@ -:tocdepth: -1 - -diffpy.pdffit2.src.diffpy.pdffit2 package -========================================= - -.. automodule:: diffpy.pdffit2.src.diffpy.pdffit2 - :members: - :undoc-members: - :show-inheritance: - -Submodules ----------- - -diffpy.pdffit2.src.diffpy.pdffit2.ipy_ext module -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. automodule:: diffpy.pdffit2.src.diffpy.pdffit2.ipy_ext - :members: - :undoc-members: - :show-inheritance: - -diffpy.pdffit2.src.diffpy.pdffit2.pdffit module -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. automodule:: diffpy.pdffit2.src.diffpy.pdffit2.pdffit - :members: - :undoc-members: - :show-inheritance: - -diffpy.pdffit2.src.diffpy.pdffit2.output module -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. automodule:: diffpy.pdffit2.src.diffpy.pdffit2.output - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/api/diffpy.pdffit2.src.diffpy.rst b/doc/source/api/diffpy.pdffit2.src.diffpy.rst deleted file mode 100644 index d49a5646..00000000 --- a/doc/source/api/diffpy.pdffit2.src.diffpy.rst +++ /dev/null @@ -1,17 +0,0 @@ -:tocdepth: -1 - -diffpy.pdffit2.src.diffpy package -================================= - -.. automodule:: diffpy.pdffit2.src.diffpy - :members: - :undoc-members: - :show-inheritance: - -Subpackages ------------ - -.. toctree:: - :titlesonly: - - diffpy.pdffit2.src.diffpy.pdffit2 diff --git a/doc/source/api/diffpy.pdffit2.src.extensions.libpdffit2.rst b/doc/source/api/diffpy.pdffit2.src.extensions.libpdffit2.rst deleted file mode 100644 index 7179332d..00000000 --- a/doc/source/api/diffpy.pdffit2.src.extensions.libpdffit2.rst +++ /dev/null @@ -1,9 +0,0 @@ -:tocdepth: -1 - -diffpy.pdffit2.src.extensions.libpdffit2 package -================================================ - -.. automodule:: diffpy.pdffit2.src.extensions.libpdffit2 - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/api/diffpy.pdffit2.src.extensions.pdffit2module.rst b/doc/source/api/diffpy.pdffit2.src.extensions.pdffit2module.rst deleted file mode 100644 index 7cfa4606..00000000 --- a/doc/source/api/diffpy.pdffit2.src.extensions.pdffit2module.rst +++ /dev/null @@ -1,9 +0,0 @@ -:tocdepth: -1 - -diffpy.pdffit2.src.extensions.pdffit2module package -=================================================== - -.. automodule:: diffpy.pdffit2.src.extensions.pdffit2module - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/api/diffpy.pdffit2.src.extensions.rst b/doc/source/api/diffpy.pdffit2.src.extensions.rst deleted file mode 100644 index 83339b3a..00000000 --- a/doc/source/api/diffpy.pdffit2.src.extensions.rst +++ /dev/null @@ -1,18 +0,0 @@ -:tocdepth: -1 - -diffpy.pdffit2.src.extensions package -===================================== - -.. automodule:: diffpy.pdffit2.src.extensions - :members: - :undoc-members: - :show-inheritance: - -Subpackages ------------ - -.. toctree:: - :titlesonly: - - diffpy.pdffit2.src.extensions.libpdffit2 - diffpy.pdffit2.src.extensions.pdffit2module diff --git a/doc/source/api/diffpy.pdffit2.src.rst b/doc/source/api/diffpy.pdffit2.src.rst deleted file mode 100644 index 2fbc5dbc..00000000 --- a/doc/source/api/diffpy.pdffit2.src.rst +++ /dev/null @@ -1,19 +0,0 @@ -:tocdepth: -1 - -diffpy.pdffit2.src package -========================== - -.. automodule:: diffpy.pdffit2.src - :members: - :undoc-members: - :show-inheritance: - -Subpackages ------------ - -.. toctree:: - :titlesonly: - - diffpy.pdffit2.src.diffpy - diffpy.pdffit2.src.diffpy.pdffit2.egg-info - diffpy.pdffit2.src.extensions From 7425a8a802c634620b819bdf3fe889373febf7e2 Mon Sep 17 00:00:00 2001 From: Sam Andrello Date: Sat, 27 Jul 2024 14:14:41 -0400 Subject: [PATCH 080/104] give appropriate perms to docs.yml --- .github/workflows/docs.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 0b130f3d..52cfaffa 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -14,6 +14,9 @@ on: jobs: test: runs-on: ubuntu-latest + permissions: # to be removed during merge to main + contents: write + pages: write defaults: run: shell: bash -l {0} From a0770f0ae3eaf927bf7de0c30b5bbc91037425a4 Mon Sep 17 00:00:00 2001 From: Sam Andrello Date: Sat, 27 Jul 2024 14:15:34 -0400 Subject: [PATCH 081/104] use correct license in docs --- doc/source/license.rst | 36 +----------------------------------- 1 file changed, 1 insertion(+), 35 deletions(-) diff --git a/doc/source/license.rst b/doc/source/license.rst index cfab61c2..421a9ed7 100644 --- a/doc/source/license.rst +++ b/doc/source/license.rst @@ -2,38 +2,4 @@ .. index:: license -License -####### - -OPEN SOURCE LICENSE AGREEMENT -============================= -BSD 3-Clause License - -Copyright (c) 2024, The Trustees of Columbia University in -the City of New York. -All Rights Reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -3. Neither the name of the copyright holder nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +.. include:: ../../LICENSE.rst From 1fb7ed3034fc785068aaf92526a5920d9ceed45a Mon Sep 17 00:00:00 2001 From: Simon Billinge Date: Sat, 27 Jul 2024 14:18:39 -0400 Subject: [PATCH 082/104] Update PAT in docs.yml --- .github/workflows/docs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 0b130f3d..138a4da1 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -44,5 +44,5 @@ jobs: - name: Deploy uses: peaceiris/actions-gh-pages@v3 with: - github_token: ${{ secrets.GITHUB_TOKEN }} + github_token: ${{ secrets.GH_PAT }} publish_dir: ./doc/build/html From 50f6211ddacaee338b99ba0fe17a4638ffb85e06 Mon Sep 17 00:00:00 2001 From: Sam Andrello Date: Sat, 27 Jul 2024 14:20:34 -0400 Subject: [PATCH 083/104] add title to license --- LICENSE.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/LICENSE.rst b/LICENSE.rst index 9618d51a..d92c65ab 100644 --- a/LICENSE.rst +++ b/LICENSE.rst @@ -1,3 +1,6 @@ +License +####### + This program is part of the DiffPy and DANSE open-source projects and is available subject to the conditions and terms laid out below. From 27cd30f86f5aea524fb78a86d0ae641d0b25eee4 Mon Sep 17 00:00:00 2001 From: Sam Andrello Date: Sat, 27 Jul 2024 14:24:17 -0400 Subject: [PATCH 084/104] minor doc api file reformatting --- doc/source/api/diffpy.pdffit2.rst | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/doc/source/api/diffpy.pdffit2.rst b/doc/source/api/diffpy.pdffit2.rst index 67d7d4d9..cd474770 100644 --- a/doc/source/api/diffpy.pdffit2.rst +++ b/doc/source/api/diffpy.pdffit2.rst @@ -1,18 +1,15 @@ :tocdepth: -1 diffpy.pdffit2 package -==================== +====================== -.. automodule:: diffpy.utils +.. automodule:: diffpy.pdffit2 :members: :undoc-members: :show-inheritance: -Submodules ----------- - diffpy.pdffit2.ipy_ext module -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +----------------------------- .. automodule:: diffpy.pdffit2.ipy_ext :members: @@ -20,7 +17,7 @@ diffpy.pdffit2.ipy_ext module :show-inheritance: diffpy.pdffit2.pdffit module -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +----------------------------- .. automodule:: diffpy.pdffit2.pdffit :members: @@ -28,7 +25,7 @@ diffpy.pdffit2.pdffit module :show-inheritance: diffpy.pdffit2.output module -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +----------------------------- .. automodule:: diffpy.pdffit2.output :members: From 9d77b5e632e149506205dd594df795849bfe5a6d Mon Sep 17 00:00:00 2001 From: Simon Billinge Date: Sat, 27 Jul 2024 14:27:36 -0400 Subject: [PATCH 085/104] Update try reverting permissions in docs.yml --- .github/workflows/docs.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 06048b60..0b130f3d 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -14,9 +14,6 @@ on: jobs: test: runs-on: ubuntu-latest - permissions: # to be removed during merge to main - contents: write - pages: write defaults: run: shell: bash -l {0} @@ -47,5 +44,5 @@ jobs: - name: Deploy uses: peaceiris/actions-gh-pages@v3 with: - github_token: ${{ secrets.GH_PAT }} + github_token: ${{ secrets.GITHUB_TOKEN }} publish_dir: ./doc/build/html From cdda60207f3b05fac8598cb5b5b878fd4cce52fb Mon Sep 17 00:00:00 2001 From: Simon Billinge Date: Sat, 27 Jul 2024 14:32:42 -0400 Subject: [PATCH 086/104] remove on pr in docs.yml --- .github/workflows/docs.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 0b130f3d..bbe70f33 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -5,10 +5,6 @@ on: branches: - main - cookie # to be removed during merge to main - pull_request: # to be removed during merge to main - branches: - - main - - cookie release: jobs: From 26b9e2e2e215621cc55acc2e8e7f3e9f5e676939 Mon Sep 17 00:00:00 2001 From: Sam Andrello Date: Sat, 27 Jul 2024 15:11:36 -0400 Subject: [PATCH 087/104] multi-platform testing --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 00f20efe..3477e4f3 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -14,7 +14,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: ["ubuntu-latest"] + os: ["ubuntu-latest", "windows-latest", "macos-latest"] steps: - name: check out diffpy.pdffit2 uses: actions/checkout@v3 From b97db665ee476d1d2270a8a9e99f549d15a93b66 Mon Sep 17 00:00:00 2001 From: Sam Andrello Date: Sat, 27 Jul 2024 15:13:14 -0400 Subject: [PATCH 088/104] test on multiple python versions --- .github/workflows/main.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 3477e4f3..6b02aa61 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -14,6 +14,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: + python-version: ['3.10', '3.11', '3.12'] os: ["ubuntu-latest", "windows-latest", "macos-latest"] steps: - name: check out diffpy.pdffit2 @@ -33,7 +34,7 @@ jobs: # maintain this but rather maintain the requirements files it just has # basic things in it like conda and pip environment-file: ./environment.yml - python-version: 3 + python-version: ${{ matrix.python-version }} auto-activate-base: false - name: install diffpy.pdffit2 requirements From 5bf577b17312aa8452fa47f4cecb8ba3f7b10b2d Mon Sep 17 00:00:00 2001 From: Sam Andrello Date: Sat, 27 Jul 2024 15:22:56 -0400 Subject: [PATCH 089/104] update miniconda installation step --- .github/workflows/main.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 6b02aa61..f54dd8c8 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -27,8 +27,9 @@ jobs: - name: initialize miniconda # this uses a marketplace action that sets up miniconda in a way that makes # it easier to use. I tried setting it up without this and it was a pain - uses: conda-incubator/setup-miniconda@v2 + uses: conda-incubator/setup-miniconda@v3 with: + miniconda-version: "latest" activate-environment: test # environment.yml file is needed by this action. Because I don't want # maintain this but rather maintain the requirements files it just has From 40594b8ba30a57054720691d1df79c9f75f116d0 Mon Sep 17 00:00:00 2001 From: Sam Andrello Date: Sat, 27 Jul 2024 15:25:00 -0400 Subject: [PATCH 090/104] add specific version and conda to environment.yml --- environment.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/environment.yml b/environment.yml index 0e55d589..804cd50c 100644 --- a/environment.yml +++ b/environment.yml @@ -2,8 +2,9 @@ name: diffpy.pdffit2 channels: - conda-forge dependencies: - - python=3 + - python=${{ matrix.python-version }} - pip + - conda - gsl - gcc - gxx From 384f7dd0633fd3cc397756fdf55f6a495e65f5e0 Mon Sep 17 00:00:00 2001 From: Sam Andrello Date: Sat, 27 Jul 2024 15:27:34 -0400 Subject: [PATCH 091/104] remove rever.xsh --- rever.xsh | 14 -------------- 1 file changed, 14 deletions(-) delete mode 100644 rever.xsh diff --git a/rever.xsh b/rever.xsh deleted file mode 100644 index 2af270b9..00000000 --- a/rever.xsh +++ /dev/null @@ -1,14 +0,0 @@ -$PROJECT = 'diffpy.pdffit2' -$ACTIVITIES = [ - 'tag', # Creates a tag for the new version number - 'push_tag', # Pushes the tag up to the $TAG_REMOTE - 'pypi', # Sends the package to pypi - 'ghrelease' # Creates a Github release entry for the new tag - ] -$PUSH_TAG_REMOTE = 'git@github.com:diffpy/diffpy.pdffit2.git' # Repo to push tags to -$GITHUB_ORG = 'diffpy' # Github org for Github releases and conda-forge -$GITHUB_REPO = 'diffpy.pdffit2' # Github repo for Github releases and conda-forge -$GHRELEASE_PREPEND = """See [CHANGELOG.md](CHANGELOG.md) for detailed release notes. - -The release is also available at [PyPI](https://pypi.org/project/diffpy.pdffit2/) and [Conda](https://anaconda.org/conda-forge/diffpy.pdffit2). -""" # release message From b746b47729815ddf28fca516babf4c48d0a530f4 Mon Sep 17 00:00:00 2001 From: Sam Andrello Date: Sat, 27 Jul 2024 15:31:42 -0400 Subject: [PATCH 092/104] change environment.yml python version to range --- environment.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/environment.yml b/environment.yml index 804cd50c..6956a79d 100644 --- a/environment.yml +++ b/environment.yml @@ -2,7 +2,7 @@ name: diffpy.pdffit2 channels: - conda-forge dependencies: - - python=${{ matrix.python-version }} + - python>=3.10 - pip - conda - gsl From b4878cb70fd76436cd964bedba53678443206027 Mon Sep 17 00:00:00 2001 From: Sam Andrello Date: Sat, 27 Jul 2024 15:34:17 -0400 Subject: [PATCH 093/104] remove mac support --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f54dd8c8..a49b7e63 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -15,7 +15,7 @@ jobs: strategy: matrix: python-version: ['3.10', '3.11', '3.12'] - os: ["ubuntu-latest", "windows-latest", "macos-latest"] + os: ["ubuntu-latest", "windows-latest"] steps: - name: check out diffpy.pdffit2 uses: actions/checkout@v3 From 5ed4cda8a6c2ae55ffc9e34e49963e063d5dc85f Mon Sep 17 00:00:00 2001 From: Sparky <59151395+Sparks29032@users.noreply.github.com> Date: Mon, 29 Jul 2024 21:43:54 -0400 Subject: [PATCH 094/104] Add macos test --- .github/workflows/main.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a49b7e63..b0921bad 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -5,6 +5,7 @@ on: branches: - main - CI + - cookie pull_request: workflow_dispatch: @@ -15,7 +16,7 @@ jobs: strategy: matrix: python-version: ['3.10', '3.11', '3.12'] - os: ["ubuntu-latest", "windows-latest"] + os: ["macos-latest", "ubuntu-latest", "windows-latest"] steps: - name: check out diffpy.pdffit2 uses: actions/checkout@v3 From dbb35a028dcfdc4fcc22947b6a6e8c657958d718 Mon Sep 17 00:00:00 2001 From: Sparky <59151395+Sparks29032@users.noreply.github.com> Date: Mon, 29 Jul 2024 21:53:32 -0400 Subject: [PATCH 095/104] Update main.yml --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b0921bad..86c3c040 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -35,7 +35,7 @@ jobs: # environment.yml file is needed by this action. Because I don't want # maintain this but rather maintain the requirements files it just has # basic things in it like conda and pip - environment-file: ./environment.yml + environment-file: environment.yml python-version: ${{ matrix.python-version }} auto-activate-base: false From e764aadd486164c214983137872bfb4df501e408 Mon Sep 17 00:00:00 2001 From: Sparky <59151395+Sparks29032@users.noreply.github.com> Date: Mon, 29 Jul 2024 21:55:10 -0400 Subject: [PATCH 096/104] Update environment.yml --- environment.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/environment.yml b/environment.yml index 6956a79d..5fb2f044 100644 --- a/environment.yml +++ b/environment.yml @@ -5,6 +5,3 @@ dependencies: - python>=3.10 - pip - conda - - gsl - - gcc - - gxx From b8cb8e78885b1bd454b8d6b592ef4c61e6876fa5 Mon Sep 17 00:00:00 2001 From: Sparky <59151395+Sparks29032@users.noreply.github.com> Date: Mon, 29 Jul 2024 22:38:45 -0400 Subject: [PATCH 097/104] Update main.yml --- .github/workflows/main.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 86c3c040..437a7e67 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -45,6 +45,7 @@ jobs: conda config --set always_yes yes --set changeps1 no conda config --add channels conda-forge conda activate test + conda install --file requirements/build.txt conda install --file requirements/run.txt conda install --file requirements/test.txt pip install . From 9e20621990662598b98150d2057edad22057e342 Mon Sep 17 00:00:00 2001 From: Sparky <59151395+Sparks29032@users.noreply.github.com> Date: Mon, 29 Jul 2024 22:38:59 -0400 Subject: [PATCH 098/104] Update build.txt --- requirements/build.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/requirements/build.txt b/requirements/build.txt index f72d870d..23094c91 100644 --- a/requirements/build.txt +++ b/requirements/build.txt @@ -1,2 +1,3 @@ python setuptools +gsl From 5789b7d260ea51895a19c87a2d02c6a17eb7322b Mon Sep 17 00:00:00 2001 From: Simon Billinge Date: Wed, 31 Jul 2024 07:21:24 -0400 Subject: [PATCH 099/104] don't test on push into cookie any more, linting coveragerc --- .coveragerc | 8 ++++---- .github/workflows/main.yml | 1 - 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/.coveragerc b/.coveragerc index e20b9438..13b71cd9 100644 --- a/.coveragerc +++ b/.coveragerc @@ -2,7 +2,7 @@ source = diffpy.pdffit2 omit = - ## exclude debug.py from codecov report + # exclude debug.py from codecov report */tests/debug.py [report] omit = @@ -13,14 +13,14 @@ omit = *_version.py # RE patterns for lines to be excluded from consideration. exclude_lines = - ## Have to re-enable the standard pragma + # Have to re-enable the standard pragma pragma: no cover - ## Don't complain if tests don't hit defensive assertion code: + # Don't complain if tests don't hit defensive assertion code: raise AssertionError raise NotImplementedError ^[ ]*assert False - ## Don't complain if non-runnable code isn't run: + # Don't complain if non-runnable code isn't run: ^[ ]*@unittest.skip\b ^[ ]{4}unittest.main() if __name__ == '__main__': diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 437a7e67..6ebff6a1 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -5,7 +5,6 @@ on: branches: - main - CI - - cookie pull_request: workflow_dispatch: From 79b93f56767ee0ae5f0030fdec5012f1e39e688f Mon Sep 17 00:00:00 2001 From: Sparky <59151395+Sparks29032@users.noreply.github.com> Date: Wed, 31 Jul 2024 11:59:55 -0400 Subject: [PATCH 100/104] Small edit --- setup.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/setup.py b/setup.py index 5cac1080..a623ecb3 100755 --- a/setup.py +++ b/setup.py @@ -16,9 +16,6 @@ from setuptools import Extension, find_packages, setup MYDIR = os.path.dirname(os.path.abspath(__file__)) -versioncfgfile = os.path.join(MYDIR, "src/diffpy/pdffit2/version.cfg") -gitarchivecfgfile = os.path.join(MYDIR, ".gitarchive.cfg") - # Helper functions ----------------------------------------------------------- From 5db7cf6ec82466e0d4b6dfa78904c73c10f6b19b Mon Sep 17 00:00:00 2001 From: Sam Andrello Date: Wed, 31 Jul 2024 12:37:17 -0400 Subject: [PATCH 101/104] remove unnecessary setuptools stuff --- pyproject.toml | 3 --- 1 file changed, 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 665112c4..6945ff83 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -36,9 +36,6 @@ classifiers = [ Homepage = "https://github.com/diffpy/diffpy.pdffit2/" Issues = "https://github.com/diffpy/diffpy.pdffit2/issues/" -[tools.setuptools] -package-dir = {"" = "src"} - [tool.setuptools-git-versioning] enabled = true template = "{tag}" From 76545d006aac244c00290908c5a4b1fec00781e9 Mon Sep 17 00:00:00 2001 From: Sparks29032 Date: Wed, 31 Jul 2024 13:01:42 -0400 Subject: [PATCH 102/104] Match cookiecutter --- setup.py | 59 ++++++++++++++++++++++---------------------------------- 1 file changed, 23 insertions(+), 36 deletions(-) diff --git a/setup.py b/setup.py index a623ecb3..6842274d 100755 --- a/setup.py +++ b/setup.py @@ -11,10 +11,16 @@ import os import re import sys +import glob import warnings from setuptools import Extension, find_packages, setup + +# Use this version when git data are not available, like in git zip archive. +# Update when tagging a new release. +FALLBACK_VERSION = '1.4.3' + MYDIR = os.path.dirname(os.path.abspath(__file__)) # Helper functions ----------------------------------------------------------- @@ -98,50 +104,31 @@ def get_gsl_config_win(): library_dirs += gcfg["library_dirs"] # add optimization flags for other compilers if needed +# define extension arguments here +ext_kws = { + 'include_dirs': include_dirs, + 'libraries': libraries, + 'library_dirs': library_dirs, + 'define_macros': define_macros, + 'extra_compile_args': extra_compile_args, + 'extra_link_args': extra_link_args, + 'extra_objects': extra_objects, +} # define extension here -pdffit2module = Extension( +def create_extensions(): + ext = Extension( "diffpy.pdffit2.pdffit2", - [ - "src/extensions/pdffit2module/bindings.cc", - "src/extensions/pdffit2module/misc.cc", - "src/extensions/pdffit2module/pdffit2module.cc", - "src/extensions/pdffit2module/pyexceptions.cc", - "src/extensions/libpdffit2/Atom.cc", - "src/extensions/libpdffit2/LocalPeriodicTable.cc", - "src/extensions/libpdffit2/OutputStreams.cc", - "src/extensions/libpdffit2/PeriodicTable.cc", - "src/extensions/libpdffit2/PointsInSphere.cc", - "src/extensions/libpdffit2/StringUtils.cc", - "src/extensions/libpdffit2/fit.cc", - "src/extensions/libpdffit2/gaussj.cc", - "src/extensions/libpdffit2/metric.cc", - "src/extensions/libpdffit2/nrutil.cc", - "src/extensions/libpdffit2/output.cc", - "src/extensions/libpdffit2/parser.cc", - "src/extensions/libpdffit2/pdf.cc", - "src/extensions/libpdffit2/pdffit.cc", - "src/extensions/libpdffit2/pdflsmin.cc", - "src/extensions/libpdffit2/scatlen.cc", - "src/extensions/libpdffit2/stru.cc", - ], - include_dirs=include_dirs, - libraries=libraries, - library_dirs=library_dirs, - define_macros=define_macros, - extra_compile_args=extra_compile_args, - extra_link_args=extra_link_args, - extra_objects=extra_objects, -) + glob.glob('src/extensions/**/*.cc'), + **ext_kws) + return [ext] setup_args = dict( - packages=find_packages(where="src"), - package_dir={"": "src"}, - ext_modules=[pdffit2module], - # scripts=[] # place examples here + ext_modules = [], ) if __name__ == "__main__": + setup_args['ext_modules'] = create_extensions() setup(**setup_args) # End of file From 7ca10bc7fb4d95cfe1651704cf29b2d1955f85be Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 31 Jul 2024 17:05:18 +0000 Subject: [PATCH 103/104] [pre-commit.ci] auto fixes from pre-commit hooks --- setup.py | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/setup.py b/setup.py index 6842274d..ec2d270f 100755 --- a/setup.py +++ b/setup.py @@ -8,18 +8,17 @@ Scripts: pdffit2 """ +import glob import os import re import sys -import glob import warnings from setuptools import Extension, find_packages, setup - # Use this version when git data are not available, like in git zip archive. # Update when tagging a new release. -FALLBACK_VERSION = '1.4.3' +FALLBACK_VERSION = "1.4.3" MYDIR = os.path.dirname(os.path.abspath(__file__)) @@ -106,29 +105,28 @@ def get_gsl_config_win(): # define extension arguments here ext_kws = { - 'include_dirs': include_dirs, - 'libraries': libraries, - 'library_dirs': library_dirs, - 'define_macros': define_macros, - 'extra_compile_args': extra_compile_args, - 'extra_link_args': extra_link_args, - 'extra_objects': extra_objects, + "include_dirs": include_dirs, + "libraries": libraries, + "library_dirs": library_dirs, + "define_macros": define_macros, + "extra_compile_args": extra_compile_args, + "extra_link_args": extra_link_args, + "extra_objects": extra_objects, } + # define extension here def create_extensions(): - ext = Extension( - "diffpy.pdffit2.pdffit2", - glob.glob('src/extensions/**/*.cc'), - **ext_kws) + ext = Extension("diffpy.pdffit2.pdffit2", glob.glob("src/extensions/**/*.cc"), **ext_kws) return [ext] + setup_args = dict( - ext_modules = [], + ext_modules=[], ) if __name__ == "__main__": - setup_args['ext_modules'] = create_extensions() + setup_args["ext_modules"] = create_extensions() setup(**setup_args) # End of file From 334ab8d412a65db03d61be6033cf48c2934e4b03 Mon Sep 17 00:00:00 2001 From: Sparks29032 Date: Wed, 31 Jul 2024 13:08:06 -0400 Subject: [PATCH 104/104] Flake8 --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index ec2d270f..a788e91e 100755 --- a/setup.py +++ b/setup.py @@ -14,7 +14,7 @@ import sys import warnings -from setuptools import Extension, find_packages, setup +from setuptools import Extension, setup # Use this version when git data are not available, like in git zip archive. # Update when tagging a new release.