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
2635a7c7
Commit
2635a7c7
authored
Jan 24, 2025
by
Yan Zhaojun
Browse files
update
parent
9351384b
Pipeline
#7889
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 @
2635a7c7
...
@@ -24,6 +24,7 @@ import ctypes
...
@@ -24,6 +24,7 @@ import ctypes
import
astropy.coordinates
as
coord
import
astropy.coordinates
as
coord
from
scipy.interpolate
import
interp1d
from
scipy.interpolate
import
interp1d
import
scipy.spatial
as
spatial
import
scipy.spatial
as
spatial
from
ctypes
import
*
# import sc
# import sc
# from matplotlib import pyplot as plt
# from matplotlib import pyplot as plt
# from joblib import Parallel, delayed
# from joblib import Parallel, delayed
...
@@ -96,7 +97,7 @@ except:
...
@@ -96,7 +97,7 @@ except:
from
.mci_so
import
cdm03bidir
from
.mci_so
import
cdm03bidir
####################################################
####################################################
from
ctypes
import
*
def
checkInputList
(
input_list
,
n
):
def
checkInputList
(
input_list
,
n
):
...
@@ -248,6 +249,7 @@ def onOrbitObsPosition(path, input_ra_list, input_dec_list, input_pmra_list, inp
...
@@ -248,6 +249,7 @@ def onOrbitObsPosition(path, input_ra_list, input_dec_list, input_pmra_list, inp
# functions
# functions
def
get_file_extension
(
filename
):
def
get_file_extension
(
filename
):
# 使用os.path.splitext()函数分割文件名和扩展名
# 使用os.path.splitext()函数分割文件名和扩展名
file_name
,
extension
=
os
.
path
.
splitext
(
filename
)
file_name
,
extension
=
os
.
path
.
splitext
(
filename
)
...
@@ -1861,11 +1863,11 @@ class MCIsimulator():
...
@@ -1861,11 +1863,11 @@ class MCIsimulator():
parallax_list
=
self
.
star
[
'parallax_gaia'
].
tolist
()
parallax_list
=
self
.
star
[
'parallax_gaia'
].
tolist
()
rv_list
=
[
0.0
for
i
in
range
(
len
(
ra_list
))]
rv_list
=
[
0.0
for
i
in
range
(
len
(
ra_list
))]
################################################
#
###############################################
newRa
,
newDec
=
onOrbitObsPosition
(
self
.
information
[
'dir_path'
],
ra_list
,
dec_list
,
pmra_list
,
newRa
,
newDec
=
onOrbitObsPosition
(
self
.
information
[
'dir_path'
],
ra_list
,
dec_list
,
pmra_list
,
pmdec_list
,
rv_list
,
parallax_list
,
len
(
pmdec_list
,
rv_list
,
parallax_list
,
len
(
ra_list
),
ra_list
),
self
.
information
[
'pos_x'
],
self
.
information
[
'pos_y'
],
self
.
information
[
'pos_z'
],
self
.
information
[
'velocity_x'
],
self
.
information
[
'velocity_y'
],
self
.
information
[
'velocity_z'
],
"J2000"
,
self
.
TianCe_day
,
self
.
TianCe_exp_start
)
self
.
information
[
'pos_x'
],
self
.
information
[
'pos_y'
],
self
.
information
[
'pos_z'
],
self
.
information
[
'velocity_x'
],
self
.
information
[
'velocity_y'
],
self
.
information
[
'velocity_z'
],
"J2000"
,
self
.
TianCe_day
,
self
.
TianCe_exp_start
)
else
:
else
:
if
get_file_extension
(
starcat
)
==
'.fits'
:
if
get_file_extension
(
starcat
)
==
'.fits'
:
...
...
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