Larch: Applications and Python Library for Data Analysis of X-ray Absorption Spectroscopy (XAS, XANES, XAFS, EXAFS), X-ray Fluorescence (XRF) Spectroscopy and Imaging

Overview

Larch: Data Analysis Tools for X-ray Spectroscopy and More

Larch is an open-source library and set of applications for processing and analyzing X-ray absorption and fluorescence spectroscopy data and X-ray fluorescence and diffraction image data from synchrotron beamlines. It is especially focussed on X-ray absorption fine-structure spectroscopy (XAFS) including X-ray absorption near-edge spectroscopy (XANES) and extended X-ray absorption fine-structure spectroscopy (EXAFS). It also supports visualization and analysis tools for X-ray fluorescence (XRF) spectra and XRF and X-ray diffraction (XRD) images as collected at scanning X-ray microprobe beamlines.

Larch is written in Python, making heavy use of the excellent scientific python libraries (numpy, scipy, h5py, matplotlib,and many more). Larch can be used as a Python library for processing and analyzing X-ray spectroscopy and imaging data. In addition, the applications built with it also use a built-in Python-like macro language for interactive and batch processing. This domain-specific language is intended to be very easy to use for novices while also being complete enough to automate data processing and analysis and to encourage and facilitate a gentle transition to transition from GUI-only analyses to scripted and programmatic analysis of larger data sets. This macro language also allows Larch to be run as a service, interacting with other processes or languages via XML-RPC, and so be used by the popular Demeter XAFS application suite.

Larch is distributed under an open-source license that is nearly identical to the BSD license. It is under active and open development centered at the GeoScoilEnviroCARS sector of Center for Advanced Radiation Sources at the University of Chicago has been supported by the US National Science Foundation - Earth Sciences (EAR-1128799), and Department of Energy GeoSciences (DE-FG02-94ER14466). In addition, funding specifically for Larch was granted by the National Science Foundation - Advanced CyberInfrastructure (ACI-1450468).

The best citable reference for Larch is M. Newville, Larch: An Analysis Package For XAFS And Related Spectroscopies. Journal of Physics: Conference Series, 430:012007 (2013).

Larch Applications

These applications installed with Larch, in addition to a basic Python library. Here, GUI = Graphical User Interface, CLI = Command Line Interface, and beta indicates a work in progress.

