IMPLICIT DOUBLE PRECISION(a-h,o-z) Logical Debug PARAMETER (sq2 = 1.41421356d0) PARAMETER (pi = 3.1415926535d0) PARAMETER (gq2 = 0.79788456 ) ! 2/sqrt(2pi) PARAMETER (Ncoef = 4) ! maximum power in Chebyshev polynomials PARAMETER (Nterms= 4) ! max power in used approximation PARAMETER (iSh1 = Nterms+2) ! shift in indexes for vcoef in arrays pmin/max/step PARAMETER (iSh2 = 2*Nterms+3) ! position of a0 limits in arrays pmin/max/step PARAMETER (Npars= 2*Nterms+3) ! number of free parameters PARAMETER (Np = 5e5) ! max number of objects PARAMETER (Debug = .false.) PARAMETER (nItermax = 25) ! max number of iterations for the 1d-minimization COMMON /Contr/ dcoef(0:Ncoef),vcoef(0:Ncoef) COMMON /Pars/ a0,Vmax,Rmax,Rmin,Ndata,Nsample, & aMag_min,aMag_max,Veloc_min,Veloc_max, & qpar_min,qpar_max,urcolor_min,urcolor_max, & dR_min,dR_max,Flux,StMass COMMON /Limits/ pmin(20),pmax(20),pstep(20) COMMON /Data/ Rad(Np),Vp(Np) COMMON /Aux0/ aLike,iMax COMMON /Aux/ Rprof(0:100),Vprof(0:100), & Dprof(0:100),SigV(0:100),SigD(0:100) COMMON /Init/ Rinit(0:100),Vinit(0:100),Dinit(0:100) ! number of expansion terms in Chebyshev approx ! {0,1,..Nterms} -> total is Nterms +1