2,684
edits
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 | # revision 0.04 . Kay Diederichs 4/2010 - include alternative ORGX, ORGY calculations for ADSC | ||
# tested with | # 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, | # - 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. | 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=//` | ||
BEAM_CENTER_X=`grep BEAM_CENTER_X tmp2 | sed s/BEAM_CENTER_X=//` | |||
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 - | ||
# | # at ESRF and ... (pls fill in!) the following should be used: | ||
ORGX=`echo "scale=1; $ | ORGX=`echo "scale=1; $BEAM_CENTER_Y/$QX" | bc -l ` | ||
ORGY=`echo "scale=1; $ | ORGY=`echo "scale=1; $BEAM_CENTER_X/$QX" | bc -l ` | ||
echo ATTENTION: at ESRF BLs use: ORGX=$ORGX ORGY=$ORGY ( | echo ATTENTION: at ESRF BLs use: ORGX=$ORGX ORGY=$ORGY | ||
# | # this 2nd alternative convention should be used at the following beamlines (pls complete the list): ALS 5.0.3, ... | ||
ORGX=`echo "scale=1; $ | ORGX=`echo "scale=1; $NX-$BEAM_CENTER_X/$QX" | bc -l ` | ||
ORGY=`echo "scale=1; $NX-$ | 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=//` |