private LeastSquareFittedAstrometry GetSolution(DistanceBasedContext.FieldAlignmentResult alignmentResult)
 {
     return alignmentResult != null
         ? ((LeastSquareFittedAstrometry)alignmentResult.ImprovedSolution ?? (LeastSquareFittedAstrometry)alignmentResult.Solution)
         : null;
 }
        public DistanceBasedAstrometrySolver(
            IOperationNotifier operationNotifier,
			AstroPlate plateConfig, 
			IAstrometrySettings fitSettings, 
			List<IStar> celestialStars,
			bool determineAutoLimitMagnitude)
        {
            m_PlateConfig = plateConfig;
            m_FitSettings = fitSettings;
            m_CelestialStars = celestialStars;
            m_DetermineAutoLimitMagnitude = determineAutoLimitMagnitude;

            m_OperationNotifier = operationNotifier;

            Context = new DistanceBasedContext(operationNotifier, plateConfig, fitSettings, fitSettings.MaxResidualInPixels, m_AstrometryMinMag, m_AstrometryMaxMag);
        }