1 / 4

二进制星表

天文数据与归档培训. 二进制星表. 何勃亮 国家天文台,中国虚拟天文台 hebl@nao.cas.cn. UCAC4 z100. col byte item fmt unit explanation notes - --------------------------------------------------------------------------

tucker-lee
Télécharger la présentation

二进制星表

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 天文数据与归档培训 二进制星表 何勃亮 国家天文台,中国虚拟天文台 hebl@nao.cas.cn

  2. UCAC4 z100 col byte item fmt unit explanation notes --------------------------------------------------------------------------- 1 1- 3 ra I*4 mas right ascension at epoch J2000.0 (ICRS) (1) 2 5- 8 spd I*4 mas south pole distance epoch J2000.0 (ICRS) (1) 3 9-10 magm I*2 millimag UCAC fit model magnitude (2) 4 11-12 maga I*2 millimag UCAC aperture magnitude (2) 5 13 sigmag I*1 1/100 mag error of UCAC magnitude (3) 6 14 objt I*1 object type (4) 7 15 cdf I*1 combined double star flag (5)

  3. Python 读取 # -*- coding: utf-8 -*- import struct def readU4(file): with open(file, 'rb') as f: chunk = f.read(78) while chunk != "": parseRc(chunk) chunk = f.read(78) """ 处理每条记录 rc为一个78字节长的二进制字段 """ defparseRc(rc): rcv = struct.unpack('2I2H1B', rc[0:13]) #只取部分字节 print "%d %d %d %d %d" % rcv readU4('z100')

  4. struct.unpack

More Related