Class: SingleSlice

SingleSlice(viewLinker, sliceDivId, canvasId, RADECRangeInDegrees, width, height)

Class displaying the content of a single slice in an image ( a channel map extracted from a channel (frequency))

Constructor

new SingleSlice(viewLinker, sliceDivId, canvasId, RADECRangeInDegrees, width, height)

Parameters:
Name Type Description
viewLinker ViewLinker Object linking spectra and slices
sliceDivId string id of the DOM element containing the slice
canvasId string id of the canvas
RADECRangeInDegrees Array an array containing RA/DEC boundaries of the current cube
width number slice width in pixels (int)
height number slice height in pixels (int)
Source:

Extends

Members

_setMeanLabel

This is an abstract function that must be implemented in a derived class
Overrides:
Source:

_setRmsLabel

This is an abstract function that must be implemented in a derived class
Overrides:
Source:

removeGridEventListener

Removes a grid event listener
Overrides:
Source:

updateSlice

Updates the displayed image. Data object is generally obtained from a request to yafitss
Overrides:
Source:

Methods

_executeListeners(event)

Triggers grid modified event
Parameters:
Name Type Description
event object
Overrides:
Source:

_getGraticule()

Returns an ol.Graticule open layer object, showing a grid for a coordinate system This is an abstract function that must be implemented in a derived class
Overrides:
Source:

_getMap(id)

Returns the open layer map of the slice viewer This is an abstract function that must be implemented in a derived class
Parameters:
Name Type Description
id number of displayed slice in cube (int)
Overrides:
Source:

_getMapControl()

Defines the action triggered when the mouse moves on the slice This creates a link between the SingleSlice and SummedSlice through the ViewLinker
Source:

_imageLoadFunction(image, src)

What happens when the image to be displayed in 'image' is loaded.
Parameters:
Name Type Description
image Image an open layer image (ol.Image) that will contain src
src string image url
Overrides:
Source:

_initAdditionalControl()

Function to add more buttons to the default ones declared in _initControl
Overrides:
Source:

_initCommonControl(hidden)

Creates default buttons on the slice viewer
Parameters:
Name Type Description
hidden object list of hidden fields
Overrides:
Source:

addGridEventListener(listener)

Add a grid event listener
Parameters:
Name Type Description
listener object
Overrides:
Source:

coordinateFormat(olc) → {string}

/** Returns the coordinates at cursor position
Parameters:
Name Type Description
olc Array open layers coordinates
Overrides:
Source:
Returns:
Type
string

getRms(value, unit)

Sets the string RMS value with its unit
Parameters:
Name Type Description
value number (float)
unit string
Overrides:
Source:

markerListClear()

Called when markers list triggers an event
Overrides:
Source:

markerListUpdate(event)

Called when markers list triggers an event
Parameters:
Name Type Description
event Event event containing a list of markers to plot on the slice
Overrides:
Source:

onclick(event)

This is an abstract function that must be implemented in a derived class
Parameters:
Name Type Description
event Event event triggered by the click
Overrides:
Source:

pixelHasValue(x, y) → {boolean}

Tests if a pixel has a value, returns false if pixel has no value, i.e RGB value is 255,0,0 returns true in any other case
Parameters:
Name Type Description
x number (int)
y number (int)
Overrides:
Source:
Returns:
Type
boolean

reset()

Reset image position and resolution
Overrides:
Source:

setMean(value, unit)

Sets the string RMS value with its unit
Parameters:
Name Type Description
value number (float)
unit string
Overrides:
Source:

setSampButtonVisible(state)

Toggles display of the samp button on the slice image Button will be displayed if state is true, hidden if it is false
Parameters:
Name Type Description
state boolean
Overrides:
Source:

sourceTableCall(event)

Called when NED table object triggers an event, adds a marker on the slice pointing on an object in the sky
Parameters:
Name Type Description
event Event event received from NED table, containing ra/dec and the name of an object
Overrides:
Source:

updateGridCall(event)

Called when grid modified event has been received
Parameters:
Name Type Description
event object
Overrides:
Source: