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

Last change on this file since 989 was 896, checked in by ansari, 25 years ago

Documentation- namespace, utils.cc mis ds SysTools - Reza 12/4/2000

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