Exemplo n.º 1
0
        public Window1ViewModel() {
            var path = Assembly.GetExecutingAssembly().Location;
            var dirPath = Path.GetDirectoryName(path);
            db = new Database {DirectoryPath = dirPath ?? ""};
            db.Load();

            Components = new ObservableCollection<Compo>();

            // au target modified kramers'
            var spe = ArrayFactory.ByFuncDouble(d => ModifiedKramersLaw(79, 1.206, 0.00041, d), 50000);
            var r = new Region(0, 50000);
            fluorescent = new Fluorescent {
                Database = db,
                Conditions = new MeasurementConditions {
                    IncidenceAngle = 60d.ToRadian(),
                    TakeoffAngle = 120d.ToRadian(),
                    Density_g_per_cm3 = 15.0,
                    Thickness_cm = 1.0,
                    TubeSpectrum = new Spectrum(spe, r)
                },
            };

            PropertyChanged += (s, e) => CalculateCommand.RaiseCanExecuteChanged();
            Components.CollectionChanged += (s, e) => CalculateCommand.RaiseCanExecuteChanged();
        }
Exemplo n.º 2
0
        public FluorescentTest()
        {
            db.DirectoryPath = @"C:\Users\X-Bridge Tech\Desktop\data";
            db.Load();

            // au target modified kramers'
            var spe = ArrayFactory.ByFuncDouble(d => ModifiedKramersLaw(79, 1.206, 0.00041, d), 50000);
            var r = new Region(0, 50000);
            fluorescent = new Fluorescent {
                Database = db,
                Conditions = new MeasurementConditions {
                    IncidenceAngle = 60d.ToRadian(),
                    TakeoffAngle = 120d.ToRadian(),
                    Density_g_per_cm3 = 15.0,
                    Thickness_cm = 1.0,
                    TubeSpectrum = new Spectrum(spe, r)
                },
            };
        }