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_gehong
Commits
7c2ce85a
Commit
7c2ce85a
authored
Oct 26, 2024
by
Shuai Feng
Browse files
fix PEP8 bugs
parent
1128112c
Pipeline
#7131
failed with stage
in 0 seconds
Changes
4
Pipelines
1
Show whitespace changes
Inline
Side-by-side
csst_ifs_gehong/config.py
View file @
7c2ce85a
...
...
@@ -28,7 +28,6 @@ class config():
self
.
dlam
=
dlam
self
.
wave
=
np
.
arange
(
wave_min
,
wave_max
,
dlam
)
self
.
wave_min
=
wave_min
self
.
inst_fwhm
=
inst_fwhm
self
.
nx
=
nx
self
.
ny
=
ny
...
...
csst_ifs_gehong/cube3d.py
View file @
7c2ce85a
...
...
@@ -9,27 +9,21 @@ class Cube3D():
Class of 3-dimentional spectral cube
"""
def
__init__
(
self
,
config
,
stellar_map
=
None
,
gas_map
=
None
):
self
.
config
=
config
self
.
nx
=
config
.
nx
self
.
ny
=
config
.
ny
self
.
dpix
=
config
.
dpix
self
.
fov_x
=
config
.
fov_x
self
.
fov_y
=
config
.
fov_y
self
.
wave
=
config
.
wave
self
.
nz
=
len
(
self
.
wave
)
self
.
wave0
=
np
.
min
(
self
.
wave
)
self
.
inst_fwhm
=
config
.
inst_fwhm
self
.
flux
=
np
.
zeros
((
self
.
nx
,
self
.
ny
,
self
.
nz
))
self
.
stellar_map
=
stellar_map
self
.
gas_map
=
gas_map
def
make_cube
(
self
,
stellar_tem
=
None
,
hii_tem
=
None
):
for
i
in
range
(
self
.
nx
):
for
j
in
range
(
self
.
ny
):
if
self
.
stellar_map
is
not
None
:
...
...
@@ -72,9 +66,7 @@ class Cube3D():
self
.
flux
[
x0
+
dx
,
y0
+
dy
,
:]
=
self
.
flux
[
x0
+
dx
,
y0
+
dy
,
:]
+
spec
.
flux
def
savefits
(
self
,
filename
,
path
=
'./'
):
hdr
=
fits
.
Header
()
hdr
[
'FILETYPE'
]
=
'SCICUBE'
hdr
[
'CODE'
]
=
'CSST-IFS-GEHONG'
hdr
[
'VERSION'
]
=
'0.0.1'
...
...
csst_ifs_gehong/map2d.py
View file @
7c2ce85a
csst_ifs_gehong/spec1d.py
View file @
7c2ce85a
...
...
@@ -220,8 +220,7 @@ def Calzetti_Law(wave, Rv=4.05):
reddening_curve
=
np
.
zeros
(
len
(
wave
))
idx
=
(
wave
>=
1200
)
&
(
wave
<
6300
)
reddening_curve
[
idx
]
=
2.659
*
(
-
2.156
+
1.509
*
wave_number
[
idx
]
-
0.198
*
(
wave_number
[
idx
]
**
2
))
+
0.011
*
(
wave_number
[
idx
]
**
3
)
+
Rv
reddening_curve
[
idx
]
=
2.659
*
(
-
2.156
+
1.509
*
wave_number
[
idx
]
-
0.198
*
(
wave_number
[
idx
]
**
2
))
+
0.011
*
(
wave_number
[
idx
]
**
3
)
+
Rv
idx
=
(
wave
>=
6300
)
&
(
wave
<=
22000
)
reddening_curve
[
idx
]
=
2.659
*
(
-
1.857
+
1.040
*
wave_number
[
idx
])
+
Rv
...
...
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