A
- Description:
- Aladin Lite API namespace for creating celestial objects.
- Source:
Example
// Usage example:
import { A } from 'aladin-lite';
const aladin = new A.aladin("#aladin-lite-div", { survey: 'your survey url', fov: 180, projection: 'SIN' });
Methods
(static) HiPS(id, optionsopt) → {HiPS}
- Description:
- Creates a HiPS image object
- Source:
Parameters:
Name |
Type |
Attributes |
Description |
id |
string
|
|
Can be:
- An http url towards a HiPS.
- A relative path to your HiPS
- A special ID pointing towards a HiPS. One can found the list of IDs here
|
options |
HiPSOptions
|
<optional>
|
Options describing the survey |
Returns:
- A HiPS image object
-
Type
-
HiPS
(static) MOCFromCone(circle, optionsopt, successCallbackopt, errorCallbackopt) → {MOC}
- Description:
- Creates a new MOC (Multi-Order-Coverage) from an object describing a cone on the sky
- Source:
Parameters:
Name |
Type |
Attributes |
Description |
circle |
Object
|
|
A object describing a cone in the sky
Properties
Name |
Type |
Description |
ra |
number
|
Right-ascension of the circle's center (in deg) |
dec |
number
|
Declination of the circle's center (in deg) |
radius |
number
|
Radius of the circle (in deg) |
|
options |
MOCOptions
|
<optional>
|
Display options for the MOC |
successCallback |
function
|
<optional>
|
Callback function when the MOC loads |
errorCallback |
function
|
<optional>
|
Callback function when the MOC fails loading |
Returns:
Returns a new MOC object
-
Type
-
MOC
(static) MOCFromJSON(jsonMOC, optionsopt, successCallbackopt, errorCallbackopt) → {MOC}
- Description:
- Creates a new MOC (Multi-Order-Coverage) from a JSON-like dictionary (javascript Object)
- Source:
Example
var json = {
"3": [517],
"4": [2065,2066,2067,2112,2344,2346,2432],
"5": [8221,8257,8258,8259,8293,8304,8305,8307,8308,8452,8456,9346,9352,9354,9736],
"6": [32861,32862,32863,32881,32882,32883,32892,32893,33025,33026,33027,33157,33168,33169,33171,
33181,33224,33225,33227,33236,33240,33812,33816,33828,33832,37377,37378,37379,37382,37388,
37390,37412,37414,37420,37422,37562,38928,38930,38936,38948,38952],
"7": [131423,131439,131443,131523,131556,131557,131580,131581,132099,132612,132613,132624,132625,132627,132637,
132680,132681,132683,132709,132720,132721,132904,132905,132948,132952,132964,132968,133008,133009,133012,135252,135256,135268,135316,135320,135332,135336,148143,148152,148154,149507,149520
,149522,149523,149652,149654,149660,149662,149684,149686,149692,149694,149695,150120,150122,150208,150210,150216,150218,150240,150242,150243,155748,155752,155796,155800,155812,155816]
};
var moc = A.MOCFromJSON(json, {opacity: 0.25, color: 'magenta', lineWidth: 3});
aladin.addMOC(moc);
Parameters:
Name |
Type |
Attributes |
Description |
jsonMOC |
Object
|
|
The MOC stores as a JSON-like dictionary |
options |
MOCOptions
|
<optional>
|
Display options for the MOC |
successCallback |
function
|
<optional>
|
Callback function when the MOC loads |
errorCallback |
function
|
<optional>
|
Callback function when the MOC fails loading |
Returns:
Returns a new MOC object
-
Type
-
MOC
(static) MOCFromPolygon(polygon, optionsopt, successCallbackopt, errorCallbackopt) → {MOC}
- Description:
- Creates a new MOC (Multi-Order-Coverage) from an object describing a polygon on the sky
- Source:
Parameters:
Name |
Type |
Attributes |
Description |
polygon |
Object
|
|
A object describing a polygon in the sky
Properties
Name |
Type |
Description |
ra |
Array.<number>
|
Right-ascensions of the polygon's vertices (in deg) |
dec |
Array.<number>
|
Declination of the polygon's vertices (in deg) |
|
options |
MOCOptions
|
<optional>
|
Display options for the MOC |
successCallback |
function
|
<optional>
|
Callback function when the MOC loads |
errorCallback |
function
|
<optional>
|
Callback function when the MOC fails loading |
Returns:
Returns a new MOC object
-
Type
-
MOC
(static) MOCFromURL(url, optionsopt, successCallbackopt, errorCallbackopt) → {MOC}
- Description:
- Creates a new MOC (Multi-Order-Coverage) from an url
- Source:
Parameters:
Name |
Type |
Attributes |
Description |
url |
string
|
|
The url to the MOC (e.g. stored as FITS file) |
options |
MOCOptions
|
<optional>
|
Display options for the MOC |
successCallback |
function
|
<optional>
|
Callback function when the MOC loads |
errorCallback |
function
|
<optional>
|
Callback function when the MOC fails loading |
Returns:
Returns a new MOC object
-
Type
-
MOC
- Description:
- Returns Utils object.
This contains utilitary methods such as HEALPix basic or projection methods.
- Source:
Returns:
Returns a new box window object.
-
Type
-
AladinUtils
(static) aladin(divSelector, optionsopt) → {Aladin}
- Description:
- Creates an Aladin Lite instance within the specified HTML element.
- Source:
Example
var aladin;
A.init.then(() => {
aladin = A.aladin('#aladin-lite-div', {fullScreen: true, cooFrame: "ICRSd", showSimbadPointerControl: true, showShareControl: true, showShareControl: true, survey: 'https://alasky.cds.unistra.fr/DSS/DSSColor/', fov: 180, showContextMenu: true});
})
Parameters:
Name |
Type |
Attributes |
Description |
divSelector |
string
|
HTMLElement
|
|
The ID selector for the HTML element or the HTML element itself |
options |
AladinOptions
|
<optional>
|
Options for configuring the Aladin Lite instance. |
Returns:
An instance of the Aladin Lite library.
-
Type
-
Aladin
(static) box(options) → {Box}
- Description:
- Creates a box user interface for Aladin Lite.
- Source:
Example
let box = A.box({
header: {
title: "My window",
draggable: true,
},
// Adding a CSS class allowing you to position your window on the aladin lite view
classList: ['myBox'],
content: "This is the content of my window<br/> I can write proper html",
})
aladin.addUI(box)
Parameters:
Name |
Type |
Description |
options |
Object
|
Options for configuring the button.
Properties
Name |
Type |
Attributes |
Description |
header |
Object
|
<optional>
|
The header of the box
Properties
Name |
Type |
Attributes |
Default |
Description |
draggable |
boolean
|
<optional>
|
false
|
Can move the window by dragging its title. |
title |
string
|
<optional>
|
|
A title name for the window |
|
content |
HTMLElement
|
string
|
Widget
|
<optional>
|
The content to be added to the button. |
cssStyle |
CSSStyleSheet
|
<optional>
|
The CSS styles to apply to the button. |
position |
Object
|
string
|
<optional>
|
The position of the button. |
|
Returns:
Returns a new box window object.
-
Type
-
Box
- Description:
- Creates a user interface button for Aladin Lite
- Source:
Example
<!-- This example instanciates a customized button that when clicked, enters the user in
the polygonal selection mode. Once the polygon selection is done, the vertices are converted
to sky coords and a Multi-Order Coverage (MOC) is created from that list of sky coords. -->
<!doctype html>
<html>
<head>
</head>
<body>
<div id="aladin-lite-div" style="width: 512px; height: 512px"></div>
<script type="module">
import A from aladin-lite;
let aladin;
A.init.then(() => {
var aladin = A.aladin(
'#aladin-lite-div',
{
survey: 'P/allWISE/color', // set initial image survey
projection: 'AIT', // set a projection
fov: 1.5, // initial field of view in degrees
target: 'NGC 2175', // initial target
cooFrame: 'icrs', // set galactic frame
reticleColor: '#ff89ff', // change reticle color
reticleSize: 64, // change reticle size
showContextMenu: true,
}
);
let btn = A.button({
content: 'My button',
classList: ['myButton'],
tooltip: {cssStyle: {color: 'red'}, content: 'Create a moc in pink!', position: {direction: 'top'}},
action(o) {
aladin.select('poly', p => {
try {
let ra = []
let dec = []
for (const v of p.vertices) {
let [lon, lat] = aladin.pix2world(v.x, v.y);
ra.push(lon)
dec.push(lat)
}
let moc = A.MOCFromPolygon(
{ra, dec},
{name: 'poly', lineWidth: 3.0, color: 'pink'},
);
aladin.addMOC(moc)
} catch(_) {
alert('Selection covers a region out of the projection definition domain.');
}
})
}
});
aladin.addUI(btn)
});
</script>
<style>
.myButton {
position: absolute;
bottom: 0;
left: 0;
background-color: pink;
}
</style>
</body>
</html>
Parameters:
Name |
Type |
Description |
options |
Object
|
Options for configuring the button.
Properties
Name |
Type |
Attributes |
Default |
Description |
toggled |
boolean
|
<optional>
|
false
|
Whether the button is initially toggled. |
action |
function
|
<optional>
|
|
The callback function to execute when the button is clicked. |
title |
string
|
<optional>
|
|
The title attribute for the button. |
icon |
Object
|
<optional>
|
|
An icon object for the button. |
disable |
boolean
|
<optional>
|
false
|
Whether the button is initially disabled. |
content |
HTMLElement
|
string
|
Widget
|
<optional>
|
|
The content to be added to the button. |
cssStyle |
CSSStyleSheet
|
<optional>
|
|
The CSS styles to apply to the button. |
tooltip |
Object
|
<optional>
|
|
A tooltip. |
position |
Object
|
string
|
<optional>
|
|
The position of the button. |
size |
string
|
<optional>
|
|
The size of the button. Can be 'medium' or 'small' |
|
Returns:
Returns a new button object representing the graphic overlay.
-
Type
-
ActionButton
(static) catalog(options) → {Catalog}
- Description:
- Represents a catalog with configurable options for display and interaction.
- Source:
Parameters:
Name |
Type |
Description |
options |
CatalogOptions
|
Configuration options for the catalog. |
Returns:
-
Type
-
Catalog
(static) catalogFromNED(target, radius, optionsopt, successCallbackopt, errorCallbackopt) → {Catalog}
- Description:
- Create a catalog from a NED cone search query
- Source:
Example
A.catalogFromNED('09 55 52.4 +69 40 47', 0.1, {onClick: 'showPopup', shape: 'plus'})
Parameters:
Name |
Type |
Attributes |
Description |
target |
string
|
Object
|
|
can be either a string representing a position or an object name, or can be an object with keys 'ra' and 'dec' (values being in decimal degrees)
Properties
Name |
Type |
Description |
ra |
number
|
Right Ascenscion in degrees of the cone's center |
dec |
number
|
Declination in degrees of the cone's center |
|
radius |
number
|
|
Radius of the cone in degrees |
options |
CatalogOptions
|
<optional>
|
Additional configuration options for the catalogue. |
successCallback |
function
|
<optional>
|
The callback function to execute on successful catalog creation. |
errorCallback |
function
|
<optional>
|
The callback function to execute on error during catalog creation. |
Returns:
-
Type
-
Catalog
(static) catalogFromSKAORucio(target, radiusDegrees, optionsopt, successCallbackopt, errorCallbackopt) → {Catalog}
- Description:
- Create a catalog from a SKAORucio cone search query
- Source:
Example
A.catalogFromSKAORucio('09 55 52.4 +69 40 47', 0.1, {onClick: 'showPopup', shape: 'plus'})
Parameters:
Name |
Type |
Attributes |
Description |
target |
string
|
Object
|
|
can be either a string representing a position or an object name, or can be an object with keys 'ra' and 'dec' (values being in decimal degrees)
Properties
Name |
Type |
Description |
ra |
number
|
Right Ascenscion in degrees of the cone's center |
dec |
number
|
Declination in degrees of the cone's center |
|
radiusDegrees |
number
|
|
Radius of the cone in degrees |
options |
CatalogOptions
|
<optional>
|
Additional configuration options for the catalogue. |
successCallback |
function
|
<optional>
|
The callback function to execute on successful catalog creation. |
errorCallback |
function
|
<optional>
|
The callback function to execute on error during catalog creation. |
Returns:
-
Type
-
Catalog
(static) catalogFromSimbad(target, radius, optionsopt, successCallbackopt, errorCallbackopt) → {Catalog}
- Description:
- Create a catalog from a SIMBAD cone search query
- Source:
Example
A.catalogFromSimbad('09 55 52.4 +69 40 47', 0.1, {onClick: 'showTable', limit: 1000}, (cat) => {
aladin.addCatalog(cat)
});
Parameters:
Name |
Type |
Attributes |
Description |
target |
string
|
Object
|
|
can be either a string representing a position or an object name, or can be an object with keys 'ra' and 'dec' (values being in decimal degrees)
Properties
Name |
Type |
Description |
ra |
number
|
Right Ascenscion in degrees of the cone's center |
dec |
number
|
Declination in degrees of the cone's center |
|
radius |
number
|
|
Radius of the cone in degrees |
options |
Object
|
CatalogOptions
|
<optional>
|
Additional configuration options for SIMBAD cone search. See the SIMBAD cone search parameters.
Properties
Name |
Type |
Attributes |
Default |
Description |
limit |
number
|
<optional>
|
|
The max number of sources to return |
orderBy |
string
|
<optional>
|
'nb_ref'
|
Order the result by specific ref number |
verbosity |
number
|
<optional>
|
2
|
Verbosity, put 3 if you want all the column |
|
successCallback |
function
|
<optional>
|
The callback function to execute on successful catalog creation. |
errorCallback |
function
|
<optional>
|
The callback function to execute on error during catalog creation. |
Returns:
A new instance of the Catalog class created from the SIMBAD cone search.
-
Type
-
Catalog
(static) catalogFromSkyBot(ra, dec, radius, epoch, queryOptions, optionsopt, successCallbackopt, errorCallbackopt) → {Catalog}
- Description:
- Create a catalog from a SkyBot cone search query
- Source:
Parameters:
Name |
Type |
Attributes |
Description |
ra |
number
|
|
Right Ascenscion in degrees of the cone's center |
dec |
number
|
|
Declination in degrees of the cone's center |
radius |
number
|
|
Radius of the cone in degrees |
epoch |
string
|
|
Requested epoch, expressed in Julian day or ISO dateTime |
queryOptions |
Object
|
|
options passed to SkyBot, see https://vo.imcce.fr/webservices/skybot/?conesearch |
options |
CatalogOptions
|
<optional>
|
Additional configuration options for the catalogue. |
successCallback |
function
|
<optional>
|
The callback function to execute on successful catalog creation. |
errorCallback |
function
|
<optional>
|
The callback function to execute on error during catalog creation. |
Returns:
-
Type
-
Catalog
(static) catalogFromURL(url, optionsopt, successCallbackopt, errorCallbackopt, useProxyopt) → {Catalog}
- Description:
- Asynchronously creates a new catalog instance from the specified URL with additional options.
- Source:
Example
// Create a catalog from a URL using the A.catalogFromURL method
const catalogURL = "https://example.com/catalog";
const catalogOptions = {
name: "My Catalog",
color: "#ff0000",
sourceSize: 10,
// ... other options
};
const myCatalog = A.catalogFromURL(
catalogURL,
catalogOptions,
(catalog) => {
// Catalog successfully loaded
aladin.addCatalog(catalog)
},
(error) => {
// Error loading catalog
console.error("Error loading catalog:", error);
},
);
Parameters:
Name |
Type |
Attributes |
Default |
Description |
url |
string
|
|
|
The URL of the catalog. |
options |
CatalogOptions
|
<optional>
|
|
Additional configuration options for the catalog. |
successCallback |
function
|
<optional>
|
|
The callback function to execute on successful catalog creation. |
errorCallback |
function
|
<optional>
|
|
The callback function to execute on error during catalog creation. |
useProxy |
boolean
|
<optional>
|
false
|
Indicates whether to use a proxy for loading the catalog. |
Returns:
A new instance of the Catalog class created from the specified URL.
-
Type
-
Catalog
(static) catalogFromVizieR(vizCatId, target, radius, optionsopt, successCallbackopt, errorCallbackopt) → {Catalog}
- Description:
- Create a catalog from a SKAORucio cone search query
- Source:
Example
const cat = A.catalogFromVizieR('I/311/hip2', 'M 45', 5, {onClick: 'showTable'});
const cat2 = A.catalogFromVizieR('I/311/hip2', '12 +9', 5, {onClick: 'showTable'});
Parameters:
Name |
Type |
Attributes |
Description |
vizCatId |
string
|
|
the id of the ViZieR catalog |
target |
string
|
Object
|
|
can be either a string representing a position or an object name, or can be an object with keys 'ra' and 'dec' (values being in decimal degrees)
Properties
Name |
Type |
Description |
ra |
number
|
Right Ascenscion in degrees of the cone's center |
dec |
number
|
Declination in degrees of the cone's center |
|
radius |
number
|
|
Radius of the cone in degrees |
options |
CatalogOptions
|
<optional>
|
Additional configuration options for the catalogue. |
successCallback |
function
|
<optional>
|
The callback function to execute on successful catalog creation. |
errorCallback |
function
|
<optional>
|
The callback function to execute on error during catalog creation. |
Returns:
-
Type
-
Catalog
(static) catalogHiPS(url, options) → {ProgressiveCat}
- Description:
- Creates progressive catalog object (i.e. Simbad/Gaia)
- Source:
Example
let gaia = A.catalogHiPS('http://axel.u-strasbg.fr/HiPSCatService/I/345/gaia2', {onClick: 'showTable', color: 'orange', name: 'Gaia', filter: myFilterFunction});
aladin.addCatalog(gaia)
Parameters:
Name |
Type |
Description |
url |
string
|
Root url of the catalog |
options |
CatalogOptions
|
Options for configuring the catalogue. |
Returns:
Returns a new Overlay object representing the graphic overlay.
-
Type
-
ProgressiveCat
(static) circle(ra, dec, radiusDeg, options) → {Circle}
- Description:
- Source:
Parameters:
Name |
Type |
Description |
ra |
number
|
Right Ascension (RA) coordinate of the center in degrees. |
dec |
number
|
Declination (Dec) coordinate of the center in degrees. |
radiusDeg |
number
|
Radius in degrees. |
options |
ShapeOptions
|
Options for configuring the circle. |
Returns:
-
Type
-
Circle
(static) coo(longitude, latitude, prec) → {Coo}
- Description:
- Creates a new coo from a longitude and latitude given in degrees
- Source:
Parameters:
Name |
Type |
Description |
longitude |
number
|
longitude (decimal degrees) |
latitude |
number
|
latitude (decimal degrees) |
prec |
number
|
precision
(8: 1/1000th sec, 7: 1/100th sec, 6: 1/10th sec, 5: sec, 4: 1/10th min, 3: min, 2: 1/10th deg, 1: deg |
Returns:
Returns a new Coo object
-
Type
-
Coo
(static) ellipse(ra, dec, radiusRaDeg, radiusDecDeg, rotationDeg, options) → {Ellipse}
- Description:
- Source:
Parameters:
Name |
Type |
Description |
ra |
number
|
Right Ascension (RA) coordinate of the center in degrees. |
dec |
number
|
Declination (Dec) coordinate of the center in degrees. |
radiusRaDeg |
number
|
the radius along the ra axis in degrees |
radiusDecDeg |
number
|
the radius along the dec axis in degrees |
rotationDeg |
number
|
the rotation angle in degrees |
options |
ShapeOptions
|
Options for configuring the ellipse. |
Returns:
-
Type
-
Ellipse
- Description:
- Creates a new footprint from an array of polygons and optionally a source
- Source:
Parameters:
Name |
Type |
Attributes |
Description |
shapes |
Array.<Circle>
|
Array.<Polyline>
|
Array.<Ellipse>
|
Array.<Vector>
|
|
an array of A.polygon objects |
source |
Source
|
<optional>
|
a A.source object associated with the footprint |
Returns:
Returns a new Footprint object
-
Type
-
Footprint
- Description:
- Parse shapes from a STC-S string
- Source:
Parameters:
Name |
Type |
Attributes |
Description |
stcs |
string
|
|
The STC-S string describing the shapes |
options |
ShapeOptions
|
<optional>
|
Options for the shape |
Returns:
Returns a list of shapes from the STC-S string
-
Type
-
Array.<(Polyline|Circle)>
(static) graphicOverlay(options) → {Overlay}
- Description:
- Creates a graphic overlay on the Aladin Lite view.
- Source:
Example
var overlay = A.graphicOverlay({ color: '#ee2345', lineWidth: 3, lineDash: [2, 4]});
Parameters:
Name |
Type |
Description |
options |
Object
|
Options for configuring the graphic overlay.
Properties
Name |
Type |
Attributes |
Description |
color |
string
|
<optional>
|
The color of the graphic overlay. |
lineWidth |
number
|
<optional>
|
The width of the lines in the graphic overlay. |
lineDash |
Array
|
<optional>
|
The dash pattern for the lines in the graphic overlay. |
|
Returns:
Returns a new Overlay object representing the graphic overlay.
-
Type
-
Overlay
(static) image(url, optionsopt) → {Image}
- Description:
- Creates a celestial source object with the given coordinates.
- Source:
Example
aladin.setOverlayImageLayer(A.image(
"https://nova.astrometry.net/image/25038473?filename=M61.jpg",
{
name: "M61",
imgFormat: 'jpeg',
wcs: {
NAXIS: 0, // Minimal header
CTYPE1: 'RA---TAN', // TAN (gnomic) projection
CTYPE2: 'DEC--TAN', // TAN (gnomic) projection
EQUINOX: 2000.0, // Equatorial coordinates definition (yr)
LONPOLE: 180.0, // no comment
LATPOLE: 0.0, // no comment
CRVAL1: 185.445488837, // RA of reference point
CRVAL2: 4.47896032431, // DEC of reference point
CRPIX1: 588.995094299, // X reference pixel
CRPIX2: 308.307905197, // Y reference pixel
CUNIT1: 'deg', // X pixel scale units
CUNIT2: 'deg', // Y pixel scale units
CD1_1: -0.000223666022989, // Transformation matrix
CD1_2: 0.000296578064584, // no comment
CD2_1: -0.000296427555509, // no comment
CD2_2: -0.000223774308964, // no comment
NAXIS1: 1080, // Image width, in pixels.
NAXIS2: 705 // Image height, in pixels.
},
successCallback: (ra, dec, fov, image) => {
aladin.gotoRaDec(ra, dec);
aladin.setFoV(fov * 5)
}
},
));
Parameters:
Name |
Type |
Attributes |
Description |
url |
string
|
|
Options describing the fits file. An url is mandatory |
options |
ImageOptions
|
<optional>
|
Options describing the fits file. An url is mandatory |
Returns:
- A HiPS image object
-
Type
-
Image
(static) imageHiPS()
- Source:
- Deprecated:
- Old method name, use
A.HiPS
instead.
(async, static) init() → {Promise.<void>}
- Description:
- Initializes the Aladin Lite library, checking for WebGL2 support.
This method must be called before instancing an Aladin Lite object.
- Source:
Example
// Usage example:
A.init
.then(async () => {
const aladinInstance = A.aladin('div', requestedOptions);
// Perform further actions with the Aladin Lite instance
})
.catch(error => {
console.error('Error initializing Aladin Lite:', error);
});
Throws:
-
Throws an error if WebGL2 is not supported by the browser.
-
-
Type
-
string
Returns:
A promise that resolves once the initialization is complete.
-
Type
-
Promise.<void>
(static) marker(ra, dec, optionsopt, dataopt) → {Source}
- Description:
- Creates a marker at the specified celestial coordinates.
- Source:
Example
const markerObj = A.marker(180.0, 30.0, data, options);
Parameters:
Name |
Type |
Attributes |
Description |
ra |
number
|
|
Right Ascension (RA) coordinate in degrees. |
dec |
number
|
|
Declination (Dec) coordinate in degrees. |
options |
MarkerOptions
|
<optional>
|
Options for configuring the marker. |
data |
Object
|
<optional>
|
Additional data associated with the marker. |
Returns:
A marker source object.
-
Type
-
Source
(static) polygon(radecArray, options) → {Polyline}
- Description:
- Creates a polygon object using an array of celestial coordinates (RA, Dec).
- Source:
Parameters:
Name |
Type |
Description |
radecArray |
Array.<Array.<number>>
|
right-ascension/declination 2-tuple array describing the polyline's vertices in degrees |
options |
ShapeOptions
|
Options for configuring the polygon |
Throws:
-
Throws an error if the number of vertices is less than 3.
-
-
Type
-
string
Returns:
-
Type
-
Polyline
(static) polyline(radecArray, options) → {Polyline}
- Description:
- Source:
Parameters:
Name |
Type |
Description |
radecArray |
Array.<Array.<number>>
|
right-ascension/declination 2-tuple array describing the polyline's vertices in degrees |
options |
ShapeOptions
|
Options for configuring the polyline. |
Returns:
-
Type
-
Polyline
(static) source(ra, dec, dataopt, optionsopt) → {Source}
- Description:
- Creates a celestial source object with the given coordinates.
- Source:
Example
const sourceObj = A.source(180.0, 30.0, data, options);
Parameters:
Name |
Type |
Attributes |
Description |
ra |
number
|
|
Right Ascension (RA) coordinate in degrees. |
dec |
number
|
|
Declination (Dec) coordinate in degrees. |
data |
Object
|
<optional>
|
Additional data associated with the source. |
options |
SourceOptions
|
<optional>
|
Options for configuring the source object. |
Returns:
A celestial source object.
-
Type
-
Source
(static) vector(ra1, dec1, ra2, dec2, options) → {Vector}
- Description:
- Source:
Parameters:
Name |
Type |
Description |
ra1 |
number
|
Right Ascension (RA) coordinate of the center in degrees. |
dec1 |
number
|
Declination (Dec) coordinate of the center in degrees. |
ra2 |
number
|
Right Ascension (RA) coordinate of the center in degrees. |
dec2 |
number
|
Declination (Dec) coordinate of the center in degrees. |
options |
ShapeOptions
|
Options for configuring the vector. |
Returns:
-
Type
-
Vector