VOConvert – The File Conversion Utility (version 1.0)

 

       

Introduction

Types of files supported

Third party tools

Getting started

Required properties for ASCII table files

Conversion : ASCII To VOTable

           Conversion of single ASCII file

                  GUI

                    Select ASCII file

                         Display heading & unit Line

                         Delimited column file info

                         Fixed width column file info

                         Display metadata

                         Display generated VOTable                       

                  Command Line

          Conversion of multiple ASCII files

                  GUI                   

                        Select ASCII directory                             

                        Set common attributes   

                        Show  results

                   Command Line

Conversion : FITS To VOTable

           Conversion of single FITS file

                  GUI

                    Select FITS file

                         Display metadata

                         Display generated VOTable                       

                  Command Line

             Conversion of multiple FITS files

                  GUI

                   Select FITS directory

                        Show  results                  

                  Command Line

Conversion : VOTable To ASCII

            Conversion of single VOTable file

                   GUI

                    Select VOTable file

                         Select delimiter

                         Display metadata                        

                         Display generated ASCII file

                   Command Line

            Conversion of multiple VOTable files

                   GUI

                    Select VOTable directory

                         Set common attributes

                         Show  results                         

                   Command Line

Feedback Address

                                                                                           

 

A. Introduction

VOConvert, earlier called conVOT, is a tool for converting files from one format to another. VOConvert has been developed as a part of the Virtual Observatory - India initiative by the Inter-University Centre for Astronomy and Astrophysics (IUCAA) and Persistent Systems. It supports following file format conversions:

 

1) ASCII to VOTable                                              

2) FITS to VOTable

3) VOTable to ASCII.                     

    

Two or more files belonging to a specific format can be converted into other format at the same time.

                                                                             

B. Types of files supported

It supports both ASCII files with column delimiters and ASCII files with fixed width columns.

FITS files with ASCII and Binary tables.

For VOTable files, it supports only the first table from the first resource.

 

 

C. Third party tools

VOConvert uses the nom.tam.fits library, developed at Heasarc, for reading FITS tables. It also uses VOTable JAVA Streaming Writer, developed by VOI, for writing the data in VOTable format. VOConvert uses SAVOT parser for parsing of the VOTable files.

Top

 

D. Getting started

1. System Requirements

VOConvert requires Java Runtime Environment (1.4.2 or above).        

2. Starting Instructions

To use the standalone version of VOConvert, you will need to download the executable jar file named VOConvert.jar.

GUI

To launch the GUI version of VOConvert type java –jar VOConvert.jar at the command prompt.

Command Line

The tool also provides a command line interface for conversion. The commands for various types of conversions are:

 

1) ASCII File to VOTable File

         java -jar VOConvert.jar -convert aTov -input "file path"

2) FITS File to VOTable File

       java -jar VOConvert.jar -convert fTov -input "file path"

3) VOTable File to ASCII File

         java -jar VOConvert.jar -convert vToa -input "file path"

 

For converting more than one file of a specific type, directory path should be given in place of file path.

 

Note:  For all the figures below:

  1. The text area and table displays only first rows in the table.

   2. You can choose the  Conversion Type from the menu bar.

   3. You can choose either a single file or a directory containing the same type of files.

   4. You can choose the 'Default Input Directory' and the 'Default Output Directory' from the Settings menu.

   5. You can exit the tool by clicking on ‘Conversion Type' and then 'Exit' in the menu bar   .

 

D. Required properties for ASCII table files

1. The ASCII file must be in a tabular format. The file should have some delimiter between its columns or the columns must be of fixed width.

2. Comment lines always appear in the beginning of the ASCII Table file and not elsewhere.                                                                                

3. The first non-blank line immediately following the comment lines is treated as heading line and the non-blank line following the heading line is treated as unit line. But, this can be changed by the user.

Top

 

E. Conversion : ASCII To VOTable

GUI  

a. Choose the ASCII file or directory using the browse button provided on launching the application.

 

