-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathgenerate_xds.py
49 lines (49 loc) · 1.78 KB
/
generate_xds.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
def gen_xds_text(UNIT_CELL_CONSTANTS, NAME_TEMPLATE_OF_DATA_FRAMES, ORGX, ORGY,
DETECTOR_DISTANCE, OSCILLATION_RANGE, X_RAY_WAVELENGTH, DATA_RANGE,
BACKGROUND_RANGE, SPOT_RANGE, LIB, SPACEGROUP):
dataframes = "??????".join((str(NAME_TEMPLATE_OF_DATA_FRAMES).rsplit("master", 1)))
text = """
SPACE_GROUP_NUMBER={in_12}
UNIT_CELL_CONSTANTS= {in_1}
NAME_TEMPLATE_OF_DATA_FRAMES= {in_2}
JOB= XYCORR INIT COLSPOT IDXREF DEFPIX INTEGRATE CORRECT
ORGX= {in_3} ORGY= {in_4}
DETECTOR_DISTANCE= {in_5}
OSCILLATION_RANGE= {in_6}
X-RAY_WAVELENGTH= {in_7}
DATA_RANGE= {in_8}
BACKGROUND_RANGE= {in_9}
SPOT_RANGE= {in_10}
LIB={in_11}
DETECTOR=EIGER
MINIMUM_VALID_PIXEL_VALUE=0
OVERLOAD= 1048500
SENSOR_THICKNESS=0.32
QX=0.075 QY=0.075
NX= 1030 NY= 1065
UNTRUSTED_RECTANGLE= 0 1031 514 552
TRUSTED_REGION=0.0 1.2
DIRECTION_OF_DETECTOR_X-AXIS= 1.0 0.0 0.0
DIRECTION_OF_DETECTOR_Y-AXIS= 0.0 1.0 0.0
MAXIMUM_NUMBER_OF_JOBS=4
MAXIMUM_NUMBER_OF_PROCESSORS=8
ROTATION_AXIS= -1.0 0.0 0.0
INCIDENT_BEAM_DIRECTION=0.0 0.0 1.0
FRACTION_OF_POLARIZATION=0.99
POLARIZATION_PLANE_NORMAL= 0.0 1.0 0.0
REFINE(IDXREF)=BEAM AXIS ORIENTATION CELL ! POSITION
REFINE(INTEGRATE)= ORIENTATION POSITION BEAM ! CELL AXIS
REFINE(CORRECT)=POSITION BEAM ORIENTATION CELL AXIS
VALUE_RANGE_FOR_TRUSTED_DETECTOR_PIXELS= 6000 30000
!INCLUDE_RESOLUTION_RANGE=50 1.8
MINIMUM_I/SIGMA=50.0
CORRECTIONS= !
MINIMUM_FRACTION_OF_INDEXED_SPOTS=0.5
SEPMIN=4.0
INDEX_ERROR=0.1 INDEX_MAGNITUDE=8 INDEX_QUALITY=0.8
CLUSTER_RADIUS=2
MINIMUM_NUMBER_OF_PIXELS_IN_A_SPOT=3
""".format(in_1=UNIT_CELL_CONSTANTS, in_2=dataframes, in_3=ORGX, in_4=ORGY,
in_5=DETECTOR_DISTANCE, in_6=OSCILLATION_RANGE, in_7=X_RAY_WAVELENGTH, in_8=DATA_RANGE, in_9=BACKGROUND_RANGE,
in_10=SPOT_RANGE, in_11=LIB, in_12=SPACEGROUP)
return text