Ejemplo n.º 1
0
        public override Spectrum GetSpectrum()
        {
            Spectrum spec = new Spectrum(zero, keVPerChannel, counts);

            spec.SetRealTime(realTime);
            spec.SetLiveTime(liveTime);
            spec.SetStartTime(startDateTime);
            return(spec);
        }
Ejemplo n.º 2
0
        public override ReturnCode Compile(List <string> sourceFiles, DateTime start, DateTime end, string targetFileName)
        {
            if (sourceFiles.Count() == 0)
            {
                return(ReturnCode.FAIL);
            }

            spectrumParser.ParseSpectrumFile(sourceFiles[0]);
            Spectrum result = spectrumParser.GetSpectrum();

            for (int f = 1; f < sourceFiles.Count(); f++)
            {
                spectrumParser.ParseSpectrumFile(sourceFiles[f]);
                result.Add(spectrumParser.GetSpectrum());
            }
            ;
            result.SetStartTime(start);
            spectrumWriter.SetSpectrum(result);
            spectrumWriter.WriteSpectrumFile(targetFileName);
            return(ReturnCode.SUCCESS);
        }