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
Zhang Xin
Sls 1d Spec
Commits
a880cf7e
Commit
a880cf7e
authored
May 20, 2022
by
xin
Browse files
add export result
parent
031ff30e
Changes
1
Hide whitespace changes
Inline
Side-by-side
example/sim_demo1.py
View file @
a880cf7e
...
...
@@ -2,6 +2,9 @@
from
SpecGen.SpecGenerator
import
SpecGenerator
from
SpecGen.Config
import
Config
from
astropy.io
import
fits
from
astropy.table
import
Table
import
galsim
...
...
@@ -15,4 +18,8 @@ if __name__ == '__main__':
specG
=
SpecGenerator
(
sedFn
=
sedFn
,
grating
=
'GI'
,
beam
=
'A'
,
aper
=
2.0
,
xcenter
=
5000
,
ycenter
=
5000
,
p_size
=
0.074
,
psf
=
psf
,
skybg
=
0.3
,
dark
=
0.02
,
readout
=
5
,
t
=
150
,
expNum
=
1
,
config
=
config
)
specTab
,
specImg
,
img
,
fluxRa
=
specG
.
generateSpec1dforStar
()
fits
.
writeto
(
"specImg.fits"
,
specImg
,
overwrite
=
True
)
fits
.
writeto
(
"DImg.fits"
,
img
,
overwrite
=
True
)
specTab
.
write
(
"specTab.fits"
,
overwrite
=
True
)
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