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_ifs_sim
Commits
d1063852
Commit
d1063852
authored
Dec 24, 2024
by
Yan Zhaojun
Browse files
update
parent
eb67f0ac
Pipeline
#7596
passed with stage
in 0 seconds
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
csst_ifs_sim/csst_ifs_sim.py
View file @
d1063852
...
@@ -34,8 +34,6 @@ import sys
...
@@ -34,8 +34,6 @@ import sys
# sys.path.append('./csst_ifs_sim')
# sys.path.append('./csst_ifs_sim')
conf
.
auto_max_age
=
None
conf
.
auto_max_age
=
None
"""
"""
"""
"""
Contact Information: zhaojunyan@shao.ac.cn
Contact Information: zhaojunyan@shao.ac.cn
...
@@ -212,8 +210,6 @@ class CDM03bidir():
...
@@ -212,8 +210,6 @@ class CDM03bidir():
:return: image that has been run through the CDM03 model
:return: image that has been run through the CDM03 model
:rtype: ndarray"""""
:rtype: ndarray"""""
#
# return data
iflip
=
iquadrant
/
2
iflip
=
iquadrant
/
2
jflip
=
iquadrant
%
2
jflip
=
iquadrant
%
2
...
@@ -1524,7 +1520,6 @@ def anySampledPSFnew(wavefront, pupil, Q, sizeout):
...
@@ -1524,7 +1520,6 @@ def anySampledPSFnew(wavefront, pupil, Q, sizeout):
return
psf
return
psf
##############################################################################
##############################################################################
##############################################################################
##############################################################################
...
@@ -1623,16 +1618,13 @@ def getSpectrum(Spectrum0, lam, sigma):
...
@@ -1623,16 +1618,13 @@ def getSpectrum(Spectrum0, lam, sigma):
DESCRIPTION.
DESCRIPTION.
"""
"""
# %获得输入波长lambda的光谱强度
# %获得输入波长lambda的光谱强度
wave
=
Spectrum0
[:,
0
]
# %原始光谱数据给定的波长;
wave
=
Spectrum0
[:,
0
]
# %原始光谱数据给定的波长;
Qt
=
Spectrum0
[:,
1
]
# %原始光谱数据给定的光谱强度;
Qt
=
Spectrum0
[:,
1
]
# %原始光谱数据给定的光谱强度;
d
=
abs
(
lam
-
wave
)
# %计算波长距离;
d
=
abs
(
lam
-
wave
)
# %计算波长距离;
if
min
(
d
)
>
3
*
sigma
:
if
min
(
d
)
>
3
*
sigma
:
SpmOut
=
1.0
/
20000
SpmOut
=
1.0
/
20000
else
:
else
:
column
=
np
.
where
(
d
==
min
(
d
))
column
=
np
.
where
(
d
==
min
(
d
))
SpmOut
=
Qt
[
column
[
0
]]
*
np
.
exp
(
-
(
lam
-
wave
[
column
[
0
]])
**
2
/
2
/
sigma
**
2
)
SpmOut
=
Qt
[
column
[
0
]]
*
np
.
exp
(
-
(
lam
-
wave
[
column
[
0
]])
**
2
/
2
/
sigma
**
2
)
...
@@ -1664,7 +1656,6 @@ class IFSsimulator():
...
@@ -1664,7 +1656,6 @@ class IFSsimulator():
:type opts: OptionParser instance
:type opts: OptionParser instance
"""
"""
####################################
####################################
self
.
configfile
=
configfile
self
.
configfile
=
configfile
...
@@ -1729,10 +1720,7 @@ class IFSsimulator():
...
@@ -1729,10 +1720,7 @@ class IFSsimulator():
Processes configuration information and save the information to a dictionary self.information.
Processes configuration information and save the information to a dictionary self.information.
The configuration file may look as follows::
The configuration file may look as follows::
[TEST]
[TEST]
For explanation of each field, see /data/test.config. Note that if an input field does not exist,
For explanation of each field, see /data/test.config. Note that if an input field does not exist,
then the values are taken from the default instrument model as described in
then the values are taken from the default instrument model as described in
support.IFSinstrumentModel.VISinformation(). Any of the defaults can be overwritten by providing
support.IFSinstrumentModel.VISinformation(). Any of the defaults can be overwritten by providing
...
@@ -1806,10 +1794,7 @@ class IFSsimulator():
...
@@ -1806,10 +1794,7 @@ class IFSsimulator():
Creates lensing parameters;
Creates lensing parameters;
"""
"""
#
#
self
.
imgtemp
=
dict
()
self
.
imgtemp
=
dict
()
self
.
pixel
=
0.1
# arcsec, pixel scale size;
self
.
pixel
=
0.1
# arcsec, pixel scale size;
##############################################################################
##############################################################################
...
@@ -1900,7 +1885,6 @@ class IFSsimulator():
...
@@ -1900,7 +1885,6 @@ class IFSsimulator():
spec_erg2
=
spec_erg
/
4.25452e10
spec_erg2
=
spec_erg
/
4.25452e10
# self.zodiacal_wave=wave_A # in A
# self.zodiacal_wave=wave_A # in A
# self.zodiacal_flux=spec_erg2
# self.zodiacal_flux=spec_erg2
return
wave_A
,
spec_erg2
return
wave_A
,
spec_erg2
...
@@ -2283,9 +2267,8 @@ class IFSsimulator():
...
@@ -2283,9 +2267,8 @@ class IFSsimulator():
return
return
#
###
###########################################################################
#
###########################################################################
###############################################################################
def
addCosmicRays
(
self
,
idk
):
def
addCosmicRays
(
self
,
idk
):
"""
"""
...
...
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