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
0ecade3b
Commit
0ecade3b
authored
May 09, 2024
by
Yan Zhaojun
Browse files
debug
parent
954210c4
Changes
9
Show whitespace changes
Inline
Side-by-side
csst_mci_sim/CTI/__pycache__/CTI.cpython-311.pyc
0 → 100644
View file @
0ecade3b
File added
csst_mci_sim/CTI/__pycache__/__init__.cpython-311.pyc
0 → 100644
View file @
0ecade3b
File added
csst_mci_sim/csst_mci_sim.py
View file @
0ecade3b
...
...
@@ -1907,7 +1907,7 @@ class MCIsimulator():
if
j
==
0
:
self
.
log
.
info
(
'begin iteration........'
)
#
if self.debug:
if
self
.
debug
:
self
.
log
.
info
(
'j = %i'
%
(
j
))
starRa
=
3600.0
*
(
newRa
[
j
]
)
# ra of star, arcsecond
...
...
@@ -2013,7 +2013,6 @@ class MCIsimulator():
#self.log.info('Channel in =%s, PosX(in pixel)=%f, PosY(in pixel)=%f' % (channel[i], gx[ch], gy[ch]))
if
self
.
debug
:
self
.
log
.
info
(
'Channel in =%s, PosX(in pixel)=%f, PosY(in pixel)=%f, Nphotons=%f'
%
(
channel
[
i
],
gx
[
ch
],
gy
[
ch
],
intscales
[
ch
]))
self
.
log
.
info
(
'Star number on CCD is = %i'
%
(
nlayccd
))
...
...
@@ -2091,7 +2090,7 @@ class MCIsimulator():
self
.
log
.
info
(
'appfat= %s'
%
(
self
.
appFatt
))
if
self
.
appFatt
:
self
.
log
.
info
(
'begin appfat ........'
)
#
self.log.info('begin appfat ........')
### apply treering and bright fatter and diffusion;
SimpleTreeRing
=
galsim
.
SiliconSensor
().
simple_treerings
(
amplitude
=
self
.
information
[
'treering'
])
...
...
@@ -2116,7 +2115,7 @@ class MCIsimulator():
cx0
,
cy0
=
centroid
(
image
.
array
)
self
.
log
.
info
(
'finish appfat ........'
)
#
self.log.info('finish appfat ........')
############################################
############################################
...
...
@@ -2542,41 +2541,24 @@ class MCIsimulator():
galRa
=
newRa
[
k1
]
*
3600
##*(srcs_cat[k1].header['new_ra'] -self.information['gal_ra'] +self.information['star_ra']) # ra of galaxies, arcsecond
galDec
=
newDec
[
k1
]
*
3600
####(srcs_cat[k1].header['new_dec']-self.information['gal_dec']+self.information['star_dec']) # dec of galaxies, arcsecond
#spa = srcs_cat[k1].header['spa']
###########################################################################
############################################################################
### test code ####
# galRa=self.information['star_ra']*3600
# galDec=self.information['star_dec']*3600
###########
# tx, ty = world_to_pixel(galRa/3600,
# galDec/3600,
# theta.deg,
# center_ra,
# center_dec,
# self.information['xsize']/2-0.5,
# self.information['ysize']/2-0.5,
# pixelsize=0.05)
#################################################################
fsx
,
fsy
=
cal_pos
(
center_ra
,
center_dec
,
rotTelPos
,
rotSkyPos
,
galRa
,
galDec
)
# row= fsy/losscale+self.information['ysize']/2-0.5 ### row number on CCD image, dec direction ,y direction
# col= fsx/losscale+self.information['xsize']/2-0.5 ### col number on CCD image, ra direction, x direction
if
abs
(
fsx
)
>
235
or
abs
(
fsy
)
>
235
:
continue
# if row>=self.information['ysize']+200 or row<=-200 or col>=self.information['xsize']+200 or col <=-200:
# continue
# # SED of j-th galaxy ,# unit of 10-17 erg/s/A/cm2
gal_flux
=
srcs_sed
[
k1
+
1
].
data
## here is k1+1, not k1, k1 begins with 0
# print('nlaccd = ', nlayccd)
################################
### rotate the lensed_images_g ###
...
...
csst_mci_sim/support/__pycache__/MCIinstrumentModel.cpython-311.pyc
0 → 100644
View file @
0ecade3b
File added
csst_mci_sim/support/__pycache__/__init__.cpython-311.pyc
0 → 100644
View file @
0ecade3b
File added
csst_mci_sim/support/__pycache__/cosmicrays.cpython-311.pyc
0 → 100644
View file @
0ecade3b
File added
csst_mci_sim/support/__pycache__/logger.cpython-311.pyc
0 → 100644
View file @
0ecade3b
File added
csst_mci_sim/support/__pycache__/sed.cpython-311.pyc
0 → 100644
View file @
0ecade3b
File added
csst_mci_sim/support/__pycache__/shao.cpython-311.pyc
0 → 100644
View file @
0ecade3b
File added
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