Namespace: firefly

firefly

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
channel String <optional>

the channel id string, default to current connected channel.

file String <optional>

url path, or the html file to load. Defaults to blank(index of the app).

scriptUrl String <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
rootUrlPath string
Source:

<static> showChart(targetDiv, parameters)

The general function to plot a Plotly chart.

Parameters:
Name Type Description
targetDiv string | HTMLDivElement

div to put the chart in.

parameters object
Properties
Name Type Description
data array.object

plotly data array (possibly with firefly extensions)

layout object

plotly layout object (possibly with firefly extensions)

noChartToolbar boolean

set true for non-interactive chart with no toolbar

Source:

<static> showCoverage(div, options)

Parameters:
Name Type Description
div string | HTMLDivElement

targetDiv to put the coverage in.

options CoverageOptions

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
targetDiv String | HTMLDivElement

to put the image in.

request WebPlotParams | WebPlotRequest

a request object with Type=='HiPS' used to display a HiPS

hipsImageConversion HipsImageConversionSettings <optional>

if defined, use these parameter to convert between image and HiPS

userCanDelete boolean

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
targetDiv string | HTMLDivElement

div to put the chart in.

parameters HistogramOptions

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
targetDiv String | HTMLDivElement

to put the image in.

request WebPlotParams | WebPlotRequest

a request object with the plotting parameters

hipsImageConversion HipsImageConversionSettings <optional>

if defined, use these parameter to convert between image and HiPS

userCanDelete boolean

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
targetDiv String | HTMLDivElement

to put the image in.

hipsRequest WebPlotParams | WebPlotRequest

a request object used to display a HiPS

imageRequest WebPlotParams | WebPlotRequest

a request object used to display an image

fovDegFallOver number

the field of view size to determine when to move between a HiPS and an image

allSkyRequest WebPlotParams | WebPlotRequest

a request object used to display allsky image.

plotAllSkyFirst boolean

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
targetDiv string | HTMLDivElement

to put the table in.

request TableRequest

request object created from

options TblOptions

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
targetDiv string | HTMLDivElement

div to put the chart in.

parameters XYPlotOptions

object literal with the chart parameters

Deprecated:
  • Yes
Source:
Example
firefly.showXYPlot('myDiv', {source: 'mySourceFile', {xCol: 'ra', yCol: 'dec'})