Changeset fe498b83 in sasview for src/sas/sascalc/file_converter/bsl_loader.py
- Timestamp:
- Aug 19, 2016 5:20:16 AM (8 years ago)
- Branches:
- master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- edf0e06
- Parents:
- ac370c5
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sascalc/file_converter/bsl_loader.py
rd889d80 rfe498b83 1 1 from sas.sascalc.file_converter.core.bsl_loader import CLoader 2 from sas.sascalc.dataloader.data_info import Data2D 2 3 from copy import deepcopy 3 4 import os … … 79 80 data_info['pixels'], data_info['rasters'], data_info['swap_bytes']) 80 81 82 def load_frames(self, frames): 83 frame_data = [] 84 # Prepare axis values (arbitrary scale) 85 x = self.n_rasters * range(1, self.n_pixels+1) 86 y = [self.n_pixels * [i] for i in range(1, self.n_rasters+1)] 87 y = np.reshape(y, (1, self.n_pixels*self.n_rasters))[0] 88 x_bins = x[:self.n_pixels] 89 y_bins = y[0::self.n_pixels] 90 91 for frame in frames: 92 self.frame = frame 93 raw_frame_data = self.load_data() 94 data2d = Data2D(data=raw_frame_data, qx_data=x, qy_data=y) 95 data2d.x_bins = x_bins 96 data2d.y_bins = y_bins 97 frame_data.append(data2d) 98 99 return frame_data 100 101 81 102 def __setattr__(self, name, value): 82 103 if name == 'filename':
Note: See TracChangeset
for help on using the changeset viewer.