Subject: Writing Igor experiment from Python?
In-Reply-To: <b8013b5d-449f-7099-a285-2cf2568f60c2@freenet.de>
References: <D7B2C354.72DF%francis.dalaudier@wanadoo.fr>
<b8013b5d-449f-7099-a285-2cf2568f60c2@freenet.de>
Message-ID: <21E1D892-35BD-427E-8D0C-34D6788D7FF5@anl.gov>
Thanks to MS and Francis!
I missed this. This may solve the problem I have and effectively distribute both data and Igor text file with code to display the data?
Sincerely
Jan
*****************************************************************
Dr. Jan Ilavsky, physicist
X-Ray Science Division
Advanced Photon Source
Argonne National Laboratory
9700 S. Cass Avenue, bldg 433A002
Argonne, IL 60439, USA
Phone: (630) 252-0866
e-mail: ilavsky at aps.anl.gov<mailto:ilavsky at aps.anl.gov>
Skype: Honzail
Facetime:ilavsky at aps.anl.gov<mailto:ilavsky at aps.anl.gov>
>>> SAS2018 conference: http://sas2018.anl.gov <<<
web page:
https://usaxs.xray.aps.anl.gov/staff/jan-ilavsky
Indra web page: https://usaxs.xray.aps.anl.gov/software/indra
Irena web page: https://usaxs.xray.aps.anl.gov/software/irena
Nika web page: https://usaxs.xray.aps.anl.gov/software/nika
USAXS web page: https://usaxs.xray.aps.anl.gov
APS small-angle page: https://small-angle.aps.anl.gov/
Youtube channel: https://www.youtube.com/channel/UCDTzjGr3mAbRi3O4DJG7xHA/about
Shipping instructions: https://usaxs.xray.aps.anl.gov/documentation/shipping-instructions
*****************************************************************
Suggestion No1 to users:
If the model is incompatible with your data, it is not the data you need to change.
The fact, that A model fits your data, it is NOT proof that it is THE appropriate model.
On Sep 3, 2018, at 4:46 AM, XPST admin <xpst_update at freenet.de<mailto:xpst_update at freenet.de>> wrote:
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<mailto:francis.dalaudier at wanadoo.fr> |
|_____________________|______________________________|
_______________________________________________
Info-igor mailing list
Info-igor at lists.info-igor.org<mailto:Info-igor at lists.info-igor.org>
http://lists.info-igor.org/listinfo.cgi/info-igor-info-igor.org
_______________________________________________
Info-igor mailing list
Info-igor at lists.info-igor.org<mailto:Info-igor at lists.info-igor.org>
http://lists.info-igor.org/listinfo.cgi/info-igor-info-igor.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://info-igor.org/attachments/20180903/e3325ad4/attachment.html>