Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Another option is to reduce the data by azimuthally averaging the signal. Here, we need to know the center for the integration as well as the detector distance and beam energy. The latter two are mostly important for the q-values of the bins that will also be stored in the smallData. As conditions will change during an experiment, it is convenient to have a function that return the correct integration setup for each (range of) run(s). In addition to a 1-d result as a q-vector, you can also define a number of phi-slices that should be used for integration, resulting in a 2-d average in q-phi space. 
The averaging will automatically apply a corrections for the x-ray polarization and  geometric acceptance. What is currently not corrected for are signal differences due to different path length of the photons when crossing the detector . Also, the calculations assume that the detector is mounted perpendicular to the beam direction.

Run dependent parameters: 

First up are functions that will return e.g. the region-of-interest boundaries for each run. During the experiment, this should be kept up-to-date so if the setup changes, the smallData file will get an entry with new boundaries for a just finished range of runs. This way, the smallDataRun script will always use the correct region of interest for each run.

Run dependent integration parameters


Code Block
languagepy
def getAzIntParams(run):
    ret_dict = {'eBeam': 8.015}
    ret_dict['cspad_center'] = [87697.946016760892, 94865.383526655729]
    ret_dict['cspad_dis_to_sam'] = 110.
    return ret_dict


UserData: azimuthal integration

- this now comes 'for free' in the new style producer file


Code Block
languagepy
haveCspad = checkDet(ds.env(), 'cspad')
if haveCspad:
    cspad = DetObject('cspad' ,ds.env(), int(run), name='cspad')
    for iROI,ROI in enumerate(ROIs):
        cspad.addROI('ROI_%d'%iROI, ROI)
 
    cspad.azav_eBeam=azIntParams['eBeam']
    if azIntParams.has_key('cspad_center'):
        cspad.azav_center=azIntParams['cspad_center']
        cspad.azav_dis_to_sam=azIntParams['cspad_dis_to_sam']
        try:
            cspad.addAzAv(phiBins=7)
        except:
            pass
    dets.append(cspad)


...