diff --git a/Benchmarks/ConfigFiles/90Pot81.par b/Benchmarks/ConfigFiles/90Pot81.par
index 5bdabed..7f91879 100644
--- a/Benchmarks/ConfigFiles/90Pot81.par
+++ b/Benchmarks/ConfigFiles/90Pot81.par
@@ -1,946 +1,946 @@
 #The user defines which mode of lenstool he wants to run here
 runmode
 	source 0 sources.cat										
 	image 1	../ConfigFiles/219Img.txt
 	#inverse 0
 	grid 0 22 1.5  									
 	poten 0 1000 1.5 
 	mass 0 1000 0.4 1.5
 	dpl 0 1000 1.5
 	ampli 0 1000 1.2
-	nbgridcells 6000
+	nbgridcells 1000
 	Debug   										# true activates debug mode
 	end
 frame  
 	#dmax 45										#either dmax or x and y have to be declared when a grid is used
 	xmin     -50.000
 	xmax     50.000
 	ymin     -50.000
 	ymax     50.000
 	end
 cosmology												
 	model	  1
 	H0        70.000
 	omegaM    0.300
 	omegaX    0.700
 	omegaK	  0.000
 	wA	  0.000
 	wX        -1.000
 	end
 potentiel 1
 	profil	81								#Profile: 5 SIS, 8 PIEMD
 	x_centre     0.000								#X Position [arcsec]
 	y_centre     0.000								#Y Position [arcsec]
 	ellipticity     0.11					#Ellipticity
 	v_disp     800.									#Dispersion Velocity [km/s]
 	rcut	500										#Cut radius (PIEMD distribution)
 	rcore 	5										#Core radius (PIEMD distribution)
 	z_lens     0.4									#Redshift of lens
 	end
 potentiel 2
 	profil	81									#Profile: 5 SIS, 8 PIEMD
 	x_centre     25.000								#X Position [arcsec]
 	y_centre     20.000								#Y Position [arcsec]
 	ellipticity     0.11							#Ellipticity
 	v_disp     140.									#Dispersion Velocity [km/s]
 	rcut	150										#Cut radius (PIEMD distribution)
 	rcore 	1										#Core radius (PIEMD distribution)
 	z_lens     0.4									#Redshift of lens
 	end
 potentiel 4
 	profil     81									#Profile: 5 SIS, 8 PIEMD
 	x_centre     -16.000								#X Position [arcsec]
 	y_centre     2.000								#Y Position [arcsec]
 	ellipticity     0.11							#Ellipticity
 	v_disp     130.									#Dispersion Velocity [km/s]
 	rcut	150										#Cut radius (PIEMD distribution)
 	rcore 	1										#Core radius (PIEMD distribution)
 	z_lens     0.4									#Redshift of lens
 	end
 potentiel 5
 	profil     81								#Profile: 5 SIS, 8 PIEMD
 	x_centre     -10.000								#X Position [arcsec]
 	y_centre     0.000								#Y Position [arcsec]
 	ellipticity     0.11							#Ellipticity
 	v_disp     110.									#Dispersion Velocity [km/s]
 	rcut	150										#Cut radius (PIEMD distribution)
 	rcore 	1										#Core radius (PIEMD distribution)
 	z_lens     0.4									#Redshift of lens
 	end
 potentiel 6
 	profil     81									#Profile: 5 SIS, 8 PIEMD
 	x_centre     3.000								#X Position [arcsec]
 	y_centre     -10.000								#Y Position [arcsec]
 	ellipticity     0.11							#Ellipticity
 	v_disp     80.									#Dispersion Velocity [km/s]
 	rcut	150										#Cut radius (PIEMD distribution)
 	rcore 	1										#Core radius (PIEMD distribution)
 	z_lens     0.4									#Redshift of lens
 	end
 potentiel 7
 	profil     81									#Profile: 5 SIS, 8 PIEMD
 	x_centre     17.000								#X Position [arcsec]
 	y_centre     -7.000								#Y Position [arcsec]
 	ellipticity     0.11							#Ellipticity
 	v_disp     120.									#Dispersion Velocity [km/s]
 	rcut	150										#Cut radius (PIEMD distribution)
 	rcore 	1										#Core radius (PIEMD distribution)
 	z_lens     0.4									#Redshift of lens
 	end
 potentiel 7
 	profil     81									#Profile: 5 SIS, 8 PIEMD
 	x_centre     17.000								#X Position [arcsec]
 	y_centre     -7.000								#Y Position [arcsec]
 	ellipticity     0.11							#Ellipticity
 	v_disp     1.									#Dispersion Velocity [km/s]
 	rcut	150										#Cut radius (PIEMD distribution)
 	rcore 	1										#Core radius (PIEMD distribution)
 	z_lens     0.4									#Redshift of lens
 	end
 potentiel 7
 	profil     81									#Profile: 5 SIS, 8 PIEMD
 	x_centre     17.000								#X Position [arcsec]
 	y_centre     -7.000								#Y Position [arcsec]
 	ellipticity     0.11							#Ellipticity
 	v_disp     1.									#Dispersion Velocity [km/s]
 	rcut	150										#Cut radius (PIEMD distribution)
 	rcore 	1										#Core radius (PIEMD distribution)
 	z_lens     0.4									#Redshift of lens
 	end
 potentiel 7
 	profil     81									#Profile: 5 SIS, 8 PIEMD
 	x_centre     17.000								#X Position [arcsec]
 	y_centre     -7.000								#Y Position [arcsec]
 	ellipticity     0.11							#Ellipticity
 	v_disp     1.									#Dispersion Velocity [km/s]
 	rcut	150										#Cut radius (PIEMD distribution)
 	rcore 	1										#Core radius (PIEMD distribution)
 	z_lens     0.4									#Redshift of lens
 	end
 potentiel 7
 	profil     81									#Profile: 5 SIS, 8 PIEMD
 	x_centre     17.000								#X Position [arcsec]
 	y_centre     -7.000								#Y Position [arcsec]
 	ellipticity     0.11							#Ellipticity
 	v_disp     15.									#Dispersion Velocity [km/s]
 	rcut	150										#Cut radius (PIEMD distribution)
 	rcore 	1										#Core radius (PIEMD distribution)
 	z_lens     0.4									#Redshift of lens
 	end
 potentiel 7
 	profil     81									#Profile: 5 SIS, 8 PIEMD
 	x_centre     17.000								#X Position [arcsec]
 	y_centre     -7.000								#Y Position [arcsec]
 	ellipticity     0.11							#Ellipticity
 	v_disp     1.									#Dispersion Velocity [km/s]
 	rcut	150										#Cut radius (PIEMD distribution)
 	rcore 	1										#Core radius (PIEMD distribution)
 	z_lens     0.4									#Redshift of lens
 	end
 potentiel 7
 	profil     81									#Profile: 5 SIS, 8 PIEMD
 	x_centre     17.000								#X Position [arcsec]
 	y_centre     -7.000								#Y Position [arcsec]
 	ellipticity     0.11							#Ellipticity
 	v_disp     1.									#Dispersion Velocity [km/s]
 	rcut	150										#Cut radius (PIEMD distribution)
 	rcore 	1										#Core radius (PIEMD distribution)
 	z_lens     0.4									#Redshift of lens
 	end
 potentiel 7
 	profil     81									#Profile: 5 SIS, 8 PIEMD
 	x_centre     17.000								#X Position [arcsec]
 	y_centre     -7.000								#Y Position [arcsec]
 	ellipticity     0.11							#Ellipticity
 	v_disp     1.									#Dispersion Velocity [km/s]
 	rcut	150										#Cut radius (PIEMD distribution)
 	rcore 	1										#Core radius (PIEMD distribution)
 	z_lens     0.4									#Redshift of lens
 	end
 potentiel 7
 	profil     81									#Profile: 5 SIS, 8 PIEMD
 	x_centre     17.000								#X Position [arcsec]
 	y_centre     -7.000								#Y Position [arcsec]
 	ellipticity     0.11							#Ellipticity
 	v_disp     91.									#Dispersion Velocity [km/s]
 	rcut	150										#Cut radius (PIEMD distribution)
 	rcore 	1										#Core radius (PIEMD distribution)
 	z_lens     0.4									#Redshift of lens
 	end
 potentiel 7
 	profil     81									#Profile: 5 SIS, 8 PIEMD
 	x_centre     17.000								#X Position [arcsec]
 	y_centre     -7.000								#Y Position [arcsec]
 	ellipticity     0.11							#Ellipticity
 	v_disp     1.									#Dispersion Velocity [km/s]
 	rcut	150										#Cut radius (PIEMD distribution)
 	rcore 	1										#Core radius (PIEMD distribution)
 	z_lens     0.4									#Redshift of lens
 	end
 potentiel 7
 	profil     81									#Profile: 5 SIS, 8 PIEMD
 	x_centre     17.000								#X Position [arcsec]
 	y_centre     -7.000								#Y Position [arcsec]
 	ellipticity     0.11							#Ellipticity
 	v_disp     1.									#Dispersion Velocity [km/s]
 	rcut	150										#Cut radius (PIEMD distribution)
 	rcore 	1										#Core radius (PIEMD distribution)
 	z_lens     0.4									#Redshift of lens
 	end
 potentiel 7
 	profil     81									#Profile: 5 SIS, 8 PIEMD
 	x_centre     17.000								#X Position [arcsec]
 	y_centre     -7.000								#Y Position [arcsec]
 	ellipticity     0.11							#Ellipticity
 	v_disp     1.									#Dispersion Velocity [km/s]
 	rcut	150										#Cut radius (PIEMD distribution)
 	rcore 	1										#Core radius (PIEMD distribution)
 	z_lens     0.4									#Redshift of lens
 	end
 potentiel 7
 	profil     81									#Profile: 5 SIS, 8 PIEMD
 	x_centre     17.000								#X Position [arcsec]
 	y_centre     -7.000								#Y Position [arcsec]
 	ellipticity     0.11							#Ellipticity
 	v_disp     17.									#Dispersion Velocity [km/s]
 	rcut	150										#Cut radius (PIEMD distribution)
 	rcore 	1										#Core radius (PIEMD distribution)
 	z_lens     0.4									#Redshift of lens
 	end
 potentiel 7
 	profil     81									#Profile: 5 SIS, 8 PIEMD
 	x_centre     17.000								#X Position [arcsec]
 	y_centre     -7.000								#Y Position [arcsec]
 	ellipticity     0.11							#Ellipticity
 	v_disp     1.									#Dispersion Velocity [km/s]
 	rcut	150										#Cut radius (PIEMD distribution)
 	rcore 	1										#Core radius (PIEMD distribution)
 	z_lens     0.4									#Redshift of lens
 	end
 potentiel 7
 	profil     81									#Profile: 5 SIS, 8 PIEMD
 	x_centre     17.000								#X Position [arcsec]
 	y_centre     -7.000								#Y Position [arcsec]
 	ellipticity     0.11							#Ellipticity
 	v_disp     165.									#Dispersion Velocity [km/s]
 	rcut	150										#Cut radius (PIEMD distribution)
 	rcore 	1										#Core radius (PIEMD distribution)
 	z_lens     0.4									#Redshift of lens
 	end
 potentiel 7
 	profil     81									#Profile: 5 SIS, 8 PIEMD
 	x_centre     17.000								#X Position [arcsec]
 	y_centre     -7.000								#Y Position [arcsec]
 	ellipticity     0.11							#Ellipticity
 	v_disp     1.									#Dispersion Velocity [km/s]
 	rcut	150										#Cut radius (PIEMD distribution)
 	rcore 	1										#Core radius (PIEMD distribution)
 	z_lens     0.4									#Redshift of lens
 	end
 potentiel 7
 	profil     81									#Profile: 5 SIS, 8 PIEMD
 	x_centre     17.000								#X Position [arcsec]
 	y_centre     -7.000								#Y Position [arcsec]
 	ellipticity     0.11							#Ellipticity
 	v_disp     1.									#Dispersion Velocity [km/s]
 	rcut	150										#Cut radius (PIEMD distribution)
 	rcore 	1										#Core radius (PIEMD distribution)
 	z_lens     0.4									#Redshift of lens
 	end
 potentiel 7
 	profil     81									#Profile: 5 SIS, 8 PIEMD
 	x_centre     17.000								#X Position [arcsec]
 	y_centre     -7.000								#Y Position [arcsec]
 	ellipticity     0.11							#Ellipticity
 	v_disp     16.									#Dispersion Velocity [km/s]
 	rcut	150										#Cut radius (PIEMD distribution)
 	rcore 	1										#Core radius (PIEMD distribution)
 	z_lens     0.4									#Redshift of lens
 	end
 potentiel 7
 	profil     81									#Profile: 5 SIS, 8 PIEMD
 	x_centre     17.000								#X Position [arcsec]
 	y_centre     -7.000								#Y Position [arcsec]
 	ellipticity     0.11							#Ellipticity
 	v_disp     1.									#Dispersion Velocity [km/s]
 	rcut	150										#Cut radius (PIEMD distribution)
 	rcore 	1										#Core radius (PIEMD distribution)
 	z_lens     0.4									#Redshift of lens
 	end
 potentiel 7
 	profil     81									#Profile: 5 SIS, 8 PIEMD
 	x_centre     17.000								#X Position [arcsec]
 	y_centre     -7.000								#Y Position [arcsec]
 	ellipticity     0.11							#Ellipticity
 	v_disp     1.									#Dispersion Velocity [km/s]
 	rcut	150										#Cut radius (PIEMD distribution)
 	rcore 	1										#Core radius (PIEMD distribution)
 	z_lens     0.4									#Redshift of lens
 	end
 potentiel 7
 	profil     81									#Profile: 5 SIS, 8 PIEMD
 	x_centre     17.000								#X Position [arcsec]
 	y_centre     -7.000								#Y Position [arcsec]
 	ellipticity     0.11							#Ellipticity
 	v_disp     1.									#Dispersion Velocity [km/s]
 	rcut	150										#Cut radius (PIEMD distribution)
 	rcore 	1										#Core radius (PIEMD distribution)
 	z_lens     0.4									#Redshift of lens
 	end
 potentiel 7
 	profil     81									#Profile: 5 SIS, 8 PIEMD
 	x_centre     17.000								#X Position [arcsec]
 	y_centre     -7.000								#Y Position [arcsec]
 	ellipticity     0.11							#Ellipticity
 	v_disp     1.									#Dispersion Velocity [km/s]
 	rcut	150										#Cut radius (PIEMD distribution)
 	rcore 	1										#Core radius (PIEMD distribution)
 	z_lens     0.4									#Redshift of lens
 	end
 potentiel 7
 	profil     81									#Profile: 5 SIS, 8 PIEMD
 	x_centre     17.000								#X Position [arcsec]
 	y_centre     -7.000								#Y Position [arcsec]
 	ellipticity     0.11							#Ellipticity
 	v_disp     1.									#Dispersion Velocity [km/s]
 	rcut	150										#Cut radius (PIEMD distribution)
 	rcore 	1										#Core radius (PIEMD distribution)
 	z_lens     0.4									#Redshift of lens
 	end
 potentiel 7
 	profil     81									#Profile: 5 SIS, 8 PIEMD
 	x_centre     17.000								#X Position [arcsec]
 	y_centre     -7.000								#Y Position [arcsec]
 	ellipticity     0.11							#Ellipticity
 	v_disp     1.									#Dispersion Velocity [km/s]
 	rcut	150										#Cut radius (PIEMD distribution)
 	rcore 	1										#Core radius (PIEMD distribution)
 	z_lens     0.4									#Redshift of lens
 	end
 potentiel 7
 	profil     81									#Profile: 5 SIS, 8 PIEMD
 	x_centre     17.000								#X Position [arcsec]
 	y_centre     -7.000								#Y Position [arcsec]
 	ellipticity     0.11							#Ellipticity
 	v_disp     1.									#Dispersion Velocity [km/s]
 	rcut	150										#Cut radius (PIEMD distribution)
 	rcore 	1										#Core radius (PIEMD distribution)
 	z_lens     0.4									#Redshift of lens
 	end
 potentiel 7
 	profil     81									#Profile: 5 SIS, 8 PIEMD
 	x_centre     17.000								#X Position [arcsec]
 	y_centre     -7.000								#Y Position [arcsec]
 	ellipticity     0.11							#Ellipticity
 	v_disp     1.									#Dispersion Velocity [km/s]
 	rcut	150										#Cut radius (PIEMD distribution)
 	rcore 	1										#Core radius (PIEMD distribution)
 	z_lens     0.4									#Redshift of lens
 	end
 potentiel 7
 	profil     81									#Profile: 5 SIS, 8 PIEMD
 	x_centre     17.000								#X Position [arcsec]
 	y_centre     -7.000								#Y Position [arcsec]
 	ellipticity     0.11							#Ellipticity
 	v_disp     1.									#Dispersion Velocity [km/s]
 	rcut	150										#Cut radius (PIEMD distribution)
 	rcore 	1										#Core radius (PIEMD distribution)
 	z_lens     0.4									#Redshift of lens
 	end
 potentiel 7
 	profil     81									#Profile: 5 SIS, 8 PIEMD
 	x_centre     17.000								#X Position [arcsec]
 	y_centre     -7.000								#Y Position [arcsec]
 	ellipticity     0.11							#Ellipticity
 	v_disp     1.									#Dispersion Velocity [km/s]
 	rcut	150										#Cut radius (PIEMD distribution)
 	rcore 	1										#Core radius (PIEMD distribution)
 	z_lens     0.4									#Redshift of lens
 	end
 potentiel 7
 	profil     81									#Profile: 5 SIS, 8 PIEMD
 	x_centre     17.000								#X Position [arcsec]
 	y_centre     -7.000								#Y Position [arcsec]
 	ellipticity     0.11							#Ellipticity
 	v_disp     1.									#Dispersion Velocity [km/s]
 	rcut	150										#Cut radius (PIEMD distribution)
 	rcore 	1										#Core radius (PIEMD distribution)
 	z_lens     0.4									#Redshift of lens
 	end
 potentiel 7
 	profil     81									#Profile: 5 SIS, 8 PIEMD
 	x_centre     17.000								#X Position [arcsec]
 	y_centre     -7.000								#Y Position [arcsec]
 	ellipticity     0.11							#Ellipticity
 	v_disp     1.									#Dispersion Velocity [km/s]
 	rcut	150										#Cut radius (PIEMD distribution)
 	rcore 	1										#Core radius (PIEMD distribution)
 	z_lens     0.4									#Redshift of lens
 	end
 potentiel 7
 	profil     81									#Profile: 5 SIS, 8 PIEMD
 	x_centre     17.000								#X Position [arcsec]
 	y_centre     -7.000								#Y Position [arcsec]
 	ellipticity     0.11							#Ellipticity
 	v_disp     1.									#Dispersion Velocity [km/s]
 	rcut	150										#Cut radius (PIEMD distribution)
 	rcore 	1										#Core radius (PIEMD distribution)
 	z_lens     0.4									#Redshift of lens
 	end
 potentiel 7
 	profil     81									#Profile: 5 SIS, 8 PIEMD
 	x_centre     17.000								#X Position [arcsec]
 	y_centre     -7.000								#Y Position [arcsec]
 	ellipticity     0.11							#Ellipticity
 	v_disp     1.									#Dispersion Velocity [km/s]
 	rcut	150										#Cut radius (PIEMD distribution)
 	rcore 	1										#Core radius (PIEMD distribution)
 	z_lens     0.4									#Redshift of lens
 	end
 potentiel 7
 	profil     81									#Profile: 5 SIS, 8 PIEMD
 	x_centre     17.000								#X Position [arcsec]
 	y_centre     -7.000								#Y Position [arcsec]
 	ellipticity     0.11							#Ellipticity
 	v_disp     1.									#Dispersion Velocity [km/s]
 	rcut	150										#Cut radius (PIEMD distribution)
 	rcore 	1										#Core radius (PIEMD distribution)
 	z_lens     0.4									#Redshift of lens
 	end
 potentiel 7
 	profil     81									#Profile: 5 SIS, 8 PIEMD
 	x_centre     17.000								#X Position [arcsec]
 	y_centre     -7.000								#Y Position [arcsec]
 	ellipticity     0.11							#Ellipticity
 	v_disp     1.									#Dispersion Velocity [km/s]
 	rcut	150										#Cut radius (PIEMD distribution)
 	rcore 	1										#Core radius (PIEMD distribution)
 	z_lens     0.4									#Redshift of lens
 	end
 potentiel 7
 	profil     81									#Profile: 5 SIS, 8 PIEMD
 	x_centre     17.000								#X Position [arcsec]
 	y_centre     -7.000								#Y Position [arcsec]
 	ellipticity     0.11							#Ellipticity
 	v_disp     1.									#Dispersion Velocity [km/s]
 	rcut	150										#Cut radius (PIEMD distribution)
 	rcore 	1										#Core radius (PIEMD distribution)
 	z_lens     0.4									#Redshift of lens
 	end
 potentiel 7
 	profil     81									#Profile: 5 SIS, 8 PIEMD
 	x_centre     17.000								#X Position [arcsec]
 	y_centre     -7.000								#Y Position [arcsec]
 	ellipticity     0.11							#Ellipticity
 	v_disp     1.									#Dispersion Velocity [km/s]
 	rcut	150										#Cut radius (PIEMD distribution)
 	rcore 	1										#Core radius (PIEMD distribution)
 	z_lens     0.4									#Redshift of lens
 	end
 potentiel 7
 	profil     81									#Profile: 5 SIS, 8 PIEMD
 	x_centre     17.000								#X Position [arcsec]
 	y_centre     -7.000								#Y Position [arcsec]
 	ellipticity     0.11							#Ellipticity
 	v_disp     1.									#Dispersion Velocity [km/s]
 	rcut	150										#Cut radius (PIEMD distribution)
 	rcore 	1										#Core radius (PIEMD distribution)
 	z_lens     0.4									#Redshift of lens
 	end
 potentiel 7
 	profil     81									#Profile: 5 SIS, 8 PIEMD
 	x_centre     17.000								#X Position [arcsec]
 	y_centre     -7.000								#Y Position [arcsec]
 	ellipticity     0.11							#Ellipticity
 	v_disp     1.									#Dispersion Velocity [km/s]
 	rcut	150										#Cut radius (PIEMD distribution)
 	rcore 	1										#Core radius (PIEMD distribution)
 	z_lens     0.4									#Redshift of lens
 	end
 potentiel 7
 	profil     81									#Profile: 5 SIS, 8 PIEMD
 	x_centre     17.000								#X Position [arcsec]
 	y_centre     -7.000								#Y Position [arcsec]
 	ellipticity     0.11							#Ellipticity
 	v_disp     1.									#Dispersion Velocity [km/s]
 	rcut	150										#Cut radius (PIEMD distribution)
 	rcore 	1										#Core radius (PIEMD distribution)
 	z_lens     0.4									#Redshift of lens
 	end
 potentiel 7
 	profil     81									#Profile: 5 SIS, 8 PIEMD
 	x_centre     17.000								#X Position [arcsec]
 	y_centre     -7.000								#Y Position [arcsec]
 	ellipticity     0.11							#Ellipticity
 	v_disp     1.									#Dispersion Velocity [km/s]
 	rcut	150										#Cut radius (PIEMD distribution)
 	rcore 	1										#Core radius (PIEMD distribution)
 	z_lens     0.4									#Redshift of lens
 	end
 potentiel 7
 	profil     81									#Profile: 5 SIS, 8 PIEMD
 	x_centre     17.000								#X Position [arcsec]
 	y_centre     -7.000								#Y Position [arcsec]
 	ellipticity     0.11							#Ellipticity
 	v_disp     1.									#Dispersion Velocity [km/s]
 	rcut	150										#Cut radius (PIEMD distribution)
 	rcore 	1										#Core radius (PIEMD distribution)
 	z_lens     0.4									#Redshift of lens
 	end
 potentiel 7
 	profil     81									#Profile: 5 SIS, 8 PIEMD
 	x_centre     17.000								#X Position [arcsec]
 	y_centre     -7.000								#Y Position [arcsec]
 	ellipticity     0.11							#Ellipticity
 	v_disp     1.									#Dispersion Velocity [km/s]
 	rcut	150										#Cut radius (PIEMD distribution)
 	rcore 	1										#Core radius (PIEMD distribution)
 	z_lens     0.4									#Redshift of lens
 	end
 potentiel 7
 	profil     81									#Profile: 5 SIS, 8 PIEMD
 	x_centre     17.000								#X Position [arcsec]
 	y_centre     -7.000								#Y Position [arcsec]
 	ellipticity     0.11							#Ellipticity
 	v_disp     1.									#Dispersion Velocity [km/s]
 	rcut	150										#Cut radius (PIEMD distribution)
 	rcore 	1										#Core radius (PIEMD distribution)
 	z_lens     0.4									#Redshift of lens
 	end
 potentiel 7
 	profil     81									#Profile: 5 SIS, 8 PIEMD
 	x_centre     17.000								#X Position [arcsec]
 	y_centre     -7.000								#Y Position [arcsec]
 	ellipticity     0.11							#Ellipticity
 	v_disp     1.									#Dispersion Velocity [km/s]
 	rcut	150										#Cut radius (PIEMD distribution)
 	rcore 	1										#Core radius (PIEMD distribution)
 	z_lens     0.4									#Redshift of lens
 	end
 potentiel 7
 	profil     81									#Profile: 5 SIS, 8 PIEMD
 	x_centre     17.000								#X Position [arcsec]
 	y_centre     -7.000								#Y Position [arcsec]
 	ellipticity     0.11							#Ellipticity
 	v_disp     1.									#Dispersion Velocity [km/s]
 	rcut	150										#Cut radius (PIEMD distribution)
 	rcore 	1										#Core radius (PIEMD distribution)
 	z_lens     0.4									#Redshift of lens
 	end
 potentiel 7
 	profil     81									#Profile: 5 SIS, 8 PIEMD
 	x_centre     17.000								#X Position [arcsec]
 	y_centre     -7.000								#Y Position [arcsec]
 	ellipticity     0.11							#Ellipticity
 	v_disp     1.									#Dispersion Velocity [km/s]
 	rcut	150										#Cut radius (PIEMD distribution)
 	rcore 	1										#Core radius (PIEMD distribution)
 	z_lens     0.4									#Redshift of lens
 	end
 potentiel 7
 	profil     81									#Profile: 5 SIS, 8 PIEMD
 	x_centre     17.000								#X Position [arcsec]
 	y_centre     -7.000								#Y Position [arcsec]
 	ellipticity     0.11							#Ellipticity
 	v_disp     1.									#Dispersion Velocity [km/s]
 	rcut	150										#Cut radius (PIEMD distribution)
 	rcore 	1										#Core radius (PIEMD distribution)
 	z_lens     0.4									#Redshift of lens
 	end
 potentiel 7
 	profil     81									#Profile: 5 SIS, 8 PIEMD
 	x_centre     17.000								#X Position [arcsec]
 	y_centre     -7.000								#Y Position [arcsec]
 	ellipticity     0.11							#Ellipticity
 	v_disp     1.									#Dispersion Velocity [km/s]
 	rcut	150										#Cut radius (PIEMD distribution)
 	rcore 	1										#Core radius (PIEMD distribution)
 	z_lens     0.4									#Redshift of lens
 	end
 potentiel 7
 	profil     81									#Profile: 5 SIS, 8 PIEMD
 	x_centre     17.000								#X Position [arcsec]
 	y_centre     -7.000								#Y Position [arcsec]
 	ellipticity     0.11							#Ellipticity
 	v_disp     1.									#Dispersion Velocity [km/s]
 	rcut	150										#Cut radius (PIEMD distribution)
 	rcore 	1										#Core radius (PIEMD distribution)
 	z_lens     0.4									#Redshift of lens
 	end
 potentiel 7
 	profil     81									#Profile: 5 SIS, 8 PIEMD
 	x_centre     17.000								#X Position [arcsec]
 	y_centre     -7.000								#Y Position [arcsec]
 	ellipticity     0.11							#Ellipticity
 	v_disp     1.									#Dispersion Velocity [km/s]
 	rcut	150										#Cut radius (PIEMD distribution)
 	rcore 	1										#Core radius (PIEMD distribution)
 	z_lens     0.4									#Redshift of lens
 	end
 potentiel 7
 	profil     81									#Profile: 5 SIS, 8 PIEMD
 	x_centre     17.000								#X Position [arcsec]
 	y_centre     -7.000								#Y Position [arcsec]
 	ellipticity     0.11							#Ellipticity
 	v_disp     1.									#Dispersion Velocity [km/s]
 	rcut	150										#Cut radius (PIEMD distribution)
 	rcore 	1										#Core radius (PIEMD distribution)
 	z_lens     0.4									#Redshift of lens
 	end
 potentiel 7
 	profil     81									#Profile: 5 SIS, 8 PIEMD
 	x_centre     17.000								#X Position [arcsec]
 	y_centre     -7.000								#Y Position [arcsec]
 	ellipticity     0.11							#Ellipticity
 	v_disp     1.									#Dispersion Velocity [km/s]
 	rcut	150										#Cut radius (PIEMD distribution)
 	rcore 	1										#Core radius (PIEMD distribution)
 	z_lens     0.4									#Redshift of lens
 	end
 potentiel 7
 	profil     81									#Profile: 5 SIS, 8 PIEMD
 	x_centre     17.000								#X Position [arcsec]
 	y_centre     -7.000								#Y Position [arcsec]
 	ellipticity     0.11							#Ellipticity
 	v_disp     1.									#Dispersion Velocity [km/s]
 	rcut	150										#Cut radius (PIEMD distribution)
 	rcore 	1										#Core radius (PIEMD distribution)
 	z_lens     0.4									#Redshift of lens
 	end
 potentiel 7
 	profil     81									#Profile: 5 SIS, 8 PIEMD
 	x_centre     17.000								#X Position [arcsec]
 	y_centre     -7.000								#Y Position [arcsec]
 	ellipticity     0.11							#Ellipticity
 	v_disp     1.									#Dispersion Velocity [km/s]
 	rcut	150										#Cut radius (PIEMD distribution)
 	rcore 	1										#Core radius (PIEMD distribution)
 	z_lens     0.4									#Redshift of lens
 	end
 potentiel 7
 	profil     81									#Profile: 5 SIS, 8 PIEMD
 	x_centre     17.000								#X Position [arcsec]
 	y_centre     -7.000								#Y Position [arcsec]
 	ellipticity     0.11							#Ellipticity
 	v_disp     1.									#Dispersion Velocity [km/s]
 	rcut	150										#Cut radius (PIEMD distribution)
 	rcore 	1										#Core radius (PIEMD distribution)
 	z_lens     0.4									#Redshift of lens
 	end
 potentiel 7
 	profil     81									#Profile: 5 SIS, 8 PIEMD
 	x_centre     17.000								#X Position [arcsec]
 	y_centre     -7.000								#Y Position [arcsec]
 	ellipticity     0.11							#Ellipticity
 	v_disp     1.									#Dispersion Velocity [km/s]
 	rcut	150										#Cut radius (PIEMD distribution)
 	rcore 	1										#Core radius (PIEMD distribution)
 	z_lens     0.4									#Redshift of lens
 	end
 potentiel 7
 	profil     81									#Profile: 5 SIS, 8 PIEMD
 	x_centre     17.000								#X Position [arcsec]
 	y_centre     -7.000								#Y Position [arcsec]
 	ellipticity     0.11							#Ellipticity
 	v_disp     1.									#Dispersion Velocity [km/s]
 	rcut	150										#Cut radius (PIEMD distribution)
 	rcore 	1										#Core radius (PIEMD distribution)
 	z_lens     0.4									#Redshift of lens
 	end
 potentiel 7
 	profil     81									#Profile: 5 SIS, 8 PIEMD
 	x_centre     17.000								#X Position [arcsec]
 	y_centre     -7.000								#Y Position [arcsec]
 	ellipticity     0.11							#Ellipticity
 	v_disp     1.									#Dispersion Velocity [km/s]
 	rcut	150										#Cut radius (PIEMD distribution)
 	rcore 	1										#Core radius (PIEMD distribution)
 	z_lens     0.4									#Redshift of lens
 	end
 potentiel 7
 	profil     81									#Profile: 5 SIS, 8 PIEMD
 	x_centre     17.000								#X Position [arcsec]
 	y_centre     -7.000								#Y Position [arcsec]
 	ellipticity     0.11							#Ellipticity
 	v_disp     1.									#Dispersion Velocity [km/s]
 	rcut	150										#Cut radius (PIEMD distribution)
 	rcore 	1										#Core radius (PIEMD distribution)
 	z_lens     0.4									#Redshift of lens
 	end
 potentiel 7
 	profil     81									#Profile: 5 SIS, 8 PIEMD
 	x_centre     17.000								#X Position [arcsec]
 	y_centre     -7.000								#Y Position [arcsec]
 	ellipticity     0.11							#Ellipticity
 	v_disp     1.									#Dispersion Velocity [km/s]
 	rcut	150										#Cut radius (PIEMD distribution)
 	rcore 	1										#Core radius (PIEMD distribution)
 	z_lens     0.4									#Redshift of lens
 	end
 potentiel 7
 	profil     81									#Profile: 5 SIS, 8 PIEMD
 	x_centre     17.000								#X Position [arcsec]
 	y_centre     -7.000								#Y Position [arcsec]
 	ellipticity     0.11							#Ellipticity
 	v_disp     1.									#Dispersion Velocity [km/s]
 	rcut	150										#Cut radius (PIEMD distribution)
 	rcore 	1										#Core radius (PIEMD distribution)
 	z_lens     0.4									#Redshift of lens
 	end
 potentiel 7
 	profil     81									#Profile: 5 SIS, 8 PIEMD
 	x_centre     17.000								#X Position [arcsec]
 	y_centre     -7.000								#Y Position [arcsec]
 	ellipticity     0.11							#Ellipticity
 	v_disp     1.									#Dispersion Velocity [km/s]
 	rcut	150										#Cut radius (PIEMD distribution)
 	rcore 	1										#Core radius (PIEMD distribution)
 	z_lens     0.4									#Redshift of lens
 	end
 potentiel 7
 	profil     81									#Profile: 5 SIS, 8 PIEMD
 	x_centre     17.000								#X Position [arcsec]
 	y_centre     -7.000								#Y Position [arcsec]
 	ellipticity     0.11							#Ellipticity
 	v_disp     1.									#Dispersion Velocity [km/s]
 	rcut	150										#Cut radius (PIEMD distribution)
 	rcore 	1										#Core radius (PIEMD distribution)
 	z_lens     0.4									#Redshift of lens
 	end
 potentiel 7
 	profil     81									#Profile: 5 SIS, 8 PIEMD
 	x_centre     17.000								#X Position [arcsec]
 	y_centre     -7.000								#Y Position [arcsec]
 	ellipticity     0.11							#Ellipticity
 	v_disp     1.									#Dispersion Velocity [km/s]
 	rcut	150										#Cut radius (PIEMD distribution)
 	rcore 	1										#Core radius (PIEMD distribution)
 	z_lens     0.4									#Redshift of lens
 	end
 potentiel 7
 	profil     81									#Profile: 5 SIS, 8 PIEMD
 	x_centre     17.000								#X Position [arcsec]
 	y_centre     -7.000								#Y Position [arcsec]
 	ellipticity     0.11							#Ellipticity
 	v_disp     1.									#Dispersion Velocity [km/s]
 	rcut	150										#Cut radius (PIEMD distribution)
 	rcore 	1										#Core radius (PIEMD distribution)
 	z_lens     0.4									#Redshift of lens
 	end
 potentiel 7
 	profil     81									#Profile: 5 SIS, 8 PIEMD
 	x_centre     17.000								#X Position [arcsec]
 	y_centre     -7.000								#Y Position [arcsec]
 	ellipticity     0.11							#Ellipticity
 	v_disp     1.									#Dispersion Velocity [km/s]
 	rcut	150										#Cut radius (PIEMD distribution)
 	rcore 	1										#Core radius (PIEMD distribution)
 	z_lens     0.4									#Redshift of lens
 	end
 potentiel 7
 	profil     81									#Profile: 5 SIS, 8 PIEMD
 	x_centre     17.000								#X Position [arcsec]
 	y_centre     -7.000								#Y Position [arcsec]
 	ellipticity     0.11							#Ellipticity
 	v_disp     1.									#Dispersion Velocity [km/s]
 	rcut	150										#Cut radius (PIEMD distribution)
 	rcore 	1										#Core radius (PIEMD distribution)
 	z_lens     0.4									#Redshift of lens
 	end
 potentiel 7
 	profil     81									#Profile: 5 SIS, 8 PIEMD
 	x_centre     17.000								#X Position [arcsec]
 	y_centre     -7.000								#Y Position [arcsec]
 	ellipticity     0.11							#Ellipticity
 	v_disp     1.									#Dispersion Velocity [km/s]
 	rcut	150										#Cut radius (PIEMD distribution)
 	rcore 	1										#Core radius (PIEMD distribution)
 	z_lens     0.4									#Redshift of lens
 	end
 potentiel 7
 	profil     81									#Profile: 5 SIS, 8 PIEMD
 	x_centre     17.000								#X Position [arcsec]
 	y_centre     -7.000								#Y Position [arcsec]
 	ellipticity     0.11							#Ellipticity
 	v_disp     1.									#Dispersion Velocity [km/s]
 	rcut	150										#Cut radius (PIEMD distribution)
 	rcore 	1										#Core radius (PIEMD distribution)
 	z_lens     0.4									#Redshift of lens
 	end
 potentiel 7
 	profil     81									#Profile: 5 SIS, 8 PIEMD
 	x_centre     17.000								#X Position [arcsec]
 	y_centre     -7.000								#Y Position [arcsec]
 	ellipticity     0.11							#Ellipticity
 	v_disp     1.									#Dispersion Velocity [km/s]
 	rcut	150										#Cut radius (PIEMD distribution)
 	rcore 	1										#Core radius (PIEMD distribution)
 	z_lens     0.4									#Redshift of lens
 	end
 potentiel 7
 	profil     81									#Profile: 5 SIS, 8 PIEMD
 	x_centre     17.000								#X Position [arcsec]
 	y_centre     -7.000								#Y Position [arcsec]
 	ellipticity     0.11							#Ellipticity
 	v_disp     1.									#Dispersion Velocity [km/s]
 	rcut	150										#Cut radius (PIEMD distribution)
 	rcore 	1										#Core radius (PIEMD distribution)
 	z_lens     0.4									#Redshift of lens
 	end
 potentiel 7
 	profil     81									#Profile: 5 SIS, 8 PIEMD
 	x_centre     17.000								#X Position [arcsec]
 	y_centre     -7.000								#Y Position [arcsec]
 	ellipticity     0.11							#Ellipticity
 	v_disp     1.									#Dispersion Velocity [km/s]
 	rcut	150										#Cut radius (PIEMD distribution)
 	rcore 	1										#Core radius (PIEMD distribution)
 	z_lens     0.4									#Redshift of lens
 	end
 potentiel 7
 	profil     81									#Profile: 5 SIS, 8 PIEMD
 	x_centre     17.000								#X Position [arcsec]
 	y_centre     -7.000								#Y Position [arcsec]
 	ellipticity     0.11							#Ellipticity
 	v_disp     1.									#Dispersion Velocity [km/s]
 	rcut	150										#Cut radius (PIEMD distribution)
 	rcore 	1										#Core radius (PIEMD distribution)
 	z_lens     0.4									#Redshift of lens
 	end
 potentiel 7
 	profil     81									#Profile: 5 SIS, 8 PIEMD
 	x_centre     17.000								#X Position [arcsec]
 	y_centre     -7.000								#Y Position [arcsec]
 	ellipticity     0.11							#Ellipticity
 	v_disp     1.									#Dispersion Velocity [km/s]
 	rcut	150										#Cut radius (PIEMD distribution)
 	rcore 	1										#Core radius (PIEMD distribution)
 	z_lens     0.4									#Redshift of lens
 	end
 potentiel 7
 	profil     81									#Profile: 5 SIS, 8 PIEMD
 	x_centre     17.000								#X Position [arcsec]
 	y_centre     -7.000								#Y Position [arcsec]
 	ellipticity     0.11							#Ellipticity
 	v_disp     1.									#Dispersion Velocity [km/s]
 	rcut	150										#Cut radius (PIEMD distribution)
 	rcore 	1										#Core radius (PIEMD distribution)
 	z_lens     0.4									#Redshift of lens
 	end
 potentiel 7
 	profil     81									#Profile: 5 SIS, 8 PIEMD
 	x_centre     17.000								#X Position [arcsec]
 	y_centre     -7.000								#Y Position [arcsec]
 	ellipticity     0.11							#Ellipticity
 	v_disp     1.									#Dispersion Velocity [km/s]
 	rcut	150										#Cut radius (PIEMD distribution)
 	rcore 	1										#Core radius (PIEMD distribution)
 	z_lens     0.4									#Redshift of lens
 	end
 potentiel 7
 	profil     81									#Profile: 5 SIS, 8 PIEMD
 	x_centre     17.000								#X Position [arcsec]
 	y_centre     -7.000								#Y Position [arcsec]
 	ellipticity     0.11							#Ellipticity
 	v_disp     1.									#Dispersion Velocity [km/s]
 	rcut	150										#Cut radius (PIEMD distribution)
 	rcore 	1										#Core radius (PIEMD distribution)
 	z_lens     0.4									#Redshift of lens
 	end
 potentiel 7
 	profil     81									#Profile: 5 SIS, 8 PIEMD
 	x_centre     17.000								#X Position [arcsec]
 	y_centre     -7.000								#Y Position [arcsec]
 	ellipticity     0.11							#Ellipticity
 	v_disp     1.									#Dispersion Velocity [km/s]
 	rcut	150										#Cut radius (PIEMD distribution)
 	rcore 	1										#Core radius (PIEMD distribution)
 	z_lens     0.4									#Redshift of lens
 	end
 potentiel 7
 	profil     81									#Profile: 5 SIS, 8 PIEMD
 	x_centre     17.000								#X Position [arcsec]
 	y_centre     -7.000								#Y Position [arcsec]
 	ellipticity     0.11							#Ellipticity
 	v_disp     1.									#Dispersion Velocity [km/s]
 	rcut	150										#Cut radius (PIEMD distribution)
 	rcore 	1										#Core radius (PIEMD distribution)
 	z_lens     0.4									#Redshift of lens
 	end
 potentiel 7
 	profil     81									#Profile: 5 SIS, 8 PIEMD
 	x_centre     17.000								#X Position [arcsec]
 	y_centre     -7.000								#Y Position [arcsec]
 	ellipticity     0.11							#Ellipticity
 	v_disp     1.									#Dispersion Velocity [km/s]
 	rcut	150										#Cut radius (PIEMD distribution)
 	rcore 	1										#Core radius (PIEMD distribution)
 	z_lens     0.4									#Redshift of lens
 	end
 potentiel 7
 	profil     81									#Profile: 5 SIS, 8 PIEMD
 	x_centre     17.000								#X Position [arcsec]
 	y_centre     -7.000								#Y Position [arcsec]
 	ellipticity     0.11							#Ellipticity
 	v_disp     1.									#Dispersion Velocity [km/s]
 	rcut	150										#Cut radius (PIEMD distribution)
 	rcore 	1										#Core radius (PIEMD distribution)
 	z_lens     0.4									#Redshift of lens
 	end
 potentiel 7
 	profil     81									#Profile: 5 SIS, 8 PIEMD
 	x_centre     17.000								#X Position [arcsec]
 	y_centre     -7.000								#Y Position [arcsec]
 	ellipticity     0.11							#Ellipticity
 	v_disp     1.									#Dispersion Velocity [km/s]
 	rcut	150										#Cut radius (PIEMD distribution)
 	rcore 	1										#Core radius (PIEMD distribution)
 	z_lens     0.4									#Redshift of lens
 	end
 potentiel 7
 	profil     81									#Profile: 5 SIS, 8 PIEMD
 	x_centre     17.000								#X Position [arcsec]
 	y_centre     -7.000								#Y Position [arcsec]
 	ellipticity     0.11							#Ellipticity
 	v_disp     1.									#Dispersion Velocity [km/s]
 	rcut	150										#Cut radius (PIEMD distribution)
 	rcore 	1										#Core radius (PIEMD distribution)
 	z_lens     0.4									#Redshift of lens
 	end
 potentiel 7
 	profil     81									#Profile: 5 SIS, 8 PIEMD
 	x_centre     17.000								#X Position [arcsec]
 	y_centre     -7.000								#Y Position [arcsec]
 	ellipticity     0.11							#Ellipticity
 	v_disp     1.									#Dispersion Velocity [km/s]
 	rcut	150										#Cut radius (PIEMD distribution)
 	rcore 	1										#Core radius (PIEMD distribution)
 	z_lens     0.4									#Redshift of lens
 	end
 potentiel 7
 	profil     81									#Profile: 5 SIS, 8 PIEMD
 	x_centre     17.000								#X Position [arcsec]
 	y_centre     -7.000								#Y Position [arcsec]
 	ellipticity     0.11							#Ellipticity
 	v_disp     1.									#Dispersion Velocity [km/s]
 	rcut	150										#Cut radius (PIEMD distribution)
 	rcore 	1										#Core radius (PIEMD distribution)
 	z_lens     0.4									#Redshift of lens
 	end
 limit 1
     x_centre           1 -1.0  1.0 0.01000
     y_centre           1 -1.0  1.0 0.010000
     ellipticity        1  0.05  0.75 0.01
     angle_pos          0 0. 180.0 0.1
     rcore     0 0.1 4. 0.100000
     rcut      0  1.0 20.0 0.10000
     v_disp          0 200.0 1000.0  0.10000
     end
 cline
 	nplan     1 1.5
 	dmax	50
 	limitLow	0.2
 	limitHigh	10
 	nbgridcells	1000
 	end
 finish
