Class: SourceTable

SourceTable(table_target, table_title, spectroUI)

An object representing a list of sources in the sky

Constructor

new SourceTable(table_target, table_title, spectroUI)

Parameters:
Name Type Description
table_target string DOM element containing the table
table_title string Title of the table
spectroUI object spectroscopy user interface
Source:

Methods

_buildDLInfo(source)

Builds the content of the container displaying link to NED DL page for this source
Parameters:
Name Type Description
source object a source name
Source:
Returns:
DOMElement

_buildSourceInfo(source)

Builds the content of the container displaying the source infos
Parameters:
Name Type Description
source object a source name
Source:
Returns:
DOMElement

_executeListeners(event)

Calls all the registered listeners
Parameters:
Name Type Description
event contains values of redshift, velocity, ra, dec
Source:

_getDataCell(data)

Returns a TD DOM element
Parameters:
Name Type Description
data string
Source:

_getDataTable() → {object}

Returns rows of HTML table and the metadata associated to each row. Additional metadata are calculated if z > Constants.MIN_REDSHIFT_FOR_CALC (scale in kpc, distance in Mpc, * z age in Gyr, luminosity distance in Mpc)
Source:
Returns:
{"table" : [], "data" : []}
Type
object
Returns a link to the NED page listing distances for a source
Parameters:
Name Type Description
source object source name
Source:
Returns:
url

_getHyperlinkCell(link, text)

Returns a TD DOM element containing a hyperlink
Parameters:
Name Type Description
link string
text string
Source:

_getNedTapUrl(RA, DEC) → {string}

Returns a TAP request to NED service
Parameters:
Name Type Description
RA float
DEC float
Source:
Returns:
query url
Type
string

_getNedWebUrl(RA, DEC) → {string}

Returns a cone search request to NED service
Parameters:
Name Type Description
RA float
DEC float
Source:
Returns:
query url
Type
string

_getTable(rows) → {domElement}

Returns a HTML table element with all its rows in tbody
Parameters:
Name Type Description
rows *
Source:
Returns:
Type
domElement

_getTableHeader(content)

Returns a TH DOM element
Parameters:
Name Type Description
content string
Source:

_onClick(event)

Event triggered when a TR element is clicked It is propagated to all entries in this.selectionListeners
Parameters:
Name Type Description
event *
Source:

_setDlWarning(message)

Displays a message in the dedicated area in title div
Parameters:
Name Type Description
message string displayed message
Source:

_setTitle(RA, DEC, radius)

Fills the title area of the sources container
Parameters:
Name Type Description
RA float
DEC float
radius float
Source:

_showResult(RA, DEC)

Displays the result table or a warning message if no result has been found
Parameters:
Name Type Description
RA float
DEC float
Source:

_showSpinner()

Shows a spinner image indicating that the UI is busy
Source:

_writeInfoMessage(text)

Add a SPAN element with a text message inside the DOM element containing the results
Parameters:
Name Type Description
text string
Source:

addListener(listener)

Adds a new listener to the list
Parameters:
Name Type Description
listener object
Source:

getSources(RA, DEC, radius)

Gets sources at RA/DEC/radius from NED catalog
Parameters:
Name Type Description
RA *
DEC *
radius * in degrees
Source:

removeListener(listener)

Removes a listener
Parameters:
Name Type Description
listener object
Source: