def get_xraydb(_larch): symname = '%s._xraydb' % MODNAME if _larch.symtable.has_symbol(symname): return _larch.symtable.get_symbol(symname) xraydb = xrayDB() _larch.symtable.set_symbol(symname, xraydb) return xraydb
#!/usrb/bin/env python """writes Corehole_Widths.dat containing core hole wdith in eV for element up to Z = 98 and K, L, M, and N edges. Calculation uses data from O. Keski-Rahkonen and M. O. Krause, Atomic Data and Nuclear Data Tables 14, #2, pages 139-146 (1974) This uses the data (interpolated by hand from the graphs in the above paper), and the calculation scheme from subroutine setgam from Feff8. """ import numpy as np from xraydb import xrayDB xdb = xrayDB() dat = { 'K': np.array([[0.99, 10.0, 20.0, 40.0, 50.0, 60.0, 80.0, 95.1], [0.02, 0.28, 0.75, 4.8, 10.5, 21.0, 60.0, 105.0]]), 'L1': np.array([[0.99, 18.0, 22.0, 35.0, 50.0, 52.0, 75.0, 95.1], [0.07, 3.9, 3.8, 7.0, 6.0, 3.7, 8.0, 19.0]]), 'L2': np.array([[0.99, 17.0, 28.0, 31.0, 45.0, 60.0, 80.0, 95.1], [0.001, 0.12, 1.4, 0.8, 2.6, 4.1, 6.3, 10.5]]), 'L3': np.array([[0.99, 17.0, 28.0, 31.0, 45.0, 60.0, 80.0, 95.1], [0.001, 0.12, 0.55, 0.7, 2.1, 3.5, 5.4, 9.0]]), 'M1': np.array([[0.99, 20.0, 28.0, 30.0, 36.0, 53.0, 80.0, 95.1],
import epics import ipdb import xraydb xdb = xraydb.xrayDB() maps_settings = """ This file will set some MAPS settings mostly do do with fitting\r VERSION: 0\r DETECTOR_ELEMENTS: 4\r MAX_NUMBER_OF_PROCESSORS_TO_USE: 3\r QUICK_DIRTY: 1\r XRF_BIN: 0.000000\r NNLS: 0\r XANES_SCAN: 0\r DETECTOR_TO_START_WITH: 0\r """ maps_fit_parameters_override = """ This file will override default fit settings for the maps program for a 3 element detector remove: removeme_*elementdetector_to make it work.\r NOTE: the filename MUST be maps_fit_parameters_override.txt\r VERSION: 5.00000\r DATE: Wed Sep 17 18:20:25 2014\r put below the number of detectors that were used to acquire spectra. IMPORTANT:\r this MUST come after VERSION, and before all other options!\r DETECTOR_ELEMENTS: 1\r give this file an internal name, whatever you like\r IDENTIFYING_NAME_[WHATEVERE_YOU_LIKE]:automatic\r list the elements that you want to be fit. For K lines, just use the element\r name, for L lines add _L, e.g., Au_L, for M lines add _M\r ELEMENTS_TO_FIT: {elements_to_fit:s}\r
#!/usrb/bin/env python """writes Corehole_Widths.dat containing core hole wdith in eV for element up to Z = 98 and K, L, M, and N edges. Calculation uses data from O. Keski-Rahkonen and M. O. Krause, Atomic Data and Nuclear Data Tables 14, #2, pages 139-146 (1974) This uses the data (interpolated by hand from the graphs in the above paper), and the calculation scheme from subroutine setgam from Feff8. """ import numpy as np from xraydb import xrayDB xdb = xrayDB() dat = {'K': np.array([[0.99, 10.0, 20.0, 40.0, 50.0, 60.0, 80.0, 95.1], [0.02, 0.28, 0.75, 4.8, 10.5, 21.0, 60.0, 105.0]]), 'L1': np.array([[0.99, 18.0, 22.0, 35.0, 50.0, 52.0, 75.0, 95.1], [0.07, 3.9, 3.8, 7.0, 6.0, 3.7, 8.0, 19.0]]), 'L2': np.array([[0.99, 17.0, 28.0, 31.0, 45.0, 60.0, 80.0, 95.1], [0.001, 0.12, 1.4, 0.8, 2.6, 4.1, 6.3, 10.5]]), 'L3': np.array([[0.99, 17.0, 28.0, 31.0, 45.0, 60.0, 80.0, 95.1], [0.001, 0.12, 0.55, 0.7, 2.1, 3.5, 5.4, 9.0]]), 'M1': np.array([[0.99, 20.0, 28.0, 30.0, 36.0, 53.0, 80.0, 95.1], [0.001, 1.0, 2.9, 2.2, 5.5, 10.0, 22.0, 22.0]]), 'M2': np.array([[0.99, 20.0, 22.0, 30.0, 40.0, 68.0, 80.0, 95.1], [0.001, 0.001, 0.5, 2.0, 2.6, 11.0, 15.0, 16.0]]), 'M3': np.array([[0.99, 20.0, 22.0, 30.0, 40.0, 68.0, 80.0, 95.1], [0.001, 0.001, 0.5, 2.0, 2.6, 11.0, 10.0, 10.0]]), 'M4': np.array([[0.99, 36.0, 40.0, 48.0, 58.0, 76.0, 79.0, 95.1],