4
二二二二二 二二二 二二二二二 二二二二二二二 [email protected] 天天天天天天天天天

二进制星表

Embed Size (px)

DESCRIPTION

天文数据与归档培训. 二进制星表. 何勃亮 国家天文台,中国虚拟天文台 [email protected]. UCAC4 z100. col byte item fmt unit explanation notes - -------------------------------------------------------------------------- - PowerPoint PPT Presentation

Citation preview

Page 1: 二进制星表

二进制星表

何勃亮国家天文台,中国虚拟天文台

[email protected]

天文数据与归档培训

Page 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)

Page 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字节长的二进制字段"""def parseRc(rc): rcv = struct.unpack('2I2H1B', rc[0:13]) #只取部分字节 print "%d %d %d %d %d" % rcv

readU4('z100')

Page 4: 二进制星表

struct.unpack