diff --git a/Benchmarks/ConfigFiles/TestResultParameter.par b/Benchmarks/ConfigFiles/TestResultParameter.par
index dd0f3b3..6ef19db 100644
--- a/Benchmarks/ConfigFiles/TestResultParameter.par
+++ b/Benchmarks/ConfigFiles/TestResultParameter.par
@@ -1,34 +1,44 @@
 #The user defines which mode of lenstool he wants to run here
 runmode
 	source 0 sources.cat										
 	image 1	../ConfigFiles/theoretical_images_time_1source.txt
 	#inverse 0
 	nbgridcells 1000				# true activates debug mode
 	end
 frame  
 	#dmax 45										#either dmax or x and y have to be declared when a grid is used
 	xmin     -50.000
 	xmax     50.000
 	ymin     -50.000
 	ymax     50.000
 	end
 cosmology												
 	model	  1
 	H0        70.000
 	omegaM    0.300
 	omegaX    0.700
 	omegaK	  0.000
 	wA	  0.000
 	wX        -1.000
 	end
 potentiel 1
 	profil	81									#Profile: 5 SIS, 8 PIEMD
 	x_centre     0.000								#X Position [arcsec]
 	y_centre     0.000								#Y Position [arcsec]
 	ellipticity     0.11					#Ellipticity
 	v_disp     800.									#Dispersion Velocity [km/s]
 	rcut	500										#Cut radius (PIEMD distribution)
 	rcore 	5										#Core radius (PIEMD distribution)
 	z_lens     0.4									#Redshift of lens
 	end
+potentiel 1
+	profil	81									#Profile: 5 SIS, 8 PIEMD
+	x_centre     13.000								#X Position [arcsec]
+	y_centre     3.000								#Y Position [arcsec]
+	ellipticity     0.11					#Ellipticity
+	v_disp     600.									#Dispersion Velocity [km/s]
+	rcut	500										#Cut radius (PIEMD distribution)
+	rcore 	5										#Core radius (PIEMD distribution)
+	z_lens     0.4									#Redshift of lens
+	end
 finish
diff --git a/Benchmarks/Scripts/GridPotentialBenchmark.sh b/Benchmarks/Scripts/GridPotentialBenchmark.sh
new file mode 100755
index 0000000..bf0541d
--- /dev/null
+++ b/Benchmarks/Scripts/GridPotentialBenchmark.sh
@@ -0,0 +1,32 @@
+#!/bin/bash
+echo "Starting Mapping Test"
+
+#if recompiling lenstool is needed
+#cd ../Libs/lenstool-6.8.1/
+#make
+#cd ../../lenstool-hpc
+
+cd ../../src/
+#make clean
+make
+
+
+cd ../Benchmarks/GridPotentialBenchmark
+make -f Makefile.GPU clean
+make -f Makefile.GPU
+rm -r tmp
+
+#./Bayesmap_GPU m1931.par T
+#./GridGradient_GPU ../ConfigFiles/TestResultParameter.par T
+./GridPot_GPU ../ConfigFiles/90Pot81.par T
+#./GridPot_GPU ../ConfigFiles/m1931.par T
+#./ChiBenchmark_GPU ../ConfigFiles/MarkusBenchmark.par T
+#./ChiBenchmark_GPU ../ConfigFiles/MarkusBenchmark1SIS.par T
+
+#cd ../Benchmarks/GradientBenchmark
+#make -f Makefile clean
+#make -f MakefileDouble
+#./GradientBenchmark
+
+echo "Finish Double test"
+
diff --git a/src/grid_potential_GPU.cu b/src/grid_potential_GPU.cu
index 661fda4..5cf1be9 100644
--- a/src/grid_potential_GPU.cu
+++ b/src/grid_potential_GPU.cu
@@ -1,184 +1,171 @@
 /**
 * @Author Christoph Schaefer, EPFL (christophernstrerne.schaefer@epfl.ch), Gilles Fourestey (gilles.fourestey@epfl.ch)
 * @date   July 2017
 * @version 0,1
 *
 */
 #include <fstream>
 #include "grid_gradient2_GPU.cuh"
 #include "gradient2_GPU.cuh"
 #include <structure_hpc.hpp>
 
 #define BLOCK_SIZE_X 32
 #define BLOCK_SIZE_Y 16
 
 //#define ROT
 
 #define _SHARED_MEM
 
 #ifdef _SHARED_MEM
 #define SHARED __shared__
 #warning "shared memory"
 extern __shared__ type_t shared[];
 #else
 #define SHARED 
 #endif
 
 #define Nx 1
 #define Ny 0
 
 
 #define cudasafe 
 
 extern "C" 
 {
 	type_t myseconds();
 }
 
 __global__ void
 module_potential_totalPotential_SOA_GPU(type_t *potential_GPU, const struct Potential_SOA *lens, const struct grid_param *frame, int nhalos, type_t dx, type_t dy, int nbgridcells_x, int nbgridcells_y, int istart, int jstart);
 ////
 void
 module_potential_SOA_CPU_GPU(type_t *grid_potential, const struct grid_param *frame, const struct Potential_SOA *lens_gpu, int nhalos, type_t dx, type_t dy, int nbgridcells_x, int nbgridcells_y, int istart, int jstart);
 
 void
 potential_grid_GPU(type_t *grid_potential, const struct grid_param *frame, const struct Potential_SOA *lens, int nhalos, type_t dx, type_t dy, int nbgridcells_x, int nbgridcells_y, int istart, int jstart);
 //
 //void
 //module_potentialDerivatives_totalGradient_SOA_CPU_GPU_v2(double *grid_grad_x, double *grid_grad_y, const struct grid_param *frame, const struct Potential_SOA *lens_cpu, const struct Potential_SOA *lens_gpu, int nbgridcells, int nhalos);
 //
 //
 //
 void potential_grid_GPU(type_t *grid_potential, const struct grid_param *frame, const struct Potential_SOA *lens, int nhalos ,int nbgridcells)
 {
 	type_t dx = (frame->xmax - frame->xmin)/(nbgridcells - 1);
     type_t dy = (frame->ymax - frame->ymin)/(nbgridcells - 1);
         //
     potential_grid_GPU(grid_potential, frame, lens, nhalos, dx, dy, nbgridcells, nbgridcells, 0, 0);
 }
 //
 //
 //
 void potential_grid_GPU(type_t *grid_potential, const struct grid_param *frame, const struct Potential_SOA *lens, int nhalos, type_t dx, type_t dy, int nbgridcells_x, int nbgridcells_y, int istart, int jstart)
 {
 
 	int nBlocks_gpu = 0;
 	// Define the number of threads per block the GPU will use
 	cudaDeviceProp properties_gpu;
-
 	cudaGetDeviceProperties(&properties_gpu, 0); // Get properties of 0th GPU in use
 
-/*
-	if (properties_gpu.maxThreadsDim[0]<threadsPerBlock)
-	{
-		fprintf(stderr, "ERROR: The GPU has to support at least %u threads per block.\n", threadsPerBlock);
-		exit(-1);
-	}
-	else
-	{
-		nBlocks_gpu = properties_gpu.maxGridSize[0] / threadsPerBlock;  // Get the maximum number of blocks with the chosen number of threads
-		// per Block that the GPU supports
-	}
-*/
 	grid_param *frame_gpu;
 	Potential_SOA *lens_gpu,*lens_kernel;
 	int *type_gpu;
 	type_t *lens_x_gpu, *lens_y_gpu, *b0_gpu, *angle_gpu, *epot_gpu, *rcore_gpu, *rcut_gpu, *anglecos_gpu, *anglesin_gpu;
 	type_t *grid_potential_gpu;
 
 	lens_gpu = (Potential_SOA *) malloc(sizeof(Potential_SOA));
 	lens_gpu->type = (int *) malloc(sizeof(int));
 
 	// Allocate variables on the GPU
 	cudasafe(cudaMalloc( (void**)&(lens_kernel), sizeof(Potential_SOA)),"grid_potential_GPU.cu : Alloc Potential_SOA: " );
 	cudasafe(cudaMalloc( (void**)&(type_gpu), nhalos*sizeof(int)),"grid_potential_GPU.cu : Alloc type_gpu: " );
 	cudasafe(cudaMalloc( (void**)&(lens_x_gpu), nhalos*sizeof(type_t)),"grid_potential_GPU.cu : Alloc x_gpu: " );
 	cudasafe(cudaMalloc( (void**)&(lens_y_gpu), nhalos*sizeof(type_t)),"grid_potential_GPU.cu : Alloc y_gpu: " );
 	cudasafe(cudaMalloc( (void**)&(b0_gpu), nhalos*sizeof(type_t)),"grid_potential_GPU.cu : Alloc b0_gpu: " );
 	cudasafe(cudaMalloc( (void**)&(angle_gpu), nhalos*sizeof(type_t)),"grid_potential_GPU.cu : Alloc angle_gpu: " );
 	cudasafe(cudaMalloc( (void**)&(epot_gpu), nhalos*sizeof(type_t)),"grid_potential_GPU.cu : Alloc epot_gpu: " );
 	cudasafe(cudaMalloc( (void**)&(rcore_gpu), nhalos*sizeof(type_t)),"grid_potential_GPU.cu : Alloc rcore_gpu: " );
 	cudasafe(cudaMalloc( (void**)&(rcut_gpu), nhalos*sizeof(type_t)),"grid_potential_GPU.cu : Alloc rcut_gpu: " );
 	cudasafe(cudaMalloc( (void**)&(anglecos_gpu), nhalos*sizeof(type_t)),"grid_potential_GPU.cu : Alloc anglecos_gpu: " );
 	cudasafe(cudaMalloc( (void**)&(anglesin_gpu), nhalos*sizeof(type_t)),"grid_potential_GPU.cu : Alloc anglesin_gpu: " );
 	cudasafe(cudaMalloc( (void**)&(frame_gpu), sizeof(grid_param)),"grid_potential_GPU.cu : Alloc frame_gpu: " );
 	cudasafe(cudaMalloc( (void**)&(grid_potential_gpu), (nbgridcells_x) * (nbgridcells_y) *sizeof(type_t)),"grid_potential_GPU.cu : Alloc source_a_gpu: " );
 	// Copy values to the GPU
 	//
 	cudasafe(cudaMemcpy(type_gpu,lens->type , nhalos*sizeof(int),cudaMemcpyHostToDevice ),"grid_potential_GPU.cu : Copy type_gpu: " );
 	cudasafe(cudaMemcpy(lens_x_gpu,lens->position_x , nhalos*sizeof(type_t),cudaMemcpyHostToDevice ),"grid_potential_GPU.cu : Copy x_gpu: " );
 	cudasafe(cudaMemcpy(lens_y_gpu,lens->position_y , nhalos*sizeof(type_t), cudaMemcpyHostToDevice),"grid_potential_GPU.cu : Copy y_gpu: " );
 	cudasafe(cudaMemcpy(b0_gpu,lens->b0 , nhalos*sizeof(type_t), cudaMemcpyHostToDevice),"grid_potential_GPU.cu : Copy b0_gpu: " );
 	cudasafe(cudaMemcpy(angle_gpu,lens->ellipticity_angle , nhalos*sizeof(type_t), cudaMemcpyHostToDevice),"grid_potential_GPU.cu : Copy angle_gpu: " );
 	cudasafe(cudaMemcpy(epot_gpu, lens->ellipticity_potential, nhalos*sizeof(type_t),cudaMemcpyHostToDevice ),"grid_potential_GPU.cu : Copy epot_gpu: " );
 	cudasafe(cudaMemcpy(rcore_gpu, lens->rcore, nhalos*sizeof(type_t),cudaMemcpyHostToDevice ),"grid_potential_GPU.cu : Copy rcore_gpu: " );
 	cudasafe(cudaMemcpy(rcut_gpu, lens->rcut, nhalos*sizeof(type_t), cudaMemcpyHostToDevice),"grid_potential_GPU.cu : Copy rcut_gpu: " );
 	cudasafe(cudaMemcpy(anglecos_gpu, lens->anglecos, nhalos*sizeof(type_t),cudaMemcpyHostToDevice ),"grid_potential_GPU.cu : Copy anglecos: " );
 	cudasafe(cudaMemcpy(anglesin_gpu, lens->anglesin, nhalos*sizeof(type_t), cudaMemcpyHostToDevice),"grid_potential_GPU.cu : Copy anglesin: " );
 	cudasafe(cudaMemcpy(frame_gpu, frame, sizeof(grid_param), cudaMemcpyHostToDevice),"grid_potential_GPU.cu : Copy frame_gpu: " );
 	//
 	lens_gpu->type 			= type_gpu;
 	lens_gpu->position_x 		= lens_x_gpu;
 	lens_gpu->position_y 		= lens_y_gpu;
 	lens_gpu->b0 			= b0_gpu;
 	lens_gpu->ellipticity_angle 	= angle_gpu;
 	lens_gpu->ellipticity_potential = epot_gpu;
 	lens_gpu->rcore 		= rcore_gpu;
 	lens_gpu->rcut 			= rcut_gpu;
 	lens_gpu->anglecos 		= anglecos_gpu;
 	lens_gpu->anglesin 		= anglesin_gpu;
 	//
 	cudaMemcpy(lens_kernel, lens_gpu, sizeof(Potential_SOA), cudaMemcpyHostToDevice);
 	//
 	type_t time = -myseconds();
-	//module_potentialDerivatives_totalGradient_SOA_CPU_GPU(grid_grad_x_gpu, grid_grad_y_gpu, frame_gpu, lens_kernel, nbgridcells_x, nhalos);
+	//
 	module_potential_SOA_CPU_GPU(grid_potential_gpu, frame_gpu, lens_kernel, nhalos, dx, dy, nbgridcells_x, nbgridcells_y, istart, jstart);
 	//
 	//cudasafe(cudaGetLastError(), "module_potentialDerivative_totalGradient_SOA_CPU_GPU");
 	cudaDeviceSynchronize();
 	time += myseconds();
 	//std::cout << "	kernel time = " << time << " s." << std::endl;
 	//
 
 	cudasafe(cudaMemcpy( grid_potential, grid_potential_gpu, (nbgridcells_x)*(nbgridcells_y)*sizeof(type_t), cudaMemcpyDeviceToHost )," --- grid_potential_GPU.cu : Copy source_a_gpu: " );	//
 	//printf("-----> %f %f \n",grid_grad_x[Nx], grid_grad_y[Ny]);
 	// Free GPU memory
 	cudaFree(lens_kernel);
 	cudaFree(type_gpu);
 	cudaFree(lens_x_gpu);
 	cudaFree(lens_y_gpu);
 	cudaFree(b0_gpu);
 	cudaFree(angle_gpu);
 	cudaFree(epot_gpu);
 	cudaFree(rcore_gpu);
 	cudaFree(rcut_gpu);
 	cudaFree(anglecos_gpu);
 	cudaFree(anglesin_gpu);
 	cudaFree(grid_potential_gpu);
 }
 
 void 
 module_potential_SOA_CPU_GPU(type_t *grid_potential, const struct grid_param *frame, const struct Potential_SOA *lens_gpu, int nhalos, type_t dx, type_t dy, int nbgridcells_x, int nbgridcells_y, int istart, int jstart)
 {
         int GRID_SIZE_X = (nbgridcells_x + BLOCK_SIZE_X - 1)/BLOCK_SIZE_X; // number of blocks
         int GRID_SIZE_Y = (nbgridcells_y + BLOCK_SIZE_Y - 1)/BLOCK_SIZE_Y;
         //
         printf("grid_size_x = %d, grid_size_y = %d, nbgridcells_x = %d, nbgridcells_y = %d, istart = %d, jstart = %d (split)\n", GRID_SIZE_X, GRID_SIZE_Y, nbgridcells_x, nbgridcells_y, istart, jstart);
         //
         dim3 threads(BLOCK_SIZE_X, BLOCK_SIZE_Y/1);
         dim3 grid   (GRID_SIZE_X , GRID_SIZE_Y);
         //printf("nhalos = %d, size of shared memory = %lf\n", nhalos, (double) (8*nhalos + BLOCK_SIZE_X*nbgridcells/BLOCK_SIZE_Y)*sizeof(double));
         printf("nhalos = %d, size of shared memory = %lf (split)\n", nhalos, (type_t) (8*nhalos + BLOCK_SIZE_X*BLOCK_SIZE_Y)*sizeof(type_t));
         //
         cudaMemset(grid_potential, 0, nbgridcells_x*nbgridcells_y*sizeof(type_t));
         //
         //module_potentialDerivatives_totalGradient_SOA_GPU<<<grid, threads>>> (grid_grad_x, grid_grad_y, lens, frame, nhalos, nbgridcells_x);
         module_potential_totalPotential_SOA_GPU<<<grid, threads>>> (grid_potential,  lens_gpu, frame, nhalos, dx, dy, nbgridcells_x, nbgridcells_y, istart, jstart);
         cudasafe(cudaGetLastError(), "module_potential_totalPotential_SOA_GPU");
         //
         cudaDeviceSynchronize();
         printf("GPU kernel done...\n");
 }
 //
 
 
