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")
idstart=id3, idfillbyfirst="x", idstepbyrow=STB, rotz=90., root=front_detector) d33.addComponentRectangularDetector(detector4, 0., dR + dF, zFront, idstart=id4, idfillbyfirst="x", idstepbyrow=STB, rotz=90., root=front_detector) d33.addComment("REAR DETECTOR") d33.addRectangularDetector(detector0, pixel, xstartb, xstepb, xpixelsb, ystartb, ystepb, ypixelsb) d33.addComment("4 FRONT DETECTORS, from detector to sample in +Z direction") d33.addComment("RIGHT") d33.addRectangularDetector(detector1, pixel, xstartlr, xsteplr, xpixelslr, ystartlr, ysteplr, ypixelslr) d33.addComment("LEFT") d33.addRectangularDetector(detector2, pixel, xstartlr, xsteplr, xpixelslr, ystartlr, ysteplr, ypixelslr) d33.addComment("BOTTOM") d33.addRectangularDetector(detector3, pixel, xstarttb, xsteptb, xpixelslr, ystartlr, ysteplr, ypixelslr) d33.addComment("TOP") d33.addRectangularDetector(detector4, pixel, xstarttb, xsteptb, xpixelslr, ystartlr, ysteplr, ypixelslr) d33.addComment("PIXEL, EACH PIXEL IS A DETECTOR") d33.addCuboidPixel(pixel, [-x, -y, thickness / 2.], [-x, y, thickness / 2.],
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")
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")
""" d11 = MantidGeom(instrumentName, comment=comment, valid_from=validFrom) d11.addSnsDefaults(default_view='3D', axis_view_3d='z-') d11.addComment("SOURCE") d11.addComponentILL("moderator", 0., 0., moderator_source, "Source") d11.addComment("Sample position") d11.addComponentILL("sample_position", 0., 0., 0., "SamplePos") d11.addComment("MONITORS") d11.addMonitors(names=["monitor1", "monitor2"], distance=[zMon1, zMon2]) d11.addComment("MONITOR SHAPE") d11.addComment("FIXME: Do something real here.") d11.addDummyMonitor(0.01, 0.03) d11.addComment("MONITOR IDs") d11.addMonitorIds([repr(100000), repr(100001)]) d11.addComment("DETECTOR") d11.addComponentRectangularDetector(detector0, 0., 0., zPos, idstart=id0, idfillbyfirst=FF, idstepbyrow=SR) d11.addRectangularDetector(detector0, pixelName, xstart, xstep, xpixels, ystart, ystep, ypixels) d11.addComment("PIXEL, EACH PIXEL IS A DETECTOR") d11.addCuboidPixel(pixelName, [-x, -y, thickness / 2.], [-x, y, thickness / 2.], [-x, -y, -thickness / 2.], [x, -y, thickness / 2.], shape_id="pixel-shape") d11.writeGeom("./ILL/IDF/" + instrumentName + "_Definition.xml")
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")
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) d33.addComment("BOTTOM") d33.addRectangularDetector(detector3, pixelName, xstart, xstep, xpixels, startFront, ystep, pixelsFront) d33.addComment("TOP") d33.addRectangularDetector(detector4, pixelName, xstart, xstep, xpixels, startFront, ystep, pixelsFront) d33.addComment("PIXEL, EACH PIXEL IS A DETECTOR") d33.addCuboidPixel(pixelName, [-x, -y, z], [x, y, z], [-x, -y, thickness], [x, -y, z], shape_id="pixel-shape") d33.writeGeom("./ILL/IDF/" + instrumentName + "_Definition.xml")
distance - z_gap, idstart=id1, idfillbyfirst="y", idstepbyrow=str(number_of_pixels_per_tube), root=detector) d11b.addComponentRectangularDetector( detector2, 0., 0., distance - z_gap, idstart=id2, idfillbyfirst="y", idstepbyrow=str(number_of_pixels_per_tube), root=detector) d11b.addComment("CENTER DETECTOR") d11b.addRectangularDetector(detector0, pixel_center, xstart, xstep, xpixels, ystart, ystep, ypixels) d11b.addComment("LEFT") d11b.addRectangularDetector(detector1, pixel_panels, xstart_left, xstep_left, xpixels_left, ystart_left, ystep_left, ypixels_left) d11b.addComment("RIGHT") d11b.addRectangularDetector(detector2, pixel_panels, xstart_right, xstep_right, xpixels_right, ystart_right, ystep_right, ypixels_right) # here x and y are swapped x = center_pixel_x y = center_pixel_y d11b.addCuboidPixel(pixel_center, [-x, -y, thickness / 2.], [-x, y, thickness / 2.], [-x, -y, -thickness / 2.], [x, -y, -thickness / 2.], shape_id=pixel_center)