Global

Methods

degreesToString Convert a number in degrees into a string
(numberDegrees)

Parameters:
Name Type Description
numberDegrees number in degrees (integer or decimal)
Source:
Returns:
a formattes string
Examples

Result in degrees

// returns "1°"
Numbers.degreesToString(1)

Result in arcminutes

// returns "6 arcmin"
Numbers.degreesToString(0.1);

Result in arcseconds

// returns "36 arcsec"
Numbers.degreesToString(0.01);

Type Definitions

AladinOptions

Options for configuring the Aladin Lite instance.
Type:
  • Object
Properties:
Name Type Attributes Default Description
survey string <optional>
"CDS/P/DSS2/color" URL or ID of the survey to use
surveyUrl Array.<string> <optional>
Array of URLs for the survey images. This replaces the survey parameter.
hipsList Array.<Object> | Array.<string> <optional>
A list of predefined HiPS for the Aladin instance. This option is used for searching for a HiPS in a list of surveys This list can have string item (either a CDS ID or an HiPS url) or an object that describes the HiPS more exhaustively. See the example below to see the different form that this item can have to describe a HiPS.
target string <optional>
"0 +0" Target coordinates for the initial view.
cooFrame CooFrame <optional>
"J2000" Coordinate frame.
fov number <optional>
60 Field of view in degrees.
backgroundColor string <optional>
"rgb(60, 60, 60)" Background color in RGB format.
showZoomControl boolean <optional>
false Whether to show the zoom control toolbar. This element belongs to the FoV UI thus its CSS class is `aladin-fov`
showLayersControl boolean <optional>
true Whether to show the layers control toolbar. CSS class for that button is `aladin-stack-control`
expandLayersControl boolean <optional>
false Whether to show the stack box opened at starting CSS class for the stack box is `aladin-stack-box`
showFullscreenControl boolean <optional>
true Whether to show the fullscreen control toolbar. CSS class for that button is `aladin-fullScreen-control`
showSimbadPointerControl boolean <optional>
false Whether to show the Simbad pointer control toolbar. CSS class for that button is `aladin-simbadPointer-control`
showCooGridControl boolean <optional>
false Whether to show the coordinate grid control toolbar. CSS class for that button is `aladin-grid-control`
showSettingsControl boolean <optional>
false Whether to show the settings control toolbar. CSS class for that button is `aladin-settings-control`
showShareControl boolean <optional>
false Whether to show the share control toolbar. CSS class for that button is `aladin-share-control`
showStatusBar boolean <optional>
true Whether to show the status bar. Enabled by default. CSS class for that button is `aladin-status-bar`
showFrame boolean <optional>
true Whether to show the viewport frame. CSS class for that button is `aladin-cooFrame`
showFov boolean <optional>
true Whether to show the field of view indicator. CSS class for that button is `aladin-fov`
showCooLocation boolean <optional>
true Whether to show the coordinate location indicator. CSS class for that button is `aladin-location`
showProjectionControl boolean <optional>
true Whether to show the projection control toolbar. CSS class for that button is `aladin-projection-control`
showContextMenu boolean <optional>
false Whether to show the context menu.
showReticle boolean <optional>
true Whether to show the reticle.
showCatalog boolean <optional>
true Whether to show the catalog.
showCooGrid boolean <optional>
true Whether the coordinates grid should be shown at startup.
fullScreen boolean <optional>
false Whether to start in full-screen mode.
reticleColor string <optional>
"rgb(178, 50, 178)" Color of the reticle in RGB format.
reticleSize number <optional>
22 Size of the reticle.
gridColor string <optional>
"rgb(178, 50, 178)" Color of the grid in RGB format. Is overshadowed by gridOptions.color if defined.
gridOpacity number <optional>
0.8 Opacity of the grid (0 to 1). Is overshadowed by gridOptions.opacity if defined.
gridOptions Object <optional>
More options for the grid.
Properties
Name Type Attributes Default Description
color string <optional>
"rgb(178, 50, 178)" Color of the grid. Can be specified as a named color (see named colors), as rgb (ex: "rgb(178, 50, 178)"), or as a hex color (ex: "#86D6AE").
thickness number <optional>
2 The thickness of the grid, in pixels.
opacity number <optional>
0.8 Opacity of the grid and labels. It is comprised between 0 and 1.
showLabels boolean <optional>
true Whether the grid has labels.
labelSize number <optional>
15 The font size of the labels.
projection string <optional>
"SIN" Projection type. Can be 'SIN' for orthographic, 'MOL' for mollweide, 'AIT' for hammer-aitoff, 'ZEA' for zenital equal-area or 'MER' for mercator
log boolean <optional>
true Whether to log events.
samp boolean <optional>
false Whether to enable SAMP (Simple Application Messaging Protocol).
realFullscreen boolean <optional>
false Whether to use real fullscreen mode.
pixelateCanvas boolean <optional>
true Whether to pixelate the canvas.
Source:
Example
let aladin = A.aladin({
    target: 'galactic center',
    fov: 10,
    hipsList: [
        // url
        "https://alaskybis.unistra.fr/DSS/DSSColor",
        // ID from HiPS list
        "CDS/P/2MASS/color",
        // Not full HiPS described
        {
            name: 'DESI Legacy Surveys color (g, r, i, z)',
            id: 'CDS/P/DESI-Legacy-Surveys/DR10/color',
        },
        // Fully described HiPS
        {
            name: "DECaPS DR2 color",
            url: "https://alasky.cds.unistra.fr/DECaPS/DR2/CDS_P_DECaPS_DR2_color/",
            properties: {
                creatorDid: "ivo://CDS/P/DECaPS/DR2/color",
                maxOrder: 11,
                cooFrame: "equatorial",
                tileSize: 512,
                imgFormat: 'png',
            },
        },
        // HiPS with options
        {
            name: "SDSS9 band-g",
            id: "P/SDSS9/g",
            properties: {
                creatorDid: "ivo://CDS/P/SDSS9/g",
                maxOrder: 10,
                tileSize: 512,
                numBitsPerPixel: 16,
                imgFormat: 'fits',
                cooFrame: 'equatorial',
            },
            options: {
                minCut: 0,
                maxCut: 1.8,
                stretch: 'linear',
                colormap: "redtemperature",
            }
        }
    ]
})

