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_ifs_sim
Commits
1728b12e
Commit
1728b12e
authored
Oct 28, 2024
by
Yan Zhaojun
Browse files
update
parent
2e4d01ad
Pipeline
#7148
failed with stage
in 0 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
csst_ifs_sim/__pycache__/csst_ifs_sim.cpython-311.pyc
0 → 100644
View file @
1728b12e
File added
csst_ifs_sim/csst_ifs_sim.py
View file @
1728b12e
...
@@ -1211,17 +1211,17 @@ def LSR_velocity(ra, dec, velocity, Obstime):
...
@@ -1211,17 +1211,17 @@ def LSR_velocity(ra, dec, velocity, Obstime):
# convert ra and dec to
# convert ra and dec to
source
=
SkyCoord
(
ra
*
u
.
deg
,
dec
*
u
.
deg
,
frame
=
'icrs'
,
source
=
SkyCoord
(
ra
*
u
.
deg
,
dec
*
u
.
deg
,
frame
=
'icrs'
,
unit
=
(
u
.
hourangle
,
u
.
deg
))
unit
=
(
u
.
hourangle
,
u
.
deg
))
l
l
=
source
.
galactic
.
l
.
deg
a
l
=
source
.
galactic
.
l
.
deg
b
=
source
.
galactic
.
b
.
deg
b
=
source
.
galactic
.
b
.
deg
c
=
SkyCoord
(
l
l
=
l
l
*
u
.
degree
,
b
=
b
*
u
.
degree
,
frame
=
'galactic'
)
c
=
SkyCoord
(
l
=
a
l
*
u
.
degree
,
b
=
b
*
u
.
degree
,
frame
=
'galactic'
)
c_icrs
=
c
.
transform_to
(
'icrs'
)
c_icrs
=
c
.
transform_to
(
'icrs'
)
barycorr
=
c_icrs
.
radial_velocity_correction
(
barycorr
=
c_icrs
.
radial_velocity_correction
(
obstime
=
Time
(
Obstime
),
location
=
local
)
obstime
=
Time
(
Obstime
),
location
=
local
)
velocity
=
velocity
+
barycorr
.
value
/
1000
velocity
=
velocity
+
barycorr
.
value
/
1000
# print(barycorr.value/1000)
# print(barycorr.value/1000)
l
l
=
l
l
*
np
.
pi
/
180
c
l
=
a
l
*
np
.
pi
/
180
b
=
b
*
np
.
pi
/
180
b
=
b
*
np
.
pi
/
180
return
velocity
+
9
*
np
.
cos
(
l
l
)
*
np
.
cos
(
b
)
+
12
*
np
.
sin
(
l
l
)
*
np
.
cos
(
b
)
+
7
*
np
.
sin
(
b
)
return
velocity
+
9
*
np
.
cos
(
c
l
)
*
np
.
cos
(
b
)
+
12
*
np
.
sin
(
c
l
)
*
np
.
cos
(
b
)
+
7
*
np
.
sin
(
b
)
###############################################################################
###############################################################################
...
@@ -3477,7 +3477,7 @@ class IFSsimulator():
...
@@ -3477,7 +3477,7 @@ class IFSsimulator():
# add random pointing error to telescope, the telescope poingt parameter in
# add random pointing error to telescope, the telescope poingt parameter in
# fits header have random pointing error
# fits header have random pointing error
ud_ra
=
np
.
random
.
random
()
# Choose a random shift in arcsec
ud_ra
=
np
.
random
.
random
()
# Choose a random shift in arcsec
self
.
information
[
'ra_pnt0'
]
=
self
.
information
[
'
dec
_pnt0'
]
+
0.01
*
ud_ra
self
.
information
[
'ra_pnt0'
]
=
self
.
information
[
'
ra
_pnt0'
]
+
0.01
*
ud_ra
ud_dec
=
np
.
random
.
random
()
ud_dec
=
np
.
random
.
random
()
self
.
information
[
'dec_pnt0'
]
=
self
.
information
[
'dec_pnt0'
]
+
0.01
*
ud_dec
self
.
information
[
'dec_pnt0'
]
=
self
.
information
[
'dec_pnt0'
]
+
0.01
*
ud_dec
...
...
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