Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F105552975
comp_dchi_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
Tue, Mar 18, 01:53
Size
808 B
Mime Type
text/x-c
Expires
Thu, Mar 20, 01:53 (2 d)
Engine
blob
Format
Raw Data
Handle
25001717
Attached To
R1448 Lenstool-HPC
comp_dchi_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 derivatives of chi2 of images using a source object
*/
extern double **im, **tim;
extern int nx, ny;
extern double dlsds, xmin, xmax, ymin, ymax;
void comp_dchi_osv(double *vect, double *dvect)
{
double step = .001;
register int i, j;
int n = 6;
double chi1, chi2, vect1[6], vect2[6];
for (j = 0; j < n; j++)
vect2[j] = vect1[j] = vect[j];
for (i = 0; i < n; i++)
{
vect1[i] -= step;
vect2[i] += step;
chi1 = comp_chi_osv(vect1);
chi2 = comp_chi_osv(vect2);
dvect[i] = (chi2 - chi1) / (vect2[i] - vect[i]);
vect1[i] = vect2[i] = vect[i];
}
}
Event Timeline
Log In to Comment