当前位置: 首页>>代码示例>>Python>>正文


Python Vizier.get_catalogs方法代码示例

本文整理汇总了Python中astroquery.vizier.Vizier.get_catalogs方法的典型用法代码示例。如果您正苦于以下问题:Python Vizier.get_catalogs方法的具体用法?Python Vizier.get_catalogs怎么用?Python Vizier.get_catalogs使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在astroquery.vizier.Vizier的用法示例。


在下文中一共展示了Vizier.get_catalogs方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: green_catalog_download

# 需要导入模块: from astroquery.vizier import Vizier [as 别名]
# 或者: from astroquery.vizier.Vizier import get_catalogs [as 别名]
def green_catalog_download():
    # This allows easy access to Vizier tables:
    # https://astroquery.readthedocs.org/en/latest/vizier/vizier.html
    from astroquery.vizier import Vizier
    Vizier.ROW_LIMIT = -1
    # This is the 2014-05 version of Green's catalog
    # http://vizier.u-strasbg.fr/viz-bin/VizieR?-source=VII/272
    results = Vizier.get_catalogs(['VII/272'])
    table = results[0]
    return table
开发者ID:JouvinLea,项目名称:gammapy-extra,代码行数:12,代码来源:make_green.py

示例2: get_k2_epic_catalog

# 需要导入模块: from astroquery.vizier import Vizier [as 别名]
# 或者: from astroquery.vizier.Vizier import get_catalogs [as 别名]
def get_k2_epic_catalog():
    """
    Parameters
    ----------

    Returns
    -------
    """
    global k2_epic_table

    if k2_epic_table is None:
        catalogs = Vizier.get_catalogs(huber2016)
        k2_epic_table = catalogs[0]  # This is the table with the data
        k2_epic_table.add_index('EPIC')
    return k2_epic_table
开发者ID:bmorris3,项目名称:freckles,代码行数:17,代码来源:catalog.py

示例3: get_duncan_catalog

# 需要导入模块: from astroquery.vizier import Vizier [as 别名]
# 或者: from astroquery.vizier.Vizier import get_catalogs [as 别名]
def get_duncan_catalog():
    """
    Parameters
    ----------

    Returns
    -------
    """
    global sindex_catalog

    if sindex_catalog is None:
        catalogs = Vizier.get_catalogs(duncan1991)
        sindex_catalog = catalogs[0]  # This is the table with the data

    return sindex_catalog
开发者ID:bmorris3,项目名称:freckles,代码行数:17,代码来源:catalog.py

示例4: main

# 需要导入模块: from astroquery.vizier import Vizier [as 别名]
# 或者: from astroquery.vizier.Vizier import get_catalogs [as 别名]
def main():
    """Main function"""
    import argparse
    parser = argparse.ArgumentParser(description="Create a starlist of UKIRT Faint Stanadards")
    parser.add_argument("-o", "--output", type=argparse.FileType("w"), default="-", help="Output file")
    parser.add_argument("--fs", action='store_false', dest='full', help="Collect FS stars only")
    opt = parser.parse_args()
    date = datetime.datetime.now().isoformat()
    
    try:
        from astroquery.vizier import Vizier
    except ImportError as e:
        parser.error("Requires 'astroquery' to be installed.\n{0!r}".format(e))
    table = Vizier.get_catalogs([VIZIER_UKIRT_FS_CATALOG])[0]
    
    tl = TargetList([row_to_target(row) for row in table if (str(row['SimbadName'].decode('ascii')).startswith("FS") or opt.full)])
    tl.sort(key = lambda t : t.position.ra)
    
    # Write a header for the starlist so that we know the source.
    opt.output.write("# UKIRT Faint Standard Stars\n")
    opt.output.write("# Data from VIZIER catalog '{0:s}'\n".format(VIZIER_UKIRT_FS_CATALOG))
    opt.output.write("# ADS Reference: '{0:s}'\n".format(VIZIER_ADS_REFERENCE))
    opt.output.write("# Data collected on {0:s}\n".format(date))
    tl.to_starlist(opt.output)
开发者ID:alexrudy,项目名称:KOPy,代码行数:26,代码来源:ukirtfs_starlist.py

示例5: SEDFetcher

# 需要导入模块: from astroquery.vizier import Vizier [as 别名]
# 或者: from astroquery.vizier.Vizier import get_catalogs [as 别名]

