Kstars

skybackground.h
1/*
2 SPDX-FileCopyrightText: 2004 Jasem Mutlaq
3 SPDX-FileCopyrightText: 2020 Eric Dejouhanet <eric.dejouhanet@gmail.com>
4
5 SPDX-License-Identifier: GPL-2.0-or-later
6
7 Some code fragments were adapted from Peter Kirchgessner's FITS plugin
8 SPDX-FileCopyrightText: Peter Kirchgessner <http://members.aol.com/pkirchg>
9*/
10
11#pragma once
12
13class SkyBackground
14{
15 public:
16 // Must call initialize() if using the default constructor;
17 SkyBackground() {}
18 SkyBackground(double m, double sig, double np);
19 virtual ~SkyBackground() = default;
20
21 // Mean of the background level (ADUs).
22 double mean {0};
23 // Standard deviation of the background level.
24 double sigma {0};
25 // Number of pixels used to estimate the background level.
26 int numPixelsInSkyEstimate {0};
27
28 // Number of stars detected in the sky. A relative measure of sky quality
29 // (compared with the same part of the sky at a different time).
30 int starsDetected {0};
31
32 // Given a source with flux spread over numPixels, and a CCD with gain = ADU/#electron)
33 // returns an SNR estimate.
34 double SNR(double flux, double numPixels, double gain = 0.5) const;
35 void initialize(double mean_, double sigma_, double numPixelsInSkyEstimate_, int numStars_ = 0);
36 void setStarsDetected(int numStars)
37 {
38 starsDetected = numStars;
39 }
40
41 private:
42 double varSky = 0;
43};
44
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 4 2024 16:38:43 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.