Kstars

stellarsolverprofile.cpp
1/*
2 SPDX-FileCopyrightText: 2017 Jasem Mutlaq <mutlaqja@ikarustech.com>
3 SPDX-FileCopyrightText: 2017 Robert Lancaster <rlancaste@gmail.com>
4
5 SPDX-License-Identifier: GPL-2.0-or-later
6*/
7
8#include "stellarsolverprofile.h"
9
10#include <stellarsolver.h>
11#include <KLocalizedString>
12
13namespace Ekos
14{
15
16QList<Parameters> getDefaultFocusOptionsProfiles()
17{
18 QList<Parameters> profileList;
19
20 Parameters focusDefault = getFocusOptionsProfileDefault();
21 profileList.append(focusDefault);
22
23 Parameters focusDefaultDonut = getFocusOptionsProfileDefaultDonut();
24 profileList.append(focusDefaultDonut);
25
26 Parameters stars;
27 stars.listName = "2-AllStars";
28 stars.description = i18n("Profile for the source extraction of all the stars in an image.");
29 stars.maxEllipse = 1.5;
30 stars.convFilterType = SSolver::CONV_GAUSSIAN;
31 stars.fwhm = 1;
32 stars.r_min = 2;
33 profileList.append(stars);
34
35 Parameters smallStars;
36 smallStars.listName = "3-SmallSizedStars";
37 smallStars.description = i18n("Profile optimized for source extraction of smaller stars.");
38 smallStars.maxEllipse = 1.5;
39 smallStars.convFilterType = SSolver::CONV_GAUSSIAN;
40 smallStars.fwhm = 1;
41 smallStars.r_min = 2;
42 smallStars.maxSize = 5;
43 smallStars.initialKeep = 500;
44 smallStars.saturationLimit = 80;
45 profileList.append(smallStars);
46
47 Parameters mid;
48 mid.listName = "4-MidSizedStars";
49 mid.description = i18n("Profile optimized for source extraction of medium sized stars.");
50 mid.maxEllipse = 1.5;
51 mid.minarea = 20;
52 mid.convFilterType = SSolver::CONV_GAUSSIAN;
53 mid.fwhm = 4;
54 mid.r_min = 5;
55 mid.removeDimmest = 20;
56 mid.minSize = 2;
57 mid.maxSize = 10;
58 mid.initialKeep = 500;
59 mid.saturationLimit = 80;
60 profileList.append(mid);
61
62 Parameters big;
63 big.listName = "5-BigSizedStars";
64 big.description = i18n("Profile optimized for source extraction of larger stars.");
65 big.maxEllipse = 1.5;
66 big.minarea = 40;
67 big.convFilterType = SSolver::CONV_GAUSSIAN;
68 big.fwhm = 8;
69 big.r_min = 20;
70 big.minSize = 5;
71 big.initialKeep = 500;
72 big.removeDimmest = 50;
73 profileList.append(big);
74
75 return profileList;
76}
77
78SSolver::Parameters getFocusOptionsProfileDefault()
79{
80 Parameters focusDefault;
81 focusDefault.listName = FOCUS_DEFAULT_NAME;
82 focusDefault.description = i18n("Default focus star-extraction.");
83 focusDefault.initialKeep = 250;
84 focusDefault.keepNum = 100;
85 focusDefault.minarea = 20;
86 focusDefault.maxEllipse = 1.5;
87 focusDefault.convFilterType = SSolver::CONV_DEFAULT;
88 focusDefault.deblend_contrast = 1.0; // Turns off deblending - no benefit for focus and sometimes causes issues
89 focusDefault.fwhm = 1;
90 focusDefault.r_min = 5;
91 focusDefault.maxSize = 10;
92 focusDefault.removeBrightest = 10;
93 focusDefault.removeDimmest = 20;
94 focusDefault.saturationLimit = 90;
95 return focusDefault;
96}
97
98SSolver::Parameters getFocusOptionsProfileDefaultDonut()
99{
100 Parameters focusDefaultDonut;
101 focusDefaultDonut.listName = FOCUS_DEFAULT_DONUT_NAME;
102 focusDefaultDonut.description = i18n("Profile optimized for source extraction of stars including Donuts.");
103 focusDefaultDonut.initialKeep = 10000;
104 focusDefaultDonut.keepNum = 1000;
105 focusDefaultDonut.minarea = 20;
106 focusDefaultDonut.maxEllipse = 1.5;
107 focusDefaultDonut.convFilterType = SSolver::CONV_DEFAULT;
108 focusDefaultDonut.deblend_contrast = 1.0;
109 focusDefaultDonut.r_min = 5;
110 focusDefaultDonut.maxSize = 0.0;
111 focusDefaultDonut.removeBrightest = 0.0;
112 focusDefaultDonut.removeDimmest = 0.0;
113 focusDefaultDonut.saturationLimit = 90.0;
114 return focusDefaultDonut;
115}
116
117QList<SSolver::Parameters> getDefaultGuideOptionsProfiles()
118{
119 QList<SSolver::Parameters> profileList;
120
121 Parameters guideDefault;
122 guideDefault.listName = "1-Guide-Default";
123 guideDefault.description = i18n("Default guider star-extraction.");
124 guideDefault.initialKeep = 250;
125 guideDefault.keepNum = 100;
126 guideDefault.minarea = 10;
127 guideDefault.maxSize = 8;
128 guideDefault.saturationLimit = 98;
129 guideDefault.removeBrightest = 0;
130 guideDefault.removeDimmest = 0;
131 profileList.append(guideDefault);
132
133 SSolver::Parameters stars;
134 stars.listName = "2-AllStars";
135 stars.description = i18n("Profile for the source extraction of all the stars in an image.");
136 stars.maxEllipse = 1.5;
137 stars.convFilterType = SSolver::CONV_GAUSSIAN;
138 stars.fwhm = 1;
139 stars.r_min = 2;
140 profileList.append(stars);
141
142 SSolver::Parameters smallStars;
143 smallStars.listName = "3-SmallSizedStars";
144 smallStars.description = i18n("Profile optimized for source extraction of smaller stars.");
145 smallStars.maxEllipse = 1.5;
146 smallStars.convFilterType = SSolver::CONV_GAUSSIAN;
147 smallStars.fwhm = 1;
148 smallStars.r_min = 2;
149 smallStars.maxSize = 5;
150 smallStars.initialKeep = 500;
151 smallStars.saturationLimit = 80;
152 profileList.append(smallStars);
153
154 SSolver::Parameters mid;
155 mid.listName = "4-MidSizedStars";
156 mid.description = i18n("Profile optimized for source extraction of medium sized stars.");
157 mid.maxEllipse = 1.5;
158 mid.minarea = 20;
159 mid.convFilterType = SSolver::CONV_GAUSSIAN;
160 mid.fwhm = 4;
161 mid.r_min = 5;
162 mid.removeDimmest = 20;
163 mid.minSize = 2;
164 mid.maxSize = 10;
165 mid.initialKeep = 500;
166 mid.saturationLimit = 80;
167 profileList.append(mid);
168
169 SSolver::Parameters big;
170 big.listName = "5-BigSizedStars";
171 big.description = i18n("Profile optimized for source extraction of larger stars.");
172 big.maxEllipse = 1.5;
173 big.minarea = 40;
174 big.convFilterType = SSolver::CONV_GAUSSIAN;
175 big.fwhm = 8;
176 big.r_min = 20;
177 big.minSize = 5;
178 big.initialKeep = 500;
179 big.removeDimmest = 50;
180 profileList.append(big);
181
182 return profileList;
183}
184
185QList<SSolver::Parameters> getDefaultAlignOptionsProfiles()
186{
187 QList<SSolver::Parameters> profileList;
188
189 SSolver::Parameters defaultProfile;
190 defaultProfile.listName = "1-Default";
191 defaultProfile.description = i18n("Default profile. Generic and not optimized for any specific purpose.");
192 defaultProfile.convFilterType = SSolver::CONV_GAUSSIAN;
193 defaultProfile.fwhm = 1;
194 profileList.append(defaultProfile);
195
196 SSolver::Parameters fastSolving;
197 fastSolving.listName = "2-SingleThreadSolving";
198 fastSolving.description = i18n("Profile intended for Plate Solving telescopic sized images in a single CPU Thread");
199 fastSolving.multiAlgorithm = NOT_MULTI;
200 fastSolving.minwidth = 0.1;
201 fastSolving.maxwidth = 10;
202 fastSolving.keepNum = 50;
203 fastSolving.initialKeep = 500;
204 fastSolving.maxEllipse = 1.5;
205 fastSolving.convFilterType = SSolver::CONV_GAUSSIAN;
206 fastSolving.fwhm = 4;
207 profileList.append(fastSolving);
208
209 SSolver::Parameters parLargeSolving;
210 parLargeSolving.listName = "3-LargeScaleSolving";
211 parLargeSolving.description = i18n("Profile intended for Plate Solving camera lens sized images");
212 parLargeSolving.minwidth = 10;
213 parLargeSolving.maxwidth = 180;
214 parLargeSolving.keepNum = 50;
215 parLargeSolving.initialKeep = 500;
216 parLargeSolving.maxEllipse = 1.5;
217 parLargeSolving.convFilterType = SSolver::CONV_GAUSSIAN;
218 parLargeSolving.fwhm = 4;
219 profileList.append(parLargeSolving);
220
221 SSolver::Parameters fastSmallSolving;
222 fastSmallSolving.listName = "4-SmallScaleSolving";
223 fastSmallSolving.description = i18n("Profile intended for Plate Solving telescopic sized images");
224 fastSmallSolving.minwidth = 0.1;
225 fastSmallSolving.maxwidth = 10;
226 fastSmallSolving.keepNum = 50;
227 fastSmallSolving.initialKeep = 500;
228 fastSmallSolving.maxEllipse = 1.5;
229 fastSmallSolving.convFilterType = SSolver::CONV_GAUSSIAN;
230 fastSmallSolving.fwhm = 4;
231 profileList.append(fastSmallSolving);
232
233 return profileList;
234}
235
236QList<Parameters> getDefaultHFROptionsProfiles()
237{
238 QList<Parameters> profileList;
239
240 Parameters hfrDefault;
241 hfrDefault.listName = "1-HFR-Default";
242 hfrDefault.description = i18n("Default. Set for typical HFR estimation.");
243 hfrDefault.initialKeep = 250;
244 hfrDefault.keepNum = 100;
245
246 hfrDefault.minarea = 20;
247 hfrDefault.maxEllipse = 1.5;
248 hfrDefault.convFilterType = SSolver::CONV_GAUSSIAN;
249 hfrDefault.fwhm = 2;
250 hfrDefault.r_min = 5;
251 hfrDefault.maxSize = 10;
252
253 hfrDefault.removeBrightest = 10;
254 hfrDefault.removeDimmest = 20;
255 hfrDefault.saturationLimit = 90;
256
257 profileList.append(hfrDefault);
258
259
260 Parameters big;
261 big.listName = "2-BigSizedStars";
262 big.description = i18n("Set for typical HFR estimation on big stars.");
263 big.initialKeep = 250;
264 big.keepNum = 100;
265
266 big.minarea = 40;
267 big.maxEllipse = 1.5;
268 big.convFilterType = SSolver::CONV_GAUSSIAN;
269 big.fwhm = 8;
270 big.r_min = 20;
271 big.maxSize = 0;
272
273 big.removeBrightest = 0;
274 big.removeDimmest = 50;
275 big.saturationLimit = 99;
276
277 profileList.append(big);
278
279 Parameters most;
280 most.listName = "3-MostStars";
281 most.description = i18n("Set for HFR estimation on most stars.");
282 most.initialKeep = 1000;
283 most.keepNum = 1000;
284
285 most.minarea = 10;
286 most.maxEllipse = 0;
287 most.convFilterType = SSolver::CONV_GAUSSIAN;
288 most.fwhm = 1;
289 most.r_min = 3.5;
290 most.minSize = 0;
291 most.maxSize = 0;
292
293 most.removeBrightest = 0;
294 most.removeDimmest = 0;
295 most.saturationLimit = 0;
296 profileList.append(most);
297
298 return profileList;
299}
300
301}
QString i18n(const char *text, const TYPE &arg...)
Ekos is an advanced Astrophotography tool for Linux.
Definition align.cpp:83
void append(QList< T > &&value)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:16:40 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.