Changeset fc51d06 in sasview
- Timestamp:
- Jul 9, 2018 4:51:03 PM (6 years ago)
- Branches:
- master, magnetic_scatt, release-4.2.2, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, unittest-saveload
- Children:
- b799f09
- Parents:
- b011ecb
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sascalc/dataloader/readers/danse_reader.py
r3bab401 rfc51d06 180 180 detector.beam_center.y = center_y * pixel 181 181 182 183 self.current_dataset.xaxis("\\rm{Q_{x}}", '1/A') 184 self.current_dataset.yaxis("\\rm{Q_{y}}", '1/A') 185 self.current_dataset.zaxis("\\rm{Intensity}", "1/cm") 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/file_converter/nxcansas_writer.py
r369ed11d rfc51d06 297 297 298 298 intensity = np.reshape(data.data, (n_rows, n_cols)) 299 d_i = None300 if not all(data.err_data == [None]):301 d_i = np.reshape(data.err_data, (n_rows, n_cols))302 299 qx = np.reshape(data.qx_data, (n_rows, n_cols)) 303 300 qy = np.reshape(data.qy_data, (n_rows, n_cols)) … … 309 306 qy_entry = data_entry.create_dataset('Qy', data=qy) 310 307 qy_entry.attrs['units'] = data.Q_unit 311 if d_i: 308 if data.err_data is not None and not all(data.err_data == [None]): 309 d_i = np.reshape(data.err_data, (n_rows, n_cols)) 312 310 i_entry.attrs['uncertainties'] = 'Idev' 313 311 i_dev_entry = data_entry.create_dataset('Idev', data=d_i) 314 312 i_dev_entry.attrs['units'] = data.I_unit 315 if not all(data.dqx_data == [None]):313 if data.dqx_data is not None and not all(data.dqx_data == [None]): 316 314 qx_entry.attrs['resolutions'] = 'dQx' 317 315 dqx_entry = data_entry.create_dataset('dQx', data=data.dqx_data) 318 316 dqx_entry.attrs['units'] = data.Q_unit 319 if not all(data.dqy_data == [None]):317 if data.dqy_data is not None and not all(data.dqy_data == [None]): 320 318 qy_entry.attrs['resolutions'] = 'dQy' 321 319 dqy_entry = data_entry.create_dataset('dQy', data=data.dqy_data) -
test/sasdataloader/test/utest_abs_reader.py
rfa749b7 rfc51d06 118 118 self.assertEqual(self.data.detector[0].beam_center.y, center_y) 119 119 120 self.assertEqual(self.data.I_unit, ' 1/cm')120 self.assertEqual(self.data.I_unit, 'cm^{-1}') 121 121 self.assertEqual(self.data.data[0], 1.57831) 122 122 self.assertEqual(self.data.data[1], 2.70983) -
test/sasdataloader/test/utest_red2d_reader.py
rf53d684 rfc51d06 31 31 self.assertEqual(f.qx_data[0],-0.03573497) 32 32 self.assertEqual(f.qx_data[36863],0.2908819) 33 self.assertEqual(f.Q_unit, ' 1/A')34 self.assertEqual(f.I_unit, ' 1/cm')33 self.assertEqual(f.Q_unit, 'A^{-1}') 34 self.assertEqual(f.I_unit, 'cm^{-1}') 35 35 36 36 self.assertEqual(f.meta_data['loader'],"IGOR/DAT 2D Q_map")
Note: See TracChangeset
for help on using the changeset viewer.