Changeset 8c9e65c in sasview for src/sas/sascalc/dataloader/readers
- Timestamp:
- Mar 5, 2019 1:52:24 PM (6 years ago)
- Branches:
- master, magnetic_scatt, release-4.2.2, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1249
- Children:
- f205d3a, 1342f6a
- Parents:
- 0a924c6 (diff), 4cbb2f5 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent. - git-author:
- Paul Kienzle <pkienzle@…> (03/05/19 13:52:24)
- git-committer:
- GitHub <noreply@…> (03/05/19 13:52:24)
- Location:
- src/sas/sascalc/dataloader/readers
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sascalc/dataloader/readers/associations.py
rc7c8143 r8c9e65c 54 54 exec("loader.associate_file_type('%s', %s)" 55 55 % (ext.upper(), reader)) 56 except :56 except Exception as exc: 57 57 msg = "read_associations: skipping association" 58 msg += " for %s\n %s" % (ext.lower(), sys.exc_value)58 msg += " for %s\n %s" % (ext.lower(), exc) 59 59 logger.error(msg) -
src/sas/sascalc/dataloader/readers/cansas_reader.py
r058f6c3 r8c9e65c 1239 1239 conv = Converter(units) 1240 1240 setattrchain(storage, variable, conv(value, units=local_unit)) 1241 except Exception: 1242 _, exc_value, _ = sys.exc_info() 1241 except Exception as exc: 1243 1242 err_mess = "CanSAS reader: could not convert" 1244 1243 err_mess += " %s unit [%s]; expecting [%s]\n %s" \ 1245 % (variable, units, local_unit, exc _value)1244 % (variable, units, local_unit, exc) 1246 1245 self.errors.add(err_mess) 1247 1246 if optional: -
src/sas/sascalc/dataloader/readers/abs_reader.py
rbd5c3b1 rd96744de 48 48 detector = Detector() 49 49 data_line = 0 50 x_index = 4 50 51 self.reset_data_list(len(lines)) 51 52 self.current_datainfo.detector.append(detector) … … 63 64 for line in lines: 64 65 # Information line 1 66 if line.find(".bt5") > 0: 67 x_index = 0 65 68 if is_info: 66 69 is_info = False … … 171 174 172 175 try: 173 _x = float(toks[ 4])176 _x = float(toks[x_index]) 174 177 _y = float(toks[1]) 175 178 _dy = float(toks[2]) … … 225 228 raise ValueError("ascii_reader: could not load file") 226 229 230 self.current_dataset = self.set_default_1d_units(self.current_dataset) 227 231 if data_conv_q is not None: 228 232 self.current_dataset.xaxis("\\rm{Q}", base_q_unit) 229 else:230 self.current_dataset.xaxis("\\rm{Q}", 'A^{-1}')231 233 if data_conv_i is not None: 232 234 self.current_dataset.yaxis("\\rm{Intensity}", base_i_unit) 233 else:234 self.current_dataset.yaxis("\\rm{Intensity}", "cm^{-1}")235 235 236 236 # Store loading process information -
src/sas/sascalc/dataloader/readers/ascii_reader.py
r9e6aeaf r3bab401 157 157 158 158 self.remove_empty_q_values() 159 self.current_dataset.xaxis("\\rm{Q}", 'A^{-1}') 160 self.current_dataset.yaxis("\\rm{Intensity}", "cm^{-1}") 159 self.current_dataset = self.set_default_1d_units(self.current_dataset) 161 160 162 161 # Store loading process information -
src/sas/sascalc/dataloader/readers/danse_reader.py
r2469df7 rfc51d06 180 180 detector.beam_center.y = center_y * pixel 181 181 182 183 self.current_dataset.xaxis("\\rm{Q_{x}}", 'A^{-1}') 184 self.current_dataset.yaxis("\\rm{Q_{y}}", 'A^{-1}') 185 self.current_dataset.zaxis("\\rm{Intensity}", "cm^{-1}") 186 182 self.current_dataset = self.set_default_2d_units(self.current_dataset) 187 183 self.current_dataset.x_bins = x_vals 188 184 self.current_dataset.y_bins = y_vals -
src/sas/sascalc/dataloader/readers/red2d_reader.py
rc8321cfc r058f6c3 317 317 318 318 # Units of axes 319 self.current_dataset.xaxis(r"\rm{Q_{x}}", 'A^{-1}') 320 self.current_dataset.yaxis(r"\rm{Q_{y}}", 'A^{-1}') 321 self.current_dataset.zaxis(r"\rm{Intensity}", "cm^{-1}") 319 self.current_dataset = self.set_default_2d_units(self.current_dataset) 322 320 323 321 # Store loading process information
Note: See TracChangeset
for help on using the changeset viewer.