Lumerical may still be evaluating the code when you are trying to get the results? Not entirely sure about the sequence of events here, but in this case it may be be better to return the results directly to Python using A = fdtd.getresult('index monitor','index') Once it passes this code to be evaluated it will move on, since it is not expecting any results to be returned. Python basically treats the Lumerical GUI environment as a client. fdtd.eval("A = getresult('index monitor','index') ") Are you doing this by evaluating a string argument as lsf code. you are saving the index monitor results to a data set in the lumerical workspace. Thank you! Any suggestions are much appreciated. Is this functionality provided anywhere in lumapi? I'm looking for some way to block my python script before step 3, until step 2 has completed. I suspect that this is because the lumapi functions will return prior to the scripting functions completing in Lumerical. I then have to execute steps 3 & 4 again to get the correct results. the same results as if I had omitted step 2). However, on occasion, the first time I poll for "data_set", I get the permittivity values PRIOR to the material properties being updated (i.e. This works most of the time and gives me the correct results. Retrieves the index monitor outputs from the Lumerical script workplace, into the python script (using lumapi.getVar(fdtd.handle, "data_set")).
saves permittivities as a function of x, y, z, f, etc.) Saves index monitor outputs to a matrix object "data_set" in the script workplace (i.e.