Changeset 32e8c78 in sasview


Ignore:
Timestamp:
Mar 17, 2010 1:22:44 PM (15 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:
c6f95bb
Parents:
afab469
Message:

made sure the 7th column is mask

File:
1 edited

Legend:

Unmodified
Added
Removed
  • DataLoader/readers/red2d_reader.py

    r3cd95c8 r32e8c78  
    163163                    #empty line 
    164164                    continue 
    165                 elif len(line_toks) < 2:  
     165                elif len(line_toks) < 3:  
    166166                    #Q-map 2d require 3 or more columns of data           
    167167                    raise ValueError,"Igor_Qmap_Reader: Can't read this file: Not a proper file format" 
     
    217217                if qz_value == None or not numpy.isfinite(qz_value):  
    218218                    qz_value = 0   
    219                 if not numpy.isfinite(mask_value)or mask_value ==0 :  
     219                if not numpy.isfinite(mask_value):  
    220220                    mask_value = 1              
    221221                q_data  = numpy.append(q_data,numpy.sqrt(qx_value**2+qy_value**2+qz_value**2)) 
    222                 # Note: For convenience, mask = False stands for masked while mask = True for unmasked 
     222                # Note: For convenience, mask = False stands for masked, while mask = True for unmasked 
    223223                mask    = numpy.append(mask,(mask_value>=1)) 
    224224                 
     225        # If all mask elements are False, put all True 
     226        if not mask.any(): mask[mask==False] = True    
     227   
    225228        # Store limits of the image in q space 
    226229        xmin    = numpy.min(qx_data) 
Note: See TracChangeset for help on using the changeset viewer.