[Ifeffit] Problems importing larch plugins to python

Johan Nilsson johan.nilsson at chalmers.se
Fri Oct 2 08:58:53 CDT 2015


Hello Bruce,

I added the _larch argument to my feff path and parameters and the script seems to be working now, thank you for spotting that. I'll have a look at the links you provided and I'll try to do some more exafs fitting with larch and hopefully I will get a better understanding of how it all works.

Best regards,
Johan
________________________________________
From: ifeffit-bounces at millenia.cars.aps.anl.gov [ifeffit-bounces at millenia.cars.aps.anl.gov] on behalf of Bruce Ravel [bravel at bnl.gov]
Sent: 02 October 2015 15:17
To: XAFS Analysis using Ifeffit
Subject: Re: [Ifeffit] Problems importing larch plugins to python

On 10/02/2015 09:09 AM, Bruce Ravel wrote:
> It turns out that, when you use
> larch as a python script (as opposed to running it through larch
> itself), every damn thing needs the '_larch=mylarch' argument.

Johan,

I explain why this is necessary at

https://bruceravel.gitbooks.io/larch-plugin-tutorial/content/mback/details.html

Well, that is to say, I explain my best understanding of why it's
necessary.  Some of the inner workings of larch are still a bit opaque
to me :)

In any case, when you are at the larch command line (or using larch to
interpret a larch script), it is unambiguous which instance of the
larch interpreter each function is supposed to use.  When using larch
as a module in a python script, it is conceivable that more than one
larch interpreter exists.  So you have to be explicit.

B


--
  Bruce Ravel  ------------------------------------ bravel at bnl.gov

  National Institute of Standards and Technology
  Synchrotron Science Group at NSLS-II
  Building 535A
  Upton NY, 11973

  Homepage:    http://bruceravel.github.io/home/
  Software:    https://github.com/bruceravel
  Demeter:     http://bruceravel.github.io/demeter/
_______________________________________________
Ifeffit mailing list
Ifeffit at millenia.cars.aps.anl.gov
http://millenia.cars.aps.anl.gov/mailman/listinfo/ifeffit




More information about the Ifeffit mailing list