Skip to content
Snippets Groups Projects
Commit 2cf6e8c3 authored by rfetick's avatar rfetick
Browse files

modif on __all__ and circavg

parent 0c3b0333
No related branches found
No related tags found
No related merge requests found
......@@ -18,3 +18,4 @@ __author__ = "Romain JL. Fétick (LAM, France)"
__date__ = "May 30th 2021"
from . import utils, instrument, psfmodel
# from maoppy import utils, instrument, psfmodel
......@@ -14,6 +14,11 @@ import numpy.fft as _fft
import sys as _sys
from maoppy.utils import binning as _binning
__all__ = ["oversample", "lsq_flux_bck", "psffit", "reduced_coord",
"moffat", "gauss", "ParametricPSF", "ConstantPSF", "Moffat",
"Gaussian", "ParametricPSFfromPSD", "Turbulent", "Psfao"]
# Value to compute finite differences
_EPSILON = _np.sqrt(_sys.float_info.epsilon)
......
......@@ -182,7 +182,7 @@ def circavg(tab, center=(None, None)):
if tab.ndim != 2: raise ValueError("Input `tab` should be a 2D array")
nx, ny = tab.shape
r = circarr((int(nx), int(ny)), center=center)
cAVG = _np.zeros(int(r.max()))
cAVG = _np.zeros(int(r.max()), dtype=tab.dtype)
for i in range(int(r.max())):
index = _np.where((r >= i) * (r < (i + 1)))
cAVG[i] = tab[index[0], index[1]].sum() / index[0].size
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment