Changeset 0765c00 in sasview for src/sas/sascalc/dataloader
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sascalc/dataloader/readers/cansas_reader.py
r65e61c1 r0765c00 195 195 """ 196 196 197 self.reset_state()197 # self.reset_state() 198 198 self._check_for_empty_data() 199 199 self._initialize_new_data_set(dom) 200 self.add_data_set() 200 # self.current_dataset = plottable_1D(np.array(0), np.array(0)) 201 # self.add_data_set() 201 202 202 203 self.names.append("SASentry") … … 247 248 self.current_dataset.dy = setupArray 248 249 elif setupTagName == "Qdev": 249 self.current_dataset. err_data= setupArray250 self.current_dataset.dx = setupArray 250 251 251 252 elif setupTagName == "Qx": … … 293 294 self.current_dataset.dy[loopIter] = dataArray 294 295 elif dataTagName == "Qdev": 295 self.current_dataset. err_data[loopIter] = dataArray296 self.current_dataset.dx[loopIter] = dataArray 296 297 elif dataTagName == "Qx": 297 298 self.current_dataset.qx_data[loopIter] = dataArray … … 307 308 self.current_dataset.dxl[loopIter] = dataArray 308 309 309 if len(dataArray) == 1: 310 self.current_dataset.x = self.current_dataset.x.reshape(len(sasNode)) 311 self.current_dataset.y = self.current_dataset.y.reshape(len(sasNode)) 312 self.current_dataset.err_data = self.current_dataset.err_data.reshape(len(sasNode)) 313 self.current_dataset.dy = self.current_dataset.dy.reshape(len(sasNode)) 314 315 316 self.add_intermediate() 310 self._check_for_empty_resolution() 311 self.data.append(self.current_dataset) 317 312 318 313 # If it's not data, let's check for other tags starting with skippable ones... … … 488 483 self.collimation.size_unit = sizeUnits 489 484 485 self.current_datainfo.collimation.append(self.collimation) 486 self.collimation = Collimation() 487 490 488 # Extract the detector 491 489 elif instrumentTagName == "SASdetector": … … 569 567 self.detector.orientation.z = orientationData 570 568 self.detector.orientation_unit = orientationUnits 569 570 self.current_datainfo.detector.append(self.detector) 571 self.detector = Detector() 571 572 572 573 ## If we'e dealing with a process node … … 592 593 dic["unit"] = processNode.attrib.get("unit", "") 593 594 self.process.term.append(dic) 595 596 self.current_datainfo.process.append(self.process) 597 self.process = Process() 594 598 595 599 # If we're dealing with a process note node … … 601 605 elif currentTagName == "SASnote": 602 606 for noteNode in sasNode: 603 print '1'604 607 self.current_datainfo.notes.append(noteNode.text) 605 608 … … 655 658 self.transspectrum.wavelength[loopIter] = setupArray 656 659 660 self.current_datainfo.trans_spectrum.append(self.transspectrum) 661 self.transspectrum = TransmissionSpectrum() 662 663 657 664 ## Everything else goes in meta_data 658 665 else: … … 660 667 self.current_datainfo.meta_data[new_key] = sasNode.text 661 668 662 self._final_cleanup() 663 print self.current_dataset.y 664 print len(self.current_dataset.y) 669 # self._final_cleanup() 670 self.add_intermediate() 665 671 666 672 # As before in the code, I guess in case we have to return a tuple for some reason... 667 return self.output, None673 # return self.output, None 668 674 669 675
Note: See TracChangeset
for help on using the changeset viewer.