smeerten / ssnake

A program for the analysis of NMR data.
Other
20 stars 15 forks source link

Combining 2D into pseudo 3D not properly handled #157

Open jtrebosc opened 10 months ago

jtrebosc commented 10 months ago

A series of 2D spectra recorded in States-TPPI (hyper-complex) are processed separately. Combine->Combine Workspace is used to create a pseudo 3D of shape [D1, D2, D3] where D2 and D3 are complex. One cannot change the active dimension to D2 or D1 in the newly created pseudo 3D! an error is reported :

Traceback (most recent call last): File "/home/trebosc/PROGRAMMES/NMR/simulations/ssnake_github_JT/src/views.py", line 2835, in upd self.data1D = self.data.getSlice(self.axes, self.locList, stack) File "/home/trebosc/PROGRAMMES/NMR/simulations/ssnake_github_JT/src/spectrum.py", line 2488, in getSlice sliceData.icomplexReorder(axes[-1]) File "/home/trebosc/PROGRAMMES/NMR/simulations/ssnake_github_JT/src/hypercomplex.py", line 548, in icomplexReorder tmpData[np.logical_not(tmpBArray)] = np.real(self.data[np.logical_not(bArray)]) + 1jnp.real(self.data[bArray]) IndexError: boolean index did not match indexed array along dimension 0; dimension is 4 but corresponding boolean dimension is 3 During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/trebosc/PROGRAMMES/NMR/simulations/ssnake_tutorials/EXSY/../../ssnake_github_JT/src/ssNake.py", line 2190, in self.buttons1Group.buttonClicked.connect(lambda: self.setAxes(True)) File "/home/trebosc/PROGRAMMES/NMR/simulations/ssnake_tutorials/EXSY/../../ssnake_github_JT/src/ssNake.py", line 2757, in setAxes self.getSlice(axes, True) File "/home/trebosc/PROGRAMMES/NMR/simulations/ssnake_tutorials/EXSY/../../ssnake_github_JT/src/ssNake.py", line 2786, in getSlice self.father.current.setSlice(axes, locList) File "/home/trebosc/PROGRAMMES/NMR/simulations/ssnake_github_JT/src/views.py", line 493, in setSlice self.upd() File "/home/trebosc/PROGRAMMES/NMR/simulations/ssnake_github_JT/src/views.py", line 2840, in upd self.data1D = self.data.getSlice(self.axes, self.locList, stack) File "/home/trebosc/PROGRAMMES/NMR/simulations/ssnake_github_JT/src/spectrum.py", line 2488, in getSlice sliceData.icomplexReorder(axes[-1]) File "/home/trebosc/PROGRAMMES/NMR/simulations/ssnake_github_JT/src/hypercomplex.py", line 548, in icomplexReorder tmpData[np.logical_not(tmpBArray)] = np.real(self.data[np.logical_not(bArray)]) + 1jnp.real(self.data[bArray]) IndexError: boolean index did not match indexed array along dimension 0; dimension is 4 but corresponding boolean dimension is 3

jtrebosc commented 10 months ago

Note: combining the 2D into pseudo 3D before processing then processing the pseudo 3D in D3 and D2 does provide a usable pseudo3D dataset. The error is probably somewhere in the combineWorkspace function, and how the hyperShape is defined when combining hypercomplex data.