Changeset 92a2ecd in sasview
- Timestamp:
- May 8, 2014 12:55:23 PM (11 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, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- 6b20c4e
- Parents:
- 17c62b6
- Location:
- src/sans
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sans/dataloader/readers/cansas_reader.py
rac5b69d r92a2ecd 372 372 tagname = node.tag.replace(base_ns, "") 373 373 tagname_original = tagname 374 if tagname == "fitting_plug_in": 374 if tagname == "fitting_plug_in" or tagname == "pr_inversion" or\ 375 tagname == "invariant": 375 376 continue 376 377 names.append(tagname) … … 517 518 else: 518 519 save_data1d = data1d 519 if tagname_original != "fitting_plug_in": 520 if tagname_original == "fitting_plug_in" or \ 521 tagname_original == "invariant" or \ 522 tagname_original == "pr_inversion": 523 pass 524 else: 520 525 data1d = save_data1d 521 526 # Remove tagname from names to restore original base -
src/sans/perspectives/invariant/invariant_panel.py
r5777106 r92a2ecd 218 218 if new_doc is not None: 219 219 if doc is not None and hasattr(doc, "firstChild"): 220 child = new_doc.firstChild.firstChild 221 doc.firstChild.appendChild(child) 220 child = new_doc.getElementsByTagName("SASentry") 221 for item in child: 222 doc.firstChild.appendChild(item) 222 223 else: 223 224 doc = new_doc -
src/sans/perspectives/invariant/invariant_state.py
r51f14603 r92a2ecd 254 254 : param entry_node: XML node within the XML document at which we will append the data [optional] 255 255 """ 256 # TODO: Get this to work 256 257 from xml.dom.minidom import getDOMImplementation 257 258 import time … … 273 274 else: 274 275 entry_node.appendChild(top_element) 275 276 276 277 attr = newdoc.createAttribute("version") 277 278 attr.nodeValue = '1.0' … … 352 353 return None 353 354 else: 354 return newdoc .toprettyxml()355 return newdoc 355 356 356 357 def fromXML(self, file=None, node=None): … … 742 743 for entry in entry_list: 743 744 744 sas_entry = self._parse_entry(entry)745 sas_entry, _ = self._parse_entry(entry) 745 746 invstate = self._parse_state(entry) 746 747 … … 809 810 # Add the invariant information to the XML document 810 811 if state is not None: 811 state.toXML(datainfo.name,doc=doc, entry_node=sasentry)812 doc = state.toXML(datainfo.name,doc=doc, entry_node=sasentry) 812 813 return doc 813 814 -
src/sans/perspectives/pr/inversion_panel.py
r5777106 r92a2ecd 255 255 if new_doc is not None: 256 256 if doc is not None and hasattr(doc, "firstChild"): 257 child = new_doc.firstChild.firstChild 258 doc.firstChild.appendChild(child) 257 child = new_doc.getElementsByTagName("SASentry") 258 for item in child: 259 doc.firstChild.appendChild(item) 259 260 else: 260 261 doc = new_doc -
src/sans/perspectives/pr/inversion_state.py
r5777106 r92a2ecd 148 148 149 149 """ 150 #TODO: Get this to work 150 151 from xml.dom.minidom import getDOMImplementation 151 152 … … 221 222 return None 222 223 else: 223 return newdoc .toprettyxml()224 return newdoc 224 225 225 226 def fromXML(self, file=None, node=None): … … 470 471 471 472 for entry in entry_list: 472 sas_entry = self._parse_entry(entry)473 sas_entry, _ = self._parse_entry(entry) 473 474 prstate = self._parse_prstate(entry) 474 475 #prstate could be None when .svs file is loaded … … 504 505 # Sanity check 505 506 if self.cansas == True: 506 doc = self.write_toXML(datainfo, prstate)507 doc = self.write_toXML(datainfo, prstate) 507 508 # Write the XML document 508 509 fd = open(filename, 'w') … … 527 528 # Create basic XML document 528 529 doc, sasentry = self._to_xml_doc(datainfo) 529 530 530 531 # Add the invariant information to the XML document 531 532 if state is not None: 532 state.toXML(doc=doc, entry_node=sasentry)533 doc = state.toXML(doc=doc, entry_node=sasentry) 533 534 534 535 return doc
Note: See TracChangeset
for help on using the changeset viewer.