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

Last change on this file since 1109 was 1104, checked in by ansari, 25 years ago

Heritage classe Image<T> de TMatrix<T> Reza+CMV 27/7/2000

File size: 1.4 KB
RevLine 
[220]1/* Caracteristique du CCD Reza 03/95 -*- C++ -*- */
2
3#ifndef DYNCCD_H_SEEN
4#define DYNCCD_H_SEEN
5
[244]6#include "machdefs.h"
7#include "pexceptions.h"
[1104]8#include "cimage.h"
[220]9#include "ppersist.h"
10
[896]11namespace SOPHYA {
12
[220]13enum {kConstantNoise = 0, kPhotonNoise, kSigFondNoise, kSqrtADUNoise};
14
[896]15class DynCCD
[220]16{
17 public :
18
19 int_4 TypNoise; // Type de calcul du bruit
[1104]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) */
[220]25
26/* ===> Les methodes */
[1104]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.);
[220]29
[1104]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.);
[220]32 void Print();
[1104]33 r_8 Noise(r_8 pixel) const;
[220]34};
35
[896]36} // Fin du namespace
37
[220]38
39template <class T>
[1104]40Image<T> NoiseImage(Image<T> const & pim, DynCCD const & dynccd);
[220]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);
[1104]50 c.PutR8s(&data.MinADU, 6);
[220]51 return c;
52}
53
54inline
55PInPersist& operator >> (PInPersist& c, DynCCD& data)
56{
57 c.GetI4(data.TypNoise);
[1104]58 c.GetR8s(&data.MinADU, 6);
[220]59 return c;
60}
61
62
[896]63
[1104]64
[220]65#endif
Note: See TracBrowser for help on using the repository browser.