Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F96954332
o_mag_m.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
Wed, Jan 1, 02:23
Size
1 KB
Mime Type
text/x-c
Expires
Fri, Jan 3, 02:23 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
23298416
Attached To
R1448 Lenstool-HPC
o_mag_m.c
View Options
#include<stdio.h>
#include<math.h>
#include<fonction.h>
#include<constant.h>
#include<dimension.h>
#include<structure.h>
/****************************************************************/
/* nom: o_mag_m */
/* auteur: Jean-Paul Kneib */
/* date: 10/02/92 */
/* place: Toulouse */
/****************************************************************
* calcul de magnification pour les IMAGES MULTIPLES
* Compute the deformation parameters thetaPot(thp), distortionPot(dp)
* and tauPot(tp) for every arclet of the arclet list.
*
* arclet thetaPot (thp) = 2Gradxy(Phi)/(Gradyy(Phi) - Gradxx(Phi))
* arclet distortion (dp) = (K^2 + G^2)/(K^2 - G^2) = trace(a^-2)/2det(a^-1)
* arclet -tau (tp) = 2KG/(K^2 - G^2)
*
* Global variables used :
* - in e_grad2() : G, lens, lens_table
*/
void o_mag_m(int n, struct galaxie *arclet)
{
register int i;
double A, B, C;
struct matrix MA;
for (i = 0; i < n; i++)
{
MA = e_grad2_gal(&arclet[i], NULL);
MA.a *= arclet[0].dr;
MA.b *= arclet[0].dr;
MA.c *= arclet[0].dr;
MA.d *= arclet[0].dr;
A = 1. - MA.a; //Gradxx(Phi)
B = -MA.b; //Gradxy(Phi)
C = 1. - MA.c; //Gradyy(Phi)
arclet[i].A = fabs(A * C - B * B);
arclet[i].thp = PI / 2. + 0.5 * atan2(2.*B, (A - C));
arclet[i].dp = (A * A + C * C + 2.*B * B) / arclet[i].A / 2.;
arclet[i].tp = sqrt(arclet[i].dp * arclet[i].dp - 1.);
}
arclet[n] = arclet[0];
}
Event Timeline
Log In to Comment