Right detector:
       Same orientation of tubes, same size of pixels
       Only 96 tubes instead of 128 tubes in the main detector

       For more information, please visit
       https://www.ill.eu/instruments-support/instruments-groups/instruments/d22/characteristics/
       """
d22 = MantidGeom(instrumentName, comment=comment, valid_from=validFrom)
d22.addSnsDefaults(default_view='3D',axis_view_3d='z-')
d22.addComment("SOURCE")
d22.addComponentILL("moderator", 0., 0., moderator_source, "Source")
d22.addComment("Sample position")
d22.addComponentILL("sample_position", 0., 0., 0., "SamplePos")
d22.addComment("MONITORS")
d22.addMonitors(names=["monitor1", "monitor2"], distance=[zMon1, zMon2])
d22.addComment("MONITOR SHAPE")
d22.addDummyMonitor(0.01, 0.03)
d22.addComment("MONITOR IDs")
d22.addMonitorIds([repr(100000), repr(100001)])
d22.addComment("DETECTOR")
d22.addComponentILL("detector", 0., 0., 0.)
detector = d22.makeTypeElement("detector")
d22.addComponentRectangularDetector(detector0, 0., 0., zPos, idstart=id0, idfillbyfirst=FF, idstepbyrow=SR, root=detector)
d22.addComponentRectangularDetector(detector1, -right_center_offset, 0., zPos-z_gap, idstart=id1, idfillbyfirst=FF, idstepbyrow=SR, root=detector)
d22.addRectangularDetector(detector0, pixelName, xstart, xstep, xpixels, ystart, ystep, ypixels)
d22.addRectangularDetector(detector1, pixelName, xstart_right, xstep, xpixels_right, ystart, ystep, ypixels)
d22.addComment("PIXEL, EACH PIXEL IS A DETECTOR")
d22.addCuboidPixel(pixelName, [-x, -y, thickness/2.], [-x, y, thickness/2.], [-x, -y, -thickness/2.], [x, -y, thickness/2.], shape_id="pixel-shape")
d22.writeGeom("./ILL/IDF/" + instrumentName + "_Definition.xml")
       For more information, please visit
       https://www.ill.eu/instruments-support/instruments-groups/instruments/figaro/characteristics/
       """
figaro = MantidGeom(instrumentName, comment=comment, valid_from=validFrom)
figaro.addSnsDefaults(theta_sign_axis='y')
figaro.addComment("SOURCE")
figaro.addComponentILL("chopper1", 0.0, 0.0, zSource, "Source")
figaro.addComment("Sample position")
figaro.addComponentILL("sample_position", 0.0, 0.0, 0.0, "SamplePos")
figaro.addComment("MONITORS")
figaro.addMonitors(names=["monitor1", "monitor2"], distance=[zMon1, zMon2])
figaro.addComment("MONITOR SHAPE")
figaro.addComment("FIXME: Do something real here.")
figaro.addDummyMonitor(0.01, 0.03)
figaro.addComment("MONITOR IDs")
figaro.addMonitorIds(["100000", "100001"])
figaro.addComment("2 Slits")
figaro.addComponentILL("slit2", 0.0, 0.0, slit2Centre)
figaro.makeTypeElement("slit2")
figaro.addComponentILL("slit3", 0.0, 0.0, slit3Centre)
figaro.makeTypeElement("slit3")
figaro.addComment("DETECTORS")
figaro.addComment("64 tubes form the detector")
figaro.addComponentRectangularDetector("detector", 0.0, 0.0, zDetector, idstart="1", idfillbyfirst="x",
                                    idstepbyrow="1")
