Exemple #1
0
f.close()

### RECIPES ###
recipe = Recipe("topaz_detector")
recipe.setHelper("Rectangle")  #Use the general Rectangle
recipe.addParameter("xNumPixel", "256")
recipe.addParameter("yNumPixel", "256")
recipe.addParameter("flip", "1")
recipe.addVariable("xExtent", "extent")  #width and height of detector
recipe.addVariable("yExtent", "extent")
recipe.addVariable("xOffset", "0")
recipe.addVariable("yOffset", "0")
geometry.addRecipe(recipe)

### MATHS ###
maths = Maths()

# Definitions
maths.addDefinition(
    "extent", "158.19",
    units="millimetre")  # the size (width and height) of each detector

maths.addDefinition("L1", "18.0", units="metre")
maths.addDefinition("chop1mod_distance", "6.4029", units="metre")
maths.addDefinition("chop2mod_distance", "8.90157", units="metre")
maths.addDefinition("chop3mod_distance", "11.45713", units="metre")
maths.addDefinition("mon1mod_distance", "15.45", units="metre")
maths.addDefinition("mon2mod_distance", "19.049",
                    units="metre")  #calibrated as of 8/21/2012
maths.addDefinition("s1mod_distance", "15.40", units="metre")
maths.addDefinition("s2mod_distance", "17.45", units="metre")
f.close()

### RECIPES ###
recipe = Recipe("topaz_detector")
recipe.setHelper("Rectangle") #Use the general Rectangle
recipe.addParameter("xNumPixel", "256")
recipe.addParameter("yNumPixel", "256")
recipe.addParameter("flip", "1")
recipe.addVariable("xExtent", "extent") #width and height of detector
recipe.addVariable("yExtent", "extent")
recipe.addVariable("xOffset", "0") 
recipe.addVariable("yOffset", "0") 
geometry.addRecipe(recipe)

### MATHS ###
maths = Maths()

# Definitions
maths.addDefinition("extent", "158.19", units="millimetre") # the size (width and height) of each detector

maths.addDefinition("L1", "18.0", units="metre")
maths.addDefinition("chop1mod_distance", "6.4029", units="metre")
maths.addDefinition("chop2mod_distance", "8.90157", units="metre")
maths.addDefinition("chop3mod_distance", "11.45713", units="metre")
maths.addDefinition("mon1mod_distance", "15.45", units="metre")
maths.addDefinition("mon2mod_distance", "19.049", units="metre") #calibrated as of 8/21/2012
maths.addDefinition("s1mod_distance", "15.40", units="metre")
maths.addDefinition("s2mod_distance", "17.45", units="metre")

# Inputs
maths.addInput("s1l", "length")
f.close()

### RECIPES ###
recipe = Recipe("detector")
recipe.setHelper("Rectangle") #Use the general Rectangle
recipe.addParameter("xNumPixel", "256")
recipe.addParameter("yNumPixel", "256")
recipe.addParameter("flip", "1")
recipe.addVariable("xExtent", "extent") #width and height of detector
recipe.addVariable("yExtent", "extent")
recipe.addVariable("xOffset", "0") 
recipe.addVariable("yOffset", "0") 
geometry.addRecipe(recipe)

### MATHS ###
maths = Maths()

# Definitions
maths.addDefinition("extent", "158.19", units="millimetre") # the size (width and height) of each detector

maths.addDefinition("L1", "30.0", units="metre")
maths.addDefinition("chop1mod_distance", "7.2", units="metre")
maths.addDefinition("chop2mod_distance", "8.27", units="metre")
maths.addDefinition("chop3mod_distance", "10.5", units="metre")
maths.addDefinition("mon1mod_distance", "27.065", units="metre") # refined on 12-07-2012
maths.addDefinition("mon2mod_distance", "29.102", units="metre") # refined on 12-07-2012 
maths.addDefinition("mon3mod_distance", "31.042", units="metre") # refined on 02-01-2013 
maths.addDefinition("s1mod_distance", "27.04", units="metre")
maths.addDefinition("s2mod_distance", "29.53", units="metre")
maths.addDefinition("default_chi", "-45.0", units="degree")