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

replace _np by np (correct for bug)

parent 7e233e0d
No related branches found
No related tags found
No related merge requests found
......@@ -407,21 +407,21 @@ class ParametricPSFfromPSD(ParametricPSF):
self.fixed_k = fixed_k
self.system = system
self.npix = npix # "_" to bypass the _computeXYarray update, that will be made with samp setter
self._npix = npix # "_" to bypass the _computeXYarray update, that will be made with samp setter
self.samp = samp # also init _computeXYarray and _otfDiffraction
self.nparam = nparam
self._nparam = nparam
self.bounds = ((-np.inf,)*nparam, (np.inf,)*nparam)
@property
def npix(self):
"""Number of required pixels for arrays"""
return self.npix
return self._npix
@npix.setter
def npix(self, value):
self.npix = value
self._npix = value
self._computeXYarray()
self._computeOtfDiffraction()
......@@ -508,7 +508,7 @@ class ParametricPSFfromPSD(ParametricPSF):
parampsd = np.array(parampsd)
bdn = np.array(bdn)
bup = np.array(bup)
if len(parampsd)!=self.nparam:
if len(parampsd)!=self._nparam:
raise ValueError('len(parampsd) is different from length of bounds')
if np.any(parampsd<bdn):
raise ValueError('Lower bounds are not respected')
......
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