Skip to content
ttrainor edited this page Jan 8, 2012 · 4 revisions

Interface for processing CTR Data

`attachment:ctrgui.png`_

Creating a new ctr data instance

  • To get started you first need to create a ctr data object based on some scan data.

  • Here's a simple example of creating a new ctr object at the shell prompt from scan 's1':

    >>c = scandata.CtrData(scans=[s1],I='I',Inorm='io',Ierr='Ierr',
                           Ibgr='Ibgr',corr_params={},scan_type='image')
    
  • For more details see: `tdl/Modules/CtrData`_ and `tdl/Pds/SpecGui`_.

  • Note in particular see the notes regarding reading image scans and archiving the data in an hdf file. This is important for the image scans to keep memory limitations from being exceeded. Presently the best way to handle this is via the example scripts at `tdl/Modules/CtrData`_. This will be improved in the near future to simplify reading / writing scan data and ctr data objects...

  • Once you have created a ctr data object in the command shell you can now read it into the processing interface. Under the 'Ctr Data Name' pull down select the variable name that you just created. If you dont see it, click on the 'Update Shell Variables' button to update the list.

Adding more scan data

  • To add additional scans to the ctr data set select the scan variables in the pull down next to the 'Append Scan' button. Note that this variable can be a single scan data instance, or a list of scan data instances.
  • Once the scan variables are selected, click on the 'Append Scan' button to add them. See the options below for how to handle updating the 'appended scan data'

Saving data and rereading later

  • To save the ctr data set select 'File->SaveCtr'. You can select a file name and it will write the results as a python pickle. This is the same as doing >>save ctr ctr_file.sav as the command line.
  • To restore this data later chose 'File->ReadCtr'. After reading the data the variable should show up under the 'Ctr Data Name' list. (note this is the same as >>restore fname at the shell prompt.
  • You can also write an HKL file using 'File->WriteHKL'

Data Points

  • Each structure factor measurement is a unique data point.
  • You can move through the data points using the 'Point Index' selection.
  • A variety of possible actions occur when you select a point depending on the settings - described below.
  • A summary of the point information is given in the 'Info' box.

Data point selection options

  • If the 'Auto Integrate' option is selected, the data point will be (re) integrated when selected.
  • If the 'Plot Integration' option is selected, a detailed integration plot will be displayed.
  • Likewise other plots will automatically be displayed if their 'Auto Plot' fields are selected (see below).
  • If the 'Set integration params' and/or 'Set correction params' options are selected and an 'Anchor point' is selected, then the integration and correction parameters will be copied from the 'Anchor point' to the new selected point.
  • You can force an update / reintegration of the point using the 'Selected Point' button under 'Integrate/update' in the 'Data point' box
  • If the current selected data point is a zinger or otherwise bogus, you can select the 'Toggle bad point flag' button to flag it. This button also un-flags a flagged point (look in the 'Info' box).

Data point set

  • A set if a selection of data points. Whenever you 'Append Scan' the new data points are defined as a set. You can also select a set from a plot zoom as described below. The point numbers of the set are shown in the 'Info' box.
  • The 'Integrate/update Selected Set' button in the 'Data Point' box works the same as the 'Selected Point' button, except it works on the 'set'. Also it will not update plots until it is finished processing the set.

Parameters

  • If you select a 'Integration' or 'Correction' parameter some notes/details should show up in the 'Parameters' box describing it.
  • You can adjust the value and hit enter to update the parameter or the 'Set' button. Note if 'Auto Integrate' and other options are selected, these will be triggered by updating a parameter.
  • Note that the 'Set' button may also be used to select the parameter value from a plot. For example:
    • If you chose the 'image roi' integration parameter, you can 'Set' this value from the existing zoom level of the image plot. See 'Raw scan data plot'.
  • If you are particularly happy with the parameters that you have selected / edited you may copy the parameters to all the other data points with the 'Copy to all' button.

Plots

Ctr plot

  • Displays the raw ctr data. You can display as structure factors or raw intensities. The currently selected point should show up as a red point.
  • Columns controls the number of columns in the multi plot panel.
  • The 'Select Point' button will set the current 'Point' based on the last plot click. Therefore to select a particular point - click on the point on the 'Ctr Plot' then click the 'Select Point' button.
  • The 'Select Set' button allows you to chose the 'selected set' for the 'set operations' described above. This button choses the set based on the most recent 'zoom' on the Ctr Plot. Therefore to select a 'set', zoom in on the points of interest, then click the 'Select Set' button.

Raw scan plot

  • Plots the raw scan data (images or rocking scans) from which the Ctr data is derived. The plot parameters are controlled in the 'Image Plot Parameters' and 'Rocking Scan Plot Parameter' boxes.
  • The image plot parameters include chosing a given colormap and setting the max level for the plot. The "Image Max' value sticks with the data. Use -1 to default.
  • The rocking scan parameters control rocking scan plots (not finished yet).

Correction Plot

  • Show the geometry used for computing the correction factors (e.g. active area).
Clone this wiki locally