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
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
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 |
* |
Returns:
result in degrees
HMS2DecDeg(value)
Converts a H:M:S value into decimal degrees
Parameters:
Name | Type | Description |
---|---|---|
value |
* |
Returns:
KToCm(energy_in_K)
Converts K in cm-1 (for energy values)
Parameters:
Name | Type | Description |
---|---|---|
energy_in_K |
* |
SAMPPublisher(connector, dataPaths)
Manages connection to samp hub
Parameters:
Name | Type | Description |
---|---|---|
connector |
* | samp hub connector |
dataPaths |
* | paths to data file |
_sendPNG(pngPath)
Sends a PNG file to Aladin
Parameters:
Name | Type | Description |
---|---|---|
pngPath |
string |
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 |
cleanContainer()
Removes everything from the DOM element containing the results
cmToK(energy_in_cm)
Converts cm-1 in K (for energy values)
Parameters:
Name | Type | Description |
---|---|---|
energy_in_cm |
* |
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 |
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 |
Returns:
luminosity distance in Mpc
dcmt() → {float}
Returns tangential comoving distance
Returns:
- Type
- float
displayableBUnit(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
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 |
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 |
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 |
Returns:
Event
getBoxCoordinates()
Returns the coordinates of the defautl box created on a slice
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 |
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]) |
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 |
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 |
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
getSingleSpectrum1D(spectroUI, sourceTable, withSAMP)
Initializes and return the spectrum
Parameters:
Name | Type | Description |
---|---|---|
spectroUI |
* | |
sourceTable |
* | |
withSAMP |
* | true if SAMP is enabled |
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 |
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 |
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 ...)
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 |
* |
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 |
Returns:
printVal(value)
Displays current value of variable (console.log sometimes show updated value)
Parameters:
Name | Type | Description |
---|---|---|
value |
* |
redshift2Velocity(z)
Parameters:
Name | Type | Description |
---|---|---|
z |
* |
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) |
sendMarkers(markers)
Sends a script to Aladin to display a list of markers
Parameters:
Name | Type | Description |
---|---|---|
markers |
list |
sendPNGSlice()
Sends currently displayed single slice image to Aladin
sendPNGSummedSlices()
Sends currently displayed summed slice image to Aladin
sendSpectrumToAll(spectrumUrl, tableId)
Sends a spectrum to all applications accepting table.load.fits message
Parameters:
Name | Type | Description |
---|---|---|
spectrumUrl |
string | |
tableId |
number | (int) |
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 |
setOnHubAvailability(viewers)
Enable or disable SAMP from a list of viewers
Parameters:
Name | Type | Description |
---|---|---|
viewers |
* |
setOnHubAvailabilityButtons()
Enable or disable SAMP in 3D slice
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 |
shiftFrequencyByV(frequency, z)
Computes a shifted frequency value for a given velocity in km/s
Parameters:
Name | Type | Description |
---|---|---|
frequency |
* | |
z |
* |
Returns:
shiftFrequencyByZ(frequency, z)
Computes a shifted frequency value for a given z
Parameters:
Name | Type | Description |
---|---|---|
frequency |
* | |
z |
* |
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 |
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 |
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 |
unshiftFrequencyByV(frequency, z)
Remove shift from a frequency value with a given velocity in km/s
Parameters:
Name | Type | Description |
---|---|---|
frequency |
* | |
z |
* |
Returns:
unshiftFrequencyByZ(frequency, z)
Computes a shifted frequency value for a given z
Parameters:
Name | Type | Description |
---|---|---|
frequency |
* | |
z |
* |
Returns:
velocity2Redshift(v)
Parameters:
Name | Type | Description |
---|---|---|
v |
number | in km/s |
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 |
BoundingRect
Bounding rectangle.
Properties:
Name | Type | Description |
---|---|---|
|
||
unit |
string | The unit in which are expressed x, y, w and h. Must be "pixels" |
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 |
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. |
ContoursOptParams
Union of ContoursLevelsPostParams and ContoursQuantilesPostParams
Type:
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 |
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. |
FitsHeader
Class representing a FITS header.
Type:
- Object
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
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) |
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 |
LineStringProperties
Type:
- Object
Properties:
Name | Type | Description |
---|---|---|
level |
PhysMeas | the level of the contour |
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 |
Slice
Base class for Slice display
Type:
- Object
SpectroscopyFormatter
An object providing methods to format spectroscopic data display
Type:
- Object
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) |
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 |
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 |
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 |
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 |