Running Igor in a Master/Slave Setup
jjweimer
Igor Slave --> sends data to pipe
Igor Master --> gets data from pipe and graphs it
The slave could then be used interactively to run around and collect data from other experiments, while the master would operate perhaps in a "read-only/locked" mode to show the data.
Wiser folks than me might have a clever answer here.
The Sockit XOP acts as a TCP/IP network client. I then wrote a python server which IGOR could connect to. All the python server has to do is echo the data from one instance to all connected clients. One has to design protocol for the communication but it's fairly simple. In my setup I had one IGOR instance telling another to execute arbitrary commands. This can be a security hazard.
I did start on a IGOR TCP/IP server, but that was going to take a bit of effort - what would the server serve, and how would it handle everything? For example if one wrote a generic server it could act as an HTTP server, but then it would have to implement all of the HTTP protocol.
Another alternative is for one instance of IGOR to write to file, the other instance could read the file as and when there was new data, but I'm not sure if there are any flocking issues with that.
October 10, 2011 at 07:51 pm - Permalink
October 10, 2011 at 08:20 pm - Permalink
* Start primary Igor instance // open one copy of Igor
* #include "MasterSlave" // open package
* --> MasterSlave#SetAsMaster() // set this instance as master
* --> MasterSlave#GraphSlaveInput(...) // tell the master what is to be done with incoming pipe data
* Start a second Igor instance // open a freash second copy of Igor or a previous experiment as a second copy
* #include "MasterSlave"
* --> MasterSlave#SetAsSlave()
* ... do some processing in the slave ...
* --> MasterSlave#SendtoMaster(wavey,wavex) // send the data to graph
* Save the experiment
* Open a different experiment within the second instance of Igor
* #include "MasterSlave" ...
* REPEAT slave processing, then restart new slave as needed
* close and complete all slave processing steps
* Reopen Master instance
* --> MasterSlave#CloseAllPipes()
* Now work in master copy with acquired data
I am thinking along the lines of Services that are available through many Mac apps, where data can be piped behind the scenes from one application directly to another.
--
J. J. Weimer
Chemistry / Chemical & Materials Engineering, UAHuntsville
October 11, 2011 at 09:42 am - Permalink