Using Tables with IRSA Services

Many IRSA services offer the option to upload a table and conduct multiple searches (Table-Upload or Multi-Object Search) rather than entering them one by one into the web form. The input table is a plain text file, describing the search targets or positions. Currently, different IRSA services have different requirements for the exact format of this table. All IRSA services except the Spitzer Heritage Archive will accept IPAC Table Format with ra and dec specified in J2000 decimal degrees and labeled in the header row. However, it may be convenient to use a different text format. This help page describes the IRSA services' requirements for table formats and includes sample tables.

The Table Reformat and Validation service will check the format of an upload table for compatibility with IRSA. Additionally, it will convert from other formats to the standard IPAC Table Format with J2000 decimal degrees.

Note: Not all services accept all formats. For example, Catalog Search only accepts tables in the standard IPAC Table Format using J2000 decimal degrees and column names of ra and dec (lower case). Each service has specific table documentation within its help pages. (Links are provided in the Best Practices section of this document.) The Spitzer Heritage Archive currently only accepts space delimited files.

Go Directly To A Section:


Requirements for Supported Table Formats

IRSA services accept some combination of the following ASCII table formats:

Each format and its respective requirements are detailed below.

1. IPAC Table Format (a.k.a IPAC ASCII Column-Aligned Format).

More information is available in the IRSA documentation (Download example.)

IPAC Table Format requires the following structure:

Example of a basic IPAC Table Format file:

|  object     |                ra            |         dec         |
|  char       |                double        |         double      |
     M56                  289.147941100             30.184500500
     ic4710               277.158208330             66.982277780
     hoix                  49.383333330             69.045833330
     tol89                210.339833330            -33.063777780
     ngc 4552             188.915863750             12.556341390
     M82                  148.969687500             69.679383330
     mrk33                158.132833330             54.401027780
     ngc1097               41.579375000            -30.274888890
     arp 22               179.874583330            -19.297222220
     M 65                 169.733166670             13.092222220

Note: In the above example, notice the vertical lines ( | ) between object, ra, and dec indicate the data-column boundaries. Additionally, the data are aligned to clearly identify the data-columns and do not span across multiple columns.

IPAC Table Format also has the flexibility of allowing the placement of additional information such as comments and keywords above the header rows. To learn more about this capability and how to use multiple header rows, read the Keyword and Comment Lines and Column Headers section of the IPAC table documentation.


2. Comma-Separated Values (CSV) or Comma-Delimited Format (Download example.)

This is a format commonly exported from Microsoft Excel as a .csv file. In this format, each data cell is separated by a comma.

Requirements for CSV tables include:

IRSA Services that accept this format:

Example of Comma-Separated Values (CSV) Format (also known as Comma Delimited):

object,ra,dec
M56,289.147941100,30.184500500
ic4710,277.158208330,-66.982277780
hoix,149.383333330,69.045833330
tol89,210.339833330,-33.063777780
ngc 4552,188.915863750,12.556341390
M82,148.969687500,69.679383330
mrk33,158.132833330,54.401027780
ngc1097,41.579375000,-30.274888890
arp 22,179.874583330,-19.297222220
M 65,169.733166670,13.092222220 

3. Tab-Delimited Format (Download example.)

This is a format commonly exported from Microsoft Excel as a .txt file by selecting Tab-Delimited when saving the file. In this format, each data cell is separated by a tab character. However, tab characters are often hard for some text editors to interpret. In addition, tabs are not allowed within data cells, only between them.

Requirements for tab-delimited tables are virtually identical to those for comma-separated and include:

IRSA Services that accept this format:

Example of Tab-Delimited Format:

object	ra	dec
M56	289.147941100	30.184500500
ic4710	277.158208330	-66.982277780
hoix	149.383333330	69.045833330
tol89	210.339833330	-33.063777780
ngc 4552	188.915863750	12.556341390
M82	148.969687500	69.679383330
mrk33	158.132833330	54.401027780
ngc1097	41.579375000	-30.274888890
arp 22	179.874583330	-19.297222220
M 65	169.733166670	13.092222220 

