Subject: Writing Igor experiment from Python?
In-Reply-To: <D7B2C354.72DF%francis.dalaudier@wanadoo.fr>
References: <D7B2C354.72DF%francis.dalaudier@wanadoo.fr>
Message-ID: <b8013b5d-449f-7099-a285-2cf2568f60c2@freenet.de>
Hello Jan,
I also agree to Francis' suggestion. Here are some more details (on
Windows 10). The following lines have to go to an Igor text file (.itx).
Just assume a Python script generated these lines. The file name in this
example is IgorInstructions.itx
IGOR
WAVES /D 'dataset_1'
BEGIN
??? 1
??? 4
??? 9
??? 16
END
X Display 'dataset_1'
X NewPath /O /C SaveDir "C:Users:Admin:Desktop:Test"
X SavePICT/E=-5/B=72 /P=SaveDir /O
X Quit
(Please adapt the path to a suitable location on your hard drive.)
The program executes the following steps:
1. Load the data
2. Make a plot
3. Make a new folder on the hard drive
4. Save the plot there
5. Quit Igor
You can "start" the Igor text files in two ways: either double click it,
or go the command window (DOS prompt), navigate to the folder that
contains "IgorInstructions.itx", and type :????? start Igor.exe
IgorInstructions.itx
I think you can also directly use Python to send the last command (
start Igor.exe ....... etc) to the command line but I have not tried
this myself.
The code above is a simplified version of example 8.13 from "Programming
Igor Pro: A Comprehensive Introduction" (just in case you need more
details).
Best,
MS
Am 9/3/2018 um 10:54 AM schrieb Francis Dalaudier:
> Sorry for previous HTML only message. I still not find how to configure
> Webmail in order to send "raw" text. ______________________________________
>
> ??? Hello Jan (and other users)
>
> I sometime (rather frequently) use Igor to visualize data gathered or
> processed through python.
>
> The simplest solution is to write (from python) an "Igor Text File" (.itx
> extension).
>
> Beside the data, this format allows to include any command you could type
> from the command line.
>
> Opening this file loads the data into Igor and plot it (through the included
> commands).
>
> If the data is "large", I recommend to write it in binary to disk (possibly
> as HDF5)
>
> along with an "Igor Text File" containing the commands to load this data and
> to plot it.
>
>
>
> I believe that python is (in some way) a powerful complementary tool,
> convenient to use along with Igor
>
>
>
> Francis
>
> ____________________________________________________
> | Francis Dalaudier | francis.dalaudier at wanadoo.fr |
> |_____________________|______________________________|
>
>
>
> _______________________________________________
> Info-igor mailing list
> Info-igor at lists.info-igor.org
> http://lists.info-igor.org/listinfo.cgi/info-igor-info-igor.org