Developer’s corner

Anafile: ReadMe generation tool

The CDS package Anafile is dedicated for VizieR ingestion. The anafile tool is usefull to analyze the integrity between data files and the ReadMe.

VizieR ingestion package

A VizieR catalogue is made by a collection of tables described in a standardized ReadMe file (see Standards for Astronomical Catalogues). Tables are stored and available by FTP in a standard ASCII format output with aligned columns.

The ReadMe file contains informations (like the abstract, bibliographic identifier, authors name, keywords) and the tables description including the column description(the byte-by-byte of the tables, unit, definition, ..)

Get more informations:

Download

The anafile package is a C-application.

Download Anafile package

Installation instructions:

* Create the Makefile

./configure --prefix=$HOME

Add the ouptut directory (binary directory installation) using the option –prefix.

* Compil the sources

make clean
make
make install

* test tool

./anafile -help

Python package

The pyreadme python package enables to generate a ReadMe and standardize table into CDS format from tables in different format. Format accepted are TSV, CDS ascii table, FITS table, VOTable or astropy table

Download Python package for ReadMe generation V1.1.9

Example: (see also the test script 'cdstest.py' in the pyreame package)

from cds.core.*
 
tablemaker = CDSTablesMaker()
 
# Add astropy Table
data = Table({'a': [1, 2, 3],
              'b': [4.0, 1115.0, 6.12340],
              'col3': [1.1,2.,12.3]},
              names=['a', 'b','col3'])
table = tablemaker.addTable(data, name="data.cds")
 
# Add TSV table
table = tablemaker.addTable("asu.tsv", description="my tsv table")
 
 
# Add TSV table (contaning sexagesimal columns)
table = tablemaker.addTable("asu_sexa.tsv", description="my tsv table")
table.columns[5].setSexaRa(precision=1)
table.columns[6].setSexaDe()
 
# standardize tables
tablemaker.writeCDSTables()
 
# Customize ReadMe output
tablemaker.title = "my title"
tablemaker.author = 'G.Landais'
 
# Print ReadMe
tablemaker.makeReadMe()
anafile.txt · Last modified: 2017/11/09 14:38 by Gilles Landais

Thanks for acknowledging the CDS developer’s resources (libraries, source code, etc.)

© UDS/CNRS

Contact