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
6215ea38
Commit
6215ea38
authored
May 08, 2024
by
Yan Zhaojun
Browse files
debug
parent
55c41637
Changes
1
Show whitespace changes
Inline
Side-by-side
csst_mci_sim/csst_mci_sim.py
View file @
6215ea38
...
@@ -1906,25 +1906,15 @@ class MCIsimulator():
...
@@ -1906,25 +1906,15 @@ class MCIsimulator():
if
j
==
0
:
if
j
==
0
:
self
.
log
.
info
(
'begin iteration........'
)
self
.
log
.
info
(
'begin iteration........'
)
if
self
.
debug
:
self
.
log
.
info
(
'j = %i'
%
(
j
))
starRa
=
3600.0
*
(
newRa
[
j
]
)
# ra of star, arcsecond
starRa
=
3600.0
*
(
newRa
[
j
]
)
# ra of star, arcsecond
starDec
=
3600.0
*
(
newDec
[
j
]
)
# dec of star, arcsecond
starDec
=
3600.0
*
(
newDec
[
j
]
)
# dec of star, arcsecond
###################################################################
###################################################################
###### test code #####
# starRa =self.information['ra_obj']*3600.0
# starDec =self.information['dec_obj']*3600.0
# tx, ty = world_to_pixel(starRa/3600,
# starDec/3600,
# theta.deg,
# center_ra,
# center_dec,
# self.information['xsize']/2-0.5,
# self.information['ysize']/2-0.5,
# pixelsize=0.05)
#print(x,y)
###################################################################
###################################################################
fsx
,
fsy
=
cal_pos
(
center_ra
,
center_dec
,
rotTelPos
,
rotSkyPos
,
starRa
,
starDec
)
fsx
,
fsy
=
cal_pos
(
center_ra
,
center_dec
,
rotTelPos
,
rotSkyPos
,
starRa
,
starDec
)
row
=
fsy
/
pixelscale
+
self
.
information
[
'ysize'
]
/
2
-
0.5
### row number on CCD image
row
=
fsy
/
pixelscale
+
self
.
information
[
'ysize'
]
/
2
-
0.5
### row number on CCD image
...
@@ -1939,7 +1929,7 @@ class MCIsimulator():
...
@@ -1939,7 +1929,7 @@ class MCIsimulator():
if
self
.
debug
:
if
self
.
debug
:
if
nlayccd
>
5
:
if
nlayccd
>
1
:
break
break
st_ra
.
append
(
np
.
float64
(
starRa
/
3600.0
))
st_ra
.
append
(
np
.
float64
(
starRa
/
3600.0
))
...
@@ -2021,14 +2011,17 @@ class MCIsimulator():
...
@@ -2021,14 +2011,17 @@ class MCIsimulator():
#self.log.info('Channel in =%s, PosX(in pixel)=%f, PosY(in pixel)=%f' % (channel[i], gx[ch], gy[ch]))
#self.log.info('Channel in =%s, PosX(in pixel)=%f, PosY(in pixel)=%f' % (channel[i], gx[ch], gy[ch]))
#self.log.info('Channel in =%s, PosX(in pixel)=%f, PosY(in pixel)=%f, Nphotons=%f' % (channel[i], gx[ch], gy[ch],intscales[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
]))
if
nlayccd
%
100
==
0
:
self
.
log
.
info
(
'Star number on CCD is = %i'
%
(
nlayccd
))
self
.
log
.
info
(
'Star number on CCD is = %i'
%
(
nlayccd
))
if
self
.
debug
:
if
nlayccd
%
100
==
0
:
self
.
log
.
info
(
'Star number on CCD is = %i'
%
(
nlayccd
))
self
.
log
.
info
(
'Star number on CCD is = %i'
%
(
nlayccd
))
######
######
st_phot_C1
.
append
(
intscales
[
'g'
])
st_phot_C1
.
append
(
intscales
[
'g'
])
st_phot_C2
.
append
(
intscales
[
'r'
])
st_phot_C2
.
append
(
intscales
[
'r'
])
...
@@ -2652,7 +2645,7 @@ class MCIsimulator():
...
@@ -2652,7 +2645,7 @@ class MCIsimulator():
######## test code ##########
######## test code ##########
if
self
.
debug
:
if
self
.
debug
:
if
nlayccd
>
2
:
if
nlayccd
>
1
:
#########
#########
break
break
...
...
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