当前位置: 首页>>代码示例>>C#>>正文


C# DataReader.GetFrameParams方法代码示例

本文整理汇总了C#中DataReader.GetFrameParams方法的典型用法代码示例。如果您正苦于以下问题:C# DataReader.GetFrameParams方法的具体用法?C# DataReader.GetFrameParams怎么用?C# DataReader.GetFrameParams使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在DataReader的用法示例。


在下文中一共展示了DataReader.GetFrameParams方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: ExtractedIonChromatogram

        /// <summary>
        /// Initializes a new instance of the <see cref="ExtractedIonChromatogram"/> class. 
        /// Get the extracted ion chromatogram from the whole drift time scan range.
        /// </summary>
        /// <param name="uimfReader">
        /// The UIMF reader.
        /// </param>
        /// <param name="frameNumber">
        /// The frame number.
        /// </param>
        /// <param name="centerMz">
        /// The MZ.
        /// </param>
        /// <param name="massToleranceInPpm">
        /// The mass Tolerance In Ppm.
        /// </param>
        public ExtractedIonChromatogram(DataReader uimfReader, int frameNumber, double centerMz, double massToleranceInPpm)
        {
            FrameParams param = uimfReader.GetFrameParams(frameNumber);

            this.IntensityPoints = uimfReader.GetXic(
                    centerMz,
                    massToleranceInPpm,
                    frameNumber,
                    frameNumber,
                    1,
                    param.Scans,
                    DataReader.FrameType.MS1,
                    DataReader.ToleranceType.PPM);

            this.CenterMz = centerMz;
            this.MassToleranceInPpm = massToleranceInPpm;
            this.NumberOfMobilityScans = param.Scans;
        }
开发者ID:PNNL-Comp-Mass-Spec,项目名称:IMS-Informed-Library,代码行数:34,代码来源:ExtractedIonChromatogram.cs

示例2: ExportMzML

        public bool ExportMzML(string sourceUIMFPath, string outputPath, VoltageGroup voltageGroup, DataReader originalUIMF, bool averageNotSum)
        {
            FrameParams frameParam = originalUIMF.GetFrameParams(voltageGroup.FirstFrameNumber);
            GlobalParams globalParams = originalUIMF.GetGlobalParams();

            this.scans = (int)frameParam.GetValueDouble(FrameParamKeyType.Scans);
            this.bins = (int)globalParams.GetValueDouble(GlobalParamKeyType.Bins);

            this.calibrationSlope = frameParam.GetValueDouble(FrameParamKeyType.CalibrationSlope);
            this.calibrationIntercept = frameParam.GetValueDouble(FrameParamKeyType.CalibrationIntercept);
            this.binWidth = globalParams.GetValueDouble(GlobalParamKeyType.BinWidth);
            this.tofCorrectionTime = globalParams.GetValueDouble(GlobalParamKeyType.TOFCorrectionTime);

            if (File.Exists(outputPath))
            {
                File.Delete(outputPath);
            }

            this.dateTime = globalParams.GetValue(GlobalParamKeyType.DateStarted);
            string datasetName = Path.GetFileNameWithoutExtension(outputPath);

            XmlWriterSettings settings = new XmlWriterSettings();
            settings.Indent = true;

            using (XmlWriter writer = XmlWriter.Create(outputPath, settings))
            {
                writer.WriteStartDocument();
                writer.WriteStartElement("mzML", "http://psi.hupo.org/ms/mzml");
                writer.WriteAttributeString("id", datasetName);
                writer.WriteAttributeString("version", "1.1.0");
                writer.WriteAttributeString("xmlns", "xls", string.Empty, "http://www.w3.org/2001/XMLSchema-instance");
                writer.WriteAttributeString("xmlns", "schemaLocation", string.Empty, "http://psi.hupo.org/ms/mzml http://psidev.info/files/ms/mzML/xsd/mzML1.1.0.xsd");
                this.WriteCVList(writer);
                this.WriteFileDescription(writer, sourceUIMFPath);
                this.WriteSoftwareList(writer);
                this.WriteInstrumentConfigurationList(writer);
                this.WriteDataProcessingList(writer);
                this.WriteRun(writer, outputPath, originalUIMF, voltageGroup);
                writer.WriteEndElement();
                writer.WriteEndDocument();
                return true;
            }
        }
开发者ID:PNNL-Comp-Mass-Spec,项目名称:IMS-Informed-Library,代码行数:43,代码来源:RetentionMobilitySwappedMzMLExporter.cs

示例3: MaxGlobalIntensities

        public static double MaxGlobalIntensities(VoltageGroup group, DataReader reader)
        {
            GlobalParams global = reader.GetGlobalParams();
            FrameParams param = reader.GetFrameParams(@group.FirstFrameNumber);
            int firstFrame = group.FirstFrameNumber;
            int lastFrame = group.LastFrameNumber;
            int firstScan = 1;
            int lastScan = param.Scans;
            int firstBin = 0;
            int lastBin = global.Bins;
            int windowOfBins = 1000;
            int windowOfScans = 20;
            double maxIntensities = 0;
            for (int scan = firstScan; scan <= lastScan; scan += windowOfScans)
            {
                int endScan = (scan + windowOfScans > lastScan) ? lastScan : scan + windowOfScans;
                for (int bin = firstBin; bin <= lastBin; bin += windowOfBins)
                {
                    int endBin = (bin + windowOfBins > lastBin) ? lastBin : bin + windowOfBins;

                    double localMaxIntensities = MaxGlobalIntensities(reader, scan, endScan, bin, endBin, firstFrame, lastFrame);
                    maxIntensities = (localMaxIntensities > maxIntensities) ? localMaxIntensities : maxIntensities;
                }
            }
            return maxIntensities;
        }
开发者ID:PNNL-Comp-Mass-Spec,项目名称:IMS-Informed-Library,代码行数:26,代码来源:IMSUtil.cs

示例4: MaxIntensityAfterFrameAccumulation

 /// <summary>
 /// return the maximum intensity value possible for a given voltage group
 /// Note currently supports 8-bit digitizers, proceeds with caution when
 /// dealing with 12-bit digitizers
 /// </summary>
 /// <param name="group">
 /// The group.
 /// </param>
 /// <param name="reader">
 /// The reader.
 /// </param>
 /// <returns>
 /// The <see cref="double"/>.
 /// </returns>
 public static double MaxIntensityAfterFrameAccumulation(VoltageGroup group, DataReader reader)
 {
     return 255 * group.FrameAccumulationCount * reader.GetFrameParams(group.FirstFrameNumber).GetValueInt32(FrameParamKeyType.Accumulations);
 }
开发者ID:PNNL-Comp-Mass-Spec,项目名称:IMS-Informed-Library,代码行数:18,代码来源:IMSUtil.cs


注:本文中的DataReader.GetFrameParams方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。