public List <AvgModel> BatProcessAll(string citFilePath, int fs, int upperFreq, int lowerFreq, int windowLen, List <double> upperChannelFreq, List <double> lowerChannelFreq, int segmentLen, string idfOutPath, out string filePath) { List <string> tmpSectionFilePathList = citProcessCls.CreateAllSectionFileNew(citFilePath, fs, upperFreq, lowerFreq, windowLen, upperChannelFreq, lowerChannelFreq); string idfFilePath = citProcessCls.CalcSegmentRMS(tmpSectionFilePathList, segmentLen, idfOutPath); filePath = idfFilePath; List <string> idfFilePathList = new List <string> { idfFilePath }; double avgRms = 0; double avgSpd = 0; List <AvgModel> list = new List <AvgModel>(); CalAvgRms(idfFilePathList, "AB_Lt", out avgRms, out avgSpd); //左轴横 AvgModel model1 = new AvgModel(); model1.ChannelNameEn = "AB_Lt"; model1.ChannelNameCn = "左轴横"; model1.AvgRms = avgRms; model1.AvgSpd = avgSpd; list.Add(model1); CalAvgRms(idfFilePathList, "AB_Vt_L", out avgRms, out avgSpd);//左轴垂 AvgModel model2 = new AvgModel(); model2.ChannelNameEn = "AB_Vt_L"; model2.ChannelNameCn = "左轴垂"; model2.AvgRms = avgRms; model2.AvgSpd = avgSpd; list.Add(model2); CalAvgRms(idfFilePathList, "AB_Vt_R", out avgRms, out avgSpd);//右轴垂 AvgModel model3 = new AvgModel(); model3.ChannelNameEn = "AB_Vt_R"; model3.ChannelNameCn = "右轴垂"; model3.AvgRms = avgRms; model3.AvgSpd = avgSpd; list.Add(model3); return(list); }
public List <AvgModel> CalcAvg(string idfFilePath) { List <string> idfFilePathList = new List <string> { idfFilePath }; double avgRms = 0; double avgSpd = 0; List <AvgModel> list = new List <AvgModel>(); CalAvgRms(idfFilePathList, "AB_Lt", out avgRms, out avgSpd); //左轴横 AvgModel model1 = new AvgModel(); model1.ChannelNameEn = "AB_Lt"; model1.ChannelNameCn = "左轴横"; model1.AvgRms = avgRms; model1.AvgSpd = avgSpd; list.Add(model1); CalAvgRms(idfFilePathList, "AB_Vt_L", out avgRms, out avgSpd);//左轴垂 AvgModel model2 = new AvgModel(); model2.ChannelNameEn = "AB_Vt_L"; model2.ChannelNameCn = "左轴垂"; model2.AvgRms = avgRms; model2.AvgSpd = avgSpd; list.Add(model2); CalAvgRms(idfFilePathList, "AB_Vt_R", out avgRms, out avgSpd);//右轴垂 AvgModel model3 = new AvgModel(); model3.ChannelNameEn = "AB_Vt_R"; model3.ChannelNameCn = "右轴垂"; model3.AvgRms = avgRms; model3.AvgSpd = avgSpd; list.Add(model3); return(list); }