#.........这里部分代码省略.........

        # K band flux
        k = unitconversion.photometry_2mass_mag_to_jy(k_mag, "Ks")
        k_lower = unitconversion.photometry_2mass_mag_to_jy(k_mag_upper, "Ks")
        k_upper = unitconversion.photometry_2mass_mag_to_jy(k_mag_lower, "Ks")
        k_error = ErrorBar(k_lower, k_upper, at=k)
        sed.add_entry(self.filters["K"], k, k_error)

        # Add the SED to the dictionary
        self.seds["2MASS"] = sed

    # -----------------------------------------------------------------

    def get_sings(self):

        """
        This function ...
        :return:
        """

        # Inform the user
        log.info("Getting fluxes from the SINGS catalog ...")

        # Radial distribution in SINGS galaxies. I.
        # J/ApJ/703/1569/table1	(c)Sample (75 rows)
    	# J/ApJ/703/1569/table2	UV, optical and NIR surface photometry profiles (2206 rows)
    	# J/ApJ/703/1569/table3	UV, optical (SDSS) and NIR photometry profiles (2161 rows)
    	# J/ApJ/703/1569/table4	IRAC and MIPS surface photometry (4319 rows)
    	# J/ApJ/703/1569/table5	UV, optical, and near-IR asymptotic magnitudes for SINGS galaxies lacking SDSS data (43 rows)
    	# J/ApJ/703/1569/table6	UV, optical (SDSS), and near-IR asymptotic magnitudes (32 rows)
    	# J/ApJ/703/1569/table7	IRAC and MIPS asymptotic magnitudes (75 rows)
    	# J/ApJ/703/1569/table8	Non-parametrical morphological estimators (300 rows)

        result = self.vizier.get_catalogs("J/ApJ/703/1569")

        # Result is a TableList with 8 tables (0 to 7)
        # We need:
        # - Table6 -> index 5
        # - Table7 -> index 6

        # Table6
        # - "Name": Galaxy name (NGC ...)
        # - "FUV": GALEX FUV 0.153um-band AB magnitude [mag]
        # - "e_FUV": FUV uncertainty [mag]
        # - "NUV": GALEX NUV 0.227um-band AB magnitude [mag]
        # - "e_NUV": NUV uncertainty [mag]
        # - "umag": SDSS u-band 0.354um AB magnitude [mag]
        # - "e_umag": umag uncertainty [mag]
        # - "gmag": SDSS g-band 0.477um AB magnitude [mag]
        # - "e_gmag": gmag uncertainty [mag]
        # - "rmag": SDSS r-band 0.623um AB magnitude [mag]
        # - "e_rmag": rmag uncertainty [mag]
        # - "imag": SDSS i-band 0.762um AB magnitude [mag]
        # - "e_imag": imag uncertainty [mag]
        # - "zmag": SDSS z-band 0.913um AB magnitude [mag]
        # - "e_zmag": zmag uncertainty [mag]
        # - "Jmag": 2MASS J-band 1.25um AB magnitude [mag]
        # - "e_Jmag": Jmag uncertainty [mag]
        # - "Hmag": 2MASS H-band 1.65um AB magnitude [mag]
        # - "e_Hmag": Hmag uncertainty [mag]
        # - "Ksmag": 2MASS Ks-band 2.17um AB magnitude [mag]
        # - "e_Ksmag": Ksmag uncertainty [mag]

        # Find the row index that corresponds with the specified galaxy

        galaxy_index = tables.find_index(result[5], self.ngc_id)
开发者ID:Stargrazer82301,项目名称:CAAPR,代码行数:70,代码来源:sedfetching.py

示例6:

# 需要导入模块: from astroquery.vizier import Vizier [as 别名]
# 或者: from astroquery.vizier.Vizier import get_catalogs [as 别名]
mass-luminosity and mass-temperature diagrams populating the main sequence only
with data from Ekström+ 2012 (Vizier catalog J/A+A/537/A146/iso).

Colors come from vendian.org.
"""
import numpy as np
import imf
import pylab as pl
from astroquery.vizier import Vizier
from labellines import labelLine, labelLines

pl.rcParams['font.size'] = 20

Vizier.ROW_LIMIT=1e7

tbl = Vizier.get_catalogs('J/A+A/537/A146/iso')[0]

agemass = {}
agelum = {}
for age in np.unique(tbl['logAge']):
    agemass[age] = tbl[tbl['logAge']==age]['Mass'].max()
    agelum[age] = tbl[tbl['logAge']==age]['logL'].max()


# mass-temperature diagram
pl.figure(2, figsize=(8,8)).clf()

# select a specific population age to plot - this is the youngest, with all
# stars alive and main-sequence
ok = tbl['logAge'] == 6.5
开发者ID:keflavich,项目名称:imf,代码行数:32,代码来源:hr_diagram.py

示例7: dict

# 需要导入模块: from astroquery.vizier import Vizier [as 别名]
# 或者: from astroquery.vizier.Vizier import get_catalogs [as 别名]
    Save both a png and a pdf version of the image
    """
    pl.savefig(p3(savename.replace("pdf","png")), **kwargs)
    pl.savefig(p3(savename.replace("png","pdf")), **kwargs)

zoomargs = {'x': 49.31, 'y':-0.35, 'width': 0.55, 'height':0.34}
# copied from projection_figures
zoomargs = {'x': 49.23, 'y': -0.28, 'width':1, 'height':0.5}
zoomargs = dict(x=49.27, y=-0.32, width=0.9, height=0.4)

for fignum in (1,2,3):
    if pl.fignum_exists(fignum):
        pl.close(fignum)

Vizier.ROW_LIMIT = 999999
ysos = Vizier.get_catalogs('J/ApJ/706/83/ysos')['J/ApJ/706/83/ysos']
masers = Vizier.query_region('W51', radius='2 deg',
                             catalog='J/A+A/291/261/table1')['J/A+A/291/261/table1']
masers2 = Vizier.query_region('W51', radius='2 deg',
                              catalog='J/MNRAS/418/1689/table2')['J/MNRAS/418/1689/table2']
radec = [coordinates.SkyCoord(r,d,unit=('deg','deg'),frame='icrs')
         for r,d in zip(masers2['RAJ2000'],masers2['DEJ2000'])]
glon,glat = np.array(zip(*[(rd.galactic.l.degree,
                            rd.galactic.b.degree)
                           for rd in radec]))

# Added 5/23/2014
mask = fits.getdata(p1('mask_h2co_signal.fits'))

for suffix,extrastr in ((".fits",""), ):#("_prefiltered.fits", "filtered")):
    parcubefile = fits.open(p1('W51_taucube_fit_parcube_try11'+suffix))
开发者ID:keflavich,项目名称:w51_singledish_h2co_maps,代码行数:33,代码来源:parplots.py

示例8: len

# 需要导入模块: from astroquery.vizier import Vizier [as 别名]
# 或者: from astroquery.vizier.Vizier import get_catalogs [as 别名]
from astroquery.vizier import Vizier
catalog_list = Vizier.find_catalogs('J/ApJS/204/5')
Vizier.ROW_LIMIT = -1

cata = Vizier.get_catalogs(catalog_list.keys())[0]
print len(cata)
开发者ID:StuartLittlefair,项目名称:PHY241,代码行数:8,代码来源:sdss_wds.py

示例9: GalaxyDecomposer

# 需要导入模块: from astroquery.vizier import Vizier [as 别名]
# 或者: from astroquery.vizier.Vizier import get_catalogs [as 别名]

#.........这里部分代码省略.........
    def get_p4(self):

        """
        This function ...
        :return:
        """

        #http://vizier.cfa.harvard.edu/viz-bin/VizieR?-source=J/ApJS/219/4

        # J/ApJS/219/4: S4G pipeline 4: multi-component decompositions (Salo+, 2015)

        #  - J/ApJS/219/4/galaxies: Parameters of the galaxies; center, outer orientation, sky background; and 1-component Sersic fits (tables 1 and 6) (2352 rows)
        #  - J/ApJS/219/4/table7: *Parameters of final multicomponent decompositions (Note) (4629 rows)

        # Inform the user
        log.info("Querying the S4G pipeline 4 catalog ...")

        # Get the "galaxies" table
        result = self.vizier.query_object(self.galaxy_name, catalog=["J/ApJS/219/4/galaxies"])
        table = result[0]

        # PA: [0.2/180] Outer isophote position angle
        # e_PA: [0/63] Standard deviation in PA
        # Ell:  [0.008/1] Outer isophote ellipticity
        # e_Ell: [0/0.3] Standard deviation in Ell

        pa = Angle(table["PA"][0] - 90., "deg")
        pa_error = Angle(table["e_PA"][0], "deg")

        ellipticity = table["Ell"][0]
        ellipticity_error = table["e_Ell"][0]

        # Get the "table7" table
        result = self.vizier.get_catalogs("J/ApJS/219/4/table7")
        table = result[0]

        # Name: Galaxy name
        # Mod: Type of final decomposition model
        # Nc: [1/4] Number of components in the model (1-4)
        # Q: [3/5] Quality flag, 5=most reliable
        # C: Physical interpretation of the component
        # Fn: The GALFIT function used for the component (sersic, edgedisk, expdisk, ferrer2 or psf)
        # f1: [0.006/1] "sersic" fraction of the total model flux
        # mag1:  [7/19.4] "sersic" total 3.6um AB magnitude
        # q1: [0.1/1] "sersic" axis ratio
        # PA1: [0.08/180] "sersic" position angle [deg]
        # Re: [0.004/430] "sersic" effective radius (Re) [arcsec]
        # n: [0.01/20] "sersic" parameter n
        # f2: [0.02/1] "edgedisk" fraction of the total model flux
        # mu02: [11.8/24.6] "edgedisk" central surface face-on brightness (µ0) [mag/arcsec2]
        # PA2: [-90/90] "edgedisk" PA [deg]
        # hr2: [1/153] "edgedisk" exponential scale length (hr) [arcsec]
        # hz2: [0.003/39] "edgedisk" z-scale hz [arcsec]
        # f3: [0.02/1] "expdisk" fraction of the total model flux
        # mag3: [6.5/18.1] "expdisk" total 3.6um AB magnitude [mag]
        # q3: [0.1/1] "expdisk" axis ratio
        # PA3: [-90/90] "expdisk" position angle [deg]
        # hr3: [0.7/332] "expdisk" exponential scale length (hr) [arcsec]
        # mu03: [16.4/25.3] "expdisk" central surface face-on brightness (µ0) [mag/arcsec2]
        # f4: [0.003/0.6] "ferrer2" fraction of the total model flux
        # mu04: [16/24.8] "ferrer2" central surface sky brightness (µ0) [mag/arcsec2]
        # q4: [0.01/1] "ferrer2" axis ratio
        # PA4: [-90/90] "ferrer2" position angle [deg]
        # Rbar: [3.7/232.5] "ferrer2" outer truncation radius of the bar (Rbar) [arcsec]
        # f5: [0.001/0.4] "psf" fraction of the total model flux
        # mag5: [11.5/21.1] "psf" total 3.6um AB magnitude [mag]
开发者ID:Stargrazer82301,项目名称:CAAPR,代码行数:70,代码来源:decomposition.py

示例10: catalog

# 需要导入模块: from astroquery.vizier import Vizier [as 别名]
# 或者: from astroquery.vizier.Vizier import get_catalogs [as 别名]
#                 '<f4',
#                 '<i2',
#                 '<f4',
#                 '<f4',
#                 '<f4',
#                 '<f4',
#                 '<f4']

# Try the *UPDATED* catalog (2009AJ....137.4186L)
# but update the "outputNames" to match

###########
# It should be possible to significantly increase the sample by using the more
# recent data at +50 deg. declination found in "2013AJ....146..131L"
###########
landoltStars = (Vizier.get_catalogs('J/AJ/137/4186'))[0]

outputNames  = ['_RAJ2000',
                '_DEJ2000',
                'Name',
                'Vmag',
                'e_Vmag',
                'B-V',
                'e_B-V',
                'U-B',
                'e_U-B',
                'V-R',
                'e_V-R',
                'R-I',
                'e_R-I',
                'V-I',
开发者ID:jmontgom10,项目名称:USNO-B_transformations,代码行数:33,代码来源:01_downloadCatalogs.py

示例11: Vizier

# 需要导入模块: from astroquery.vizier import Vizier [as 别名]
# 或者: from astroquery.vizier.Vizier import get_catalogs [as 别名]
#v = Vizier(columns = ['Vmag','B-V','U-B','V-Rc','Rc-Ic','e_Vmag','e_B-V','e_U-B','e_V-Rc','e_Rc-Ic']


keys = []

Vizier.ROW_LIMIT = -1

if not os.path.exists(directory):
	os.mkdir(directory)

for page in catalogs:
	keys.append(page)

#v = Vizier(columns=['Name','Nova','JD', 'Band', 'mag', 'e_mag', 'Source'])

dataTables = Vizier.get_catalogs(keys)
keys = dataTables.keys()

keyRepeatDict = {}

filename_dict = {}
for key in keys:
	if key not in keyRepeatDict:
		keyRepeatDict[key] = 0
	else:
		keyRepeatDict[key] += 1

	names = ()
	for catalogKey in catalogs:
		if re.search(catalogKey.replace("+", "\+").replace(".", "\."), key):
			names = catalogs[catalogKey]
开发者ID:moreheadm,项目名称:ONC,代码行数:33,代码来源:pullVizier.py

示例12: S4G

# 需要导入模块: from astroquery.vizier import Vizier [as 别名]
# 或者: from astroquery.vizier.Vizier import get_catalogs [as 别名]

#.........这里部分代码省略.........
    def get_p4(self):

        """
        This function ...
        :return:
        """

        #http://vizier.cfa.harvard.edu/viz-bin/VizieR?-source=J/ApJS/219/4

        # J/ApJS/219/4: S4G pipeline 4: multi-component decompositions (Salo+, 2015)

        #  - J/ApJS/219/4/galaxies: Parameters of the galaxies; center, outer orientation, sky background; and 1-component Sersic fits (tables 1 and 6) (2352 rows)
        #  - J/ApJS/219/4/table7: *Parameters of final multicomponent decompositions (Note) (4629 rows)

        # Inform the user
        log.info("Querying the S4G pipeline 4 catalog ...")

        # Get the "galaxies" table
        result = self.vizier.query_object(self.config.galaxy_name, catalog=["J/ApJS/219/4/galaxies"])
        table = result[0]

        # PA: [0.2/180] Outer isophote position angle
        # e_PA: [0/63] Standard deviation in PA
        # Ell:  [0.008/1] Outer isophote ellipticity
        # e_Ell: [0/0.3] Standard deviation in Ell

        pa = Angle(table["PA"][0] - 90., "deg")
        pa_error = Angle(table["e_PA"][0], "deg")

        ellipticity = table["Ell"][0]
        ellipticity_error = table["e_Ell"][0]

        # Get the "table7" table
        result = self.vizier.get_catalogs("J/ApJS/219/4/table7")
        table = result[0]

        # Name: Galaxy name
        # Mod: Type of final decomposition model
        # Nc: [1/4] Number of components in the model (1-4)
        # Q: [3/5] Quality flag, 5=most reliable
        # C: Physical interpretation of the component
        # Fn: The GALFIT function used for the component (sersic, edgedisk, expdisk, ferrer2 or psf)
        # f1: [0.006/1] "sersic" fraction of the total model flux
        # mag1:  [7/19.4] "sersic" total 3.6um AB magnitude
        # q1: [0.1/1] "sersic" axis ratio
        # PA1: [0.08/180] "sersic" position angle [deg]
        # Re: [0.004/430] "sersic" effective radius (Re) [arcsec]
        # n: [0.01/20] "sersic" parameter n
        # f2: [0.02/1] "edgedisk" fraction of the total model flux
        # mu02: [11.8/24.6] "edgedisk" central surface face-on brightness (µ0) [mag/arcsec2]
        # PA2: [-90/90] "edgedisk" PA [deg]
        # hr2: [1/153] "edgedisk" exponential scale length (hr) [arcsec]
        # hz2: [0.003/39] "edgedisk" z-scale hz [arcsec]
        # f3: [0.02/1] "expdisk" fraction of the total model flux
        # mag3: [6.5/18.1] "expdisk" total 3.6um AB magnitude [mag]
        # q3: [0.1/1] "expdisk" axis ratio
        # PA3: [-90/90] "expdisk" position angle [deg]
        # hr3: [0.7/332] "expdisk" exponential scale length (hr) [arcsec]
        # mu03: [16.4/25.3] "expdisk" central surface face-on brightness (µ0) [mag/arcsec2]
        # f4: [0.003/0.6] "ferrer2" fraction of the total model flux
        # mu04: [16/24.8] "ferrer2" central surface sky brightness (µ0) [mag/arcsec2]
        # q4: [0.01/1] "ferrer2" axis ratio
        # PA4: [-90/90] "ferrer2" position angle [deg]
        # Rbar: [3.7/232.5] "ferrer2" outer truncation radius of the bar (Rbar) [arcsec]
        # f5: [0.001/0.4] "psf" fraction of the total model flux
        # mag5: [11.5/21.1] "psf" total 3.6um AB magnitude [mag]
开发者ID:SKIRT,项目名称:PTS,代码行数:70,代码来源:s4g.py

示例13: do_snls_spectra

# 需要导入模块: from astroquery.vizier import Vizier [as 别名]
# 或者: from astroquery.vizier.Vizier import get_catalogs [as 别名]
def do_snls_spectra(catalog):
    """
    """

    task_str = catalog.get_current_task_str()
    result = Vizier.get_catalogs('J/A+A/507/85/table1')
    table = result[list(result.keys())[0]]
    table.convert_bytestring_to_unicode(python3_only=True)
    datedict = {}
    for row in table:
        datedict['SNLS-' + row['SN']] = str(astrotime(row['Date']).mjd)

    oldname = ''
    file_names = glob(os.path.join(catalog.get_current_task_repo(), 'SNLS/*'))
    for fi, fname in enumerate(pbar_strings(file_names, task_str)):
        filename = os.path.basename(fname)
        fileparts = filename.split('_')
        name = 'SNLS-' + fileparts[1]
        name = catalog.get_preferred_name(name)
        if oldname and name != oldname:
            catalog.journal_entries()
        oldname = name
        name = catalog.add_entry(name)
        source = catalog.entries[name].add_source(
            bibcode='2009A&A...507...85B')
        catalog.entries[name].add_quantity(SUPERNOVA.ALIAS, name, source)

        catalog.entries[name].add_quantity(
            SUPERNOVA.DISCOVER_DATE, '20' + fileparts[1][:2], source)

        f = open(fname, 'r')
        data = csv.reader(f, delimiter=' ', skipinitialspace=True)
        specdata = []
        for r, row in enumerate(data):
            if row[0] == '@TELESCOPE':
                telescope = row[1].strip()
            elif row[0] == '@REDSHIFT':
                catalog.entries[name].add_quantity(
                    SUPERNOVA.REDSHIFT, row[1].strip(), source)
            if r < 14:
                continue
            specdata.append(list(filter(None, [x.strip(' \t') for x in row])))
        specdata = [list(i) for i in zip(*specdata)]
        wavelengths = specdata[1]

        fluxes = [pretty_num(float(x) * 1.e-16, sig=get_sig_digits(x))
                  for x in specdata[2]]
        # FIX: this isnt being used
        # errors = [pretty_num(float(x)*1.e-16, sig=get_sig_digits(x)) for x in
        # specdata[3]]

        catalog.entries[name].add_spectrum(
            u_wavelengths='Angstrom', u_fluxes='erg/s/cm^2/Angstrom',
            wavelengths=wavelengths,
            fluxes=fluxes, u_time='MJD' if name in datedict else '',
            time=datedict[name] if name in datedict else '',
            telescope=telescope, source=source,
            filename=filename)
        if catalog.args.travis and fi >= catalog.TRAVIS_QUERY_LIMIT:
            break
    catalog.journal_entries()
    return
开发者ID:astrocatalogs,项目名称:novae,代码行数:64,代码来源:snls.py

示例14: delete_old_event_files

# 需要导入模块: from astroquery.vizier import Vizier [as 别名]
# 或者: from astroquery.vizier.Vizier import get_catalogs [as 别名]
        delete_old_event_files()

# Import data provided directly to OSC
#if do_task('internal'):
#    for datafile in sorted(glob.glob("../tde-internal/*.json"), key=lambda s: s.lower()):
#        if not load_event_from_file(location = datafile, clean = True, delete = False):
#            raise IOError('Failed to find specified file.')
#    journal_events()

# Import primary data sources from Vizier
if do_task('vizier'):
    Vizier.ROW_LIMIT = -1
    # VizieR imports go here

    # 2010ApJ...725..331Y
    result = Vizier.get_catalogs("J/ApJ/725/331/table7")
    table = result[list(result.keys())[0]]
    table.convert_bytestring_to_unicode(python3_only=True)
    for row in table:
        name = row['Name']
        name = add_event(name)
        source = get_source(name, bibcode = '2010ApJ...725..331Y')
        add_quanta(name, 'ra', str(row['_RA']), source, unit = 'radeg')
        add_quanta(name, 'dec', str(row['_DE']), source, unit = 'decdeg')
        add_quanta(name, 'ora', str(row['oRA']), source)
        add_quanta(name, 'odec', str(row['oDE']), source)
    journal_events()

if do_task('writeevents'): 
    files = []
    for rep in repfolders:
开发者ID:astrocatalogs,项目名称:gc,代码行数:33,代码来源:import.py


注:本文中的astroquery.vizier.Vizier.get_catalogs方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。