File tree Expand file tree Collapse file tree 1 file changed +3
-12
lines changed
Expand file tree Collapse file tree 1 file changed +3
-12
lines changed Original file line number Diff line number Diff line change @@ -31,18 +31,9 @@ def load_data_arina(self):
3131 filename = self .show_file_dialog ()
3232 dataset = read_arina (filename )
3333
34- # Try to reshape the data to be square
35- N_patterns = dataset .data .shape [1 ]
36- Nxy = np .sqrt (N_patterns )
37- if np .abs (Nxy - np .round (Nxy )) <= 1e-10 :
38- Nxy = int (Nxy )
39- dataset .data = dataset .data .reshape (
40- Nxy , Nxy , dataset .data .shape [2 ], dataset .data .shape [3 ]
41- )
42- else :
43- self .statusBar ().showMessage (
44- f"The scan appears to not be square! Found { N_patterns } patterns" , 5_000
45- )
34+ # Warn if the data is not square
35+ if dataset .data .shape [1 ] == 1 :
36+ self .statusBar ().showMessage (f"Arina data was loaded as 3D, please reshape..." )
4637
4738 self .datacube = dataset
4839 self .diffraction_scale_bar .pixel_size = self .datacube .calibration .get_Q_pixel_size ()
You can’t perform that action at this time.
0 commit comments