Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F96604428
comp_chi_osv.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
Sat, Dec 28, 19:44
Size
1 KB
Mime Type
text/x-c
Expires
Mon, Dec 30, 19:44 (2 d)
Engine
blob
Format
Raw Data
Handle
23212458
Attached To
R1448 Lenstool-HPC
comp_chi_osv.c
View Options
#include<stdio.h>
#include<math.h>
#include<fonction.h>
#include<constant.h>
#include<dimension.h>
#include<structure.h>
/*
JPK - OMP - 20 Mai 1995
comp the chi2 of images using a source object
*/
extern double **im, **tim;
extern int nx, ny, nbs;
extern double dlsds, xmin, xmax, ymin, ymax;
extern struct galaxie osource[3];
double comp_chi_osv(double *vect)
{
extern struct g_observ O;
register int i, j;
double sigim = 0.001;
double merrit;
osource[0].C.x = vect[0];
osource[0].C.y = vect[1];
osource[0].E.a = vect[2];
osource[0].E.b = vect[3];
osource[0].E.theta = vect[4];
osource[0].I0 = vect[5];
osource[0].dr = dlsds;
for (i = 0; i < nx; i++)
for (j = 0; j < ny; j++)
tim[i][j] = 0.;
cp_im(tim, nx, ny, xmin, xmax, ymin, ymax, osource, nbs);
cv_cpsf(tim, nx, ny, xmin, xmax, ymin, ymax, O.seeing);
/* compute merrit function of the difference of the test and observed images*/
merrit = cp_errdiff(tim, im, nx, ny, sigim); /* sigim is the image noise */
return(merrit);
}
Event Timeline
Log In to Comment