Changeset 083afa1 in sasview for src/sas/sascalc/dataloader/readers/abs_reader.py
- Timestamp:
- Apr 11, 2017 6:11:14 AM (8 years ago)
- Children:
- 9c23f40
- Parents:
- 0741804
- git-author:
- Andrew Nelson <andyfaff@…> (04/07/17 07:53:49)
- git-committer:
- Andrew Nelson <andyfaff@…> (04/11/17 06:11:14)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sascalc/dataloader/readers/abs_reader.py
r959eb01 r083afa1 69 69 data_conv_i = None 70 70 71 if has_converter == Trueand output.x_unit != '1/A':71 if has_converter and output.x_unit != '1/A': 72 72 data_conv_q = Converter('1/A') 73 73 # Test it 74 74 data_conv_q(1.0, output.x_unit) 75 75 76 if has_converter == Trueand output.y_unit != '1/cm':76 if has_converter and output.y_unit != '1/cm': 77 77 data_conv_i = Converter('1/cm') 78 78 # Test it … … 82 82 83 83 # Information line 1 84 if is_info == True:84 if is_info: 85 85 is_info = False 86 86 line_toks = line.split() … … 89 89 try: 90 90 value = float(line_toks[1]) 91 if has_converter == Trueand \91 if has_converter and \ 92 92 output.source.wavelength_unit != 'A': 93 93 conv = Converter('A') … … 104 104 try: 105 105 value = float(line_toks[3]) 106 if has_converter == Trueand \106 if has_converter and \ 107 107 detector.distance_unit != 'm': 108 108 conv = Converter('m') … … 125 125 try: 126 126 value = float(line_toks[5]) 127 if has_converter == Trueand \127 if has_converter and \ 128 128 output.sample.thickness_unit != 'cm': 129 129 conv = Converter('cm') … … 142 142 143 143 # Find center info line 144 if is_center == True:144 if is_center: 145 145 is_center = False 146 146 line_toks = line.split() … … 150 150 151 151 # Bin size 152 if has_converter == Trueand \152 if has_converter and \ 153 153 detector.pixel_size_unit != 'mm': 154 154 conv = Converter('mm') … … 163 163 # Store beam center in distance units 164 164 # Det 640 x 640 mm 165 if has_converter == Trueand \165 if has_converter and \ 166 166 detector.beam_center_unit != 'mm': 167 167 conv = Converter('mm') … … 187 187 188 188 # Parse the data 189 if is_data_started == True:189 if is_data_started: 190 190 toks = line.split() 191 191
Note: See TracChangeset
for help on using the changeset viewer.