Generate XDS.INP: Difference between revisions

Jump to navigation Jump to search
(→‎The script: v0.83 remove ADSC detector # 458 from the list of detectors with reversed-phi)
Line 100: Line 100:
# revision 0.82 . KD 01/03/2018 STARTING_ANGLE for MarCCD/Pilatus/PHOTON, enabling to use dials.rs_mapper with spot2pdb.
# revision 0.82 . KD 01/03/2018 STARTING_ANGLE for MarCCD/Pilatus/PHOTON, enabling to use dials.rs_mapper with spot2pdb.
# revision 0.83 . KD 25/06/2018 for ADSC detector #458 at APS BM19, revert the definition of ROTATION_AXIS=-1 0 0. See "Beamline notes" in this wiki.
# revision 0.83 . KD 25/06/2018 for ADSC detector #458 at APS BM19, revert the definition of ROTATION_AXIS=-1 0 0. See "Beamline notes" in this wiki.
REVISION="0.83 (25-Jun-2018)"
# revision 0.84 . KD 10/10/2018 implement Pilatus detector with d*TREK header -
REVISION="0.84 (10-Oct-2018)"


#                                                                                                             
#                                                                                                             
Line 126: Line 127:
#                                                                                                                 
#                                                                                                                 
# defaults:                                                                                                       
# defaults:                                                                                                       
#                                                                                                              
#      
# conversion radian / degrees:
DEGTOR=57.2957795
                                                                                                       
DETECTOR="XXX MINIMUM_VALID_PIXEL_VALUE=XXX OVERLOAD=XXX"                                                         
DETECTOR="XXX MINIMUM_VALID_PIXEL_VALUE=XXX OVERLOAD=XXX"                                                         
REVERSE_PHI="no"
REVERSE_PHI="no"
Line 147: Line 151:
pol_frac=0.98
pol_frac=0.98
STARTING_ANGLE=0
STARTING_ANGLE=0
dtrek_det=""
SEPMIN=7.0
CLUSTER_RADIUS=3.5


dname=`echo "$1" | xargs dirname`
dname=`echo "$1" | xargs dirname`
Line 428: Line 435:
   mv tmp1 tmp2                                                               
   mv tmp1 tmp2                                                               
   OVERLOAD=1048574
   OVERLOAD=1048574
  SEPMIN=4
  CLUSTER_RADIUS=2
   grep -q Count_cutoff tmp2 && OVERLOAD=`awk '/Count_cutoff/{print $2}' tmp2`
   grep -q Count_cutoff tmp2 && OVERLOAD=`awk '/Count_cutoff/{print $2}' tmp2`
   DETECTOR="PILATUS MINIMUM_VALID_PIXEL_VALUE=0 OVERLOAD= $OVERLOAD  !PILATUS"
   DETECTOR="PILATUS MINIMUM_VALID_PIXEL_VALUE=0 OVERLOAD= $OVERLOAD  !PILATUS"
Line 503: Line 512:
   # If rotation vector set (NeXus)
   # If rotation vector set (NeXus)
   rotation_axis=`h5dump -a "/entry/sample/transformations/omega/vector" $FIRSTFRAME 2>/dev/null | grep "(0):" | sed -e "s/^.*://; s/,//g"`
   rotation_axis=`h5dump -a "/entry/sample/transformations/omega/vector" $FIRSTFRAME 2>/dev/null | grep "(0):" | sed -e "s/^.*://; s/,//g"`
  SEPMIN=4
  CLUSTER_RADIUS=2
    
    
elif [ "$DET" == "raxis" ]; then
elif [ "$DET" == "raxis" ]; then
Line 526: Line 537:


elif [ "$DET" == "dtrek" ]; then
elif [ "$DET" == "dtrek" ]; then
   echo "Data from a RAXIS or Saturn detector with dTREK format"
   echo "Data from a RAXIS or Saturn or Pilatus detector with dTREK format"


   sed s/\;// tmp2 > tmp1
   sed s/\;// tmp2 > tmp1
Line 532: Line 543:


   dname=`grep "DETECTOR_NAMES=" tmp2 | sed -e "s/.*=//"`
   dname=`grep "DETECTOR_NAMES=" tmp2 | sed -e "s/.*=//"`
 
  flip=1
   if [ "$dname" == "CCD_" ]; then
   if [ "$dname" == "CCD_" ]; then
     DETECTOR="SATURN MINIMUM_VALID_PIXEL_VALUE=1"
     DETECTOR="SATURN MINIMUM_VALID_PIXEL_VALUE=1"
Line 549: Line 560:
     echo ""
     echo ""
   fi
   fi
   else # should be RX_
   elif [ "$dname" == "PILT_" ]; then
    DETECTOR="PILATUS MINIMUM_VALID_PIXEL_VALUE=0"
    dtrek_det="pilatus"
    SEPMIN=4
    CLUSTER_RADIUS=2
    rotation_axis="0 1 0"  # TODO: read from header
    flip=-1
    SENSOR_THICKNESS=0.45  # TODO: read from header
# 2theta
    TWOTHETA=`awk '/PILT_GONIO_VALUES=/{print $2}' tmp2`
    echo TWOTHETA=$TWOTHETA
    R1=`echo "scale=7;  c($TWOTHETA/$DEGTOR)" | bc -l`
    R3=`echo "scale=7; -s($TWOTHETA/$DEGTOR)" | bc -l`
    DIRECTION_OF_DETECTOR_X_AXIS="$R1 0 $R3"
  elif [ "$dname" == "RX_" ]; then
     DETECTOR="RAXIS MINIMUM_VALID_PIXEL_VALUE=0"
     DETECTOR="RAXIS MINIMUM_VALID_PIXEL_VALUE=0"
     dtrek_det="raxis"
     dtrek_det="raxis"
  else
    DETECTOR="XXX MINIMUM_VALID_PIXEL_VALUE=XXX"
    dtrek_det="unknown"
   fi
   fi
   # find OVERLOAD
   # find OVERLOAD
   SATURATED_VALUE=`grep SATURATED_VALUE tmp2 | head -1 | sed s/SATURATED_VALUE=//`
   SATURATED_VALUE=`grep SATURATED_VALUE tmp2 | head -1 | sed s/SATURATED_VALUE=//`
Line 583: Line 610:
   idx=$((i-1))
   idx=$((i-1))
   if [ "${GONIO_NAMES[$idx]}" == "Distance" ]; then
   if [ "${GONIO_NAMES[$idx]}" == "Distance" ]; then
    DETECTOR_DISTANCE="${GONIO_VALUES[$idx]}"
    # TODO: Check unit!! - ${GONIO_UNITS[$idx]}
  fi
  if [ $flip -gt 0 ]; then
     DETECTOR_DISTANCE="-${GONIO_VALUES[$idx]}"
     DETECTOR_DISTANCE="-${GONIO_VALUES[$idx]}"
     # TODO: Check unit!! - ${GONIO_UNITS[$idx]}
     # TODO: Check unit!! - ${GONIO_UNITS[$idx]}
    echo "using distance <0"
   fi
   fi
   done
   done
Line 616: Line 648:
    
    
  echo  "Data from a Bruker-cbf detector"
  echo  "Data from a Bruker-cbf detector"
# conversion radian / degrees:
DEGTOR=57.2957795
# MINIMUM_NUMBER_OF_PIXELS_IN_A_SPOT:
# MINIMUM_NUMBER_OF_PIXELS_IN_A_SPOT:
  MNOPIAS=6  
  MNOPIAS=6  
Line 727: Line 757:
STRONG_PIXEL=4          ! COLSPOT: only use strong reflections (default is 3)
STRONG_PIXEL=4          ! COLSPOT: only use strong reflections (default is 3)
MINIMUM_NUMBER_OF_PIXELS_IN_A_SPOT=$MNOPIAS ! default of 6 is sometimes too high
MINIMUM_NUMBER_OF_PIXELS_IN_A_SPOT=$MNOPIAS ! default of 6 is sometimes too high
! close spots/long cell axis: reduce SEPMIN and CLUSTER_RADIUS from their defaults of 6 and 3
! close spots/long cell axis: reduce SEPMIN and CLUSTER_RADIUS from their defaults of 7 and 3.5
! SEPMIN=4 CLUSTER_RADIUS=2 ! should be default for Pilatus and other detectors with low PSF
SEPMIN=$SEPMIN CLUSTER_RADIUS=$CLUSTER_RADIUS ! 4 and 2 for Pixel Array Detectors
! since XDS 01-MAR-2015, POSITION supersedes DISTANCE.
! since XDS 01-MAR-2015, POSITION supersedes DISTANCE.
! nowadays headers are usually correct so refine POSITION in INTEGRATE but not IDXREF
! nowadays headers are usually correct so refine POSITION in INTEGRATE but not IDXREF
Line 812: Line 842:
elif [ "$DET" == "pilatus" -o "$DET" == "eiger" ]; then
elif [ "$DET" == "pilatus" -o "$DET" == "eiger" ]; then
cat >> XDS.INP << eof
cat >> XDS.INP << eof
SEPMIN=4 CLUSTER_RADIUS=2
NUMBER_OF_PROFILE_GRID_POINTS_ALONG_ALPHA/BETA=13 ! Default is 9 - Increasing may improve data  
NUMBER_OF_PROFILE_GRID_POINTS_ALONG_ALPHA/BETA=13 ! Default is 9 - Increasing may improve data  
NUMBER_OF_PROFILE_GRID_POINTS_ALONG_GAMMA=13      ! accuracy, particularly if finely-sliced on phi,  
NUMBER_OF_PROFILE_GRID_POINTS_ALONG_GAMMA=13      ! accuracy, particularly if finely-sliced on phi,  
Line 907: Line 936:
echo BKGPIX.cbf, and the agreement of predicted and observed spots in FRAME.cbf!
echo BKGPIX.cbf, and the agreement of predicted and observed spots in FRAME.cbf!
rm -f tmp1 tmp2
rm -f tmp1 tmp2
# end of generate_XDS.INP
</pre>
</pre>


2,684

edits

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

Navigation menu