Class: SummedPixelsSpectrumViewer

SummedPixelsSpectrumViewer(paths, containerId, viewLinker)

A class displaying an averaged spectrum, using the Highcharts library Initial interval selection is defined in _getInitialSelectionRange

Constructor

new SummedPixelsSpectrumViewer(paths, containerId, viewLinker)

Parameters:
Name Type Description
paths *
containerId *
viewLinker *
Properties:
Name Type Description
summedPixelsSpectrumChart Object a highchart chart object
linePlotter LinePlotter an object drawing spectral lines on the chart
Source:

Methods

_getChart() → {chart}

Returns a Highchart chart
Source:
Returns:
Type
chart

_getInitialSelectionRange()

Initial frequency range selected on the spectrum
Source:
Returns:
array

_getTopTitle(value, unit, vmin, vmax, imin, imax) → {string}

Returns the title displayed above the graph
Parameters:
Name Type Description
value number integral of selected interval on the graph (float)
unit string unit of integral value
vmin number minimum selected velocity value (float)
vmax number maximum selected velocity value (float)
imin number minimum selected channel index (int)
imax number maximum selected channel index (int)
Source:
Returns:
Type
string

_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(averageSpectrum) → {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
averageSpectrum array
Source:
Returns:
Type
array

_updateSummedSlices(min, max)

Updates the displayed averaged slice image, with respect to selected interval in graph Note : this function should be removed from this class and place in ViewLinker
Parameters:
Name Type Description
min number minimum selected value (float)
max number maximum selected value (float)
Source:

plot(iRA0, iDEC0, iRA1, iDEC1)

Calls the getAverageSpectrum function of the server to get the spectrum data and plot them getAverageSpectrum parameters are : relFITSFilePath, iRA0, iDEC0, iRA1, iDEC1
Parameters:
Name Type Description
iRA0 number minimum selected index value on RA axis (int)
iDEC0 number minimum selected index value on DEC axis (int)
iRA1 number maximum selected index value on RA axis (int)
iDEC1 number maximum selected index value on DEC axis (int)
Source:

refreshChartLegend()

Sets title of spectrum, x and y axis Title of the spectrum depends on its type (Sitelle, Casa, Gildas, Muse)
Source:

replot(xMin, xMax, yMin, yMax)

Replot the spectrum according to the received parameters The plot is done through a call to this.plot() The displayed spectral lines will be updated if they exist
Parameters:
Name Type Description
xMin number start x position (float)
xMax number end x position (float)
yMin number start y position (float)
yMax number end y position (float)
Source:

setChartTitle(title)

Sets the title diplayed above the graph
Parameters:
Name Type Description
title string
Source:

sourceTableCall(event)

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