Changeset d45d590 in sasview for src


Ignore:
Timestamp:
Aug 24, 2016 11:27:54 AM (8 years ago)
Author:
lewis
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:
e32e35a
Parents:
96d293da
Message:

Save transform type in corfunc state

Location:
src/sas/sasgui/perspectives/corfunc
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/sas/sasgui/perspectives/corfunc/corfunc_panel.py

    r96d293da rd45d590  
    111111            return 
    112112        if self.state.is_transformed: 
     113            self.transform_type = self.state.transform_type 
    113114            self.compute_transform() 
    114115        else: 
     
    134135        if self._transformed_data is not None: 
    135136            state.is_transformed = True 
     137            state.transform_type = self.transform_type 
    136138        self.state = state 
    137139 
  • src/sas/sasgui/perspectives/corfunc/corfunc_state.py

    r96d293da rd45d590  
    4848        self.outputs = {} 
    4949        self.is_extrapolated = False 
     50        self.transform_type = 'fourier' 
    5051        self.is_transformed = False 
    5152 
    5253        self.saved_state = DEFAULT_STATE 
    53         # Will be filled on panel init as number of states increases 
    54         self.state_list = {} 
    5554        self.timestamp = time.time() 
    5655 
     
    172171        element.appendChild(new_doc.createTextNode(str(int(self.is_transformed)))) 
    173172 
     173        if self.is_transformed: 
     174            element = new_doc.createElement("transform_type") 
     175            top_element.appendChild(element) 
     176            element.appendChild(new_doc.createTextNode(self.transform_type)) 
     177 
    174178        # Output parameters 
    175179        if self.outputs != {} and self.outputs is not None: 
     
    233237            if entry is not None: 
    234238                self.is_transformed = bool(int(entry.text.strip())) 
     239                entry = get_content('ns:transform_type', node) 
     240                self.transform_type = entry.text.strip() 
    235241 
    236242            # Parse outputs 
Note: See TracChangeset for help on using the changeset viewer.