[Ifeffit] Problems importing larch plugins to python

Johan Nilsson johan.nilsson at chalmers.se
Mon Oct 5 16:41:11 CDT 2015


Hello Matt,

I think that doing something like that would be quite reasonable, it would probably be a bit easier to follow which functions that need a larch interpreter. I don't know if it makes sense to think about the interpreter as a class and the functions that use interpreter as methods of that class, I'm not a very advanced python user and that is probably how I would think about it if it was written like that.

Johan
________________________________
From: ifeffit-bounces at millenia.cars.aps.anl.gov [ifeffit-bounces at millenia.cars.aps.anl.gov] on behalf of Matt Newville [newville at cars.uchicago.edu]
Sent: 02 October 2015 16:47
To: XAFS Analysis using Ifeffit
Subject: Re: [Ifeffit] Problems importing larch plugins to python

Hi Johan, Bruce,

Thanks.  And, yes lots of the functions need a working interpreter passed in.  I'm not sure how I would do it, but it might be reasonable, and more pythonic to do

    session = larch.Interpreter()
    session.FeffPathGroup(..)
    session.feffit()

and so on.  You'd still be typing *something* a lot, but it might be easier to follow.



On Fri, Oct 2, 2015 at 9:04 AM, Bruce Ravel <bravel at bnl.gov<mailto:bravel at bnl.gov>> wrote:
On 10/02/2015 09:58 AM, Johan Nilsson wrote:
I added the _larch argument to my feff path and parameters and the
script seems to be working now, thank you for spotting that.

Yay!

If you use a programmable editor, you might consider binding the
insertion of "_larch=mylarch" to a keyboard shortcut.  You will find
yourself typing that A LOT as you use larch in this way. :)


B

--
 Bruce Ravel  ------------------------------------ bravel at bnl.gov<mailto: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<mailto:Ifeffit at millenia.cars.aps.anl.gov>
http://millenia.cars.aps.anl.gov/mailman/listinfo/ifeffit



--
--Matt Newville <newville at cars.uchicago.edu<http://cars.uchicago.edu>> 630-252-0431
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://millenia.cars.aps.anl.gov/pipermail/ifeffit/attachments/20151005/64c5654f/attachment.html>


More information about the Ifeffit mailing list