Application Name GUI/CLI Description
larch CLI simple shell command-line interface
Larch GUI GUI enhanced command-line interface with data browser
XAS Viewer GUI XAFS Processing and Analysis: XANES pre-edge peak fitting, linear analysis, PCA/LASSO, EXAFS processing, Running Feff, fitting EXAFS data to Feff paths.
GSE Map Viewer GUI XRF Map Viewer for GSECARS X-ray microprobe data.
XRF Display GUI Display and analyze XRF Spectra.
feff6l CLI Feff 6 EXAFS calculations
feff8l CLI Feff 8 EXAFS calculations (no XANES)
qtrixs GUI beta Display RIXS planes, take profiles
1D XRD Viewer GUI beta Display and work with 1-D XRD patterns
2D XRD Viewer GUI beta Display XRD images
Comments
  • Plugin to read SPEC files

    Plugin to read SPEC files

    I gave a try to Larch plugin system and I enjoyed its simplicity. Here a first version of a simple plugin to read SPEC files:

    https://gist.github.com/maurov/5284508

    I plan to improve the class by adding more methods, but first I would validate if I'm going in the right direction for implementing new plugins.

    Regarding the Python class to read SPEC files, I have evaluated:

    (1) specfilewrapper in PyMca (rewritten in Python from the 'specfile' C class developed at ESRF) (2) pyspec (http://pythonhosted.org/pyspec/) (3) specparser (https://github.com/tpikonen/specparser) (4) the one included in TDL

    To my opinion, (1) is the best choice for simplicity, versatility and maintenance. (2) is a nice project too but cannot handle motors names that include a dot, as 'Mono.Energy'.

    plugins 
    opened by maurov 18
  • symbol problems with the larch server

    symbol problems with the larch server

    After a fit, this is a symbol: fit.datasets[0].epsilon_k.

    If I ask the larch server for that symbol via the get_data command, nothing is returned (the XMLRPC version of an empty response).

    If, however, I do this right after the fit: foo = fit.datasets[0], then ask the server for foo.epsilon_k, I get the expected return value (a list of epsilon values for each k-weight).

    Thus, the problem seems to be with the [0].

    This isn't an immediate problem for Demeter -- Demeter gives another name to each of the fit.datasets[N]. However, it's either a bug or I am misunderstanding the syntax of using the server for that kind of symbol.

    opened by bruceravel 15
  • `--root=

    `--root="${pkgdir}"` ignored at some places in `setup.py install`

    The packaging step of xraylarch fails on archlinux since version 0.9.38 (0.9.37 worked fine, 0.9.39 still fails) with:

    running install_scripts
    Traceback (most recent call last):
      File "setup.py", line 311, in <module>
        shutil.copy(src, dest)
      File "/usr/lib/python2.7/shutil.py", line 133, in copy
        copyfile(src, dst)
      File "/usr/lib/python2.7/shutil.py", line 97, in copyfile
        with open(dst, 'wb') as fdst:
    IOError: [Errno 13] Permission denied: '/usr/bin/larch_server'
    ==> ERROR: A failure occurred in package().
    

    The command executed (as non-root) is:

    python2 setup.py install --skip-build --root="${pkgdir}" --prefix=/usr
    

    My guess is, that --root=... is not honored in all places, thus /usr/bin/larch_server gets touched instead of ${pkgdir}/usr/bin/larch_server

    regards, Erich

    opened by deep-42-thought 14
  • autobk parameter XAFS plugins  are lost after function execution?

    autobk parameter XAFS plugins are lost after function execution?

    Hi I was wondering why the data group add attributes: pre1 pre2 norm1 norm2 after pre_edge() while kmin, kmax , kweight are not stored. Maybe will be nice make a dictionary with the parameter of EXAFS extraction in the group. What do you think about?

    question 
    opened by Prestipino 14
  • [xas_viewer] current group highlight does not stay persistent

    [xas_viewer] current group highlight does not stay persistent

    @newville I have observed an annoying behavior on xas_viewer (master on Linux) that seems a bug to me:

    • click on a group -> it gets highlighted in the left panel
    • push the plot button -> the highlight disappears

    Can you reproduce this misbehavior from your side?

    bug 
    opened by maurov 11
  • display(), a more feature full variation of show()

    display(), a more feature full variation of show()

    I find myself dissatisfied with show(), particularly for a group with a lot of members. This stab at an "improvement" adds flags for color, truncating lengthy lists and tuples, and suppressing bound methods. All this together makes it a bit easier -- at least for me -- to examine the group's contents.

    Note that

    display(group, truncate=False, with_color=False, with_methods=True)
    

    behaves just like show(group).

    I put this in plugins/local/ and in the _local group. It's not clear to me quite what the purpose of "local" is. plugins/std might have been more appropriate, but I did not want to put this in _builtin.

    opened by bruceravel 11
  • Atoms plugin in Larch?

    Atoms plugin in Larch?

    Does anybody is planning to port "atoms" to Larch? If not, I could probably invest some time in this. I never went through the source code of atoms itself, so the ideas I have in mind on how to implement it could result not compatible with Demeter then...

    The Larch plugin I have in mind should simply do: 1) read a CIF file and some keyword parameters; 2) based on this, it will return a FEFF* or FDMNES input file.

    For the templates, I think is enough the 'string.Template' included in the Python standard library (there are tons of powerful template systems available, but this will avoid to include a further dependence in Larch).

    For the CIF parsing, well, I think we are obliged to include a dependence on an external library. Do you have any preference for this? I'm evaluating some of them and at the moment the one I like the most is in ASE (https://wiki.fysik.dtu.dk/ase/index.html)... well, this is using a sledgehammer to crack a nut.

    Anyway, your feedback is welcome.

    plugins 
    opened by maurov 11
  • adding example: Fe K-edge treatment in a Jupyter notebook

    adding example: Fe K-edge treatment in a Jupyter notebook

    Following issue #324 :

    Jupyter notebook example using xraylarch and lmfit in Python to treat spectra at the Fe K-edge.

    Let me know if it's good for you!

    opened by charlesll 10
  • wx import issue in both bash and conda installs: solved by installing wxpython

    wx import issue in both bash and conda installs: solved by installing wxpython

    Hi,

    I tried installing Larch using miniconda as well as the bash script on Linux x86-64. In both case I end with an error message related to wx when trying to import larch:

    >>> import larch
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
      File "/home/charles/xraylarch/lib/python3.6/site-packages/larch/__init__.py", line 28, in <module>
        from .shell import shell
      File "/home/charles/xraylarch/lib/python3.6/site-packages/larch/shell.py", line 10, in <module>
        from .interpreter import Interpreter
      File "/home/charles/xraylarch/lib/python3.6/site-packages/larch/interpreter.py", line 18, in <module>
        from . import builtins
      File "/home/charles/xraylarch/lib/python3.6/site-packages/larch/builtins.py", line 22, in <module>
        from . import fitting
      File "/home/charles/xraylarch/lib/python3.6/site-packages/larch/fitting/__init__.py", line 6, in <module>
        import wx
      File "/home/charles/xraylarch/lib/python3.6/site-packages/wx/__init__.py", line 12, in <module>
        __version__ = wx.__version__.VERSION_STRING
    AttributeError: module 'wx' has no attribute '__version__'
    

    This issue is solved by installing wxpython with conda.

    Should wxpython be added as a dependency?

    opened by charlesll 10
  • possible problem with order of plugin import

    possible problem with order of plugin import

    Hi Matt,

    This morning, with a freshly git pull-ed larch, I am unable to start the larch interpreter.

    Below is the traceback along with the output of these print statements

                    print "\n", mod, filelist
                    for fname in filelist:
                        print fname, fname[:-3]
    

    at this location: https://github.com/xraypy/xraylarch/blob/master/lib/builtins.py#L393

    /home/bruce/.larch/plugins/wx ['scanviewer.py', 'periodictable.py', 'gui_utils.py', 'xrfdisplay_fitpeaks.py', 'plotter.py', 'xrfdisplay.py', 'mapviewer.py', '__init__.py', 'gse_dtcorrect.py', 'xrfdisplay_utils.py', 'parameter.py', 'mapimageframe.py']
    scanviewer.py scanviewer
    periodictable.py periodictable
    gui_utils.py gui_utils
    xrfdisplay_fitpeaks.py xrfdisplay_fitpeaks
      File "/usr/local/lib/python2.7/dist-packages/larch/builtins.py", line 411, in _plugin_file
        out = imp.load_module(plugin, fh, modpath, desc)
      File "/home/bruce/.larch/plugins/wx/xrfdisplay_fitpeaks.py", line 24, in <module>
        from parameter import ParameterPanel
      File "/usr/local/lib/python2.7/dist-packages/larch/builtins.py", line 397, in _plugin_file
        ret =  _plugin_file(fname[:-3], path=[mod])
      File "/usr/local/lib/python2.7/dist-packages/larch/builtins.py", line 419, in _plugin_file
        write(traceback.print_tb(tback))
    Traceback (most recent call last):
      File "/usr/local/bin/larch", line 99, in <module>
        shell = larch.shell(banner_msg=BANNER, quiet=options.quiet)
      File "/usr/local/lib/python2.7/dist-packages/larch/shell.py", line 53, in __init__
        self.larch  = Interpreter()
      File "/usr/local/lib/python2.7/dist-packages/larch/interpreter.py", line 142, in __init__
        builtins._addplugin(pdir, _larch=self)
      File "/usr/local/lib/python2.7/dist-packages/larch/builtins.py", line 443, in _addplugin
        return _plugin_file(plugin)
      File "/usr/local/lib/python2.7/dist-packages/larch/builtins.py", line 400, in _plugin_file
        write(traceback.print_tb(tback))
    TypeError: expected a character buffer object
    

    The location of the beginning of the traceback seems to be the line in plugins/wx/xrfdisplay_fitpeaks.py that says

    from parameter import ParameterPanel
    

    and the problem seems to be that parameter.py has not been imported yet (it comes later in filelist).

    I can make larch finish startup by manually prepending parameter.py to filelist.

    Do you need to maintain a dependence tree so that plugins are imported in the right order?

    opened by bruceravel 10
  • Cannot open project

    Cannot open project

    Hi Matt @newville , I'm using Larch for some time. Everything worked fine until this weekend. I can use XASviewer to process data however I can't open any of the saved projects. When I try to open the saved project, I got error message in the terminal (see below) and the project has not been opened. I also tried to load new data and saved as a new project - l also couldn't open it. Any ideas how to fix it?

    run in conda environment "base":

    c:\users\annaw\xraylarch\Scripts\xas_viewer.exe

    Traceback (most recent call last): File "c:\users\annaw\xraylarch\lib\site-packages\larch\wxxas\xasgui.py", line 799, in onReadDialog self.onRead(path) File "c:\users\annaw\xraylarch\lib\site-packages\larch\wxxas\xasgui.py", line 809, in onRead self.show_subframe('athena_import', AthenaImporter, File "c:\users\annaw\xraylarch\lib\site-packages\larch\wxxas\xasgui.py", line 754, in show_subframe self.subframes[name] = frameclass(self, **opts) File "c:\users\annaw\xraylarch\lib\site-packages\larch\wxlib\athena_importer.py", line 83, in init self.a_project = read_athena(self.filename, do_bkg=False, do_fft=False, File "c:\users\annaw\xraylarch\lib\site-packages\larch\io\athena_project.py", line 915, in read_athena aprj.read(filename, match=match, do_preedge=do_preedge, do_bkg=do_bkg, File "c:\users\annaw\xraylarch\lib\site-packages\larch\io\athena_project.py", line 780, in read data = parse_perlathena(text, self.filename) File "c:\users\annaw\xraylarch\lib\site-packages\larch\io\athena_project.py", line 353, in parse_perlathena raw[key] = np.array([float(x) for x in aeval(text2list(t))]) File "c:\users\annaw\xraylarch\lib\site-packages\asteval\asteval.py", line 314, in call return self.eval(expr, **kw) File "c:\users\annaw\xraylarch\lib\site-packages\asteval\asteval.py", line 324, in eval raise ValueError(msg) ValueError: length of text exceeds 50000 characters[] issue

    Best, Anna

    opened by AnnaDragonfly 9
  • Issue plotting the result when using DiffKK

    Issue plotting the result when using DiffKK

    Hi there. In section 13.9 of the Larch Github manual, it refers to computing the f' and f" values as in Cross et al. (1998). I have managed to install the relevant modules and import the relevant libraries. However, I cannot work out how to plot the results. It is described in the example as:

    ''' newplot(dkk.energy, dkk.f2, label='f2', xlabel='Energy (eV)', ylabel='scattering factors', show_legend=True, legend_loc='lr') plot(dkk.energy, dkk.fpp, label='f"(E)') plot(dkk.energy, dkk.f1, label='f1') plot(dkk.energy, dkk.fp, label='f'(E)') '''

    However this does not work. I have tried matplotlib.pyplot and also wxmplot but neither work. I don't think the wxpython library is compatible with my Spyder IDE, as Python crashes whenever I try to use Wxpython to load this result. Does anybody have a solution?

    opened by Ayrtonb1 1
  • [xas_viewer] plot window -> keep custom zoom

    [xas_viewer] plot window -> keep custom zoom

    @newville a feature request I get usually from the users is to have the possibility to keep the selected zoom in an plot window when replotting. This would be something like the following:

    • plot something (in plot window: plot_N)
    • with the mouse zoom a region in plot_N
    • when replotting in plot_N (current group or selected) keep the XY region as selected before
    • to reset the plot region either right click on the plot window or select one of the standard ranges given in the combo box

    What do you think?

    enhancement 
    opened by maurov 4
  • [xas_viewer] energy_shift

    [xas_viewer] energy_shift

    @newville this is a follow-up of #357 . I have tried to fix it by myself, but I got lost in the Wx GUI stuff. If you could help with this soon, it would be great. The users at the beamline still find difficult to adjust the energy shifts with Larch. As a consequence, they go back using Athena...

    The following are checked on the latest master version (xraylarch-0.9.65.post133+g5c834772)

    1. bug in copying energy reference groups
      • load two data groups (group1, group2), plus an energy reference one (group_eref)
      • select group1 and group2
      • click on group1 and set group_eref as energy reference
      • click copy in the energy reference
      • click on group2 -> BUG the energy reference is not group_eref (expected) but group2
    2. energy_shift is not kept
      • click on group1
      • put 1 in "energy shift from original" and press enter (just in case)
      • click on group2
      • click back on group1 -> BUG energy shift from original is 0
    3. energy_shift is not applied
      • click on group1
      • right click to copy group1 into group1_1
      • select group1 and group1_1
      • plot selected groups in dmu/dE -> are identical
      • click on group1_1 and put 1 into energy shift from original
      • replot selected groups -> BUG the two groups are not shifted
    4. applying energy_shift to reference does not propagate to groups linked to it
      • click on group1, put energy_shift to 0 and select group_eref as energy reference
      • click on group_eref and add 1 to energy_shift
      • click group1 -> BUG energy_shift is still at 0

    The workaround to fix bugs 2 and 3 and get the expected behavior is to deselect plus select again the "auto?" next to E0 selection. I do not understand why this solves bug 2. For bug 3, we may apply directly the energy_shift value also to E0, or even better, E0 should simply refer to group.energy not to group.energy_orig.

    Please, just to clarify my understanding of the energy_shift behavior in the GUI, could you check that the following is correct?

    • read a group (g=Group()) -> g.energy = g.energy_orig + energy_shift, energy_shift = 0
    • when setting energy_shift to a value: g.energy = g.energy_orig + energy_shift
    • everything else (E0, plots, exports, whatever) uses g.energy
    • when read energy reference group (g_ref = Group()) -> g.energy_ref = g_ref or g.energy_ref = g_ref.name

    I hope this is clear, if not, please, let me know.

    opened by maurov 2
  • error in plot_chifit: PyNoAppError: The wx.App object must be created first!

    error in plot_chifit: PyNoAppError: The wx.App object must be created first!

    Dear @newville

    I have been trying to use python (in Spyder) for path fitting. I just encountered a new (it worked yesterday) error that I could not see the plots of fitting results, but the fitting itself worked out with a ".out" file: " plot_chifit(dset, title='Ti66_fitting', rmax=6)

    File "C:\ProgramData\xrayLarch\lib\site-packages\larch\wxlib\xafsplots.py", line 683, in plot_chifit _plot(dataset.data.k, data_chik+offset, xmin=kmin, xmax=kmax,

    File "C:\ProgramData\xrayLarch\lib\site-packages\larch\wxlib\plotter.py", line 486, in _plot plotter = _getDisplay(wxparent=wxparent, win=win, size=size,

    File "C:\ProgramData\xrayLarch\lib\site-packages\larch\wxlib\plotter.py", line 339, in _getDisplay display, isnew = _get_disp(symname, creator, win, display_dict, wxparent,

    File "C:\ProgramData\xrayLarch\lib\site-packages\larch\wxlib\plotter.py", line 327, in _get_disp display = creator(window=win, wxparent=wxparent,

    File "C:\ProgramData\xrayLarch\lib\site-packages\larch\wxlib\plotter.py", line 114, in init PlotFrame.init(self, parent=None, size=size,

    File "C:\ProgramData\xrayLarch\lib\site-packages\wxmplot\plotframe.py", line 18, in init BaseFrame.init(self, parent=parent, title=title,

    File "C:\ProgramData\xrayLarch\lib\site-packages\wxmplot\baseframe.py", line 58, in init wx.Frame.init(self, parent, -1, title, **kws)

    PyNoAppError: The wx.App object must be created first!"

    Could you please help me with this?
    Thank you in advance, Best regards

    opened by duoduoss 1
  • Larch controller independent of Wx GUI + _data in _larch.symtable

    Larch controller independent of Wx GUI + _data in _larch.symtable

    @newville

    In view of having Larch more independent from the Wx GUI, and have the possibility to build more Jupyter friendly examples (or applications) I would propose the following actions:

    • [ ] create a new module larch.controller
    • [ ] move all the non-Wx part from larch.wxxas.xas_controller.XASController to larch.controller.LarchController
    • [ ] XASController will inherit from LarchController
    • [ ] assign _larch.symtable as model for LarchController
    • [ ] dedicate _larch.symtable._data as the main data container for all data groups created during a session
    • [ ] add in LarchController all the logic for handling data exchange from the model to the view (= GUI)

    Does this sounds good to you?

    enhancement 
    opened by maurov 3
Releases(0.9.65)
  • 0.9.65(Jul 5, 2022)

    [0.9.65 - 2022-07-05]

    Changed

    • LCF: eliminate combinations with very low weight (#387)
    • XAS Viewer: Add "Clear Session" menu item

    Fixed

    • XAS_Viewer/normalization: fix Y offset (#389)
    • XAS_Viewer/normalization: avoid plotting errors for "Plot Selected" with >100 Spectra selected.
    • XAS_Viewer/exafs: Make sure that E0 and Rbkg are correctly copied to other group
    • XAS_Viewer/exafs: "copy to selected" now forces re-processing of selected groups.
    • XAS_VIewer/session file: Importing of only selected groups from Session file now works properly.
    • XAS_VIewer/session file: better merging of top-level data, especially feff cache on import.
    • XAS_Viewer/Linux: better checks to avoid initialiing wx objects with 0 size.
    • better docstrings for some data/io functions, starting to use autodoc in docs.
    • doc: fix Angstrom rendering in HTML
    • doc: work toward better XAS Viewer doc.
    Source code(tar.gz)
    Source code(zip)
  • 0.9.64(Jun 22, 2022)

  • 0.9.63(Jun 20, 2022)

  • 0.9.62(Jun 8, 2022)

    bugfixes:

    • XAS_Viewer: Feff-fitting paths (and so also parameters) are refreshed for each fit (#377, #374)
    • XAS_Viewer: most main windows are now resizable (#372)
    • better checking and auto-pip-installing of wxutls and wxmplot (#376)
    Source code(tar.gz)
    Source code(zip)
  • 0.9.61(May 27, 2022)

    [0.9.61 - 2022-05-26]

    Added

    • XAS Viewer: Entries for the fit histories of pre-edge peak fitting and Feff fitting can now be erased.

    Fixed

    • XAS Viewer: the merging of groups now works ;).
    • XAS Viewer: setting and energy shift for a group will copy that shift to other groups with the same energy reference. There is a preference setting to turn off this automated copying of energy shifts.
    • XAS Viewer: fixed very slow plotting -- now just back to normal "not fast".
    • XAS Viewer: dialogs have generally better sizes.
    • XAS Viewer: fixes for plotting of Pre-edge peak fits.
    • XAS Viewer: improvements in Journal entries for some processed groups.
    • XAS Viewer: fixes for combining default and per-group configuration.
    Source code(tar.gz)
    Source code(zip)
  • 0.9.60(May 23, 2022)

    [0.9.60 - 2022-05-23]

    Release announcement

    Added

    • each Group of XAFS data will have a Journal - a list of entries with (label, value, timestamp) that will be used to record processing steps. The XAFS processing functions will write the parameters they were called with to this Journal. Users can add notes as Journal entries too.

    • XAS Viewer allows editing of program-wide Preferences, that set the default values and settings for the various analysis steps and program behavior.

    • In many windows showing analysis results, XAS Viewer supports setting the plot window number (1 through 9) so that more than one or two plot windows can be shown at a time.

    • Session-wide Project files (.larix extension) can now be saved and reloaded. These files contain essentially all the arrays for each Group of data, including Journals, processing results, and fit histories. The "processing workspaces" for pre-edge peak fitting, PCA, Linear Combinations, Regressions, and Feff fitting. These Session files can be saved/loaded by plain Python commands. When loading these into XAS Viewer, the fit histories and workspaces will be available. To allow better debugging and tracking of provenance, these Session Files include "configuration" data about the Session (python, larch version, etc) and a complete set of Larch commands for the session, though session commands are not "restored". The files are compressed and use a customized JSON encoding.

    • These Session files are now auto-saved by XAS Viewer periodically (every 15 minutes of activity, by default, and rotated so that a small number (3, by default) of the most recent auto-saved files are kept. On startup, "restore the last session" is available (Ctrl-I).

    Fixed

    • XAS Viewer PCA fixed.
    • XAS Viewer now displays how each Group was created, for example "-log(i1/i0)".
    • XAS Viewer panels have more uniform energy range settings, relative to E0, per group.
    • XAS Viewer has more consistent coloring and font sizes.
    • XAS Viewer Quit dialog now lists the last saved Session file.
    • XAS Viewer now works even harder to keep _xasgroups correct.
    • pycifrw added as a dependency from conda-forge
    • copying parameters from one group to another is much improved.
    • rebinning of EXAFS data better avoids duplicate energies.
    • a few bugs with the handling of some CIFs were improved
    • Feff calculations now default to L3 edge for Z>= 60.
    • Python 3.10 is better supported, Python 3.7 seems to still work.
    Source code(tar.gz)
    Source code(zip)
  • 0.9.59(Apr 1, 2022)

    [0.9.59 - 2022-04-01]

    Release announcement

    Added

    • Reading files from FDMNES.
    • XAS Viewer allows reading in a reference spectrum from the same file as a spectrum.
    • XAS_Viewer better supports each spectrum having an "energy reference spectrum". This can be set on reading spectra, or afterward. Recalibrating energies can propagate calibrations to spectra that share a reference.
    • XAS Viewer better supports an "energy shift" for each spectrum -- this can be copied to other spectra or "undone" to go back to the original (as read-in) data.
    • XAS Viewer: data can be deglitched while plotting in "k" space"
    • XAS Viewer: "flattened" spectra can be used for linear analysis in more places.
    • Example using Jupyter and Fe pre-edge peaks.

    Changed

    • XAS Viewer: the action of the "pin icon" for selecting points from a plot has now changed. Previously hitting the pin icon meant "use most recently clicked point on plot". Now, hitting the pin icon starts a timer which will look for mouse clicks after hitting the pin icon: a) if there are new mouse clicks on the plot, wait at least 3 seconds, and return the most recent position. b) if there are no mouse clicks after 15 seconds, return the most recent position (even before clicking on the pin)

    Fixed

    • Reading columns names from one-line header, and for files that announce as XDI but break XDI specs (say, by having >128 columns).
    • Better handling of CIFs with partial occupancy when generating feff.inp.
    • NLEG is set to 6 by default when generating feff.inp.
    • By default, hydrogen atoms are removed when generating feff.inp (XAS Viewer and cif2feff)
    • Athena project files with very long journals are better supported.
    • Some permission problems for the installation of Applications on MacOS have been avoided.
    • "get current working directory" is now tested uniformly for permission errors.
    • MapViewer: more robust and flexible search for tomographic rotation axis.
    • Fix for spec/HDF5 files with broken "scan" link.
    • XRF Display spectral fitting: faster, better guesses for parameter scales, and show filled eigenvectors (wxmplot 0.9.49)
    • MapViewer / XRF Display: much improved ADD ROIs, including pushing XRF ROIs added in XRF Display back to the list in Mapviewer.
    • MapViewer: The order of ROIs added is now preserved, including for work arrays and Abundances from XRF analysis.

    Removed

    • Plugins are now completely removed
    • 32-bit Windows is no longer supported: libraries and executables have been removed.
    • Cromer-Libermann is more deprecated and hidden (but not completely gone, yet)
    Source code(tar.gz)
    Source code(zip)
  • 0.9.58(Jan 16, 2022)

  • 0.9.57(Dec 2, 2021)

    [0.9.57 - 2021-12-02]

    Added

    • Read RIXS files from BM16 at ESRF.
    • Option --devel in GetLarch.sh to install from source.
    • xas_viewer
      • File->Save as

    Changed

    • Module rixsdata moved from larch.qtrixs to larch.io
    • Force UTF8 encoding in read_ascii
    • xas_viewer
      • File->Save overwrites by default.
      • Better deglitching dialog, including viewing data as chi(E).
      • Loading a Peak Model is now allowed at any time.
      • Default Project filenames are taken from timestamp.

    Fixed

    • Problem with yaml load in GetLarch.sh
    • Problem in interpolation with nearly repeated x values
    • Messages reporting progress when processing XRF Maps
    • Reading Athena Project files with non-ASCII characters
    Source code(tar.gz)
    Source code(zip)
  • 0.9.56(Oct 20, 2021)

  • 0.9.53(Jul 2, 2021)

    [0.9.53 - 2021-07-02]

    Fixed

    • XAS viewer
      • fixed various bugs in Spec/BLISS files importer -- silx version 0.15.2 is now required.
      • "GetLarch.sh" and "GetLarch.bat" scripts now use "miniforge", should provide faster downloads and installs.
      • fixed (hopefully) random Text controls events on startup on Windows.
      • several small improvement feffpath and feffit functions for better managing Path Parameters with lmfit

    Added

    • XAS viewer
      • Add GUI Browser for CIF Files from American Mineralogist Crystal Structure Database
      • Code for converting CIF files to feff6/8 input files, GUI form to run Feff, organize results in users .larch/feff folder
      • Feff Path Browser for import Feff.dat files from .larch/feff
      • Feffit Tab added to XAS Viewer for (1 data set) Feff Fitting, with history of fits, saving of fit script.
      • EXAFS Panel can show chi(q) data.
    Source code(tar.gz)
    Source code(zip)
  • 0.9.53rc1(Jul 2, 2021)

  • 0.9.44rc1(May 8, 2019)

  • 0.9.43rc1(Apr 28, 2019)

  • 0.9.41rc2(Jan 24, 2019)

  • 0.9.41rc1(Jan 23, 2019)

  • 0.9.41rc0000(Jan 23, 2019)

MidTerm Project for the Data Analysis FT Bootcamp, Adam Tycner and Florent ZAHOUI

MidTerm Project for the Data Analysis FT Bootcamp, Adam Tycner and Florent ZAHOUI Hallo

Florent Zahoui 1 Feb 07, 2022
PySpark bindings for H3, a hierarchical hexagonal geospatial indexing system

h3-pyspark: Uber's H3 Hexagonal Hierarchical Geospatial Indexing System in PySpark PySpark bindings for the H3 core library. For available functions,

Kevin Schaich 12 Dec 24, 2022
Get mutations in cluster by querying from LAPIS API

Cluster Mutation Script Get mutations appearing within user-defined clusters. Usage Clusters are defined in the clusters dict in main.py: clusters = {

neherlab 1 Oct 22, 2021
Big Data & Cloud Computing for Oceanography

DS2 Class 2022, Big Data & Cloud Computing for Oceanography Home of the 2022 ISblue Big Data & Cloud Computing for Oceanography class (IMT-A, ENSTA, I

Ocean's Big Data Mining 5 Mar 19, 2022
Finds, downloads, parses, and standardizes public bikeshare data into a standard pandas dataframe format

Finds, downloads, parses, and standardizes public bikeshare data into a standard pandas dataframe format.

Brady Law 2 Dec 01, 2021
This is an example of how to automate Ridit Analysis for a dataset with large amount of questions and many item attributes

This is an example of how to automate Ridit Analysis for a dataset with large amount of questions and many item attributes

Ishan Hegde 1 Nov 17, 2021
This repo is dedicated to the data extraction and manipulation of the World Bank's database called STEP.

Overview Welcome to the Step-X repository. This repo is dedicated to the data extraction and manipulation of the World Bank's database called STEP. Be

Keanu Pang 0 Jan 20, 2022
Stochastic Gradient Trees implementation in Python

Stochastic Gradient Trees - Python Stochastic Gradient Trees1 by Henry Gouk, Bernhard Pfahringer, and Eibe Frank implementation in Python. Based on th

John Koumentis 2 Nov 18, 2022
Synthetic Data Generation for tabular, relational and time series data.

An Open Source Project from the Data to AI Lab, at MIT Website: https://sdv.dev Documentation: https://sdv.dev/SDV User Guides Developer Guides Github

The Synthetic Data Vault Project 1.2k Jan 07, 2023
Python script for transferring data between three drives in two separate stages

Waterlock Waterlock is a Python script meant for incrementally transferring data between three folder locations in two separate stages. It performs ha

David Swanlund 13 Nov 10, 2021
An ETL Pipeline of a large data set from a fictitious music streaming service named Sparkify.

An ETL Pipeline of a large data set from a fictitious music streaming service named Sparkify. The ETL process flows from AWS's S3 into staging tables in AWS Redshift.

1 Feb 11, 2022
Mining the Stack Overflow Developer Survey

Mining the Stack Overflow Developer Survey A prototype data mining application to compare the accuracy of decision tree and random forest regression m

1 Nov 16, 2021
Projects that implement various aspects of Data Engineering.

DATAWAREHOUSE ON AWS The purpose of this project is to build a datawarehouse to accomodate data of active user activity for music streaming applicatio

2 Oct 14, 2021
My first Python project is a simple Mad Libs program.

Python CLI Mad Libs Game My first Python project is a simple Mad Libs program. Mad Libs is a phrasal template word game created by Leonard Stern and R

Carson Johnson 1 Dec 10, 2021
statDistros is a Python library for dealing with various statistical distributions

StatisticalDistributions statDistros statDistros is a Python library for dealing with various statistical distributions. Now it provides various stati

1 Oct 03, 2021
Python beta calculator that retrieves stock and market data and provides linear regressions.

Stock and Index Beta Calculator Python script that calculates the beta (β) of a stock against the chosen index. The script retrieves the data and resa

sammuhrai 4 Jul 29, 2022
BigDL - Evaluate the performance of BigDL (Distributed Deep Learning on Apache Spark) in big data analysis problems

Evaluate the performance of BigDL (Distributed Deep Learning on Apache Spark) in big data analysis problems.

Vo Cong Thanh 1 Jan 06, 2022
DefAP is a program developed to facilitate the exploration of a material's defect chemistry

DefAP is a program developed to facilitate the exploration of a material's defect chemistry. A large number of features are provided and rapid exploration is supported through the use of autoplotting

6 Oct 25, 2022
Python implementation of Principal Component Analysis

Principal Component Analysis Principal Component Analysis (PCA) is a dimension-reduction algorithm. The idea is to use the singular value decompositio

Ignacio Darago 1 Nov 06, 2021
Extract data from a wide range of Internet sources into a pandas DataFrame.

pandas-datareader Up to date remote data access for pandas, works for multiple versions of pandas. Installation Install using pip pip install pandas-d

Python for Data 2.5k Jan 09, 2023