Class: SpectrumViewer

SpectrumViewer(paths, containerId)

new SpectrumViewer(paths, containerId)

Parameters:
Name Type Description
paths Object dataPaths object
containerId string id of graph container
Source:

Methods

_getCalculatedIndex(value) → {float}

Returns the channel corresponding to the given input value (frequency or velocity)
Parameters:
Name Type Description
value number (float)
Source:
Returns:
Type
float

_getSelectedSpectrumValue(yData, imin, imax)

Returns integral value of selected area in the spectrum One case for a graph in radial velocity, one for all other cases
Parameters:
Name Type Description
yData *
imin *
imax *
Source:
Returns:

_getXData(rlen) → {array}

Returns x axis coordinates. They are calculated from center position and step between each value (CDELT3) The formula changes according to the type of data on x axis (CTYPE3)
Parameters:
Name Type Description
rlen number number of points on x axis (int)
Source:
Returns:
an array of x values
Type
array

_getYData(data) → {array}

Returns an array of ydata from the data passed in parameter. The parameter array must be reverted if CDELT3 > 0 in case of a frequency and if CDELT3 < 0 in case of a radial velocity It is rescaled in case of Sitelle data. It is returned unchanged in any other case
Parameters:
Name Type Description
data array
Source:
Returns:
Type
array

getSpectrumChartXAxis() → {Object}

Returns the xaxis of the chart and its datatype
Source:
Returns:
an object containing the xaxis and a datatype
Type
Object

getYValueAtX(x, spectrumData)

Returns Y value in spectrum data for a given X. Values are sorted in descending ordre in spectrumData, Y value is returned as soon as X > spectrumData[i]
Parameters:
Name Type Description
x number X value (float)
spectrumData array an array of [x,y] tuples
Source:
Returns:

setSampButtonVisible(state)

Toggles samp button visibility
Parameters:
Name Type Description
state boolean status of button visibility
Source:

setViewLinker(viewLinker)

Parameters:
Name Type Description
viewLinker ViewLinker ViewLinker object managing interactions between elements
Source:

sourceTableCall(event)

Called when NED table object triggers an event, refreshes lines display
Parameters:
Name Type Description
event Event event that triggered the call
Source: