Igor Pro for Direct (shell or batch) Control

Perhaps this is a pipe-dream but ...

I have recently become aware of the utility of python in LaTeX. I plan to generate problem sets (e.g. homework for courses) using it. The beauty as I see is the ability to set up a problem, define its inputs and equation(s), and generate the answer all in a "publication-ready" format. As I explored the options, I also saw where this is being touted as a great way to create a self-contained journal publication, one that provides both the background and the analysis tools, all within a "click and create" approach.

I started to wonder. Would it ever be possible to run Igor Pro from a (shell or batch) command line call? The equivalent of \usepackage{pythontex} in LaTeX might be \usepackage{IgorProtex}, with the subsequent calls to invoke Igor Pro with data input values, collect the return, and have it included properly. Of course, the link to call Igor Pro from python or other "script" languages would fall naturally out of this interface.

Perhaps this is already somewhat possible when Igor Pro is running a background daemon with "watch folders". Even that would be an interesting first step.

But ... Am I dreaming too big or dreaming alone on this?
johnweeks wrote:
It's probably not quite what you want, but you might start here:
DisplayHelpTopic "Calling Igor from Scripts"


Thanks! That is a good starting point. I can see now how I might set up something like this in a (macOS) shell script ...

<IGOR> ".../myexperiment.pxp" // activate (open) my experiment
<IGOR> -X -Q "Analyze New Data"
<IGOR> -X "Quit/N"


I'd just have to take care of the I/O of data in and results out through Igor Pro code.

The next step might be when such script calls would NOT open the entire UI of the application (is this called something like running in a "faceless mode"???).

--
J. J. Weimer
Chemistry / Chemical & Materials Engineering, UAH
jjweimer wrote:
The next step might be when such script calls would NOT open the entire UI of the application (is this called something like running in a "faceless mode"???).
..


IDK if it will do the trick, but this help topic is worth reading for windows installations: displayhelptopic "Igor Command Line".

And more precisely the following statement in the mentioned helptopic:

The /Automation flag keeps Igor windows hidden


best,
_sk

In reply to by jjweimer

Hi,

I tried these commands in the terminal of Mac. However, after the first command 

<IGOR> ".../myexperiment.pxp" // activate (open) my experiment

The terminal could not run the following commands.

Does anyone have a suggestion about what's going on there?