Catalog

Represents a catalog with configurable options for display and interaction.
Type:
  • Object
Source:

CatalogOptions

Represents options for configuring a catalog.
Type:
  • Object
Properties:
Name Type Attributes Default Description
url string The URL of the catalog.
name string <optional>
"catalog" The name of the catalog.
color string <optional>
The color associated with the catalog.
sourceSize number <optional>
8 The size of the sources in the catalog.
markerSize number <optional>
12 The size of the markers associated with sources.
shape string <optional>
"square" The shape of the sources (e.g., "square", "circle", "rhomb", "triangle", "cross").
limit number <optional>
The maximum number of sources to display.
onClick function <optional>
The callback function to execute on a source click.
readOnly boolean <optional>
false Whether the catalog is read-only.
raField string <optional>
The ID or name of the field holding Right Ascension (RA).
decField string <optional>
The ID or name of the field holding Declination (dec).
filter function <optional>
The filtering function for sources. Returns a boolean
displayLabel boolean <optional>
false Whether to display labels for sources.
labelColumn string <optional>
The name of the column to be used for the label.
labelColor string <optional>
The color of the source labels.
labelFont string <optional>
"10px sans-serif" The font for the source labels.
Source:

CircleSelection

Options for configuring the Aladin Lite instance.
Type:
  • Object
Properties:
Name Type Description
x number x coordinate of the center's circle in pixels
y number y coordinate of the center's circle in pixels
r number radius of the circle in pixels
contains function function taking a {x, y} object telling if the vertex is contained or not
bbox function returns the bbox of the selection in pixels
Source:

CooFrame

String with possible values: 'equatorial', 'ICRS', 'ICRSd', 'j2000', 'gal, 'galactic'
Type:
  • string
Source:

GraphicOverlay

Represents an overlay containing Footprints, whether it is
Type:
  • Object
Source:

GraphicOverlayOptions

Options for configuring the graphic overlay
Type:
  • Object
Properties:
Name Type Description
options Object Configuration options for the MOC.
Properties
Name Type Attributes Default Description
name string <optional>
"overlay" The name of the catalog.
color string <optional>
A string parsed as CSS value. See here
lineWidth number <optional>
3 The line width in pixels
lineDash Array.<number> <optional>
[] Dash line option. See the segments property here
Source:

HpxCellVertices

Represents the vertices of a HEALPix cell, where each vertex is a LonLat object.
Type:
  • Object
Properties:
Name Type Description
v1 LonLat The first vertex.
v2 LonLat The second vertex.
v3 LonLat The third vertex.
v4 LonLat The fourth vertex.
Source:

ImageFITSOptions

Type:
  • Object
Properties:
Name Type Attributes Default Description
name string <optional>
A human-readable name for the FITS image
successCallback function <optional>
A callback executed when the FITS has been loaded
errorCallback function <optional>
A callback executed when the FITS could not be loaded
opacity number <optional>
1.0 Opacity of the survey or image (value between 0 and 1).
colormap string <optional>
"native" The colormap configuration for the survey or image.
stretch string <optional>
"linear" The stretch configuration for the survey or image.
reversed boolean <optional>
false If true, the colormap is reversed; otherwise, it is not reversed.
minCut number <optional>
The minimum cut value for the color configuration. If not given, 0.0 for JPEG/PNG surveys, the value of the property file for FITS surveys
maxCut number <optional>
The maximum cut value for the color configuration. If not given, 1.0 for JPEG/PNG surveys, the value of the property file for FITS surveys
additive boolean <optional>
false If true, additive blending is applied; otherwise, it is not applied.
gamma number <optional>
1.0 The gamma correction value for the color configuration.
saturation number <optional>
0.0 The saturation value for the color configuration.
brightness number <optional>
0.0 The brightness value for the color configuration.
contrast number <optional>
0.0 The contrast value for the color configuration.
Source:

