Github will not let me attach an unsupported file type such as a wt5 file, so apologies for not providing the reference file...
Attempts to split a data file into separate 2D chunks, apply a scaling factor, and rejoining them, are failing. The transformed Axes appear effectively multidimensional even though the scans they are associated with were done independently and are orthogonal.
import WrightTools as wt
import matplotlib.pyplot as plt
import numpy as np
Hi,
Github will not let me attach an unsupported file type such as a wt5 file, so apologies for not providing the reference file...
Attempts to split a data file into separate 2D chunks, apply a scaling factor, and rejoining them, are failing. The transformed Axes appear effectively multidimensional even though the scans they are associated with were done independently and are orthogonal.
import WrightTools as wt import matplotlib.pyplot as plt import numpy as np
data=wt.open(r"c:\temp\primary.wt5") #change path data.transform("twin2","twin1")
datan3=data.split("twin2",[6080,6120,6440])
data1=datan3[0] data1.channels[8][:]=data1.channels[8][:]31.2 data2=datan3[1] data2.channels[8][:]=data2.channels[8][:]23.4 data3=datan3[2] data3.channels[8][:]=data3.channels[8][:]*14.7 data4=datan3[3]
datanew=wt.data.join([data1,data2,data3,data4],method="first",name="first")
wt.artists.quick2D(datanew)
plt.show()
pass
split data into 4 pieces along <twin2>: 0 : -inf to 6080.00 wn (29, 56) 1 : 6080.00 to 6120.00 wn (2, 56) 2 : 6120.00 to 6440.00 wn (16, 56) 3 : 6440.00 to inf wn (29, 56) Traceback (most recent call last): File "c:/Users/kamey/work/python/scripts/primaryfileworkup_test1.py", line 18, in <module> datanew=wt.data.join([data1,data2,data3,data4],method="first",name="first") File "C:\ProgramData\Anaconda3\lib\site-packages\WrightTools\data\_join.py", line 93, in join raise wt_exceptions.MultidimensionalAxisError(a.natural_name, "join") WrightTools.exceptions.MultidimensionalAxisError: (MultidimensionalAxisError(...), 'join can not handle multidimensional axis: twin2')