搜索DeepPro708000.mdb 深空天体数据库

1.安装Deepsky Astronomy Software
http://www.mikehotka.com/DAS/masterdownload.htm

2.搜索:

DeepSkyTable([‘NGC 3372’,‘Be 84’])


# 搜索mdb
def searchInmdb(id='',pf='',brave=True):
    lis = []
    # 连接mdb文件
    connStr = (
        r'Driver={Microsoft Access Driver (*.mdb)};DBQ=C:/Program Files (x86)/Deepsky Astronomy Software/DeepPro708000.mdb;'
        # r'Database=DeepskyTable;'
        )
    conn = mdb.win_connect_mdb(connStr)
    cur = conn.cursor()
    if id!='':
        oql = "SELECT * FROM DeepskyTable WHERE objectid = '%s' or otherid = '%s';"%(id,id)
        cur.execute(oql)
    elif pf!='':
        if brave:
            # oql = "SELECT * FROM DeepskyTable WHERE LEFT(objectid,%s) = '%s' or otherid like '%%%s%%';"%(len(pf),pf,pf)
            oql = "SELECT * FROM DeepskyTable WHERE LEFT(objectid,%s) = '%s' or LEFT(otherid,%s) = '%s';" % (len(pf), pf, len(pf), pf)
        else:
            # oql = "SELECT * FROM DeepskyTable WHERE LEFT(objectid,%s) = '%s' or LEFT(otherid,%s) = '%s';"%(len(pf),pf,len(pf),pf)
            oql = "SELECT * FROM DeepskyTable WHERE LEFT(objectid,%s) = '%s';"%(len(pf),pf)
        print(oql)
        cur.execute(oql)
    else:
        return
    tmplis=[]
    for col in cur.description:
        # 展示行描述
        tmplis.append(col[0])
    # print(tmplis)
    tlis = ['ID','ID2','RA2000','Dec2000','Mag','Size','Type','Const','Source']
    # lis.append(tlis)
    result = cur.fetchall()
    lis = []
    for row in result:
        # 展示个字段的值
        row = [str(x) for x in list(row)]
        lis.append([row[1],row[2],row[4]+'h'+row[5]+'m',(int(row[4])+float(row[5])/60)/12*pi,row[6]+'°'+row[7]+"'",(int(row[6])+float(row[7])/60)/180*pi,row[13],row[12],row[3],row[11],row[19]])
        # print(row[19]+': \t'+row[1]+'\t'+row[2]+'\t'+row[4]+'h'+row[5]+'m'+'\t'+row[6]+'°'+row[7]+"'"+' v:'+row[13])
        # print(row)
        lis.append(list(row))
    # print(len(lis))
    for ix in ['2000','SAC81','SAC75','SAC71']:
        for line in lis:
            if line[len(line) - 1]==ix:
                return line
    if lis == []:
        # return [id]
        return None
    return lis[0]
def DeepSkyTable(lis):
    tlis = [['ID','ID2','RA','RAd','Dec','Decd','Mag','Size','Type','Const','Source']]
    for line in lis:
        rsl = searchInmdb(line)
        if rsl == None:
            continue
        tlis.append(rsl)
    return tlis

深空数据库说明:

NameDescription
2000NGC 2000 (http://cdsweb.u-strasbg.fr/viz-bin/Cat?VII/118)
SAC 8.1Saguaro Astronomy Club Database version 8.1
Barnard’s Catalog of Dark ObjectsBarnard’s Catalog of Dark Objects (Barnard 1927)
ChaSNRCatalog of Galactic Supernova Remnants (Chandra)
MCSNRCatalog of Magellanic Cloud Supernova Remnants
AlignmentAlignment Stars Catalog
vdBCatalogue of Reflection Nebulae
VII 216Catalogue of Southern Emission Nebulae
BSCYale Bright Star Catalog
I 209ACatalog of 2900 double stars
I1237Washington Visual Double Star Catalog
II 171Parenago Catalog of Stars in Orion Nebula
I214General Catalog Of Variable Stars
NSCVSNew Catalog of Suspected Variables
I214EGExtragalactic Variable Stars
V84ESO Catalog Of Planetary Nebula
VII 103Galactic Globular Clusters
BheCatalogue of Southern Stars embedded in nebulosity
VII 116Southern Galaxy Catalog (SGC)
VII 136Extra Galactic Database II
VII 140Catalog of Galaxies Behind the Milky Way
VII 145NBG - Nearby Galaxies Catalogue
VII 155Third Reference Cat. of Bright Galaxies
VII 159Catalog of galaxies towards the Coma SuperCluster
VII 24AStarsbourg Catalog of Plan Neb
VII 51Shapley-Ames Catalog of Bright Galaxies
VII 57List of Globules
VII 68ADark Nebulae and Globules
VII 77Isolated Pairs of Galaxies in the Northern Hem
VII 79AGalaxies South of Dec -30, Obs Spectroscopically
VII 82AIsolated Galaxies
VII 83Isolated Triplets of galaxies
VII 84AGroups of Galaxies. III. The CfA Survey
VII 89BCompact Group of Compact Galaxies
VII 98ACatalog of 2810 Nearby Galaxies
VII161Nearby Galaxies
VII170Catalog of Southern Peculiar Galaxies
VII188-1Active Galaxies fainter than -23
VII188-2Quasars Brighter Than absolute magnitude -23
VII191Catalog of Southern Dark Clouds
VII20Catalog of HII Regions
VII21Catalog of Reflection Nebula
VII26DUppsala General Catalog of Galaxies
VII4A-1Abell Cluster of Galaxies
VII4A-2Zwicky Cluster of Galaxies
VII5AStar Clusters and Associations
VII62AMorphological Catalog of Galaxies
VII74AAtlas of Peculiar Galaxies
VII7ACatalog of Dark Nebula
VII85AHickson Catalog of Compact Galaxies
VII9Lynds Catalog of Bright Nebula
VII92AOpen Cluster Data 5th Edition
VIII-4Fourth Cambridge Radio Survey Catalog
VII-119PGC - Catalog of Principal Galaxies
VII-142Southern Redshifts Catalog
VII-173Catalog of Seyfert Galaxies
VII-196Shakhbazian Compact Groups of Galaxies
VII-211Galactic Supernova Remnants
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值