Changeset 7fce2bc in sasview for src/sas/sascalc
- Timestamp:
- Aug 23, 2016 8:16:36 AM (8 years ago)
- 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, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- be88076
- Parents:
- 0836f77
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sascalc/file_converter/nxcansas_writer.py
r0836f77 r7fce2bc 39 39 compatible with the Reader read() method. 40 40 """ 41 if not isinstance(string, str): 41 if isinstance(string, np.ndarray): 42 return string 43 elif not isinstance(string, str): 42 44 string = str(string) 43 45 … … 224 226 detector_entry.attrs['name'] = '' 225 227 226 # TODO: implement writing SASnote 227 i = 1 228 note_entry = sasentry.create_group('sasnote{0:0=2d}'.format(i)) 228 note_entry = sasentry.create_group('sasnote'.format(i)) 229 229 note_entry.attrs['canSAS_class'] = 'SASnote' 230 notes = None 231 if len(data_info.notes) > 1: 232 notes = [np.string_(n) for n in data_info.notes] 233 notes = np.array(notes) 234 elif data_info.notes != []: 235 notes = _h5_string(data_info.notes[0]) 236 if notes is not None: 237 note_entry.create_dataset('SASnote', data=notes) 230 238 231 239 f.close()
Note: See TracChangeset
for help on using the changeset viewer.