Changeset 235f514 in sasview for src/sas/sascalc/dataloader/readers/cansas_reader.py
- Timestamp:
- Apr 9, 2017 5:46:10 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.2.2, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- ac07a3a
- Parents:
- 5b2b04d
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sascalc/dataloader/readers/cansas_reader.py
r63d773c r235f514 807 807 :param data1d: presumably a Data1D object 808 808 """ 809 if self.current_dataset ==None:809 if self.current_dataset is None: 810 810 x_vals = np.empty(0) 811 811 y_vals = np.empty(0) … … 895 895 # Write the file 896 896 file_ref = open(filename, 'w') 897 if self.encoding ==None:897 if self.encoding is None: 898 898 self.encoding = "UTF-8" 899 899 doc.write(file_ref, encoding=self.encoding, … … 1015 1015 :param entry_node: lxml node ElementTree object to be appended to 1016 1016 """ 1017 if datainfo.run ==None or datainfo.run == []:1017 if datainfo.run is None or datainfo.run == []: 1018 1018 datainfo.run.append(RUN_NAME_DEFAULT) 1019 1019 datainfo.run_name[RUN_NAME_DEFAULT] = RUN_NAME_DEFAULT … … 1213 1213 str(datainfo.source.name)) 1214 1214 self.append(source, instr) 1215 if datainfo.source.radiation ==None or datainfo.source.radiation == '':1215 if datainfo.source.radiation is None or datainfo.source.radiation == '': 1216 1216 datainfo.source.radiation = "neutron" 1217 1217 self.write_node(source, "radiation", datainfo.source.radiation) … … 1254 1254 :param instr: lxml node ElementTree object to be appended to 1255 1255 """ 1256 if datainfo.collimation == [] or datainfo.collimation ==None:1256 if datainfo.collimation == [] or datainfo.collimation is None: 1257 1257 coll = Collimation() 1258 1258 datainfo.collimation.append(coll) … … 1299 1299 :param inst: lxml instrument node to be appended to 1300 1300 """ 1301 if datainfo.detector ==None or datainfo.detector == []:1301 if datainfo.detector is None or datainfo.detector == []: 1302 1302 det = Detector() 1303 1303 det.name = ""
Note: See TracChangeset
for help on using the changeset viewer.