Changeset 9520702 in sasview for calculatorview/src/sans


Ignore:
Timestamp:
Jan 11, 2012 12:19:54 PM (13 years ago)
Author:
Jae Cho <jhjcho@…>
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:
cda697a
Parents:
5c3aafa
Message:

molar mass/ mass density calculator added

Location:
calculatorview/src/sans/perspectives/calculator
Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • calculatorview/src/sans/perspectives/calculator/calculator.py

    rfb58234 r9520702  
    5757        resolution_help += "resolution of Q in 2D based on the SANS " 
    5858        resolution_help += "instrumental parameter values." 
     59        mass_volume_help = "Based on the chemical formular, " 
     60        mass_volume_help += "compute the mass density or the molar volume." 
    5961        pyconsole_help = "Python Console." 
    6062        #data_editor_help = "Meta Data Editor" 
    6163        return [("SLD Calculator", sld_help, self.on_calculate_sld), 
     64                ("Density/Volume Calculator", mass_volume_help,  
     65                                            self.on_calculate_dv), 
    6266                ("Slit Size Calculator", slit_length_help, 
    6367                        self.on_calculate_slit_size), 
     
    7781        self.put_icon(frame) 
    7882        frame.Show(True) 
    79         event.Skip() 
    8083 
    8184    def on_calculate_kiessig(self, event): 
     
    9699        self.put_icon(frame) 
    97100        frame.Show(True)  
    98         
     101     
     102    def on_calculate_dv(self, event): 
     103        """ 
     104        Compute the mass density or molar voulme 
     105        """ 
     106        from density_panel import DensityWindow 
     107        frame = DensityWindow(base=self.parent) 
     108        self.put_icon(frame) 
     109        frame.Show(True)  
     110               
    99111    def on_calculate_slit_size(self, event): 
    100112        """ 
Note: See TracChangeset for help on using the changeset viewer.