1 /*  SextractorSolver, StellarSolver Internal Library developed by Robert Lancaster, 2020
2 
3     This application is free software; you can redistribute it and/or
4     modify it under the terms of the GNU General Public
5     License as published by the Free Software Foundation; either
6     version 2 of the License, or (at your option) any later version.
7 */
8 #include "sextractorsolver.h"
9 
10 using namespace SSolver;
11 
SextractorSolver(ProcessType pType,ExtractorType eType,SolverType sType,const FITSImage::Statistic & statistics,uint8_t const * imageBuffer,QObject * parent)12 SextractorSolver::SextractorSolver(ProcessType pType, ExtractorType eType, SolverType sType,
13                                    const FITSImage::Statistic &statistics, uint8_t const *imageBuffer, QObject *parent) :
14     QThread(parent), m_ProcessType(pType), m_ExtractorType(eType), m_SolverType(sType), m_Statistics(statistics),
15     m_ImageBuffer(imageBuffer)
16 {
17 }
18 
~SextractorSolver()19 SextractorSolver::~SextractorSolver()
20 {
21 
22 }
23 
24 //This is a convenience function used to set all the scale parameters based on the FOV high and low values wit their units.
setSearchScale(double fov_low,double fov_high,ScaleUnits units)25 void SextractorSolver::setSearchScale(double fov_low, double fov_high, ScaleUnits units)
26 {
27     m_UseScale = true;
28     //L
29     scalelo = fov_low;
30     //H
31     scalehi = fov_high;
32     //u
33     scaleunit = units;
34 }
35 
36 //This is a convenience function used to set all the search position parameters based on the ra, dec, and radius
37 //Warning!!  This method accepts the RA in degrees just like the DEC
setSearchPositionInDegrees(double ra,double dec)38 void SextractorSolver::setSearchPositionInDegrees(double ra, double dec)
39 {
40     m_UsePosition = true;
41     //3
42     search_ra = ra;
43     //4
44     search_dec = dec;
45 }
46 
execute()47 void SextractorSolver::execute()
48 {
49     run();
50 }
51