### Very Simple Example
Source: https://github.com/caltech-ipac/firefly/blob/dev/docker/start-examples.txt
A basic Docker command to start Firefly. It maps port 80 to 8080, allocates 4GB of memory, removes the container after exit, and uses the 'latest' tag.
```bash
docker run -p 80:8080 -m 4g --rm ipac/firefly:latest
```
--------------------------------
### Firefly Client Initialization and Listener Setup
Source: https://github.com/caltech-ipac/firefly/blob/dev/src/firefly/test/python/FireflyShowTable.ipynb
Initializes the FireflyClient, adds a callback listener for events, and sets up the system path.
```python
import sys
from FireflyClient import FireflyClient
import json
import time
from IPython.display import IFrame
# add to the path directory with the data
sys.path.append('../../python/display/')
def myCallback(event):
# print event
print "Event Received: "+json.dumps(event['data'])
host='localhost:8080'
channel = 'myChannel8'
fc= FireflyClient(host,channel)
fc.add_listener(myCallback)
```
--------------------------------
### Example pre-release tag
Source: https://github.com/caltech-ipac/firefly/blob/dev/docs/pre-release-procedure.md
Example of how to create a pre-release tag.
```bash
git tag pre-4-2023.2
```
--------------------------------
### Show Table Example
Source: https://github.com/caltech-ipac/firefly/blob/dev/src/firefly/html/demo/request-doc.html
Example of how to display a table using firefly.showTable.
```javascript
firefly.showTable({"source" : "http://web.ipac.caltech.edu/staff/roby/demo/wd/WiseQuery.tbl"},
"tableHere");
```
--------------------------------
### Background Execution Example
Source: https://github.com/caltech-ipac/firefly/blob/dev/docker/start-examples.txt
Starts Firefly in the background, redirecting output to a log file. It allocates 8GB of memory and uses the 'latest' tag.
```bash
docker run -p 80:8080 -m 8g --rm ipac/firefly:latest >& my.log &
```
--------------------------------
### Docker Tags Example
Source: https://github.com/caltech-ipac/firefly/blob/dev/docs/new-release-procedure.md
Example of Docker tags generated for a release.
```bash
rc-2024.3,2024.3,2024.3.1,latest
```
--------------------------------
### Setup Tomcat memory
Source: https://github.com/caltech-ipac/firefly/blob/dev/docs/firefly-environment.md
Example of setting Tomcat maximum memory and PermSize in setenv.sh.
```shell
CATALINA_OPTS = "-Xmx4g -XX:PermSize=256m"
```
--------------------------------
### Starting Firefly Tools in JavaScript
Source: https://github.com/caltech-ipac/firefly/blob/dev/docs/fftools-api-overview.md
Example demonstrating how to load Firefly Tools, define a div for the viewer, and plot a FITS file in the onFireflyLoaded function.
```html
Demo of Firefly Tools
```
--------------------------------
### fixlen Example
Source: https://github.com/caltech-ipac/firefly/blob/dev/docs/image_grid_getting_started.txt
Example of setting the fixlen parameter.
```firefly
\fixlen = T
```
--------------------------------
### Manual Git Tagging Example
Source: https://github.com/caltech-ipac/firefly/blob/dev/docs/new-release-procedure.md
Example of manually creating a git tag for a specific release.
```bash
git tag release-2024.1.1
```
--------------------------------
### Starting Firefly Tools in JavaScript
Source: https://github.com/caltech-ipac/firefly/blob/dev/docs/firefly-api-overview.md
Example demonstrating how to load Firefly tools and plot a FITS file by defining a div, loading 'firefly_loader.js', and implementing the 'onFireflyLoaded' function.
```html
Demo of Firefly Tools
```
--------------------------------
### datatype Example
Source: https://github.com/caltech-ipac/firefly/blob/dev/docs/image_grid_getting_started.txt
Example of setting the data type.
```firefly
\datatype = fitshdr
```
--------------------------------
### Install with NPM
Source: https://github.com/caltech-ipac/firefly/blob/dev/src/firefly/js/externalSource/transformation-matrix-js/readme.md
Instructions for installing the transformation-matrix-js package using npm.
```bash
$ npm install transformation-matrix-js
```
--------------------------------
### Show XY Plot (Commented Out)
Source: https://github.com/caltech-ipac/firefly/blob/dev/src/firefly/test/python/minimal.ipynb
Example of how to show an XY plot, currently commented out.
```python
# show plot
#status = fc.showXYPlot(fileOnServer=file, additionalParams={'xColExpr' : 'h_m-k_m', 'yCol' : 'j_m', 'plotTitle' : 'j_m vs h_m-k_m'})
#print 'showXYPlot success: %s' % status['success']
```
--------------------------------
### Example 1: Image Viewer
Source: https://github.com/caltech-ipac/firefly/blob/dev/docs/fftools-api-code-examples.md
This example demonstrates creating an image viewer and plotting a FITS image into a specified HTML div.
```html
```
```javascript
function onFireflyLoaded() {
var iv2= firefly.makeImageViewer("plotHere");
iv2.plot({
"Title" :"Example FITS Image",
"ColorTable" :"16",
"RangeValues":firefly.serializeRangeValues("Sigma",-2,8,"Linear"),
"URL" :"http://web.ipac.caltech.edu/staff/roby/demo/wise-m31-level1-3.fits"});
}
```
--------------------------------
### Example firefly-docker.env file
Source: https://github.com/caltech-ipac/firefly/blob/dev/docker/README.md
Example content of a firefly-docker.env file showing how to set environment variables for Docker Compose.
```bash
cat firefly-docker.env
ADMIN_PASSWORD=reset-me
CLEANUP_INTERVAL=3h
```
--------------------------------
### Example Commit Message
Source: https://github.com/caltech-ipac/firefly/blob/dev/docs/new-release-procedure.md
An example commit message for documenting release updates.
```bash
git commit -m "Release 2024.1.0: document updates"
```
--------------------------------
### Example 2: Table and Image Preview
Source: https://github.com/caltech-ipac/firefly/blob/dev/docs/fftools-api-code-examples.md
This example shows how to plot an IPAC table and link it to an image previewer, where clicking a table row updates the image.
```html
```
```javascript
function onFireflyLoaded() {
var tableData= { "source" : "http://web.ipac.caltech.edu/staff/roby/demo/test-table4.tbl"};
firefly.showTable(tableData, "tableHere");
firefly.addDataViewer( {"DataSource" : "URL",
"DataColumn" : "FITS",
"MinSize" : "100x100",
"ColorTable" : "1",
"QUERY_ID" : "tableHere" }, "previewHere" );
}
```
--------------------------------
### Histogram Examples
Source: https://github.com/caltech-ipac/firefly/blob/dev/src/firefly/html/demo/ffapi-highlevel-test.html
Examples for creating histograms from table data.
```javascript
histogramOpsReq3 = {source: 'http://web.ipac.caltech.edu/staff/roby/demo/WiseDemoTable.tbl', col: 'modeint', xOptions: 'log'};
firefly.showHistogram('histogram1', {tbl_id: tblReq2.tbl_id, col: 'w1mpro'});
firefly.showHistogram('histogram2', {tbl_id: tblReq2.tbl_id, col: 'w2mpro+w3mpro', falsePositiveRate: 0.05});
```
--------------------------------
### Kubernetes Deployment Example
Source: https://github.com/caltech-ipac/firefly/blob/dev/docs/SsoAdapter-Implementation.md
Example of setting the SSO adapter property using Kubernetes.
```yaml
env:
- name: PROPS_sso__framework__adapter
value: edu.caltech.ipac.firefly.server.security.MySsoAdapter
```
--------------------------------
### GRID_BACKGROUND Example
Source: https://github.com/caltech-ipac/firefly/blob/dev/docs/image_grid_getting_started.txt
Example of setting the background color for the image grid.
```firefly
\GRID_BACKGROUND = #e8f3f5
```
--------------------------------
### Add Coverage Plot Example
Source: https://github.com/caltech-ipac/firefly/blob/dev/src/firefly/html/demo/request-doc.html
Example of how to add a coverage plot with specified corner and center columns.
```javascript
firefly.addCoveragePlot({"QUERY\_ID" : "tableHere",
"CornerColumns" : "lon1,lat1,lon2,lat2,lon3,lat3,lon4,lat4",
"CenterColumns" : "lon,lat",
"MinSize" : "100x100" },
"coverageHere" );
```
--------------------------------
### Install act on macOS
Source: https://github.com/caltech-ipac/firefly/blob/dev/docs/how-to/github-action.md
Command to install the 'act' tool on macOS using Homebrew.
```bash
brew install act
act --version
```
--------------------------------
### Table Visualization Example
Source: https://github.com/caltech-ipac/firefly/blob/dev/docs/firefly-api-overview.md
Example demonstrating how to create a table request using `firefly.util.table.makeFileRequest` and display it using `firefly.showTable`.
```javascript
tblReq = firefly.util.table.makeFileRequest(null, 'http://web.ipac.caltech.edu/staff/roby/demo/WiseDemoTable.tbl',
{
pageSize: 15,
META_INFO: {CENTER_COLUMN: 'crval1;crval2;EQJ2000'}
});
firefly.showTable('table_div', tblReq);
```
--------------------------------
### GROUPING Example
Source: https://github.com/caltech-ipac/firefly/blob/dev/docs/image_grid_getting_started.txt
Example of how to define the GROUPING parameter to group images by keywords and control display options.
```firefly
\GROUPING = keywords=Planck,WMAP,IRAS&show_in_a_row=T&show_label=TOP
```
--------------------------------
### Setup Steps for Docker Buildx
Source: https://github.com/caltech-ipac/firefly/blob/dev/docs/how-to/github-action.md
These steps set up QEMU for cross-platform emulation and Docker Buildx for multi-platform builds.
```yaml
- uses: docker/setup-qemu-action@v3
- uses: docker/setup-buildx-action@v3
```
--------------------------------
### CCUtil.getImageCoords example
Source: https://github.com/caltech-ipac/firefly/blob/dev/docs/firefly-api-overview.md
Example function to get image coordinates of a point using CCUtil.
```js
function getImagePt(pt) {
const activePlot = firefly.util.image.getPrimePlot();
return pt ? firefly.util.image.CCUtil.getImageCoords(activePlot, pt) : undefined;
}
```
--------------------------------
### Get inverse transformation matrix
Source: https://github.com/caltech-ipac/firefly/blob/dev/src/firefly/js/externalSource/transformation-matrix-js/readme.md
Example of getting the inverse of a transformation matrix, with a check for invertibility.
```javascript
invMatrix = m.inverse();
var invMatrix;
if (m.isInvertible()) {
invMatrix = m.inverse();
}
```
--------------------------------
### Basic Firefly Client Setup and Callback
Source: https://github.com/caltech-ipac/firefly/blob/dev/src/firefly/test/python/demo-notebook.ipynb
Initializes the Firefly client, sets up a callback function to handle events, and demonstrates showing a FITS file.
```python
from __future__ import print_function
from builtins import range
import sys
from firefly_client import FireflyClient
import json
host='localhost:8080'
def myCallback(event):
#print("Event Received: "+json.dumps(event['data']))
if 'type' in event['data']:
print(event['data']['type'])
if event['data']['type']=='POINT':
print('*************area select')
#pParams= { 'URL' : 'http://web.ipac.caltech.edu/staff/roby/demo/wise-m51-band2.fits','ColorTable' : '9'}
status= fc.show_fits(fileOnServer=None, plotId='p4',
URL='http://web.ipac.caltech.edu/staff/roby/demo/wise-m51-band2.fits',
ColorTable='9')
print ('version: ' + str(sys.version))
print('HELLO HELLO HELLO')
fc= FireflyClient(host,'tt')
fc.add_listener(myCallback)
#raw_input("add fits. Press Enter to continue...")
```
--------------------------------
### getPrimePlot example
Source: https://github.com/caltech-ipac/firefly/blob/dev/docs/firefly-api-overview.md
Example function to get the active plot and retrieve the working FITS file name.
```js
function getWorkingFitsFile(pt) {
const activePlot = firefly.util.image.getPrimePlot();
const plotState = activePlot.plotState;
return plotState.getWorkingFitsFileStr();
}
```
--------------------------------
### Build docker image
Source: https://github.com/caltech-ipac/firefly/blob/dev/docs/pre-release-procedure.md
Example of building a docker image based on the git tag.
```bash
BUILD_ENV=ops ACTION=both DEPLOY_ENV=dev docker build --build-arg GIT_TAG=2023.2-pre-4 -t firefly:2023.2-pre-4 .
```
--------------------------------
### Node.js Usage
Source: https://github.com/caltech-ipac/firefly/blob/dev/src/firefly/js/externalSource/transformation-matrix-js/readme.md
Example of how to install and use the Matrix class in a Node.js environment.
```javascript
var Matrix = require("transformation-matrix-js").Matrix;
var m = new Matrix();
```
--------------------------------
### Terminal Interaction Notice
Source: https://github.com/caltech-ipac/firefly/blob/dev/src/firefly/js/externalSource/aladinProj/README.txt
Example notice for a program that has terminal interaction when started in interactive mode.
```text
Copyright (C)
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
```
--------------------------------
### Adding and Removing Regions
Source: https://github.com/caltech-ipac/firefly/blob/dev/docs/firefly-python-wrapper.md
Examples of how to add and remove region data using the FireflyClient.
```python
fc= FireflyClient(host,'tt') # init connection
# to Add
reg= ['physical;point 211 201 # color=pink point=cross 9',
'physical;point 30 280 # color=red point=diamond 15 select=1',
'physical;point 100 180 # color=green point=cross 10 select=1'
]
fc.overlayRegionData(reg,'reg3', 'My Region Data')
# to remove 2 or the 3 added
delReg= ['physical;point 211 201 # color=pink point=cross 9',
'physical;point 100 180 # color=green point=cross 10 select=1'
]
fc.removeRegionData(delReg,'reg3')
```
--------------------------------
### Setup Tomcat Manager Application Access
Source: https://github.com/caltech-ipac/firefly/blob/dev/docs/firefly-environment.md
Example of adding a user with manager roles to tomcat-users.xml.
```xml
```
--------------------------------
### Show Table
Source: https://github.com/caltech-ipac/firefly/blob/dev/src/firefly/test/python/minimal.ipynb
Uploads a table file and displays it in Firefly.
```python
# show table
file= fc.upload_file('./data/sample.tbl')
status = fc.show_table(file, 'tablesample', 'My Table', 50)
print 'showTable success: %s' % status['success']
```
--------------------------------
### Adding a Callback for Region Selection
Source: https://github.com/caltech-ipac/firefly/blob/dev/docs/firefly-python-wrapper.md
Example of how to add a listener to the FireflyClient to listen for region selection events.
```python
fc= FireflyClient(host,'tt') # init connection
def myCallback(event):
if 'region' in event['data']:
print 'selected region: %s' % event['data']['region']
fc.addListener(myCallback)
```
--------------------------------
### Show Catalog
Source: https://github.com/caltech-ipac/firefly/blob/dev/src/firefly/test/python/minimal.ipynb
Uploads a catalog file (table format) and displays it.
```python
# show catalog
file= fc.upload_file('data/2mass-m31-2412rows.tbl')
status = fc.show_table(file, 'tablemass', 'My 2MASS Catalog', 50)
print 'showTable success: %s' % status['success']
```
--------------------------------
### Show FITS Image
Source: https://github.com/caltech-ipac/firefly/blob/dev/src/firefly/test/python/minimal.ipynb
Uploads a FITS file and displays it as an image.
```python
# show FITS image
file= fc.upload_file('./data/wise-m31-3a-1.fits')
# show uploaded FITS
status= fc.show_fits(file, plot_id="abcde")
print 'showFits success: %s' % status['success']
```
--------------------------------
### Stretching FITS Image with ZScale Range Values
Source: https://github.com/caltech-ipac/firefly/blob/dev/docs/firefly-python-wrapper.md
Example of stretching a FITS image using createRangeValuesZScale and the stretch method.
```python
rv= fc.createRangeValuesZScale(`Linear','Percent', 2,94)
status= fc.stretch('p1',rv)
```
--------------------------------
### Firefly Client Initialization and Listener
Source: https://github.com/caltech-ipac/firefly/blob/dev/src/firefly/test/python/minimal.ipynb
Initializes the FireflyClient, sets up a listener for events, and prints the Firefly URL.
```python
import sys
import json
from IPython.display import IFrame
# add to the path directory with the data
sys.path.append('../../python/display/')
from FireflyClient import FireflyClient
host='localhost:8080'
channel = 'myChannel8'
fc= FireflyClient(host,channel)
print 'url: %s' % fc.get_firefly_url()
def myCallback(event):
# print event
print "Event Received: "+json.dumps(event['data']);
fc.add_listener(myCallback)
IFrame(fc.get_firefly_url(), 1100, 600)
```
--------------------------------
### Creating Range Values for FITS Stretch (ZScale)
Source: https://github.com/caltech-ipac/firefly/blob/dev/docs/firefly-python-wrapper.md
Example of creating a serialized range values string for ZScale FITS stretch using createRangeValuesZScale.
```python
rv= fc.createRangeValuesZScale('Log',80, 500,44)
params= {'RangeValues':rv}
status= fc.showFits(file,'p1',params)
```
--------------------------------
### Docker CLI Deployment Example
Source: https://github.com/caltech-ipac/firefly/blob/dev/docs/SsoAdapter-Implementation.md
Example of setting the SSO adapter property using Docker CLI.
```bash
-e PROPS_sso__framework__adapter=edu.caltech.ipac.firefly.server.security.MySsoAdapter
```
--------------------------------
### Creating Range Values for FITS Stretch (Standard)
Source: https://github.com/caltech-ipac/firefly/blob/dev/docs/firefly-python-wrapper.md
Example of creating a serialized range values string for standard FITS stretch using createRangeValuesStandard.
```python
rv= fc.createRangeValuesStandard('LogLog', 'Percent',9,98)
params= {'RangeValues':rv}
status= fc.showFits(file,'p1',params)
```
--------------------------------
### Production-like Example
Source: https://github.com/caltech-ipac/firefly/blob/dev/docker/start-examples.txt
A configuration resembling production use, mapping port 8055 to 8080, allocating 30GB of memory, setting an admin password, and disabling debug mode. Names the container 'productionServer'.
```bash
docker run -p 8055:8080 -p -m 30g -e "ADMIN_PASSWORD=myPassword" -e DEBUG="FALSE" --name productionServer ipac/firefly:latest
```
--------------------------------
### Getting and using JSON data produced by Python task launcher
Source: https://github.com/caltech-ipac/firefly/blob/dev/docs/firefly-external-task-launcher.md
This example shows how to retrieve histogram data from an external Python task and use it to render a histogram in Firefly. The histogram is placed in a div with the id 'chartHere'.
```html
```
```javascript
function onFireflyLoaded() {
var launcher = 'python';
var task = 'JsonTaskToGetHistogramData';
var taskParams = {'numbins': 10};
firefly.getJsonFromTask(launcher, task, taskParams)
.then(function (histdata) {
console.log('Returned JSON: ' + JSON.stringify(histdata));
firefly.util.renderDOM("chartHere", firefly.ui.Histogram,
{
desc: 'Histogram data from Python JSON task',
binColor: '#3d3033',
height: 350,
data: histdata
});
})
.catch(function (reason) {
console.error('Error fetching JSON data from ' + launcher + ' task ' + task + ': ' + reason);
document.getElementById('chartHere').innerHTML = ''+reason+'
';
});
}
```
--------------------------------
### Firefly Initialization and Service Requests
Source: https://github.com/caltech-ipac/firefly/blob/dev/src/firefly/html/demo/ffapi-highlevel-test.html
Shows how to initialize Firefly, set global options, and make service requests for images.
```javascript
onFireflyLoaded= function(firefly) {
window.ffViewer= firefly.getViewer();
firefly.setGlobalImageDef({ ZoomType : 'TO_WIDTH' } );
firefly.debug= true;
var util= firefly.util;
var ui= firefly.ui;
// -----------------
// to use minimal readout, do the following
// util.image.initAutoReadout(ui.DefaultApiReadout,
// {MouseReadoutComponent:ui.PopupMouseReadoutMinimal, showThumb:false,showMag:false});
// -----------------
var req= {
plotId: 'xxq',
Type : 'SERVICE',
plotGroupId : 'myGroup',
Service : 'TWOMASS',
Title : '2mass from service',
ColorTable : 5,
GridOn : true,
// GridOn : 'TRUE_LABELS_FALSE',
SurveyKey : 'k',
WorldPt : '10.68479;41.26906;EQ_J2000',
SizeInDeg : '.12',
AllowImageSelection : true
};
var req2= {
Type : 'SERVICE',
plotGroupId : 'myGroup',
Service : 'WISE',
Title : 'Wise',
GridOn : true,
// GridOn : 'TRUE_LABELS_FALSE',
SurveyKey : 'Atlas',
bad1 : 'hello',
bad2 : 'bye',
bad3 : 'again',
SurveyKeyBand : '2',
WorldPt : '10.68479;41.26906;EQ_J2000',
SizeInDeg : '.12',
RangeValues : firefly.util.image.RangeValues.serializeSimple('Sigma',-2,8,'Linear'),
AllowImageSelection : true
};
window.threeC= [
{
type : 'SERVICE',
// plotGroupId : 'myGroup',
Service : 'TWOMASS',
Title : '3 color',
SurveyKey : 'j',
WorldPt : '10.68479;41.26906;EQ_J2000',
SizeInDeg : '.12'
},
{
Type :
}
```
--------------------------------
### Example 3: Table and Coverage Plot
Source: https://github.com/caltech-ipac/firefly/blob/dev/docs/fftools-api-code-examples.md
This example demonstrates creating a coverage plot from a table containing image corner coordinates.
```html
```
```javascript
function onFireflyLoaded() {
var table1Data= { "source" : "http://web.ipac.caltech.edu/staff/roby/demo/WiseDemoTable.tbl"};
firefly.showTable(table1Data, "tableHere");
firefly.addCoveragePlot({"QUERY_ID" : "tableHere",
"MinSize" : "100x100" }, "coverageHere" );
}
```
--------------------------------
### Box and Stack CSS Utility Example
Source: https://github.com/caltech-ipac/firefly/blob/dev/docs/ui-notes.md
Demonstrates how to apply multiple CSS properties directly to Box and Stack components without needing the 'sx' prop.
```jsx
```
```jsx
```
--------------------------------
### Image Display Examples
Source: https://github.com/caltech-ipac/firefly/blob/dev/src/firefly/html/demo/ffapi-highlevel-test.html
Demonstrates how to display images using firefly.showImage with different parameters like URL, file path, and plot ID.
```javascript
var req = { SERVICE : 'TWOMASS', Title : '3 color', SurveyKey : 'h', WorldPt : '10.68479;41.26906;EQ_J2000', SizeInDeg : '.12' };
var req2 = {
Type : 'SERVICE',
Service : 'TWOMASS',
title : '3 color',
SurveyKey : 'k',
WorldPt : '10.68479;41.26906;EQ_J2000',
moreBadKeys : 'qqq',
SizeInDeg : '.12'
};
firefly.showImage('imageViewHere', req);
firefly.showImage('imageViewHere', req2);
firefly.showImage('imageViewHere', window.threeC);
firefly.showImage('imageViewHere', {url:'http://web.ipac.caltech.edu/staff/roby/demo/wise-m51-band2.fits', plotId: 'regiontest'});
firefly.showImage('imageViewHere', {
url : 'FILE:///Users/roby/fits/dss-m31.fits',
title : 'From a Container'
});
```
--------------------------------
### Adding Build Arguments
Source: https://github.com/caltech-ipac/firefly/blob/dev/docs/how-to/github-action.md
Example of how to add build arguments to the Docker build process.
```yaml
build-args: |
env=ops
```
--------------------------------
### Image Viewer Methods
Source: https://github.com/caltech-ipac/firefly/blob/dev/src/firefly/html/demo/request-doc.html
Demonstrates how to create and use an ImageViewer instance to plot FITS images.
```javascript
var viewer = firefly.makeImageViewer();
viewer.plot(params);
var viewer = firefly.makeImageViewer();
viewer.plotURL(url);
```
--------------------------------
### Table Request and Display Examples
Source: https://github.com/caltech-ipac/firefly/blob/dev/src/firefly/html/demo/ffapi-highlevel-test.html
Demonstrates creating and displaying tables from IRSA catalogs and files.
```javascript
tblReq1 = firefly.util.table.makeIrsaCatalogRequest('allwise_p3as_psd', 'WISE', 'allwise_p3as_psd', { position: '148.9;68.8;EQ_J2000',
SearchMethod: 'Cone',
radius: 300
});
tblReq2 = firefly.util.table.makeIrsaCatalogRequest('another wise catalog', 'WISE', 'allwise_p3as_psd', { position: '10.68479;41.26906;EQ_J2000',
SearchMethod: 'Cone',
radius: 300
});
tblReq3 = firefly.util.table.makeFileRequest(null, 'http://web.ipac.caltech.edu/staff/roby/demo/WiseDemoTable.tbl',null, { pageSize: 15,
META_INFO: {CENTER_COLUMN: 'crval1;crval2;EQJ2000'}
});
firefly.showTable('tables-1', tblReq1);
firefly.showTable('tables-1', tblReq3);
firefly.showTable('tables-2', tblReq2, {removable: false, showUnits: true, showFilters: true});
```
--------------------------------
### Trigger Examples
Source: https://github.com/caltech-ipac/firefly/blob/dev/docs/how-to/github-action.md
Common examples of triggers that determine when a workflow runs.
```yaml
on:
workflow_dispatch: # Manual trigger
push:
branches: [ main ] # On push to main
release:
types: [published] # When a release is published
```
--------------------------------
### Manual Trigger Example
Source: https://github.com/caltech-ipac/firefly/blob/dev/docs/how-to/github-action.md
Example of a manual trigger for a GitHub Actions workflow.
```yaml
on:
workflow_dispatch:
```
--------------------------------
### Quick Start Deployment
Source: https://github.com/caltech-ipac/firefly/blob/dev/helm/README.md
Deploy Firefly with one command.
```bash
helm upgrade --install firefly oci://ghcr.io/caltech-ipac/helm-charts/firefly \
-n firefly \
--create-namespace \
--set ingress.host=firefly.example.com
```
--------------------------------
### GRID_FOREGROUND Example
Source: https://github.com/caltech-ipac/firefly/blob/dev/docs/image_grid_getting_started.txt
Example of setting the foreground color for the image grid.
```firefly
\GRID_FOREGROUND = #000
```
--------------------------------
### Build Firefly Viewer with API Docs for Dev Environment
Source: https://github.com/caltech-ipac/firefly/blob/dev/docs/firefly-environment.md
Example Gradle command to build Firefly Viewer with API documentation and tutorial for the dev environment.
```bash
$ gradle -Penv=dev :firefly:warAll
```