Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
csst-sims
csst_msc_sim
Commits
0d574e7a
Commit
0d574e7a
authored
Oct 26, 2024
by
Wei Chengliang
Browse files
update codestyle-PEP8
parent
20c5ee5f
Pipeline
#7098
failed with stage
in 0 seconds
Changes
4
Pipelines
1
Show whitespace changes
Inline
Side-by-side
tests/test_BF_CTE.py
View file @
0d574e7a
...
@@ -22,7 +22,7 @@ except ImportError:
...
@@ -22,7 +22,7 @@ except ImportError:
import
importlib_resources
as
pkg_resources
import
importlib_resources
as
pkg_resources
##
# test FUNCTION --- START #
##
# test FUNCTION --- START #
def
add_brighter_fatter
(
img
):
def
add_brighter_fatter
(
img
):
# Inital dynamic lib
# Inital dynamic lib
try
:
try
:
...
@@ -50,7 +50,7 @@ def add_brighter_fatter(img):
...
@@ -50,7 +50,7 @@ def add_brighter_fatter(img):
img
.
array
[:,
:]
=
np
.
reshape
(
arr_imc
,
[
nx
,
ny
])
img
.
array
[:,
:]
=
np
.
reshape
(
arr_imc
,
[
nx
,
ny
])
del
arr_ima
,
arr_imc
del
arr_ima
,
arr_imc
return
img
return
img
##
# test FUNCTION --- END #
##
# test FUNCTION --- END #
def
defineCCD
(
iccd
,
config_file
):
def
defineCCD
(
iccd
,
config_file
):
...
...
tests/test_PSFmodule.py
View file @
0d574e7a
...
@@ -72,7 +72,7 @@ class PSFInterpModule_coverage(unittest.TestCase):
...
@@ -72,7 +72,7 @@ class PSFInterpModule_coverage(unittest.TestCase):
psfB
=
psfModel
.
get_PSF
(
psfB
=
psfModel
.
get_PSF
(
chip
=
chip
,
pos_img
=
pos_img
,
findNeighMode
=
'hoclistFind'
,
bandpass
=
bandpass
[
0
],
galsimGSObject
=
False
)
chip
=
chip
,
pos_img
=
pos_img
,
findNeighMode
=
'hoclistFind'
,
bandpass
=
bandpass
[
0
],
galsimGSObject
=
False
)
self
.
assertTrue
(
psf
!=
None
)
self
.
assertTrue
(
psf
is
not
None
)
self
.
assertTrue
(
np
.
max
(
np
.
abs
(
psfA
-
psfB
))
<
1e-6
)
self
.
assertTrue
(
np
.
max
(
np
.
abs
(
psfA
-
psfB
))
<
1e-6
)
...
...
tests/test_imaging.py
View file @
0d574e7a
...
@@ -209,7 +209,7 @@ class imagingModule_coverage(unittest.TestCase):
...
@@ -209,7 +209,7 @@ class imagingModule_coverage(unittest.TestCase):
gal
=
gal
+
gal_temp
gal
=
gal
+
gal_temp
print
(
gal
)
print
(
gal
)
self
.
assertTrue
(
gal
!=
None
)
self
.
assertTrue
(
gal
is
not
None
)
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
...
...
tools/get_PSF.py
View file @
0d574e7a
...
@@ -79,7 +79,7 @@ for iobj in range(nobj):
...
@@ -79,7 +79,7 @@ for iobj in range(nobj):
if
True
:
if
True
:
fn
=
"psf_{:}.{:}.{:}.fits"
.
format
(
chipID
,
iobj
,
i
)
fn
=
"psf_{:}.{:}.{:}.fits"
.
format
(
chipID
,
iobj
,
i
)
if
fn
!=
None
:
if
fn
is
not
None
:
if
os
.
path
.
exists
(
fn
):
if
os
.
path
.
exists
(
fn
):
os
.
remove
(
fn
)
os
.
remove
(
fn
)
hdu
=
fitsio
.
PrimaryHDU
()
hdu
=
fitsio
.
PrimaryHDU
()
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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