public override void OnInspectorGUI() { MMConfig config = (MMConfig)target; base.OnInspectorGUI(); if (GUILayout.Button("Lol")) { config.CreateEnum("IgnoreTags", config.ignoreTags); config.CreateEnum("FavourTags", config.favourTags); } }
public DecelerationHardware() { // YAG laser yag = new MiniliteLaser(); // add the boards Boards.Add("daq", "/dev2"); Boards.Add("multiDAQ", "/dev1"); Boards.Add("pg", "/dev1"); Boards.Add("aoBoard", "/PXI1Slot5"); Boards.Add("usbDev", "/dev4"); //Boards.Add("PXI6", "/PXI1Slot6_4"); Boards.Add("PXI6", "/PXI1Slot6"); Boards.Add("PXI4", "/PXI1Slot4"); Boards.Add("PXI5", "/PXI1Slot5"); string pgBoard = (string)Boards["pg"]; string usbBoard = (string)Boards["usbDev"]; string daqBoard = (string)Boards["daq"]; string PXIBoard = (string)Boards["PXI6"]; string TCLBoard = (string)Boards["PXI4"]; string TCLBoard2 = (string)Boards["PXI6"]; string aoBoard = (string)Boards["aoBoard"]; //configure instance 1 of transfer cavity lock TCLConfig tcl1 = new TCLConfig("Hamish McCavity"); tcl1.AddLaser("v00cooling", "p1"); tcl1.AddLaser("v10repump", "p2"); tcl1.AddLaser("eylsa", "p3"); tcl1.Trigger = TCLBoard + "/PFI0"; tcl1.Cavity = "cavity"; tcl1.MasterLaser = "master"; tcl1.Ramp = "rampfb"; tcl1.TCPChannel = 1190; Info.Add("Hamish", tcl1); //configure instance 2 of transfer cavity lock TCLConfig tcl2 = new TCLConfig("Carlos the Cavity"); tcl2.AddLaser("v21repump", "p12"); tcl2.AddLaser("v32repump", "p22"); tcl2.Trigger = TCLBoard2 + "/PFI0"; tcl2.Cavity = "cavity2"; tcl2.MasterLaser = "master2"; tcl2.Ramp = "rampfb2"; tcl2.TCPChannel = 1191; Info.Add("Carlos", tcl2); //MotMaster configuration MMConfig mmConfig = new MMConfig(false, false, false, false); mmConfig.ExternalFilePattern = "*.tif"; Info.Add("MotMasterConfiguration", mmConfig); Instruments.Add("synth", new HP8673BSynth("GPIB0::19::INSTR")); //Instruments.Add("counter", new HP5350BCounter("GPIB0::14::INSTR")); //Instruments.Add("flowmeter", new FlowMeter("ASRL1::INSTR")); //VCO lock //AddAnalogOutputChannel("VCO_Out", PXIBoard + "/ao12", 0.0, 10.0); // add things to the info Info.Add("PGClockLine", Boards["pg"] + "/PFI2"); Info.Add("PatternGeneratorBoard", pgBoard); Info.Add("PGType", "dedicated"); Info.Add("AOPatternTrigger", aoBoard + "/PFI0"); Info.Add("defaultTOFRange", new double[] {4000, 12000}); // these entries are the two ends of the range for the upper TOF graph Info.Add("defaultTOF2Range", new double[] { 0, 1000 }); // these entries are the two ends of the range for the middle TOF graph Info.Add("defaultGate", new double[] { 6000, 2000 }); // the first entry is the centre of the gate, the second is the half width of the gate (upper TOF graph) // the analog triggers Info.Add("analogTrigger0", (string)Boards["daq"] + "/PFI0");// pin 11 Info.Add("analogTrigger1", (string)Boards["daq"] + "/PFI1");// pin 10 //Info.Add("TCLTrigger", (string)Boards["PXI4"] + "/PFI0"); //Info.Add("analogTrigger2", (string)Boards["usbDev"] + "/PFI0"); //Pin 29 Info.Add("analogTrigger3", (string)Boards["daq"] + "/PFI6"); //Pin 5 - breakout 31 Info.Add("usbAnalogTrigger", usbBoard + "/PFI0"); //distance information Info.Add("sourceToDetect", 0.535); //in m Info.Add("sourceToSoftwareDecelerator", 0.12); //in m //information about the molecule Info.Add("molecule", "caf"); Info.Add("Element", "CaF"); Info.Add("moleculeMass", 58.961); // this is 40CaF in atomic mass units Info.Add("moleculeRotationalConstant", 1.02675E10); //in Hz Info.Add("moleculeDipoleMoment", 15400.0); //in Hz/(V/m) //information about the decelerator //These settings for WF Info.Add("deceleratorStructure", DecelerationConfig.DecelerationExperiment.SwitchStructure.V_H); //Vertical first Info.Add("deceleratorLensSpacing", 0.006); Info.Add("deceleratorFieldMap", "RodLayout3_EonAxis.dat"); Info.Add("mapPoints", 121); Info.Add("mapStartPoint", 0.0); Info.Add("mapResolution", 0.0001); // These settings for AG // Info.Add("deceleratorStructure", DecelerationConfig.DecelerationExperiment.SwitchStructure.H_V); //Horizontal first // Info.Add("deceleratorLensSpacing", 0.024); // Info.Add("deceleratorFieldMap", "Section1v1_onAxisFieldTemplate.dat"); // Info.Add("mapPoints", 481); // Info.Add("mapStartPoint", 0.0); // Info.Add("mapResolution", 0.0001); //Here are constants for 174YbF for future reference //Info.Add("molecule", "ybf"); //Info.Add("moleculeMass", 192.937); // this is 174YbF in atomic mass units //Info.Add("moleculeRotationalConstant", 7.2338E9); //in Hz //Info.Add("moleculeDipoleMoment", 19700.0); //in Hz/(V/m) // map the digital channels AddDigitalOutputChannel("valve", pgBoard, 0, 6); AddDigitalOutputChannel("tclBlock", pgBoard, 0, 6); //Same as valve; deliberately! AddDigitalOutputChannel("flash", pgBoard, 0, 0);//Changed from pg board P.0.5 because that appears to have died mysteriously (line dead in ribbon cable?) TEW 06/04/09 AddDigitalOutputChannel("q", pgBoard, 0,2 ); AddDigitalOutputChannel("chirpTrigger", pgBoard, 1, 0); AddDigitalOutputChannel("detector", pgBoard, 3, 7); AddDigitalOutputChannel("detectorprime", pgBoard, 3, 6); AddDigitalOutputChannel("aom", pgBoard, 2, 1);//Same channel as "ttl2" as used by the AomLevelControlPlugin. Now commented out. AddDigitalOutputChannel("aom2", pgBoard, 1, 6); // Pin 21 of PG board. Output 31 of front panel AddDigitalOutputChannel("ttlSwitch", pgBoard, 2,2); // This is the output that the pg will switch if it's switch scanning. //AddDigitalOutputChannel("digitalSwitchChannel", pgBoard, 2, 2); AddDigitalOutputChannel("motAOM", pgBoard, 1, 1); //Pin 17 AddDigitalOutputChannel("motRampTrigger", pgBoard, 1, 2); //Pin 51 AddDigitalOutputChannel("bTrigger", pgBoard, 1, 3); //Pin 52 AddDigitalOutputChannel("cameraTrigger", pgBoard, 0, 4); // Pin 13 AddDigitalOutputChannel("AnalogPatternTrigger", pgBoard, 3, 3); //Pin 31 // map the analog channels AddAnalogInputChannel("pmt", daqBoard + "/ai0", AITerminalConfiguration.Rse); AddAnalogInputChannel("pmt2", daqBoard + "/ai1", AITerminalConfiguration.Rse); AddAnalogInputChannel("refcavity", daqBoard + "/ai1", AITerminalConfiguration.Rse); AddAnalogInputChannel("lockcavity", daqBoard + "/ai2", AITerminalConfiguration.Rse); AddAnalogInputChannel("master", TCLBoard + "/ai1", AITerminalConfiguration.Rse); AddAnalogInputChannel("cavity", TCLBoard + "/ai15", AITerminalConfiguration.Rse); AddAnalogInputChannel("p1", TCLBoard + "/ai3", AITerminalConfiguration.Rse); AddAnalogInputChannel("p2", TCLBoard + "/ai10", AITerminalConfiguration.Rse); AddAnalogInputChannel("p3", TCLBoard + "/ai4", AITerminalConfiguration.Rse); AddAnalogOutputChannel("v10repump", TCLBoard + "/ao0"); AddAnalogOutputChannel("rampfb", TCLBoard + "/ao1"); AddAnalogOutputChannel("v00cooling", TCLBoard2 + "/ao2"); AddAnalogOutputChannel("eylsa", TCLBoard2 + "/ao3"); AddAnalogOutputChannel("slowingChirp", aoBoard + "/ao8"); AddAnalogOutputChannel("v0IntensityRamp", aoBoard + "/ao9"); //second cavity AddAnalogInputChannel("master2", TCLBoard2 + "/ai0", AITerminalConfiguration.Rse); AddAnalogInputChannel("cavity2", TCLBoard2 + "/ai4", AITerminalConfiguration.Rse); AddAnalogInputChannel("p12", TCLBoard2 + "/ai1", AITerminalConfiguration.Rse); AddAnalogInputChannel("p22", TCLBoard2 + "/ai2", AITerminalConfiguration.Rse); AddAnalogOutputChannel("v21repump", TCLBoard2 + "/ao0"); AddAnalogOutputChannel("v32repump", usbBoard + "/ao0", 0 , 5); AddAnalogOutputChannel("rampfb2", TCLBoard2 + "/ao1"); // map the counter channels AddCounterChannel("pmt", daqBoard + "/ctr0"); AddCounterChannel("sample clock", daqBoard + "/ctr1"); //map the monitoring source chamber in deceleration hardware AddAnalogInputChannel("RoughVacuum", PXIBoard + "/ai0", AITerminalConfiguration.Rse); AddAnalogInputChannel("PressureSourceChamber", PXIBoard + "/ai1", AITerminalConfiguration.Rse); AddAnalogInputChannel("VoltageReference", PXIBoard + "/ai2", AITerminalConfiguration.Rse); AddAnalogInputChannel("10KThermistor30KPlate", PXIBoard + "/ai3", AITerminalConfiguration.Rse); AddAnalogInputChannel("30KShield", PXIBoard + "/ai4", AITerminalConfiguration.Rse); AddAnalogInputChannel("4KCell", PXIBoard + "/ai5", AITerminalConfiguration.Rse); //map the channels to monitor the sidebands in deceleration hardware AddAnalogInputChannel("cavityVoltage", usbBoard + "/ai0", AITerminalConfiguration.Rse); AddAnalogInputChannel("mot606", usbBoard + "/ai1", AITerminalConfiguration.Rse); AddAnalogInputChannel("mot628V1", usbBoard + "/ai2", AITerminalConfiguration.Rse); AddAnalogInputChannel("mot628V2", usbBoard + "/ai3", AITerminalConfiguration.Rse); //AddAnalogInputChannel("mot628V3", usbBoard + "/ai4", AITerminalConfiguration.Rse); AddAnalogInputChannel("slowing531", usbBoard + "/ai4", AITerminalConfiguration.Rse); AddAnalogInputChannel("slowing628V1", usbBoard + "/ai7", AITerminalConfiguration.Rse); //analog output channels controlled by the hardware controller and/or MOTMaster AddAnalogOutputChannel("motAOMFreq", aoBoard + "/ao10"); AddAnalogOutputChannel("motAOMAmp", aoBoard + "/ao11"); AddCalibration("motAOMFreq", new PolynomialCalibration(new double[] { -9.7727, 0.16604, -0.0000272 }, 70, 130)); //this is a quadratic fit to the manufacturer's data for a POS-150 AddCalibration("motAOMAmp", new LinearCalibration(1, 0, 0, -10, 10)); // needs calibrating }
public MoleculeMOTHardware() { //Boards string digitalPatternBoardName = "digitalPattern"; string digitalPatternBoardAddress = "/Dev1"; Boards.Add(digitalPatternBoardName, digitalPatternBoardAddress); string analogPatternBoardName = "analogPattern"; string analogPatternBoardAddress = "/PXI1Slot2"; //7 Boards.Add(analogPatternBoardName, analogPatternBoardAddress); string tclBoard1Name = "tclBoard1"; string tclBoard1Address = "/PXI1Slot3"; Boards.Add(tclBoard1Name, tclBoard1Address); string tclBoard2Name = "tclBoard2"; string tclBoard2Address = "/PXI1Slot8"; Boards.Add(tclBoard2Name, tclBoard2Address); string tclBoard3Name = "tclBoard3"; string tclBoard3Address = "/PXI1Slot6"; Boards.Add(tclBoard3Name, tclBoard3Address); string usbBoard1Name = "usbBoard1"; string usbBoard1Address = "/Dev2"; Boards.Add(usbBoard1Name, usbBoard1Address); string usbBoard2Name = "usbBoard2"; string usbBoard2Address = "/Dev3"; Boards.Add(usbBoard2Name, usbBoard2Address); string digitalPatternBoardName2 = "digitalPattern2"; string digitalPatternBoardAddress2 = "/PXI1Slot4"; Boards.Add(digitalPatternBoardName2, digitalPatternBoardAddress2); // Channel Declarations AddAnalogInputChannel("ramp", tclBoard1Address + "/ai4", AITerminalConfiguration.Rse); // Hamish AddAnalogInputChannel("v00PD", tclBoard1Address + "/ai0", AITerminalConfiguration.Rse); AddAnalogInputChannel("v10PD", tclBoard1Address + "/ai1", AITerminalConfiguration.Rse); AddAnalogInputChannel("bXPD", tclBoard1Address + "/ai2", AITerminalConfiguration.Rse); AddDigitalInputChannel("bXLockBlockFlag", tclBoard1Address, 0, 0); AddDigitalInputChannel("v00LockBlockFlag", tclBoard1Address, 0, 1); AddAnalogInputChannel("refPDHamish", tclBoard1Address + "/ai3", AITerminalConfiguration.Rse); AddAnalogOutputChannel("v00Lock", tclBoard1Address + "/ao0"); AddAnalogOutputChannel("v10Lock", tclBoard1Address + "/ao1"); AddAnalogOutputChannel("bXLock", tclBoard3Address + "/ao2"); AddAnalogOutputChannel("cavityLockHamish", tclBoard3Address + "/ao3"); // Carlos AddAnalogInputChannel("v21PD", tclBoard1Address + "/ai5", AITerminalConfiguration.Rse); AddAnalogInputChannel("v32PD", tclBoard1Address + "/ai6", AITerminalConfiguration.Rse); AddAnalogInputChannel("refPDCarlos", tclBoard1Address + "/ai7", AITerminalConfiguration.Rse); AddAnalogOutputChannel("v21Lock", tclBoard2Address + "/ao0"); AddAnalogOutputChannel("v32Lock", usbBoard1Address + "/ao0", 0, 5); AddAnalogOutputChannel("cavityLockCarlos", tclBoard2Address + "/ao1"); // Digital Pattern AddDigitalOutputChannel("flashLamp", digitalPatternBoardAddress, 0, 0); AddDigitalOutputChannel("qSwitch", digitalPatternBoardAddress, 0, 1); AddDigitalOutputChannel("bXSlowingAOM", digitalPatternBoardAddress, 0, 2); AddDigitalOutputChannel("v00MOTAOM", digitalPatternBoardAddress, 0, 3); AddDigitalOutputChannel("v10SlowingAOM", digitalPatternBoardAddress, 0, 4); AddDigitalOutputChannel("microwaveA", digitalPatternBoardAddress, 0, 5); AddDigitalOutputChannel("microwaveB", digitalPatternBoardAddress, 0, 6); AddDigitalOutputChannel("cameraTrigger", digitalPatternBoardAddress, 0, 7); AddDigitalOutputChannel("cameraTrigger2", digitalPatternBoardAddress, 1, 7); AddDigitalOutputChannel("aoPatternTrigger", digitalPatternBoardAddress, 1, 0); AddDigitalOutputChannel("v00MOTShutter", digitalPatternBoardAddress, 1, 1); AddDigitalOutputChannel("bXSlowingShutter", digitalPatternBoardAddress, 1, 2); AddDigitalOutputChannel("bXLockBlock", digitalPatternBoardAddress, 1, 3); AddDigitalOutputChannel("v00LockBlock", digitalPatternBoardAddress, 2, 1); AddDigitalOutputChannel("topCoilDirection", digitalPatternBoardAddress, 1, 4); AddDigitalOutputChannel("bottomCoilDirection", digitalPatternBoardAddress, 1, 5); AddDigitalOutputChannel("rbCoolingAOM", digitalPatternBoardAddress, 1, 6); AddDigitalOutputChannel("v00Sidebands", digitalPatternBoardAddress, 2, 0); AddDigitalOutputChannel("heliumShutter", digitalPatternBoardAddress, 2, 2); AddDigitalOutputChannel("microwaveC", digitalPatternBoardAddress, 3, 2); // Rb Digital Pattern AddDigitalOutputChannel("rbPushBeam", digitalPatternBoardAddress, 1, 6); AddDigitalOutputChannel("rbOpticalPumpingAOM", digitalPatternBoardAddress, 2, 3); AddDigitalOutputChannel("rbAbsImagingBeam", digitalPatternBoardAddress, 2, 5); AddDigitalOutputChannel("rbRepump", digitalPatternBoardAddress, 2, 6); AddDigitalOutputChannel("rb2DCooling", digitalPatternBoardAddress, 2, 7); AddDigitalOutputChannel("rb3DCooling", digitalPatternBoardAddress, 3, 0); AddDigitalOutputChannel("rbAbsImgCamTrig", digitalPatternBoardAddress, 3, 1); // Rb shutters AddDigitalOutputChannel("rb3DMOTShutter", digitalPatternBoardAddress, 2, 4); AddDigitalOutputChannel("rb2DMOTShutter", digitalPatternBoardAddress, 3, 5); //AddDigitalOutputChannel("rbspeedbumpCoilsBamAbsorptionShutter", digitalPatternBoardAddress, 3, 6); AddDigitalOutputChannel("rbPushBamAbsorptionShutter", digitalPatternBoardAddress, 3, 6); AddDigitalOutputChannel("rbOPShutter", digitalPatternBoardAddress, 3, 7); AddDigitalOutputChannel("dipoleTrapAOM", digitalPatternBoardAddress, 3, 3); // tweezer new digital pattern board AddDigitalOutputChannel("test00", digitalPatternBoardAddress2, 0, 0); // Analog Pattern AddAnalogOutputChannel("slowingChirp", analogPatternBoardAddress + "/ao8"); AddAnalogOutputChannel("v00Intensity", analogPatternBoardAddress + "/ao9"); AddAnalogOutputChannel("v00EOMAmp", analogPatternBoardAddress + "/ao11"); AddAnalogOutputChannel("v00Frequency", analogPatternBoardAddress + "/ao12"); AddAnalogOutputChannel("MOTCoilsCurrent", analogPatternBoardAddress + "/ao13"); //13 //AddAnalogOutputChannel("triggerDelay", analogPatternBoardAddress + "/ao15"); AddAnalogOutputChannel("xShimCoilCurrent", analogPatternBoardAddress + "/ao17"); AddAnalogOutputChannel("yShimCoilCurrent", analogPatternBoardAddress + "/ao16"); AddAnalogOutputChannel("zShimCoilCurrent", analogPatternBoardAddress + "/ao21"); AddAnalogOutputChannel("slowingCoilsCurrent", analogPatternBoardAddress + "/ao18"); AddAnalogOutputChannel("v00Chirp", analogPatternBoardAddress + "/ao22"); AddAnalogOutputChannel("topCoilShunt", analogPatternBoardAddress + "/ao26"); // Old Rb Analog Pattern AddAnalogOutputChannel("rbCoolingIntensity", analogPatternBoardAddress + "/ao23"); // from old setup AddAnalogOutputChannel("rbCoolingFrequency", analogPatternBoardAddress + "/ao24"); // TTL in? // New Rb AddAnalogOutputChannel("rb3DCoolingFrequency", analogPatternBoardAddress + "/ao1"); AddAnalogOutputChannel("rbRepumpFrequency", analogPatternBoardAddress + "/ao3"); AddAnalogOutputChannel("rbAbsImagingFrequency", analogPatternBoardAddress + "/ao4"); AddAnalogOutputChannel("rb3DCoolingAttenuation", analogPatternBoardAddress + "/ao0"); AddAnalogOutputChannel("rbRepumpAttenuation", analogPatternBoardAddress + "/ao5"); AddAnalogOutputChannel("rbOffsetLock", analogPatternBoardAddress + "/ao15"); // Transfer coil AddAnalogOutputChannel("transferCoils", analogPatternBoardAddress + "/ao6"); AddAnalogOutputChannel("transferCoilsShunt1", analogPatternBoardAddress + "/ao7"); AddAnalogOutputChannel("transferCoilsShunt2", analogPatternBoardAddress + "/ao27"); // Tweezer MOT coils AddAnalogOutputChannel("speedbumpCoils", analogPatternBoardAddress + "/ao20"); AddAnalogOutputChannel("DipoleTrapLaserControl", analogPatternBoardAddress + "/ao29"); AddAnalogOutputChannel("TweezerMOTCoils", analogPatternBoardAddress + "/ao28"); // Source AddDigitalOutputChannel("cryoCooler", usbBoard2Address, 0, 0); AddDigitalOutputChannel("sourceHeater", usbBoard2Address, 0, 1); AddAnalogInputChannel("sourceTemp", usbBoard2Address + "/ai0", AITerminalConfiguration.Rse); AddAnalogInputChannel("sf6Temp", tclBoard2Address + "/ai0", AITerminalConfiguration.Rse); // TCL Config //TCLConfig tcl1 = new TCLConfig("Hamish"); //tcl1.AddLaser("v00Lock", "v00PD"); //tcl1.AddLaser("v10Lock", "v10PD"); //tcl1.AddLaser("bXLock", "bXPD"); //tcl1.Trigger = tclBoard1Address + "/PFI0"; //tcl1.Cavity = "rampHamish"; //tcl1.MasterLaser = "refPDHamish"; //tcl1.Ramp = "cavityLockHamish"; //tcl1.TCPChannel = 1190; //tcl1.AddDefaultGain("Master", 1.0); //tcl1.AddDefaultGain("v00Lock", 2); //tcl1.AddDefaultGain("v10Lock", 0.5); //tcl1.AddDefaultGain("bXLock", -2); //tcl1.AddFSRCalibration("v00Lock", 3.95); //This is an approximate guess //tcl1.AddFSRCalibration("v10Lock", 4.15); //tcl1.AddFSRCalibration("bXLock", 3.9); //tcl1.DefaultScanPoints = 850; //tcl1.PointsToConsiderEitherSideOfPeakInFWHMs = 3; //Info.Add("Hamish", tcl1); //TCLConfig tcl2 = new TCLConfig("Carlos"); //tcl2.AddLaser("v21Lock", "v21PD"); //tcl2.AddLaser("v32Lock", "v32PD"); //tcl2.Trigger = tclBoard2Address + "/PFI0"; //tcl2.Cavity = "rampCarlos"; //tcl2.MasterLaser = "refPDCarlos"; //tcl2.Ramp = "cavityLockCarlos"; //tcl2.TCPChannel = 1191; //tcl2.AddDefaultGain("Master", 1.0); //tcl2.AddDefaultGain("v21Lock", -0.4); //tcl2.AddDefaultGain("v32Lock", 0.2); //tcl2.AddFSRCalibration("v21Lock", 3.7); //This is an approximate guess //tcl2.AddFSRCalibration("v32Lock", 3.7); //tcl2.DefaultScanPoints = 900; //tcl2.PointsToConsiderEitherSideOfPeakInFWHMs = 3; //Info.Add("Carlos", tcl2); TCLConfig tclConfig = new TCLConfig("Hamish & Carlos"); tclConfig.Trigger = tclBoard1Address + "/PFI0"; tclConfig.BaseRamp = "ramp"; tclConfig.TCPChannel = 1190; tclConfig.DefaultScanPoints = 1000; tclConfig.PointsToConsiderEitherSideOfPeakInFWHMs = 4; tclConfig.AnalogSampleRate = 62000; string hamish = "Hamish"; string carlos = "Carlos"; tclConfig.AddCavity(hamish); tclConfig.Cavities[hamish].AddSlaveLaser("v00Lock", "v00PD"); tclConfig.Cavities[hamish].AddLockBlocker("v00Lock", "v00LockBlockFlag"); tclConfig.Cavities[hamish].AddSlaveLaser("v10Lock", "v10PD"); tclConfig.Cavities[hamish].AddSlaveLaser("bXLock", "bXPD"); tclConfig.Cavities[hamish].AddLockBlocker("bXLock", "bXLockBlockFlag"); tclConfig.Cavities[hamish].MasterLaser = "refPDHamish"; tclConfig.Cavities[hamish].RampOffset = "cavityLockHamish"; tclConfig.Cavities[hamish].AddDefaultGain("Master", 1.0); tclConfig.Cavities[hamish].AddDefaultGain("v00Lock", 2); tclConfig.Cavities[hamish].AddDefaultGain("v10Lock", 0.5); tclConfig.Cavities[hamish].AddDefaultGain("bXLock", -2); tclConfig.Cavities[hamish].AddFSRCalibration("v00Lock", 3.95); //This is an approximate guess tclConfig.Cavities[hamish].AddFSRCalibration("v10Lock", 4.15); tclConfig.Cavities[hamish].AddFSRCalibration("bXLock", 3.9); tclConfig.AddCavity(carlos); tclConfig.Cavities[carlos].AddSlaveLaser("v21Lock", "v21PD"); tclConfig.Cavities[carlos].AddSlaveLaser("v32Lock", "v32PD"); tclConfig.Cavities[carlos].MasterLaser = "refPDCarlos"; tclConfig.Cavities[carlos].RampOffset = "cavityLockCarlos"; tclConfig.Cavities[carlos].AddDefaultGain("Master", 1.0); tclConfig.Cavities[carlos].AddDefaultGain("v21Lock", -0.2); tclConfig.Cavities[carlos].AddDefaultGain("v32Lock", 1.0); tclConfig.Cavities[carlos].AddFSRCalibration("v21Lock", 3.7); //This is an approximate guess tclConfig.Cavities[carlos].AddFSRCalibration("v32Lock", 3.7); Info.Add("TCLConfig", tclConfig); // MOTMaster configuration MMConfig mmConfig = new MMConfig(false, false, true, false); mmConfig.ExternalFilePattern = "*.tif"; Info.Add("MotMasterConfiguration", mmConfig); Info.Add("AOPatternTrigger", analogPatternBoardAddress + "/PFI4"); //PFI6 Info.Add("PatternGeneratorBoard", digitalPatternBoardAddress); Info.Add("PGType", "dedicated"); Info.Add("Element", "CaF"); //Info.Add("PGTrigger", Boards["pg"] + "/PFI2"); // trigger from "cryocooler sync" box, delay controlled from "triggerDelay" analog output // ScanMaster configuration //Info.Add("defaultTOFRange", new double[] { 4000, 12000 }); // these entries are the two ends of the range for the upper TOF graph //Info.Add("defaultTOF2Range", new double[] { 0, 1000 }); // these entries are the two ends of the range for the middle TOF graph //Info.Add("defaultGate", new double[] { 6000, 2000 }); // the first entry is the centre of the gate, the second is the half width of the gate (upper TOF graph) // Instruments Instruments.Add("windfreak", new WindfreakSynth("ASRL8::INSTR")); Instruments.Add("gigatronics 1", new Gigatronics7100Synth("GPIB0::19::INSTR")); Instruments.Add("gigatronics 2", new Gigatronics7100Synth("GPIB0::6::INSTR")); // Calibrations //AddCalibration("freqToVoltage", new PolynomialCalibration(new double[] { -9.7727, 0.16604, -0.0000272 }, 70, 130)); //this is a quadratic fit to the manufacturer's data for a POS-150 //AddCalibration("motAOMAmp", new PolynomialCalibration(new double[] {6.2871, -0.5907, -0.0706, -0.0088, -0.0004}, -12, 4)); // this is a polynomial fit (up to quartic) to measured behaviour }
public DecelerationHardware() { // YAG laser yag = new MiniliteLaser(); // add the boards Boards.Add("daq", "/dev2"); Boards.Add("multiDAQ", "/dev1"); Boards.Add("pg", "/dev1"); Boards.Add("aoBoard", "/PXI1Slot5"); Boards.Add("usbDev", "/dev4"); //Boards.Add("PXI6", "/PXI1Slot6_4"); Boards.Add("PXI6", "/PXI1Slot6"); Boards.Add("PXI4", "/PXI1Slot4"); Boards.Add("PXI5", "/PXI1Slot5"); string pgBoard = (string)Boards["pg"]; string usbBoard = (string)Boards["usbDev"]; string daqBoard = (string)Boards["daq"]; string PXIBoard = (string)Boards["PXI6"]; string TCLBoard = (string)Boards["PXI4"]; string TCLBoard2 = (string)Boards["PXI6"]; string aoBoard = (string)Boards["aoBoard"]; //configure instance 1 of transfer cavity lock TCLConfig tcl1 = new TCLConfig("Hamish McCavity"); tcl1.AddLaser("v00cooling", "p1"); tcl1.AddLaser("v10repump", "p2"); tcl1.AddLaser("eylsa", "p3"); tcl1.Trigger = TCLBoard + "/PFI0"; tcl1.Cavity = "cavity"; tcl1.MasterLaser = "master"; tcl1.Ramp = "rampfb"; tcl1.TCPChannel = 1190; Info.Add("Hamish", tcl1); //configure instance 2 of transfer cavity lock TCLConfig tcl2 = new TCLConfig("Carlos the Cavity"); tcl2.AddLaser("v21repump", "p12"); tcl2.AddLaser("v32repump", "p22"); tcl2.Trigger = TCLBoard2 + "/PFI0"; tcl2.Cavity = "cavity2"; tcl2.MasterLaser = "master2"; tcl2.Ramp = "rampfb2"; tcl2.TCPChannel = 1191; Info.Add("Carlos", tcl2); //MotMaster configuration MMConfig mmConfig = new MMConfig(false, false, false, false); mmConfig.ExternalFilePattern = "*.tif"; Info.Add("MotMasterConfiguration", mmConfig); Instruments.Add("synth", new HP8673BSynth("GPIB0::19::INSTR")); //Instruments.Add("counter", new HP5350BCounter("GPIB0::14::INSTR")); //Instruments.Add("flowmeter", new FlowMeter("ASRL1::INSTR")); //VCO lock //AddAnalogOutputChannel("VCO_Out", PXIBoard + "/ao12", 0.0, 10.0); // add things to the info Info.Add("PGTrigger", Boards["pg"] + "/PFI2"); // trigger from "cryocooler sync" box, delay controlled from "triggerDelay" analog output //Info.Add("PGClockLine", Boards["pg"] + "/PFI2"); Info.Add("PatternGeneratorBoard", pgBoard); Info.Add("PGType", "dedicated"); Info.Add("AOPatternTrigger", aoBoard + "/PFI0"); Info.Add("defaultTOFRange", new double[] { 4000, 12000 }); // these entries are the two ends of the range for the upper TOF graph Info.Add("defaultTOF2Range", new double[] { 0, 1000 }); // these entries are the two ends of the range for the middle TOF graph Info.Add("defaultGate", new double[] { 6000, 2000 }); // the first entry is the centre of the gate, the second is the half width of the gate (upper TOF graph) // the analog triggers Info.Add("analogTrigger0", (string)Boards["daq"] + "/PFI0"); // pin 11 Info.Add("analogTrigger1", (string)Boards["daq"] + "/PFI1"); // pin 10 //Info.Add("TCLTrigger", (string)Boards["PXI4"] + "/PFI0"); //Info.Add("analogTrigger2", (string)Boards["usbDev"] + "/PFI0"); //Pin 29 Info.Add("analogTrigger3", (string)Boards["daq"] + "/PFI6"); //Pin 5 - breakout 31 Info.Add("usbAnalogTrigger", usbBoard + "/PFI0"); //distance information Info.Add("sourceToDetect", 0.535); //in m Info.Add("sourceToSoftwareDecelerator", 0.12); //in m //information about the molecule Info.Add("molecule", "caf"); Info.Add("Element", "CaF"); Info.Add("moleculeMass", 58.961); // this is 40CaF in atomic mass units Info.Add("moleculeRotationalConstant", 1.02675E10); //in Hz Info.Add("moleculeDipoleMoment", 15400.0); //in Hz/(V/m) //information about the decelerator //These settings for WF Info.Add("deceleratorStructure", DecelerationConfig.DecelerationExperiment.SwitchStructure.V_H); //Vertical first Info.Add("deceleratorLensSpacing", 0.006); Info.Add("deceleratorFieldMap", "RodLayout3_EonAxis.dat"); Info.Add("mapPoints", 121); Info.Add("mapStartPoint", 0.0); Info.Add("mapResolution", 0.0001); // These settings for AG // Info.Add("deceleratorStructure", DecelerationConfig.DecelerationExperiment.SwitchStructure.H_V); //Horizontal first // Info.Add("deceleratorLensSpacing", 0.024); // Info.Add("deceleratorFieldMap", "Section1v1_onAxisFieldTemplate.dat"); // Info.Add("mapPoints", 481); // Info.Add("mapStartPoint", 0.0); // Info.Add("mapResolution", 0.0001); //Here are constants for 174YbF for future reference //Info.Add("molecule", "ybf"); //Info.Add("moleculeMass", 192.937); // this is 174YbF in atomic mass units //Info.Add("moleculeRotationalConstant", 7.2338E9); //in Hz //Info.Add("moleculeDipoleMoment", 19700.0); //in Hz/(V/m) // map the digital channels AddDigitalOutputChannel("valve", pgBoard, 0, 6); AddDigitalOutputChannel("tclBlock", pgBoard, 0, 6); //Same as valve; deliberately! AddDigitalOutputChannel("flash", pgBoard, 0, 0); //Changed from pg board P.0.5 because that appears to have died mysteriously (line dead in ribbon cable?) TEW 06/04/09 AddDigitalOutputChannel("q", pgBoard, 0, 2); AddDigitalOutputChannel("chirpTrigger", pgBoard, 1, 0); AddDigitalOutputChannel("detector", pgBoard, 3, 7); AddDigitalOutputChannel("detectorprime", pgBoard, 3, 6); AddDigitalOutputChannel("aom", pgBoard, 2, 1); //Same channel as "ttl2" as used by the AomLevelControlPlugin. Now commented out. AddDigitalOutputChannel("aom2", pgBoard, 1, 6); // Pin 21 of PG board. Output 31 of front panel AddDigitalOutputChannel("v00Shutter", pgBoard, 2, 2); //AddDigitalOutputChannel("digitalSwitchChannel", pgBoard, 2, 2); AddDigitalOutputChannel("v00AOM", pgBoard, 1, 1); //Pin 17 AddDigitalOutputChannel("shimCoilSwitch", pgBoard, 1, 2); //Pin 51 AddDigitalOutputChannel("bXShutter", pgBoard, 1, 3); //Pin 52 AddDigitalOutputChannel("cameraTrigger", pgBoard, 0, 4); // Pin 13 AddDigitalOutputChannel("AnalogPatternTrigger", pgBoard, 3, 3); //Pin 31 // map the analog channels AddAnalogInputChannel("pmt", daqBoard + "/ai0", AITerminalConfiguration.Rse); AddAnalogInputChannel("pmt2", daqBoard + "/ai1", AITerminalConfiguration.Rse); AddAnalogInputChannel("refcavity", daqBoard + "/ai1", AITerminalConfiguration.Rse); AddAnalogInputChannel("lockcavity", daqBoard + "/ai2", AITerminalConfiguration.Rse); AddAnalogInputChannel("master", TCLBoard + "/ai1", AITerminalConfiguration.Rse); AddAnalogInputChannel("cavity", TCLBoard + "/ai15", AITerminalConfiguration.Rse); AddAnalogInputChannel("p1", TCLBoard + "/ai3", AITerminalConfiguration.Rse); AddAnalogInputChannel("p2", TCLBoard + "/ai10", AITerminalConfiguration.Rse); AddAnalogInputChannel("p3", TCLBoard + "/ai4", AITerminalConfiguration.Rse); AddAnalogOutputChannel("v10repump", TCLBoard + "/ao0"); AddAnalogOutputChannel("rampfb", TCLBoard + "/ao1"); AddAnalogOutputChannel("v00cooling", TCLBoard2 + "/ao2"); AddAnalogOutputChannel("eylsa", TCLBoard2 + "/ao3"); AddAnalogOutputChannel("slowingChirp", aoBoard + "/ao8"); AddAnalogOutputChannel("v00Intensity", aoBoard + "/ao9"); AddAnalogOutputChannel("v00Frequency", aoBoard + "/ao12"); AddAnalogOutputChannel("MOTCoilsCurrent", aoBoard + "/ao13"); AddAnalogOutputChannel("xShimCoilCurrent", aoBoard + "/ao17"); AddAnalogOutputChannel("yShimCoilCurrent", aoBoard + "/ao16"); AddAnalogOutputChannel("zShimCoilCurrent", aoBoard + "/ao14"); AddAnalogOutputChannel("slowingCoilsCurrent", aoBoard + "/ao18"); //second cavity AddAnalogInputChannel("master2", TCLBoard2 + "/ai0", AITerminalConfiguration.Rse); AddAnalogInputChannel("cavity2", TCLBoard2 + "/ai4", AITerminalConfiguration.Rse); AddAnalogInputChannel("p12", TCLBoard2 + "/ai1", AITerminalConfiguration.Rse); AddAnalogInputChannel("p22", TCLBoard2 + "/ai2", AITerminalConfiguration.Rse); AddAnalogOutputChannel("v21repump", TCLBoard2 + "/ao0"); AddAnalogOutputChannel("v32repump", usbBoard + "/ao0", 0, 5); AddAnalogOutputChannel("rampfb2", TCLBoard2 + "/ao1"); // map the counter channels AddCounterChannel("pmt", daqBoard + "/ctr0"); AddCounterChannel("sample clock", daqBoard + "/ctr1"); //map the monitoring source chamber in deceleration hardware // AddAnalogInputChannel("RoughVacuum", PXIBoard + "/ai0", AITerminalConfiguration.Rse); // AddAnalogInputChannel("PressureSourceChamber", PXIBoard + "/ai1", AITerminalConfiguration.Rse); // AddAnalogInputChannel("VoltageReference", PXIBoard + "/ai2", AITerminalConfiguration.Rse); // AddAnalogInputChannel("10KThermistor30KPlate", PXIBoard + "/ai3", AITerminalConfiguration.Rse); // AddAnalogInputChannel("30KShield", PXIBoard + "/ai4", AITerminalConfiguration.Rse); // AddAnalogInputChannel("4KCell", PXIBoard + "/ai5", AITerminalConfiguration.Rse); //map the channels to monitor the sidebands in deceleration hardware AddAnalogInputChannel("cavityVoltage", usbBoard + "/ai0", AITerminalConfiguration.Rse); AddAnalogInputChannel("mot606", usbBoard + "/ai1", AITerminalConfiguration.Rse); AddAnalogInputChannel("mot628V1", usbBoard + "/ai2", AITerminalConfiguration.Rse); AddAnalogInputChannel("mot628V2", usbBoard + "/ai3", AITerminalConfiguration.Rse); //AddAnalogInputChannel("mot628V3", usbBoard + "/ai4", AITerminalConfiguration.Rse); AddAnalogInputChannel("slowing531", usbBoard + "/ai4", AITerminalConfiguration.Rse); AddAnalogInputChannel("slowing628V1", usbBoard + "/ai7", AITerminalConfiguration.Rse); //analog output channels controlled by the hardware controller and/or MOTMaster AddAnalogOutputChannel("motAOMFreq", aoBoard + "/ao10"); AddAnalogOutputChannel("v00EOMAmp", aoBoard + "/ao11"); AddAnalogOutputChannel("triggerDelay", aoBoard + "/ao15"); // AddCalibration("freqToVoltage", new PolynomialCalibration(new double[] { -9.7727, 0.16604, -0.0000272 }, 70, 130)); //this is a quadratic fit to the manufacturer's data for a POS-150 //AddCalibration("motAOMAmp", new PolynomialCalibration(new double[] {6.2871, -0.5907, -0.0706, -0.0088, -0.0004}, -12, 4)); // this is a polynomial fit (up to quartic) to measured behaviour }