File indexing completed on 2024-04-14 14:10:37
0001 /* 0002 SPDX-FileCopyrightText: 2004 Jasem Mutlaq 0003 SPDX-FileCopyrightText: 2020 Eric Dejouhanet <eric.dejouhanet@gmail.com> 0004 0005 SPDX-License-Identifier: GPL-2.0-or-later 0006 0007 Some code fragments were adapted from Peter Kirchgessner's FITS plugin 0008 SPDX-FileCopyrightText: Peter Kirchgessner <http://members.aol.com/pkirchg> 0009 */ 0010 0011 #pragma once 0012 0013 #include "fitsstardetector.h" 0014 #include "skybackground.h" 0015 0016 class FITSSEPDetector : public FITSStarDetector 0017 { 0018 Q_OBJECT 0019 0020 public: 0021 explicit FITSSEPDetector(FITSData * data): FITSStarDetector(data) {}; 0022 0023 /** @brief Find sources in the parent FITS data file. 0024 * @see FITSStarDetector::findSources(). 0025 */ 0026 QFuture<bool> findSources(QRect const &boundary = QRect()) override; 0027 0028 /** @brief Find sources in the parent FITS data file as well as background sky information. 0029 */ 0030 bool findSourcesAndBackground(QRect const &boundary = QRect()); 0031 0032 protected: 0033 /** @internal Consolidate a float data buffer from FITS data. 0034 * @param buffer is the destination float block. 0035 * @param x, y, w, h define a (x,y)-(x+w,y+h) sub-frame to extract from the FITS data out to block 'buffer'. 0036 * @param image_data is the FITS data block to extract from. 0037 */ 0038 template <typename T> 0039 void getFloatBuffer(float * buffer, int x, int y, int w, int h, FITSData const * image_data) const; 0040 0041 private: 0042 0043 void clearSolver(); 0044 0045 // int numStars = 100; 0046 // double fractionRemoved = 0.2; 0047 // int deblendNThresh = 32; 0048 // double deblendMincont = 0.005; 0049 // bool radiusIsBoundary = true; 0050 }; 0051