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
Wu Jin
CSST simulation
Commits
b39af5a0
Commit
b39af5a0
authored
Jan 26, 2022
by
Xin Zhang
Browse files
modify header, add pos vel
parent
a5e13836
Changes
2
Hide whitespace changes
Inline
Side-by-side
ObservationSim/Config/Header/ImageHeader.py
View file @
b39af5a0
...
...
@@ -233,7 +233,7 @@ def WCS_def(xlen = 9216, ylen = 9232, gapy = 898.0, gapx1 = 534, gapx2 = 1309, r
def
generatePrimaryHeader
(
xlen
=
9216
,
ylen
=
9232
,
pointNum
=
'1'
,
ra
=
60
,
dec
=
-
40
,
psize
=
0.074
,
row_num
=
1
,
col_num
=
1
,
date
=
'200930'
,
time_obs
=
'120000'
,
im_type
=
'MS'
,
exptime
=
150.
):
def
generatePrimaryHeader
(
xlen
=
9216
,
ylen
=
9232
,
pointNum
=
'1'
,
ra
=
60
,
dec
=
-
40
,
psize
=
0.074
,
row_num
=
1
,
col_num
=
1
,
date
=
'200930'
,
time_obs
=
'120000'
,
im_type
=
'MS'
,
exptime
=
150.
,
sat_pos
=
[
0.
,
0.
,
0.
],
sat_vel
=
[
0.
,
0.
,
0.
]
):
# array_size1, array_size2, flux, sigma = int(argv[1]), int(argv[2]), 1000.0, 5.0
...
...
@@ -294,6 +294,18 @@ def generatePrimaryHeader(xlen = 9216, ylen = 9232, pointNum = '1', ra = 60, dec
tend
=
Time
(
tstart
.
mjd
+
h_prim
[
'EXPTIME'
]
/
86400.
,
format
=
"mjd"
)
h_prim
[
'EXPEND'
]
=
round
(
tend
.
mjd
,
5
)
h_prim
[
'POSI0_X'
]
=
sat_pos
[
0
]
h_prim
[
'POSI0_Y'
]
=
sat_pos
[
1
]
h_prim
[
'POSI0_Z'
]
=
sat_pos
[
2
]
h_prim
[
'VELO0_X'
]
=
sat_vel
[
0
]
h_prim
[
'VELO0_Y'
]
=
sat_vel
[
1
]
h_prim
[
'VELO0_Z'
]
=
sat_vel
[
2
]
h_prim
[
'RA_PNT0'
]
=
ra_hms
h_prim
[
'DEC_PNT0'
]
=
dec_hms
return
h_prim
def
generateExtensionHeader
(
xlen
=
9216
,
ylen
=
9232
,
ra
=
60
,
dec
=
-
40
,
pa
=
-
23.433
,
gain
=
1.0
,
readout
=
5.0
,
dark
=
0.02
,
saturation
=
90000
,
psize
=
0.074
,
row_num
=
1
,
col_num
=
1
,
extName
=
'SCI'
):
...
...
ObservationSim/ObservationSim.py
View file @
b39af5a0
...
...
@@ -120,6 +120,7 @@ class Observation(object):
bright_obj
=
0
dim_obj
=
0
for
j
in
range
(
self
.
nobj
):
break
# if j >= 100:
# break
obj
=
self
.
cat
.
objs
[
j
]
...
...
@@ -263,7 +264,9 @@ class Observation(object):
date
=
date_obs
,
time_obs
=
time_obs
,
exptime
=
pointing
.
exp_time
,
im_type
=
'MS'
)
im_type
=
'MS'
,
sat_pos
=
[
pointing
.
sat_x
,
pointing
.
sat_y
,
pointing
.
sat_z
],
sat_vel
=
[
pointing
.
sat_vx
,
pointing
.
sat_vy
,
pointing
.
sat_vz
])
h_ext
=
generateExtensionHeader
(
xlen
=
chip
.
npix_x
,
ylen
=
chip
.
npix_y
,
...
...
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