######################################### ### Really important parameters ## to be set to discover what the geometry conventions ## really are orientation_codes=5 # 8 possibilities look at analyse_maxima_fourier.py theta = 0.0 theta_offset = 0.0 alpha = 50.0 beta = 0.0 angular_step = +0.1 dist = 244.31059 pixel_size = 0.172 kappa = 2.25396653702 omega = 89.57298 det_origin_X=731.071873845 det_origin_Y=1665.81842237 # lmbda is not so important in the desperate phase. It just expand the size of the lattice lmbda = 0.68894 ##################################################### ### Other parameters that are generally small or that can ## be refined later like r1,r2,r3 beam_tilt_angle = 0.13396 d1 = -0.146084537931 d2 = 0.171515179405 omega_offset = 0 phi = 0 ################################## # AA,BB,CC r1,r2,r3 : we will find them later ############################" ## aAA, aBB, aCC... later ################################################ ###### peaks positions are read from this file # maxima_file = "tagged_maxima.p" ########################################################################### ## we are going to visualise the spots distribution in reciprocal 3D space ## ############# ## ESTIMATION by FOURIER AA=4.255178e+00 BB=4.255178e+00 CC=4.255178e+00 aAA=90.0 aBB=90.0 ## set by hand aCC=90.0 r3=1.654992e+02 r2=8.877376e+01 r1=-8.946453e+01 ############# ## FOLLOWING PARAMETERS ARE QUATERNIONS COEFFICIENTS. ############# ## TOBEUSED WITH USEQUAT=True USEQUAT=True r1=4.294775e-01 r2=5.616485e-01 r3=4.414863e-01 ############################ r1 = 0.430043234958 r2 = 0.561156286782 r3 = 0.441641465046 AA = 4.20909540045 BB = 4.20909540045 CC = 4.20909540045 ################################################################ ## which spot to harvest and fit are read from this file ## alternatively you can set collectSpots variable # file_maxima = "tagged_maxima.p" ####################################### ### OPTIONS FOR EASY EDITING DO_HARVESTING = 0 DO_CENTERED_HARVESTING = 1 DRY_RUN = 2 FIT = 3 ## Select one of these operations # TODO = DRY_RUN # TODO = DO_HARVESTING # TODO = DO_CENTERED_HARVESTING # TODO = FIT TODO = DO_HARVESTING TODO = FIT ########################### # # Temperature and density # just in case # # At room temperature you can simultaneously scale # frequencies and intensity, our fit # so far is insensitive to absolute scale # because the intensity factors are absorbed by # the fitting procedure. This because we dont have an absolute # scale of the absolute intensity : we dont know the exact geometry # of the sample and many other factors Temperature = 92.5 # Kelvin, some average temperature, the scan was not so flat in temperature density = 2.71 # g/cc ftol=1.0e-9 if TODO == FIT : show_hkls = False DO_ELASTIC=1 load_from_file= "collection.h5" save_to_file = None fitSpots = True CGUESS={"A11": [300.,300 , 300], "A44": [100.,0 ,400 ], "A12": [80.,-400,400 ] } activ=0 activSample=1 A_variables = ( [ minimiser.Variable(0.0,-1.5*activSample ,1.5*activSample ) for i in range(1) ]+ # r1, [ minimiser.Variable(0.0,-1.5*activSample ,1.5*activSample ) for i in range(1) ]+ # r2 [ minimiser.Variable(0.0,-1.5*activSample ,1.5*activSample ) for i in range(1) ]+ # r3, [ minimiser.Variable(0.0,-0.1*activSample ,0.1*activSample ) ,-1,-1]+ # AA, BB, CC [ minimiser.Variable(0.0,-2.0*activ,2.0*activ) , minimiser.Variable(0.0,0,0) , minimiser.Variable(0.0,0,0) , minimiser.Variable(0.0,-2.0*activ,2.0*activ) , ]+ # omega, alpha, beta, kappa [ minimiser.Variable(0.0,-0.2*activ,+0.2*activ) for i in range(2) ] + # d1,d2, [ minimiser.Variable(0.0,-5*activ,+5*activ) for i in range(2) ] # det_origin_X, det_origin_Y ) collectSpots = np.array([ [ -0, 2,-4] ,[ -2, 2,-4] ,[ 2, 2,-4] ,[ -0, -0,-2] ,[ -1, 1,-5] ,[ -2, -0,-2] ,[ 0, -0,-4] ,[ 2, 0,-2] ,[ -2, 0,-4] , [ 2, -0,-4] ,[ -1, -1,-5] ,[ 0, -2,-4] ,[ -2, -2,-4] ,[ 2, -2,-4] ,[ -1, -1,-1] ,[ 1, -1,-1] ,[ -0, -2,-2] ,[ -2, -2,-2] , [ 2, -2,-2] ,[ -1, -3,-3] ,[ 1, -3,-3] ,[ -0, -4,-2] ,[ -2, -4,-2] ,[ 2, -4,-2] ,[ -0, -2,-0] ,[ -1, -5,-1] ,[ -2, -2, 0] , [ 0, -4, 0] ,[ 2, -2,-0] ,[ -2, -4, 0] ,[ 2, -4,-0] ,[ -1, -5, 1] ,[ 1, -5, 1] ,[ 0, -4, 2] ,[ -2, -4, 2] ,[ 2, -4, 2] , [ 1, -1, 1] ,[ 0, -2, 2] ,[ -2, -2, 2] ,[ 2, -2, 2] ,[ -1, -3, 3] ,[ 1, -3, 3] ,[ 0, -2, 4] ,[ -1, -1, 3] ,[ -2, -2, 4] , [ 2, -2, 4] ,[ -0, -0, 2] ,[ 1, -1, 5] ,[ -2, 0, 2] ,[ 0, -0, 4] ,[ 2, -0, 2] ,[ 0, 4, -2] ,[ 2, -0, 4] ,[ 1, 1, 3] , [ 1, 1, 5] ,[ 0, 2, 4] ,[ -2, 2, 4] , [ 2, 2, 4] ,[ -1, 1, 1] ,[ -0, 2, 2] ,[ -2, 2, 2] ,[ -1, 3, 3] , [ 2, 2, 2] ,[ 1, 3, 3] ,[ -0, 4, 2] ,[ -2, 4, 2] , [ 2, 4, 2] ,[ -0, 2, 0] ,[ 1, 5, 1] ,[ -2, 2,-0] , [ 0, 4, 0] ,[ 2, 2, 0] ,[ -2, 4, 0] ,[ 2, 4, 0] ,[ 1, 5,-1] ,[ -0, 4,-2] ,[ -2, 4,-2] ,[ 2, 4,-2] ]) collectSpots = np.array( [[-2, -4, -2], [-2, -4, 0], [-2, -4, 2], [-2, -2, -4], [-2, -2, -2], [-2, -2, 0], [-2, -2, 2], [-2, -2, 4], [-2, 0, -4], [-2, 0, -2], [-2, 0, 2], [-2, 0, 4], [-2, 2, -4], [-2, 2, -2], [-2, 2, 0], [-2, 2, 2], [-2, 2, 4], [-2, 4, -2], [-2, 4, 0], [-2, 4, 2], [-1, -5, -1], [-1, -5, 1], [-1, -3, -3], [-1, -3, -1], [-1, -3, 1], [-1, -3, 3], [-1, -1, -5], [-1, -1, -3], [-1, -1, -1], [-1, -1, 1], [-1, -1, 3], [-1, -1, 5], [-1, 1, -5], [-1, 1, -3], [-1, 1, -1], [-1, 1, 1], [-1, 1, 3], [-1, 1, 5], [-1, 3, -3], [-1, 3, -1], [-1, 3, 1], [-1, 3, 3], [-1, 5, -1], [-1, 5, 1], [0, -4, -2], [0, -4, 0], [0, -4, 2], [0, -2, -4], [0, -2, -2], [0, -2, 0], [0, -2, 2], [0, -2, 4], [0, 0, -4], [0, 0, -2], [0, 0, 2], [0, 0, 4], [0, 2, -4], [0, 2, -2], [0, 2, 0], [0, 2, 2], [0, 2, 4], [0, 4, -2], [0, 4, 0], [0, 4, 2], [1, -5, -1], [1, -5, 1], [1, -3, -3], [1, -3, -1], [1, -3, 1], [1, -3, 3], [1, -1, -5], [1, -1, -3], [1, -1, -1], [1, -1, 1], [1, -1, 3], [1, -1, 5], [1, 1, -5], [1, 1, -3], [1, 1, -1], [1, 1, 1], [1, 1, 3], [1, 1, 5], [1, 3, -3], [1, 3, -1], [1, 3, 1], [1, 3, 3], [1, 5, -1], [1, 5, 1], [2, -4, -2], [2, -4, 0], [2, -4, 2], [2, -2, -4], [2, -2, -2], [2, -2, 0], [2, -2, 2], [2, -2, 4], [2, 0, -4], [2, 0, -2], [2, 0, 2], [2, 0, 4], [2, 2, -4], [2, 2, -2], [2, 2, 0], [2, 2, 2], [2, 2, 4], [2, 4, -2], [2, 4, 0], [2, 4, 2]] ) doMinimisation=1 visSim=1 testSpot_beta = 0.06 testSpot_Niter = 80 testSpot_N = 128 if TODO == DRY_RUN: DO_ELASTIC=1 load_from_file= "collection_centered.h5" save_to_file = None fitSpots = True if(TODO==DO_CENTERED_HARVESTING): centering_file ="collection4c.h5" threshold = 1000.0 badradius = 0 DeltaQ_max = 0.15 DeltaQ_min = 0.06 load_from_file= None save_to_file = "collection_centered.h5" DO_ELASTIC=1 REPLICA_COLLECTION = 0 badradius=0 if(TODO==DO_HARVESTING): threshold = 1000.0 badradius = 0 DeltaQ_max = 0.15 DeltaQ_min = 0.06 load_from_file= None save_to_file = "collection.h5" DO_ELASTIC=1 badradius = 0 collectSpots = [ [ 3,1,3] ,[0,0,4], [ 4,2,2],[ 2,2,2],[2,0,2],[4,0,2],[0,0, 2] , [ 1,1,1],[5,1,1],[3,1,1] ] REPLICA_COLLECTION = 1 import numpy as np r1+= -0.0001586012452 r2+= 0.00012127225 r3+= -5.070206146644e-05 AA+= 0.0011324056 BB+= 0.0011324056 CC+= 0.0011324056 DELTA={ "r1":-0.00000000001, }