Figure1

 

 

Top

 

b. Figure2 shows the data along with line numbers. Enter the corresponding line numbers for heading line, unit line and data line in figure2. By default the first non-blank line following the heading line is treated as unit line and first non-blank line following unit line is treated as first data line.                                               

 

Figure2

 

Top

 

c. The tool now determines the type of ASCII table file. There are two possibilities:

 

1.      Figure3 displays ASCII table file where columns are separated by delimiters.          

                 

Figure3

 

 There are six possible delimiters that the tool can detect.

 1. tab 

 2. pipe

 3. semicolon

 4. comma

 5. colon

 6. space

Apart from these delimiters user can also provide other delimiter by clicking the “Other” radio button and specifying the delimiter in textbox labeled “Specify Character”.

 

Top

 

2. Figure4 shows ASCII table file with fixed width columns.

 

Figure4

 

For fixed width files, the tool first displays the guess value for number of columns. It also displays information about start and end position of each column in the text boxes in the bottom portion of the screen. You can confirm these positions by looking at the table & the ruler in the upper portion of screen. The table shows ASCII table file split into columns. The screen also displays 5 extra columns at the bottom in case the file contains more columns than what the tool has found. In case the file contains less columns, just set the start & end positions of last columns to -1.

Top

 

d. Figure5 displays metadata information about the ASCII table file.

 

Figure5

 

The screen displays two tables in the scroll pane. First table is an editable table which displays metadata information about all columns in the table. Second table is a Data table which shows first few rows in the table split into columns.

The metadata table contains following metadata:

1. Column Name: If the heading line was entered on one of the previous screens, that line is parsed and corresponding column names

are put by default. Otherwise, the tool puts column names as column1, column2, etc.

2. Data Type: The tool does the parsing of first few rows in the ASCII table and finds out the guess value for column data types

3. Width:  The user can enter the information about width of the numeric field here. This metadata information is required only for numeric columns.

4. Precision:  For fractional data, user can enter the information about precision of the data here.

5. ArraySize:  The user can enter information about size of character array here (width of the char field). The tool does not put any default          value here. This metadata information is required only for character data.

6. Unit: If the unit line was entered on one of the previous screens, that line is parsed and corresponding units are put by default.            

7. Ucd: Ucd of the column can be entered here.

Top

 

e. Figure6 displays the generated VOTable. The text area displays only first 20 rows of the generated VOTable. But, when you click on save button at the bottom, the entire VOTable gets saved.

 

Figure6

 

Top       

Command Line

                1java -jar VOConvert.jar -convert aTov -input c:\work1.txt

                2) Enter the output directory c:\test

                3) Enter the header line no : 1

                4) Enter the unit line no : 0

                5) Enter the first data line no : 2

                6) Enter the delimiter : ,

 

                    Conversion status for the input file will be indicated as shown below.  

 

                Generating the VOTable.
                Successfully converted the ASCII file to VOTable file.

Top

 

Conversion of multiple ASCII files

GUI

a. Choose the directory containing ASCII files using the “browse” button.

                                                                      

Figure 7

 

                                                                                

Top

b. Figure8 allows you to set the common properties of the files in the directory

                  

                                                                Figure 8                                                               

 

Top

 

c: Figure9  shows the number of ASCII files converted to VOTable.

 

Figure9

 

 

     

Top

 

Command Line

                1java -jar VOConvert.jar -convert aTov -input c:\ascii

                2) Enter the output directory c:\test

                3) Enter the header line no : 1

                4) Enter the unit line no : 0

                5) Enter the first data line no : 2

                6) Enter the delimiter : ,

 

        Conversion status for the input files will be indicated as shown below.

 

                The output directory where files were saved is c:\test
                The list of files converted are :
                ascii\work1.txt
                ascii\work2.txt
                ascii\work3.txt

Top

 

F. Conversion : FITS To VOTable

GUI

a. Choose the FITS file using the “browse” button in figure10.

                       

Figure10

         