figaro.addComment("PIXEL, EACH PIXEL IS A DETECTOR")
figaro.addRectangularDetector("detector", "pixel", xstart, xstep, xpixels, ystart, ystep, ypixels)
figaro.addCuboidPixel("pixel", [-x, -y, z], [x, y, z], [-x, -y, -z], [x, -y, z], shape_id="pixel-shape")
figaro.writeGeom("./ILL/IDF/" + instrumentName.upper() + "_Definition.xml")
       Size 1024 mm x 1024 mm
       Nominal resolution:
            128 x 256
            Pixel size 8 x 4 mm2
       Low resolution:
            128 x 128
            Pixel size 8 x 8 mm2

       For more information, please visit
       https://www.ill.eu/instruments-support/instruments-groups/instruments/d22/characteristics/
       """
d22 = MantidGeom(instrumentName, comment=comment, valid_from=validFrom)
d22.addSnsDefaults(default_view='3D',axis_view_3d='z-')
d22.addComment("SOURCE")
d22.addComponentILL("moderator", 0., 0., moderator_source, "Source")
d22.addComment("Sample position")
d22.addComponentILL("sample_position", 0., 0., 0., "SamplePos")
d22.addComment("MONITORS")
d22.addMonitors(names=["monitor1", "monitor2"], distance=[zMon1, zMon2])
d22.addComment("MONITOR SHAPE")
d22.addComment("FIXME: Do something real here.")
d22.addDummyMonitor(0.01, 0.03)
d22.addComment("MONITOR IDs")
d22.addMonitorIds([repr(100000), repr(100001)])
d22.addComment("DETECTOR")
d22.addComponentRectangularDetector(detector0, 0., 0., zPos, roty=180., idstart=id0, idfillbyfirst=FF, idstepbyrow=SR)
d22.addRectangularDetector(detector0, pixelName, xstart, xstep, xpixels, ystart, ystep, ypixels)
d22.addComment("PIXEL, EACH PIXEL IS A DETECTOR")
d22.addCuboidPixel(pixelName, [-x, -y, thickness/2.], [-x, y, thickness/2.], [-x, -y, -thickness/2.], [x, -y, thickness/2.], shape_id="pixel-shape")
d22.writeGeom("./ILL/IDF/" + instrumentName + "_Definition.xml")
示例#4
0
d33.addComponentILL("sample_position", 0., 0., 0., "SamplePos")
d33.addComment("MONITORS")
d33.addMonitors(names=["monitor1", "monitor2"], distance=[zMon1, zMon2])
d33.addComment("MONITOR SHAPE")
d33.addComment("FIXME: Do something real here.")
d33.addDummyMonitor(0.01, 0.03)
d33.addComment("MONITOR IDs")
d33.addMonitorIds([repr(500000), repr(500001)])
d33.addComment("DETECTORS")
d33.addComponentILL("detector", 0., 0., 0.)
detector = d33.makeTypeElement("detector")
d33.addComponentRectangularDetector(detector0,
                                    0.,
                                    0.,
                                    zPosRear,
                                    idstart=id0,
                                    idfillbyfirst="x",
                                    idstepbyrow=SR,
                                    rotz=90.,
                                    root=detector)
d33.addComponentILL("front_detector", 0., 0., 0., root=detector)
front_detector = d33.makeTypeElement("front_detector")
d33.addComponentRectangularDetector(detector1,
                                    -dF - dR,
                                    0.,
                                    zFront,
                                    idstart=id1,
                                    idfillbyfirst="y",
                                    idstepbyrow=SRF,
                                    root=front_detector)
d33.addComponentRectangularDetector(detector2,
figaro.addComment("Sample position")
figaro.addComponentILL("sample_position", 0.0, 0.0, 0.0, "SamplePos")
figaro.addComment("MONITORS")
figaro.addMonitors(names=["monitor1", "monitor2"], distance=[zMon1, zMon2])
figaro.addComment("MONITOR SHAPE")
figaro.addComment("FIXME: Do something real here.")
figaro.addDummyMonitor(0.01, 0.03)
figaro.addComment("MONITOR IDs")
figaro.addMonitorIds(["100000", "100001"])
figaro.addComment("2 Slits")
figaro.addComponentILL("slit2", 0.0, 0.0, slit2Centre)
figaro.makeTypeElement("slit2")
figaro.addComponentILL("slit3", 0.0, 0.0, slit3Centre)
figaro.makeTypeElement("slit3")
figaro.addComment("DETECTORS")
figaro.addComment("64 tubes form the detector")
figaro.addComponentRectangularDetector("detector",
                                       0.0,
                                       0.0,
                                       zDetector,
                                       idstart="1",
                                       idfillbyfirst="x",
                                       idstepbyrow="1")
figaro.addComment("PIXEL, EACH PIXEL IS A DETECTOR")
figaro.addRectangularDetector("detector", "pixel", xstart, xstep, xpixels,
                              ystart, ystep, ypixels)
figaro.addCuboidPixel("pixel", [-x, -y, z], [x, y, z], [-x, -y, -z],
                      [x, -y, z],
                      shape_id="pixel-shape")
figaro.writeGeom("./ILL/IDF/" + instrumentName.upper() + "_Definition.xml")
       Size 1024 mm x 1024 mm
       Nominal resolution:
            128 x 256
            Pixel size 8 x 4 mm2
       Low resolution:
            128 x 128
            Pixel size 8 x 8 mm2

       For more information, please visit
       https://www.ill.eu/instruments-support/instruments-groups/instruments/d22/characteristics/
       """
d22 = MantidGeom(instrumentName, comment=comment, valid_from=validFrom)
d22.addSnsDefaults()
d22.addComment("SOURCE")
d22.addComponentILL("moderator", 0., 0., moderator_source, "Source")
d22.addComment("Sample position")
d22.addComponentILL("sample_position", 0., 0., 0., "SamplePos")
d22.addComment("MONITORS")
d22.addMonitors(names=["monitor1", "monitor2"], distance=[zMon1, zMon2])
d22.addComment("MONITOR SHAPE")
d22.addComment("FIXME: Do something real here.")
d22.addDummyMonitor(0.01, 0.03)
d22.addComment("MONITOR IDs")
d22.addMonitorIds([repr(100000), repr(100001)])
d22.addComment("DETECTOR")
d22.addComponentRectangularDetector(detector0, 0., 0., zPos, idstart=id0, idfillbyfirst=FF, idstepbyrow=SR)
d22.addRectangularDetector(detector0, pixelName, xstart, xstep, xpixels, ystart, ystep, ypixels)
d22.addComment("PIXEL, EACH PIXEL IS A DETECTOR")
d22.addCuboidPixel(pixelName, [-x, -y, z], [x, y, z], [-x, -y, thickness], [x, -y, z], shape_id="pixel-shape")
d22.writeGeom("./ILL/IDF/" + instrumentName + "_Definition.xml")
示例#7
0
salsa.addComponentILL("monochromator", 0., 0., zSource, "Source")

# Sample is set as the origin
salsa.addComment("Sample position")
salsa.addComponentILL("sample_position", 0., 0., 0., "SamplePos")

salsa.addComment("MONITORS")
salsa.addMonitors(names=["monitor"], distance=[zMonitor])
salsa.addComment("MONITOR SHAPE")
salsa.addDummyMonitor(0.01, 0.01)
salsa.addComment("MONITOR IDs")
salsa.addMonitorIds([repr(256 * 256)])

salsa.addComment("DETECTOR")
salsa.addRectangularDetector(detector0, pixelName, xstart, xstep, xpixels,
                             ystart, ystep, ypixels)
salsa.addComponentRectangularDetector(detector0,
                                      0.,
                                      0.,
                                      zDetector,
                                      idstart=id0,
                                      idfillbyfirst=FF,
                                      idstepbyrow=SR)

salsa.addComment("PIXEL, EACH PIXEL IS A DETECTOR")
salsa.addCuboidPixel(pixelName, [-x, -y, z], [-x, y, z], [-x, -y, -z],
                     [x, -y, -z],
                     shape_id="pixel-shape")

