source: Sophya/trunk/SophyaLib/NTools/dynccd.h@ 2367

Last change on this file since 2367 was 1110, checked in by ansari, 25 years ago

on vire imageop.o de objlis.list
instanciations GNU des fct de dynccd.cc Noise... etc...
des fct passees en const dans GeneralFitData
objfitter prend les Histo/Histo2D/HProf/GeneralFitData

cmv 28/7/00

File size: 1.4 KB
Line 
1/* Caracteristique du CCD Reza 03/95 -*- C++ -*- */
2
3#ifndef DYNCCD_H_SEEN
4#define DYNCCD_H_SEEN
5
6#include "machdefs.h"
7#include "pexceptions.h"
8#include "cimage.h"
9#include "ppersist.h"
10
11namespace SOPHYA {
12
13enum {kConstantNoise = 0, kPhotonNoise, kSigFondNoise, kSqrtADUNoise};
14
15class DynCCD
16{
17 public :
18
19 int_4 TypNoise; // Type de calcul du bruit
20 r_8 MinADU,MaxADU; // Valeur min et max des pixels
21 r_8 Gain; // Gain en electron/ADU
22 r_8 RONoise; // Bruit de lecture en electron
23 r_8 RefFond; // Fond de ciel de ref (TypNoise=2)
24 r_8 RefSFond; // Sigma du fond (TypNoise=2) */
25
26/* ===> Les methodes */
27 DynCCD(int_4 typ=0, r_8 min=-9.e19, r_8 max=9.e19,
28 r_8 g=1., r_8 ron=0., r_8 rf=0., r_8 rfs=0.);
29
30 void Set(int_4 typ=0, r_8 min=-9.e19, r_8 max=9.e19,
31 r_8 g=1., r_8 ron=0., r_8 rf=0., r_8 rfs=0.);
32 void Print();
33 r_8 Noise(r_8 pixel) const;
34};
35
36} // Fin du namespace
37
38
39template <class T>
40Image<T> NoiseImage(Image<T> const & pim, DynCCD const & dynccd);
41
42template <class T>
43void ImgAddNoise(Image<T>&, DynCCD const&);
44
45// Les entrees-sortie
46
47inline POutPersist& operator << (POutPersist& c, DynCCD const& data)
48{
49 c.PutI4(data.TypNoise);
50 c.PutR8s(&data.MinADU, 6);
51 return c;
52}
53
54inline
55PInPersist& operator >> (PInPersist& c, DynCCD& data)
56{
57 c.GetI4(data.TypNoise);
58 c.GetR8s(&data.MinADU, 6);
59 return c;
60}
61
62#endif
Note: See TracBrowser for help on using the repository browser.