查看“Astropy”的源代码
←
Astropy
跳到导航
跳到搜索
因为以下原因,您没有权限编辑本页:
您请求的操作仅限属于该用户组的用户执行:
用户
您可以查看和复制此页面的源代码。
== astropy.io.fits == [http://docs.astropy.org/en/stable/io/fits/] >>> hdulist = fits.open('input.fits') >>> hdulist.info() *each element of an HDUList is an HDU object with .header and .data attributes, which can be used to access the header and data portions of the HDU. >>> hdulist[0].header['targname'] *To see the entire header as it appears in the FITS file (with the END card and padding stripped), simply enter the header object by itself, or print(repr(header)): *It’s also possible to view a slice of the header: >>> header[:2] *Another way to either update an existing card or append a new one is to use the Header.set() method: >>> prihdr.set('observer', 'Edwin Hubble') ==宇宙学== *#从红移到年龄 >>>from astropy.cosmology import FlatLambdaCDM >>>cosmo = FlatLambdaCDM(H0=70, Om0=0.3) *从年龄到红移 >>> import astropy.units as u >>> from astropy.cosmology import z_at_value >>> z_at_value(cosmos.age, 2 * u.Gyr)
返回至“
Astropy
”。
导航菜单
个人工具
登录
命名空间
页面
讨论
大陆简体
已展开
已折叠
查看
阅读
查看源代码
查看历史
更多
已展开
已折叠
搜索
导航
首页
社群首页
最近更改
随机页面
帮助
工具
链入页面
相关更改
特殊页面
页面信息