...
Code Block | ||
---|---|---|
| ||
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 |
Code Block | ||
---|---|---|
| ||
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[1]])
#add it to the output dictionary
script_outputs = {"data":noise}
#also return the x-axis
script_outputs["xaxis"] = xaxis
return script_outputs |