Ignore:
Timestamp:
Aug 5, 2016 11:48:33 AM (8 years ago)
Author:
lewis
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:
05595c4
Parents:
c3f0114
Message:

Begin implementing 2D BSL loader into GUI

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/sascalc/file_converter/bsl_loader.py

    rc3f0114 r535e181  
    88    # TODO: Change to __init__(self, filename, frame) 
    99    # and parse n_(pixels/rasters) from header file 
    10     def __init__(self, filename, frame): 
     10    def __init__(self, filename): 
    1111        header_file = open(filename, 'r') 
    1212        data_info = {} 
     
    5656            data_info['pixels'] = 1 
    5757 
    58         CLoader.__init__(self, data_info['filename'], frame, 
     58        CLoader.__init__(self, data_info['filename'], data_info['frames'], 
    5959            data_info['pixels'], data_info['rasters'], data_info['swap_bytes']) 
    6060 
     
    6262        if name == 'filename': 
    6363            return self.set_filename(value) 
     64        elif name == 'n_frames': 
     65            return self.set_n_frames(value) 
    6466        elif name == 'frame': 
    6567            return self.set_frame(value) 
     
    7577        if name == 'filename': 
    7678            return self.get_filename() 
     79        elif name == 'n_frames': 
     80            return self.get_n_frames() 
    7781        elif name == 'frame': 
    7882            return self.get_frame() 
     
    8488            return self.get_swap_bytes() 
    8589        return CLoader.__getattr__(self, name) 
    86  
    87     def create_arr(self): 
    88         return np.zeros((self.n_rasters, self.n_pixels)) 
Note: See TracChangeset for help on using the changeset viewer.