In the above example, the columns are aligned using tab characters between each data cell. Note the data-columns may not line up exactly, even if tabs are applied consistently (as in row #5). Resist the temptation to add additional tabs in order to make the data align correctly; this will only create extra and empty columns, and your table upload will fail. Spaces are allowed.


4. Space-Delimited Format (Download example.) Only used by the Spitzer Heritage Archive.

In this format each cell is separated by a space. Therefore, if there is a space in your object name (e.g., "NGC 1001" versus NGC1001) or position ("34 23 45.45" versus 34d23m45.45s), you need to put quotes around the target name or its position. Since this format is only used by the Spitzer Heritage Archive, there are several additional requirements:

Example of Space-Delimited Format:

COORD_SYSTEM: Equatorial
# Equatorial, Galactic, or Ecliptic - default is Equatorial
EQUINOX: J2000
# B1950, J2000, or blank for Galactic - default is J2000
NAME-RESOLVER: NED
# NED or Simbad - default is Simbad
#Name     RA/LON       DEC/LAT     PM-RA PM-DEC EPOCH
"NGC 001" 12h34m23.45s 34d23m56.2s 2.3    3.4 1950.3
NGC2222   23.56d       34.456d     2.3    3.4 1950.3
NGC3333   23.56h       34.456d     2.3    3.4 1950.3
NGC4444  "12 34 12.23" "34 23 45.45"
m31
legacy  "17 18 00" "59 30 00"
m32
m33       simbad
NGC6946 
NGC5194 
ngc2992

5. Simple List of Object Names / Coordinates with No Header (Download example.)

Some IRSA services will accept a simple list of objects with no header. In this case, there are no complex formatting rules to remember. Objects can be listed by coordinates, or by name -- as recognized by NED and SIMBAD. Resolving the names with NED or SIMBAD may take a few seconds per row.

Requirements for this format are minimal:

IRSA Services that accept this format:

Example:

M56
ic4710
hoix
3 23 45.6 -12 34 56.78
ngc 4552
M82
3h 22m 15.6s -13d 52m 11.17s
ngc1097
331.2 -6.94 ga
M 65

Supported Coordinate Systems

IRSA services strive to be flexible enough to accept most common coordinate representations (see below for a list of exceptions). Coordinates can be entered as decimal degrees or sexagesimal; in Galactic, Equatorial or Ecliptic (with or without Equinox); as multiple columns or a single column coordinate string; or (if a single string) as an object name to be resolved via astronomical name resolvers.

The first step in processing an uploaded table is to identify the best column(s) to use as coordinates. When any of the pairings of right ascension and declination listed in the table below are given, they are interpreted as shown in the Result column.

Note: This list, which is extensible, is based on data formats used by IRSA's data providers. In all examples, input column names are not case-sensitive.


Right AscensionDeclinationResult
radecEquatorial *
cracdecEquatorial *
ra2000dec2000Equatorial J2000
ra2000de2000Equatorial J2000
_raj2000_dej2000Equatorial J2000
raj2000dej2000Equatorial J2000
raj2000decj2000Equatorial J2000
ra1950dec1950Equatorial B1950
ra1950de1950Equatorial B1950
rab1950 deb1950Equatorial B1950
rab1950decb1950Equatorial B1950
elon elat Ecliptic J2000
elon2000elat2000Ecliptic J2000
elon1950elat1950Ecliptic B1950
glonglatGalactic
lbGalactic
lonlat **
starlonstarlat **

* The first two examples default to J2000, unless an Equinox column is included.

** The last two default to Equatorial J2000 unless extra Equinox ("equinox" or "epoch") and Coordinate-system ("coord sys" or "sys" or "csys") columns are explicitly given.

If no complete set of coordinate columns is found, the table is checked for a variety of possible columns that might contain coordinate strings or object names: "object," "source," "objname," "objstr," "locstr," "location," "star," "galaxy," or "name."

The next step is to parse the coordinates or look up the object by name. Again, the processing allows for a fairly wide variety of inputs. Object name lookup includes checking with NED and SIMBAD.

Coordinates can be decimal degrees or sexagesimal in various forms:

LongitudeLatitude
3h23m45.6s-37d15m41s
3 23 45.6-37 15 41
3h 23m 45.6s-37d 15m 41s
3 23' 45.6"-37 15' 41"
50d 56m 24s-37d 15m 41s
50.94000-37.2614

The final step in the processing is to output a column-aligned ASCII table with the same information content as the user's input, plus, if not already included, columns named "ra" and "dec" containing the right ascension and declination in decimal degrees J2000. This output can be copied from the IRSA web site and pasted into a text file for future uploading.


Best Practices for Successful Table Upload

Each table format has its own set of rules, as described above. Here are some general best practices for all IRSA tables:


Troubleshooting Tables

Error Message: IRSA could not recognize this table format.

Reason: The table is in a binary file format, such as .doc, .rtf or .xls.

In order for a table to be read by IRSA's services, it must be in a plain text ASCII file. If you are using Microsoft Word, be aware documents may appear to be in plain text, but can still contain hidden formatting if saved in any file format other than plain text (.txt).

Solution: For best results, create the file in a plain text editor such as vi, emacs, Notepad in Windows or TextEdit in Mac. If your data is in a Microsoft Excel spreadsheet, you can save the file as a .csv file.


Error Message: Records in the table do not contain uniform number of columns.

Reason: Too many data columns, too few column names.

If you are using IPAC ASCII Column-Aligned, or tab- or comma-delimited formats, the number of cells containing data must not exceed the number of column names.

In the following example, there are three named columns: A, B, and C. However, there is a row with four cells of data:

A,B,C
5,2,
7,6,9,11

In the above example, the "11" is orphan data because it is not aligned with column A, B, or C.

If you are using IPAC ASCII Column-Aligned format, placing data under the vertical bars in the header will result in both this error message and the "failed to parse" error message, below.

Solution: Add additional column names in the header row to identify each data cell, and make sure that data entries are properly aligned with the correct header columns.


Error Message: We cannot identify columns to use as coordinates or a column to use as object names/locations.

Reason: The column names do not sufficiently describe an object name, or the locations on the sky using ra, dec, glon, glat, etc.

Solution: Clean up the column names so they are recognizable by IRSA services. See Sexagesimal and Galactic Coordinates for more information.

Example:

| jcgRA    | jcgDec  | size   |
  150.3814   2.3606    60.0
  150.2794   2.1560    60.0
  149.8873   2.0789    60.0
  150.2323   1.9599    60.0
  150.5407   2.5196    60.0
  149.9343   2.4426    60.0

In the above example, there is extraneous text appended to RA and Dec, rendering the column name unrecognizable.


Error Message: Failed to parse the table.

Three common conditions may result in this error message.

Reason #1: When using IPAC Table Format, data are located beneath the vertical bars in the header.

Solution: Align the data with the columns in the header. (See IPAC Table Format)

Reason #2: Space is used as data delimiter, but also exists within the data, making it uninterpretable.

Solution: If you are using the tab-delimited format, carefully check your data for extra tabs that the system is interpreting as new columns. Be aware that tabs are not visually obvious when viewed on screen or in print; it's best to use a text editor that will allow you to view the file's underlying formatting. (See Best Practices For Successful Table Upload)

Reason: #3 Table contains non-printable ASCII characters.

A non-printable ASCII character in a table, such as ^[ (escape) or ^\ (file separator), can create problems during the upload process. Tabs are one of the most common causes of failed uploads because they are considered characters, even if they don't appear on print-outs, or even on-screen. When used in a table, the tab character is translated into its ASCII counterpart (^I), which is not interpretable during table upload.

Solution: Remove the characters from the file. Cleaning up tabs is done differently, based on your operating system and text editor:

Error: Search results return objects at coordinates substantially different than the intended input coordinates.

Reason: The table is using IPAC ASCII Column-Aligned format, and the columns are misaligned.

Solution: Make sure the table data are contained within the boundaries set by the vertical lines in the column header rows.

In the following examples, a table with misaligned data is reformatted by the Table Reformat and Validation service into IPAC Table Format:

Misaligned data columns:

|  ra |      dec |    name|
 12 24 36   45 29 27   m1
  6 45 22    5 12 54   m2

Reformatted data columns:

| ra_u  | dec_u      | name     | ra              | dec             |
|char   |char        |char      |double           |double           |
  12 24   36   45 29   27   m1    186.1500000       +0.7580556       
  6 45    22    5 12   54   m2    101.3416667       +0.0866667       

In the above example, the first set of coordinates is interpreted as 12h24m00s, 00d45m29s instead of the intended 12h24m36s, 45d29m27s.


Contacting IRSA's Help Desk

If you having a specific issue with tables that is not addressed in this document, contact the IRSA Help Desk by submitting a User Support Ticket.