Package ivs :: Package catalogs :: Module vizier
[hide private]
[frames] | no frames]

Module vizier

source code

Interface to the VizieR website.

Download or retrieve VizieR catalogs.

The basic interface search lets you download entire catalogs or parts of them. The structure array containts then one row per target, the columns denoting the different columns of the catalogs. You can also specify two catalogs in xmatch; the second will then be cross-matched against the first.

The convenience functions (get_photometry,...) aim to collect information from different catalogs on one target in one array. Each row represents one measurement from one catalog (typically you'll have many rows both from one catalog but also from different catalogs). The columns then denote the contents of each row (e.g. the magnitude, photometric passband etc).

Section 1. Download catalogs

Section 1.1. To a file

Download the entire Van Leeuwen Hipparcos New Reduction catalog to a file. The filename is returned as a check for success.

>>> filename = search('I/311/hip2',filename='vanleeuwen.tsv')

Download a 60 arcsec circular area from the catalog around the coordinates ra=237.1, dec=-10.10

>>> filename = search('I/311/hip2',ra=237.1,dec=-10.10,radius=60.,filename='vanleeuwen.tsv')

Search for the presence of a target in the catalog. The downloaded file will contain no rows if the target is not in the catalog. If more than one target are in the search radius around the target, there will be more than one row. They are ordered via distance to the target, so it's probably the first one you need.

>>> filename = search('I/311/hip2',ID='vega',filename='vanleeuwen.tsv')
>>> filename = search('I/311/hip2',ID='vega',filename='vanleeuwen.tsv',radius=60.)

Section 1.2 To a RecordArray

Instead of downloading to a file and then reading in the file for further analysis, you can download the contents of the file directly to a record array, retrieving the units and comments from the catalog in one go. The equivalent of the third example above becomes

>>> rec_arr,unit_dict,comment_str = search('I/311/hip2',ID='vega')

With these record arrays, its very easy to select targets based on criteria. For example, if you want to extract 2MASS targets in a certain area with a negative H-K index, you can do

>>> data,units,comms = search('II/246/out',ra=237.1,dec=-10.10,radius=600.)
>>> selection = (data['Hmag'] - data['Kmag']) < 0
>>> data = data[selection]

You can also read in a data file you've previously downloaded via

>>> data,units,comms = tsv2recarray('vanleeuwen.tsv')

Section 1.3 List relevant catalogs

To know in which catalogs your target is present, list them all via

>>> my_cats = list_catalogs('vega')

Now you could iterate over them and download them to a file or whatever.

Section 2. Convenience functions

You can define 'standard' photometric catalogs in the vizier_cats.cfg file. This file is basically a translator for VizieR column headers to photometric passbands (and colors). For examples, see the file itself.

You can add catalogs on the fly via

>>> cat_info.add_section('my_new_catalog')
>>> cat_info.set('my_new_catalog','Bmag','JOHNSON.B')
Functions [hide private]
    Basic interfaces
 
change_mirror()
Cycle through the mirrors of ViZieR.
source code
str/ record array, dict, list of str
search(name, filetype='tsv', filename=None, **kwargs)
Search and retrieve information from a VizieR catalog.
source code
dictionary
list_catalogs(ID, filename=None, filetype='tsv', **kwargs)
Print and return all catalogs containing information on the star.
source code
 
xmatch(source1, source2, output_file=None, tol=1., **kwargs)
Crossmatch two vizier catalogs via a fast KDTree.
source code
    Interface to specific catalogs
 
get_IUE_spectra(ID=None, directory=None, unzip=True, cat_info=False, select='low', **kwargs)
Download IUE spectra.
source code
 
get_UVSST_spectrum(units='erg/s/cm2/AA', **kwargs)
Get a spectrum from the UVSST spectrograph onboard TD1.
source code
    Convenience functions
 
get_photometry(ID=None, extra_fields=['_r','_RAJ2000','_DEJ2000'], take_mean=False, **kwargs)
Download all available photometry from a star to a record array.
source code
 
quality_check(master, ID=None, return_master=True, **kwargs)
Perform quality checks on downloaded data.
source code
record array, dict, list of str
tsv2recarray(filename)
Read a Vizier tsv (tab-sep) file into a record array.
source code
record array
vizier2phot(source, results, units, master=None, e_flag='e_', q_flag='q_', extra_fields=None, take_mean=False)
Convert/combine VizieR record arrays to measurement record arrays.
source code
record array
vizier2fund(source, results, units, master=None, e_flag='e_', q_flag='q_', extra_fields=None)
Convert/combine VizieR record arrays to measurement record arrays.
source code
str
catalog2bibcode(catalog)
Retrieve the ADS bibcode of a ViZieR catalog.
source code
str
bibcode2bibtex(bibcode)
Retrieve the bibtex entry of an ADS bibcode.
source code
str
catalog2bibtex(catalog)
Retrieve the bibtex entry of a catalog.
source code
    Internal helper functions
str
_get_URI(name=None, ID=None, ra=None, dec=None, radius=20., oc='deg', oc_eq='J2000', out_all=True, out_max=1000000, filetype='tsv', sort='_r', constraints=None, **kwargs)
Build Vizier URI from available options.
source code
record array
_breakup_colours(master)
From colors and one magnitude measurement, derive the other magnitudes.
source code
 
test()
Execute all docstrings.
source code
Variables [hide private]
  logger = logging.getLogger("CAT.VIZIER")
  basedir = os.path.dirname(os.path.abspath(__file__))
  cat_info = ConfigParser.ConfigParser()
  cat_info_fund = ConfigParser.ConfigParser()
  mirrors = {'cycle': itertools.cycle(['vizier.u-strasbg.fr', 'v...
Function Details [hide private]

search(name, filetype='tsv', filename=None, **kwargs)

source code 

Search and retrieve information from a VizieR catalog.

Two ways to search for data within a catalog name:

  1. You're looking for info on one target, then give the target's ID or coordinates (ra and dec), and a search radius.
  2. You're looking for information of a whole field, then give the field's coordinates (ra and dec), and radius.

If you have a list of targets, you need to loop this function.

If you supply a filename, the results will be saved to that path, and you will get the filename back as received from urllib.URLopener (should be the same as the input name, unless something went wrong).

If you don't supply a filename, you should leave filetype to the default tsv, and the results will be saved to a temporary file and deleted after the function is finished. The content of the file will be read into a dictionary, as well as the units (two separate dictionaries with the same keys, depending on the column names in the catalog). The entries in the dictionary are of type ndarray, and will be converted to a float-array (no integers, we need to support nans) if possible. If not, the array will consist of strings. The comments are also returned as a list of strings.

WARNING: when retrieving a FITS file, ViZieR sometimes puts weird formats into the header ('3F10.6E' in the 2MASS catalog), which cannot be read by the astropy.io.fits module. These columns are actually multi-dimensional vectors. One option is to download to another format, or to restrict the columns with out_all=None.

Example usage:

  1. Look for the Geneva V magnitude and coordinates of Vega in the GENEVA catalog of Rufener.
    >>> results,units,comms = search('II/169/main',ID='vega',radius=60.)
    >>> print "Vega: Vmag = %.3f %s, RA = %.2f %s, DEC = %.2f %s"%(results['Vmag'],units['Vmag'],results['_RAJ2000'],units['_RAJ2000'],results['_DEJ2000'],units['_DEJ2000'])
    Vega: Vmag = 0.061 mag, RA = 279.24 deg, DEC = 38.77 deg
  2. Search for all targets in the 2MASS catalog in a particular field. Download the results to a FITS file, read the file, and plot the results to the screen.
    >>> #filename = search('II/246/out',ra=100.79,dec=0.70,radius=1000.,filetype='fits',filename='2mass_test',out_all=None)

    Now read in the FITS-file and plot the contents

    >>> #import pylab
    >>> #import astropy.io.fits as pf
    >>> #ff = pf.open('2mass_test.fits')
    >>> #p = pylab.gcf().canvas.set_window_title('test of <search>')
    >>> #p = pylab.scatter(ff[1].data.field('_RAJ2000'),ff[1].data.field('_DEJ2000'),c=ff[1].data.field('Jmag'),s=(20-ff[1].data.field('Jmag'))**2,cmap=pylab.cm.hot_r,edgecolors='none')
    >>> #p = pylab.colorbar()
    >>> #p = p.set_label('Jmag')
    >>> #p,q = pylab.xlabel('RA [deg]'),pylab.ylabel('DEC [deg]')
    >>> #ff.close()
    >>> #os.remove('2mass_test.fits')
Parameters:
  • name (str) - name of a ViZieR catalog (e.g. 'II/246/out')
  • filetype (string (one of 'tsv','fits','ascii','csv'...) - type of the file to write the results to ('tsv' if no file desired)
  • filename (str) - name of the file to write the results to (no extension)
Returns: str/ record array, dict, list of str
filename / catalog data columns, units, comments

list_catalogs(ID, filename=None, filetype='tsv', **kwargs)

source code 

Print and return all catalogs containing information on the star.

If you give filetype and filename, all information will be downloaded to that file.

Extra kwargs: see _get_URI.

Parameters:
  • ID (str) - identification of the star
  • filetype (str) - type of the output file ('fits','tsv','csv'...)
  • filename (str) - name of the output file
Returns: dictionary
dictionary with keys the catalog ID from VizieR and entries the names of the catalogs

xmatch(source1, source2, output_file=None, tol=1., **kwargs)

source code 

Crossmatch two vizier catalogs via a fast KDTree.

The limit for these catalogs is probably somewhere between ~100000 entries, so make sure your catalogs do not contain to many targets. You can always do a subselection via the keyword arguments (e.g. give ra, dec and radius).

An output tsv file will be written (by default named 'source1__source2', which can be read in via tsv2recarray for further analysis.

tolerance is in arcseconds.

Extra keyword arguments are passed to search. Column names of second source will be appended with postfix '_2', to avoid clashes of double-defined column headers.

get_IUE_spectra(ID=None, directory=None, unzip=True, cat_info=False, select='low', **kwargs)

source code 

Download IUE spectra.

If you want to download all the spectral files, set directory='/home/user/' or whatever. All the tarfiles will be downloaded to this directory, they will be untarred, science data extracted and all unnecessary files and directories will be deleted. If you don't set a directory, it will default to the CWD.

If you don't wish to unzip them, set unzip=False

DEPRECATED: If you don't give a directory, the function will return a list of all extracted spectra (no data files are kept).

You can retrieve the contents of the vizier catalog via {cat_info=True}. The files will not be downloaded in this case.

get_UVSST_spectrum(units='erg/s/cm2/AA', **kwargs)

source code 

Get a spectrum from the UVSST spectrograph onboard TD1.

From vizier catalog III/39A.

Also have a look at II/86/suppl.

get_photometry(ID=None, extra_fields=['_r','_RAJ2000','_DEJ2000'], take_mean=False, **kwargs)

source code 

Download all available photometry from a star to a record array.

For extra kwargs, see _get_URI and vizier2phot

quality_check(master, ID=None, return_master=True, **kwargs)

source code 

Perform quality checks on downloaded data.

This function translates flags in to words, and looks up additional information in selected catalogs.

tsv2recarray(filename)

source code 

Read a Vizier tsv (tab-sep) file into a record array.

Parameters:
  • filename (str) - name of the TSV file
Returns: record array, dict, list of str
catalog data columns, units, comments

vizier2phot(source, results, units, master=None, e_flag='e_', q_flag='q_', extra_fields=None, take_mean=False)

source code 

Convert/combine VizieR record arrays to measurement record arrays.

Every line in the combined array represents a measurement in a certain band.

This is probably only useful if results contains only information on one target (or you have to give 'ID' as an extra field, maybe).

The standard columns are:

  1. meas: containing the photometric measurement
  2. e_meas: the error on the photometric measurement
  3. flag: an optional quality flag
  4. unit: the unit of the measurement
  5. photband: the photometric passband (FILTER.BAND)
  6. source: name of the source catalog

You can add extra information from the VizieR catalog via the list of keys extra_fields.

If you give a master, the information will be added to a previous record array. If not, a new master will be created.

Colors will be expanded, derived from the other columns and added to the master.

The result is a record array with each row a measurement.

Example usage:

First look for all photometry of Vega in all VizieR catalogs:

>>> from ivs.sed import filters
>>> import pylab
>>> master = None
>>> for source in cat_info.sections():
...     results,units,comms = search(source,ID='vega',radius=60.)
...     if results is not None:
...         master = vizier2phot(source,results,units,master,extra_fields=['_r','_RAJ2000','_DEJ2000'])

Keep only observations we have an measurement and error of, convert every observation to 'Jy' and keep track of the results to plot.

>>> master = master[(-np.isnan(master['e_meas'])) & (-np.isnan(master['meas']))]
>>> eff_waves = filters.eff_wave(master['photband'])
>>> myvalue,e_myvalue = conversions.nconvert(master['unit'],'erg/s/cm2/AA',master['meas'],master['e_meas'],photband=master['photband'])
>>> for i in range(len(master)):
...    print '%15s %10.3e+/-%10.3e %11s %10.3e %3s %6.2f %6.2f %6.3f %23s'%(master[i]['photband'],master[i]['meas'],master[i]['e_meas'],master[i]['unit'],myvalue[i],'Jy',master[i]['_RAJ2000'],master[i]['_DEJ2000'],master[i]['_r'],master[i]['source'])
       GENEVA.V  6.100e-02+/- 2.500e-02         mag  3.620e-09  Jy 279.24  38.77 56.000             II/169/main
       GENEVA.B -8.980e-01+/- 2.500e-02         mag  6.518e-09  Jy 279.24  38.77 56.000             II/169/main
       GENEVA.U  6.070e-01+/- 2.500e-02         mag  3.223e-09  Jy 279.24  38.77 56.000             II/169/main
      GENEVA.V1  7.640e-01+/- 2.500e-02         mag  3.782e-09  Jy 279.24  38.77 56.000             II/169/main
      GENEVA.B1  2.000e-03+/- 2.500e-02         mag  6.584e-09  Jy 279.24  38.77 56.000             II/169/main
      GENEVA.B2  6.120e-01+/- 2.500e-02         mag  6.208e-09  Jy 279.24  38.77 56.000             II/169/main
       GENEVA.G  1.270e+00+/- 2.500e-02         mag  3.111e-09  Jy 279.24  38.77 56.000             II/169/main
        2MASS.J -1.770e-01+/- 2.060e-01         mag  3.591e-10  Jy 279.23  38.78  0.034              II/246/out
        2MASS.H -2.900e-02+/- 1.460e-01         mag  1.176e-10  Jy 279.23  38.78  0.034              II/246/out
       2MASS.KS  1.290e-01+/- 1.860e-01         mag  3.799e-11  Jy 279.23  38.78  0.034              II/246/out
       IRAS.F12  4.160e+01+/- 1.664e+00          Jy  1.024e-13  Jy 279.23  38.78  9.400             II/125/main
       IRAS.F25  1.100e+01+/- 5.500e-01          Jy  6.195e-15  Jy 279.23  38.78  9.400             II/125/main
       IRAS.F60  9.510e+00+/- 7.608e-01          Jy  8.420e-16  Jy 279.23  38.78  9.400             II/125/main
      IRAS.F100  7.760e+00+/- 6.984e-01          Jy  2.349e-16  Jy 279.23  38.78  9.400             II/125/main
       TD1.1565  5.689e-09+/- 1.700e-11  10mW/m2/nm  5.689e-09  Jy 279.23  38.78 18.510          II/59B/catalog
       TD1.1965  4.928e-09+/- 1.300e-11  10mW/m2/nm  4.928e-09  Jy 279.23  38.78 18.510          II/59B/catalog
       TD1.2365  3.700e-09+/- 1.000e-11  10mW/m2/nm  3.700e-09  Jy 279.23  38.78 18.510          II/59B/catalog
       TD1.2740  3.123e-09+/- 9.000e-12  10mW/m2/nm  3.123e-09  Jy 279.23  38.78 18.510          II/59B/catalog
        ANS.15N -4.910e-01+/- 1.000e-03         mag  5.707e-09  Jy 279.23  38.78 14.000               II/97/ans
        ANS.15W -4.410e-01+/- 1.200e-02         mag  5.450e-09  Jy 279.23  38.78 14.000               II/97/ans
         ANS.18 -4.620e-01+/- 3.000e-03         mag  5.556e-09  Jy 279.23  38.78 14.000               II/97/ans
         ANS.25  4.600e-02+/- 4.000e-03         mag  3.480e-09  Jy 279.23  38.78 14.000               II/97/ans
         ANS.33  1.910e-01+/- 3.000e-03         mag  3.045e-09  Jy 279.23  38.78 14.000               II/97/ans
   HIPPARCOS.HP  8.680e-02+/- 2.100e-03         mag  3.840e-09  Jy 279.23  38.78  3.060          I/239/hip_main
        MIPS.24  8.900e+03+/- 8.900e+01         mJy  4.628e-15  Jy 279.23  38.78  0.010    J/ApJ/653/675/table1
        MIPS.70  1.142e+04+/- 2.283e+03         mJy  7.075e-16  Jy 279.23  38.78  0.010    J/ApJ/653/675/table1
      JOHNSON.B  1.900e-02+/- 1.000e-02         mag  6.216e-09  Jy 279.23  38.78  3.060             I/280B/ascc
      JOHNSON.V  7.400e-02+/- 2.000e-03         mag  3.428e-09  Jy 279.23  38.78  3.060             I/280B/ascc
      JOHNSON.V  3.300e-02+/- 1.200e-02         mag  3.560e-09  Jy 279.23  38.78  0.010         II/168/ubvmeans
    JOHNSON.B-V -1.000e-03+/- 5.000e-03         mag        nan  Jy 279.23  38.78  0.010         II/168/ubvmeans
    JOHNSON.U-B -6.000e-03+/- 6.000e-03         mag        nan  Jy 279.23  38.78  0.010         II/168/ubvmeans
      JOHNSON.B  3.200e-02+/- 1.300e-02         mag  6.142e-09  Jy 279.23  38.78  0.010         II/168/ubvmeans
      JOHNSON.U  2.600e-02+/- 1.432e-02         mag  4.086e-09  Jy 279.23  38.78  0.010         II/168/ubvmeans
      JOHNSON.K  1.300e-01+/- 1.900e-01         mag  3.764e-11  Jy 279.23  38.78  0.010 J/PASP/120/1128/catalog
      AKARI.N60  6.582e+00+/- 2.090e-01          Jy  4.614e-16  Jy 279.23  38.78  3.400              II/298/fis
    AKARI.WIDES  6.201e+00+/- 1.650e-01          Jy  2.566e-16  Jy 279.23  38.78  3.400              II/298/fis
    AKARI.WIDEL  4.047e+00+/- 3.500e-01          Jy  5.658e-17  Jy 279.23  38.78  3.400              II/298/fis
     AKARI.N160  3.221e+00+/- 2.550e-01          Jy  3.695e-17  Jy 279.23  38.78  3.400              II/298/fis
      AKARI.S9W  5.670e+01+/- 4.010e-01          Jy  2.169e-13  Jy 279.24  38.78  2.550              II/297/irc
     AKARI.L18W  1.254e+01+/- 7.770e-02          Jy  1.050e-14  Jy 279.24  38.78  2.550              II/297/irc
  STROMGREN.B-Y  3.000e-03+/- 3.000e-03         mag        nan  Jy 279.23  38.78 22.000          II/215/catalog
   STROMGREN.M1  1.570e-01+/- 3.000e-03         mag        nan  Jy 279.23  38.78 22.000          II/215/catalog
   STROMGREN.C1  1.088e+00+/- 4.000e-03         mag        nan  Jy 279.23  38.78 22.000          II/215/catalog
    STROMGREN.B  4.300e-02+/- 3.000e-03         mag  5.604e-09  Jy 279.23  38.78 22.000          II/215/catalog
     DIRBE.F2_2  6.217e+02+/- 9.500e+00          Jy  3.791e-11  Jy 279.23  38.78  0.110    J/ApJS/154/673/DIRBE
     DIRBE.F3_5  2.704e+02+/- 1.400e+01          Jy  6.534e-12  Jy 279.23  38.78  0.110    J/ApJS/154/673/DIRBE
     DIRBE.F4_9  1.504e+02+/- 6.200e+00          Jy  1.895e-12  Jy 279.23  38.78  0.110    J/ApJS/154/673/DIRBE
      DIRBE.F12  2.910e+01+/- 1.570e+01          Jy  6.014e-14  Jy 279.23  38.78  0.110    J/ApJS/154/673/DIRBE
      DIRBE.F25  1.630e+01+/- 3.120e+01          Jy  1.153e-14  Jy 279.23  38.78  0.110    J/ApJS/154/673/DIRBE
      DIRBE.F60  1.220e+01+/- 5.610e+01          Jy  1.195e-15  Jy 279.23  38.78  0.110    J/ApJS/154/673/DIRBE
     DIRBE.F100 -7.000e-01+/- 7.790e+01          Jy -2.238e-17  Jy 279.23  38.78  0.110    J/ApJS/154/673/DIRBE
     DIRBE.F140  2.557e+02+/- 5.223e+03          Jy  3.577e-15  Jy 279.23  38.78  0.110    J/ApJS/154/673/DIRBE
     DIRBE.F240  8.290e+01+/- 2.881e+03          Jy  4.152e-16  Jy 279.23  38.78  0.110    J/ApJS/154/673/DIRBE
        WISE.W2  1.143e+00+/- 1.900e-02         mag  8.428e-13  Jy 279.24  38.78  3.276             II/311/wise
        WISE.W3 -6.700e-02+/- 8.000e-03         mag  6.930e-14  Jy 279.24  38.78  3.276             II/311/wise
        WISE.W4 -1.270e-01+/- 6.000e-03         mag  5.722e-15  Jy 279.24  38.78  3.276             II/311/wise

Make a quick plot:

>>> p = pylab.figure()
>>> p = pylab.loglog(eff_waves,myvalue,'ko')
>>> p = pylab.show()
Parameters:
  • source (str) - name of the VizieR source
  • results (record array) - results from VizieR search
  • units (dict) - header of Vizier catalog with key name the column name and key value the units of that column
  • master (record array) - master record array to add information to
  • e_flag (str) - flag denoting the error on a column
  • q_flag (str) - flag denoting the quality of a measurement
  • extra_fields (list of str) - any extra columns you want to add information from
Returns: record array
array with each row a measurement

vizier2fund(source, results, units, master=None, e_flag='e_', q_flag='q_', extra_fields=None)

source code 

Convert/combine VizieR record arrays to measurement record arrays.

This is probably only useful if results contains only information on one target (or you have to give 'ID' as an extra field, maybe).

The standard columns are:

  1. meas: containing the measurement of a fundamental parameter
  2. e_meas: the error on the measurement of a fundamental parameter
  3. flag: an optional quality flag
  4. unit: the unit of the measurement
  5. source: name of the source catalog

If a target appears more than once in a catalog, only the first match will be added.

The result is a record array with each row a measurement.

Example usage:

>>> master = None
>>> for source in cat_info_fund.sections():
...     results,units,comms = search(source,ID='AzV 79',radius=60.)
...     if results is not None:
...         master = vizier2fund(source,results,units,master,extra_fields=['_r','_RAJ2000','_DEJ2000'])
>>> master = master[-np.isnan(master['meas'])]
>>> for i in range(len(master)):
...     print '%10s %10.3e+/-%10.3e %11s %6.2f %6.2f %6.3f %23s'%(master[i]['name'],master[i]['meas'],master[i]['e_meas'],master[i]['unit'],master[i]['_RAJ2000'],master[i]['_DEJ2000'],master[i]['_r'],master[i]['source'])
      Teff  7.304e+03+/-       nan           K  12.67 -72.83  0.002         B/pastel/pastel
      logg  2.000e+00+/-       nan     [cm/s2]  12.67 -72.83  0.002         B/pastel/pastel
    [Fe/H] -8.700e-01+/-       nan       [Sun]  12.67 -72.83  0.002         B/pastel/pastel
Parameters:
  • source (str) - name of the VizieR source
  • results (record array) - results from VizieR search
  • units (dict) - header of Vizier catalog with key name the column name and key value the units of that column
  • master (record array) - master record array to add information to
  • e_flag (str) - flag denoting the error on a column
  • q_flag (str) - flag denoting the quality of a measurement
  • extra_fields (list of str) - any extra columns you want to add information from
Returns: record array
array with each row a measurement

catalog2bibcode(catalog)

source code 

Retrieve the ADS bibcode of a ViZieR catalog.

Parameters:
  • catalog (str) - name of the catalog (e.g. II/306/sdss8)
Returns: str
bibtex code

bibcode2bibtex(bibcode)

source code 

Retrieve the bibtex entry of an ADS bibcode.

Parameters:
  • bibcode (str) - bibcode (e.g. 2011yCat.2306....0A)
Returns: str
bibtex entry

catalog2bibtex(catalog)

source code 

Retrieve the bibtex entry of a catalog.

Parameters:
  • catalog (str) - name of the catalog (e.g. II/306/sdss8)
Returns: str
bibtex entry

_get_URI(name=None, ID=None, ra=None, dec=None, radius=20., oc='deg', oc_eq='J2000', out_all=True, out_max=1000000, filetype='tsv', sort='_r', constraints=None, **kwargs)

source code 

Build Vizier URI from available options.

kwargs are to catch unused arguments.

Parameters:
  • name (str) - name of a ViZieR catalog (e.g. 'II/246/out')
  • filetype (str (one of 'tsv','csv','ascii'... see ViZieR site)) - type of the retrieved file
  • oc (str (one of 'deg'...)) - coordinates
  • out_all (boolean (True = all, None = basic)) - retrieve all or basic information
  • out_max (integer) - maximum number of rows
  • ID (str) - target name
  • ra (float) - target's right ascension
  • dec (float) - target's declination
  • radius (float) - search radius (arcseconds)
Returns: str
url

_breakup_colours(master)

source code 

From colors and one magnitude measurement, derive the other magnitudes.

Parameters:
  • master (record array) - master record array from vizier2phot.
Returns: record array
master with added magnitudes

test()

source code 

Execute all docstrings.

>>> import pylab
>>> p = pylab.show()

Variables Details [hide private]

mirrors

Value:
{'cycle': itertools.cycle(['vizier.u-strasbg.fr', 'vizier.nao.ac.jp', \
'vizier.hia.nrc.ca', 'vizier.ast.cam.ac.uk', 'vizier.cfa.harvard.edu',\
 'www.ukirt.jach.hawaii.edu', 'vizier.inasan.ru', 'vizier.iucaa.ernet.\
in', 'data.bao.ac.cn'])}