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
Hide whitespace changes
Inline
Side-by-side
csst_mci_sim/csst_mci_sim.py
View file @
c7bbff33
...
@@ -741,8 +741,8 @@ def centroid(data):
...
@@ -741,8 +741,8 @@ def centroid(data):
-------
-------
cx: the centroid column number, in horizontal direction definet in python image show
cx: the centroid column number, in horizontal direction definet in python image show
cy: the centroid row number , in vertical direction
cy: the centroid row number , in vertical direction
################# '''
'''
###
###
###
from
scipy
import
ndimage
from
scipy
import
ndimage
cy
,
cx
=
ndimage
.
center_of_mass
(
data
)
cy
,
cx
=
ndimage
.
center_of_mass
(
data
)
...
@@ -1036,7 +1036,7 @@ class MCIsimulator():
...
@@ -1036,7 +1036,7 @@ class MCIsimulator():
Creates lensing parameters;
Creates lensing parameters;
"""
"""
#############################
self
.
image_g
=
np
.
zeros
(
self
.
image_g
=
np
.
zeros
(
(
self
.
information
[
'ysize'
],
self
.
information
[
'xsize'
]),
dtype
=
float
)
(
self
.
information
[
'ysize'
],
self
.
information
[
'xsize'
]),
dtype
=
float
)
self
.
image_r
=
np
.
zeros
(
self
.
image_r
=
np
.
zeros
(
...
@@ -1062,7 +1062,7 @@ class MCIsimulator():
...
@@ -1062,7 +1062,7 @@ class MCIsimulator():
self
.
ghostMax
=
self
.
information
[
'ghostratio'
]
self
.
ghostMax
=
self
.
information
[
'ghostratio'
]
self
.
log
.
info
(
'Maximum in the ghost model %e'
%
self
.
ghostMax
)
self
.
log
.
info
(
'Maximum in the ghost model %e'
%
self
.
ghostMax
)
return
return
# ##############################################
# ##############################################
def
readCosmicRayInformation
(
self
):
def
readCosmicRayInformation
(
self
):
"""
"""
...
@@ -2745,7 +2745,7 @@ class MCIsimulator():
...
@@ -2745,7 +2745,7 @@ class MCIsimulator():
Because the pixel-to-pixel non-uniformity effect (i.e. multiplicative) flat fielding takes place
Because the pixel-to-pixel non-uniformity effect (i.e. multiplicative) flat fielding takes place
before CTI and other effects, the flat field file must be the same size as the pixels that see
before CTI and other effects, the flat field file must be the same size as the pixels that see
the sky."""
the sky."""
# generate flatfiledfile, with
# generate flatfiledfile, with
flatsigma
=
self
.
information
[
'flatsigma'
]
flatsigma
=
self
.
information
[
'flatsigma'
]
...
@@ -3239,7 +3239,7 @@ class MCIsimulator():
...
@@ -3239,7 +3239,7 @@ class MCIsimulator():
####
####
ofd_g
=
fits
.
PrimaryHDU
()
ofd_g
=
fits
.
PrimaryHDU
()
#
###
World coordinate system and related parameters #####
# World coordinate system and related parameters #####
hdu_g
=
fits
.
ImageHDU
(
data
)
hdu_g
=
fits
.
ImageHDU
(
data
)
hdu_g
.
header
[
'WCSAXES'
]
=
(
np
.
int16
(
2
),
'number of WCS axes'
)
hdu_g
.
header
[
'WCSAXES'
]
=
(
np
.
int16
(
2
),
'number of WCS axes'
)
...
@@ -4340,7 +4340,7 @@ class MCIsimulator():
...
@@ -4340,7 +4340,7 @@ class MCIsimulator():
hdu_r
.
header
[
'BUNIT'
]
=
(
'ADU'
,
'physical unit of array values'
)
hdu_r
.
header
[
'BUNIT'
]
=
(
'ADU'
,
'physical unit of array values'
)
###### file information ###############
#
##### file information ###############
temp
=
t3
.
utcnow
()
temp
=
t3
.
utcnow
()
data_time
=
temp
.
strftime
(
"%Y-%m-%dT%H:%M:%S.%f"
)
data_time
=
temp
.
strftime
(
"%Y-%m-%dT%H:%M:%S.%f"
)
...
@@ -4381,7 +4381,7 @@ class MCIsimulator():
...
@@ -4381,7 +4381,7 @@ class MCIsimulator():
# #### detector and Filter information #####
# #### detector and Filter information #####
hdu_r
.
header
[
'FILTER'
]
=
(
self
.
filter_r
[:
6
],
'filter band'
)
hdu_r
.
header
[
'FILTER'
]
=
(
self
.
filter_r
[:
6
],
'filter band'
)
##### Detector information ####
#
#### Detector information ####
hdu_r
.
header
[
'DETSN'
]
=
(
hdu_r
.
header
[
'DETSN'
]
=
(
'E2V-CCD-290-0000000'
,
'detector serial number'
)
'E2V-CCD-290-0000000'
,
'detector serial number'
)
hdu_r
.
header
[
'DETNAME'
]
=
(
'blue-opt'
,
'detector name'
)
hdu_r
.
header
[
'DETNAME'
]
=
(
'blue-opt'
,
'detector name'
)
...
@@ -4891,7 +4891,7 @@ class MCIsimulator():
...
@@ -4891,7 +4891,7 @@ class MCIsimulator():
hdu_i
.
header
[
'BUNIT'
]
=
(
'ADU'
,
'physical unit of array values'
)
hdu_i
.
header
[
'BUNIT'
]
=
(
'ADU'
,
'physical unit of array values'
)
###### file information ###############
#
##### file information ###############
temp
=
t3
.
utcnow
()
temp
=
t3
.
utcnow
()
data_time
=
temp
.
strftime
(
"%Y-%m-%dT%H:%M:%S.%f"
)
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