You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
clipfloor in the imager will only optimize pixels in the Prior that initially have an intensity greater than the value you specify. I don't think there is a function right now that will return this mask region. We can add one if you'd like. To see the masked region you could do
I'm calling the imager_func like this:
zbl = 0.28
cfloor = 0.0028
niter = 300
conv_criteria = 0.0001
out = eh.imager_func( obs, gaussprior, gaussprior, zbl, d1='cphase', d2='camp', s1='gs', s2='gs', alpha_d1=50, alpha_d2=50, clipfloor=cfloor, maxit=niter, stop=conv_criteria )
The gaussprior is a single gaussian.
I get the following error and traceback:
/home/lmorabit/.local/lib/python2.7/site-packages/ehtim/imaging/imager_utils.pyc in imager_func(Obsdata, InitIm, Prior, flux, d1, d2, d3, alpha_d1, alpha_d2, alpha_d3, s1, s2, s3, alpha_s1, alpha_s2, alpha_s3, alpha_flux, alpha_cm, **kwargs)
294 # Print stats
295 print("Initial S_1: %f S_2: %f S_3: %f" % (reg1(ninit), reg2(ninit), reg3(ninit)))
--> 296 print("Initial Chi^2_1: %f Chi^2_2: %f Chi^2_3: %f" % (chisq1(ninit), chisq2(ninit), chisq3(ninit)))
297 print("Initial Objective Function: %f" % (objfunc(xinit)))
298
/home/lmorabit/.local/lib/python2.7/site-packages/ehtim/imaging/imager_utils.pyc in chisq2(imvec)
199
200 def chisq2(imvec):
--> 201 return chisq(imvec, A2, data2, sigma2, d2, ttype=ttype, mask=embed_mask)
202
203 def chisq2grad(imvec):
/home/lmorabit/.local/lib/python2.7/site-packages/ehtim/imaging/imager_utils.pyc in chisq(imvec, A, data, sigma, dtype, ttype, mask)
373 chisq = chisq_cphase(imvec, A, data, sigma)
374 elif dtype == 'camp':
--> 375 chisq = chisq_camp(imvec, A, data, sigma)
376 elif dtype == 'logcamp':
377 chisq = chisq_logcamp(imvec, A, data, sigma)
/home/lmorabit/.local/lib/python2.7/site-packages/ehtim/imaging/imager_utils.pyc in chisq_camp(imvec, Amatrices, clamp, sigma)
739 def chisq_camp(imvec, Amatrices, clamp, sigma):
740 """Closure Amplitudes (normalized) chi-squared"""
--> 741 print( np.min(imvec) )
742 print( np.min(Amatrices[1] ) )
743 clamp_samples = np.abs(np.dot(Amatrices[0], imvec) * np.dot(Amatrices[1], imvec) / (np.dot(Amatrices[2], imvec) * np.dot(Amatrices[3], imvec)))
/usr/lib64/python2.7/site-packages/numpy/core/fromnumeric.pyc in amin(a, axis, out, keepdims)
2370
2371 return _methods._amin(a, axis=axis,
-> 2372 out=out, **kwargs)
2373
2374
/usr/lib64/python2.7/site-packages/numpy/core/_methods.pyc in _amin(a, axis, out, keepdims)
27
28 def _amin(a, axis=None, out=None, keepdims=False):
---> 29 return umr_minimum(a, axis, None, out, keepdims)
30
31 def _sum(a, axis=None, dtype=None, out=None, keepdims=False):
ValueError: zero-size array to reduction operation minimum which has no identity
The text was updated successfully, but these errors were encountered: