Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
LAM-GRD-public
maoppy
Commits
ce8b303e
Commit
ce8b303e
authored
Nov 17, 2021
by
rfetick
Browse files
replace _np by np (correct for bug)
parent
7e233e0d
Changes
1
Hide whitespace changes
Inline
Side-by-side
maoppy/psfmodel.py
View file @
ce8b303e
...
...
@@ -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'
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment