Eiger: Difference between revisions

Jump to navigation Jump to search
300 bytes added ,  8 March 2017
no edit summary
No edit summary
Line 124: Line 124:
<pre>
<pre>
#!/usr/bin/python
#!/usr/bin/python
# coding: utf8
# -*- coding: utf-8 -*-
 
__author__ = "AndF"
__date__ = "2017/03/08"
__reviewer__ = ""
__version__ = "0.1.0"


import sys
import sys
# Path needs to be be set only if dectris.albula is not found
# Path needs to be be set only if dectris.albula is not found
# i.e. if ALBULA was installed without "--python=</path/to/python_interpreter>"
# i.e. if ALBULA was installed without "--python=</path/to/python_interpreter>"
# Define correct path to ALBULA API:
# Uncomment below (and define correct path to ALBULA API)
sys.path.insert(0,"/usr/local/dectris/albula/3.2/python")
# sys.path.insert(0,"/usr/local/dectris/albula/3.2/python")
try:
try:
   import dectris.albula as dec
   import dectris.albula as dec
Line 164: Line 169:
!====================== DETECTOR PARAMETERS ==================================
!====================== DETECTOR PARAMETERS ==================================
  DETECTOR=%(family)s
  DETECTOR=%(family)s
!LIB= /usr/local/lib64/dectris-neggia.so
  MINIMUM_VALID_PIXEL_VALUE=0
  MINIMUM_VALID_PIXEL_VALUE=0
  OVERLOAD= %(cutoff)i ! taken from HDF5 header item
  OVERLOAD= %(cutoff)i ! taken from HDF5 header item
Line 179: Line 185:


!====================== JOB CONTROL PARAMETERS ===============================
!====================== JOB CONTROL PARAMETERS ===============================
  JOB= XYCORR INIT COLSPOT IDXREF DEFPIX ! XPLAN INTEGRATE CORRECT
!JOB= XYCORR INIT COLSPOT IDXREF DEFPIX ! XPLAN INTEGRATE CORRECT
  JOB= XYCORR INIT COLSPOT IDXREF DEFPIX INTEGRATE CORRECT
!JOB= INTEGRATE CORRECT


! MAXIMUM_NUMBER_OF_JOBS=8  !Speeds up COLSPOT & INTEGRATE on multicore machine
!Set maximum number of jobs and processors so that their products comes close
! MAXIMUM_NUMBER_OF_PROCESSORS=4!<32;ignored by single cpu version of xds
!to the number of CPUs of the machine.
MAXIMUM_NUMBER_OF_JOBS=8  !Speeds up COLSPOT & INTEGRATE on multicore machine
MAXIMUM_NUMBER_OF_PROCESSORS=4!<99;ignored by single cpu version of xds
!SECONDS=0  !Maximum number of seconds to wait until data image must appear
!SECONDS=0  !Maximum number of seconds to wait until data image must appear
!TEST=1    !Test flag. 1,2 additional diagnostics and images
!TEST=1    !Test flag. 1,2 additional diagnostics and images
Line 189: Line 199:
!ORGX and ORGY are often close to the image center, i.e. ORGX=NX/2, ORGY=NY/2
!ORGX and ORGY are often close to the image center, i.e. ORGX=NX/2, ORGY=NY/2
  ORGX= %(orgx).1f  ORGY= %(orgy).1f    !Detector origin (pixels).  ORGX=NX/2; ORGY=NY/2
  ORGX= %(orgx).1f  ORGY= %(orgy).1f    !Detector origin (pixels).  ORGX=NX/2; ORGY=NY/2
  DETECTOR_DISTANCE= %(dist)i   ! [mm]
  DETECTOR_DISTANCE= %(dist).2f   ! [mm]


  ROTATION_AXIS= 1.0 0.0 0.0
  ROTATION_AXIS= 1.0 0.0 0.0
Line 214: Line 224:
!REIDX=  0  0 -1  0  0 -1  0  0 -1  0  0  0
!REIDX=  0  0 -1  0  0 -1  0  0 -1  0  0  0


FRIEDEL'S_LAW=FALSE ! Default is TRUE.
!FRIEDEL'S_LAW=FALSE ! Default is TRUE.


!REFERENCE_DATA_SET= CK.HKL  ! Name of a reference data set (optional)
!REFERENCE_DATA_SET= CK.HKL  ! Name of a reference data set (optional)
Line 301: Line 311:
!REFLECTING_RANGE_E.S.D.=  0.113 !half-width (mosaicity) of REFLECTING_RANGE
!REFLECTING_RANGE_E.S.D.=  0.113 !half-width (mosaicity) of REFLECTING_RANGE


  NUMBER_OF_PROFILE_GRID_POINTS_ALONG_ALPHA/BETA=21!used by: INTEGRATE
!The next two values could be increased up to 21 for best profiles.
  NUMBER_OF_PROFILE_GRID_POINTS_ALONG_GAMMA=21     !used by: INTEGRATE
  NUMBER_OF_PROFILE_GRID_POINTS_ALONG_ALPHA/BETA=13!used by: INTEGRATE
  NUMBER_OF_PROFILE_GRID_POINTS_ALONG_GAMMA=13     !used by: INTEGRATE


!DELPHI= 6.0!controls the number of reference profiles and scaling factors
!DELPHI= 6.0!controls the number of reference profiles and scaling factors
Line 443: Line 454:
         'orgx': float(parameters["/entry/instrument/detector/beam_center_x"]),
         'orgx': float(parameters["/entry/instrument/detector/beam_center_x"]),
         'orgy': float(parameters["/entry/instrument/detector/beam_center_y"]),
         'orgy': float(parameters["/entry/instrument/detector/beam_center_y"]),
         'dist': int(float(parameters["/entry/instrument/detector/detector_distance"]) * 1000.0),
         'dist': float(parameters["/entry/instrument/detector/detector_distance"]) * 1000.0,
         'osc_range': float(parameters["/entry/sample/goniometer/omega_range_average"]),
         'osc_range': float(parameters["/entry/sample/goniometer/omega_range_average"]),
         'wavelength': float(parameters["/entry/instrument/beam/incident_wavelength"]),
         'wavelength': float(parameters["/entry/instrument/beam/incident_wavelength"]),
Line 504: Line 515:
             gap[1] + 1 + offset + n_excluded_edge_pixels,
             gap[1] + 1 + offset + n_excluded_edge_pixels,
             0,
             0,
             detector_families[fam]['sizes'][det][1] + 1))
             detector_families[fam]['sizes'][det][1] + offset))
     param_lines.append('\n')
     param_lines.append('\n')
     param_lines.append('!EXCLUSION OF HORIZONTAL DEAD AREAS OF THE '
     param_lines.append('!EXCLUSION OF HORIZONTAL DEAD AREAS OF THE '
Line 513: Line 524:
         param_lines.append(' UNTRUSTED_RECTANGLE= %4d %4d  %4d %4d \n' % (
         param_lines.append(' UNTRUSTED_RECTANGLE= %4d %4d  %4d %4d \n' % (
             0,
             0,
             detector_families[fam]['sizes'][det][0] + 1,
             detector_families[fam]['sizes'][det][0] + offset,
             gap[0] - 1 + offset - n_excluded_edge_pixels,
             gap[0] - 1 + offset - n_excluded_edge_pixels,
             gap[1] + 1 + offset + n_excluded_edge_pixels))
             gap[1] + 1 + offset + n_excluded_edge_pixels))
Line 521: Line 532:
     return ('\nThis script extracts from a given HDF5 master file all metadata\n'
     return ('\nThis script extracts from a given HDF5 master file all metadata\n'
             'required to write XDS.INP.  The user is prompted for missing metadata.\n'
             'required to write XDS.INP.  The user is prompted for missing metadata.\n'
            'If there are errors in the metadata, XDS.INP will be incorrect.\n'
             '\n'
             '\n'
            'WARNING - This script is a proof-of-principle, pre-alpha.\n'
             'Please report shortcomings and errors to docandreas@gmail.com\n')
            'Do not rely on it for anything serious.  Things will go wrong.\n'
            'In particular, this does not work for data collected in ROI mode.\n'
            '\n'
             'Please report shortcomings and errors to andreas.foerster@dectris.com\n')


def help():
def help():
Line 576: Line 584:
         return raw_input("Please enter the maximum trusted pixel value.\n")
         return raw_input("Please enter the maximum trusted pixel value.\n")
     elif (parameter == resolution_cutoff):
     elif (parameter == resolution_cutoff):
         return raw_input("Please enter a resolution limit for processing.\n")
         print "Please enter a resolution limit for processing."
        return raw_input("Enter '0' to let XDS decide.\n") or 0
     else:
     else:
         print "Unknown software version.  Please check."
         print "Unknown software version.  Please check."
Line 683: Line 692:
                 else:
                 else:
                     print "\nThe HDF5 file was created with version %s of the detector firmware" % (para_version)
                     print "\nThe HDF5 file was created with version %s of the detector firmware" % (para_version)
                     print "This script supports versions 1.2 and up."
                     print "This script supports versions 1.5 and up."
                     print "\nFile XDS.INP was not created."
                     print "\nFile XDS.INP was not created."
                     print "Please extract metadata with hdfview or h5dump.\n"
                     print "Please extract metadata with hdfview or h5dump.\n"
18

edits

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

Navigation menu