{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Example of working with Larix Session Files\n", "\n", "A Larix Session File contains the data from a session of running the Larix GUI for XAFS analysis. \n", "In contrast to an Athena Project File, which stores the mu(E) data and processing parameters for \n", "each group of data in an Athena session, a Larix Session file will contain all the array and \n", "non-array data for all groups in a Larix Session. This will including processing results such as\n", "fitting histories for Feff-fitting, Pre-edge peaking fitting and linear analyses such as PCA. \n", "\n", "Because it is primary goal is to save sessions for the Larix GUI program, the structure of the\n", "file is not necessarily intuitive. On the other hand, once seen, the structure is\n", "not too hard to work with.\n", "\n", "Larix files use JSON encoding, and are compressed with the gzip algorithm. There are really only \n", "three top-level quantities\n", " 1. confg: configuration information about the Larix Session.\n", " 2. command_history: history of Larch commands run by the Larix Session\n", " 3. symbols: the data in the Larch symbol table used in the Larix Session" ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "['__add__', '__class__', '__class_getitem__', '__contains__', '__delattr__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__getitem__', '__getnewargs__', '__getstate__', '__gt__', '__hash__', '__init__', '__init_subclass__', '__iter__', '__le__', '__len__', '__lt__', '__match_args__', '__module__', '__mul__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__rmul__', '__setattr__', '__sizeof__', '__slots__', '__str__', '__subclasshook__', '_asdict', '_field_defaults', '_fields', '_make', '_replace', 'command_history', 'config', 'count', 'index', 'symbols']\n" ] } ], "source": [ "# we can open an exisiting Larix session with the `read_session` function\n", "\n", "from pathlib import Path\n", "from larch.io import read_session\n", "\n", "session = read_session(Path('..', 'LarixSessions', 'ZnSe_Feffit.larix'))\n", "print(dir(session))" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Larix Version : 1.0\n", "Date Saved : 2024-03-17 21:51:57\n", "Machine Platform : Darwin\n", "Machine Name : Borges.attlocal.net\n", "Machine MACID : aa0aaa3a837d\n", "Machine Version : Darwin Kernel Version 23.3.0: Wed Dec 20 21:30:44 PST 2023; root:xnu-10002.81.5~7/RELEASE_ARM64_T6000\n", "Machine Processor : x86_64\n", "Machine Architecture : 64bit:\n", "Python Version : 3.11.5\n", "Python Compiler : Clang 15.0.7\n", "Python Implementation : CPython\n", "Larch Release Version : 0.9.74\n", "Larch Release Date : 2023-Nov-14\n", "Larch Core Groups : ['_main', '_sys', '_builtin', '_math', '_math.transforms', '_io', '_xray', '_xrf', '_xafs', '_xrd', '_sys.wx', '_plotter', '_epics']\n", "Larch history_file : \"/Users/Newville/.larch/history.lar\"\n", "Larch home_dir : \"/Users/Newville\"\n", "Larch init_files : ['/Users/Newville/.larch/init.lar']\n", "Larch larch_version : \"0.9.74.post132+g5905770e.d20240316\"\n", "Larch release_version : \"0.9.74\"\n", "Larch user_larchdir : \"/Users/Newville/.larch\"\n" ] } ], "source": [ "# We can print out the configuration:\n", "for k, v in session.config.items():\n", " print(f\"{k} : {v}\")\n", " \n", "# which gives pretty basic information about the session, like the date saved, the version of Larch, OS, etc." ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "##Commands:\n", "# larch history saved Sun Mar 17 21:51:57 2024\n", "# create feffit Parameter Group to hold fit parameters\n", "_feffit_params = param_group(reff=-1.0)\n", "\n", "# make sure dictionary for Feff Paths exists\n", "try:\n", " npaths = len(_feffpaths.keys())\n", "except:\n", " _feffcache = {'paths':{}, 'runs':{}} # group of all paths, info about Feff runs\n", " _feffpaths = {} # dict of paths currently in use, copied from _feffcache.paths\n", "#endtry\n", "\n", "_tmpfile_ = read_gsescan('/Users/Newville/Codes/xraylarch/examples/xafsdata/znse_zn_xafs.001')\n", "znseznxaf = read_gsescan('/Users/Newville/Codes/xraylarch/examples/xafsdata/znse_zn_xafs.001', labels='energy, scaler count time, i0, i1')\n", "znseznxaf.path = '/Users/Newville/Codes/xraylarch/examples/xafsdata/znse_zn_xafs.001'\n", "znseznxaf.is_frozen = False\n", "znseznxaf.energy_ref = 'znseznxaf'\n", "znseznxaf.datatype = 'xas'\n", "znseznxaf.plot_xlabel = 'energy'\n", "znseznxaf.plot_ylabel = '-log(i1/i0)'\n", "znseznxaf.xdat = znseznxaf.data[0, : ]\n", "znseznxaf.ydat = -safe_log(znseznxaf.data[3, : ]/znseznxaf.data[2, : ])\n", "znseznxaf.yerr = 1.0\n", "znseznxaf.xdat = znseznxaf.x\n", "znseznxaf.energy = znseznxaf.xdat\n", "znseznxaf.mu = znseznxaf.ydat\n", "sort_xafs(znseznxaf, overwrite=True, fix_repeats=True)\n", "znseznxaf.groupname = 'znseznxaf'\n", "znseznxaf.filename = 'znse_zn_xafs.001'\n", "znseznxaf.config = group(__name__='larix config')\n", "znseznxaf.journal = journal(source='/Users/Newville/Codes/xraylarch/examples/xafsdata/znse_zn_xafs.001', xdat='energy', ydat='-log(i1/i0)', source_desc='znse_zn_xafs.001: -log(i1/i0)', yerr='1.0')\n", "znseznxaf.energy_orig = znseznxaf.energy[:]\n", "znseznxaf.i0 = znseznxaf.data[2, :]\n", "znseznxaf.energy_shift = 0.0000\n", "znseznxaf.energy = znseznxaf.xdat = znseznxaf.energy_orig + znseznxaf.energy_shift\n", "pre_edge(znseznxaf, pre1=-200.00, pre2=-25.00, nvict=0, nnorm=None, norm1=100.00, norm2=-1.00)\n", "znseznxaf.norm_poly = 1.0*znseznxaf.norm\n", "pre_edge(znseznxaf, pre1=-154.75, pre2=-25.00, nvict=0, nnorm=2, norm1=100.00, norm2=742.01)\n", "znseznxaf.norm_poly = 1.0*znseznxaf.norm\n", "autobk(znseznxaf, rbkg= 1.000, ek0= 9663.7500,\n", " kmin= 0.000, kmax= 14.000, kweight= 1.0,\n", " clamp_lo= 1.0, clamp_hi= 20.0)\n", "xftf(znseznxaf, kmin= 2.000, kmax= 13.500, dk= 4.000,\n", " kweight= 2.000, window='Kaiser-Bessel', rmax_out=12.000)\n", "xftr(znseznxaf, rmin= 1.000, rmax= 6.000,\n", " dr= 0.500, window='Hanning')\n", "autobk(znseznxaf, rbkg= 1.100, ek0= 9663.7500,\n", " kmin= 0.000, kmax= 14.000, kweight= 1.0,\n", " clamp_lo= 1.0, clamp_hi= 20.0)\n", "xftf(znseznxaf, kmin= 2.000, kmax= 13.500, dk= 4.000,\n", " kweight= 2.000, window='Kaiser-Bessel', rmax_out=12.000)\n", "xftr(znseznxaf, rmin= 1.100, rmax= 6.000,\n", " dr= 0.500, window='Hanning')\n", "plot_chik(znseznxaf, show_window=False, kweight=2, win=1, title=\"znse_zn_xafs.001\")\n", "autobk(znseznxaf, rbkg= 1.100, ek0= 9668.0000,\n", " kmin= 0.000, kmax= 14.000, kweight= 1.0,\n", " clamp_lo= 1.0, clamp_hi= 20.0)\n", "xftf(znseznxaf, kmin= 2.000, kmax= 13.500, dk= 4.000,\n", " kweight= 2.000, window='Kaiser-Bessel', rmax_out=12.000)\n", "xftr(znseznxaf, rmin= 1.100, rmax= 6.000,\n", " dr= 0.500, window='Hanning')\n", "plot_chik(znseznxaf, show_window=False, kweight=2, win=1, title=\"znse_zn_xafs.001\")\n", "autobk(znseznxaf, rbkg= 1.100, ek0= 9668.0000,\n", " kmin= 0.000, kmax= 14.000, kweight= 0.0,\n", " clamp_lo= 1.0, clamp_hi= 20.0)\n", "xftf(znseznxaf, kmin= 2.000, kmax= 13.500, dk= 4.000,\n", " kweight= 2.000, window='Kaiser-Bessel', rmax_out=12.000)\n", "xftr(znseznxaf, rmin= 1.100, rmax= 6.000,\n", " dr= 0.500, window='Hanning')\n", "plot_chik(znseznxaf, show_window=False, kweight=2, win=1, title=\"znse_zn_xafs.001\")\n", "autobk(znseznxaf, rbkg= 1.100, ek0= 9668.0000,\n", " kmin= 0.000, kmax= 14.000, kweight= 1.0,\n", " clamp_lo= 1.0, clamp_hi= 20.0)\n", "xftf(znseznxaf, kmin= 2.000, kmax= 13.500, dk= 4.000,\n", " kweight= 2.000, window='Kaiser-Bessel', rmax_out=12.000)\n", "xftr(znseznxaf, rmin= 1.100, rmax= 6.000,\n", " dr= 0.500, window='Hanning')\n", "plot_chik(znseznxaf, show_window=False, kweight=2, win=1, title=\"znse_zn_xafs.001\")\n", "autobk(znseznxaf, rbkg= 1.100, ek0= 9668.0000,\n", " kmin= 0.000, kmax= 14.000, kweight= 2.0,\n", " clamp_lo= 1.0, clamp_hi= 20.0)\n", "xftf(znseznxaf, kmin= 2.500, kmax= 13.500, dk= 4.000,\n", " kweight= 2.000, window='Kaiser-Bessel', rmax_out=12.000)\n", "xftr(znseznxaf, rmin= 1.100, rmax= 6.000,\n", " dr= 0.500, window='Hanning')\n", "plot_chik(znseznxaf, show_window=False, kweight=2, win=1, title=\"znse_zn_xafs.001\")\n", "xftf(znseznxaf, kmin= 2.500, kmax= 13.000, dk= 4.000,\n", " kweight= 2.000, window='Kaiser-Bessel', rmax_out=12.000)\n", "xftr(znseznxaf, rmin= 1.100, rmax= 6.000,\n", " dr= 0.500, window='Hanning')\n", "plot_chik(znseznxaf, show_window=False, kweight=2, win=1, title=\"znse_zn_xafs.001\")\n", "_feffit_params.s02 = param(1.0000, name='s02', vary=True)\n", "_feffit_params.e0 = param(0.0010, name='e0', vary=True)\n", "_feffit_params.delr_Se245 = param(0.0010, name='delr_Se245', vary=True, min=-0.75, max=0.75)\n", "_feffit_params.sigma2_Se245 = param(0.0078, name='sigma2_Se245', vary=True, min=0, max=1)\n", "\n", "_feffcache['paths']['Zn_Se245'] = feffpath('/Users/Newville/.larch/feff/Zn1_K_Stilleite_cif11535/feff0001.dat',\n", " label='Zn_Se245',feffrun='Zn1_K_Stilleite_cif11535', degen=1)\n", "\n", "\n", "_feffpaths['Zn_Se245'] = use_feffpath(_feffcache['paths'], 'Zn_Se245',\n", " s02='4.0 * s02', e0='e0',\n", " deltar='delr_Se245', sigma2='sigma2_Se245',\n", " third='0', ei='0', use=True)\n", "\n", "_feffit_params.delr_Zn401 = param(0.0010, name='delr_Zn401', vary=True, min=-0.75, max=0.75)\n", "_feffit_params.sigma2_Zn401 = param(0.0100, name='sigma2_Zn401', vary=True, min=0, max=1)\n", "\n", "_feffcache['paths']['Zn_Zn401'] = feffpath('/Users/Newville/.larch/feff/Zn1_K_Stilleite_cif11535/feff0002.dat',\n", " label='Zn_Zn401',feffrun='Zn1_K_Stilleite_cif11535', degen=1)\n", "\n", "\n", "_feffpaths['Zn_Zn401'] = use_feffpath(_feffcache['paths'], 'Zn_Zn401',\n", " s02='12.0 * s02', e0='e0',\n", " deltar='delr_Zn401', sigma2='sigma2_Zn401',\n", " third='0', ei='0', use=True)\n", "\n", "### set up feffit \n", "# create feffit Parameter Group to hold fit parameters\n", "_feffit_params = param_group(reff=-1.0)\n", "\n", "_feffit_params.s02 = param(1.0, vary=True)\n", "_feffit_params.e0 = param(0.001, vary=True)\n", "_feffit_params.delr_Se245 = param(0.001, min=-0.75, max=0.75, vary=True)\n", "_feffit_params.sigma2_Se245 = param(0.0078, min=0.0, max=1.0, vary=True)\n", "_feffit_params.delr_Zn401 = param(0.001, min=-0.75, max=0.75, vary=True)\n", "_feffit_params.sigma2_Zn401 = param(0.01, min=0.0, max=1.0, vary=True)\n", "# define Fourier transform and fitting space\n", "_feffit_trans = feffit_transform(kmin=2.500, kmax=13.000, dk=4.0000, kw=2,\n", " window='Kaiser-Bessel', fitspace='r', rmin=1.100, rmax=4.000)\n", "\n", "# clear existing paths\n", "npaths = 0\n", "_feffpaths = {}\n", "#endtry\n", "\n", "\n", "_feffpaths['Zn_Se245'] = use_feffpath(_feffcache['paths'], 'Zn_Se245',\n", " s02='4.0 * s02', e0='e0',\n", " deltar='delr_Se245', sigma2='sigma2_Se245',\n", " third='0', ei='0', use=True)\n", "\n", "\n", "_feffpaths['Zn_Zn401'] = use_feffpath(_feffcache['paths'], 'Zn_Zn401',\n", " s02='12.0 * s02', e0='e0',\n", " deltar='delr_Zn401', sigma2='sigma2_Zn401',\n", " third='0', ei='0', use=True)\n", "\n", "# sum paths using a list of paths and a group of parameters\n", "_feffit_dataset = feffit_dataset(data=znseznxaf, transform=_feffit_trans,\n", " refine_bkg=False,\n", " paths=[_feffpaths['Zn_Se245'], _feffpaths['Zn_Zn401']])\n", "_feffit_dataset.model = ff2chi([_feffpaths['Zn_Se245'], _feffpaths['Zn_Zn401']], paramgroup=_feffit_params)\n", "\n", "# end of build model\n", "_feffit_dataset\n", "_feffit_dataset.paths\n", "#### plot \n", "# build arrays for plotting: refine bkg? False, znseznxaf / _feffit_dataset\n", "# ffts on group _feffit_dataset.model\n", "xftf(_feffit_dataset.model, kmin=2.500, kmax=13.000, dk=4.000, window='Kaiser-Bessel', kweight=2.000)\n", "xftr(_feffit_dataset.model, rmin=1.100, rmax=4.000, dr=0.100, window='hanning')\n", "\n", "# ffts on group _feffit_dataset.data\n", "xftf(_feffit_dataset.data, kmin=2.500, kmax=13.000, dk=4.000, window='Kaiser-Bessel', kweight=2.000)\n", "xftr(_feffit_dataset.data, rmin=1.100, rmax=4.000, dr=0.100, window='hanning')\n", "\n", "plot_chir(_feffit_dataset.data, label='data', win=1, rmax=8.0, title='znse_zn_xafs.001', show_window=False, new=True)\n", "plot_chir(_feffit_dataset.model, label='model', win=1, rmax=8.0, show_window=False, new=False)\n", "### set up feffit \n", "# create feffit Parameter Group to hold fit parameters\n", "_feffit_params = param_group(reff=-1.0)\n", "\n", "_feffit_params.s02 = param(1.0, vary=True)\n", "_feffit_params.e0 = param(0.001, vary=True)\n", "_feffit_params.delr_Se245 = param(0.001, min=-0.75, max=0.75, vary=True)\n", "_feffit_params.sigma2_Se245 = param(0.0078, min=0.0, max=1.0, vary=True)\n", "_feffit_params.delr_Zn401 = param(0.001, min=-0.75, max=0.75, vary=True)\n", "_feffit_params.sigma2_Zn401 = param(0.01, min=0.0, max=1.0, vary=True)\n", "# define Fourier transform and fitting space\n", "_feffit_trans = feffit_transform(kmin=2.500, kmax=13.000, dk=4.0000, kw=2,\n", " window='Kaiser-Bessel', fitspace='r', rmin=1.100, rmax=4.000)\n", "\n", "# clear existing paths\n", "npaths = 0\n", "_feffpaths = {}\n", "#endtry\n", "\n", "\n", "_feffpaths['Zn_Se245'] = use_feffpath(_feffcache['paths'], 'Zn_Se245',\n", " s02='4.0 * s02', e0='e0',\n", " deltar='delr_Se245', sigma2='sigma2_Se245',\n", " third='0', ei='0', use=True)\n", "\n", "\n", "_feffpaths['Zn_Zn401'] = use_feffpath(_feffcache['paths'], 'Zn_Zn401',\n", " s02='12.0 * s02', e0='e0',\n", " deltar='delr_Zn401', sigma2='sigma2_Zn401',\n", " third='0', ei='0', use=True)\n", "\n", "# sum paths using a list of paths and a group of parameters\n", "_feffit_dataset = feffit_dataset(data=znseznxaf, transform=_feffit_trans,\n", " refine_bkg=False,\n", " paths=[_feffpaths['Zn_Se245'], _feffpaths['Zn_Zn401']])\n", "_feffit_dataset.model = ff2chi([_feffpaths['Zn_Se245'], _feffpaths['Zn_Zn401']], paramgroup=_feffit_params)\n", "\n", "# end of build model\n", "# build feffit dataset, run feffit\n", "_feffit_dataset = feffit_dataset(data=znseznxaf, transform=_feffit_trans,\n", " refine_bkg=False,\n", " paths=_feffpaths)\n", "_feffit_result = feffit(_feffit_params, _feffit_dataset)\n", "if not hasattr(znseznxaf, 'feffit_history'): znseznxaf.feffit_history = []\n", "znseznxaf.feffit_history.insert(0, _feffit_result)\n", "\n", "_feffit_dataset\n", "_feffit_dataset.paths\n", "#### plot \n", "# build arrays for plotting: refine bkg? False, znseznxaf / _feffit_dataset\n", "# ffts on group _feffit_dataset.model\n", "xftf(_feffit_dataset.model, kmin=2.500, kmax=13.000, dk=4.000, window='Kaiser-Bessel', kweight=2.000)\n", "xftr(_feffit_dataset.model, rmin=1.100, rmax=4.000, dr=0.100, window='hanning')\n", "\n", "# ffts on group _feffit_dataset.data\n", "xftf(_feffit_dataset.data, kmin=2.500, kmax=13.000, dk=4.000, window='Kaiser-Bessel', kweight=2.000)\n", "xftr(_feffit_dataset.data, rmin=1.100, rmax=4.000, dr=0.100, window='hanning')\n", "\n", "plot_chir(_feffit_dataset.data, label='data', win=1, rmax=8.0, title='znse_zn_xafs.001', show_window=False, new=True)\n", "plot_chir(_feffit_dataset.model, label='model', win=1, rmax=8.0, show_window=False, new=False)\n", "\n", "##Commands done##\n" ] } ], "source": [ "# the Larch command history from the Larix Session is verbose and repetetive, but it\n", "# does show all the Larch commands run in that session. \n", "#\n", "# Note: if you read in a session file into a new session and start working with\n", "# that data and then go on to save a new session, the history from the original session\n", "# will not be preserved. This is simply because one can read in many saved Sessions\n", "# and it is not obvious how to merge those histories. The command history of a Larix\n", "# Session can be used as part a solution for preserving data processing and provenance, \n", "# but it is not a complete solution.\n", "\n", "print(\"##Commands:\")\n", "for command in session.command_history:\n", " print(command)\n", "print(\"##Commands done##\")\n" ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "_feffcache\n", "_feffit_dataset\n", "_feffit_params\n", "_feffit_result\n", "_feffit_trans\n", "_feffpaths\n", "_xasgroups\n", "npaths\n", "znseznxaf\n" ] } ], "source": [ "#finally, we can list the symbols\n", "\n", "for s in session.symbols:\n", " print(s)\n", " \n", "# in fact, we see that there are not that many Groups in this session. \n", "# For a Larix Session, the following common symbols are of interest:\n", "#\n", "# 1. _xasgroups: a dictionary of \"Filename\": \"Groupname\" where \"Filename\" is the \n", "# displayed name in the Larix list of Groups, and the \"Groupname\" is the\n", "# variable name of the Group in the Larch session.\n", "# 2. _feffpaths: a dictionary of Feff Paths useed for the most recent run of Feffit\n", "# 3. _feffit_params: a Parameter Group for the most recent run of Feffit\n", "# 4. _feffit_trans: a Feffit Transform Group for the most recent run of Feffit\n", "# 5. _feffit_dataset: a Feffit Dataset for the most recent run of Feffit\n", "# 6. _feffcache: Cache of Feff Paths read into the Session.\n" ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "XAS GROUPS: {'znse_zn_xafs.001': 'znseznxaf'}\n" ] }, { "data": { "text/html": [ "Group 0x189bc7f50\n", "
Attribute | Type | \n", "Value |
array_labels | list | ['energy', 'scaler count time', 'i0', 'i1'] |
atsym | str | 'Zn' |
autobk_details | Group | |
bad_channels | list | [] |
bkg | ndarray | shape=(469,), type=float64 range=[-0.55812853:-0.01859558] |
callargs | Group | |
chi | ndarray | shape=(279,), type=float64 range=[-0.08454437: 0.16909173] |
chie | ndarray | shape=(469,), type=float64 range=[-0.08384910: 0.16898517] |
chiq | ndarray | shape=(601,), type=complex128 range=[-1.23532159-0.09311998j:0.90149128+0.09526365j] |
chiq_im | ndarray | shape=(601,), type=float64 range=[-1.04444071: 1.14873117] |
chiq_mag | ndarray | shape=(601,), type=float64 range=[ 4.2891e-06: 1.24624466] |
chiq_re | ndarray | shape=(601,), type=float64 range=[-1.23532159: 0.90149128] |
chir | ndarray | shape=(392,), type=complex128 range=[-1.28450107-0.04895470j:1.55229377-0.21239774j] |
chir_im | ndarray | shape=(392,), type=float64 range=[-1.51930390: 1.36190469] |
chir_mag | ndarray | shape=(392,), type=float64 range=[ 4.5848e-04: 1.57505356] |
chir_re | ndarray | shape=(392,), type=float64 range=[-1.28450107: 1.55229377] |
config | Group | |
correct_deadtime | bool | False |
d2mude | ndarray | shape=(469,), type=float64 range=[-0.40173981: 0.31065658] |
data | ndarray | shape=(4, 469), type=float64 range=[ 1.00000000: 176438.200] |
datatype | str | 'xas' |
det | ndarray | shape=(2, 469), type=float64 range=[ 98237.7000: 176438.200] |
det_addr | list | ['13BMD:scaler1_calc2.VAL', '13BMD:scaler1_calc3.VAL'] |
det_corr | ndarray | shape=(2, 469), type=float64 range=[ 98237.7000: 176438.200] |
det_desc | list | ['i0', 'i1'] |
det_mcas | list | [] |
dimension | int | 1 |
dmude | ndarray | shape=(469,), type=float64 range=[-0.25781869: 0.43953725] |
dt_factor | NoneType | None |
e0 | float | 9663.75 |
edge | str | 'K' |
edge_step | float | 0.3767152894467243 |
edge_step_poly | float | 0.3767152894467243 |
ek0 | float | 9668.0 |
energy | ndarray | shape=(469,), type=float64 range=[ 9509.00000: 10405.7600] |
energy_orig | ndarray | shape=(469,), type=float64 range=[ 9509.00000: 10405.7600] |
energy_ref | str | 'znseznxaf' |
energy_shift | float | 0.0 |
energy_units | str | 'eV' |
env_addr | list | length=22: [S:SRcurrentAI.VAL, 13BMA:m17.RBV, ... 13BMD:m33.VAL, 13BMD:m34.VAL] |
env_desc | list | length=22: [Storage Ring Current, FOE Mono angle readback, ... Sample Z (focus), Sample Y (height)] |
env_val | list | length=22: [101.743, 12.0005, ... 0.652, 35.616] |
feffit_history | list | [ |
filename | str | 'znse_zn_xafs.001' |
flat | ndarray | shape=(469,), type=float64 range=[-0.00234636: 1.46194925] |
flat_alt | ndarray | shape=(469,), type=float64 range=[-0.00234636: 1.46194925] |
flat_coefs | tuple | (23.845848309978958, -0.00447498435231545, 2.1843564195782076e-07) |
groupname | str | 'znseznxaf' |
has_fullxrf | bool | False |
i0 | ndarray | shape=(469,), type=float64 range=[ 98237.7000: 101896.700] |
is_frozen | bool | False |
journal | Journal | [('source', '/Users/Newville/Codes/xraylarch/examples/xafsdata/znse_zn_xafs.001', '2024-03-17T21:50:06.238761'), ('xdat', 'energy', '2024-03-17T21:50:06.238766'), ('ydat', '-log(i1/i0)', '2024-03-17T21:50:06.238768'), ('source_desc', 'znse_zn_xafs.001: -log(i1/i0)', '2024-03-17T21:50:06.238769'), ('yerr', '1.0', '2024-03-17T21:50:06.238771'), ('find_e0_callargs', {}, '2024-03-17T21:50:06.257215'), ('pre_edge_callargs', {'e0': None, 'step': None, 'nnorm': None, 'nvict': 0, 'pre1': -200.0, 'pre2': -25.0, 'norm1': 100.0, 'norm2': -1.0, 'make_flat': True}, '2024-03-17T21:50:06.300136'), ('normalization_method', 'polynomial', '2024-03-17T21:50:06.311384'), ('pre_edge_callargs', {'e0': None, 'step': None, 'nnorm': 2, 'nvict': 0, 'pre1': -154.75, 'pre2': -25.0, 'norm1': 100.0, 'norm2': 742.01, 'make_flat': True}, '2024-03-17T21:50:06.320295'), ('autobk_callargs', {'rbkg': 1.0, 'nknots': None, 'e0': None, 'ek0': 9663.75, 'edge_step': None, 'kmin': 0.0, 'kmax': 14.0, 'kweight': 1.0, 'dk': 0.1, 'win': 'hanning', 'k_std': None, 'chi_std': None, 'nfft': 2048, 'kstep': 0.05, 'pre_edge_kws': None, 'nclamp': 3, 'clamp_lo': 1.0, 'clamp_hi': 20.0, 'calc_uncertainties': False, 'err_sigma': 1}, '2024-03-17T21:50:08.476183'), ('xftf_callargs', {'kmin': 2.0, 'kmax': 13.5, 'kweight': 2.0, 'dk': 4.0, 'dk2': None, 'with_phase': False, 'window': 'Kaiser-Bessel', 'rmax_out': 12.0, 'nfft': 2048, 'kstep': None}, '2024-03-17T21:50:08.484894'), ('xftr_callargs', {'rmin': 1.0, 'rmax': 6.0, 'with_phase': False, 'dr': 0.5, 'dr2': None, 'rw': 0, 'window': 'Hanning', 'qmax_out': None, 'nfft': 2048, 'kstep': 0.05}, '2024-03-17T21:50:08.492092'), ('autobk_callargs', {'rbkg': 1.1, 'nknots': None, 'e0': None, 'ek0': 9663.75, 'edge_step': None, 'kmin': 0.0, 'kmax': 14.0, 'kweight': 1.0, 'dk': 0.1, 'win': 'hanning', 'k_std': None, 'chi_std': None, 'nfft': 2048, 'kstep': 0.05, 'pre_edge_kws': None, 'nclamp': 3, 'clamp_lo': 1.0, 'clamp_hi': 20.0, 'calc_uncertainties': False, 'err_sigma': 1}, '2024-03-17T21:50:11.223168'), ('xftf_callargs', {'kmin': 2.0, 'kmax': 13.5, 'kweight': 2.0, 'dk': 4.0, 'dk2': None, 'with_phase': False, 'window': 'Kaiser-Bessel', 'rmax_out': 12.0, 'nfft': 2048, 'kstep': None}, '2024-03-17T21:50:11.233849'), ('xftr_callargs', {'rmin': 1.1, 'rmax': 6.0, 'with_phase': False, 'dr': 0.5, 'dr2': None, 'rw': 0, 'window': 'Hanning', 'qmax_out': None, 'nfft': 2048, 'kstep': 0.05}, '2024-03-17T21:50:11.241473'), ('autobk_callargs', {'rbkg': 1.1, 'nknots': None, 'e0': None, 'ek0': 9668.0, 'edge_step': None, 'kmin': 0.0, 'kmax': 14.0, 'kweight': 1.0, 'dk': 0.1, 'win': 'hanning', 'k_std': None, 'chi_std': None, 'nfft': 2048, 'kstep': 0.05, 'pre_edge_kws': None, 'nclamp': 3, 'clamp_lo': 1.0, 'clamp_hi': 20.0, 'calc_uncertainties': False, 'err_sigma': 1}, '2024-03-17T21:50:15.056945'), ('xftf_callargs', {'kmin': 2.0, 'kmax': 13.5, 'kweight': 2.0, 'dk': 4.0, 'dk2': None, 'with_phase': False, 'window': 'Kaiser-Bessel', 'rmax_out': 12.0, 'nfft': 2048, 'kstep': None}, '2024-03-17T21:50:15.068225'), ('xftr_callargs', {'rmin': 1.1, 'rmax': 6.0, 'with_phase': False, 'dr': 0.5, 'dr2': None, 'rw': 0, 'window': 'Hanning', 'qmax_out': None, 'nfft': 2048, 'kstep': 0.05}, '2024-03-17T21:50:15.076520'), ('autobk_callargs', {'rbkg': 1.1, 'nknots': None, 'e0': None, 'ek0': 9668.0, 'edge_step': None, 'kmin': 0.0, 'kmax': 14.0, 'kweight': 0.0, 'dk': 0.1, 'win': 'hanning', 'k_std': None, 'chi_std': None, 'nfft': 2048, 'kstep': 0.05, 'pre_edge_kws': None, 'nclamp': 3, 'clamp_lo': 1.0, 'clamp_hi': 20.0, 'calc_uncertainties': False, 'err_sigma': 1}, '2024-03-17T21:50:16.905976'), ('xftf_callargs', {'kmin': 2.0, 'kmax': 13.5, 'kweight': 2.0, 'dk': 4.0, 'dk2': None, 'with_phase': False, 'window': 'Kaiser-Bessel', 'rmax_out': 12.0, 'nfft': 2048, 'kstep': None}, '2024-03-17T21:50:16.917172'), ('xftr_callargs', {'rmin': 1.1, 'rmax': 6.0, 'with_phase': False, 'dr': 0.5, 'dr2': None, 'rw': 0, 'window': 'Hanning', 'qmax_out': None, 'nfft': 2048, 'kstep': 0.05}, '2024-03-17T21:50:16.925050'), ('autobk_callargs', {'rbkg': 1.1, 'nknots': None, 'e0': None, 'ek0': 9668.0, 'edge_step': None, 'kmin': 0.0, 'kmax': 14.0, 'kweight': 1.0, 'dk': 0.1, 'win': 'hanning', 'k_std': None, 'chi_std': None, 'nfft': 2048, 'kstep': 0.05, 'pre_edge_kws': None, 'nclamp': 3, 'clamp_lo': 1.0, 'clamp_hi': 20.0, 'calc_uncertainties': False, 'err_sigma': 1}, '2024-03-17T21:50:18.291555'), ('xftf_callargs', {'kmin': 2.0, 'kmax': 13.5, 'kweight': 2.0, 'dk': 4.0, 'dk2': None, 'with_phase': False, 'window': 'Kaiser-Bessel', 'rmax_out': 12.0, 'nfft': 2048, 'kstep': None}, '2024-03-17T21:50:18.300847'), ('xftr_callargs', {'rmin': 1.1, 'rmax': 6.0, 'with_phase': False, 'dr': 0.5, 'dr2': None, 'rw': 0, 'window': 'Hanning', 'qmax_out': None, 'nfft': 2048, 'kstep': 0.05}, '2024-03-17T21:50:18.309180'), ('autobk_callargs', {'rbkg': 1.1, 'nknots': None, 'e0': None, 'ek0': 9668.0, 'edge_step': None, 'kmin': 0.0, 'kmax': 14.0, 'kweight': 2.0, 'dk': 0.1, 'win': 'hanning', 'k_std': None, 'chi_std': None, 'nfft': 2048, 'kstep': 0.05, 'pre_edge_kws': None, 'nclamp': 3, 'clamp_lo': 1.0, 'clamp_hi': 20.0, 'calc_uncertainties': False, 'err_sigma': 1}, '2024-03-17T21:50:21.722366'), ('xftf_callargs', {'kmin': 2.5, 'kmax': 13.5, 'kweight': 2.0, 'dk': 4.0, 'dk2': None, 'with_phase': False, 'window': 'Kaiser-Bessel', 'rmax_out': 12.0, 'nfft': 2048, 'kstep': None}, '2024-03-17T21:50:21.732999'), ('xftr_callargs', {'rmin': 1.1, 'rmax': 6.0, 'with_phase': False, 'dr': 0.5, 'dr2': None, 'rw': 0, 'window': 'Hanning', 'qmax_out': None, 'nfft': 2048, 'kstep': 0.05}, '2024-03-17T21:50:21.740760'), ('xftf_callargs', {'kmin': 2.5, 'kmax': 13.0, 'kweight': 2.0, 'dk': 4.0, 'dk2': None, 'with_phase': False, 'window': 'Kaiser-Bessel', 'rmax_out': 12.0, 'nfft': 2048, 'kstep': None}, '2024-03-17T21:50:24.075749'), ('xftr_callargs', {'rmin': 1.1, 'rmax': 6.0, 'with_phase': False, 'dr': 0.5, 'dr2': None, 'rw': 0, 'window': 'Hanning', 'qmax_out': None, 'nfft': 2048, 'kstep': 0.05}, '2024-03-17T21:50:24.087889'), ('xftf_callargs', {'kmin': 2.5, 'kmax': 13.0, 'kweight': 2.0, 'dk': 4.0, 'dk2': None, 'with_phase': False, 'window': 'Kaiser-Bessel', 'rmax_out': 10, 'nfft': 2048, 'kstep': None}, '2024-03-17T21:50:40.220059'), ('xftr_callargs', {'rmin': 1.1, 'rmax': 4.0, 'with_phase': False, 'dr': 0.1, 'dr2': None, 'rw': 0, 'window': 'hanning', 'qmax_out': None, 'nfft': 2048, 'kstep': 0.05}, '2024-03-17T21:50:40.220564'), ('xftf_callargs', {'kmin': 2.5, 'kmax': 13.0, 'kweight': 2.0, 'dk': 4.0, 'dk2': None, 'with_phase': False, 'window': 'Kaiser-Bessel', 'rmax_out': 10, 'nfft': 2048, 'kstep': None}, '2024-03-17T21:50:43.443607'), ('xftr_callargs', {'rmin': 1.1, 'rmax': 4.0, 'with_phase': False, 'dr': 0.1, 'dr2': None, 'rw': 0, 'window': 'hanning', 'qmax_out': None, 'nfft': 2048, 'kstep': 0.05}, '2024-03-17T21:50:43.444082')] |
k | ndarray | shape=(279,), type=float64 range=[ 0.00000000: 13.9000000] |
kwin | ndarray | shape=(279,), type=float64 range=[ 0.00000000: 1.00000000] |
mu | ndarray | shape=(469,), type=float64 range=[-0.55864552:-0.01859558] |
norm | ndarray | shape=(469,), type=float64 range=[-0.00234636: 1.46106584] |
norm_poly | ndarray | shape=(469,), type=float64 range=[-0.00234636: 1.46106584] |
path | str | '/Users/Newville/Codes/xraylarch/examples/xafsdata/znse_zn_xafs.001' |
plot_extras | list | [('marker', 9663.75, 0.7067924153689145, {'marker': 'o', 'markersize': 4, 'label': '_nolegend_', 'markerfacecolor': '#888', 'markeredgecolor': '#A00'}), ('marker', 9509.0, 0.0017751399756847192, {'marker': 'o', 'markersize': 4, 'label': '_nolegend_', 'markerfacecolor': '#888', 'markeredgecolor': '#A00'}), ('marker', 9638.75, 0.0033790210320638462, {'marker': 'o', 'markersize': 4, 'label': '_nolegend_', 'markerfacecolor': '#888', 'markeredgecolor': '#A00'}), ('marker', 9763.75, 0.9649004042788982, {'marker': 'o', 'markersize': 4, 'label': '_nolegend_', 'markerfacecolor': '#888', 'markeredgecolor': '#A00'}), ('marker', 10405.76, 0.934535311553658, {'marker': 'o', 'markersize': 4, 'label': '_nolegend_', 'markerfacecolor': '#888', 'markeredgecolor': '#A00'})] |
plot_xlabel | str | '$E\\\\rm\\\\,(eV)$' |
plot_y2label | NoneType | None |
plot_yarrays | list | [('norm', {'style': 'solid', 'marker': 'None'}, 'normalized $\\\\mu(E)$')] |
plot_ylabel | str | 'normalized $\\\\mu(E)$' |
pos | ndarray | shape=(2, 469), type=float64 range=[ 1.00000000: 10405.7600] |
pos_addr | list | ['13BMA:E:Energy.VAL', '13BMD:scaler1.TP'] |
pos_desc | list | ['energy', 'scaler count time'] |
post_edge | ndarray | shape=(469,), type=float64 range=[-0.55944550:-0.10233661] |
pre_edge | ndarray | shape=(469,), type=float64 range=[-0.91069926:-0.49578144] |
pre_edge_details | Group | |
progress | NoneType | None |
q | ndarray | shape=(601,), type=float64 range=[ 0.00000000: 30.0000000] |
r | ndarray | shape=(392,), type=float64 range=[ 0.00000000: 11.9957298] |
rbkg | float | 1.1 |
roi_hlim | list | [] |
roi_llim | list | [] |
roi_names | list | [] |
rwin | ndarray | shape=(392,), type=float64 range=[ 0.00000000: 1.00000000] |
scan_prefix | str | '13BMD:' |
scan_regions | list | ['E0 = 9659.00', 'Start Stop Step Npts Time Kspace?', '-150.00 -10.000 5.0000 29.000 1.0000 0', '-10.000 30.000 0.25000 161.00 1.0000 0', '2.8061 14.000 0.039978 281.00 1.0000 1'] |
start_time | str | ': Thu Apr 10 16:50:32 2008' |
status | NoneType | None |
stop_time | str | ': Thu Apr 10 17:00:25 2008' |
sums | ndarray | shape=(2, 469), type=float64 range=[ 98237.7000: 176438.200] |
sums_corr | ndarray | shape=(2, 469), type=float64 range=[ 98237.7000: 176438.200] |
sums_list | list | [[0], [1]] |
sums_names | list | ['i0', 'i1'] |
user_titles | list | [] |
x | ndarray | shape=(469,), type=float64 range=[ 9509.00000: 10405.7600] |
xaddr | str | '13BMA:E:Energy.VAL' |
xdat | ndarray | shape=(469,), type=float64 range=[ 9509.00000: 10405.7600] |
xdesc | str | 'Mono Energy drive val' |
xrf_data | list | [] |
xrf_dict | dict | {} |
xrf_energies | list | [] |
xrf_header | str | '' |
xrf_merge | NoneType | None |
xrf_merge_corr | NoneType | None |
xrf_sum | list | [] |
y | list | [] |
yaddr | str | '' |
ydat | ndarray | shape=(469,), type=float64 range=[-0.00234636: 1.46106584] |
ydesc | str | '' |
yerr | float | 1.0 |