diff --git a/utils/maps/Bayesmap_GPU b/utils/maps/Bayesmap_GPU
index cfd5252..6d10876 100755
Binary files a/utils/maps/Bayesmap_GPU and b/utils/maps/Bayesmap_GPU differ
diff --git a/utils/maps/main.cpp b/utils/maps/main.cpp
index e66ef80..33de583 100644
--- a/utils/maps/main.cpp
+++ b/utils/maps/main.cpp
@@ -1,582 +1,583 @@
 /**
 * @file   main.cpp
 * @Author Christoph Schaaefer, EPFL (christophernstrerne.schaefer@epfl.ch)
 * @date   October 2016
 * @brief  Benchmark for gradhalo function
 */
 
 #include <iostream>
 #include <iomanip>
 #include <string.h>
 #include <math.h>
 #include <sys/time.h>
 #include <fstream>
 #include <sys/stat.h>
 #include <unistd.h>
 //
 //#include <mm_malloc.h>
 #include <omp.h>
 //
 //#include <cuda_runtime.h>
 #include <structure_hpc.hpp>
 //#include <cuda.h>
 #include "timer.h"
 #include "gradient.hpp"
 #include "gradient2.hpp"
 #include "chi_CPU.hpp"
 #include "module_cosmodistances.hpp"
 #include "module_readParameters.hpp"
 #include "grid_gradient2_CPU.hpp"
 #include "grid_amplif_CPU.hpp"
 #include "module_writeFits.hpp"
 #ifdef __WITH_GPU
 #include "grid_gradient_GPU.cuh"
 #include "grid_map_ampli_GPU.cuh"
