private void UpdateHotkeys() { if (_info == null) { Info = new ObservableCollection <Triple <string, string, string> >(); } Info.Clear(); if (Hotkey.Length != 0) { var active = Hotkey.Where(x => x.Active).ToArray(); if (active.Length != 0) { foreach (var item in active.Select(x => new Triple <string, string, string>() { A = string.IsNullOrWhiteSpace(x.Name) ? "N/A" : x.Name, B = x.Link, C = (x.Alt ? "Alt + " : "") + (x.Ctrl ? "Ctrl + " : "") + (x.Shift ? "Shift + " : "") + x.Key.ToString() })) { Info.Add(item); } } else { Info.Add(new Triple <string, string, string>("N/A", "N/A", "N/A")); } } else { Info.Add(new Triple <string, string, string>("N/A", "N/A", "N/A")); } }
private void btReadTags_Click(object sender, RoutedEventArgs e) { var tags = _player.Tags_Read(edFilenameOrURL.Text); Info.Clear(); Info.Add(tags?.ToString()); }
private async void btReadInfo_Click(object sender, RoutedEventArgs e) { Info.Clear(); var infoReader = new MediaInfoReader(_player); await infoReader.OpenAsync(new Uri(edFilenameOrURL.Text)); if (infoReader.Info.VideoStreams.Count > 0) { Info.Add("Video streams:"); foreach (var video in infoReader.Info.VideoStreams) { Info.Add($"{video.Width}x{video.Height}, {video.FrameRate:F2} fps, Duration: {video.Duration.ToString()}"); } } if (infoReader.Info.AudioStreams.Count > 0) { Info.Add("Audio streams:"); foreach (var audio in infoReader.Info.AudioStreams) { Info.Add($"{audio.SampleRate} Hz, {audio.Channels} channels, Duration: {audio.Duration.ToString()}"); } } }
public ApplicationViewModel(IDialogService dialogService, IFileService fileService) { this.dialogService = dialogService; this.fileService = fileService; // Only get files that begin with the letter "c". string[] dirs = Directory.GetFiles(@"files\", "day*"); foreach (string dir in dirs) { var userfile = fileService.Open(dir); foreach (var p in userfile) { if (!Users.ContainsKey(p.User)) { Users.Add(p.User, new ObservableCollection <UserDay>()); } else { Users[p.User].Add(p); } } } double sum; double average; int best; int worst; foreach (var c in Users) { best = 0; worst = 1000000000; sum = 0; foreach (var o in c.Value) { if (best < o.Steps) { best = o.Steps; } if (worst > o.Steps) { worst = o.Steps; } sum += o.Steps; average = sum / c.Value.Count; } average = sum / c.Value.Count; Info.Add(c.Key, new PageInfo(average, best, worst)); } if (!selected.Equals(default(KeyValuePair <string, PageInfo>))) { foreach (UserDay c in Users[selected.Key]) { points.Add(new Point(count, c.Steps)); Console.WriteLine(c.Steps); count++; } } count = 1; }
public void ParseGemGet(string response) { string[] split = response.Split(new char[] { '\n' }); foreach (string s in split) { var line = s.Trim(); string message; if (line != "") { if (line.Substring(0, 12) == "StatusCode: ") { StatusCode = int.Parse(line.Substring(12)); } else if (line.Substring(0, 8) == "Status: ") { Status = line.Substring(8); } else if (line.Substring(0, 14) == "Content-Type: ") { ContentType = line.Substring(14); } else if (line.Substring(0, 12) == "Redirected: ") { line = line.Substring(12); //is redirected. FinalUrl = line; Redirected = true; } else if (line.Substring(0, 7) == "Error: ") { Errors.Add(line.Substring(7)); } else if (line.Substring(0, 6) == "Info: ") { message = line.Substring(6); if (message.Contains("File is larger than max size limit")) { AbandonedSize = true; } else if (message.Contains("Download timed out")) { AbandonedTimeout = true; } else { Info.Add(message); } } else { Notes.Add(line); } } } }
/// <summary> /// Marca el resultado como fallido /// </summary> /// <param name="message">Mensaje de error a ingresar a la lista</param> /// <param name="errorCode">Código de error</param> public void MarkAsFailed(string message = "Ha ocurrido un error y el proceso no ha podido continuar", ErrorCodeEnum errorCode = ErrorCodeEnum.LOGIC_ERROR) { Result = ResultTypeEnum.Error; Info.Add(new OperationMessage(message, MessageTypeEnum.Error)); log.Error(message); ErrorCode = errorCode; }
/// <summary> /// add all the categorys in database and subscribe to add new categories when an item is added /// </summary> public Category() { Pages(); MessagingCenter.Subscribe <CategoryModel>(this, "update", (category) => { Info.Add(category); }); }
public BufferGasHardware() { // add the boards Boards.Add("daq", "/dev1"); Boards.Add("pg", "/dev2"); // map the digital channels string pgBoard = (string)Boards["pg"]; AddDigitalOutputChannel("q", pgBoard, 0, 0); //Pin 10 AddDigitalOutputChannel("aom", pgBoard, 1, 1); // AddDigitalOutputChannel("flash", pgBoard, 0, 2); //Pin 45 //(0,3) pin 12 is unconnected AddDigitalOutputChannel("shutterTrig1", pgBoard, 1, 6); // Pin 21, triggers camera for on-shots AddDigitalOutputChannel("shutterTrig2", pgBoard, 1, 7); // Pin 22, triggers camera for off-shots (not wired up) AddDigitalOutputChannel("probe", pgBoard, 0, 1); //Pin 44 previously connected to aom (not wired up) AddDigitalOutputChannel("valve", pgBoard, 0, 6); // AddDigitalOutputChannel("detector", pgBoard, 1, 0); //Pin 16 (onShot)from pg to daq AddDigitalOutputChannel("detectorprime", pgBoard, 0, 7); //Pin 15 (OffShot)from pg to daq //digital output P 0.6 wired up, not used (Pin 48) // this is the digital output from the daq board that the TTlSwitchPlugin wil switch AddDigitalOutputChannel("digitalSwitchChannel", (string)Boards["daq"], 0, 0);//enable for camera // add things to the info // the analog triggers Info.Add("analogTrigger0", (string)Boards["daq"] + "/PFI0"); Info.Add("analogTrigger1", (string)Boards["daq"] + "/PFI1"); Info.Add("phaseLockControlMethod", "analog"); Info.Add("PGClockLine", Boards["pg"] + "/PFI2"); Info.Add("PatternGeneratorBoard", pgBoard); Info.Add("PGType", "dedicated"); // map the analog channels string daqBoard = (string)Boards["daq"]; AddAnalogInputChannel("detector1", daqBoard + "/ai0", AITerminalConfiguration.Nrse); //Pin 68 AddAnalogInputChannel("detector2", daqBoard + "/ai3", AITerminalConfiguration.Nrse); //Pin AddAnalogInputChannel("detector3", daqBoard + "/ai8", AITerminalConfiguration.Nrse); //Pin 34 AddAnalogInputChannel("pressure1", daqBoard + "/ai1", AITerminalConfiguration.Nrse); //Pin 33 pressure reading at the moment AddAnalogInputChannel("cavity", daqBoard + "/ai2", AITerminalConfiguration.Nrse); //Pin 65 AddAnalogInputChannel("cavitylong", daqBoard + "/ai4", AITerminalConfiguration.Nrse); //Pin 28 AddAnalogInputChannel("cavityshort", daqBoard + "/ai5", AITerminalConfiguration.Nrse); //Pin 60 AddAnalogOutputChannel("laser", daqBoard + "/ao0"); //Pin 22 AddAnalogOutputChannel("phaseLockAnalogOutput", daqBoard + "/ao1"); //pin 21 //map the counter channels //AddCounterChannel("pmt", daqBoard + "/ctr0"); //AddCounterChannel("sample clock", daqBoard + "/ctr1"); //These need to be activated for the phase lock AddCounterChannel("phaseLockOscillator", daqBoard + "/ctr0"); //This should be the source pin of a counter AddCounterChannel("phaseLockReference", daqBoard + "/PFI9"); //This should be the gate pin of the same counter - need to check it's name }
public void UpdateOutput(Battlefield battlefield) { Info.Add("This is " + battlefield.GetActor().Name + "'s turn."); var lines = new List <string>();; lines.Add(""); if (Action.Count > 0) { lines[0] += FormatMessage(MessageType.Action, string.Join(" ", Action)); } if (Damage != 0) { lines[0] += FormatMessage(MessageType.Damage, Damage.ToString()); } if (lines[0] == "") { lines.Clear(); } if (Hit.Count > 0) { lines.Add(FormatMessage(MessageType.Hit, string.Join("\n", Hit))); } if (Status.Count > 0) { lines.Add(string.Join("\n", Status)); } if (Hint.Count > 0) { lines.Add(FormatMessage(MessageType.Hint, string.Join("\n", Hint))); } if (Special.Count > 0) { lines.Add(FormatMessage(MessageType.Special, string.Join("\n", Special))); } if (Info.Count > 0) { lines.Add("\n" + string.Join("\n", Info)); } LastMessageSent = string.Join("\n", lines); battlefield.Plugin.FChatClient.SendMessageInChannel(LastMessageSent, battlefield.Plugin.Channel); if (Error.Count > 0) { battlefield.Plugin.FChatClient.SendMessageInChannel(string.Join("\n", Error), battlefield.Plugin.Channel); } //clear messages from the queue once they have been displayed Action.Clear(); Hit.Clear(); Damage = 0; Status.Clear(); Hint.Clear(); Info.Clear(); Error.Clear(); }
public void AddItem(string message, TaskState state) { Info.Add(new Message(message, state)); //reset the counter so the ticks don't get too long if (ItemCount.Count > 20) { ItemCount.Clear(); } ItemCount.Add(message); InvokePropertyChanged("ItemCount"); }
public Attack_Haunt() { var ess = new List <Essence.Type> { Essence.Type.Death }; var d = new KeyValuePair <Stat.Name, float>[1] { new KeyValuePair <Stat.Name, float>(Stat.Name.M_Power, 0.5f) }; AttackVars(1, 40, 1f, ess, d); Info.Add(Key.Targets, new string[] { "enemy" }); }
public override void Append(string info) { if (string.IsNullOrWhiteSpace(Last.Field)) { Last.Field = info; } else { Last.Field2 = info; Info.Add(new ExplainInfo()); } }
protected override void CreateNextGeneration() { ArrayList AllAlgInfos = new ArrayList(); Result[] result = new Result[3]; for (int l = 0; l < 3; l++) { Result[,] results = new Result[9, 2]; for (int j = 0; j < 9; j++) { for (int i = 0; i < 2; i++) { switch (i) { case 0: StoppingType = StoppingType.GenerationNumber; break; case 1: StoppingType = StoppingType.EvaluationNumber; break; case 2: StoppingType = StoppingType.PerformanceTreshold; break; } OptMethod(j); Result Results = Optimizer.Optimize(); Results.InfoList.Add(InfoTypes.AlgType, Optimizer.GetType()); Results.InfoList.Add(InfoTypes.SelectAlgNum, l); results[j, i] = Results; AllAlgInfos.Add(Results); } } result[l] = BestCalc(results); } int index = -1; double id = double.MaxValue; for (int i = 0; i < result.Length; i++) { if ((double)result[i].InfoList[InfoTypes.SelectAlgFitness] < id) { id = (double)result[i].InfoList[InfoTypes.SelectAlgFitness]; index = i; } } Info.Add(InfoTypes.SelectAlgType, result[index].InfoList[InfoTypes.AlgType]); Info.Add(InfoTypes.SelectAlgResult, result[index]); Info.Add(InfoTypes.SelectAlgInfos, AllAlgInfos); Stop = true; }
/// <summary> /// Marca el resultado como fallido /// </summary> /// <param name="ex">Excepción que genera el error. Toma en cuenta el error interno si es que este existe</param> /// <param name="errorCode">Código de error</param> public void MarkAsFailed(Exception ex, ErrorCodeEnum errorCode = ErrorCodeEnum.LOGIC_ERROR) { Result = ResultTypeEnum.Error; Info.Add(new OperationMessage("Ha ocurrido una excepción no controlada, ha quedado registrada en el log de la plataforma.", MessageTypeEnum.Error)); log.Error(ex); ErrorCode = errorCode; if (ex.InnerException != null) { log.Error(ex.InnerException, "Inner Exception"); } }
public void AddInfo(string key, string value) { Info ??= new Dictionary <string, string>(); if (!Info.ContainsKey(key)) { Info.Add(key, value); } else { Info[key] = value; } }
public D006MMTFZ400Hardware() { Boards.Add("pgBoard", "/PXI1Slot2"); string pgBoard = (string)Boards["pgBoard"]; Info.Add("PatternGeneratorBoard", pgBoard); Info.Add("PGType", "dedicated"); Info.Add("PGClockLine", pgBoard + "/PFI4"); //Boards.Add("testBoard2", "/dev2"); //string TCLBoard2 = (string)Boards["testBoard2"]; //PG channels AddDigitalOutputChannel("q", pgBoard, 0, 1); //t = 0; AddDigitalOutputChannel("valve", pgBoard, 0, 6); //Use this for the microwaves as it has the valvePulseLength feature! AddDigitalOutputChannel("flash", pgBoard, 0, 2); //Basically unused AddDigitalOutputChannel("detector", pgBoard, 0, 3); AddDigitalOutputChannel("detectorprime", pgBoard, 0, 4); AddDigitalOutputChannel("aom", pgBoard, 0, 5); //Info.Add("analogTrigger2", TCLBoard + "/PFI0"); //TCL Lockable lasers //Info.Add("TCLLockableLasers", new string[] { "laser" }); //Info.Add("TCLPhotodiodes", new string[] { "cavity", "master", "p1" });// THE FIRST TWO MUST BE CAVITY AND MASTER PHOTODIODE!!!! //Info.Add("TCL_Slave_Voltage_Limit_Upper",5.0); //volts: Laser control //Info.Add("TCL_Slave_Voltage_Limit_Lower", 0.0); //volts: Laser control //Info.Add("TCL_Default_Gain", 0.5); //Info.Add("TCL_Default_VoltageToLaser", 0.0); //Info.Add("TCL_MAX_INPUT_VOLTAGE", 10.0); //Info.Add("TCL_Default_ScanPoints", 100); //Info.Add("TCLReadAutostart", true); // Some matching up for TCL //Info.Add("laser", "p1"); //Info.Add("laser2", "p2"); // AddAnalogInputChannel("p1", TCLBoard + "/ai0", AITerminalConfiguration.Rse);//Pin 2 //AddAnalogInputChannel("p2", TCLBoard + "/ai1", AITerminalConfiguration.Rse);//Pin 5 //AddAnalogInputChannel("cavity", TCLBoard + "/ai2", AITerminalConfiguration.Rse); //Pin 8 //AddAnalogInputChannel("master", TCLBoard + "/ai3", AITerminalConfiguration.Rse); //Pin 8 //map the analog output channels // AddAnalogOutputChannel("laser", TCLBoard2 + "/ao0",0,5); // Pin 22 //AddAnalogOutputChannel("rampfb", TCLBoard2 + "/ao1",0,5); //AddAnalogOutputChannel("cavity", TCLBoard2 + "/ao1"); // Pin 21 }
public DesignItem() : base() { for (int i = 0; i < 3; i++) { Info.Add(new TradeItem() { Name = "TestName", BotName = "TestBot", BotURL = "https://google.com", SellPrice = 666, BuyPrice = 999, Stock = 1, Max = 2, ID = 1234 }); } }
static void Main(string[] args) { Info <string> str = new Info <string>(); for (int i = 0; i < 3; i++) { str.Add(Console.ReadLine()); } str.PrintInfo(); Info <int> Myint = new Info <int>(); for (int j = 0; j < 3; j++) { Myint.Add(j); } Myint.PrintInfo(); }
public static void Register(Type type, ClientVersion version, int oldItemID, int newItemID) { List <ArtworkInfo> infoList; if (!Info.TryGetValue(type, out infoList)) { Info.Add(type, (infoList = new List <ArtworkInfo>())); } else if (infoList == null) { Info[type] = infoList = new List <ArtworkInfo>(); } var info = infoList.FirstOrDefault(i => i.ItemID.Left == oldItemID); if (info != null) { if (CSOptions.ServiceDebug) { CSOptions.ToConsole( "Replacing ArtworkInfo for '{0}' -> \n({1}, 0x{2:X4} -> 0x{3:X4}) with ({4}, 0x{5:X4} -> 0x{6:X4})", type.Name, info.Version, info.ItemID.Left, info.ItemID.Right, version, oldItemID, newItemID); } info.Version = version; info.ItemID = Pair.Create(oldItemID, newItemID); } else { if (CSOptions.ServiceDebug) { CSOptions.ToConsole( "Adding ArtworkInfo for '{0}' -> \n({1}, 0x{2:X4} -> 0x{3:X4})", type.Name, version, oldItemID, newItemID); } infoList.Add(new ArtworkInfo(version, oldItemID, newItemID)); } }
//private int GetVertexForMaterial(float x, float y, float u, float v) public void SortPolygonsAndGenerateTextureInfo() { List <TexturePolygon> newPolygons = new List <TexturePolygon>(); short totalCount = 0; foreach (TextureName tex in GetTextureList()) { TextureInfo info = new TextureInfo(this); info.TextureStart = totalCount; List <TexturePolygon> tempList = Polygons.Where(pol => (pol.Texture == tex.Name)).ToList(); TexturePolygon_SortByMaterial sorter = new TexturePolygon_SortByMaterial(); tempList.Sort(sorter); foreach (TexturePolygon poly in tempList) { if (poly.Material == P3DMaterial.MAT_FLAT) { info.NumFlat++; } else if (poly.Material == P3DMaterial.MAT_FLAT_METAL) { info.NumFlatMetal++; } else if (poly.Material == P3DMaterial.MAT_GORAUD) { info.NumGouraud++; } else if (poly.Material == P3DMaterial.MAT_GORAUD_METAL) { info.NumGouraudMetal++; } else if (poly.Material == P3DMaterial.MAT_GORAUD_METAL_ENV) { info.NumGouraudMetalEnv++; } else if (poly.Material == P3DMaterial.MAT_SHINING) { info.NumShining++; } totalCount++; } newPolygons.AddRange(tempList); Info.Add(info); } }
public ResearchTeam AutoGeneration(int index) { ResearchTeam researchTeam; if (index >= Teams.Count) { researchTeam = new ResearchTeam(index.ToString(), index.ToString(), index + 1, TimeFrame.Year); Teams.Add(researchTeam as Team); Info.Add(researchTeam.ToString()); RTeams.Add(researchTeam as Team, researchTeam); RInfo.Add(researchTeam.ToString(), researchTeam); } else { Team team = Teams[index]; RTeams.TryGetValue(team, out researchTeam); } return(researchTeam); }
public override void Append(object info) { if (Last.IsNewArray) { _newArray.Add(info); } else { Last.Value = info; } if (!string.IsNullOrWhiteSpace(Last.Field) && !(string.IsNullOrWhiteSpace(Last.Method) && Last.Type == null) && Last.Value != null && !Last.IsNewArray) { Info.Add(new ExplainInfo()); } }
public override Task Read(SourceBufferReader buf, SourceDemo demo) { for (int i = 0; i < (demo.Game.MaxSplitscreenClients ?? 1); i++) { Info.Add(new PacketInfo { Flags = (DemoFlags)buf.Read <int>(), ViewOrigin = buf.Read <Vector>(), ViewAngles = buf.Read <QAngle>(), LocalViewAngles = buf.Read <QAngle>(), ViewOrigin2 = buf.Read <Vector>(), ViewAngles2 = buf.Read <QAngle>(), LocalViewAngles2 = buf.Read <QAngle>() }); } InSequence = buf.Read <int>(); OutSequence = buf.Read <int>(); Buffer = new SourceBufferReader(buf.ReadBufferField()); return(Task.CompletedTask); }
protected RtuBelongDataHold() { lock (obj) { if (_mySlef != null) { return; } _mySlef = this; var tmp = TxtDataReadWrite.ReadFile(out LastUpdateTime); Info.Clear(); foreach (var t in tmp) { if (Info.ContainsKey(t.Key)) { continue; } Info.Add(t.Key, t.Value); } } }
public override void Analyze(List <Lexeme> lexemes) { grammarTable = GrammarChecker.PrecedenceTable; grammarMap = GrammarChecker.Map; stack.Push("#"); input = new Stack <string>(); input.Push("#"); foreach (var lexeme in lexemes) { input.Push(lexeme.Body); } createReversedGrammar(); for (int i = 0; i < input.Count; i++) { string stackLexeme = stack.Peek(); string sign = grammarTable[getFirstElementRelation(stackLexeme, grammarTable), getSecondElementRelation(input.Skip(i).First(), grammarTable)]; if (sign.Equals("<") || sign.Equals("=")) { Info.Add(new AscendingInfo(Info.Count, getStackString(stack), sign, getInputString(input))); stack.Push(input.Skip(i).First()); input.Pop(); i--; } else if (sign.Equals(">")) { Info.Add(new AscendingInfo(Info.Count, getStackString(stack), sign, getInputString(input))); findBase(); i--; } else if (!stackLexeme.Equals("#") && !input.Skip(i).First().Equals("#")) { throw new ArgumentException($"Не існує відношення між {stackLexeme} та {input.Skip(i).First()}"); } } }
public PXISympatheticHardware() { // add the boards Boards.Add("multiDAQ", "/PXI1Slot6"); Boards.Add("aoBoard", "/PXI1Slot5"); Boards.Add("usbDAQ", "/Dev1"); string multiDAQ = (string)Boards["multiDAQ"]; string aoBoard = (string)Boards["aoBoard"]; string usbDAQ = (string)Boards["usbDAQ"]; // add things to the info Info.Add("PGClockLine", multiDAQ + "/PFI14"); Info.Add("PatternGeneratorBoard", multiDAQ); Info.Add("PGClockCounter", "/ctr0"); Info.Add("APGClockCounter", aoBoard + "/ctr0"); Info.Add("AOPatternTrigger", aoBoard + "/PFI0"); Info.Add("MOTMasterDigitalPatternClockFrequency", 10000); Info.Add("MOTMasterAnalogPatternClockFrequency", 10000); Info.Add("Element", "Li"); //Test this //Info.Add("PGType", "dedicated"); Info.Add("PGType", "integrated"); // map the digital output channels // Control of atoms AddDigitalOutputChannel("MOTMasterPatternTrigger", multiDAQ, 0, 0); AddDigitalOutputChannel("aom0enable", multiDAQ, 0, 0); AddDigitalOutputChannel("aom1enable", multiDAQ, 0, 1); AddDigitalOutputChannel("aom2enable", multiDAQ, 0, 2); AddDigitalOutputChannel("aom3enable", multiDAQ, 0, 3); AddDigitalOutputChannel("CameraTrigger", multiDAQ, 0, 4); AddDigitalOutputChannel("AnalogPatternTrigger", multiDAQ, 0, 5); AddDigitalOutputChannel("TranslationStageTrigger", multiDAQ, 0, 6); AddDigitalOutputChannel("shutterenable", multiDAQ, 1, 1); /* * //Control of molecules * AddDigitalOutputChannel("valve", multiDAQ, 0, 0); * AddDigitalOutputChannel("valve2", multiDAQ, 0, 1); * AddDigitalOutputChannel("q", multiDAQ, 0, 2); * AddDigitalOutputChannel("discharge", multiDAQ, 0, 3); * AddDigitalOutputChannel("aom", multiDAQ, 0, 4); * AddDigitalOutputChannel("flash2", multiDAQ, 0, 5); * AddDigitalOutputChannel("q2", multiDAQ, 0, 6); * AddDigitalOutputChannel("detector", multiDAQ, 0, 7); * AddDigitalOutputChannel("detectorprime", multiDAQ, 0, 8); * AddDigitalOutputChannel("flash", multiDAQ, 0, 9); */ // map the analog input channels AddAnalogInputChannel("pmt", multiDAQ + "/ai0", AITerminalConfiguration.Rse); //Pin 68 AddAnalogInputChannel("lockcavity", multiDAQ + "/ai1", AITerminalConfiguration.Rse); //Pin 33 AddAnalogInputChannel("probepower", multiDAQ + "/ai9", AITerminalConfiguration.Rse); //Pin 66 AddAnalogInputChannel("laserLockErrorSignal", multiDAQ + "/ai2", AITerminalConfiguration.Rse); AddAnalogInputChannel("chamber1Pressure", usbDAQ + "/ai0", AITerminalConfiguration.Differential); AddAnalogInputChannel("chamber2Pressure", usbDAQ + "/ai1", AITerminalConfiguration.Differential); // map the analog output channels // Control of atoms AddAnalogOutputChannel("aom0amplitude", aoBoard + "/ao16"); AddAnalogOutputChannel("aom0frequency", aoBoard + "/ao9"); AddAnalogOutputChannel("aom1amplitude", aoBoard + "/ao10"); AddAnalogOutputChannel("aom1frequency", aoBoard + "/ao11"); AddAnalogOutputChannel("aom2amplitude", aoBoard + "/ao12"); AddAnalogOutputChannel("aom2frequency", aoBoard + "/ao13"); AddAnalogOutputChannel("aom3amplitude", aoBoard + "/ao14"); AddAnalogOutputChannel("aom3frequency", aoBoard + "/ao15"); AddAnalogOutputChannel("coil0current", aoBoard + "/ao8"); AddAnalogOutputChannel("coil1current", aoBoard + "/ao17"); AddAnalogOutputChannel("laser", aoBoard + "/ao1"); AddAnalogOutputChannel("cavity", multiDAQ + "/ao1"); //Control of molecules //AddAnalogOutputChannel("laser", aoBoard + "/ao0"); // Pin 22 //AddAnalogOutputChannel("highvoltage", aoBoard + "/ao1"); // Note - this is just here because a channel called "highvoltage" has been hard-wired into DecelerationHardwareControl - this needs to be rectified //AddAnalogOutputChannel("cavity", aoBoard + "/ao1"); // Pin 21 // map the counter channels AddCounterChannel("pmt", multiDAQ + "/ctr0"); //Source is pin 37, gate is pin 3, out is pin 2 AddCounterChannel("sample clock", multiDAQ + "/ctr1"); //Source is pin 42, gate is pin 41, out is pin 40 // Calibrations AddCalibration("chamber1Pressure", new PowerCalibration(1, 0, 10.875, 1, 10)); AddCalibration("chamber2Pressure", new PowerCalibration(1, 0, 10.875, 1, 10)); //AddCalibration("aom3frequency", new PolynomialCalibration //(new double[] {-27.2757, 0.698297, -0.0075598, 0.000045057, -1.33872 * Math.Pow(10,-7), 1.57402* Math.Pow(10, -10)})); AddCalibration("aom0frequency", new PolynomialCalibration(new double[] { 9.73471, -0.389447, 0.00439124, -0.0000200009, 4.27697 * Math.Pow(10, -8), -3.44365 * Math.Pow(10, -11) }, 130, 260)); AddCalibration("aom1frequency", new PolynomialCalibration(new double[] { -11.9562, 0.185676, -0.00161757, 0.0000109047, -3.54351 * Math.Pow(10, -8), 4.35218 * Math.Pow(10, -11) }, 130, 260)); AddCalibration("aom2frequency", new PolynomialCalibration(new double[] { 0.471968, -0.139565, 0.00173958, -6.18839 * Math.Pow(10, -6), 7.4987 * Math.Pow(10, -9), 8.99272 * Math.Pow(10, -13) }, 130, 260)); AddCalibration("aom3frequency", new PolynomialCalibration(new double[] { 0.879515, -0.143097, 0.00170292, -5.6672 * Math.Pow(10, -6), 5.44491 * Math.Pow(10, -9), 3.56736 * Math.Pow(10, -12) }, 130, 260)); //AddCalibration("coil0current", new LinearInterpolationCalibration(new double[,] {{0.0, 0.0}, {0.0, 0.5}, {0.23, 0.75}, {0.82, 1}, {1.44, 1.25}, //{2.1, 1.5}, {2.75, 1.75}, {3.41, 2}, {4.73, 2.5}, {6.08, 3}, {7.4, 3.5}, {8.76, 4}, {10.08, 4.5}, {11.45, 5}, {12.77, 5.5}, {14.14, 6}, //{15.46, 6.5}, {16.83, 7}, {17.48, 7.25}, {18.15, 7.5}, {18.83, 7.75}, {19.53, 8}, {19.98, 8.5}, {19.98, 9}, {19.98, 9.5}, {19.98, 10}})); }
public static async Task <bool> ParseSpecifiedInfo(WebSite webSite, string id, string url) { string content = ""; int StatusCode = 404; if (webSite == WebSite.DB) { (content, StatusCode) = await Net.Http(url, Cookie : Properties.Settings.Default.DBCookie); } if (webSite == WebSite.DMM) { (content, StatusCode) = await Net.Http(url, Cookie : Properties.Settings.Default.DMMCookie); } else { (content, StatusCode) = await Net.Http(url); } if (StatusCode != 200 || content == "") { return(false); } else { Dictionary <string, string> Info = new Dictionary <string, string>(); if (webSite == WebSite.Bus) { Info = new BusParse(id, content, Identify.GetVedioType(id)).Parse(); Info.Add("source", "javbus"); } else if (webSite == WebSite.BusEu) { Info = new BusParse(id, content, VedioType.欧美).Parse(); Info.Add("source", "javbus"); } else if (webSite == WebSite.DB) { Info = new JavDBParse(id, content, url.Split('/').Last()).Parse(); Info.Add("source", "javdb"); } else if (webSite == WebSite.Library) { Info = new LibraryParse(id, content).Parse(); Info.Add("source", "javlibrary"); } Info.Add("sourceurl", url); if (Info.Count > 2) { //保存信息 Info["id"] = id; DataBase.UpdateInfoFromNet(Info); DetailMovie detailMovie = DataBase.SelectDetailMovieById(id); //nfo 信息保存到视频同目录 if (Properties.Settings.Default.SaveInfoToNFO) { if (Directory.Exists(Properties.Settings.Default.NFOSavePath)) { //固定位置 nfo.SaveToNFO(detailMovie, Path.Combine(Properties.Settings.Default.NFOSavePath, $"{id}.nfo")); } else { //与视频同路径 string path = detailMovie.filepath; if (System.IO.File.Exists(path)) { nfo.SaveToNFO(detailMovie, Path.Combine(new FileInfo(path).DirectoryName, $"{id}.nfo")); } } } return(true); } } return(false); }
public EDMHardware() { // add the boards Boards.Add("daq", "/dev1"); Boards.Add("pg", "/dev2"); Boards.Add("counter", "/dev3"); Boards.Add("usbDAQ1", "/dev4"); Boards.Add("analogIn", "/dev5"); Boards.Add("usbDAQ2", "/dev6"); Boards.Add("usbDAQ3", "/dev7"); Boards.Add("usbDAQ4", "/dev9"); string pgBoard = (string)Boards["pg"]; string daqBoard = (string)Boards["daq"]; string counterBoard = (string)Boards["counter"]; string usbDAQ1 = (string)Boards["usbDAQ1"]; string analogIn = (string)Boards["analogIn"]; string usbDAQ2 = (string)Boards["usbDAQ2"]; string usbDAQ3 = (string)Boards["usbDAQ3"]; string usbDAQ4 = (string)Boards["usbDAQ4"]; // add things to the info // the analog triggers Info.Add("analogTrigger0", (string)Boards["analogIn"] + "/PFI0"); Info.Add("analogTrigger1", (string)Boards["analogIn"] + "/PFI1"); Info.Add("sourceToDetect", 1.3); Info.Add("moleculeMass", 193.0); Info.Add("phaseLockControlMethod", "synth"); Info.Add("PGClockLine", Boards["pg"] + "/PFI2"); Info.Add("PatternGeneratorBoard", pgBoard); Info.Add("PGType", "dedicated"); // YAG laser yag = new BrilliantLaser("ASRL1::INSTR"); // add the GPIB instruments Instruments.Add("green", new HP8657ASynth("GPIB0::7::INSTR")); Instruments.Add("red", new HP3325BSynth("GPIB0::12::INSTR")); Instruments.Add("4861", new ICS4861A("GPIB0::4::INSTR")); Instruments.Add("bCurrentMeter", new HP34401A("GPIB0::22::INSTR")); Instruments.Add("rfCounter", new Agilent53131A("GPIB0::3::INSTR")); Instruments.Add("rfPower", new HP438A("GPIB0::13::INSTR")); // map the digital channels // these channels are generally switched by the pattern generator // they're all in the lower half of the pg AddDigitalOutputChannel("valve", pgBoard, 0, 0); AddDigitalOutputChannel("flash", pgBoard, 0, 1); AddDigitalOutputChannel("q", pgBoard, 0, 2); AddDigitalOutputChannel("detector", pgBoard, 0, 3); AddDigitalOutputChannel("detectorprime", pgBoard, 1, 2); // this trigger is for switch scanning // see ModulatedAnalogShotGatherer.cs // for details. AddDigitalOutputChannel("rfSwitch", pgBoard, 0, 4); AddDigitalOutputChannel("fmSelect", pgBoard, 1, 0); // This line selects which fm voltage is // sent to the synth. AddDigitalOutputChannel("attenuatorSelect", pgBoard, 0, 5); // This line selects the attenuator voltage // sent to the voltage-controlled attenuator. AddDigitalOutputChannel("piFlip", pgBoard, 1, 1); AddDigitalOutputChannel("ttlSwitch", pgBoard, 1, 3); // This is the output that the pg // will switch if it's switch scanning. AddDigitalOutputChannel("scramblerEnable", pgBoard, 1, 4); // these channel are usually software switched - they should not be in // the lower half of the pattern generator AddDigitalOutputChannel("b", pgBoard, 2, 0); AddDigitalOutputChannel("notB", pgBoard, 2, 1); AddDigitalOutputChannel("db", pgBoard, 2, 2); AddDigitalOutputChannel("notDB", pgBoard, 2, 3); // AddDigitalOutputChannel("notEOnOff", pgBoard, 2, 4); // this line seems to be broken on our pg board // AddDigitalOutputChannel("eOnOff", pgBoard, 2, 5); // this and the above are not used now we have analog E control AddDigitalOutputChannel("targetStepper", pgBoard, 2, 5); AddDigitalOutputChannel("ePol", pgBoard, 2, 6); AddDigitalOutputChannel("notEPol", pgBoard, 2, 7); AddDigitalOutputChannel("eBleed", pgBoard, 3, 0); AddDigitalOutputChannel("piFlipEnable", pgBoard, 3, 1); AddDigitalOutputChannel("notPIFlipEnable", pgBoard, 3, 5); AddDigitalOutputChannel("pumpShutter", pgBoard, 3, 3); AddDigitalOutputChannel("probeShutter", pgBoard, 3, 4); AddDigitalOutputChannel("argonShutter", pgBoard, 3, 2);// (3,6) & (3,7) are dead. // map the analog channels // These channels are on the daq board. Used mainly for diagnostic purposes. // On no account should they switch during the edm acquisition pattern. AddAnalogInputChannel("iodine", daqBoard + "/ai2", AITerminalConfiguration.Nrse); AddAnalogInputChannel("cavity", daqBoard + "/ai3", AITerminalConfiguration.Nrse); AddAnalogInputChannel("probePD", daqBoard + "/ai4", AITerminalConfiguration.Nrse); AddAnalogInputChannel("pumpPD", daqBoard + "/ai5", AITerminalConfiguration.Nrse); AddAnalogInputChannel("northLeakage", daqBoard + "/ai6", AITerminalConfiguration.Nrse); AddAnalogInputChannel("southLeakage", daqBoard + "/ai7", AITerminalConfiguration.Nrse); // Used ai10,11 & 12 over 6,7 & 8 for miniFluxgates, because ai8, 9 have an isolated ground. AddAnalogInputChannel("miniFlux1", daqBoard + "/ai10", AITerminalConfiguration.Nrse); AddAnalogInputChannel("miniFlux2", daqBoard + "/ai11", AITerminalConfiguration.Nrse); AddAnalogInputChannel("miniFlux3", daqBoard + "/ai12", AITerminalConfiguration.Nrse); // high quality analog inputs (will be) on the S-series analog in board AddAnalogInputChannel("top", analogIn + "/ai0", AITerminalConfiguration.Differential); AddAnalogInputChannel("norm", analogIn + "/ai1", AITerminalConfiguration.Differential); AddAnalogInputChannel("magnetometer", analogIn + "/ai2", AITerminalConfiguration.Differential); AddAnalogInputChannel("gnd", analogIn + "/ai3", AITerminalConfiguration.Differential); AddAnalogInputChannel("battery", analogIn + "/ai4", AITerminalConfiguration.Differential); AddAnalogInputChannel("piMonitor", analogIn + "/ai5", AITerminalConfiguration.Differential); AddAnalogOutputChannel("phaseScramblerVoltage", daqBoard + "/ao0"); AddAnalogOutputChannel("b", daqBoard + "/ao1"); // rf rack control //AddAnalogInputChannel("rfPower", usbDAQ1 + "/ai0", AITerminalConfiguration.Rse); AddAnalogOutputChannel("rf1Attenuator", usbDAQ1 + "/ao0", 0, 5); AddAnalogOutputChannel("rf2Attenuator", usbDAQ1 + "/ao1", 0, 5); AddAnalogOutputChannel("rf1FM", usbDAQ2 + "/ao0", 0, 5); AddAnalogOutputChannel("rf2FM", usbDAQ2 + "/ao1", 0, 5); // E field control and monitoring AddAnalogInputChannel("cPlusMonitor", usbDAQ3 + "/ai1", AITerminalConfiguration.Differential); AddAnalogInputChannel("cMinusMonitor", usbDAQ3 + "/ai2", AITerminalConfiguration.Differential); AddAnalogOutputChannel("cPlus", usbDAQ3 + "/ao0", -5, 0); AddAnalogOutputChannel("cMinus", usbDAQ3 + "/ao1", 0, 5); // B field control AddAnalogOutputChannel("steppingBBias", usbDAQ4 + "/ao0", 0, 5); // FL control AddAnalogOutputChannel("flPZT", usbDAQ4 + "/ao1", 0, 5); // map the counter channels AddCounterChannel("phaseLockOscillator", counterBoard + "/ctr7"); AddCounterChannel("phaseLockReference", counterBoard + "/pfi10"); //AddCounterChannel("northLeakage", counterBoard +"/ctr0"); //AddCounterChannel("southLeakage", counterBoard +"/ctr1"); }
public PXIEDMHardwareNormal() { // add the boards Boards.Add("daq", "/PXI1Slot18"); Boards.Add("pg", "/PXI1Slot10"); Boards.Add("counter", "/PXI1Slot3"); Boards.Add("aoBoard", "/PXI1Slot4"); // this drives the rf attenuators Boards.Add("usbDAQ1", "/Dev2"); Boards.Add("analogIn", "/PXI1Slot2"); Boards.Add("usbDAQ2", "/dev1"); Boards.Add("usbDAQ3", "/dev4"); Boards.Add("usbDAQ4", "/dev3"); Boards.Add("tclBoard", "/PXI1Slot9"); string pgBoard = (string)Boards["pg"]; string daqBoard = (string)Boards["daq"]; string counterBoard = (string)Boards["counter"]; string aoBoard = (string)Boards["aoBoard"]; string usbDAQ1 = (string)Boards["usbDAQ1"]; string analogIn = (string)Boards["analogIn"]; string usbDAQ2 = (string)Boards["usbDAQ2"]; string usbDAQ3 = (string)Boards["usbDAQ3"]; string usbDAQ4 = (string)Boards["usbDAQ4"]; string tclBoard = (string)Boards["tclBoard"]; // add things to the info // the analog triggers Info.Add("analogTrigger0", (string)Boards["analogIn"] + "/PFI0"); Info.Add("analogTrigger1", (string)Boards["analogIn"] + "/PFI1"); Info.Add("sourceToDetect", 1.3); Info.Add("moleculeMass", 193.0); Info.Add("phaseLockControlMethod", "synth"); Info.Add("PGClockLine", pgBoard + "/PFI4"); //Mapped to PFI2 on 6533 connector Info.Add("PatternGeneratorBoard", pgBoard); Info.Add("PGType", "dedicated"); // rf counter switch control seq`` Info.Add("IodineFreqMon", new bool[] { false, false }); // IN 1 Info.Add("pumpAOMFreqMon", new bool[] { false, true }); // IN 2 Info.Add("FLModulationFreqMon", new bool[] { true, false }); // IN 3 Info.Add("PGTrigger", pgBoard + "/PFI5"); //Mapped to PFI7 on 6533 connector // YAG laser yag = new BrilliantLaser("ASRL2::INSTR"); // add the GPIB/RS232 instruments Instruments.Add("green", new HP8657ASynth("GPIB0::7::INSTR")); Instruments.Add("red", new HP3325BSynth("GPIB0::12::INSTR")); Instruments.Add("4861", new ICS4861A("GPIB0::4::INSTR")); Instruments.Add("bCurrentMeter", new HP34401A("GPIB0::22::INSTR")); Instruments.Add("rfCounter", new Agilent53131A("GPIB0::3::INSTR")); //Instruments.Add("rfCounter2", new Agilent53131A("GPIB0::5::INSTR")); Instruments.Add("rfPower", new HP438A("GPIB0::13::INSTR")); Instruments.Add("BfieldController", new SerialDAQ("ASRL12::INSTR")); Instruments.Add("rfCounter2", new SerialAgilent53131A("ASRL8::INSTR")); Instruments.Add("probePolControl", new SerialMotorControllerBCD("ASRL5::INSTR")); Instruments.Add("pumpPolControl", new SerialMotorControllerBCD("ASRL3::INSTR")); // map the digital channels // these channels are generally switched by the pattern generator // they're all in the lower half of the pg AddDigitalOutputChannel("valve", pgBoard, 0, 0); AddDigitalOutputChannel("flash", pgBoard, 0, 1); AddDigitalOutputChannel("q", pgBoard, 0, 2); AddDigitalOutputChannel("detector", pgBoard, 0, 3); AddDigitalOutputChannel("detectorprime", pgBoard, 1, 2); // this trigger is for switch scanning // see ModulatedAnalogShotGatherer.cs // for details. AddDigitalOutputChannel("rfSwitch", pgBoard, 0, 4); AddDigitalOutputChannel("fmSelect", pgBoard, 1, 0); // This line selects which fm voltage is // sent to the synth. AddDigitalOutputChannel("attenuatorSelect", pgBoard, 0, 5); // This line selects the attenuator voltage // sent to the voltage-controlled attenuator. AddDigitalOutputChannel("piFlip", pgBoard, 1, 1); AddDigitalOutputChannel("ttlSwitch", pgBoard, 1, 3); // This is the output that the pg // will switch if it's switch scanning. AddDigitalOutputChannel("scramblerEnable", pgBoard, 1, 4); //RF Counter Control (single pole 4 throw) //AddDigitalOutputChannel("rfCountSwBit1", pgBoard, 3, 5); //AddDigitalOutputChannel("rfCountSwBit2", pgBoard, 3, 6); // new rf amp blanking AddDigitalOutputChannel("rfAmpBlanking", pgBoard, 1, 5); // these channel are usually software switched - they should not be in // the lower half of the pattern generator AddDigitalOutputChannel("b", pgBoard, 2, 0); AddDigitalOutputChannel("notB", pgBoard, 2, 1); AddDigitalOutputChannel("db", pgBoard, 2, 2); AddDigitalOutputChannel("notDB", pgBoard, 2, 3); // AddDigitalOutputChannel("notEOnOff", pgBoard, 2, 4); // this line seems to be broken on our pg board // AddDigitalOutputChannel("eOnOff", pgBoard, 2, 5); // this and the above are not used now we have analog E control AddDigitalOutputChannel("targetStepper", pgBoard, 2, 5); AddDigitalOutputChannel("ePol", pgBoard, 2, 6); AddDigitalOutputChannel("notEPol", pgBoard, 2, 7); AddDigitalOutputChannel("eBleed", pgBoard, 3, 0); AddDigitalOutputChannel("piFlipEnable", pgBoard, 3, 1); AddDigitalOutputChannel("notPIFlipEnable", pgBoard, 3, 5); AddDigitalOutputChannel("pumpShutter", pgBoard, 3, 3); AddDigitalOutputChannel("probeShutter", pgBoard, 3, 4); AddDigitalOutputChannel("argonShutter", pgBoard, 3, 2); //I2 Lock Control AddDigitalOutputChannel("I2PropSwitch", pgBoard, 2, 4); AddDigitalOutputChannel("I2IntSwitch", pgBoard, 3, 6); AddDigitalOutputChannel("fibreAmpEnable", aoBoard, 0, 0); // Map the digital input channels AddDigitalInputChannel("fibreAmpMasterErr", aoBoard, 0, 1); AddDigitalInputChannel("fibreAmpSeedErr", aoBoard, 0, 2); AddDigitalInputChannel("fibreAmpBackFeflectErr", aoBoard, 0, 3); AddDigitalInputChannel("fibreAmpTempErr", aoBoard, 0, 4); AddDigitalInputChannel("fibreAmpPowerSupplyErr", aoBoard, 0, 5); // map the analog channels // These channels are on the daq board. Used mainly for diagnostic purposes. // On no account should they switch during the edm acquisition pattern. AddAnalogInputChannel("diodeLaserCurrent", daqBoard + "/ai0", AITerminalConfiguration.Differential); AddAnalogInputChannel("iodine", daqBoard + "/ai2", AITerminalConfiguration.Nrse); AddAnalogInputChannel("cavity", daqBoard + "/ai3", AITerminalConfiguration.Nrse); AddAnalogInputChannel("probePD", daqBoard + "/ai4", AITerminalConfiguration.Nrse); AddAnalogInputChannel("pumpPD", daqBoard + "/ai5", AITerminalConfiguration.Nrse); AddAnalogInputChannel("northLeakage", daqBoard + "/ai6", AITerminalConfiguration.Nrse); AddAnalogInputChannel("southLeakage", daqBoard + "/ai7", AITerminalConfiguration.Nrse); // Used ai13,11 & 12 over 6,7 & 8 for miniFluxgates, because ai8, 9 have an isolated ground. AddAnalogInputChannel("miniFlux1", daqBoard + "/ai13", AITerminalConfiguration.Nrse); AddAnalogInputChannel("miniFlux2", daqBoard + "/ai11", AITerminalConfiguration.Nrse); AddAnalogInputChannel("miniFlux3", daqBoard + "/ai12", AITerminalConfiguration.Nrse); AddAnalogInputChannel("piMonitor", daqBoard + "/ai10", AITerminalConfiguration.Nrse); //AddAnalogInputChannel("diodeLaserRefCavity", daqBoard + "/ai13", AITerminalConfiguration.Nrse); // Don't use ai10, cross talk with other channels on this line // high quality analog inputs (will be) on the S-series analog in board AddAnalogInputChannel("top", analogIn + "/ai0", AITerminalConfiguration.Differential); AddAnalogInputChannel("norm", analogIn + "/ai1", AITerminalConfiguration.Differential); AddAnalogInputChannel("magnetometer", analogIn + "/ai2", AITerminalConfiguration.Differential); AddAnalogInputChannel("gnd", analogIn + "/ai3", AITerminalConfiguration.Differential); AddAnalogInputChannel("battery", analogIn + "/ai4", AITerminalConfiguration.Differential); //AddAnalogInputChannel("piMonitor", analogIn + "/ai5", AITerminalConfiguration.Differential); //AddAnalogInputChannel("bFieldCurrentMonitor", analogIn + "/ai6", AITerminalConfiguration.Differential); AddAnalogInputChannel("reflectedrf1Amplitude", analogIn + "/ai5", AITerminalConfiguration.Differential); AddAnalogInputChannel("reflectedrf2Amplitude", analogIn + "/ai6", AITerminalConfiguration.Differential); AddAnalogInputChannel("rfCurrent", analogIn + "/ai7 ", AITerminalConfiguration.Differential); AddAnalogOutputChannel("phaseScramblerVoltage", aoBoard + "/ao0"); AddAnalogOutputChannel("b", aoBoard + "/ao1"); // rf rack control //AddAnalogInputChannel("rfPower", usbDAQ1 + "/ai0", AITerminalConfiguration.Rse); AddAnalogOutputChannel("rf1Attenuator", usbDAQ1 + "/ao0", 0, 5); AddAnalogOutputChannel("rf2Attenuator", usbDAQ1 + "/ao1", 0, 5); AddAnalogOutputChannel("rf1FM", usbDAQ2 + "/ao0", 0, 5); AddAnalogOutputChannel("rf2FM", usbDAQ2 + "/ao1", 0, 5); // E field control and monitoring AddAnalogInputChannel("cPlusMonitor", usbDAQ3 + "/ai1", AITerminalConfiguration.Differential); AddAnalogInputChannel("cMinusMonitor", usbDAQ3 + "/ai2", AITerminalConfiguration.Differential); AddAnalogOutputChannel("cPlus", usbDAQ3 + "/ao0", 0, 10); AddAnalogOutputChannel("cMinus", usbDAQ3 + "/ao1", 0, 10); // B field control //AddAnalogOutputChannel("steppingBBias", usbDAQ4 + "/ao0", 0, 5); // map the counter channels AddCounterChannel("phaseLockOscillator", counterBoard + "/ctr7"); AddCounterChannel("phaseLockReference", counterBoard + "/pfi10"); //AddCounterChannel("northLeakage", counterBoard + "/ctr0"); //AddCounterChannel("southLeakage", counterBoard + "/ctr1"); //TCL Lockable lasers //Info.Add("TCLLockableLasers", new string[][] { new string[] { "flPZT2" }, /*new string[] { "flPZT2Temp" },*/ new string[] { "fibreAOM", "flPZT2Temp" } }); Info.Add("TCLLockableLasers", new string[] { "flPZT2" }); //, new string[] { "flPZT2Temp" }, new string[] { "fibreAOM"} }); Info.Add("TCLPhotodiodes", new string[] { "transCavV", "master", "p1" }); // THE FIRST TWO MUST BE CAVITY AND MASTER PHOTODIODE!!!! Info.Add("TCL_Slave_Voltage_Limit_Upper", 10.0); //volts: Laser control Info.Add("TCL_Slave_Voltage_Limit_Lower", 0.0); //volts: Laser control Info.Add("TCL_Default_Gain", -1.1); //Info.Add("TCL_Default_ScanPoints", 250); Info.Add("TCL_Default_VoltageToLaser", 2.5); Info.Add("TCL_Default_VoltageToDependent", 1.0); // Some matching up for TCL Info.Add("flPZT2", "p1"); Info.Add("flPZT2Temp", "p1"); //Info.Add("fibreAOM", "p1"); Info.Add("TCLTrigger", tclBoard + "/PFI0"); Info.Add("TCL_MAX_INPUT_VOLTAGE", 10.0); AddAnalogInputChannel("transCavV", tclBoard + "/ai0", AITerminalConfiguration.Rse); AddAnalogInputChannel("master", tclBoard + "/ai1", AITerminalConfiguration.Rse); AddAnalogInputChannel("p1", tclBoard + "/ai2", AITerminalConfiguration.Rse); // Laser control //AddAnalogOutputChannel("flPZT", usbDAQ4 + "/ao1", 0, 5); AddAnalogOutputChannel("flPZT", aoBoard + "/ao7", 0, 10); AddAnalogOutputChannel("flPZT2", aoBoard + "/ao2", 0, 10); AddAnalogOutputChannel("fibreAmpPwr", aoBoard + "/ao3"); //AddAnalogOutputChannel("pumpAOM", aoBoard + "/ao4", 0, 10); AddAnalogOutputChannel("pumpAOM", usbDAQ4 + "/ao0", 0, 5); //AddAnalogOutputChannel("flPZT2Temp", aoBoard + "/ao5", 0, 4); //voltage must not exceed 4V for Koheras laser //AddAnalogOutputChannel("flPZT2Cur", aoBoard + "/ao6", 0, 5); //voltage must not exceed 5V for Koheras laser //AddAnalogOutputChannel("fibreAOM", usbDAQ4 + "/ao1", 0, 5); AddAnalogOutputChannel("rampfb", aoBoard + "/ao4", -10, 10); AddAnalogOutputChannel("I2LockBias", aoBoard + "/ao5", 0, 5); }
public TCLEDMHardware() { //Add the boards Boards.Add("tclBoardPump", "/PXI1Slot5"); Boards.Add("tclBoardProbe", "/PXI1Slot2"); string tclBoardPump = (string)Boards["tclBoardPump"]; string tclBoardProbe = (string)Boards["tclBoardProbe"]; // Analog inputs //AddAnalogInputChannel("CavityRampVoltage", tclBoardProbe + "/ai0", AITerminalConfiguration.Rse); //tick //AddAnalogInputChannel("Pumpmaster", tclBoardProbe + "/ai3", AITerminalConfiguration.Rse); //AddAnalogInputChannel("Pumpp1", tclBoardProbe + "/ai4", AITerminalConfiguration.Rse); //AddAnalogInputChannel("Pumpp2", tclBoardProbe + "/ai5", AITerminalConfiguration.Rse); // Change on 27/06/2019: I move the pump PD inputs to tclBoardPump // to increase the sample rate on tclBoardProbe AddAnalogInputChannel("PumpCavityRampVoltage", tclBoardPump + "/ai8", AITerminalConfiguration.Rse); AddAnalogInputChannel("Pumpmaster", tclBoardPump + "/ai1", AITerminalConfiguration.Rse); AddAnalogInputChannel("Pumpp1", tclBoardPump + "/ai2", AITerminalConfiguration.Rse); AddAnalogInputChannel("Pumpp2", tclBoardPump + "/ai3", AITerminalConfiguration.Rse); // Lasers locked to pump cavity AddAnalogOutputChannel("KeopsysDiodeLaser", tclBoardPump + "/ao2", -4, 4); //tick AddAnalogOutputChannel("MenloPZT", tclBoardPump + "/ao0", 0, 10); //tick // Length stabilisation for pump cavity AddAnalogOutputChannel("PumpCavityLengthVoltage", tclBoardPump + "/ao1", -10, 10); //tick // Probe cavity inputs AddAnalogInputChannel("ProbeCavityRampVoltage", tclBoardProbe + "/ai0", AITerminalConfiguration.Rse); //tick AddAnalogInputChannel("Probemaster", tclBoardProbe + "/ai1", AITerminalConfiguration.Rse); //tick AddAnalogInputChannel("Probep1", tclBoardProbe + "/ai2", AITerminalConfiguration.Rse); //tick // Lasers locked to Probe cavity AddAnalogOutputChannel("TopticaSHGPZT", tclBoardProbe + "/ao0", -4, 4); //tick AddAnalogOutputChannel("ProbeCavityLengthVoltage", tclBoardProbe + "/ao1", -10, 10); //tick //TCL configuration for pump cavity: 27/06/2019 (Chris) TCLConfig tclConfigPump = new TCLConfig("Pump"); tclConfigPump.Trigger = tclBoardPump + "/PFI0"; tclConfigPump.BaseRamp = "PumpCavityRampVoltage"; tclConfigPump.TCPChannel = 1191; tclConfigPump.DefaultScanPoints = 500; tclConfigPump.PointsToConsiderEitherSideOfPeakInFWHMs = 12; tclConfigPump.AnalogSampleRate = 61250; tclConfigPump.MaximumNLMFSteps = 20; tclConfigPump.TriggerOnRisingEdge = false; string pump = "PumpCavity"; tclConfigPump.AddCavity(pump); tclConfigPump.Cavities[pump].AddSlaveLaser("MenloPZT", "Pumpp1"); tclConfigPump.Cavities[pump].AddSlaveLaser("KeopsysDiodeLaser", "Pumpp2"); tclConfigPump.Cavities[pump].MasterLaser = "Pumpmaster"; tclConfigPump.Cavities[pump].RampOffset = "PumpCavityLengthVoltage"; tclConfigPump.Cavities[pump].AddDefaultGain("Master", 0.3); tclConfigPump.Cavities[pump].AddDefaultGain("MenloPZT", -0.2); tclConfigPump.Cavities[pump].AddDefaultGain("KeopsysDiodeLaser", 1); tclConfigPump.Cavities[pump].AddFSRCalibration("MenloPZT", 3.84); tclConfigPump.Cavities[pump].AddFSRCalibration("KeopsysDiodeLaser", 3.84); //TCL configuration of probe cavity: 27/06/2019 (Chris) TCLConfig tclConfigProbe = new TCLConfig("Probe"); tclConfigProbe.Trigger = tclBoardProbe + "/PFI0"; tclConfigProbe.BaseRamp = "ProbeCavityRampVoltage"; tclConfigProbe.TCPChannel = 1190; tclConfigProbe.DefaultScanPoints = 500 * 1 / 4; tclConfigProbe.PointsToConsiderEitherSideOfPeakInFWHMs = 12; tclConfigProbe.AnalogSampleRate = 61250 * 1 / 2; tclConfigProbe.MaximumNLMFSteps = 20; tclConfigProbe.TriggerOnRisingEdge = false; string probe = "ProbeCavity"; tclConfigProbe.AddCavity(probe); tclConfigProbe.Cavities[probe].AddSlaveLaser("TopticaSHGPZT", "Probep1"); tclConfigProbe.Cavities[probe].MasterLaser = "Probemaster"; tclConfigProbe.Cavities[probe].RampOffset = "ProbeCavityLengthVoltage"; tclConfigProbe.Cavities[probe].AddDefaultGain("Master", 0.4); tclConfigProbe.Cavities[probe].AddDefaultGain("TopticaSHGPZT", 0.04); tclConfigProbe.Cavities[probe].AddFSRCalibration("TopticaSHGPZT", 3.84); Info.Add("TCLConfigPump", tclConfigPump); Info.Add("TCLConfigProbe", tclConfigProbe); Info.Add("DefaultCavity", tclConfigPump); ////TCL configuration for pump cavity //TCLConfig tcl1 = new TCLConfig("Pump Cavity"); //tcl1.AddLaser("MenloPZT", "Pumpp1"); //tcl1.AddLaser("KeopsysDiodeLaser", "Pumpp2"); //tcl1.Trigger = tclBoardPump + "/PFI0"; //tcl1.Cavity = "PumpCavityRampVoltage"; //tcl1.MasterLaser = "Pumpmaster"; //tcl1.Ramp = "PumpCavityLengthVoltage"; //tcl1.TCPChannel = 1190; //tcl1.AnalogSampleRate = 61250; //tcl1.DefaultScanPoints = 500; //tcl1.MaximumNLMFSteps = 20; //tcl1.PointsToConsiderEitherSideOfPeakInFWHMs = 2.5; //tcl1.TriggerOnRisingEdge = false; //tcl1.AddFSRCalibration("MenloPZT", 3.84); //tcl1.AddFSRCalibration("KeopsysDiodeLaser", 3.84); //tcl1.AddDefaultGain("Master", 0.3); //tcl1.AddDefaultGain("MenloPZT", -0.2); //tcl1.AddDefaultGain("KeopsysDiodeLaser", 4); //Info.Add("PumpCavity", tcl1); //Info.Add("DefaultCavity", tcl1); //// TCL configuration for Probe cavity //TCLConfig tcl2 = new TCLConfig("Probe Cavity"); //tcl2.AddLaser("TopticaSHGPZT", "Probep1"); //tcl2.Trigger = tclBoardProbe + "/PFI0"; //tcl2.Cavity = "ProbeRampVoltage"; //tcl2.MasterLaser = "Probemaster"; //tcl2.Ramp = "ProbeCavityLengthVoltage"; //tcl2.TCPChannel = 1191; //tcl2.AnalogSampleRate = 61250 / 2; //tcl2.DefaultScanPoints = 250; //tcl2.MaximumNLMFSteps = 20; //tcl2.PointsToConsiderEitherSideOfPeakInFWHMs = 12; //tcl2.AddFSRCalibration("TopticaSHGPZT", 3.84); //tcl2.TriggerOnRisingEdge = false; //tcl2.AddDefaultGain("Master", 0.4); //tcl2.AddDefaultGain("TopticaSHGPZT", 0.04); //Info.Add("ProbeCavity", tcl2); //Info.Add("DefaultCavity", tcl2); // TCL configuration for pump and probe cavities //TCLConfig tclConfig = new TCLConfig("Pump and Probe"); //tclConfig.Trigger = tclBoardProbe + "/PFI0"; //tclConfig.BaseRamp = "CavityRampVoltage"; //tclConfig.TCPChannel = 1190; //tclConfig.DefaultScanPoints = 500 * 5 / 2; //tclConfig.PointsToConsiderEitherSideOfPeakInFWHMs = 12; //tclConfig.AnalogSampleRate = 61250 * 5 / 2; //tclConfig.MaximumNLMFSteps = 20; //tclConfig.TriggerOnRisingEdge = false; //string pump = "PumpCavity"; //string probe = "ProbeCavity"; //tclConfig.AddCavity(pump); //tclConfig.Cavities[pump].AddSlaveLaser("MenloPZT", "Pumpp1"); //tclConfig.Cavities[pump].AddSlaveLaser("KeopsysDiodeLaser", "Pumpp2"); //tclConfig.Cavities[pump].MasterLaser = "Pumpmaster"; //tclConfig.Cavities[pump].RampOffset = "PumpCavityLengthVoltage"; //tclConfig.Cavities[pump].AddDefaultGain("Master", 0.3); //tclConfig.Cavities[pump].AddDefaultGain("MenloPZT", -0.2); //tclConfig.Cavities[pump].AddDefaultGain("KeopsysDiodeLaser", 1); //tclConfig.Cavities[pump].AddFSRCalibration("MenloPZT", 3.84); //tclConfig.Cavities[pump].AddFSRCalibration("KeopsysDiodeLaser", 3.84); //tclConfig.AddCavity(probe); //tclConfig.Cavities[probe].AddSlaveLaser("TopticaSHGPZT", "Probep1"); //tclConfig.Cavities[probe].MasterLaser = "Probemaster"; //tclConfig.Cavities[probe].RampOffset = "ProbeCavityLengthVoltage"; //tclConfig.Cavities[probe].AddDefaultGain("Master", 0.4); //tclConfig.Cavities[probe].AddDefaultGain("TopticaSHGPZT", 0.04); //tclConfig.Cavities[probe].AddFSRCalibration("TopticaSHGPZT", 3.84); //Info.Add("TCLConfig", tclConfig); //Info.Add("DefaultCavity", tclConfig); }