Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F97132503
e_zeroamp.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
Thu, Jan 2, 19:23
Size
1 KB
Mime Type
text/x-c
Expires
Sat, Jan 4, 19:23 (2 d)
Engine
blob
Format
Raw Data
Handle
23333123
Attached To
R1448 Lenstool-HPC
e_zeroamp.c
View Options
#include<stdio.h>
#include<math.h>
#include<fonction.h>
#include<constant.h>
#include<dimension.h>
#include<structure.h>
static struct point e_zerodich2(struct point *A, struct point *B, double dl0s, double dos, double zs);
/****************************************************************/
/* nom: e_zeroamp */
/* auteur: Jean-Paul Kneib */
/* date: 10/02/92 */
/* place: Toulouse */
/****************************************************************/
/* Return the critical line position between A and B
* Global variables used :
* in e_amp() : G, lens, lens_table
* in e_zerodich2() : G, lens, lens_table
*/
struct point e_zeroamp(struct point A, struct point B, double dl0s, double dos, double zs)
{
struct point C;
/*order A and B so that amp(A)>amp(B)*/
if ( e_amp(&A, dl0s, dos, zs) > e_amp(&B, dl0s, dos, zs))
{
C = A;
A = B;
B = C;
};
return( e_zerodich2(&A, &B, dl0s, dos, zs) );
}
/****************************************************************/
/* Return the critical line position between A and B
* Global variables used :
* - in e_amp() : G, lens, lens_table
*/
static struct point e_zerodich2(struct point *A, struct point *B, double dl0s, double dos, double zs)
{
double am;
struct point M;
M = milieu(A, B);
am = e_amp(&M, dl0s, dos, zs);
if ( dist(*A, *B) < PREC_ZERO || fabs(am) < PREC_ZERO )
return(M);
else if ( am * e_amp(A, dl0s, dos, zs) > 0 )
/*M and A are on the same side of the critical line (same parity)*/
return(e_zerodich2(&M, B, dl0s, dos, zs));
else
return(e_zerodich2(A, &M, dl0s, dos, zs));
}
Event Timeline
Log In to Comment