+#include "grid_map_pot_GPU.cuh"
 #include "grid_map_shear_GPU.cuh"
 #include "grid_map_dpl_GPU.cuh"
 #include "grid_map_mass_GPU.cuh"
 #include "grid_gradient2_GPU.cuh"
 //#include "gradient_GPU.cuh"
 #endif
 
 #ifdef __WITH_LENSTOOL
 //#include "setup.hpp"
 #warning "linking with libtool..."
 #include<fonction.h>
 #include<constant.h>
 #include<dimension.h>
 #include<structure.h>
 #include<lt.h>
 #include <stdlib.h>
 
 //
 //
 struct g_mode   M;
 struct g_pot    P[NPOTFILE];
 struct g_pixel  imFrame, wFrame, ps, PSF;
 struct g_cube   cubeFrame;
 struct g_dyn    Dy;      //   //TV
 //
 struct g_source S;
 struct g_image  I;
 struct g_grille G;
 struct g_msgrid H;  // multi-scale grid
 struct g_frame  F;
 struct g_large  L;
 struct g_cosmo  C;
 struct g_cline  CL;
 struct g_observ O;
 struct pot      lens[NLMAX];
 struct pot      lmin[NLMAX], lmax[NLMAX], prec[NLMAX];
 struct g_cosmo  clmin, clmax;       /*cosmological limits*/
 struct galaxie  smin[NFMAX], smax[NFMAX];       // limits on source parameters
 struct ipot     ip;
 struct MCarlo   mc;
 struct vfield   vf;
 struct vfield   vfmin,vfmax; // limits on velocity field parameters
 struct cline    cl[NIMAX];
 lensdata *lens_table;
 //
 int  block[NLMAX][NPAMAX];      /*switch for the lens optimisation*/
 int  cblock[NPAMAX];                /*switch for the cosmological optimisation*/
 int  sblock[NFMAX][NPAMAX];                /*switch for the source parameters*/
 int  vfblock[NPAMAX];                /*switch for the velocity field parameters*/
 double excu[NLMAX][NPAMAX];
 double excd[NLMAX][NPAMAX];
 /* supplments tableaux de valeurs pour fonctions g pour Einasto
  *  * Ce sont trois variables globales qu'on pourra utiliser dans toutes les fonctions du projet
  *  */
 
 #define CMAX 20
 #define LMAX 80
 
 float Tab1[LMAX][CMAX];
 float Tab2[LMAX][CMAX];
 float Tab3[LMAX][CMAX];
 
 
 int      nrline, ntline, flagr, flagt;
 long int  narclet;
 
 struct point    gimage[NGGMAX][NGGMAX], gsource_global[NGGMAX][NGGMAX];
 struct biline   radial[NMAX], tangent[NMAX];
 struct galaxie  arclet[NAMAX], source[NFMAX], image[NFMAX][NIMAX];
 struct galaxie  cimage[NFMAX];
 struct pointgal     gianti[NPMAX][NIMAX];
 
 struct point    SC;
 double elix;
 double alpha_e;
 
 double *v_xx;
 double *v_yy;
 double **map_p;
 double **tmp_p;
 double **map_axx;
 double **map_ayy;
 
 
 
 #endif
 
 void
 gradient_grid_GPU_sorted(type_t *grid_grad_x, type_t *grid_grad_y, const struct grid_param *frame, const struct Potential_SOA *lens, int Nlens, int nbgridcells);
 //
 //
 int module_readCheckInput_readInput(int argc, char *argv[], std::string *outdir)
 {
 	/// check if there is a correct number of arguments, and store the name of the input file in infile
 
 	char* infile;
 	struct stat  file_stat;
 
 	// If we do not have 3 arguments, stop
 	if ( argc != 3 )
 	{
 		fprintf(stderr, "\nUnexpected number of arguments\n");
 		fprintf(stderr, "\nUSAGE:\n");
 		fprintf(stderr, "lenstool  input_file  output_directorypath  [-n]\n\n");
 		exit(-1);
 	}
 	else if ( argc == 3 )
 		infile=argv[1];
 	std::ifstream ifile(infile,std::ifstream::in); // Open the file
 
 
 	int ts = (int) time (NULL);
 	char buffer[10];
 	std::stringstream ss;
 	ss << ts;
 	std::string trimstamp = ss.str();
 	//
 	//std::string outdir = argv[2];
 	*outdir = argv[2];
 	//*outdir += "-";
 	//*outdir += trimstamp;
 	std::cout << *outdir << std::endl;
 
 	// check whether the output directory already exists
 	if (stat(outdir->c_str(), &file_stat) < 0){
 		mkdir(outdir->c_str(), S_IRUSR | S_IWUSR | S_IXUSR | S_IRGRP | S_IWGRP | S_IXGRP | S_IROTH );
 	}
 	else {
 		printf("Error : Directory %s already exists. Specify a non existing directory.\n",argv[2]);
 		exit(-1);
 	}
 
 	// check whether the input file exists. If it could not be opened (ifile = 0), it does not exist
 	if(ifile){
 		ifile.close();
 	}
 	else{
 		printf("The file %s does not exist, please specify a valid file name\n",infile);
 		exit(-1);
 	}
 
 	return 0;
 }
 //
 //
 //
 int main(int argc, char *argv[])
 {
 	//
 	// Setting Up the problem
 	//
 
 	// This module function reads the terminal input when calling LENSTOOL and checks that it is correct
 	// Otherwise it exits LENSTOOL
 	// 
 	char cwd[1024];
 	if (getcwd(cwd, sizeof(cwd)) != NULL)
 		fprintf(stdout, "Current working dir: %s\n", cwd);
 	//
 	std::string path;
 	module_readCheckInput_readInput(argc, argv, &path);
 	//
 
 	// This module function reads the cosmology parameters from the parameter file
 	// Input: struct cosmologicalparameters cosmology, parameter file
 	// Output: Initialized cosmology struct
 	cosmo_param cosmology;  // Cosmology struct to store the cosmology data from the file
 	std::string inputFile = argv[1];   // Input file
 	module_readParameters_readCosmology(inputFile, cosmology);
 	//
 	// This module function reads the runmode paragraph and the number of sources, arclets, etc. in the parameter file.
 	// The runmode_param stores the information of what exactly the user wants to do with lenstool.
 	struct runmode_param runmode;
 	module_readParameters_readRunmode(inputFile, &runmode);
 	module_readParameters_debug_cosmology(runmode.debug, cosmology);
 	module_readParameters_debug_runmode(1, runmode);
 	//
 	//=== Declaring variables
 	//
 	struct grid_param frame;
 	struct galaxy images[runmode.nimagestot];
 	struct galaxy sources[runmode.nsets];
 	//struct Potential lenses[runmode.n_tot_halos];
 	struct Potential_SOA lenses_SOA_table[NTYPES];
 	struct Potential_SOA lenses_SOA;
 	struct cline_param cline;
 	struct potfile_param potfile[runmode.Nb_potfile];
 	//struct Potential potfilepotentials[runmode.npotfile];
 	struct potentialoptimization host_potentialoptimization[runmode.nhalos];
 	int nImagesSet[runmode.nsets]; // Contains the number of images in each set of images
 	//Bayesmap specific variables
 	type_t* bayespot;
 	int nparam, nvalues;
 
 	// This module function reads in the potential form and its parameters (e.g. NFW)
 	// Input: input file
 	// Output: Potentials and its parameters
 
 	module_readParameters_PotentialSOA_direct(inputFile, &lenses_SOA, runmode.nhalos, runmode.n_tot_halos, cosmology);
 	module_readParameters_debug_potential_SOA(1, lenses_SOA, runmode.nhalos);
 	module_readParameters_limit(inputFile, host_potentialoptimization, runmode.nhalos );
 #if 0
 	for(int ii = 0; ii <runmode.nhalos ; ii++){
 		module_readParameters_debug_limit(1, host_potentialoptimization[ii]);
 	}
 #endif
 	if (runmode.potfile == 1 )
 	{
 		module_readParameters_readpotfiles_param(inputFile, potfile, cosmology);
 		module_readParameters_debug_potfileparam(1, &potfile[0]);
 		module_readParameters_debug_potfileparam(1, &potfile[1]);
 		module_readParameters_readpotfiles_SOA(&runmode, &cosmology,potfile,&lenses_SOA);
 		module_readParameters_debug_potential_SOA(0, lenses_SOA, runmode.n_tot_halos);
 
 	}
 
 	module_readParameters_lens_dslds_calculation(&runmode,&cosmology,&lenses_SOA);
 
 	// This module function reads in the grid form and its parameters
 	// Input: input file
 	// Output: grid and its parameters
 	//
 	module_readParameters_Grid(inputFile, &frame);
 	//std::cerr <<frame.xmin <<std::endl;
 	//
 	std::cout << "--------------------------" << std::endl << std::endl; fflush(stdout);
 	//
 	double t_lt, t_lt_total;
 	int turn = 0;
 #if 1
 //#ifdef __WITH_LENSTOOL
 	double **array; // contains the bayes.dat data
 	int nParam;
     long int iVal, nVal;  // size of array
 	char fname[50]; // <map><ival>.fits
 	char fname2[50]; // <map><ival>.fits
 	FILE *pFile;
 	int i;
 	double *index;  // list of bayes.dat lines
 	int    seed;   // random seed
 	int tmp;
 
 	printf("Setting up lenstool using %d lenses...", runmode.n_tot_halos); fflush(stdout);
 	//convert_to_LT(&lenses_SOA, runmode.nhalos+runmode.npotfile);
 	// Read the .par file
 
 	init_grille(argv[1], 1);
 	// remove the .fits extension tcpo filename
 	if( M.imass ) M.massfile[strlen(M.massfile)-5]=0;
 	if( M.ishear ) M.shearfile[strlen(M.shearfile)-5]=0;
 	if( M.iampli ) M.amplifile[strlen(M.amplifile)-5]=0;
 	if( M.idpl )
 	{
 	       M.dplxfile[strlen(M.dplxfile)-5]=0;
 	       M.dplyfile[strlen(M.dplyfile)-5]=0;
 	}
     if( M.pixel ) M.pixelfile[strlen(M.pixelfile)-5]=0;
     if( M.iclean ) ps.pixfile[strlen(ps.pixfile)-5]=0;
 
 	// Read catalog of multiple images
 	readConstraints();
 
 	// Initialise the grid
 	if( G.pol != 0 )
 		gridp();
 	else
 		grid();
 
 	// Switch to silent mode
 	M.verbose = 0;
 	printf("ok\n");
 	std::cerr << " Read Bayes models"  << std::endl;
 
 	// Read the bayes.dat file
 	array = readBayesModels(&nParam, &nVal);
 	if( array == NULL )
 	{
 		fprintf(stderr, "ERROR: bayes.dat file not found\n");
 		return -1;
 	}
 
 #if 0
 	for(int i = 0; i < G.nlens; i++){
 		printf("Lenstool Potential[%d]: x = %f, y = %f, vdisp = %f, type = %d \n \t ellipticity = %f, ellipticity_pot = %f, ellipticity angle (radians) = %f, rcore = %f, rcut = %f,\n z = %f\n", i,lens[i].C.x, lens[i].C.y, lens[i].sigma, lens[i].type, lens[i].emass, lens[i].epot, lens[i].theta, lens[i].rc, lens[i].rcut, lens[i].z);
 	}
 #endif
 	// Create the ./tmp directory
 	i = system("mkdir -p tmp");
 
 	// Prepare the index list
 	index = (double *) malloc((unsigned) nVal*sizeof(double));
 	for( i = 0 ; i < nVal ; i++ ) index[i]=i;
 	seed = -2;
 
 	std::cerr << " Finished setting up"  << std::endl;
 
 	//Defining maps
 	int ampli = 1;
 	t_lt_total = -myseconds();
 	// Loop over each line
 	for( i = 0; i < nVal && i < 2000; i++ )
 	{
 		// Randomly draw a line from index array
 		tmp = (int) floor(d_random(&seed) * (nVal - i));
 		iVal = index[i+tmp];
 		// and swap the indexes in the index list
 		index[i+tmp] = index[i];
 
 		// Set the lens parameters from <array>
 		setBayesModel( iVal, nVal, array );
 #if 0
 		for(int i = 0; i < G.nlens; i++){
 			printf("Lenstool Potential[%d]: x = %f, y = %f, vdisp = %f, type = %d \n \t ellipticity = %f, ellipticity_pot = %f, ellipticity angle (radians) = %f, rcore = %f, rcut = %f,\n z = %f\n", i,lens[i].C.x, lens[i].C.y, lens[i].sigma, lens[i].type, lens[i].emass, lens[i].epot, lens[i].theta, lens[i].rc, lens[i].rcut, lens[i].z);
 		}
 #endif
 		if( M.imass != 0 )
 		{
 			sprintf( fname, "tmp/%s%ld.fits",M.massfile, iVal );
 			printf("INFO: Compute file %d/%ld : %s [CTRL-C to interrupt]\n",i+1, nVal,fname);
 			fflush(stdout);
 			pFile = fopen( fname, "r" );
 			if( pFile == NULL )
 			{
 				pFile = fopen( fname, "w");
 				fprintf( pFile, "busy\n" );
 				fclose(pFile);
 				t_lt = -myseconds();
 				g_mass( M.imass, M.nmass, M.zmass, S.zs, fname );
 				t_lt += myseconds();
 				std::cout << " Time  = " << std::setprecision(15) << t_lt << " " << turn <<std::endl;
 				//std::cerr <<" para : " << M.zmass << " " << S.zs << " " <<  distcosmo2(M.zmass, S.zs) << distcosmo1(S.zs) << std::endl;
 			}
 			else
 				fclose(pFile);
 		}
 
 		if( M.iampli != 0 )
 		{
 			sprintf( fname, "tmp/%s%ld.fits","Amplif_", iVal );
 			printf("INFO: Compute file %d/%ld : %s [CTRL-C to interrupt]\n",i+1, nVal,fname);
 			fflush(stdout);
 			pFile = fopen( fname, "r" );
 			if( pFile == NULL )
 			{
 				pFile = fopen( fname, "w");
 				fprintf( pFile, "busy\n" );
 				fclose(pFile);
 				//std::cerr <<  runmode.amplif<< runmode.amplif_gridcells<< runmode.z_amplif << std::endl;
 				t_lt = -myseconds();
 				g_ampli( M.iampli, M.nampli, M.zampli, fname );
 				//g_ampli( runmode.amplif, runmode.amplif_gridcells, runmode.z_amplif, fname );
 				t_lt += myseconds();
 				//
 				turn += 1;
 				std::cout << " Time  = " << std::setprecision(15) << t_lt << " " << turn <<std::endl;
 			}
 			else
 				fclose(pFile);
 		}
 
 	}
 	t_lt_total += myseconds();
 
 #endif
 
 #ifdef __WITH_GPU
 	double t_1, t_2;
 	//struct matrix *grid_gradient2_cpu;
 	//grid_gradient2_cpu = (struct matrix *) malloc((int) (runmode.amplif_gridcells) * (runmode.amplif_gridcells) * sizeof(struct matrix));
 	// Bayes Map specific functions
 	////read bayes lines
 	module_readParameters_preparebayes(nparam, nvalues);
 	std::cerr << nparam << "BLA" << nvalues << std::endl;
 	bayespot = (type_t *) malloc((int) (nparam) * (nvalues) * sizeof(type_t));
 	module_readParameters_bayesmodels(bayespot, nparam, nvalues);
 	////read bayes lines
 	//std::cerr <<  "BLA" << std::endl;
 	t_1 = -myseconds();
 
 		if (runmode.mass > 0){
 			//Allocation
 			type_t* mass_GPU = (type_t *) malloc((int) (runmode.mass_gridcells) * (runmode.mass_gridcells) * sizeof(type_t));
 
 			for(int ii = 0; ii < nvalues; ii++){
 				////calculate maps
 				std::cout << " GPU launching for map mass " << ii << std::endl;
 				t_2 = -myseconds();
 				////set bayes potential
 				module_readParameters_setbayesmapmodels(&runmode, &cosmology, host_potentialoptimization, potfile, &lenses_SOA,bayespot,nparam, ii);
 				//std::cerr << runmode.n_tot_halos << std::endl;
 				module_readParameters_debug_potential_SOA(0, lenses_SOA, runmode.n_tot_halos);
 				//Init
 				memset(mass_GPU, 0, (runmode.mass_gridcells) * (runmode.mass_gridcells) * sizeof(type_t));
 
 				//Choosing Function definition
 				map_gpu_function_t map_gpu_func;
 				map_gpu_func = select_map_mass_function(&runmode);
 
 				//calculating map using defined function
 				map_grid_mass_GPU(map_gpu_func,mass_GPU,&cosmology, &frame, &lenses_SOA, runmode.n_tot_halos, runmode.mass_gridcells ,runmode.mass, runmode.z_mass, runmode.z_mass_s);
 
 				std::cerr <<" para : " << runmode.z_mass << " " << runmode.z_mass_s << std::endl;
 				//writing
 				//std::cerr << runmode.amplif_name << std::endl;
 				module_writeFits(path,runmode.mass_name,ii,mass_GPU,&runmode,runmode.mass_gridcells,&frame, runmode.ref_ra, runmode.ref_dec );
 				t_2 += myseconds();
 				std::cout << " Time  " << std::setprecision(15) << t_2 << std::endl;
 				//std::cerr << "**" << mass_GPU[0] << std::endl;
 			}
 			//std::cerr << "**" << ampli_GPU[0] << std::endl;
 			free(mass_GPU);
 		}
 		if (runmode.amplif > 0){
 			//Allocation
 			type_t* ampli_GPU = (type_t *) malloc((int) (runmode.amplif_gridcells) * (runmode.amplif_gridcells) * sizeof(type_t));
 			for(int ii = 0; ii < nvalues; ii++){
 				////calculate maps
 				std::cout << " GPU launching for map amplif " << ii << std::endl;
 				t_2 = -myseconds();
 				////set bayes potential
 				module_readParameters_setbayesmapmodels(&runmode, &cosmology, host_potentialoptimization, potfile, &lenses_SOA,bayespot,nparam, ii);
 				module_readParameters_debug_potential_SOA(0, lenses_SOA, runmode.n_tot_halos);
 				//Init
 				memset(ampli_GPU, 0, (runmode.amplif_gridcells) * (runmode.amplif_gridcells) * sizeof(type_t));
 
 				//Choosing Function definition
 				map_gpu_function_t map_gpu_func;
 				map_gpu_func = select_map_ampli_function(&runmode);
 
 				//calculating map using defined function
 				map_grid_ampli_GPU(map_gpu_func,ampli_GPU,&cosmology, &frame, &lenses_SOA, runmode.n_tot_halos, runmode.amplif_gridcells ,runmode.amplif, runmode.z_amplif);
 
 				//writing
 				//std::cerr << runmode.amplif_name << std::endl;
 				module_writeFits(path,runmode.amplif_name,ii,ampli_GPU,&runmode,runmode.amplif_gridcells,&frame, runmode.ref_ra, runmode.ref_dec );
 				t_2 += myseconds();
 				std::cout << " Time  " << std::setprecision(15) << t_2 << std::endl;
 				//std::cerr << "**" << ampli_GPU[0] << std::endl;
 			}
 			//std::cerr << "**" << ampli_GPU[0] << std::endl;
 			free(ampli_GPU);
 		}
 		if (runmode.shear > 0){
 			//Allocation
 			type_t* shear_GPU = (type_t *) malloc((int) (runmode.shear_gridcells) * (runmode.shear_gridcells) * sizeof(type_t));
 			for(int ii = 0; ii < nvalues; ii++){
 				////calculate maps
 				std::cout << " GPU launching for map amplif " << ii << std::endl;
 				t_2 = -myseconds();
 				////set bayes potential
 				module_readParameters_setbayesmapmodels(&runmode, &cosmology, host_potentialoptimization, potfile, &lenses_SOA,bayespot,nparam, ii);
 				module_readParameters_debug_potential_SOA(0, lenses_SOA, runmode.n_tot_halos);
 				//Init
 				memset(shear_GPU, 0, (runmode.shear_gridcells) * (runmode.shear_gridcells) * sizeof(type_t));
 
 				//Choosing Function definition
 				map_gpu_function_t map_gpu_func;
 				map_gpu_func = select_map_shear_function(&runmode);
 
 				//calculating map using defined function
 				map_grid_shear_GPU(map_gpu_func,shear_GPU,&cosmology, &frame, &lenses_SOA, runmode.n_tot_halos, runmode.shear_gridcells ,runmode.shear, runmode.z_shear);
 
 				//writing
 				module_writeFits(path,runmode.shear_name,ii,shear_GPU,&runmode,runmode.shear_gridcells,&frame, runmode.ref_ra, runmode.ref_dec );
 				t_2 += myseconds();
 				std::cout << " Time  " << std::setprecision(15) << t_2 << std::endl;
 				//std::cerr << "**" << shear_GPU[0] << std::endl;
 			}
 			free(shear_GPU);
 		}
 		if (runmode.dpl > 0){
 			//Allocation
 			type_t* dpl_x = (type_t *) malloc((int) (runmode.dpl_gridcells) * (runmode.dpl_gridcells) * sizeof(type_t));
 			type_t* dpl_y = (type_t *) malloc((int) (runmode.dpl_gridcells) * (runmode.dpl_gridcells) * sizeof(type_t));
 			for(int ii = 0; ii < nvalues; ii++){
 
 				////calculate maps
 				std::cout << " GPU launching for map shear " << ii << std::endl;
 				t_2 = -myseconds();
 				////set bayes potential
 				module_readParameters_setbayesmapmodels(&runmode, &cosmology, host_potentialoptimization, potfile, &lenses_SOA,bayespot,nparam, ii);
 				module_readParameters_debug_potential_SOA(0, lenses_SOA, runmode.n_tot_halos);
 				//Init
 				memset(dpl_x, 0, (runmode.dpl_gridcells) * (runmode.dpl_gridcells) * sizeof(type_t));
 				memset(dpl_y, 0, (runmode.dpl_gridcells) * (runmode.dpl_gridcells) * sizeof(type_t));
 
 				//Choosing Function definition
 				map_gpu_function_t map_gpu_func;
 				//map_gpu_func = select_map_dpl_function(&runmode);
 
 				//calculating map using defined function
 				map_grid_dpl_GPU(map_gpu_func, dpl_x, dpl_y, &cosmology, &frame, &lenses_SOA, runmode.n_tot_halos, runmode.dpl_gridcells ,runmode.dpl, runmode.z_dpl);
 
 				std::string file_x, file_y;
 				file_x = runmode.dpl_name1;
 				file_x.append("_x");
 				file_y = runmode.dpl_name2;
 				file_y.append("_y");
 
 				//writing
 				module_writeFits(path,file_x,dpl_x,&runmode,runmode.dpl_gridcells,&frame, runmode.ref_ra, runmode.ref_dec );
 				module_writeFits(path,file_y,dpl_y,&runmode,runmode.dpl_gridcells,&frame, runmode.ref_ra, runmode.ref_dec );
 				t_2 += myseconds();
 				std::cout << " Time  " << std::setprecision(15) << t_2 << std::endl;
 				//std::cerr << "**" << dpl_x[0] << std::endl;
 			}
 
 			//std::cerr << "**" << ampli_GPU[0] << std::endl;
 			free(dpl_x);
 			free(dpl_y);
 		}
 		if (runmode.potential > 0){
 			//Allocation
-			type_t* shear_GPU = (type_t *) malloc((int) (runmode.shear_gridcells) * (runmode.shear_gridcells) * sizeof(type_t));
+			type_t* pot_GPU = (type_t *) malloc((int) (runmode.pot_gridcells) * (runmode.pot_gridcells) * sizeof(type_t));
 			for(int ii = 0; ii < nvalues; ii++){
 				////calculate maps
 				std::cout << " GPU launching for map potential " << ii << std::endl;
 				t_2 = -myseconds();
 				////set bayes potential
 				module_readParameters_setbayesmapmodels(&runmode, &cosmology, host_potentialoptimization, potfile, &lenses_SOA,bayespot,nparam, ii);
 				module_readParameters_debug_potential_SOA(0, lenses_SOA, runmode.n_tot_halos);
 				//Init
-				memset(shear_GPU, 0, (runmode.shear_gridcells) * (runmode.shear_gridcells) * sizeof(type_t));
+				memset(pot_GPU, 0, (runmode.pot_gridcells) * (runmode.pot_gridcells) * sizeof(type_t));
 
 				//Choosing Function definition
 				map_pot_function_t map_pot_function;
 				map_pot_function = select_map_potential_function(&runmode);
 
 				//calculating map using defined function
 				map_grid_potential_GPU(map_pot_function, pot_GPU, &cosmology, &frame, &lenses_SOA, runmode.n_tot_halos, runmode.pot_gridcells ,runmode.potential, runmode.z_pot);
 
 				//writing
 				module_writeFits(path,runmode.pot_name,ii,pot_GPU,&runmode,runmode.pot_gridcells,&frame, runmode.ref_ra, runmode.ref_dec );
 				t_2 += myseconds();
 				std::cout << " Time  " << std::setprecision(15) << t_2 << std::endl;
 				//std::cerr << "**" << pot_GPU[0] << std::endl;
 			}
-			free(shear_GPU);
+			free(pot_GPU);
 		}
 		//
 
 	t_1 += myseconds();
 	std::cout << "Lenstool Total Time " << std::setprecision(15) << t_lt_total << std::endl;
 	std::cout << "HPC Total Time  " << std::setprecision(15) << t_1 << std::endl;
 #endif
 
 }
 
