Esempio n. 1
0
 protected override void RunTest(Dictionary <string, Flag> flags, Evel.interfaces.IProject project)
 {
     if (!stype)
     {
         List <ISpectrum> spectra = new List <ISpectrum>();
         foreach (ISpectraContainer container in project.Containers)
         {
             spectra.Add(container.Spectra[0]);
         }
         Console.Write("Fitting first spectra... ");
         project.FirstSpectraSearch(spectra);
         Console.WriteLine("Done!");
         foreach (ISpectrum spectrum in spectra)
         {
             Console.WriteLine("\t{0} chisq: {1}", spectrum.Name, spectrum.Fit);
         }
     }
     else
     {
         Console.WriteLine("Fitting series of spectra... ");
         project.SearchProgressChanged += progressHandler;
         project.SeriesSearch(null, project.Containers);
         Console.WriteLine("Done! Global chisq: {0}", project.Fit);
         project.SearchProgressChanged -= progressHandler;
     }
 }
Esempio n. 2
0
        protected override void RunTest(Dictionary <string, Flag> flags, Evel.interfaces.IProject project)
        {
            ISpectrum spectrum = project.Containers[docid].Spectra[sid];
            //AnhProject anhproject = (AnhProject)project;
            AnhSpectraContainer container = (AnhSpectraContainer)spectrum.Container;

            project.FirstSpectraSearch(new ISpectrum[] { spectrum });
            Console.WriteLine("{0} chisq: {1}", spectrum.Name, spectrum.Fit);
        }
Esempio n. 3
0
        protected override void RunTest(Dictionary <string, Flag> flags, Evel.interfaces.IProject project)
        {
            //Console.WriteLine(project.Containers[docid].GetType().Assembly.Location);
            //Console.WriteLine(typeof(AnhSpectraContainer).Assembly.Location);
            //Console.ReadLine();
            //ISpectrum spectrum = project.Containers[docid].Spectra[sid];
            project.FirstSpectraSearchProgressChanged += new System.ComponentModel.ProgressChangedEventHandler(project_FirstSpectraSearchProgressChanged);
            project.FirstSpectraSearchCompleted       += new AsyncFirstSpectraSearchCompletedEventHandler(project_FirstSpectraSearchCompleted);
            List <ISpectrum> spectra = new List <ISpectrum>();

            foreach (ISpectraContainer doc in project.Containers)
            {
                if (doc.Enabled)
                {
                    spectra.Add(doc.Spectra[0]);
                }
            }
            project.FirstSpectraSearch(spectra);
        }