Changeset a30864b1 in sasview for sansdataloader/src/sans/dataloader


Ignore:
Timestamp:
Jan 21, 2013 10:48:59 AM (12 years ago)
Author:
Jae Cho <jhjcho@…>
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, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
c080e542
Parents:
fdb134b9
Message:

minor fix for pil import

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sansdataloader/src/sans/dataloader/readers/tiff_reader.py

    r7d6351e ra30864b1  
    1515import numpy 
    1616from sans.dataloader.data_info import Data2D 
    17      
     17from sans.dataloader.manipulations import reader2D_converter 
    1818     
    1919class Reader: 
     
    3838        try: 
    3939            import Image 
     40            import TiffImagePlugin 
     41            Image._initialized=2 
    4042        except: 
    4143            msg = "tiff_reader: could not load file. Missing Image module." 
     
    5658        output.data = numpy.zeros([im.size[0], im.size[1]]) 
    5759        output.err_data = numpy.zeros([im.size[0], im.size[1]]) 
     60        output.mask = numpy.ones([im.size[0], im.size[1]], dtype=bool) 
    5861         
    5962        # Initialize 
     
    9194        output.x_bins = x_vals 
    9295        output.y_bins = y_vals 
     96        output.qx_data = numpy.array(x_vals) 
     97        output.qy_data = numpy.array(y_vals) 
    9398        output.xmin = 0 
    9499        output.xmax = im.size[0] - 1 
     
    98103        # Store loading process information 
    99104        output.meta_data['loader'] = self.type_name 
     105        output = reader2D_converter(output) 
    100106        return output 
Note: See TracChangeset for help on using the changeset viewer.