Hello Matt,

I was able to import pre_edge, autobk, and xftf without problems. Is it possible to import feff paths and do a fit to exafs data in a python script? I was able to do

   larch.enable_plugins()
   from larch_plugins.xafs import feffdat

   path1 = feffdat.feffpath('feff0001.dat')

but I could not figure out how to get the feffit_transform and feffit_dataset functions to work. Before I upgraded I was able to use those two in a python script but I was not able to get the feffit function to run to do the actual fit.

Larch is really a great piece of software and I'm very thankful for all your hard work you put in developing it.

Best regards,
Johan
 

From: ifeffit-bounces@millenia.cars.aps.anl.gov [ifeffit-bounces@millenia.cars.aps.anl.gov] on behalf of Matt Newville [newville@cars.uchicago.edu]
Sent: 30 September 2015 15:22
To: XAFS Analysis using Ifeffit
Subject: Re: [Ifeffit] Problems importing larch plugins to python

Hi Johann,



On Wed, Sep 30, 2015 at 7:48 AM, Johan Nilsson <johan.nilsson@chalmers.se> wrote:
Hello everyone,

I recently installed the latest development version of larch from github and now I'm having some problems importing larch plugins to my python scripts. I read in the documentation that there is a new method for doing this but that the old way should still work, this is what happens if I try to do it the way I've done it before:

johan@johan-Latitude-E6430:~$ python
Python 2.7.6 (default, Jun 22 2015, 17:58:13)
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from larch import use_plugin_path
>>> use_plugin_path('xafs')
>>> from pre_edge import pre_edge
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/johan/.larch/plugins/xafs/pre_edge.py", line 13, in <module>
    from larch_plugins.std import parse_group_args
ImportError: No module named larch_plugins.std
>>>

I also tried the new method described in the docs:

johan@johan-Latitude-E6430:~$ python
Python 2.7.6 (default, Jun 22 2015, 17:58:13)
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import larch
>>> from larch_plugins.xafs import autobk
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named larch_plugins.xafs
>>>

I'm running ubuntu 14.04. Any ideas of what is going on here?

Best regards,
Johan


Sorry for the trouble.  I broke this recently. For now, do
   
    import larch
    larch.enable_plugins()
    from larch_plugins.xafs import autobk

I'll fix this soon (and then look for a better solution for what I thought I was trying to accomplish by not doing this automatically!).

--Matt Newville