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

Last change on this file since 757 was 244, checked in by ansari, 26 years ago

beaucoup modifs rz+cmv 22/4/99

File size: 1.6 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 "ppersist.h"
9
10enum {kConstantNoise = 0, kPhotonNoise, kSigFondNoise, kSqrtADUNoise};
11
12class DynCCD EXC_AWARE
13{
14 public :
15
16 int_4 TypNoise; // Type de calcul du bruit
17 float MinADU,MaxADU; // Valeur min et max des pixels
18 float Gain; // Gain en electron/ADU
19 float RONoise; // Bruit de lecture en electron
20 float RefFond; // Fond de ciel de ref (TypNoise=2)
21 float RefSFond; // Sigma du fond (TypNoise=2) */
22
23/* ===> Les methodes */
24 DynCCD(int typ=0, float min=-9.e19, float max=9.e19,
25 float g=1., float ron=0., float rf=0., float rfs=0.);
26
27 void Set(int typ=0, float min=-9.e19, float max=9.e19,
28 float g=1., float ron=0., float rf=0., float rfs=0.);
29 void Print();
30 float Noise(float pixel) const;
31};
32
33// Quelques fonctions pour manipuler des images de bruit
34
35class RzImage;
36RzImage * NoiseImage(RzImage const *pim, DynCCD const * dynccd);
37
38template <class T> class Image;
39
40template <class T>
41Image<T> * NoiseImage(Image<T> const * pim, DynCCD const * dynccd);
42
43template <class T>
44void ImgAddNoise(Image<T>&, DynCCD const&);
45
46// Les entrees-sortie
47
48inline POutPersist& operator << (POutPersist& c, DynCCD const& data)
49{
50 c.PutI4(data.TypNoise);
51 c.PutR4s(&data.MinADU, 6);
52 return c;
53}
54
55inline
56PInPersist& operator >> (PInPersist& c, DynCCD& data)
57{
58 c.GetI4(data.TypNoise);
59 c.GetR4s(&data.MinADU, 6);
60 return c;
61}
62
63//STRUCTPERSISTIO(DynCCD, TypNoise, sizeof(int_4)+6*sizeof(float))
64
65#endif
Note: See TracBrowser for help on using the repository browser.