ESASky Javascript API - ESDC
ESASky Javascript API
All commands should be sent to the ESASky element as postMessages. For example by:
document.getElementById(esaskyFrameName).contentWindow.postMessage(command, ‘https://sky.esa.int’)
Where esaskyFrameName is the elementId where the esasky page is embedded, command is a JSON containing ‘event’ for function name and ‘content’ with all parameters
There are a number of commands that will send back response from ESASky. These will also be sent as http messages directed to the sender element of the command sent to ESASky. Unless otherwise specified this will probably be the main window for you. Add a message listener if you want to handle the data sent back as:
window.addEventListener("message",function(e){
var data = e.data;
// Code to handle the data
});
Available events described here and can be tested in the iframe on this page. Every command has a submit button which will send it to the iframe and paste it to the custom function input below the iframe. Here all responses from ESASky are also displayed:
Click on the headers to expand them
Event:
goToRaDec
Description:
Moves center of the screen to supplied ra and dec in current coordinate frame
Parameters:
ra (String, decimal degrees or sexagesimal format)
dec (String, decimal degrees or sexagesimal format)
Example:
{event:'goToRaDec', content:{ra:'10.68470',dec:'41.26875'}}
Event:
setFov
Description:
Set the horizontal Field of View in degrees
Parameters:
fov (double, in deg)
Example:
{event:'setFov', content:{fov:'3.2'}}
Event:
getFov
Description:
Get the horizontal Field of View in degrees
Example:
{event:'getFov'}
Event:
getFovShape
Description:
Get the polygon or circle that is made up by the users viewport. This is the same geometrical constraint that is used to calculate the counts.
Example:
{event:'getFovShape'}
Event:
goToTargetName
Description:
Does a search against SIMBAD to get location of targetName and sets location in view
Parameters:
targetName (String)
Example:
{event:'goToTargetName', content:{targetName:'Carina Nebula'}}
Event:
getCenter
Parameters:
cooFrame (String)(Optional) - Should be "J2000" or "GALACTIC", defaults to "J2000"
Parameters:
values.ra (Double) - Right ascension (lon) of the center in decimal degrees
values.dec (Double) - Declination (lat) of the center in decimal degrees
values.fov (Double) - Field of view in horizontal (lat) direction in decimal degrees
Example:
{event:'getCenter', content:{cooFrame:'J2000'}}
Event:
setCooFrame
Description:
Set the coordinate frame
Parameters:
cooFrame (String) - J2000 or galactic
Example:
{event:'setCooFrame', content:{cooFrame: "galactic"}}
Event:
clickExploreButton
Description:
Explore a random target
Example:
Event:
showCoordinateGrid
Description:
Enables or disables the coordinate grid overlay
Parameters:
show (Boolean) shows for true, hides for false
Example:
{event:'showCoordinateGrid', content:{show:true}}
Event:
getAvailableHips
Parameters:
wavelength (String)(Optional) - Wavelength in capital e.g. "OPTICAL". Defaults to empty.
Parameters:
values(JSON (Dictionary) - If wavelength is empty this is a dictionary of wavelengths otherwise this is a dictionary with available HiPS in that wavelength
Example:
{event:'getAvailableHips', content:{wavelength:'OPTICAL'}}
Event:
changeHips
Description:
Change HiPS programmatically by using a HiPS present in ESASky
Parameters:
hipsName (String)
Parameters:
extras (Dictionary) - Empty if success
extras.message (String) - Not existing if success otherwise error message
Example:
{event:'changeHips', content:{hipsName:'AllWISE color'}}
Event:
addHips
Description:
Add a HiPS programmatically to the sky panel list
Parameters:
hipsName (String)
Parameters:
extras (Dictionary) - Empty if success
extras.message (String) - Not existing if success, otherwise error message
Example:
{event:'addHips', content:{hipsName:'DSS2 color'}}
Event:
changeHipsWithParams
Description:
Change HiPS programmatically by using a new HiPS not present in ESASky
Parameters:
hips.id (String)
hips.name (String)
hips.url (String)
hips.cooframe (String)
hips.maxnorder (Int)
hips.imgformat (String)
Example:
{event:'changeHipsWithParams', content:{'hips': {'name': 'Chandra', 'id': 'Chandra', 'url': 'https://cdaftp.cfa.harvard.edu/cxc-hips', 'cooframe': 'J2000', 'maxnorder': '11', 'imgformat': 'png'}}}
Event:
addHipsWithParams
Description:
Add a HiPS programmatically to the sky panel list by using a new HiPS not present in ESASky
Parameters:
hips.id (String)
hips.name (String)
hips.url (String)
hips.cooframe (String)
hips.maxnorder (Int)
hips.imgformat (String)
Example:
{event:'addHipsWithParams', content:{'hips': {'name': 'Gaia Density map', 'id': 'GAIA_DR3_DENSITY', 'url': 'https://alasky.cds.unistra.fr/ancillary/GaiaDR3/density-map', 'cooframe': 'J2000', 'maxnorder': '7', 'imgformat': 'jpeg'}}}
Event:
setHipsColorPalette
Description:
Changing color palette
Parameters:
colorPalette (String)
Example:
{event:'setHipsColorPalette', content:{colorPalette:'PLANCK'}}
Event:
removeHips
Description:
Removes the hips in the sky panel list at described index with first starting at 0. Entering -1 will remove all except for the first row.
Parameters:
index (Integer)
Parameters:
extras (Dictionary) - Empty if success
extras.message (String) - Not existing if success otherwise error message
Example:
{event:'removeHips', content:{index:0}}
Event:
openSkyPanel
Description:
Opens the sky panel with all hips shown
Example:
{event:'openSkyPanel'}
Event:
closeSkyPanel
Description:
Closes the sky panel
Example:
{event:'closeSkyPanel'}
Event:
setHipsSliderValue
Description:
Sets the hips slider to specified value. 0.0 for first in skypanel list 1.0 for second etc. For everything in between a interpolation of the 2 nearby HiPS will be shown
Parameters:
value (Double)
Example:
{event:'setHipsSliderValue', content:{value:0.5}}
Event:
getNumberOfSkyRows
Parameters:
values (Integer)
Example:
{event:'getNumberOfSkyRows'}
Event:
selectShape
Description:
Selects a shape (catalogue source or footprint)
Parameters:
overlayName (String) - Name of the overlaySet where we want to select a shape
shapeName (String) - Name of the shape (typical observation id). See overlayCatalogueFootprint or response from shapeSelectionEvent
Example:
{event: 'selectShape', content:{overlayName:'test footprints', shapeName:'test footprint1'}}
Event:
deselectShape
Description:
Deselects a shape (catalogue source or footprint)
Parameters:
overlayName (String) - Name of the overlaySet where we want to select a shape
shapeName (String) - Name of the shape (typical observation id. See overlayCatalogueFootprint or response from shapeSelectionEvent
Example:
{event: 'deselectShape', content:{overlayName:'test footprints', shapeName:'test footprint1'}}
Event:
deselectAllShapes
Description:
Deselects all shapes selected (catalogue source or footprint)
Example:
{event: 'deselectAllShapes'}
Event:
overlayCatalogue
Description:
Overlay a catalogue
Parameters:
overlaySet (String)
overlaySet.type (String)
overlaySet.overlayName (String)
overlaySet.cooframe (String)
overlaySet.color (String)
overlaySet.lineWidth (Int)
overlaySet.skyObjectList (List)
overlaySet.skyObjectList.name (String)
overlaySet.skyObjectList.id (Int)
overlaySet.skyObjectList.ra (String)
overlaySet.skyObjectList.dec (String)
Example:
{event: 'overlayCatalogue', content:{'overlaySet': {'type': 'SourceListOverlay', 'overlayName': 'test catalogue name', 'cooframe': 'J2000', 'color': '#ee2345', 'lineWidth': 10, 'skyObjectList': [{'name': 'source name A', 'id': 1, 'ra': '150.44963', 'dec': '2.24640'}]}}}
Event:
overlayCatalogueWithDetails
Description:
Overlay a catalogue with data
Parameters:
overlaySet (String)
overlaySet.type (String)
overlaySet.overlayName (String)
overlaySet.cooframe (String)
overlaySet.color (String)
overlaySet.lineWidth (Int)
overlaySet.skyObjectList (List)
overlaySet.skyObjectList.name (String)
overlaySet.skyObjectList.id (Int)
overlaySet.skyObjectList.ra (String)
overlaySet.skyObjectList.dec (String)
overlaySet.skyObjectList.data (List)
overlaySet.skyObjectList.data.name (String)
overlaySet.skyObjectList.data.type (String)
overlaySet.skyObjectList.data.value (type)
Example:
{event:'overlayCatalogueWithDetails', content:{'overlaySet': {'type': 'SourceListOverlay', 'overlayName': 'test catalogue name', 'cooframe': 'J2000', 'color': '#ee2345', 'lineWidth': 10, 'skyObjectList': [{'name': 'source name A', 'id': 1, 'ra': '150.44963', 'dec': '2.24640', 'data': [{'name': 'Flux 1', 'value': '10.5', 'type': 'STRING'}]}]}}}
Event:
deleteCatalogue
Description:
Remove an existing catalogue
Parameters:
overlayName (String)
Example:
{event: 'deleteCatalogue', content:{ 'overlayName': 'test catalogue name'}}
Event:
clearCatalogue
Description:
Clear an existing catalogue
Parameters:
overlayName (String)
Example:
{event: 'clearCatalogue', content:{'overlayName': 'test catalogue name'}}
Event:
overlayFootprints
Description:
Overlay a list of footprints
Parameters:
overlaySet (String)
overlaySet.type (String)
overlaySet.overlayName (String)
overlaySet.cooframe (String)
overlaySet.color (String)
overlaySet.lineWidth (Int)
overlaySet.skyObjectList (List)
overlaySet.skyObjectList.name (String)
overlaySet.skyObjectList.id (Int)
overlaySet.skyObjectList.stcs (stcs)
Example:
{event: 'overlayFootprints', content:{'overlaySet': {'type': 'FootprintListOverlay', 'overlayName': 'test footprints', 'cooframe': 'J2000', 'color': 'red', 'lineWidth': 5, 'skyObjectList': [{'name': 'test footprint1', 'id': 1, 'stcs': 'Polygon J2000 187.33912535049 -62.6616054228651 187.343512531474 -62.7116786437002 187.235239903703 -62.7136263115712 187.231036216914 -62.6635488923945', 'ra_deg': '187.287228500645', 'dec_deg': '-62.6876148176328'}]}}}
Event:
overlayFootprintsWithDetails
Description:
Overlay a list of footprints with data
Parameters:
overlaySet (JSON)
overlaySet.type (String)
overlaySet.overlayName (String)
overlaySet.cooframe (String)
overlaySet.color (String)
overlaySet.lineWidth (Int)
overlaySet.skyObjectList (List)
overlaySet.skyObjectList.name (String)
overlaySet.skyObjectList.id (Int)
overlaySet.skyObjectList.stcs (stcs)
overlaySet.skyObjectList.data (List)
overlaySet.skyObjectList.data.name (String)
overlaySet.skyObjectList.data.type (String)
overlaySet.skyObjectList.data.value (type)
Example:
{event: 'overlayFootprintsWithDetails', content:{'overlaySet': {'type': 'FootprintListOverlay', 'overlayName': 'test footprints', 'cooframe': 'J2000', 'color': 'red', 'lineWidth': 5, 'skyObjectList': [{'name': 'test footprint1', 'id': 1, 'stcs': 'Polygon J2000 187.33912535049 -62.6616054228651 187.343512531474 -62.7116786437002 187.235239903703 -62.7136263115712 187.231036216914 -62.6635488923945', 'ra_deg': '187.287228500645', 'dec_deg': '-62.6876148176328', 'data': [{'name': 'wid', 'value': '0.0562381572800632', 'type': 'STRING'}, {'name': 'hei', 'value': '0.0260104443530693', 'type': 'STRING'}, {'name': 'score', 'value': '0.99999988079071', 'type': 'STRING'}]}]}}}
Event:
deleteFootprintsOverlay
Description:
Remove an existing catalogue
Parameters:
overlayName (String)
Example:
{event: 'deleteFootprintsOverlay', content:{'overlayName': 'test catalogue name'}}
Event:
clearFootprintsOverlay
Description:
Clear an existing catalogue
Parameters:
catalogueName (String)
Example:
{event: 'clearFootprintsOverlay', content:{'overlayName': 'test catalogue name'}}
Event:
getActiveOverlays
Description:
Returns all overlays (catalogues/footprints) currently active on the sky
Parameters:
values.overlays (List) - List of ids of the currently active overlays
Example:
{event:'getActiveOverlays'}
Event:
setOverlayColor
Description:
Changes the line/object color of all objects in the overlay to the selected color
Parameters:
overlayName (String) - OverlayName/Id of the overlay to update
color (String) - Color as 'blue', 'red' etc or RGB code '#4567BB'
Example:
{event:'setOverlayColor', content:{overlayName:'MyOverlay', color:'red'}}
Event:
setOverlaySize
Description:
Changes the line/object color of all objects in the overlay to the selected color
Parameters:
overlayName (String) - OverlayName/Id of the overlay to update
size (Double) - Changes the line/shape size of displayed objects. Values from 0.0-1.0
Example:
{event:'setOverlaySize', content:{overlayName:'MyOverlay', size:0.85}}
Event:
setOverlayShape
Description:
Changes the object shape of all objects in the overlay to the selected color
Parameters:
overlayName (String) - OverlayName/Id of the overlay to update
shape (Double) - Changes the shape type displayed shapes. Returns available input values on erroneous input
Example:
{event:'setOverlayShape', content:{overlayName:'MyOverlay', shape:'plus'}}
Event:
removeOverlay
Description:
Removes the overlay
Parameters:
overlayName (String) - OverlayName/Id of the overlay to remove
Example:
{event:'removeOverlay', content:{overlayName:'MyOverlay'}}
Event:
removeAllOverlays
Description:
Removes all overlays
Example:
{event:'removeAllOverlays'}
Event:
showResultPanel
Description:
Opens the datapanel
Example:
{event:'showResultPanel'}
Event:
hideResultPanel
Description:
Minimizes the datapanel
Example:
{event:'hideResultPanel'}
Event:
closeResultPanelTab
Description:
Closes the result panel tab at index, starting with 0. -1 closes the current active tab.
Parameters:
index (Integer)
Example:
{event:'closeResultPanelTab', content:{index: -1}}
Event:
closeResultPanelTabById
Description:
Closes the result panel tab with the id.
Parameters:
index (Integer)
Example:
{event:'closeResultPanelTabById', content:{id: myTapId}}
Event:
closeAllResultPanelTabs
Description:
Closes all result panel tabs
Example:
{event:'closeAllResultPanelTabs'}
Event:
getResultPanelData
Description:
Closes all result panel tabs
Parameters:
values (Dictionary) - All data in the currently active result panel tab
Example:
{event:'getResultPanelData'}
Event:
plotObservations
Description:
Plot available image observation footprints in ESASky for the currently shown area for the given missionID
Parameters:
missionId (String)
Parameters:
extras (Dictionary) - Empty if success
extras.message (String) - Not existing if success otherwise error message
Example:
{event:'plotObservations', content:{missionId: 'HST-UV'}}
Event:
plotCatalogues
Description:
Plot available catalogue data in ESASky for the currently shown area for the given missionID
Parameters:
missionId (String)
Parameters:
extras (Dictionary) - Empty if succes
extras.message (String) - Not existing if success otherwise error message
Example:
{event:'plotCatalogues', content:{missionId: 'GAIA DR2'}}
Event:
plotSpectra
Description:
Plot available spectra footprints in ESASky for the currently shown area for the given missionID
Parameters:
missionId (String)
Parameters:
extras (Dictionary) - Empty if success
extras.message (String) - Not existing if success otherwise error message
Example:
{event:'plotSpectra', content:{missionId: 'IUE'}}
Event:
getAvailableTapServices
Description:
Lists the available TAP services in ESASky
Parameters:
List with the available TAP Services
Example:
{event:'getAvailableTapServices'}
Event:
getTapServiceCount
Description:
Get list of missions in a TAP Service within the current FoV
Parameters:
tapService (String) - The name of the tapService to get available data from
Parameters:
List with missions with data in the tapService within the current FoV
Example:
{event:'getTapServiceCount', content:{'tapService':'ESO'}}
Event:
plotTapService
Description:
Plots data from the mission in the TAP Service
Parameters:
tapService (String) - The mission from the tapService to get data from (See getTapServiceCount for available missions in the current view)
Example:
{event:'plotTapService', content:{'tapService':'ESO-Spectrum-MPGESO-2.2'}}
Event:
plotTapServiceWithDetails
Description:
Plot available image observation footprints in ESASky for he currently shown area for the given missionID
Parameters:
name (String) - Will overwrite any existing dataPanel with the same name
tapUrl (String)
color (String) - Sets the color, use 'blue' or RGB format (e.g. '#FF008A')
raColumn (String) - Which column on the TAP side to use as ra
decColumn (String) - Which column on the TAP side to use as dec
STCSColumn (String) - Which column on the TAP side to use for displaying footprints
intersectColumn (String) - Which column on the TAP side to use to intersect the current screen against if dataOnlyInView is true
dataOnlyInView (Boolean) - If true will add a where clause to the adql to limit the data loaded. Parameter intersectColumn or ra and dec columns need to be set
adql (String) - ADQL used for the TAP query
Example:
{event:'plotTapServiceWithDetails', content:{'name':'myTAP2',color:'#FF00FF', dataOnlyInView: true, tapUrl:'https://gea.esac.esa.int/tap-server/tap', raColumn:'ra', decColumn:'dec', adql:'SELECT TOP 100 * from gaiadr3.gaia_source'}}
Event:
getObservationCount
Parameters:
List of available observations in ESASky with associated counts in the visible sky area
Example:
{event: 'getObservationsCount'}
Event:
getCataloguesCount
Parameters:
List of available catalogues in ESASky with associated counts in the visible sky area
Example:
{event: 'getCataloguesCount'}
Event:
getSpectraCount
Parameters:
List of available spectra in ESASky with associated counts in the visible sky area
Example:
{event: 'getSpectraCount'}
Event:
getPublicationsCount
Parameters:
Number of publications in the visible sky area
Example:
{event: 'getPublicationsCount'}
Event:
addJwst
Description:
Opens the JWST planning tool and adds at center of screen
Parameters:
instrument (String)
detector (String)
showAllInstruments (boolean)
Example:
{event: 'addJwst', content:{'instrument': 'NIRSpec', 'detector': 'NRS_FULL_MSA', 'showAllInstruments': false}}
Event:
addJwstWithCoordinates
Description:
Opens the JWST planning tool and adds at supplied coordinates
Parameters:
instrument (String)
detector (String)
showAllInstruments (boolean)
ra (String, in degrees)
dec (String, in degrees)
rotation (String, in degrees)
Example:
{event: 'addJwstWithCoordinates', content:{'instrument': 'NIRISS', 'detector': 'NIS_CEN', 'showAllInstruments': true, 'ra': '210', 'dec': '12', 'rotation': '90'}}
Event:
closeJwstPanel
Description:
Closes the JWST planning tool
Example:
{event: 'closeJwstPanel'}
Event:
openJwstPanel
Description:
Opens the JWST planning tool
Example:
{event: 'openJwstPanel'}
Event:
clearJwstAll
Description:
Clear all
Example:
{event: 'clearJwstAll'}
Event:
openExtTapPanel
Description:
Open the External Data Centres Panel. If tab is specified it will open that one. Otherwise it will open on the first tab (Dashboard)
Parameters:
tab (String) - (Optional) The name of the tab to be opened - case-insensitive
Example:
{event:'openExtTapPanel', content:{tab: 'Tap Registry'}}
Event:
closeExtTapPanel
Description:
Close the External Data Centres Panel
Example:
{event:'closeExtTapPanel'}
Event:
addMOC
Description:
Adds a MOC ( HEALPix Multi-Order Coverage map) on the sky
Parameters:
name (String) - Name of the MOC (will overwrite existing MOC with same name)
options.color (String) - Sets the color, use 'blue' or RGB format (e.g. '#FF008A')
options.opacity (Float) - Opacity of the MOC in range 0.0
options.lineStyle (String) (optional) - Sets the linestyle of the borders in case only the borders are shown. Possible parameters are "solid" and "dashed"
options.mode (String) (optional) - Choose to display in "healpix" or "q3c" system. Default is healpix
options.addTab (Boolean) (optional) - Adds a resultspanel tab to control style on true. Default is false
mocData (Javascript Object) - Object where the keys are the orders and the values are lists of pixels in the order
Example:
{event:'addMOC', content:{name:'myMOC',options:{color:'#FF00FF',lineStyle:'dashed',opacity:.5, mode:'healpix', addTab:true}, mocData:{8:[0,1,2,3,4,5], 6:[165]}}}
Event:
removeMOC
Description:
Removes a MOC ( HEALPix Multi-Order Coverage map) from the sky
Parameters:
name (String) - Name of the MOC (if it has already been added) MOC added without name will be "MOC"
Example:
{event:'removeMOC', content:{name:'myMOC'}}
Event:
addCustomTreeMap
Description:
Adds a custom treeMap button to ESASky and starts listening for clicks on the missions inside it and send events
Parameters:
treeMap.name (String) - The nameID that will be used in any callbacks
treeMap.description (String) (Optional) - description that will be shown when hovering on the button
treeMap.iconText (String) (Optional) - Text showing on the button, will default to name if not specified
treeMap.missions (List) - List of the missions that will show up in the treemap
treeMap.missions.name (String) - Name of the mission which will be ID in callbacks
treeMap.missions.color (String) - Default color showing up in the treeMap
Events:
treemap_mission_clicked
values.action (String) - Always "treemap_mission_clicked"
values.info.treemap (String) - treemap name as specified in the parameter
values.info.mission (String) - mission name as specified in the parameter
values.location.ra (Double) - Right ascension of center of screen when button was pressed
values.location.dec (Double) - Declination of center of screen when button was pressed
values.location.fov (Double) - Field of View of screen when button was pressed
Example:
{event: 'addCustomTreeMap', content:{'treeMap':{name:'JWST', iconText:'JWST', description:'James webb imgages....', missions:[{'name':'NIRSpec','color':'blue'},{'name':'NIRCam','color':'green'}]}}}
Event:
addTreeMapMission
Description:
Adds a or multiple custom mission to a custom treeMap
Parameters:
treeMap.treeMapName (String) - The nameID of the treemap on which to add a mission
treeMap.missions (List) - List of the missions that will show up in the treemap
treeMap.missions.name (String) - Name of the mission which will be ID in callbacks
treeMap.missions.color (String) - Default color showing up in the treeMap
Example:
{event: 'addTreeMapMission', content:{'treeMap':{treeMapName:'JWST', missions:[{'name':'NIRSpec2','color':'red'}]}}}
Event:
removeTreeMapMission
Description:
Removes missions from a custom treeMap
Parameters:
treeMap.treeMapName (String) - The nameID of the treemap on which from remove a mission
treeMap.missions (List) - List of the missions that will show up in the treemap
treeMap.missions.name (String) - Name of the mission which will be ID in callbacks
Example:
{event: 'removeTreeMapMission', content:{'treeMap':{treeMapName:'JWST', missions:[{'name':'NIRSpec2', 'color':'red'}]}}}
Event:
addCustomButton
Description:
Adds a custom button and starts listening for clicks on it
Parameters:
button.name (String) - The nameID of the custom button that will be used in callbacks
button.description (String) - Description that will be shown on hover
button.iconText (String) - If no icon this text will be the icon instead
button.iconName (String) - Id of one of the existing icons in ESASky. Erroneous name will send back available ids
Events:
button_clicked
values.action (String) - Always "button_clicked"
values.values.button (String) - ID of button clicked
values.location.ra (Double) - Right ascension of center of screen when button was pressed
values.location.dec (Double) - Declination of center of screen when button was pressed
values.location.fov (Double) - Field of View of screen when button was pressed
Example:
Event:
updateCustomButton
Description:
Updates an existing custom button
Parameters:
button.name (String) - The nameID of the button to update
button.description (String) - Description that will be shown on hover
button.iconText (String) - If no icon this text will be the icon instead
button.iconName (String) - Id of one of the existing icons in ESASky. Erroneous name will send back available ids
Example:
Event:
removeCustomButton
Description:
Removes an existing custom button
Parameters:
button.name (String) - The nameID of the button to remove
Example:
Event:
setModuleVisibility
Description:
Sets visibility of the modifiable elements in ESASky.
Parameters:
modules (JSON Object) - Object on format; {key:boolean}. Erroneous id returns possible values
Example:
{event:'setModuleVisibility', content:{modules:{skies_menu:false}}}
Event:
getAvailableModules
Description:
Returns the available ids to modify with setModuleVisibility
Parameters:
values.available (List) - List of available ids
Example:
{event:'getAvailableModules'}
Event:
openGWPanel
Description:
Opens the Gravitational Wave panel
Example:
{event: 'openGWPanel'}
Event:
openNeutrinoPanel
Description:
Opens the Neutrino events panel
Example:
{event: 'openNeutrinoPanel'}
Event:
closeAlertPanel
Description:
Closes the Alert panel
Example:
{event: 'closeAlertPanel'}
Event:
minimiseAlertPanel
Description:
Minimizes the Alert panel, i.e. keeps the events shown but removes the panel from the screen
Example:
{event: 'minimiseAlertPanel'}
Event:
getGWIds
Parameters:
List of available GW ids in ESASky
Example:
{event: 'getGWIds'}
Event:
getGWEventData
Parameters:
id (String)
Parameters:
Data associated with the GW id
Example:
{event:'getGWEventData', content:{id: 'S200225q'}}
Event:
showGWEvent
Description:
Shows the chosen GW id on ESASky
Parameters:
id (String)
Example:
{event:'showGWEvent', content:{id: 'S200225q'}}
Event:
getAllGWData
Parameters:
List of available GW ids with data in ESASky
Example:
{event:'getAllGWData'}
Event:
getNeutrinoEventData
Parameters:
List of neutrino events with data in ESASky
Example:
{event:'getNeutrinoEventData}
Event:
registerEventListener
Description:
Adds a event listener which returns values of certain events
Events:
view_changed
event.action (String) - view_changed
event.values.ra (float) - Right ascension of center of screen in deg
event.values.dec (float) - Declination of center of screen in deg
event.values.fov (float) - Field of View in degld of View in deg
shape_selected
event.action (String) - Will always be "shape_selected"
event.values.overlay (String) - Overlayname to which the shape selected is attached
event.values.name (String) - Name of the shape selected
event.values.id (String) - Id of the shape selected
result_panel_opened
event.action (String) - Will always be "result_panel_opened"
event.values.id (String) - ID of the panel opened
result_panel_closed
event.action (String) - Will always be "result_panel_closed"
event.values.id (String) - ID of the panel closed
search_area_used
event.action (String) - Will always be "search_area_used" This event triggers when a user sets the search area toll to a new area
event.values.type (String) - POLYGON or CIRCLE
event.values.coordinates (List) - if type is POLYGON this will be the points that makes up the area List with 1,3,5 etc being ra and 2,4,6 etc dec
event.values.ra (Double) - Right ascension of the center of the circle if type is CIRCLE
event.values.dec (Double) - Declination of the center of the circle if type is CIRCLE
event.values.radius (Double) - Radius of the circle if type is CIRCLE
area_shape_selection
event.action (String) - Will always be "area_shape_selection". this event will trigger when a user has used the area selection tool
event.values.overlays (List) - List of overlays with entities that have been selected
event.values.overlays.name (String) - Name of entity that have been selected in this event
event.values.overlays.id (String) - ID of entity that have been selected in this event
event.values.selection_area.type (String) - BOX, POLYGON or CIRCLE
event.values.selection_area.points (List) - if type BOX is POLYGON this will be the points that makes up the area
event.values.selection_area.points.ra (Double) - Right ascension of a point
event.values.selection_area.points.dec (Double) - Declination of a point
event.values.selection_area.circle.ra (Double) - Right ascension of the center of the circle if type is CIRCLE
event.values.selection_area.circle.dec (Double) - Declination of the center of the circle if type is CIRCLE
event.values.selection_area.circle.radius (Double) - Radius of the circle if type is CIRCLE
Example:
{event: 'registerEventListener'}
Event:
registerShapeSelectionCallback
Description:
Adds a event listener which returns values whenever a shape is selected
Events:
shape_selected
event.action (String) - Will always be "shape_selected"
event.values.overlay (String) - Overlayname to which the shape selected is attached
event.values.name (String) - Name of the shape
event.values.id (String) - Id of the shape
Example:
{event: 'registerShapeSelectionCallback'}
Event:
registerFoVChangedListener
Description:
Adds an event listener which returns values whenever a the field of view is changed
Events:
view_changed
event.action (String) - view_changed
event.values.ra (float) - Right ascension of center of screen in deg
event.values.dec (float) - Declination of center of screen in deg
event.values.fov (float) - Field of View in deg
Example:
{event: 'registerFoVChangedListener'}
Event:
showSearchTool
Description:
Shows the search tool panel
Example:
{event: 'showSearchTool'}
Event:
closeSearchTool
Description:
Closes the search tool panel
Example:
{event: 'closeSearchTool'}
Event:
setConeSearchArea
Description:
Sets a circle as cone search area. All counts and data retrieval will be within this area. Outside of the area will be blurred
Parameters:
ra (double) - Right Ascension of the center of the circle
dec (double) - Declination of the center of the circle
radius (double) - Radius of the circle
Example:
{event: 'setConeSearchArea', content:{ra:15.0, dec:35.4, radius:5.0}}
Event:
setPolygonSearchArea
Description:
Sets a polygon as search area. All counts and data retrieval will be within this area. Outside of the area will be blurred
Parameters:
stcs (String) - STC String of the polygon
Example:
{event: 'setPolygonSearchArea', content:{stcs:'POLYGON ICRS 3.5596 -10.9209 3.6914 -11.1109 3.6475 -11.3010 3.6035 -11.4913 3.4717 -11.6817 3.3398 -11.8722 3.1201 -11.6817 2.9004 -11.4913 2.7686 -11.3771 2.7246 -11.1869 2.5928 -10.9969 2.4609 -10.8069 2.3291 -10.6171 2.1973 -10.4274 2.0654 -10.2378 1.9336 -10.0484 1.8896 -9.8590 1.8457 -9.6697 1.7139 -9.4806 1.5820 -9.2916 1.5381 -9.1026 1.4941 -8.9138 1.4502 -8.7250 1.4062 -8.5364 1.2744 -8.3478 1.3184 -8.1594 1.1865 -7.9710 1.2305 -7.7827 1.0986 -7.5945 1.1426 -7.4064 1.0107 -7.2184 1.0547 -7.0304 0.9229 -6.8425 0.9668 -6.6547 0.8350 -6.4670 0.8789 -6.2793 0.8350 -6.0917 0.7910 -5.9042 0.8350 -5.7167 0.8789 -5.5293 0.8350 -5.3419 0.7910 -5.1546 0.8350 -4.9674 0.8789 -4.7802 0.9229 -4.5931 1.1426 -4.5556 1.3623 -4.6679 1.5820 -4.6305 1.8018 -4.8176 1.8457 -5.0048 1.8896 -5.1921 2.0215 -5.3794 2.1533 -5.5667 2.1973 -5.7542 2.3291 -5.9417 2.3730 -6.1292 2.5049 -6.3168 2.5488 -6.5045 2.5928 -6.6923 2.6367 -6.8801 2.6807 -7.0680 2.7246 -7.2560 2.8564 -7.4440 2.9883 -7.6321 2.9443 -7.8204 3.0762 -8.0087 3.1201 -8.1971 3.1641 -8.3855 3.2080 -8.5741 3.2520 -8.7628 3.2959 -8.9515 3.3398 -9.1404 3.4717 -9.3294 3.4277 -9.5184 3.4717 -9.7076 3.5156 -9.8969 3.5596 -10.0862 3.6035 -10.2757 3.5596 -10.4653 3.5156 -10.6551 3.5596 -10.8449'}}
Event:
clearSearchArea
Description:
Clears the current active search area
Example:
{event: 'clearSearchArea'}
Event:
getTargetLists
Description:
Get all available target lists
Parameters:
A list of all available target lists.
Example:
{event: 'getTargetLists'}
Event:
openTargetList
Description:
Open the target list panel. If the optional parameter "targetlist" is provided, the panel is opened with the provided target list pre-selected
Parameters:
targetList (String) (Optional) - One of the available target lists
Example:
{event: 'openTargetList', content:{targetList: 'PeculiarGalaxies'}}
Event:
closeTargetList
Description:
Close the target list panel
Example:
{event: 'closeTargetList'}
Event:
openOutreachPanel
Description:
Open the outreach panel of the available telescopes
Parameters:
telescope (String) - The name of the telescope (HST/JWST) case-insensitive
Example:
{event: 'openOutreachPanel', content: {telescope: 'JWST'}}
Event:
closeOutreachPanel
Description:
Close the outreach panel of the available telescopes
Parameters:
telescope (String) - The name of the telescope (HST/JWST) case-insensitive
Example:
{event: 'closeOutreachPanel', content: {telescope: 'HST'}}
Event:
getOutreachImageIds
Description:
Get all available outreach image IDs of the available telescopes
Parameters:
telescope (String) - The name of the telescope (HST/JWST) case-insensitive
Example:
{event: 'getOutreachImageIds', content: {telescope: 'JWST'}}
Event:
getOutreachImageNames
Description:
Get all available outreach image object names for the given telescope
Parameters:
telescope (String) - The name of the telescope (HST/JWST) case-insensitive
Example:
{event: 'getOutreachImageNames', content: {telescope: 'JWST'}}
Event:
openOutreachImage
Description:
Open an outreach image of a telescope
Parameters:
telescope (String) - The name of the telescope (HST/JWST) case-insensitive
id (String) - The unique identifier of the outreach image to be opened
name (String) - The object name of the image to be opened
Example:
{event:'openOutreachImage', content:{telescope: 'HST', id:'heic2018b'}}
Event:
closeOutreachImage
Description:
Close the outreach image of a telescope
Parameters:
telescope (String) - The name of the telescope (HST/JWST) case-insensitive
Example:
{event:'closeOutreachImage', content:{telescope: 'JWST'}}
Event:
addSingleImage
Description:
Adds a single image on the sky
Parameters:
name (String) - Id of the image
url (String) - Url pointing to the image
ra (Double) - Right ascension of the center of the image
dec (Double) - Declination of the center of the image
fov (Double) - Field of View of the image width in degrees
rotation (Double) - Rotation of the image
Example:
{event:'addSingleImage', 'content':{name:'MyImage', url:'https://cdn.eso.org/images/screen/eso1740a.jpg', ra:272.5123750, dec:-24.0248889, rot:90.0, fov:1.0471666666666666666666666666667}}
Event:
addTiledImage
Description:
Adds a tiled image on the sky
Parameters:
name (String) - Id of the image
url (String) - Url pointing to the image
ra (Double) - Right ascension of the center of the image
dec (Double) - Declination of the center of the image
fov (Double) - Field of View of the image width in degrees
rotation (Double) - Rotation of the image
Example:
{event:'addTiledImage', content:{name:'MyImage', url:'https://cdn.eso.org/images/zoomable/eso0907a/', ra:337.4107083, dec:-20.8237005, rot:-0.1, fov:0.467, width:7059, height:6535}}
Event:
playerPlay
Description:
Start the currently active player
Example:
{event: 'playerPlay'}
Event:
playerPause
Description:
Pause the currently active player
Example:
{event: 'playerPause'}
Event:
playerNext
Description:
Go to the next entry in the player queue
Example:
{event: 'playerNext'}
Event:
playerPrevious
Description:
Go to the previous entry in the player queue
Example:
{event: 'playerPrevious'}
Event:
saveState
Description:
Save the current state of the application. The state can be restored later.
Example:
{event: 'saveState'}
Event:
restoreState
Description:
Restore a saved state.
Parameters:
state (String) - A JSON string defining a state.
Example:
{event: 'restoreState', content: {state:{"location":{"ra":"65.50637741584342", "dec":"19.52653625483832", "fov":"0.5879454759609269", "coo_frame":"J2000"}}} }
Event:
login
Description:
Login to the ESASky user area.
Example:
{event: 'login'}
Event:
logout
Description:
Logout of the ESASky user area
Example:
{event: 'logout'}
Output window