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
Liu Dezi
csst_msc_sim
Commits
8d4f245f
Commit
8d4f245f
authored
Mar 21, 2022
by
Xin Zhang
Browse files
file name; cosmic ray density 1/4
parent
f320dc0b
Changes
3
Hide whitespace changes
Inline
Side-by-side
ObservationSim/Config/Header/ImageHeader.py
View file @
8d4f245f
...
...
@@ -259,7 +259,7 @@ def generatePrimaryHeader(xlen = 9216, ylen = 9232, pointNum = '1', ra = 60, dec
h_prim
[
'PIXSIZE1'
]
=
xlen
h_prim
[
'PIXSIZE2'
]
=
ylen
h_prim
[
'FILENAME'
]
=
'MSC_'
+
im_type
+
'_'
+
date
+
time_obs
+
'_1'
+
pointNum
.
rjust
(
8
,
'0'
)
+
'_'
+
CCDID
[
k
-
1
].
rjust
(
2
,
'0'
)
+
'_raw'
h_prim
[
'DATE'
]
=
'20'
+
date
[
0
:
2
]
+
'-'
+
date
[
2
:
4
]
+
'-'
+
date
[
4
:
6
]
h_prim
[
'TIME'
]
=
time_obs
[
0
:
2
]
+
':'
+
time_obs
[
2
:
4
]
+
':'
+
time_obs
[
4
:
6
]
h_prim
[
'DATE-OBS'
]
=
'20'
+
date
[
0
:
2
]
+
'-'
+
date
[
2
:
4
]
+
'-'
+
date
[
4
:
6
]
...
...
@@ -273,7 +273,7 @@ def generatePrimaryHeader(xlen = 9216, ylen = 9232, pointNum = '1', ra = 60, dec
h_prim
[
'EXPTIME'
]
=
exptime
# Define file types
file_type
=
{
'MS'
:
'sci'
,
'
CLB
'
:
'zero'
,
'
CLD
'
:
'dark'
,
'
CLF
'
:
'flat'
,
'CRS'
:
'cosmic_ray'
,
'CRD'
:
'cosmic_ray'
}
file_type
=
{
'MS'
:
'sci'
,
'
BIAS
'
:
'zero'
,
'
DARK
'
:
'dark'
,
'
FLAT
'
:
'flat'
,
'CRS'
:
'cosmic_ray'
,
'CRD'
:
'cosmic_ray'
}
h_prim
[
'FILETYPE'
]
=
file_type
[
im_type
]
co
=
coord
.
SkyCoord
(
ra
,
dec
,
unit
=
'deg'
)
...
...
@@ -294,6 +294,12 @@ 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
)
file_start_time
=
'20'
+
date
[
0
:
6
]
+
time_obs
[
0
:
6
]
end_time_str
=
str
(
tend
.
datetime
)
file_end_time
=
end_time_str
[
0
:
4
]
+
end_time_str
[
5
:
7
]
+
end_time_str
[
8
:
10
]
+
end_time_str
[
11
:
13
]
+
end_time_str
[
14
:
16
]
+
end_time_str
[
17
:
19
]
h_prim
[
'FILENAME'
]
=
'CSST_MSC_MS_'
+
im_type
+
'_'
+
file_start_time
+
'_'
+
file_end_time
+
'_1'
+
pointNum
.
rjust
(
8
,
'0'
)
+
'_'
+
CCDID
[
k
-
1
].
rjust
(
2
,
'0'
)
+
'_L0_1'
h_prim
[
'POSI0_X'
]
=
sat_pos
[
0
]
h_prim
[
'POSI0_Y'
]
=
sat_pos
[
1
]
...
...
ObservationSim/Instrument/Chip/Chip.py
View file @
8d4f245f
...
...
@@ -360,7 +360,7 @@ class Chip(FocalPlane):
cr_map
,
cr_event_num
=
effects
.
produceCR_Map
(
xLen
=
self
.
npix_x
,
yLen
=
self
.
npix_y
,
exTime
=
self
.
exptime
+
0.5
*
self
.
readout_time
,
cr_pixelRatio
=
0.003
*
(
self
.
exptime
+
0.5
*
self
.
readout_time
)
/
15
0.
,
cr_pixelRatio
=
0.003
*
(
self
.
exptime
+
0.5
*
self
.
readout_time
)
/
60
0.
,
gain
=
self
.
gain
,
attachedSizes
=
self
.
attachedSizes
,
seed
=
SeedCosmicRay
+
pointing_ID
*
30
+
self
.
chipID
)
# seed: obj-imaging:+0; bias:+1; dark:+2; flat:+3;
...
...
@@ -511,7 +511,7 @@ class Chip(FocalPlane):
ra_cen
=
ra_cen
,
dec_cen
=
dec_cen
,
img_rot
=
img_rot
,
im_type
=
'
CLB
'
,
im_type
=
'
BIAS
'
,
pointing_ID
=
pointing_ID
,
date_obs
=
date_obs
,
time_obs
=
time_obs
,
...
...
@@ -603,7 +603,7 @@ class Chip(FocalPlane):
ra_cen
=
ra_cen
,
dec_cen
=
dec_cen
,
img_rot
=
img_rot
,
im_type
=
'
CLF
'
,
im_type
=
'
FLAT
'
,
pointing_ID
=
pointing_ID
,
date_obs
=
date_obs
,
time_obs
=
time_obs
,
...
...
@@ -717,7 +717,7 @@ class Chip(FocalPlane):
ra_cen
=
ra_cen
,
dec_cen
=
dec_cen
,
img_rot
=
img_rot
,
im_type
=
'
CLD
'
,
im_type
=
'
DARK
'
,
pointing_ID
=
pointing_ID
,
date_obs
=
date_obs
,
time_obs
=
time_obs
,
...
...
ObservationSim/ObservationSim.py
View file @
8d4f245f
...
...
@@ -130,8 +130,8 @@ class Observation(object):
bright_obj
=
0
dim_obj
=
0
for
j
in
range
(
self
.
nobj
):
#
if j >= 1
00
:
#
break
if
j
>=
1
:
break
obj
=
self
.
cat
.
objs
[
j
]
if
obj
.
type
==
'star'
and
self
.
config
[
"run_option"
][
"galaxy_only"
]:
continue
...
...
@@ -273,7 +273,7 @@ class Observation(object):
date
=
date_obs
,
time_obs
=
time_obs
,
exptime
=
pointing
.
exp_time
,
im_type
=
'
M
S'
,
im_type
=
'S
CI
'
,
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
(
...
...
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