Global

Members

box2DTranslator

what happens when a box is translated this is added to the Selector object in order to add different translation to different objects if necessary
Source:

box3DTranslator

what happens when a box is translated this is added to the Selector object in order to add different translation to different objects if necessary
Source:

dataPaths

Stores path to datafile that will be used later
Source:

Methods

DMS2DecDeg(value)

Converts a declination D:M:S into decimal degrees
Parameters:
Name Type Description
value *
Source:
Returns:
result in degrees

HMS2DecDeg(value)

Converts a H:M:S value into decimal degrees
Parameters:
Name Type Description
value *
Source:
Returns:

KToCm(energy_in_K)

Converts K in cm-1 (for energy values)
Parameters:
Name Type Description
energy_in_K *
Source:

SAMPPublisher(connector, dataPaths)

Manages connection to samp hub
Parameters:
Name Type Description
connector * samp hub connector
dataPaths * paths to data file
Source:

_sendPNG(pngPath)

Sends a PNG file to Aladin
Parameters:
Name Type Description
pngPath string
Source:

changeLinesGroup(newGroupIndex)

Changes list of spectral lines displayed in table next to the spectrum. Only a few lines are displayed at a time to avoid list becoming too long.
Parameters:
Name Type Description
newGroupIndex int index of displayed lines group
Source:

cleanContainer()

Removes everything from the DOM element containing the results
Source:

cmToK(energy_in_cm)

Converts cm-1 in K (for energy values)
Parameters:
Name Type Description
energy_in_cm *
Source:

computeDistanceQuantities(Hnot, OmegaM, z) → {object}

Returns an object containing the distant in Mpc, the scale in kpc, the luminosity distance in Mpc and the z value in Gyr
Parameters:
Name Type Description
Hnot number Hubble constant value
OmegaM number mass density value
z number redshift value
Source:
Returns:
Type
object

computeDl(Hnot, OmegaM, z)

Returns luminosity distance in Mpc calculated by computeDistanceQuantities
Parameters:
Name Type Description
Hnot number Hubble constant value
OmegaM number mass density value
z number redshift value
Source:
Returns:
luminosity distance in Mpc

dcmt() → {float}

Returns tangential comoving distance
Source:
Returns:
Type
float

displayableBUnit(unit) → {string}

Returns a formatted string containing a displayable unit name
Parameters:
Name Type Description
unit string the source unit
Source:
Returns:
a formatted unit
Type
string

fireChartSelectionEvent(chart, xMin, xMax)

Triggers Highcharts selection event on the given chart
Parameters:
Name Type Description
chart Highcharts.chart event target
xMin number minimum selected value on xAxis
xMax number maximum selected value on xAxis
Source:

get1DSpectrumUpdateEvent(data)

Returns an event signaling that a slice has been modified data packed inside the event are used in testing context
Parameters:
Name Type Description
data object spectrum data
Source:
Returns:
Event

get2DImageLoadedEvent(data)

Returns an event signaling that a slice has been modified data packed inside the event are used in testing context
Parameters:
Name Type Description
data object spectrum data
Source:
Returns:
Event

get3DSpectrumUpdateEvent(type, data)

Returns an event signaling that a slice has been modified data packed inside the event are used in testing context
Parameters:
Name Type Description
type string type of the modified slice ( single or summed)
data object spectrum data
Source:
Returns:
Event

getBoxCoordinates()

Returns the coordinates of the defautl box created on a slice
Source:
Returns:
a dictionary where keys are iRA0, iRA1, iDEC0, iDEC1

getInitialBoxCoordinates()

Returns the coordinates of a box automatically displayed when a 2D cube is opened
Source:
Returns:
array

getLpLineJ(sline, nu_obs, dl, z)

Returns value of L'_Line in K.km/s.pc2, then Mgas is a function of L'_Line in case bunit is in Jy/beam
Parameters:
Name Type Description
sline * surface selected in summed pixel spectrum in Jy.km/s
nu_obs * line observed frequency in GHz
dl * distance in Mpc (from NED)
z * redshift
Source:
Returns:

getLpLineK(sline, dl, z, cdelt1, cdelt2, bmin, bmaj, box)

Returns value of L'_Line in K.km/s.pc2, then Mgas is a function of L'_Line in case bunit is in K
Parameters:
Name Type Description
sline * surface selected in summed pixel spectrum in Jy.km/s
dl * distance in Mpc (from NED)
z * redshift
cdelt1 *
cdelt2 *
bmin *
bmaj *
box * coordinates of selected box ([xmin, xmax, ymin, ymax])
Source:
Returns:

getPoint(x, y, visible) → {object}

Returns an object containing the configuration of a point when it will be displayed in Highcharts graph (plot type, colors, line width ...) Radius (5) and color (red) are hard coded for now
Parameters:
Name Type Description
x number coordinate on x axis (float)
y number coordinate on y axis (float)
visible boolean visibility
Source:
Returns:
a point object to plot in Hightcharts
Type
object

getProjection(type) → {Projection}

Returns a Projection object according to the type passed in parameter
Parameters:
Name Type Description
type string
Source:
Returns:
Type
Projection

getRadiusInDegrees()

Compute the search radius in degrees from coordinates to get matching sources in NED if radius_value is FOV : Returns the min value between abs(RAmax-RAmin) and abs(Decmax-Decmin) else : return radius_value radius_value : radius in arcmin or "fov" fits_header : FITS_HEADER object
Source:

getSingleSpectrum1D(spectroUI, sourceTable, withSAMP)

Initializes and return the spectrum
Parameters:
Name Type Description
spectroUI *
sourceTable *
withSAMP * true if SAMP is enabled
Source:
Returns:

getSliceUpdateEvent(slice, type, data)

Returns an event signaling that a slice has been modified data packed inside the event are used in testing context
Parameters:
Name Type Description
slice object an instance of Slice classes
type string type of the modified slice ( single or summed)
data object slice data
Source:
Returns:
Event

getViewLinker(radecRange, spectroUI, sourceTable, markerList) → {ViewLinker}

Returns a ViewLinker object that provides an interface to manipulate Spectrums and Slices
Parameters:
Name Type Description
radecRange array RA/DEC ranges corresponding to opened fits file
spectroUI SpectroUI spectroscopy interface control object
sourceTable SourceTable NED interface object
markerList MarkerList list of markers
Source:
Returns:
Type
ViewLinker

getXAxisConfiguration() → {Object}

Returns an object containing the configuration of the X axis when it will be displayed in Highcharts graph (plot type, colors, line width ...)
Source:
Returns:
configuration of x axis for Highcharts
Type
Object

hashCode(s)

Generates a random string (from https://stackoverflow.com/questions/7616461/generate-a-hash-from-string-in-javascript)
Parameters:
Name Type Description
s *
Source:
Returns:

jyperk(nu, bmin, bmaj)

Computes jansky per kelvin.
Parameters:
Name Type Description
nu number frequency in Hz
bmin number bmin in degrees
bmaj number bmaj in degrees
Source:
Returns:

printVal(value)

Displays current value of variable (console.log sometimes show updated value)
Parameters:
Name Type Description
value *
Source:

redshift2Velocity(z)

Parameters:
Name Type Description
z *
Source:
Returns:
velocity in km/s

sendFitsImageToAll(imageUrl, imageId)

Sends an image to all applications accepting image.load.fits message
Parameters:
Name Type Description
imageUrl string
imageId number (int)
Source:

sendMarkers(markers)

Sends a script to Aladin to display a list of markers
Parameters:
Name Type Description
markers list
Source:

sendPNGSlice()

Sends currently displayed single slice image to Aladin
Source:

sendPNGSummedSlices()

Sends currently displayed summed slice image to Aladin
Source:

sendSpectrumToAll(spectrumUrl, tableId)

Sends a spectrum to all applications accepting table.load.fits message
Parameters:
Name Type Description
spectrumUrl string
tableId number (int)
Source:

separation(RA1, DEC1, RA2, DEC2)

Returns separation in arcsec ( for lisibility )
Parameters:
Name Type Description
RA1 * in degrees
DEC1 * in degrees
RA2 * in degrees
DEC2 * in degrees
Source:

setOnHubAvailability(viewers)

Enable or disable SAMP from a list of viewers
Parameters:
Name Type Description
viewers *
Source:

setOnHubAvailabilityButtons()

Enable or disable SAMP in 3D slice
Source:

shift(lines, velocity, velolsr)

calculate the shifted value of all the lines in the given array returns a deep-copy of the array with shifted line values
Parameters:
Name Type Description
lines * array of lines
velocity * value used to calculate shift in km/s
velolsr * velolsr in km/s
Source:

shiftFrequencyByV(frequency, z)

Computes a shifted frequency value for a given velocity in km/s
Parameters:
Name Type Description
frequency *
z *
Source:
Returns:

shiftFrequencyByZ(frequency, z)

Computes a shifted frequency value for a given z
Parameters:
Name Type Description
frequency *
z *
Source:
Returns:

standardDeviation(arr)

Returns standard deviation of an array (https://codesource.io/how-to-do-standard-deviation-in-javascript/)
Parameters:
Name Type Description
arr array
Source:
Returns:
float

str2FloatArray(s, range) → {Array.<number>|undefined}

Utility. A function which parses a string into an array of floats. The string is expected to be a comma separated list of textual representation of decimal numbers. A range [min, max[ can be provided, then the values are considered valif if and only if they lie in that range.
Parameters:
Name Type Default Description
s string a comma separated list of textual numbers representations
range false
Source:
Returns:
an array of float numbers or undefined.
Type
Array.<number> | undefined

triggerTest(statistics, boxesFactory)

Triggers the test procedure
Parameters:
Name Type Description
statistics object some statistics related to the opened data cube
boxesFactory BoxesFactory object to create a box on the cube image
Source:

unshift(frequency, value, type)

get the rest value for a frequency according to a redshift or a velocity returns a deep-copy of the array with shifted line values
Parameters:
Name Type Description
frequency *
value * value used to calculate shift
type * redshift or velocity
Source:

unshiftFrequencyByV(frequency, z)

Remove shift from a frequency value with a given velocity in km/s
Parameters:
Name Type Description
frequency *
z *
Source:
Returns:

unshiftFrequencyByZ(frequency, z)

Computes a shifted frequency value for a given z
Parameters:
Name Type Description
frequency *
z *
Source:
Returns:

velocity2Redshift(v)

Parameters:
Name Type Description
v number in km/s
Source:
Returns:
redshift

Type Definitions

AxesFactory

Type:
  • Object
Properties:
Name Type Description
numeridians number number of visible meridians (int)
nparallels number number of visible parallels (int)
cdelt1 number cdelt1 in radians (header is in degrees) (float)
cdelt2 number cdelt2 in radians (header is in degrees) (float)
axisStyle object styling options for axis
Source:

BoundingRect

Bounding rectangle.
Properties:
Name Type Description
unit string The unit in which are expressed x, y, w and h. Must be "pixels"
Source:

ContourMeasurement

Statistics on the area delimited by a contour.
Properties:
Name Type Description
min PhysMeas the minimum over the pixels values
max PhysMeas the maximum over the pixel values
mean PhysMeas the average of the pixel values
stdev PhysMeas the standard deviation of the pixel values
numpix number the number of pixels
"percentage PhysMeas of total number of pixels" - self explanatory ( note that unit in that case is "%" )
boundingRect BoundingRect self explanatory
Source:

ContoursLevelsPostParams

When contours are calculated from their levels values.
Type:
  • Object
Properties:
Name Type Description
iFreq number the index of the RA/DEC plane of interest.
levels Array.<number> the array of levels numerical values.
Source:

ContoursOptParams

Union of ContoursLevelsPostParams and ContoursQuantilesPostParams
Type:
Source:

ContoursPostParams

How is structured the parameter sent to the contours lines calculator.
Type:
  • Object
Properties:
Name Type Description
relFITSFilePath string the path to the FITS file of interest
optParams string JSON representation of a ContoursOptParams
Source:

ContoursQuantilesPostParams

When contours are calculated from their quantiles values.
Type:
  • Object
Properties:
Name Type Description
iFreq number the index of the RA/DEC plane of interest.
quantiles Array.<number> the array of quantiles numerical values.
Source:

FitsHeader

Class representing a FITS header.
Type:
  • Object
Source:

LastClickMarker

An object to mark informations related to a position in a popup bow located close to the position passed as a parameter.
Type:
  • Object
Source:

LinePlotter

Object plotting lines on a spectrum
Type:
  • Object
Properties:
Name Type Description
linesCount number number of lines currently displayed (int)
transitions array complete list of spectral lines in the searched band
targets array spectra graphs where lines will be plotted
spectroUI SpectroscopyUI
transitionGroups array gorups of lines
shiftedLineIdPrefix string prefix used when setting the id of a shifted line in the DOM
lineColor string hexadecimal code defining the color of a line
obsFreqMin number minimum frequency (float)
obsFreqMax number maximum frequency (float)
Source:

LineStringFeature

What is a contour as expected by importYAFITSContours.
Type:
  • Object
Properties:
Name Type Description
type string Must be equal to "LineString"
coordinates Array.<Array.<number>> an array of 2D coordinates
properties LineStringProperties its properties
Source:

LineStringProperties

Type:
  • Object
Properties:
Name Type Description
level PhysMeas the level of the contour
Source:

PhysMeas

Physical measure are defined by a numerical value and a physical unit
Properties:
Name Type Description
value number the numerical value
unit string the physical unit
Source:

Slice

Base class for Slice display
Type:
  • Object
Source:

SpectroscopyFormatter

An object providing methods to format spectroscopic data display
Type:
  • Object
Source:

SpectroscopyUI

Object managing interaction with the spectroscopy user interface
Type:
  • Object
Properties:
Name Type Description
toggler object checkbox to enable/disable the UI
spectroscopyForm object the whole form
redshiftElement object redshift input
dlElement object luminosity distance input
databaseElement object database choice checkboxes
energyUpElement object energy up input
energyUpUnitElement object energy up unit select
intensityRangeElement object intensity range
intensityElement object intensity value display
atomCountMinElement object minimum number of atoms
atomCountMaxElement object maximum number of atoms
autoCompleteElement object species choice with autocompletion
selectedSpeciesElement object list of selected species
linesTable object html table of displayed lines
linesTableBody object html table tbody
linesTableContainer object html table div
currentGroupDisplay object id of currently displayed group
lastGroupDisplay object id of last displayable group
surfaceInSummedSpectrum object display surface of selected area in spectrum
lineLuminosityElement object display value of line luminosity
referenceLineElement object reference line used for luminosity calculation
groupsInfos array list of tuples of min/max energy value for each lines group
currentGroup number index of currently displayed group (int)
referenceFreq number reference frequency value for luminosity calculation (float)
Source:

ViewLinker

Class creating link between slices and spectra
Type:
  • Object
Properties:
Name Type Description
spectrumViewer SpectrumViewer
summedPixelsSpectrumViewer SummedPixelsSpectrumViewer
extent array
raLabelFormatter RaLabelFormatter
decLabelFormatter SpectruDecLabelFormattermViewer
singleSliceImage SliceViewer
summedSlicesImage SummedSliceViewer
coordsProjection Projection
spectroUI SpectroscopyUI
Source:

defaults

Type:
  • Object
Properties:
Name Type Description
value string | Array Initial value of the compontent
placeholder string The default instruction text on the element
onchange requestCallback Method to be execute after any changes on the element
onclose requestCallback Method to be execute when the element is closed
Source:

defaults

Type:
  • Object
Properties:
Name Type Description
value string | Array Initial value of the compontent
placeholder string The default instruction text on the element
onchange requestCallback Method to be execute after any changes on the element
onclose requestCallback Method to be execute when the element is closed
Source:

defaults

Type:
  • Object
Properties:
Name Type Description
value string | Array Initial value of the compontent
limit number Max number of tags inside the element
search string The URL for suggestions
placeholder string The default instruction text on the element
validation validation Method to validate the tags
onbeforechange requestCallback Method to be execute before any changes on the element
onchange requestCallback Method to be execute after any changes on the element
onfocus requestCallback Method to be execute when on focus
onblur requestCallback Method to be execute when on blur
onload requestCallback Method to be execute when the element is loaded
Source: