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
844aa0ba
Commit
844aa0ba
authored
Sep 27, 2021
by
Xin Zhang
Browse files
add some output for test
parent
e1458fd3
Changes
1
Show whitespace changes
Inline
Side-by-side
ObservationSim/MockObject/SpecDisperser/SpecDisperser.py
View file @
844aa0ba
...
...
@@ -194,13 +194,13 @@ class SpecDisperser(object):
originOut_x
=
origin_in
[
1
]
+
dx0_in
-
1
originOut_y
=
origin_in
[
0
]
+
dy0_in
-
1
return
model
,
originOut_x
,
originOut_y
return
model
,
originOut_x
,
originOut_y
,
dxpix
,
dypix
,
lam_beam
[
lam_index
],
ysens
[
lam_index
]
def
writerSensitivityFile
(
self
,
conffile
=
''
,
beam
=
''
,
w
=
None
,
sens
=
None
):
orders
=
{
'A'
:
'1st'
,
'B'
:
'0st'
,
'C'
:
'2st'
,
'D'
:
'-1st'
,
'E'
:
'-2st'
}
sens_file_name
=
conffile
[
0
:
-
5
]
+
'_
sensitivity
_'
+
orders
[
beam
]
+
'.fits'
def
writerSensitivityFile
(
self
,
conffile
=
''
,
beam
=
''
,
w
=
None
,
sens
=
None
):
orders
=
{
'A'
:
'1st'
,
'B'
:
'0st'
,
'C'
:
'2st'
,
'D'
:
'-1st'
,
'E'
:
'-2st'
}
sens_file_name
=
conffile
[
0
:
-
6
]
+
'.
sensitivity
.'
+
orders
[
beam
]
+
'.fits'
if
not
os
.
path
.
exists
(
sens_file_name
)
==
True
:
senstivity_out
=
Table
(
array
([
w
,
sens
]).
T
,
names
=
(
'WAVELENGTH'
,
'SENSITIVITY'
))
senstivity_out
=
Table
(
array
([
w
,
sens
]).
T
,
names
=
(
'WAVELENGTH'
,
'SENSITIVITY'
))
senstivity_out
.
write
(
sens_file_name
,
format
=
'fits'
)
...
...
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