Top

                  

b. Figure11 displays metadata information about the FITS file.

 

Figure11

 

The screen displays two tables for every table HDU in the FITS file. First table is an editable table which displays metadata  information about all columns in the table. Second table is a Data table which shows first few rows in the table split into columns. The user can confirm the default metadata or enter the new metadata by looking at this data table.

 

The metadata table contains following metadata:

1. Column Name: The tool finds this information from TTYPE keyword in the header.

2. Data Type: The tool finds this information from TFORM keyword in the header.

3. Width:  The tool finds this information from TFORM keyword in the header.

4. Precision:  The tool finds this information from TFORM keyword in the header.

5. ArraySize:  The tool finds this information from TFORM keyword in the header.

6. Unit: The tool finds this information from TUNIT keyword in the header. If the TUNIT keyword is missing, this field is

left blank.

7 Ucd: The tool finds this information from UCD keyword in the header. If the UCD keyword is missing, this field is left blank.  

 

Top     

c. Figure12 displays the generated VOTable. The text area displays only first 20 rows of the generated VOTable. But, when you click on save button at the bottom, the entire VOTable gets saved.

 

Figure12

 

Top

 

Command Line

                1java -jar VOConvert.jar -convert fTov -input c:\atestfil.fits

                2) Enter the output directory c:\test

 

                    Conversion status for the input file will be indicated as shown below.

               

                Generating the VOTable.
                Successfully converted the FITS file to VOTable file.

Top

 

Conversion of multiple FITS files

GUI

  1. Choose a directory containing FITS files using the “browse” button in figure13.

 

Figure13

Top

 

 b: Figure14 shows the number of FITS files converted to VOTable.

 

                                                                                Figure 14

Top

 

Command Line

                1java -jar VOConvert.jar -convert fTov -input c:\fits

                2) Enter the output directory c:\test

 

Conversion status for the input files will be indicated as shown below.

 

                    Converted atestfil.fits to atestfil.xml
                    sample2.fit could not be converted: Error reading file

Top

 

G. Conversion VOTable To ASCII

GUI

a. Choose a votable file using the browse button in figure15.

                                                                             Figure 15

Top

 

b. Enter the delimiter in figure16. This delimiter is used for creating the ASCII file. The user can choose any one of  the six delimiters provided, or specify own delimiter by clicking the 'Other' button and entering other character as a delimiter in the 'Specify Character' field.

 

                                                                                   Figure16

Top

 

c. Figure17 displays metadata information about the VOTable file.

 

                                                                            Figure17

Top

 

 

d. Figure18 displays the generated ASCII file. The text area displays only first 20 rows of the generated ASCII. But, when you click on save button at the bottom, the entire ASCII file gets saved.

 

                                                                                  Figure 18

Top

 

 

Command Line

                1)  java -jar VOConvert.jar -convert vToa -input c:\work3.xml

                2) Enter the output directory c:\test

                3) Enter the delimiter : ,

 

Conversion status for the input file will be indicated as shown below.

                        

File work3.txt saved

Top

 

Conversion of multiple VOTables

GUI

 

a.       Choose a directory containing votables through the “browse” button in figure19.

 

                                                                                Figure19

Top

 

b.      Figure20  lets you to set the common properties of the files in the directory

 

Figure20

Top

 

c. Figure21 shows the number of VOTable files converted to ASCII

 

                                                                                                   Figure 21.

Top

 

Command Line

                1java -jar VOConvert.jar -convert vToa -input c:\votable

                2) Enter the output directory c:\test

                3) Enter the delimiter : ,

 

               Conversion status for the input files will be indicated as shown below.

 

                        Converted work1.xml to work1.txt
                        Converted work2.xml to work2.txt
                        Converted work3.xml to work3.txt
                        Converted Burbidge.xml to Burbidge.txt

Top

 

H. FEEDBACK ADDRESS

For feedback on VOConvert contact voindia@vo.iucaa.ernet.in.

 

Top