High-level API.
- Source:
Namespaces
- action
- Actions and action dispatchers.
- ApiViewer
- The interface to remotely communicate to the firefly viewer.
- ui
- React components.
- util
- Utilities.
Methods
-
<static> exports.getViewer( [channel] [, file] [, scriptUrl])
wrapper function to return the API's remote Viewer object.
-
wrapper function to return the API's remote Viewer object. This allow one firefly app to gain access to another app's API. To use this function, it should be loaded first. @see loadRemoteApi It cannot be implemented as async because the common use case for getViewer is to launch a new Tab/Window. This will be blocked by browser's popup blocker if it's done asynchronously.
Parameters:
Name Type Argument Description channelString <optional>
the channel id string, default to current connected channel.
fileString <optional>
url path, or the html file to load. Defaults to blank(index of the app).
scriptUrlString <optional>
url of the script to load. When scriptUrl is not given, return the Viewer of the loaded app.
- Source:
Returns:
the API's Viewer interface @link{firefly.ApiViewer}
- Type
- Object
-
<static> setRootPath(rootUrlPath)
Sets the root path for any relative URL. If this method has not been called then relative URLs use the page's root.
-
Parameters:
Name Type Description rootUrlPathstring - Source:
-
<static> showChart(targetDiv, parameters)
The general function to plot a Plotly chart.
-
Parameters:
Name Type Description targetDivstring | HTMLDivElement div to put the chart in.
parametersobject Properties
Name Type Description dataarray.object plotly data array (possibly with firefly extensions)
layoutobject plotly layout object (possibly with firefly extensions)
noChartToolbarboolean set true for non-interactive chart with no toolbar
- Source:
-
<static> showCoverage(div, options)
-
Parameters:
Name Type Description divstring | HTMLDivElement targetDiv to put the coverage in.
optionsCoverageOptions an object literal containing a list of the coverage options
- Source:
Example
firefly.showCoverage('myDiv', {gridOn: true}) -
<static> showHiPS(targetDiv, request [, hipsImageConversion], userCanDelete)
The plotting function to display a HiPS
-
Parameters:
Name Type Argument Description targetDivString | HTMLDivElement to put the image in.
requestWebPlotParams | WebPlotRequest a request object with Type=='HiPS' used to display a HiPS
hipsImageConversionHipsImageConversionSettings <optional>
if defined, use these parameter to convert between image and HiPS
userCanDeleteboolean User can delete the image
- Source:
Example
firefly.showHiPS('hipsDIV1', { plotId : 'aHipsID1-1', WorldPt : '148.892;69.0654;EQ_J2000', title : 'A HiPS', hipsRootUrl: 'CDS/P/SDSS9/color' }, { imageRequestRoot: { Service : 'WISE', Title : 'Wise', SurveyKey: '3a', SurveyKeyBand: '2' }, fovDegFallOver: .5 }; ); -
<static> showHistogram(targetDiv, parameters)
The general plotting function to plot Histogram.
-
Parameters:
Name Type Description targetDivstring | HTMLDivElement div to put the chart in.
parametersHistogramOptions object literal with the chart parameters
- Deprecated:
-
- Yes
- Source:
Example
firefly.showHistogram
-
<static> showImage(targetDiv, request [, hipsImageConversion], userCanDelete)
The general plotting function to plot a FITS image.
-
Parameters:
Name Type Argument Description targetDivString | HTMLDivElement to put the image in.
requestWebPlotParams | WebPlotRequest a request object with the plotting parameters
hipsImageConversionHipsImageConversionSettings <optional>
if defined, use these parameter to convert between image and HiPS
userCanDeleteboolean User can delete the image
- Source:
Example
firefly.showImage('myPlot', {Type: 'SERVICE', plotId: 'myImage', plotGroupId: 'myGroup', Service: 'WISE' Title: 'Wise' GridOn: true, SurveyKey: 'Atlas' SurveyKeyBand: '2' WorldPt: '10.68479;41.26906;EQ_J2000', SizeInDeg: '.12'}); -
<static> showImageOrHiPS(targetDiv, hipsRequest, imageRequest, fovDegFallOver, allSkyRequest, plotAllSkyFirst)
The plotting function to display a HiPS or an image
-
Parameters:
Name Type Description targetDivString | HTMLDivElement to put the image in.
hipsRequestWebPlotParams | WebPlotRequest a request object used to display a HiPS
imageRequestWebPlotParams | WebPlotRequest a request object used to display an image
fovDegFallOvernumber the field of view size to determine when to move between a HiPS and an image
allSkyRequestWebPlotParams | WebPlotRequest a request object used to display allsky image.
plotAllSkyFirstboolean if plot allsky first
- Source:
Example
firefly.showImageOrHiPS('hipsDiv6', { plotId: 'aHipsID6', title : 'A HiPS - 0.2', hipsRootUrl: 'http://alasky.u-strasbg.fr/AllWISE/RGB-W4-W2-W1', SizeInDeg:.2 }, { Service: 'WISE', Title: 'Wise', SurveyKey: '3a', SurveyKeyBand: '2', WorldPt: '148.892;69.0654;EQ_J2000' }, 0.5 ); -
<static> showTable(targetDiv, request, options)
-
Parameters:
Name Type Description targetDivstring | HTMLDivElement to put the table in.
requestTableRequest request object created from
optionsTblOptions table options.
- Source:
Example
var tblReq = firefly.util.table.makeIrsaCatalogRequest( 'allwise-500', 'WISE', 'allwise_p3as_psd', {position: '10.68479;41.26906;EQ_J2000', SearchMethod: 'Cone', radius: 300}, {tbl_id: 'test-tbl', META_INFO: {defaultChartDef: JSON.stringify({data: [{x: 'tables::w1mpro', y: 'tables::w2mpro', mode: 'markers'}]})} }); firefly.showTable('table-1', tblReq, {tbl_group: 'allwise'}); -
<static> showXYPlot(targetDiv, parameters)
The general plotting function to plot an XY Plot.
-
Parameters:
Name Type Description targetDivstring | HTMLDivElement div to put the chart in.
parametersXYPlotOptions object literal with the chart parameters
- Deprecated:
-
- Yes
- Source:
Example
firefly.showXYPlot('myDiv', {source: 'mySourceFile', {xCol: 'ra', yCol: 'dec'})