File indexing completed on 2024-04-28 03:43:09
0001 /* 0002 SPDX-FileCopyrightText: 2017 Jasem Mutlaq <mutlaqja@ikarustech.com> 0003 SPDX-FileCopyrightText: 2017 Robert Lancaster <rlancaste@gmail.com> 0004 0005 SPDX-License-Identifier: GPL-2.0-or-later 0006 */ 0007 0008 #include "stellarsolverprofile.h" 0009 0010 #include <stellarsolver.h> 0011 #include <KLocalizedString> 0012 0013 namespace Ekos 0014 { 0015 0016 QList<Parameters> getDefaultFocusOptionsProfiles() 0017 { 0018 QList<Parameters> profileList; 0019 0020 Parameters focusDefault; 0021 focusDefault.listName = "1-Focus-Default"; 0022 focusDefault.description = i18n("Default focus star-extraction."); 0023 focusDefault.initialKeep = 250; 0024 focusDefault.keepNum = 100; 0025 focusDefault.minarea = 20; 0026 focusDefault.maxEllipse = 1.5; 0027 focusDefault.convFilterType = SSolver::CONV_GAUSSIAN; 0028 focusDefault.fwhm = 1; 0029 focusDefault.r_min = 5; 0030 focusDefault.maxSize = 10; 0031 focusDefault.removeBrightest = 10; 0032 focusDefault.removeDimmest = 20; 0033 focusDefault.saturationLimit = 90; 0034 profileList.append(focusDefault); 0035 0036 Parameters stars; 0037 stars.listName = "2-AllStars"; 0038 stars.description = i18n("Profile for the source extraction of all the stars in an image."); 0039 stars.maxEllipse = 1.5; 0040 stars.convFilterType = SSolver::CONV_GAUSSIAN; 0041 stars.fwhm = 1; 0042 stars.r_min = 2; 0043 profileList.append(stars); 0044 0045 Parameters smallStars; 0046 smallStars.listName = "3-SmallSizedStars"; 0047 smallStars.description = i18n("Profile optimized for source extraction of smaller stars."); 0048 smallStars.maxEllipse = 1.5; 0049 smallStars.convFilterType = SSolver::CONV_GAUSSIAN; 0050 smallStars.fwhm = 1; 0051 smallStars.r_min = 2; 0052 smallStars.maxSize = 5; 0053 smallStars.initialKeep = 500; 0054 smallStars.saturationLimit = 80; 0055 profileList.append(smallStars); 0056 0057 Parameters mid; 0058 mid.listName = "4-MidSizedStars"; 0059 mid.description = i18n("Profile optimized for source extraction of medium sized stars."); 0060 mid.maxEllipse = 1.5; 0061 mid.minarea = 20; 0062 mid.convFilterType = SSolver::CONV_GAUSSIAN; 0063 mid.fwhm = 4; 0064 mid.r_min = 5; 0065 mid.removeDimmest = 20; 0066 mid.minSize = 2; 0067 mid.maxSize = 10; 0068 mid.initialKeep = 500; 0069 mid.saturationLimit = 80; 0070 profileList.append(mid); 0071 0072 Parameters big; 0073 big.listName = "5-BigSizedStars"; 0074 big.description = i18n("Profile optimized for source extraction of larger stars."); 0075 big.maxEllipse = 1.5; 0076 big.minarea = 40; 0077 big.convFilterType = SSolver::CONV_GAUSSIAN; 0078 big.fwhm = 8; 0079 big.r_min = 20; 0080 big.minSize = 5; 0081 big.initialKeep = 500; 0082 big.removeDimmest = 50; 0083 profileList.append(big); 0084 0085 return profileList; 0086 } 0087 0088 QList<SSolver::Parameters> getDefaultGuideOptionsProfiles() 0089 { 0090 QList<SSolver::Parameters> profileList; 0091 0092 Parameters guideDefault; 0093 guideDefault.listName = "1-Guide-Default"; 0094 guideDefault.description = i18n("Default guider star-extraction."); 0095 guideDefault.initialKeep = 250; 0096 guideDefault.keepNum = 100; 0097 guideDefault.minarea = 10; 0098 guideDefault.maxSize = 8; 0099 guideDefault.saturationLimit = 98; 0100 guideDefault.removeBrightest = 0; 0101 guideDefault.removeDimmest = 0; 0102 profileList.append(guideDefault); 0103 0104 SSolver::Parameters stars; 0105 stars.listName = "2-AllStars"; 0106 stars.description = i18n("Profile for the source extraction of all the stars in an image."); 0107 stars.maxEllipse = 1.5; 0108 stars.convFilterType = SSolver::CONV_GAUSSIAN; 0109 stars.fwhm = 1; 0110 stars.r_min = 2; 0111 profileList.append(stars); 0112 0113 SSolver::Parameters smallStars; 0114 smallStars.listName = "3-SmallSizedStars"; 0115 smallStars.description = i18n("Profile optimized for source extraction of smaller stars."); 0116 smallStars.maxEllipse = 1.5; 0117 smallStars.convFilterType = SSolver::CONV_GAUSSIAN; 0118 smallStars.fwhm = 1; 0119 smallStars.r_min = 2; 0120 smallStars.maxSize = 5; 0121 smallStars.initialKeep = 500; 0122 smallStars.saturationLimit = 80; 0123 profileList.append(smallStars); 0124 0125 SSolver::Parameters mid; 0126 mid.listName = "4-MidSizedStars"; 0127 mid.description = i18n("Profile optimized for source extraction of medium sized stars."); 0128 mid.maxEllipse = 1.5; 0129 mid.minarea = 20; 0130 mid.convFilterType = SSolver::CONV_GAUSSIAN; 0131 mid.fwhm = 4; 0132 mid.r_min = 5; 0133 mid.removeDimmest = 20; 0134 mid.minSize = 2; 0135 mid.maxSize = 10; 0136 mid.initialKeep = 500; 0137 mid.saturationLimit = 80; 0138 profileList.append(mid); 0139 0140 SSolver::Parameters big; 0141 big.listName = "5-BigSizedStars"; 0142 big.description = i18n("Profile optimized for source extraction of larger stars."); 0143 big.maxEllipse = 1.5; 0144 big.minarea = 40; 0145 big.convFilterType = SSolver::CONV_GAUSSIAN; 0146 big.fwhm = 8; 0147 big.r_min = 20; 0148 big.minSize = 5; 0149 big.initialKeep = 500; 0150 big.removeDimmest = 50; 0151 profileList.append(big); 0152 0153 return profileList; 0154 } 0155 0156 QList<SSolver::Parameters> getDefaultAlignOptionsProfiles() 0157 { 0158 QList<SSolver::Parameters> profileList; 0159 0160 SSolver::Parameters defaultProfile; 0161 defaultProfile.listName = "1-Default"; 0162 defaultProfile.description = i18n("Default profile. Generic and not optimized for any specific purpose."); 0163 defaultProfile.convFilterType = SSolver::CONV_GAUSSIAN; 0164 defaultProfile.fwhm = 1; 0165 profileList.append(defaultProfile); 0166 0167 SSolver::Parameters fastSolving; 0168 fastSolving.listName = "2-SingleThreadSolving"; 0169 fastSolving.description = i18n("Profile intended for Plate Solving telescopic sized images in a single CPU Thread"); 0170 fastSolving.multiAlgorithm = NOT_MULTI; 0171 fastSolving.minwidth = 0.1; 0172 fastSolving.maxwidth = 10; 0173 fastSolving.keepNum = 50; 0174 fastSolving.initialKeep = 500; 0175 fastSolving.maxEllipse = 1.5; 0176 fastSolving.convFilterType = SSolver::CONV_GAUSSIAN; 0177 fastSolving.fwhm = 4; 0178 profileList.append(fastSolving); 0179 0180 SSolver::Parameters parLargeSolving; 0181 parLargeSolving.listName = "3-LargeScaleSolving"; 0182 parLargeSolving.description = i18n("Profile intended for Plate Solving camera lens sized images"); 0183 parLargeSolving.minwidth = 10; 0184 parLargeSolving.maxwidth = 180; 0185 parLargeSolving.keepNum = 50; 0186 parLargeSolving.initialKeep = 500; 0187 parLargeSolving.maxEllipse = 1.5; 0188 parLargeSolving.convFilterType = SSolver::CONV_GAUSSIAN; 0189 parLargeSolving.fwhm = 4; 0190 profileList.append(parLargeSolving); 0191 0192 SSolver::Parameters fastSmallSolving; 0193 fastSmallSolving.listName = "4-SmallScaleSolving"; 0194 fastSmallSolving.description = i18n("Profile intended for Plate Solving telescopic sized images"); 0195 fastSmallSolving.minwidth = 0.1; 0196 fastSmallSolving.maxwidth = 10; 0197 fastSmallSolving.keepNum = 50; 0198 fastSmallSolving.initialKeep = 500; 0199 fastSmallSolving.maxEllipse = 1.5; 0200 fastSmallSolving.convFilterType = SSolver::CONV_GAUSSIAN; 0201 fastSmallSolving.fwhm = 4; 0202 profileList.append(fastSmallSolving); 0203 0204 return profileList; 0205 } 0206 0207 QList<Parameters> getDefaultHFROptionsProfiles() 0208 { 0209 QList<Parameters> profileList; 0210 0211 Parameters hfrDefault; 0212 hfrDefault.listName = "1-HFR-Default"; 0213 hfrDefault.description = i18n("Default. Set for typical HFR estimation."); 0214 hfrDefault.initialKeep = 250; 0215 hfrDefault.keepNum = 100; 0216 0217 hfrDefault.minarea = 20; 0218 hfrDefault.maxEllipse = 1.5; 0219 hfrDefault.convFilterType = SSolver::CONV_GAUSSIAN; 0220 hfrDefault.fwhm = 2; 0221 hfrDefault.r_min = 5; 0222 hfrDefault.maxSize = 10; 0223 0224 hfrDefault.removeBrightest = 10; 0225 hfrDefault.removeDimmest = 20; 0226 hfrDefault.saturationLimit = 90; 0227 0228 profileList.append(hfrDefault); 0229 0230 0231 Parameters big; 0232 big.listName = "2-BigSizedStars"; 0233 big.description = i18n("Set for typical HFR estimation on big stars."); 0234 big.initialKeep = 250; 0235 big.keepNum = 100; 0236 0237 big.minarea = 40; 0238 big.maxEllipse = 1.5; 0239 big.convFilterType = SSolver::CONV_GAUSSIAN; 0240 big.fwhm = 8; 0241 big.r_min = 20; 0242 big.maxSize = 0; 0243 0244 big.removeBrightest = 0; 0245 big.removeDimmest = 50; 0246 big.saturationLimit = 99; 0247 0248 profileList.append(big); 0249 0250 Parameters most; 0251 most.listName = "3-MostStars"; 0252 most.description = i18n("Set for HFR estimation on most stars."); 0253 most.initialKeep = 1000; 0254 most.keepNum = 1000; 0255 0256 most.minarea = 10; 0257 most.maxEllipse = 0; 0258 most.convFilterType = SSolver::CONV_GAUSSIAN; 0259 most.fwhm = 1; 0260 most.r_min = 3.5; 0261 most.minSize = 0; 0262 most.maxSize = 0; 0263 0264 most.removeBrightest = 0; 0265 most.removeDimmest = 0; 0266 most.saturationLimit = 0; 0267 profileList.append(most); 0268 0269 return profileList; 0270 } 0271 0272 }