Changeset 3d950a9 in sasview for src/sas/sascalc/dataloader
- Timestamp:
- Oct 28, 2017 5:07:52 AM (7 years ago)
- Branches:
- master, magnetic_scatt, release-4.2.2, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- ab5ff35, 3ca67dcf
- Parents:
- 5582b078 (diff), 1576693 (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 Butler <butlerpd@…> (10/28/17 05:07:52)
- git-committer:
- GitHub <noreply@…> (10/28/17 05:07:52)
- Location:
- src/sas/sascalc/dataloader
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sascalc/dataloader/file_reader_base_class.py
r9e6aeaf r1576693 85 85 86 86 # Return a list of parsed entries that data_loader can manage 87 return self.output 87 final_data = self.output 88 self.reset_state() 89 return final_data 90 91 def reset_state(self): 92 """ 93 Resets the class state to a base case when loading a new data file so previous 94 data files do not appear a second time 95 """ 96 self.current_datainfo = None 97 self.current_dataset = None 98 self.output = [] 88 99 89 100 def nextline(self): -
src/sas/sascalc/dataloader/readers/cansas_reader.py
r2b538cd r61f329f0 68 68 data files do not appear a second time 69 69 """ 70 self.current_datainfo = None 71 self.current_dataset = None 72 self.current_data1d = None 70 super(Reader, self).reset_state() 73 71 self.data = [] 74 72 self.process = Process() … … 79 77 self.names = [] 80 78 self.cansas_defaults = {} 81 self.output = []82 79 self.ns_list = None 83 80 self.logging = [] -
src/sas/sascalc/dataloader/readers/cansas_reader_HDF5.py
r2b538cd r61f329f0 65 65 """ 66 66 # Reinitialize when loading a new data file to reset all class variables 67 self.reset_ class_variables()67 self.reset_state() 68 68 69 69 filename = self.f_open.name … … 101 101 raise FileContentsException("Fewer than 5 data points found.") 102 102 103 def reset_ class_variables(self):103 def reset_state(self): 104 104 """ 105 105 Create the reader object and define initial states for class variables 106 106 """ 107 self.current_datainfo = None 108 self.current_dataset = None 107 super(Reader, self).reset_state() 109 108 self.data1d = [] 110 109 self.data2d = [] … … 112 111 self.errors = set() 113 112 self.logging = [] 114 self.output = []115 113 self.parent_class = u'' 116 114 self.detector = Detector()
Note: See TracChangeset
for help on using the changeset viewer.