Changeset 8b633dd in sasview


Ignore:
Timestamp:
Jul 14, 2016 6:32:49 AM (7 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:
3331e11
Parents:
c9a519f
Message:

Complete detector metadata fields

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/sasgui/perspectives/file_converter/converter_panel.py

    rc9a519f r8b633dd  
    5454            'detector': [Detector()] 
    5555        } 
    56         self.vectors = ['offset', 'orientation', 'pixel_size'] 
     56        self.vectors = ['offset', 'orientation', 'pixel_size', 'beam_center'] 
    5757        for vector_name in self.vectors: 
    5858            setattr(self.metadata['detector'][0], vector_name, Vector()) 
     
    287287 
    288288        distance_label = wx.StaticText(metadata_pane, -1, 
    289             "Distance (mm):") 
     289            "Distance (mm): ") 
    290290        metadata_grid.Add(distance_label, (y, 1), (1,1)) 
    291291 
     
    319319        y += 1 
    320320 
    321         pixel_label = wx.StaticText(metadata_pane, -1, "Pixel Size (mm):") 
     321        pixel_label = wx.StaticText(metadata_pane, -1, "Pixel Size (mm): ") 
    322322        metadata_grid.Add(pixel_label, (y,1), (1,1)) 
    323323 
     
    326326        self.to_validate.append(pixel_input) 
    327327        metadata_grid.Add(pixel_input.GetSizer(), (y,2), (1,1), wx.BOTTOM, 5) 
     328        y += 1 
     329 
     330        beam_label = wx.StaticText(metadata_pane, -1, "Beam Center (mm): ") 
     331        metadata_grid.Add(beam_label, (y,1), (1,1)) 
     332        beam_input = VectorInput(metadata_pane, "detector_beam_center", 
     333            callback=self.metadata_changed) 
     334        self.to_validate.append(beam_input) 
     335        metadata_grid.Add(beam_input.GetSizer(), (y,2), (1,1), wx.BOTTOM, 5) 
     336        y += 1 
     337 
     338        slit_label = wx.StaticText(metadata_pane, -1, "Slit Length (mm): ") 
     339        metadata_grid.Add(slit_label, (y,1), (1,1)) 
     340        slit_input = wx.TextCtrl(metadata_pane, -1, size=(50,-1), 
     341            name="detector_slit_length") 
     342        self.to_validate.append(slit_input) 
     343        slit_input.Bind(wx.EVT_TEXT, self.metadata_changed) 
     344        metadata_grid.Add(slit_input, (y,2), (1,1), wx.BOTTOM, 5) 
    328345 
    329346        metadata_pane.SetSizer(metadata_grid) 
Note: See TracChangeset for help on using the changeset viewer.