Python scripting processing examples:
Take XY data, and return XY data - convert data to noise
import numpy as np def run(xaxis, data, **kwargs): #generate random noise the same shape as the data noise = np.random.rand(*data.shape) #add it to the output dictionary script_outputs = {"data":noise} #also return the x-axis script_outputs["xaxis"] = xaxis return script_outputs
Take an image (with axes) and return an image (with axes)
import numpy as np def run(xaxis,yaxis, data, **kwargs): #generate random noise the same shape as the data noise = np.random.rand(*data.shape) #add it to the output dictionary script_outputs = {"data":noise} #also return the x-axis script_outputs["xaxis"] = xaxis #and the y-axis script_outputs["yaxis"] = yaxis return script_outputs