salsa.writeGeom(instrumentName + "_Definition.xml")
示例#8
0
       For more information, please visit
       https://www.ill.eu/instruments-support/instruments-groups/instruments/d17/characteristics/
       """
d17 = MantidGeom(instrumentName, comment=comment, valid_from=validFrom)
d17.addSnsDefaults(theta_sign_axis='x')
d17.addComment("SOURCE")
d17.addComponentILL("chopper1", 0.0, 0.0, chop1_source, "Source")
d17.addComment("Sample position")
d17.addComponentILL("sample_position", 0.0, 0.0, 0.0, "SamplePos")
d17.addComment("MONITORS")
d17.addMonitors(names=["monitor1", "monitor2"], distance=[zMon1, zMon2])
d17.addComment("MONITOR SHAPE")
d17.addComment("FIXME: Do something real here.")
d17.addDummyMonitor(0.01, 0.03)
d17.addComment("MONITOR IDs")
d17.addMonitorIds(["100000", "100001"])
d17.addComment("2 Slits")
d17.addComponentILL("slit2", 0.0, 0.0, slit2Centre)
d17.makeTypeElement("slit2")
d17.addComponentILL("slit3", 0.0, 0.0, slit3Centre)
d17.makeTypeElement("slit3")
d17.addComment("DETECTORS")
d17.addComment("64 TUBES FORM ONE DETECTOR")
d17.addComponentRectangularDetector("detector", 0.0, 0.0, detValue, idstart="1", idfillbyfirst="x",
                                    idstepbyrow="1")
d17.addComment("PIXEL, EACH PIXEL IS A DETECTOR")
d17.addRectangularDetector("detector", "pixel", xstart, xstep, xpixels, ystart, ystep, ypixels)
d17.addCuboidPixel("pixel", [-x, -y, z], [x, y, z], [-x, -y, thickness], [x, -y, z], shape_id="pixel-shape")
d17.writeGeom("./ILL/IDF/" + instrumentName + "_Definition.xml")
d33.addSnsDefaults()
d33.addComment("SOURCE")
d33.addComponentILL("moderator", 0., 0., moderator_source, "Source")
d33.addComment("Sample position")
d33.addComponentILL("sample_position", 0., 0., 0., "SamplePos")
d33.addComment("MONITORS")
d33.addMonitors(names=["monitor1", "monitor2"], distance=[zMon1, zMon2])
d33.addComment("MONITOR SHAPE")
d33.addComment("FIXME: Do something real here.")
d33.addDummyMonitor(0.01, 0.03)
d33.addComment("MONITOR IDs")
d33.addMonitorIds([repr(500000), repr(500001)])
d33.addComment("DETECTORS")
d33.addComponentILL("detector", 0., 0., 0.)
detector = d33.makeTypeElement("detector")
d33.addComponentRectangularDetector(detector0, 0., 0., zPosRear, idstart=id0, idfillbyfirst=FF, idstepbyrow=SR, root=detector)
d33.addComponentILL("front_detector", 0., 0., 0., root=detector)
front_detector = d33.makeTypeElement("front_detector")
d33.addComponentRectangularDetector(detector1, dF+dR, 0., zFront, idstart=id1, idfillbyfirst="x",
                                    idstepbyrow=SRF, rotz=90., roty=180., root=front_detector)
d33.addComponentRectangularDetector(detector2, -dR-dF, 0., zFront, idstart=id2, idfillbyfirst="x",
                                    idstepbyrow=SRF, rotz=90., roty=180., root=front_detector)
d33.addComponentRectangularDetector(detector3, 0., -dF-dR, zFront, idstart=id3, idfillbyfirst=FF, idstepbyrow=SRF, root=front_detector)
d33.addComponentRectangularDetector(detector4, 0., dR+dF, zFront, idstart=id4, idfillbyfirst=FF, idstepbyrow=SRF, root=front_detector)
d33.addComment("REAR DETECTOR")
d33.addRectangularDetector(detector0, pixelName, xstart, xstep, xpixels, ystart, ystep, ypixels)
d33.addComment("4 FRONT DETECTORS, from detector to sample in +Z direction")
d33.addComment("RIGHT")
d33.addRectangularDetector(detector1, pixelName, xstart, xstep, xpixels, startFront, ystep, pixelsFront)
d33.addComment("LEFT")
d33.addRectangularDetector(detector2, pixelName, xstart, xstep, xpixels, startFront, ystep, pixelsFront)
示例#10
0
d11b.addComment("Sample position")
d11b.addComponentILL("sample_position", 0., 0., 0., "SamplePos")
d11b.addComment("MONITORS")
d11b.addMonitors(names=["monitor1", "monitor2"], distance=[zMon1, zMon2])
d11b.addComment("MONITOR SHAPE")
d11b.addDummyMonitor(0.01, 0.03)
d11b.addComment("MONITOR IDs")
d11b.addMonitorIds([repr(100000), repr(100001)])
d11b.addComment("DETECTORS")
d11b.addComponentILL("detector", 0., 0., 0.)
detector = d11b.makeTypeElement("detector")
d11b.addComponentRectangularDetector(detector0,
                                     0.,
                                     0.,
                                     distance,
                                     idstart=id0,
                                     rotz=90.,
                                     idfillbyfirst="x",
                                     idstepbyrow=str(number_of_tubes_center),
                                     root=detector)
d11b.addComponentRectangularDetector(
    detector1,
    0.,
    0.,
    distance - z_gap,
    idstart=id1,
    idfillbyfirst="y",
    idstepbyrow=str(number_of_pixels_per_tube),
    root=detector)
d11b.addComponentRectangularDetector(
    detector2,
       https://www.ill.eu/instruments-support/instruments-groups/instruments/d16/characteristics/
       """


# Instrument creation
d16 = MantidGeom(instrumentName, comment=comment, valid_from=validFrom)
d16.addSnsDefaults(default_view='3D', axis_view_3d='z-', theta_sign_axis="x")

d16.addComment("SOURCE")
d16.addComponentILL("monochromator", 0., 0., monochromator_source, "Source")

# Sample is set as the origin
d16.addComment("Sample position")
d16.addComponentILL("sample_position", 0., 0., 0., "SamplePos")

d16.addComment("MONITORS")
d16.addMonitors(names=["monitor1", "monitor2"], distance=[zMon1, zMon2])
d16.addComment("MONITOR SHAPE")
d16.addDummyMonitor(0.01, 0.01)
d16.addComment("MONITOR IDs")
d16.addMonitorIds([repr(500000), repr(500001)])

d16.addComment("DETECTOR")
d16.addComponentRectangularDetector(detector0, 0., 0., -zPosDetector, idstart=id0, idfillbyfirst=FF, idstepbyrow=SR)
d16.addRectangularDetector(detector0, pixelName, xstart, xstep, xpixels, ystart, ystep, ypixels)

d16.addComment("PIXEL, EACH PIXEL IS A DETECTOR")
d16.addCuboidPixel(pixelName, [-x, -y, thickness/2.], [-x, y, thickness/2.], [-x, -y, -thickness/2.], [x, -y, -thickness/2.], shape_id="pixel-shape")

d16.writeGeom("./ILL/IDF/" + instrumentName + "_Definition.xml")