diff --git a/utils/maps/para.out b/utils/maps/para.out
index 5111935..19d220a 100644
--- a/utils/maps/para.out
+++ b/utils/maps/para.out
@@ -1,230 +1,231 @@
 runmode
 	inverse	0 0
 	reference	3 292.95682 -26.575718 292.956820 -26.575718
 	verbose	0
 	mass	4 200 0.350000 mass_4
 	ampli	5 200 1000.000000 ampli_5
+	shear	1 200 0.300000 shear_1
 	end
 image
 	multfile	1 immul_ongoing.cat
 	mult_wcs	1
 	forme		-1
 	z_m_limit	 1 2.0 1 1.000  6.000  0.1000 
 	z_m_limit	 2 4.0 1 1.000  6.000  0.1000 
 	z_m_limit	 3 6.0 1 1.000  8.000  0.1000 
 	z_m_limit	 4 5.0 1 1.000  8.000  0.1000 
 	sigposArcsec		0.500000
 	end
 grille
 	nombre		128
 	polaire		0
 	nlentille	201
 	nlens_opt	3
 	nlens_crit	3
 	end
 source
 	z_source	1.250000
 	end
 potentiel
 0
 	profil		81
 	x_centre	0.000000
 	y_centre	0.000000
 	ellipticite	0.300000
 	angle_pos	55.000000
 	v_disp		1000.000000
 	core_radius_kpc	50.000000
 	cut_radius_kpc	1000.000000
 	z_lens		0.350000
 	end
 limit
 0
 	x_centre	1 -5.000000 5.000000 0.100000
 	y_centre	1 -5.000000 5.000000 0.100000
 	ellipticite	1 0.000000 0.700000 0.100000
 	angle_pos	1 0.000000 3.141593 0.001745
 	core_radius	1 1.000000 35.000000 0.100000
 	v_disp		1 800.000000 1300.000000 0.100000
 	end
 potentiel
 1
 	profil		81
 	x_centre	-4.030000
 	y_centre	-40.760000
 	ellipticite	0.300000
 	angle_pos	55.000000
 	v_disp		1000.000000
 	core_radius_kpc	50.000000
 	cut_radius_kpc	1000.000000
 	z_lens		0.350000
 	end
 limit
 1
 	x_centre	1 -10.000000 0.000000 0.100000
 	y_centre	1 -45.000000 -35.000000 0.100000
 	ellipticite	1 0.000000 0.900000 0.100000
 	angle_pos	1 0.000000 3.141593 0.001745
 	core_radius	1 1.000000 35.000000 0.100000
 	v_disp		1 100.000000 800.000000 0.100000
 	end
 potentiel
 2
 	profil		81
 	x_centre	0.000000
 	y_centre	0.000000
 	ellipticite	0.273000
 	angle_pos	58.820000
 	v_disp		100.000000
 	core_radius_kpc	0.115000
 	cut_radius_kpc	100.000000
 	z_lens		0.350000
 	end
 limit
 2
 	cut_radius_kpc	1 0.000000 200.000000 0.100000
 	v_disp		1 0.000000 300.000000 0.100000
 	end
 potfile
 	filein	1 m1931_CM_zCLASH-MUSE.cat
 	zlens	0.350000
 	type	81
 	corekpc	0.150000
 	mag0	19.650000
 	sigma	3 158.000000 27.000000
 	cutkpc	1 10.000000 100.000000
 	slope	0 4.000000 0.000000
 	vdslope	0 4.000000 0.000000
 	end
 potfile
 	filein	1 potfile_cl_N-NW-S3.txt
 	zlens	0.350000
 	type	81
 	corekpc	0.000000
 	mag0	27.000000
 	sigma	1 100.000000 300.000000
 	cutkpc	0 10.000000 100.000000
 	slope	0 4.000000 4.200000
 	vdslope	0 4.000000 0.000000
 	vdscatter	0 0.000000 0.000000
 	rcutscatter	0 0.000000 0.000000
 	end
 cline
 	nplan		0
 	dmax		150.000000
 	pas		0.100000
 	algorithm		MARCHINGSQUARE
 	end
 grande
 	iso	0 0 0.000000 0.000000 0.000000
 	name	best
 	profil	0 0
 	contour	1 0
 	large_dist	0.300000
 	end
 cosmologie
 	H0	70.000000
 	omega	0.300000
 	lambda	0.700000
 	kcourb	0.000000
 	end
 champ
 	dmax	136.500000
 	end
 fini
 For z_s = 1.2500  DLS/DS:0.6446
 DLS:0.2589(lt) 1108.86(Mpc) DOS:0.4017(lt) 1720.20(Mpc)
 DOL:0.2379(lt) 1018.90(Mpc) DOL_lum:0.4336(lt) 1856.95(Mpc)
 Mcrit:2.531472e-03 (10^12 Msol/kpc^2)
 Conversion Factor @ z = 0.350000, 1 arcsec == 4.940 kpc
 Number of Clumps: 13
 -------- Clump O1: PIEMD Kovner, truncated
  Total mass: 1210.957259(cor) 1043.891997 (10^12 M_sol)
  rcut:202.44(") 1000.00(kpc)
  vdisp:1000.00(km/s) b0:43.2598
  rc:10.12(") 50.00(kpc)
  rt:202.44(") 1000.00(kpc)
  r_ct:0.0000 r_cr:0.0000
 -------- Clump O2: PIEMD Kovner, truncated
  Total mass: 1210.957259(cor) 1043.891997 (10^12 M_sol)
  rcut:202.44(") 1000.00(kpc)
  vdisp:1000.00(km/s) b0:43.2598
  rc:10.12(") 50.00(kpc)
  rt:202.44(") 1000.00(kpc)
  r_ct:0.0000 r_cr:0.0000
 -------- Clump O3: PIEMD Kovner, truncated
  Total mass: 1.210957(cor) 1.094828 (10^12 M_sol)
  rcut:20.24(") 100.00(kpc)
  vdisp:100.00(km/s) b0:0.4326
  rc:0.02(") 0.12(kpc)
  rt:20.24(") 100.00(kpc)
  r_ct:0.0000 r_cr:0.0000
 -------- Clump 853.0: PIEMD Kovner, truncated
  Total mass: 0.195219(cor) 0.174090 (10^12 M_sol)
  rcut:1.63(") 8.04(kpc)
  vdisp:141.64(km/s) b0:0.8678
  rc:0.02(") 0.12(kpc)
  rt:1.63(") 8.04(kpc)
  r_ct:0.0000 r_cr:0.0000
 -------- Clump 935.0: PIEMD Kovner, truncated
  Total mass: 0.009058(cor) 0.008078 (10^12 M_sol)
  rcut:0.35(") 1.73(kpc)
  vdisp:65.74(km/s) b0:0.1869
  rc:0.01(") 0.03(kpc)
  rt:0.35(") 1.73(kpc)
  r_ct:0.0000 r_cr:0.0000
 -------- Clump 942.0: PIEMD Kovner, truncated
  Total mass: 0.049213(cor) 0.043887 (10^12 M_sol)
  rcut:0.82(") 4.03(kpc)
  vdisp:100.36(km/s) b0:0.4357
  rc:0.01(") 0.06(kpc)
  rt:0.82(") 4.03(kpc)
  r_ct:0.0000 r_cr:0.0000
 -------- Clump 974.0: PIEMD Kovner, truncated
  Total mass: 0.055381(cor) 0.049387 (10^12 M_sol)
  rcut:0.87(") 4.28(kpc)
  vdisp:103.37(km/s) b0:0.4622
  rc:0.01(") 0.06(kpc)
  rt:0.87(") 4.28(kpc)
  r_ct:0.0000 r_cr:0.0000
 -------- Clump 996.0: PIEMD Kovner, truncated
  Total mass: 0.042462(cor) 0.037866 (10^12 M_sol)
  rcut:0.76(") 3.75(kpc)
  vdisp:96.73(km/s) b0:0.4047
  rc:0.01(") 0.06(kpc)
  rt:0.76(") 3.75(kpc)
  r_ct:0.0000 r_cr:0.0000
 -------- Clump 1004.0: PIEMD Kovner, truncated
  Total mass: 0.103916(cor) 0.092669 (10^12 M_sol)
  rcut:1.19(") 5.86(kpc)
  vdisp:120.98(km/s) b0:0.6332
  rc:0.02(") 0.09(kpc)
  rt:1.19(") 5.86(kpc)
  r_ct:0.0000 r_cr:0.0000
 -------- Clump 9999.99: PIEMD Kovner, truncated
  Total mass: 0.732560(cor) 0.653270 (10^12 M_sol)
  rcut:3.15(") 15.57(kpc)
  vdisp:197.13(km/s) b0:1.6811
  rc:0.05(") 0.23(kpc)
  rt:3.15(") 15.57(kpc)
  r_ct:0.0000 r_cr:0.0000
 -------- Clump S3: PIEMD Kovner, truncated
  Total mass: 11.505289(cor) 10.413905 (10^12 M_sol)
  rcut:19.73(") 97.47(kpc)
  vdisp:312.21(km/s) b0:4.2167
  rc:0.00(") 0.00(kpc)
  rt:19.73(") 97.47(kpc)
  r_ct:0.0000 r_cr:0.0000
 -------- Clump NW: PIEMD Kovner, truncated
  Total mass: 13.445253(cor) 12.169845 (10^12 M_sol)
  rcut:21.33(") 105.37(kpc)
  vdisp:324.61(km/s) b0:4.5583
  rc:0.00(") 0.00(kpc)
  rt:21.33(") 105.37(kpc)
  r_ct:0.0000 r_cr:0.0000
 -------- Clump N: PIEMD Kovner, truncated
  Total mass: 10.465377(cor) 9.472638 (10^12 M_sol)
  rcut:18.82(") 92.96(kpc)
  vdisp:304.90(km/s) b0:4.0216
  rc:0.00(") 0.00(kpc)
  rt:18.82(") 92.96(kpc)
  r_ct:0.0000 r_cr:0.0000