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
Zheng Gaoshan
csst_fs
Commits
1a829ef9
Commit
1a829ef9
authored
Jun 30, 2025
by
Zheng Gaoshan
Browse files
init
parent
50a899b3
Pipeline
#9049
failed with stages
in 2 minutes and 44 seconds
Changes
3
Pipelines
1
Show whitespace changes
Inline
Side-by-side
csst/__init__.py
0 → 100644
View file @
1a829ef9
requirements.txt
0 → 100644
View file @
1a829ef9
astropy
\ No newline at end of file
run.py
0 → 100644
View file @
1a829ef9
from
astropy.io
import
fits
if
__name__
==
"__main__"
:
# 读取FITS文件
filename
=
'D:\项目\天文\data\CSST_MSC_MS_SCIE_20240817060830_20240817061100_10160000001_01_L0_V01.fits'
hdu_list
=
fits
.
open
(
filename
)
# 打印所有HDU(Header/Data Unit)的信息
hdu_list
.
info
()
# 访问第一个HDU的数据
primary_hdu
=
hdu_list
[
1
]
data
=
primary_hdu
.
data
# 打印数据类型
print
(
"Data type:"
,
type
(
data
))
# 访问第一个HDU的头部信息
header
=
primary_hdu
.
header
print
(
"Header keywords:"
,
list
(
header
.
keys
()))
# 关闭FITS文件以释放资源
hdu_list
.
close
()
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