Ignore:
Timestamp:
Apr 15, 2009 3:35:39 PM (15 years ago)
Author:
Gervaise Alina <gervyh@…>
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:
dcd330b
Parents:
6063b16
Message:

working on dispersity

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sansview/perspectives/fitting/basepage.py

    r998b6b8 r60132ef  
    11 
    2 import sys 
     2import sys, os 
    33import wx 
    44import numpy 
     
    5757        ## list of orientation parameters 
    5858        self.orientation_params=[] 
     59        self.orientation_params_disp=[] 
    5960        if self.model !=None: 
    6061            self.disp_list= self.model.getDispParamList() 
     
    7677        self.saved_states={} 
    7778        self.slicerpop = wx.Menu() 
    78          
     79        ## Default locations 
     80        self._default_save_location = os.getcwd()      
    7981        ## save initial state on context menu 
    8082        self.onSave(event=None) 
     
    263265                        self.disp_cb_dict[p].SetValue(False) 
    264266                        return 
    265                      
     267                    try: 
     268                        self._default_save_location = os.path.dirname(path) 
     269                    except: 
     270                        pass  
    266271                    try: 
    267272                        values,weights = self.read_file(path) 
     
    289294                    #TODO: refactor model to clean this up? 
    290295                    self._disp_obj_dict[p] = disp_model 
    291                      
     296                    print "dispersity------>",p 
    292297                    # Set the new model as the dispersion object for the selected parameter 
    293298                    self.model.set_dispersion(p, disp_model) 
     
    432437        if hasattr(self,"cb1"): 
    433438            self.state.cb1= self.cb1.GetValue() 
    434             print "save current state ",self.state.cb1 
     439            
    435440        if hasattr(self,"enable_disp"): 
    436441            self.state.enable_disp= self.enable_disp.GetValue() 
     
    447452        self.state.fittable_param=[] 
    448453        self.state.fixed_param=[] 
     454        
    449455        self._copy_parameters_state(self.parameters, self.state.parameters) 
    450456        self._copy_parameters_state(self.fittable_param, self.state.fittable_param) 
     
    501507        """ 
    502508        import os 
    503         dlg = wx.FileDialog(self, "Choose a weight file", os.getcwd(), "", "*.*", wx.OPEN) 
     509        dlg = wx.FileDialog(self, "Choose a weight file", 
     510                                self._default_save_location , "", "*.*", wx.OPEN) 
    504511        path = None 
    505512        if dlg.ShowModal() == wx.ID_OK: 
     
    11831190            draw sizer with array dispersity  parameters 
    11841191        """ 
     1192        self.orientation_params_disp=[] 
    11851193        self.sizer4_4.Clear(True)  
    11861194        ix=0 
Note: See TracChangeset for help on using the changeset viewer.