ImageHiPSOptions

Type:
  • Object
Properties:
Name Type Attributes Default Description
name string <optional>
The name of the survey to be displayed in the UI
successCallback function <optional>
A callback executed when the HiPS has been loaded
errorCallback function <optional>
A callback executed when the HiPS could not be loaded
imgFormat string <optional>
Formats accepted 'webp', 'png', 'jpeg' or 'fits'. Will raise an error if the HiPS does not contain tiles in this format
cooFrame CooFrame <optional>
"J2000" Coordinate frame of the survey tiles
maxOrder number <optional>
The maximum HEALPix order of the HiPS, i.e the HEALPix order of the most refined tile images of the HiPS.
numBitsPerPixel number <optional>
Useful if you want to display the FITS tiles of a HiPS. It specifies the number of bits per pixel. Possible values are: -64: double, -32: float, 8: unsigned byte, 16: short, 32: integer 32 bits, 64: integer 64 bits
tileSize number <optional>
The width of the HEALPix tile images. Mostly 512 pixels but can be 256, 128, 64, 32
minOrder number <optional>
If not given, retrieved from the properties of the survey.
longitudeReversed boolean <optional>
false Set it to True for planetary survey visualization
opacity number <optional>
1.0 Opacity of the survey or image (value between 0 and 1).
colormap string <optional>
"native" The colormap configuration for the survey or image.
stretch string <optional>
"linear" The stretch configuration for the survey or image.
reversed boolean <optional>
false If true, the colormap is reversed; otherwise, it is not reversed.
minCut number <optional>
The minimum cut value for the color configuration. If not given, 0.0 for JPEG/PNG surveys, the value of the property file for FITS surveys
maxCut number <optional>
The maximum cut value for the color configuration. If not given, 1.0 for JPEG/PNG surveys, the value of the property file for FITS surveys
additive boolean <optional>
false If true, additive blending is applied; otherwise, it is not applied.
gamma number <optional>
1.0 The gamma correction value for the color configuration.
saturation number <optional>
0.0 The saturation value for the color configuration.
brightness number <optional>
0.0 The brightness value for the color configuration.
contrast number <optional>
0.0 The contrast value for the color configuration.
Source:

ListenerCallback

String with possible values: 'select', 'objectClicked', 'objectHovered', 'objectHoveredStop', 'footprintClicked', 'footprintHovered', 'positionChanged', 'zoomChanged', 'click', 'rightClickMove', 'mouseMove', 'fullScreenToggled', 'cooFrameChanged'
Type:
  • string
Source:

LonLat

Represents a geographical point with longitude and latitude coordinates.
Type:
  • Object
Properties:
Name Type Description
lon number The longitude coordinate.
lat number The latitude coordinate.
Source:

MOC

Represents a Multi-Order-Coverage with configurable options for display and interaction.
Type:
  • Object
Source:

MOCOptions

Options for configuring a MOC (Multi-Order-Coverage).
Type:
  • Object
Properties:
Name Type Description
options Object Configuration options for the MOC.
Properties
Name Type Attributes Default Description
name string <optional>
"MOC" The name of the catalog.
color string <optional>
The color of the MOC HEALPix cell edges.
fillColor string <optional>
A filling color of the MOC HEALPix cells.
fill string <optional>
false Fill the MOC with `options.fillColor`
edge string <optional>
true Draw the edges of the HEALPix cells with `options.color`.
lineWidth number <optional>
3 The line width in pixels
perimeter Boolean <optional>
false A filling color of the MOC HEALPix cells.
opacity number <optional>
1.0 The opacity of the MOC
Source:

PolygonSelection

Options for configuring the Aladin Lite instance.
Type:
  • Object
Properties:
Name Type Description
vertices Array.<Object> vertices of the polygon selection in pixels. Each vertex has a x and y key in pixels.
contains function function taking a {x, y} object telling if the vertex is contained in the selection or not
bbox function returns the bbox of the selection in pixels
Source:

RectSelection

Options for configuring the Aladin Lite instance.
Type:
  • Object
Properties:
Name Type Description
x number top left x coordinate of the rectangle in pixels
y number top left y coordinate of the rectangle in pixels
w number width of the selection in pixels
h number height of the selection in pixels
contains function function taking a {x, y} object telling if the vertex is contained in the selection or not
bbox function returns the bbox of the selection in pixels
Source: