Generate XDS.INP: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
No edit summary
Line 5: Line 5:
  # purpose: generate XDS.INP
  # purpose: generate XDS.INP
  # revision 0.03 . Kay Diederichs 2/2010  
  # revision 0.03 . Kay Diederichs 2/2010  
  # revision 0.04 . Kay Diederichs 4/2010 - include alternative ORGX, ORGY calc for ADSC
  # revision 0.04 . Kay Diederichs 4/2010 - include alternative ORGX, ORGY calculations for ADSC
  # tested with own and some JCSG datasets; only MARCCD, ADSC/SMV, PILATUS detectors; for other detectors, values must be manually filled in.
  # tested with some datasets from ALS, SSRL, SLS and ESRF; only MARCCD, ADSC/SMV, PILATUS detectors; for other detectors, values must be manually filled in.
  #
  #
  # usage: e.g. generate_XDS.INP.rc "frms/mydata_1_???.img"
  # usage: e.g. generate_XDS.INP.rc "frms/mydata_1_???.img"
Line 20: Line 20:
  #  
  #  
  # known problems:
  # known problems:
  # - for ADSC detectors, the ORGX and ORGY values are inaccurate; the "imgheader" program that I have delivers better values, but I don't know how and why.
  # - for ADSC detectors, there are at least three ways to obtain ORGX and ORGY values from the header (see below);
the "imgheader" program that I have delivers better values, but I don't know how and why.
  #
  #
  # notes for debugging of the script:
  # notes for debugging of the script:
Line 111: Line 112:
   
   
   DETECTOR="ADSC MINIMUM_VALID_PIXEL_VALUE= 1 OVERLOAD= 65000"
   DETECTOR="ADSC MINIMUM_VALID_PIXEL_VALUE= 1 OVERLOAD= 65000"
   echo this is an ADSC detector. there are at least two possibilites for obtaining ORGX, ORGY from the header ...
   echo this is an ADSC detector. Obtaining ORGX, ORGY from the header depends on beamline setup.
   strings `head -1 tmp1` | sed s/\;// > tmp2
   strings `head -1 tmp1` | sed s/\;// > tmp2
   
   
Line 120: Line 121:
       NX=`grep SIZE1 tmp2 | tail -1 | sed s/SIZE1=//`
       NX=`grep SIZE1 tmp2 | tail -1 | sed s/SIZE1=//`
       QX=`grep PIXEL_SIZE tmp2 | sed s/PIXEL_SIZE=//`
       QX=`grep PIXEL_SIZE tmp2 | sed s/PIXEL_SIZE=//`
       ORGX=`grep BEAM_CENTER_X tmp2 | sed s/BEAM_CENTER_X=//`
       BEAM_CENTER_X=`grep BEAM_CENTER_X tmp2 | sed s/BEAM_CENTER_X=//`
       ORGY=`grep BEAM_CENTER_Y tmp2 | sed s/BEAM_CENTER_Y=//`
       BEAM_CENTER_Y=`grep BEAM_CENTER_Y tmp2 | sed s/BEAM_CENTER_Y=//`
  # fix 2010-04-26 - tell user about possible ORGX, ORGY alternatives -   
  # fix 2010-04-26 - tell user about possible ORGX, ORGY alternatives -   
  # according to Ingo Korndörfer, at ESRF and ... (pls fill in!) the following should be used:
  # at ESRF and ... (pls fill in!) the following should be used:
       ORGX=`echo "scale=1; $ORGY/$QX" | bc -l `
       ORGX=`echo "scale=1; $BEAM_CENTER_Y/$QX" | bc -l `
       ORGY=`echo "scale=1; $ORGX/$QX" | bc -l `
       ORGY=`echo "scale=1; $BEAM_CENTER_X/$QX" | bc -l `
       echo ATTENTION: at ESRF BLs use: ORGX=$ORGX ORGY=$ORGY (try these in XDS.INP !)
       echo ATTENTION: at ESRF BLs use: ORGX=$ORGX ORGY=$ORGY  
  # whereas this alternative convention should be used at the following beamlines (pls complete the list): ALS 8.2.2 and 5.0.3
# this 2nd alternative convention should be used at the following beamlines (pls complete the list): ALS 5.0.3, ...
       ORGX=`echo "scale=1; $ORGX/$QX" | bc -l `
      ORGX=`echo "scale=1; $NX-$BEAM_CENTER_X/$QX" | bc -l `
       ORGY=`echo "scale=1; $NX-$ORGY/$QX" | bc -l `
      ORGY=`echo "scale=1; $BEAM_CENTER_Y/$QX" | bc -l `
  # the latter alternative is written into the generated XDS.INP
      echo ATTENTION: at e.g. ALS 5.0.3 use: ORGX=$ORGX ORGY=$ORGY
  # this 3rd alternative convention should be used at the following beamlines (pls complete the list): ALS 8.2.2, ...  
       ORGX=`echo "scale=1; $BEAM_CENTER_X/$QX" | bc -l `
       ORGY=`echo "scale=1; $NX-$BEAM_CENTER_Y/$QX" | bc -l `
      echo ATTENTION: at e.g. ALS 8.2.2 use: ORGX=$ORGX ORGY=$ORGY - this is now written to XDS.INP
  # the latter alternative is written into the generated XDS.INP ! You have to correct this manually in XDS.INP, or adjust this script.
       # find DETECTOR_DISTANCE and OSCILLATION_RANGE:
       # find DETECTOR_DISTANCE and OSCILLATION_RANGE:
       DETECTOR_DISTANCE=`grep DISTANCE tmp2 | sed s/DISTANCE=//`
       DETECTOR_DISTANCE=`grep DISTANCE tmp2 | sed s/DISTANCE=//`
2,684

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.

Navigation menu