Commit 672555db authored by Johan Richard's avatar Johan Richard
Browse files

Add e_deflect in Makefile

parent 832155d1
......@@ -19,7 +19,7 @@ liblenstool_a_SOURCES = \
dist_min.c distor.c do_itos.c d_poisson.c \
d_profil.c d_rndschechter.c d_rndtype.c d_rndz.c d_rndzsmail.c \
d_seeing.c e_amp.c ecrire_r.c e_dpl.c \
dyn_mass.c e_cube.c e_skew.c \
dyn_mass.c e_cube.c e_deflect_lens.c e_skew.c \
e_g2cpx.c e_gcpx.c e_giant.c e_grad2.c \
e_grad.c e_hernquist.c e_im_prec.c e_inthere.c e_lens.c \
e_lensing.c e_lens_P.c e_mag.c e_mass.c \
......
......@@ -126,50 +126,50 @@ am_liblenstool_a_OBJECTS = al_sq_point.$(OBJEXT) amplif.$(OBJEXT) \
d_rndschechter.$(OBJEXT) d_rndtype.$(OBJEXT) d_rndz.$(OBJEXT) \
d_rndzsmail.$(OBJEXT) d_seeing.$(OBJEXT) e_amp.$(OBJEXT) \
ecrire_r.$(OBJEXT) e_dpl.$(OBJEXT) dyn_mass.$(OBJEXT) \
e_cube.$(OBJEXT) e_skew.$(OBJEXT) e_g2cpx.$(OBJEXT) \
e_gcpx.$(OBJEXT) e_giant.$(OBJEXT) e_grad2.$(OBJEXT) \
e_grad.$(OBJEXT) e_hernquist.$(OBJEXT) e_im_prec.$(OBJEXT) \
e_inthere.$(OBJEXT) e_lens.$(OBJEXT) e_lensing.$(OBJEXT) \
e_lens_P.$(OBJEXT) e_mag.$(OBJEXT) e_mass.$(OBJEXT) \
e_nfw.$(OBJEXT) e_nfwgt.$(OBJEXT) e_nfwtri.$(OBJEXT) \
e_pcpx.$(OBJEXT) e_pixel.$(OBJEXT) e_pot.$(OBJEXT) \
err_invim.$(OBJEXT) e_sersic.$(OBJEXT) e_einasto.$(OBJEXT) \
e_tau.$(OBJEXT) e_test.$(OBJEXT) e_testg.$(OBJEXT) \
e_test_P.$(OBJEXT) e_time.$(OBJEXT) e_unlens.$(OBJEXT) \
e_unlens_fast.$(OBJEXT) e_unlensgrid.$(OBJEXT) \
e_unmag.$(OBJEXT) e_zeroamp.$(OBJEXT) fft.$(OBJEXT) \
fftcc_im.$(OBJEXT) fftc_im.$(OBJEXT) fmin_ell.$(OBJEXT) \
follow.$(OBJEXT) followi.$(OBJEXT) formeli.$(OBJEXT) \
frprmn.$(OBJEXT) fr_sq_point.$(OBJEXT) f_shape2.$(OBJEXT) \
f_shape3.$(OBJEXT) f_shape4.$(OBJEXT) f_shape_abs.$(OBJEXT) \
f_shape.$(OBJEXT) f_shmap.$(OBJEXT) f_source.$(OBJEXT) \
fz_dlsds.$(OBJEXT) g_ampli.$(OBJEXT) g_amplif.$(OBJEXT) \
g_curv.$(OBJEXT) g_dpl.$(OBJEXT) g_grid.$(OBJEXT) \
g_mass.$(OBJEXT) g_poten.$(OBJEXT) g_profil.$(OBJEXT) \
g_prop.$(OBJEXT) g_radial.$(OBJEXT) grid.$(OBJEXT) \
gridp.$(OBJEXT) gs_ecrire.$(OBJEXT) gs_ecrire_t.$(OBJEXT) \
g_shear.$(OBJEXT) g_shearf.$(OBJEXT) g_time.$(OBJEXT) \
hilbert.$(OBJEXT) ic_product.$(OBJEXT) im_add_const.$(OBJEXT) \
i_marker.$(OBJEXT) im_bin.$(OBJEXT) im_convolve.$(OBJEXT) \
im_stat.$(OBJEXT) imtosou.$(OBJEXT) inconvexe.$(OBJEXT) \
init_grille.$(OBJEXT) inside.$(OBJEXT) interpol.$(OBJEXT) \
inverse.$(OBJEXT) isoima.$(OBJEXT) iter.$(OBJEXT) \
keep_cl.$(OBJEXT) lire.$(OBJEXT) local.$(OBJEXT) \
lt_math.$(OBJEXT) min_parabol.$(OBJEXT) min_slo_par.$(OBJEXT) \
multiscale_grid.$(OBJEXT) nimage.$(OBJEXT) \
norm_angle.$(OBJEXT) o_big_slope.$(OBJEXT) o_chi.$(OBJEXT) \
o_chi_flux.$(OBJEXT) o_chires.$(OBJEXT) o_dpl.$(OBJEXT) \
o_flux.$(OBJEXT) o_pixsource.$(OBJEXT) o_global.$(OBJEXT) \
o_invim.$(OBJEXT) o_keep_min.$(OBJEXT) o_keepz_min.$(OBJEXT) \
o_kp_sp_min.$(OBJEXT) o_mag.$(OBJEXT) o_mag_m.$(OBJEXT) \
o_min_loc.$(OBJEXT) o_min_slope.$(OBJEXT) o_prep.$(OBJEXT) \
o_prep_mult.$(OBJEXT) o_print.$(OBJEXT) o_print_res.$(OBJEXT) \
opt_source.$(OBJEXT) o_rescale.$(OBJEXT) o_run1.$(OBJEXT) \
o_run2.$(OBJEXT) o_run_bayes.$(OBJEXT) o_run.$(OBJEXT) \
o_run_mc0.$(OBJEXT) o_run_mc.$(OBJEXT) o_runpot1.$(OBJEXT) \
o_runpot2.$(OBJEXT) o_runz0.$(OBJEXT) o_runz2.$(OBJEXT) \
o_runz.$(OBJEXT) o_runz_mc0.$(OBJEXT) o_runz_mc.$(OBJEXT) \
o_set_err.$(OBJEXT) o_set_exc.$(OBJEXT) \
e_cube.$(OBJEXT) e_deflect_lens.$(OBJEXT) e_skew.$(OBJEXT) \
e_g2cpx.$(OBJEXT) e_gcpx.$(OBJEXT) e_giant.$(OBJEXT) \
e_grad2.$(OBJEXT) e_grad.$(OBJEXT) e_hernquist.$(OBJEXT) \
e_im_prec.$(OBJEXT) e_inthere.$(OBJEXT) e_lens.$(OBJEXT) \
e_lensing.$(OBJEXT) e_lens_P.$(OBJEXT) e_mag.$(OBJEXT) \
e_mass.$(OBJEXT) e_nfw.$(OBJEXT) e_nfwgt.$(OBJEXT) \
e_nfwtri.$(OBJEXT) e_pcpx.$(OBJEXT) e_pixel.$(OBJEXT) \
e_pot.$(OBJEXT) err_invim.$(OBJEXT) e_sersic.$(OBJEXT) \
e_einasto.$(OBJEXT) e_tau.$(OBJEXT) e_test.$(OBJEXT) \
e_testg.$(OBJEXT) e_test_P.$(OBJEXT) e_time.$(OBJEXT) \
e_unlens.$(OBJEXT) e_unlens_fast.$(OBJEXT) \
e_unlensgrid.$(OBJEXT) e_unmag.$(OBJEXT) e_zeroamp.$(OBJEXT) \
fft.$(OBJEXT) fftcc_im.$(OBJEXT) fftc_im.$(OBJEXT) \
fmin_ell.$(OBJEXT) follow.$(OBJEXT) followi.$(OBJEXT) \
formeli.$(OBJEXT) frprmn.$(OBJEXT) fr_sq_point.$(OBJEXT) \
f_shape2.$(OBJEXT) f_shape3.$(OBJEXT) f_shape4.$(OBJEXT) \
f_shape_abs.$(OBJEXT) f_shape.$(OBJEXT) f_shmap.$(OBJEXT) \
f_source.$(OBJEXT) fz_dlsds.$(OBJEXT) g_ampli.$(OBJEXT) \
g_amplif.$(OBJEXT) g_curv.$(OBJEXT) g_dpl.$(OBJEXT) \
g_grid.$(OBJEXT) g_mass.$(OBJEXT) g_poten.$(OBJEXT) \
g_profil.$(OBJEXT) g_prop.$(OBJEXT) g_radial.$(OBJEXT) \
grid.$(OBJEXT) gridp.$(OBJEXT) gs_ecrire.$(OBJEXT) \
gs_ecrire_t.$(OBJEXT) g_shear.$(OBJEXT) g_shearf.$(OBJEXT) \
g_time.$(OBJEXT) hilbert.$(OBJEXT) ic_product.$(OBJEXT) \
im_add_const.$(OBJEXT) i_marker.$(OBJEXT) im_bin.$(OBJEXT) \
im_convolve.$(OBJEXT) im_stat.$(OBJEXT) imtosou.$(OBJEXT) \
inconvexe.$(OBJEXT) init_grille.$(OBJEXT) inside.$(OBJEXT) \
interpol.$(OBJEXT) inverse.$(OBJEXT) isoima.$(OBJEXT) \
iter.$(OBJEXT) keep_cl.$(OBJEXT) lire.$(OBJEXT) \
local.$(OBJEXT) lt_math.$(OBJEXT) min_parabol.$(OBJEXT) \
min_slo_par.$(OBJEXT) multiscale_grid.$(OBJEXT) \
nimage.$(OBJEXT) norm_angle.$(OBJEXT) o_big_slope.$(OBJEXT) \
o_chi.$(OBJEXT) o_chi_flux.$(OBJEXT) o_chires.$(OBJEXT) \
o_dpl.$(OBJEXT) o_flux.$(OBJEXT) o_pixsource.$(OBJEXT) \
o_global.$(OBJEXT) o_invim.$(OBJEXT) o_keep_min.$(OBJEXT) \
o_keepz_min.$(OBJEXT) o_kp_sp_min.$(OBJEXT) o_mag.$(OBJEXT) \
o_mag_m.$(OBJEXT) o_min_loc.$(OBJEXT) o_min_slope.$(OBJEXT) \
o_prep.$(OBJEXT) o_prep_mult.$(OBJEXT) o_print.$(OBJEXT) \
o_print_res.$(OBJEXT) opt_source.$(OBJEXT) o_rescale.$(OBJEXT) \
o_run1.$(OBJEXT) o_run2.$(OBJEXT) o_run_bayes.$(OBJEXT) \
o_run.$(OBJEXT) o_run_mc0.$(OBJEXT) o_run_mc.$(OBJEXT) \
o_runpot1.$(OBJEXT) o_runpot2.$(OBJEXT) o_runz0.$(OBJEXT) \
o_runz2.$(OBJEXT) o_runz.$(OBJEXT) o_runz_mc0.$(OBJEXT) \
o_runz_mc.$(OBJEXT) o_set_err.$(OBJEXT) o_set_exc.$(OBJEXT) \
o_set_lens_bayes.$(OBJEXT) o_set_lens.$(OBJEXT) \
o_set_lmax.$(OBJEXT) o_set_lmin.$(OBJEXT) o_set_map.$(OBJEXT) \
o_set_map_mc.$(OBJEXT) o_set_map_z.$(OBJEXT) \
......@@ -250,40 +250,40 @@ am__depfiles_remade = ./$(DEPDIR)/al_sq_point.Po ./$(DEPDIR)/amplif.Po \
./$(DEPDIR)/dist.Po ./$(DEPDIR)/dist_min.Po \
./$(DEPDIR)/distor.Po ./$(DEPDIR)/do_itos.Po \
./$(DEPDIR)/dyn_mass.Po ./$(DEPDIR)/e_amp.Po \
./$(DEPDIR)/e_cube.Po ./$(DEPDIR)/e_dpl.Po \
./$(DEPDIR)/e_einasto.Po ./$(DEPDIR)/e_g2cpx.Po \
./$(DEPDIR)/e_gcpx.Po ./$(DEPDIR)/e_giant.Po \
./$(DEPDIR)/e_grad.Po ./$(DEPDIR)/e_grad2.Po \
./$(DEPDIR)/e_hernquist.Po ./$(DEPDIR)/e_im_prec.Po \
./$(DEPDIR)/e_inthere.Po ./$(DEPDIR)/e_lens.Po \
./$(DEPDIR)/e_lens_P.Po ./$(DEPDIR)/e_lensing.Po \
./$(DEPDIR)/e_mag.Po ./$(DEPDIR)/e_mass.Po \
./$(DEPDIR)/e_nfw.Po ./$(DEPDIR)/e_nfwgt.Po \
./$(DEPDIR)/e_nfwtri.Po ./$(DEPDIR)/e_pcpx.Po \
./$(DEPDIR)/e_pixel.Po ./$(DEPDIR)/e_pot.Po \
./$(DEPDIR)/e_sersic.Po ./$(DEPDIR)/e_skew.Po \
./$(DEPDIR)/e_tau.Po ./$(DEPDIR)/e_test.Po \
./$(DEPDIR)/e_test_P.Po ./$(DEPDIR)/e_testg.Po \
./$(DEPDIR)/e_time.Po ./$(DEPDIR)/e_unlens.Po \
./$(DEPDIR)/e_unlens_fast.Po ./$(DEPDIR)/e_unlensgrid.Po \
./$(DEPDIR)/e_unmag.Po ./$(DEPDIR)/e_zeroamp.Po \
./$(DEPDIR)/ecrire_r.Po ./$(DEPDIR)/err_invim.Po \
./$(DEPDIR)/f_shape.Po ./$(DEPDIR)/f_shape2.Po \
./$(DEPDIR)/f_shape3.Po ./$(DEPDIR)/f_shape4.Po \
./$(DEPDIR)/f_shape_abs.Po ./$(DEPDIR)/f_shmap.Po \
./$(DEPDIR)/f_source.Po ./$(DEPDIR)/fft.Po \
./$(DEPDIR)/fftc_im.Po ./$(DEPDIR)/fftcc_im.Po \
./$(DEPDIR)/fmin_ell.Po ./$(DEPDIR)/follow.Po \
./$(DEPDIR)/followi.Po ./$(DEPDIR)/formeli.Po \
./$(DEPDIR)/fr_sq_point.Po ./$(DEPDIR)/frprmn.Po \
./$(DEPDIR)/fz_dlsds.Po ./$(DEPDIR)/g_ampli.Po \
./$(DEPDIR)/g_amplif.Po ./$(DEPDIR)/g_curv.Po \
./$(DEPDIR)/g_dpl.Po ./$(DEPDIR)/g_grid.Po \
./$(DEPDIR)/g_mass.Po ./$(DEPDIR)/g_poten.Po \
./$(DEPDIR)/g_profil.Po ./$(DEPDIR)/g_prop.Po \
./$(DEPDIR)/g_radial.Po ./$(DEPDIR)/g_shear.Po \
./$(DEPDIR)/g_shearf.Po ./$(DEPDIR)/g_time.Po \
./$(DEPDIR)/grid.Po ./$(DEPDIR)/gridp.Po \
./$(DEPDIR)/e_cube.Po ./$(DEPDIR)/e_deflect_lens.Po \
./$(DEPDIR)/e_dpl.Po ./$(DEPDIR)/e_einasto.Po \
./$(DEPDIR)/e_g2cpx.Po ./$(DEPDIR)/e_gcpx.Po \
./$(DEPDIR)/e_giant.Po ./$(DEPDIR)/e_grad.Po \
./$(DEPDIR)/e_grad2.Po ./$(DEPDIR)/e_hernquist.Po \
./$(DEPDIR)/e_im_prec.Po ./$(DEPDIR)/e_inthere.Po \
./$(DEPDIR)/e_lens.Po ./$(DEPDIR)/e_lens_P.Po \
./$(DEPDIR)/e_lensing.Po ./$(DEPDIR)/e_mag.Po \
./$(DEPDIR)/e_mass.Po ./$(DEPDIR)/e_nfw.Po \
./$(DEPDIR)/e_nfwgt.Po ./$(DEPDIR)/e_nfwtri.Po \
./$(DEPDIR)/e_pcpx.Po ./$(DEPDIR)/e_pixel.Po \
./$(DEPDIR)/e_pot.Po ./$(DEPDIR)/e_sersic.Po \
./$(DEPDIR)/e_skew.Po ./$(DEPDIR)/e_tau.Po \
./$(DEPDIR)/e_test.Po ./$(DEPDIR)/e_test_P.Po \
./$(DEPDIR)/e_testg.Po ./$(DEPDIR)/e_time.Po \
./$(DEPDIR)/e_unlens.Po ./$(DEPDIR)/e_unlens_fast.Po \
./$(DEPDIR)/e_unlensgrid.Po ./$(DEPDIR)/e_unmag.Po \
./$(DEPDIR)/e_zeroamp.Po ./$(DEPDIR)/ecrire_r.Po \
./$(DEPDIR)/err_invim.Po ./$(DEPDIR)/f_shape.Po \
./$(DEPDIR)/f_shape2.Po ./$(DEPDIR)/f_shape3.Po \
./$(DEPDIR)/f_shape4.Po ./$(DEPDIR)/f_shape_abs.Po \
./$(DEPDIR)/f_shmap.Po ./$(DEPDIR)/f_source.Po \
./$(DEPDIR)/fft.Po ./$(DEPDIR)/fftc_im.Po \
./$(DEPDIR)/fftcc_im.Po ./$(DEPDIR)/fmin_ell.Po \
./$(DEPDIR)/follow.Po ./$(DEPDIR)/followi.Po \
./$(DEPDIR)/formeli.Po ./$(DEPDIR)/fr_sq_point.Po \
./$(DEPDIR)/frprmn.Po ./$(DEPDIR)/fz_dlsds.Po \
./$(DEPDIR)/g_ampli.Po ./$(DEPDIR)/g_amplif.Po \
./$(DEPDIR)/g_curv.Po ./$(DEPDIR)/g_dpl.Po \
./$(DEPDIR)/g_grid.Po ./$(DEPDIR)/g_mass.Po \
./$(DEPDIR)/g_poten.Po ./$(DEPDIR)/g_profil.Po \
./$(DEPDIR)/g_prop.Po ./$(DEPDIR)/g_radial.Po \
./$(DEPDIR)/g_shear.Po ./$(DEPDIR)/g_shearf.Po \
./$(DEPDIR)/g_time.Po ./$(DEPDIR)/grid.Po ./$(DEPDIR)/gridp.Po \
./$(DEPDIR)/gs_ecrire.Po ./$(DEPDIR)/gs_ecrire_t.Po \
./$(DEPDIR)/hilbert.Po ./$(DEPDIR)/i_marker.Po \
./$(DEPDIR)/ic_product.Po ./$(DEPDIR)/im_add_const.Po \
......@@ -528,7 +528,7 @@ liblenstool_a_SOURCES = \
dist_min.c distor.c do_itos.c d_poisson.c \
d_profil.c d_rndschechter.c d_rndtype.c d_rndz.c d_rndzsmail.c \
d_seeing.c e_amp.c ecrire_r.c e_dpl.c \
dyn_mass.c e_cube.c e_skew.c \
dyn_mass.c e_cube.c e_deflect_lens.c e_skew.c \
e_g2cpx.c e_gcpx.c e_giant.c e_grad2.c \
e_grad.c e_hernquist.c e_im_prec.c e_inthere.c e_lens.c \
e_lensing.c e_lens_P.c e_mag.c e_mass.c \
......@@ -732,6 +732,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dyn_mass.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/e_amp.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/e_cube.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/e_deflect_lens.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/e_dpl.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/e_einasto.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/e_g2cpx.Po@am__quote@ # am--include-marker
......@@ -1151,6 +1152,7 @@ distclean: distclean-am
-rm -f ./$(DEPDIR)/dyn_mass.Po
-rm -f ./$(DEPDIR)/e_amp.Po
-rm -f ./$(DEPDIR)/e_cube.Po
-rm -f ./$(DEPDIR)/e_deflect_lens.Po
-rm -f ./$(DEPDIR)/e_dpl.Po
-rm -f ./$(DEPDIR)/e_einasto.Po
-rm -f ./$(DEPDIR)/e_g2cpx.Po
......@@ -1466,6 +1468,7 @@ maintainer-clean: maintainer-clean-am
-rm -f ./$(DEPDIR)/dyn_mass.Po
-rm -f ./$(DEPDIR)/e_amp.Po
-rm -f ./$(DEPDIR)/e_cube.Po
-rm -f ./$(DEPDIR)/e_deflect_lens.Po
-rm -f ./$(DEPDIR)/e_dpl.Po
-rm -f ./$(DEPDIR)/e_einasto.Po
-rm -f ./$(DEPDIR)/e_g2cpx.Po
......
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#include<math.h>
#include<fonction.h>
#include<constant.h>
#include<dimension.h>
#include<structure.h>
#include "lt.h"
/****************************************************************/
/* nom: e_deflect_lens */
/* auteur: Johan Richard */
/* date: 10/10/16 */
/* place: Lyon */
/****************************************************************
*/
/*Deflect all the background lens depending on the forground lens
*
*
*/
void e_deflect_lens()
{
const extern struct g_grille G;
extern struct pot lens[];
struct point Grad, grad;
long int i;
long int j;
for (j = 0; j < G.nlens; j++)
{
/* for each lens*/
double z[3]; // [z_(k-2), z_(k-1), z_(k)]
z[0] = 0.; z[1] = lens[0].z; z[2] = e_grad_getNextz(0, lens[G.nlens-1].z);
struct point beta[3]; // [b_(k-2), b_(k-1), b_(k)]
beta[0] = lens[j].Cinit;
beta[1] = lens[j].Cinit;
grad.x = 0.;
grad.y = 0.;
for (i = 0; i < j; i++)
{
if( lens[i].z >= lens[G.nlens-1].z )
continue;
if( lens[i].z > z[1] )
{
e_grad_computeSourcePositions(grad, beta, z);
z[0] = z[1];
z[1] = lens[i].z;
z[2] = e_grad_getNextz(i, lens[G.nlens-1].z);
grad.x = grad.y = 0.; // reinitialize grad for the next lens plane
}
Grad = e_grad_pot(&beta[1], i);
grad.x += Grad.x;
grad.y += Grad.y;
}; /*end of for each lens*/
e_grad_computeSourcePositions(grad, beta, z);
lens[j].C = beta[2];
};
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment