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_mci_sim
Commits
8112e880
Commit
8112e880
authored
Apr 14, 2024
by
Yan Zhaojun
Browse files
test
parent
58aba344
Pipeline
#4022
failed with stage
in 0 seconds
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
csst_mci_sim/csst_mci_sim.py
View file @
8112e880
...
@@ -1576,13 +1576,13 @@ class MCIsimulator():
...
@@ -1576,13 +1576,13 @@ class MCIsimulator():
self
.
filter_psf
=
dict
()
self
.
filter_psf
=
dict
()
filtername
=
self
.
filter_g
filtername
=
self
.
filter_g
self
.
filter_psf
[
'g'
]
=
np
.
load
(
information
[
'dir_path'
]
+
'MCI_inputData/PSF/'
+
filtername
+
'_PSF.npy'
,
allow_pickle
=
True
).
item
()
self
.
filter_psf
[
'g'
]
=
np
.
load
(
self
.
information
[
'dir_path'
]
+
'MCI_inputData/PSF/'
+
filtername
+
'_PSF.npy'
,
allow_pickle
=
True
).
item
()
filtername
=
self
.
filter_r
filtername
=
self
.
filter_r
self
.
filter_psf
[
'r'
]
=
np
.
load
(
information
[
'dir_path'
]
+
'MCI_inputData/PSF/'
+
filtername
+
'_PSF.npy'
,
allow_pickle
=
True
).
item
()
self
.
filter_psf
[
'r'
]
=
np
.
load
(
self
.
information
[
'dir_path'
]
+
'MCI_inputData/PSF/'
+
filtername
+
'_PSF.npy'
,
allow_pickle
=
True
).
item
()
filtername
=
self
.
filter_i
filtername
=
self
.
filter_i
self
.
filter_psf
[
'i'
]
=
np
.
load
(
information
[
'dir_path'
]
+
'MCI_inputData/PSF/'
+
filtername
+
'_PSF.npy'
,
allow_pickle
=
True
).
item
()
self
.
filter_psf
[
'i'
]
=
np
.
load
(
self
.
information
[
'dir_path'
]
+
'MCI_inputData/PSF/'
+
filtername
+
'_PSF.npy'
,
allow_pickle
=
True
).
item
()
return
return
...
@@ -5607,6 +5607,8 @@ def runMCIsim(sourcein,configfile,dir_path,iLoop):
...
@@ -5607,6 +5607,8 @@ def runMCIsim(sourcein,configfile,dir_path,iLoop):
sim
[
iLoop
].
information
[
'dir_path'
]
=
dir_path
sim
[
iLoop
].
information
[
'dir_path'
]
=
dir_path
print
(
'sim.information dir_path'
,
dir_path
)
sim
[
iLoop
].
simulate
(
iLoop
)
sim
[
iLoop
].
simulate
(
iLoop
)
return
return
...
...
tests/test_mci_sim.py
View file @
8112e880
...
@@ -47,6 +47,7 @@ class TestDemoFunction(unittest.TestCase):
...
@@ -47,6 +47,7 @@ class TestDemoFunction(unittest.TestCase):
print
(
configfile
)
print
(
configfile
)
csst_mci_sim
.
runMCIsim
(
sourcein
,
configfile
,
dir_path
,
1
)
csst_mci_sim
.
runMCIsim
(
sourcein
,
configfile
,
dir_path
,
1
)
self
.
assertEqual
(
self
.
assertEqual
(
0
,
1
,
0
,
1
,
"case 1: SCI sim passes."
,
"case 1: SCI sim passes."
,
...
...
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