Esempio n. 1
0
            public NulDatas(SpectrConditionCompiledLine line)
            {
                Line = line;
                DevReg.SimpleTimeCorrection(Common.Dev, line.CommonTime,
                                            line.Expositions, out CommonTime, out Exps);
                int common_time = 0;
                int n           = 8;
                int max_exp     = Exps[0];

                for (int i = 1; i < Exps.Length; i++)
                {
                    if (max_exp < Exps[i])
                    {
                        max_exp = Exps[i];
                    }
                }
                common_time = max_exp * n;
                while (common_time < CommonTime)
                {
                    bool is_good = true;
                    for (int i = 0; i < Exps.Length; i++)
                    {
                        if ((common_time % (Exps[i])) != 0)
                        {
                            is_good = false;
                            break;
                        }
                    }
                    if (is_good)
                    {
                        CommonTime = common_time;
                        break;
                    }
                    n++;
                    common_time = max_exp * n;
                }
                DbFolder folder      = Common.Db.GetFolder(Common.DbNameNulFolder);
                string   record_name = line.CommonTime + "[";

                for (int i = 0; i < line.Expositions.Length; i++)
                {
                    if (i != 0)
                    {
                        record_name += " ";
                    }
                    record_name += line.Expositions[i];
                }
                record_name += "]";
                Path         = folder.GetRecordPath(record_name);
                Load();
            }
Esempio n. 2
0
 public Dev(DevReg reg, DevGen gen,
            DevFillLight fill,
            DevGas gas)//, CONInterf interf)
 {
     Reg = reg;
     reg.Init(this); //, interf);
     Gen = gen;
     gen.Init(this); //, interf);
     Fill = fill;
     Fill.Init(this);
     Gas = gas;
     Gas.Init(this);
     //Interf = interf;
 }
Esempio n. 3
0
        public short[][] GetNull(SpectrConditionCompiledLine line, out short[][] blank_start, out short[][] blank_end)
        {
            if (Common.Conf.UseGoodNul != false)
            {
                blank_start = null;
                blank_end   = null;
                for (int i = 0; i < NulStorage.Count; i++)
                {
                    if (NulStorage[i].Line.IsExpositionEqual(line, false))
                    {
                        return(NulStorage[i].GetData(out blank_start, out blank_end));
                    }
                }
            }
            int common;

            int[] exps;
            DevReg.SimpleTimeCorrection(Common.Dev, line.CommonTime,
                                        line.Expositions, out common, out exps);
            return(RegFrame(common, exps, out blank_start, out blank_end));
        }
Esempio n. 4
0
 public void CorrectExposition(float common_time, float[] exps,
                               out int common_i, out int[] exps_i)
 {
     DevReg.SimpleTimeCorrection(this, common_time, exps, out common_i, out exps_i);
 }
Esempio n. 5
0
 public void CorrectExposition(SpectrConditionCompiledLine line,
                               out int common_i, out int[] exps_i)
 {
     DevReg.SimpleTimeCorrection(this, line.CommonTime, line.Expositions, out common_i, out exps_i);
 }