Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F97277013
d_bruiter.c
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Fri, Jan 3, 23:52
Size
525 B
Mime Type
text/x-c
Expires
Sun, Jan 5, 23:52 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
23371158
Attached To
R1448 Lenstool-HPC
d_bruiter.c
View Options
#include<stdio.h>
#include<math.h>
#include<fonction.h>
#include<constant.h>
#include<dimension.h>
#include<structure.h>
/* Append a Poisson noise to the pixels of image **z
*/
void d_bruiter(double **z, int nx, int ny)
{
extern struct g_observ O;
int i, j;
double res;
for (i = 0; i < ny; i++)
for (j = 0; j < nx; j++)
{
res = z[i][j];
res = (res + O.SKY) * O.gain;
res = floor(d_poisson(res, &O.idum) / O.gain);
z[i][j] = res;
}
}
Event Timeline
Log In to Comment