Using OASIS with Your Data and Services

OASIS has been designed to serve as a presentation and data fusion tool that can be used in conjuntion with existing data services. If you have images, source lists, etc. that you keep on-line (or even just local files), these can be displayed using OASIS just by adding an extra HTML link on any web page that references them. If you have data services that produce such files dynamically, these can be handled the same way. Finally, with minor adjustments to your initial service forms, you can use attributes of the current image, etc. being displayed by OASIS (e.g. current image center and size) as initialization parameters for your services.
Indirect Link Example
Emedded Applet Example
Web Form Interaction Example

Basic Links

By far the most common OASIS link is for the purposes of displaying a data file. For example, suppose you have an image orion.fits that you wish to display. Currently, you would create a link to it on some web page which would tell your Browser to retrieve the file:
     <a href="">Orion image</a>

If the browser has been told which application can handle this file, it will fire up a copy.

For an OASIS link, we use an extra level of indirection where the reference is handed off to OASIS (which is started automatically by the Browser if necessary) and OASIS retreives the data and adds it to the current display. In this way, a whole data collection (image, catalog overlays, contours, etc.) can be fused in a single client instance of OASIS even if the data all come from different locations.

The above can be converted to an OASIS link simply by sending the existing URL to the OASIS proxy service:

  <a href="
     ref=">Orion image</a>

To be safe, the ref parameter should be url-encoded. Multiple data references and references to services rather than static files can also be sent (see a working example). The file:// construct can also be used if you want to work with local data.

OASIS links work by generating an extra (small) Browser page which contains an OASIS applet reference (for OASIS links to work, JavaScript must be active on your Browser). After a brief delay (longer if OASIS hasn't been loaded), the "calling" window returns to your page, the new applet page (a little browser window in the upper left of your screen) contacts or starts OASIS, and OASIS is given the data reference(s).

OASIS forwards all such references to its Request Management toolkit and they appear as parallel threads in the File Transfer Manager GUI window (requests made through OASIS will be shown here as well). As data arrives it is stored in a cache (cleared every session) and added to the current display. Since different files (and services; see below) take different amounts of time, there is no guarantee in which order the data will arrive.


Putting the Applet Button on Your Own Page

The proxy Browser window that is created dynamically in the above scenario contains a simple (if somewhat lengthy) standard plug-in applet reference. Such references can be hardcoded onto any page (see the example). This has the advantages that you do not then need to go through the OasisLink proxy generator, have JavaScript active, and have extra browser windows appear on your screen. It has the disadvantages that you have to understand and accomodate the applet information construct and load Oasis when your page comes up (as opposed to it only coming up if a link is activated). In addition, the Browser/plug-in linkage can do some odd things if you place multiple applet references on the same page (most notably downloading multiple copies of the JAR files if OASIS has not already been installed).


Interacting with Web Forms

OASIS can also be used in conjunction with web pages containing HTML forms. Any form can be used; the only constraint being that the form must have an ID (standard but not required for HTML <form> tags). As in the previous section, an OASIS "button" is included on the page (see the example), only this time you give a base URL in the formurl parameter and OASIS interacts with the Browser to collect the form parameters and complete the URL (much as the Browser does when you press an HTML submit button. You can have multiple forms on the same page, each with its own "OASIS submit" button (that's what the formid is for).

In addition to this, OASIS checks the form inputs on startup looking for specific names (such as the oasisImCenter and oasisImRadius fields in the example. This list (easily extensible if there is any demand) currently contains:  

oasisImCenter The center of the currently displayed image fully qualified (lon lat system epoch). This and all the following are derived from the FITS header information and are in those units (i.e., not necessarily EQUJ 2000).
oasisImLon Current image center longitude (decimal degrees).
oasisImLat Current image center latitude (decimal degrees).
oasisImRadius Radius of a bounding circle that encompasses the current image (decimal degrees).
oasisImXSize Image size in the "X" direction (actually NAXIS1 * CDELT1 (decimal degrees).
oasisImYSize Image size in the "Y" direction (actually NAXIS1 * CDELT1 (decimal degrees).
oasisImRotation Image rotation (direction of the "Y" axis East of North on the sky) (decimal degrees).
oasisImProjType Image projection (e.g., "TAN", "AIT") taken from the CTYPE FITS header cards.
oasisImCsys Image coordinate system ("EQUJ", "EQUB", "ECLJ", "ECLB", "GAL", or "SGAL").
oasisImEpoch Image epoch (often 1950. or 2000. but can be any real number).
oasisImFile The local (client) image file being displayed.
oasisCurCoord The "current" (last saved) coordinate string.
oasisCurLon Longitude of current coordinate (decimal degrees).
oasisCurLat Latitude of current coordinate (decimal degrees).
oasisCurSys Coordinate system of current coordinate.
oasisCurEpoch Epoch of current coordinate.
When OASIS finds one of these fields, it updates it with the current display value. In this way, you can use OASIS as an integral part of your own processing scenarios.