Changeset 3444492 in sasview for src/sas/sasgui/guiframe


Ignore:
Timestamp:
Apr 5, 2017 11:42:59 AM (8 years ago)
Author:
krzywon
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.2.2, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
54557b5
Parents:
0d8ee36 (diff), 98c44f3 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' into batch_slicer

Location:
src/sas/sasgui/guiframe
Files:
1 added
1 deleted
2 edited
1 moved

Legend:

Unmodified
Added
Removed
  • src/sas/sasgui/guiframe/media/data_formats_help.rst

    r48b8f6d r98c44f3  
    44.. by S King, ISIS, during SasView CodeCamp-III in Feb 2015. 
    55.. WG Bouwman, DUT, added during CodeCamp-V in Oct 2016 the SESANS data format 
     6.. WG Bouwman, DUT, updated during CodeCamp-VI in Apr 2017 the SESANS data format 
    67 
    78.. _Formats: 
     
    8283The file format has a list of name-value pairs at the top of the file which detail the general experimental parameters necessary for fitting and analyzing data. This list should contain all the information necessary for the file to be 'portable' between users. 
    8384 
    84 Following the header is a 6 column list of instrument experimental variables: 
     85Following the header is a 8 (only the first 4 are really needed) column list of instrument experimental variables: 
    8586 
    8687- Spin echo length (z, in Angstroms) 
     88- depolarization (:math:`log(P/P_0)/(lambda^2 * thickness)`, in Angstrom^-1 cm^-1) 
     89- depolarization error in the same unit) (measurement error) 
    8790- Spin echo length error (:math:`\Delta`\ z, in Angstroms) (experimental resolution) 
    88 - Neutron wavelength (:math:`\lambda`, in Angstroms) (essential for ToF instruments) 
     91- Neutron wavelength (:math:`\lambda`, in Angstroms) 
    8992- Neutron wavelength error (:math:`\Delta \lambda`, in Angstroms) 
    9093- Normalized polarization (:math:`P/P_0`, unitless) 
     
    9396.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 
    9497 
    95 .. note::  This help document was last changed by Steve King, 07Oct2016 
     98.. note::  This help document was last changed by Wim Bouwman, 05Apr2017 
  • src/sas/sasgui/guiframe/local_perspectives/plotting/Plotter2D.py

    r9a5097c r0d8ee36  
    359359                if self.slicer.__class__.__name__ != "BoxSum": 
    360360                    wx_id = ids.next() 
    361                     slicerpop.Append(wx_id, '&Edit Slicer Parameters') 
     361                    name = '&Edit Slicer Parameters and Batch Slicing' 
     362                    slicerpop.Append(wx_id, name) 
    362363                    wx.EVT_MENU(self, wx_id, self._onEditSlicer) 
    363364            slicerpop.AppendSeparator() 
     
    530531 
    531532        """ 
    532         ## Clear current slicer 
     533        # Clear current slicer 
    533534        if not self.slicer == None: 
    534535            self.slicer.clear() 
    535         ## Create a new slicer 
     536        # Create a new slicer 
    536537        self.slicer_z += 1 
    537538        self.slicer = slicer(self, self.subplot, zorder=self.slicer_z) 
    538539        self.subplot.set_ylim(self.data2D.ymin, self.data2D.ymax) 
    539540        self.subplot.set_xlim(self.data2D.xmin, self.data2D.xmax) 
    540         ## Draw slicer 
     541        # Draw slicer 
    541542        self.update() 
    542543        self.slicer.update() 
     
    570571        npt = math.floor(npt) 
    571572        from sas.sascalc.dataloader.manipulations import CircularAverage 
    572         ## compute the maximum radius of data2D 
     573        # compute the maximum radius of data2D 
    573574        self.qmax = max(math.fabs(self.data2D.xmax), 
    574575                        math.fabs(self.data2D.xmin)) 
     
    576577                        math.fabs(self.data2D.ymin)) 
    577578        self.radius = math.sqrt(math.pow(self.qmax, 2) + math.pow(self.ymax, 2)) 
    578         ##Compute beam width 
     579        # Compute beam width 
    579580        bin_width = (self.qmax + self.qmax) / npt 
    580         ## Create data1D circular average of data2D 
     581        # Create data1D circular average of data2D 
    581582        Circle = CircularAverage(r_min=0, r_max=self.radius, 
    582583                                 bin_width=bin_width) 
     
    597598        new_plot.name = "Circ avg " + self.data2D.name 
    598599        new_plot.source = self.data2D.source 
    599         #new_plot.info = self.data2D.info 
     600        # new_plot.info = self.data2D.info 
    600601        new_plot.interactive = True 
    601602        new_plot.detector = self.data2D.detector 
    602603 
    603         ## If the data file does not tell us what the axes are, just assume... 
     604        # If the data file does not tell us what the axes are, just assume... 
    604605        new_plot.xaxis("\\rm{Q}", "A^{-1}") 
    605606        if hasattr(self.data2D, "scale") and \ 
     
    613614        new_plot.id = "Circ avg " + self.data2D.name 
    614615        new_plot.is_data = True 
    615         self.parent.update_theory(data_id=self.data2D.id, \ 
    616                                        theory=new_plot) 
     616        self.parent.update_theory(data_id=self.data2D.id, theory=new_plot) 
    617617        wx.PostEvent(self.parent, 
    618618                     NewPlotEvent(plot=new_plot, title=new_plot.name)) 
     
    627627 
    628628        """ 
    629         if self.slicer != None: 
    630             from SlicerParameters import SlicerParameterPanel 
     629        if self.slicer is not None: 
     630            from parameters_panel_slicer import SlicerParameterPanel 
    631631            dialog = SlicerParameterPanel(self, -1, "Slicer Parameters") 
    632632            dialog.set_slicer(self.slicer.__class__.__name__, 
     
    666666        params = self.slicer.get_params() 
    667667        ## Create a new panel to display results of summation of Data2D 
    668         from slicerpanel import SlicerPanel 
     668        from parameters_panel_boxsum import SlicerPanel 
    669669        win = MDIFrame(self.parent, None, 'None', (100, 200)) 
    670670        new_panel = SlicerPanel(parent=win, id=-1, 
     
    717717        Clear the slicer on the plot 
    718718        """ 
    719         if not self.slicer == None: 
     719        if self.slicer is not None: 
    720720            self.slicer.clear() 
    721721            self.subplot.figure.canvas.draw() 
     
    733733        """ 
    734734        event_id = str(evt.GetId()) 
    735         if self.parent != None: 
     735        if self.parent is not None: 
    736736            self._default_save_location = self.parent._default_save_location 
    737737        default_name = self.plots[self.graph.selected_plottable].label 
     
    756756        if default_name.count('.') > 0: 
    757757            default_name = default_name.split('.')[0] 
    758         #default_name += "_out" 
    759         if self.parent != None: 
     758        if self.parent is not None: 
    760759            self.parent.show_data2d(data, default_name) 
    761760 
    762761    def modifyGraphAppearance(self, e): 
    763         self.graphApp = graphAppearance(self, 'Modify graph appearance', legend=False) 
     762        self.graphApp = graphAppearance(self, 'Modify graph appearance', 
     763                                        legend=False) 
    764764        self.graphApp.setDefaults(self.grid_on, self.legend_on, 
    765765                                  self.xaxis_label, self.yaxis_label, 
Note: See TracChangeset for help on using the changeset viewer.