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 |
Methods
_getChart() → {chart}
Returns a Highchart chart
Returns:
- Type
- chart
_getSummedSpectrumValue(avgSpectrum, 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 |
---|---|---|
avgSpectrum |
* | |
imin |
* | |
imax |
* |
Returns:
_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) |
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) |
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 |
Returns:
- Type
- array
_initTitles()
Sets title of spectrum, x and y axis
Title of the spectrum depends on its type (Sitelle, Casa, Gildas, Muse)
_summedPixelsSpectrumUnit(unit) → {string}
Returns a formatted string containing a displayable unit name
Parameters:
Name | Type | Description |
---|---|---|
unit |
string | the source unit |
Returns:
a formatted unit
- Type
- string
_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) |
getSummedPixelsSpectrumChartXAxis() → {Object}
Returns the xaxis of the chart and its datatype
Returns:
an object containing the xaxis and a datatype
- Type
- Object
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) |
replot(x, xWidth, y, yWidth)
Replot the spectrum according to the received parameters
The plot is done trhough a call to this.plot()
The displayed spectral lines will be updated if they exist
Parameters:
Name | Type | Description |
---|---|---|
x |
number | start x position (float) |
xWidth |
number | width selected on x-axis (float) |
y |
number | start y position (float) |
yWidth |
number | width selected on y-axis (float) |
setChartTitle(title)
Sets the title diplayed above the graph
Parameters:
Name | Type | Description |
---|---|---|
title |
string |
setSampButtonVisible(state)
Toggles SAMP button visibility
Parameters:
Name | Type | Description |
---|---|---|
state |
boolean | a boolean value corresponding to the new state of the button |
sourceTableCall(event)
Called when NED table object triggers an event, refreshes lines display
Parameters:
Name | Type | Description |
---|---|---|
event |
Event | event that triggered the call |