# bounds on the semiaxes of the `peak_std` ellipsoid: standard deviations (square roots of the eigenvalues) of the covariance matrix
peak_std=4
max_rads=[5/6*rad/peak_stdforradinself.radiuses]# largest 'peak_std' radius is 5/6 of the box radius
min_rads=[1/2*res/peak_stdforresinself.resolution]# smallest 'peak_std' radius is 1/2 of the smallest bin size
# prec_lbnd = [-np.pi]*num_angles + [ 1/r for r in max_rads]
# prec_ubnd = [ np.pi]*num_angles + [ 1/r for r in min_rads]
# prec_lbnd = [max(-np.pi,phi-dphi) for phi in angles] + [ r/2.0 for r in invrads]
prec_lbnd=[max(-np.pi,phi-dphi)forphiinangles]+[1/rforrinmax_rads]#[ max((self.limits[d][1]-self.limits[d][0])/4/(4/3),invrads[d]/2.0) for d in range(self.ndims)]
prec_ubnd=[min(np.pi,phi+dphi)forphiinangles]+[1/rforrinmin_rads]#[ 100*r for r in invrads]
# bounds for all parameters
# params_lbnd = [np.abs(sqrtbkgr)/2, np.abs(sqrtintst)/2] + cnt_lbnd + prec_lbnd #+ [0 for sk in skewness]
# params_ubnd = [2*np.abs(sqrtbkgr), 2*np.abs(sqrtintst)] + cnt_ubnd + prec_ubnd #+ [0 for sk in skewness]
params_lbnd=[-np.inf,-np.inf]+cnt_lbnd+prec_lbnd#+ [0 for sk in skewness]
params_ubnd=[np.inf,np.inf]+cnt_ubnd+prec_ubnd#+ [0 for sk in skewness]
# bounds on the semiaxes of the `peak_std` ellipsoid: standard deviations (square roots of the eigenvalues) of the covariance matrix
peak_std=4
max_rads=[5/6*rad/peak_stdforradinself.radiuses]# largest 'peak_std' radius is 5/6 of the box radius
min_rads=[1/2*res/peak_stdforresinself.resolution]# smallest 'peak_std' radius is 1/2 of the smallest bin size
# prec_lbnd = [-np.pi]*num_angles + [ 1/r for r in max_rads]
# prec_ubnd = [ np.pi]*num_angles + [ 1/r for r in min_rads]
# prec_lbnd = [max(-np.pi,phi-dphi) for phi in angles] + [ r/2.0 for r in invrads]
prec_lbnd=[max(-np.pi,phi-dphi)forphiinangles]+[1/rforrinmax_rads]#[ max((self.limits[d][1]-self.limits[d][0])/4/(4/3),invrads[d]/2.0) for d in range(self.ndims)]
prec_ubnd=[min(np.pi,phi+dphi)forphiinangles]+[1/rforrinmin_rads]#[ 100*r for r in invrads]
# bounds for all parameters
# params_lbnd = [np.abs(sqrtbkgr)/2, np.abs(sqrtintst)/2] + cnt_lbnd + prec_lbnd #+ [0 for sk in skewness]
# params_ubnd = [2*np.abs(sqrtbkgr), 2*np.abs(sqrtintst)] + cnt_ubnd + prec_ubnd #+ [0 for sk in skewness]
params_lbnd=[-np.inf,-np.inf]+cnt_lbnd+prec_lbnd#+ [0 for sk in skewness]
params_ubnd=[np.inf,np.inf]+cnt_ubnd+prec_ubnd#+ [0 for sk in skewness]
# # g = gaussian_mixture(params[nbkgr:],fit_points,npeaks=1,covariance_parameterization=covariance_parameterization,return_gradient=False,return_hessian=False)