Class: SingleSpectrumViewer1D

SingleSpectrumViewer1D()

A class displaying a spectrum, using the Highcharts library

Constructor

new SingleSpectrumViewer1D()

Properties:
Name Type Description
spectrumChart Object a highchart chart object
Source:

Methods

_getChart(spectrumData, xtitle, ytitle) → {chart}

Creates and returns a Highcharts chart
Parameters:
Name Type Description
spectrumData Object Data plotted in graph
xtitle string x axis title
ytitle string y axis title
Source:
Returns:
Type
chart

_getDetailChart(xtitle, ytitle)

Creates the detailed chart zooming content from master chart
Parameters:
Name Type Description
xtitle string X axis title
ytitle string Y axis title
Source:

_getIntervalData(min, max)

Returns data in the min/max interval from this._detailData
Parameters:
Name Type Description
min number minimum value in interval (float)
max number maximum value in interval (float)
Source:
Returns:
array

getDetailedSpectrumChartXAxis() → {Object}

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

plot(iRA, iDEC, cb)

Calls the getSpectrum function of the server to get the spectrum data and plot them getSpectrum parameters are : relFITSFilePath, iRA, iDEC, iFREQ0, iFREQ1 Here we want data for all frequencies so iFREQ0 = 0 and iFREQ1 = NAXIS3 - 1 if iRA or iDEC are undefined, we use a centered value NAXIS1 / 2 and NAXIS2 / 2 respectively
Parameters:
Name Type Description
iRA number
iDEC number
cb callbackFucntion a function called when data have been returned from server
Source:

refresh()

Refresh both charts display
Source:

refreshMasterBands(xMin, xMax)

Shows the selected interval on the master graph. Area is coloured between [xAxis[0], xMin] and [xMax, xAxis[xAxis.length -1]]
Parameters:
Name Type Description
xMin number minimum value seelcted by user on X axis
xMax number maximum value seelcted by user on X axis
Source:

resetZoom()

Resets zoom of detail chart to its initial value by triggering a selection event on the chart with this._xDetailMin and this._xDetailMax values Master chart is fixed and can not be zoomed
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: