public MarshalByRefAstrometryProvider(IAstrometryProvider localAstrometryProvider) { if (localAstrometryProvider != null) m_TangraAstrometricSolution = localAstrometryProvider.GetCurrentFrameAstrometricSolution(); else m_TangraAstrometricSolution = null; }
public MarshalByRefAstrometryProvider(IAstrometryProvider localAstrometryProvider) { if (localAstrometryProvider != null) { m_TangraAstrometricSolution = localAstrometryProvider.GetCurrentFrameAstrometricSolution(); } else { m_TangraAstrometricSolution = null; } }
public void Execute() { ITangraAstrometricSolution solution = m_Host.GetAstrometryProvider().GetCurrentFrameAstrometricSolution(); List <ITangraMatchedStar> matchedStars = solution.GetAllMatchedStars(); foreach (ITangraMatchedStar star in matchedStars) { if (star.CatalogStar != null) { List <MeasurementInfo> currentMeasurements; if (!m_MeasurementsPerStar.TryGetValue(star.CatalogStar.StarNo, out currentMeasurements)) { currentMeasurements = new List <MeasurementInfo>(); m_MeasurementsPerStar.Add(star.CatalogStar.StarNo, currentMeasurements); m_CatalogStars.Add(star.CatalogStar); } var mea = new MeasurementInfo() { Intensity = star.Intensity, PsfAmplitude = star.PSFAmplitude, ExcludedForHighResiduals = star.ExcludedForHighResidual, IsSaturated = star.IsSaturated }; var meaInfo = star as ITangraStarMeasurementInfo; if (meaInfo != null) { mea.MeaSignalMethod = meaInfo.MeaSignalMethod; mea.MeaBackgroundMethod = meaInfo.MeaBackgroundMethod; mea.MeaSingleApertureSize = meaInfo.MeaSingleApertureSize; mea.MeaBackgroundPixelCount = meaInfo.MeaBackgroundPixelCount; mea.MeaSaturationLevel = meaInfo.MeaSaturationLevel; } else { mea.MeaSignalMethod = PhotometryReductionMethod.Unknown; mea.MeaBackgroundMethod = BackgroundMethod.Unknown; mea.MeaSingleApertureSize = null; mea.MeaBackgroundPixelCount = 0; mea.MeaSaturationLevel = 0; } currentMeasurements.Add(mea); } } }