Class: SummedSlice

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

Class displaying the content of a map averaged from a frequency-range (velocity-range) selected in the averaged spectrum

Constructor

new SummedSlice(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)
Properties:
Name Type Description
sliceIndex0 number selected start index in averaged spectrum (int)
sliceIndex1 number selected end index in averaged spectrum (int)
selectedBox number box selected by the user in the image
regionOfInterest number boundaries of the cube as found in the header
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 This is an abstract function that must be implemented in a derived class
Overrides:
Source:

Methods

_executeListeners(event)

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

_getDragBox() → {DragBox}

Returns a DragBox object, defining what happens when user creates a box in the slice
Source:
Returns:
ol.interaction.DragBox
Type
DragBox

_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
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:

addShapesLayer(layer)

Adds a Layer the shapesLayerGroup
Parameters:
Name Type Description
layer Layer an open layer Layer object (ol.layer.Layer)
Source:

coordinateFormat(olc) → {string}

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

forgetSelectedBox()

Deletes the currently selected box, if it exists
Source:

getRms(value, unit)

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

getSelect() → {Select}

Returns a ol.interaction.Select object, defining what happens when user clicks on a box in the slice
Source:
Returns:
ol.interaction.Select
Type
Select

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: