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_mci_sim
Commits
c7bbff33
Commit
c7bbff33
authored
Oct 25, 2024
by
Yan Zhaojun
Browse files
update
parent
a2bcbefb
Pipeline
#7090
failed with stage
in 0 seconds
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
csst_mci_sim/csst_mci_sim.py
View file @
c7bbff33
...
...
@@ -741,8 +741,8 @@ def centroid(data):
-------
cx: the centroid column number, in horizontal direction definet in python image show
cy: the centroid row number , in vertical direction
'''
################# '''
###
###
from
scipy
import
ndimage
cy
,
cx
=
ndimage
.
center_of_mass
(
data
)
...
...
@@ -1036,7 +1036,7 @@ class MCIsimulator():
Creates lensing parameters;
"""
#############################
self
.
image_g
=
np
.
zeros
(
(
self
.
information
[
'ysize'
],
self
.
information
[
'xsize'
]),
dtype
=
float
)
self
.
image_r
=
np
.
zeros
(
...
...
@@ -1062,7 +1062,7 @@ class MCIsimulator():
self
.
ghostMax
=
self
.
information
[
'ghostratio'
]
self
.
log
.
info
(
'Maximum in the ghost model %e'
%
self
.
ghostMax
)
return
# ##############################################
# ##############################################
def
readCosmicRayInformation
(
self
):
"""
...
...
@@ -3239,7 +3239,7 @@ class MCIsimulator():
####
ofd_g
=
fits
.
PrimaryHDU
()
#
###
World coordinate system and related parameters #####
# World coordinate system and related parameters #####
hdu_g
=
fits
.
ImageHDU
(
data
)
hdu_g
.
header
[
'WCSAXES'
]
=
(
np
.
int16
(
2
),
'number of WCS axes'
)
...
...
@@ -4340,7 +4340,7 @@ class MCIsimulator():
hdu_r
.
header
[
'BUNIT'
]
=
(
'ADU'
,
'physical unit of array values'
)
###### file information ###############
#
##### file information ###############
temp
=
t3
.
utcnow
()
data_time
=
temp
.
strftime
(
"%Y-%m-%dT%H:%M:%S.%f"
)
...
...
@@ -4381,7 +4381,7 @@ class MCIsimulator():
# #### detector and Filter information #####
hdu_r
.
header
[
'FILTER'
]
=
(
self
.
filter_r
[:
6
],
'filter band'
)
##### Detector information ####
#
#### Detector information ####
hdu_r
.
header
[
'DETSN'
]
=
(
'E2V-CCD-290-0000000'
,
'detector serial number'
)
hdu_r
.
header
[
'DETNAME'
]
=
(
'blue-opt'
,
'detector name'
)
...
...
@@ -4891,7 +4891,7 @@ class MCIsimulator():
hdu_i
.
header
[
'BUNIT'
]
=
(
'ADU'
,
'physical unit of array values'
)
###### file information ###############
#
##### file information ###############
temp
=
t3
.
utcnow
()
data_time
=
temp
.
strftime
(
"%Y-%m-%dT%H:%M:%S.%f"
)
...
...
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