Tutorial

See also the step-by-step example.

[Getting Started][Local Data Interface Modules][The Java Analysis Studio Environment][Viewing Data][Functions][Fitters][The Default Fitter][Registries][Class Paths][Analyzing Data]

Getting Started

Local Data Interface Modules

When you are running a local job, you must access your data through a local data interface module (DIM).  That Local DIM allows the application to read a data format because it is designed specifically for that format.  In order to use a Local DIM, you must register it in the Local DIM registry.  There are some default Local DIMs included with the application, but you can define your own by following the documentation.

The Java Analysis Studio Environment

Java Analysis Studio allows you to customize the application environment in two ways.

Viewing Data

Functions

Java Analysis Studio comes with a number of default functions that can be displayed on a plot.  Most of these functions are fittable.   To define your own functions, see the documentation provided.  Java Analysis Studio keeps a function registry where it holds all of the functions that can be added to a plot.  The first time you use Java Analysis Studio, these default functions will be registered.  If you wish to add or remove functions from this list, see the documentation below on changing the function and fitter registries.  Your modifications to the function registry will be saved and loaded next time the application starts if you have selected the 'Save registries' box in the 'Options' dialog.  By default, this option is selected.  To use functions in data analysis,

The fitter should stay linked to the data as you have set it and should re-fit the curve each time the data change.  If the function has handles and you move one of them manually, the fit will be cleared and will no longer update with the data.

Fitters

Java Analysis Studio comes with a least-squares fitter.  Like functions, fitters are stored in a registry and you can add and remove fitters from the registry.  Like for the function registry, the fitter registry will be saved and loaded next time the application starts if the 'Save registries' box in the 'Options' dialog is selected, which it is by default.  To define your own fitter, see the documentation.  The registries section describes how to add and remove functions from their registries.

The Default Fitter

If you try to fit a function from the 'Fit' menu (as opposed to fitting from the 'Properties' dialog) the program will use the default fitter.  To set or view the default fitter, select the 'Defaults' tab on the 'Options' dialog and select the fitter there.

Changing the function, fitter, and Local DIM registries

The registries are accessible from the 'Options' dialog.   In one of the 'registry' panes, click on the add button (fourth down) to add a class to the registry, and on the remove button (third down) to remove the selected class.  Only classes that extend jas.hist.Fitter can be added to the fitter registry.  Only classes that extend jas.hist.Basic1DFunction or classes that implement jas.hist.FunctionFactory can be added to the function registry.  Only classes that implement jas.jds.module.LocalDIM (see the related documentation) can be added to the Local DIM registry.   Be sure that the fitter or function is a class in your class path.  See the next section for adjusting class path.   The function registry is shown in the 'Options' dialog below.

wpe2.jpg (17880 bytes)

Class Paths

When Java Analysis studio searches for a class, it looks in your class path.   This is just a set of default directories where it looks for classes.  To set or view your class paths, go to the 'Defaults' tab of the 'Options' dialog and set them the same way you set the function and fitter registries.  The arrow buttons change the order in which the directories are searched.

Analyzing data

See also a step-by-step example for analyzing data.

Java Analysis Studio allows you to define your own analysis routines.  You can load any Java class that is properly defined to run an analysis on the data.  This version of Java Analysis Studio has a 'New Job Wizard' that will create a skeleton java source file with comments indicating where you should enter your analysis code.  Open the wizard by selecting 'Program' from the 'New' submenu of the 'File' menu.  The code that the wizard creates will have correct syntax except for the areas you must fill in (which are indicated by comments), it will be able to run in Java Analysis Studio, and it will be general enough to cover most analysis tasks.  If you want to write your own code, you must be aware of the following guidelines, which the wizard will normally take care of for you:

Now, you can compile the file.  You could use Sun's Java Development Kit compiler at the command prompt.  For example, I would type
javac MyAnalysis.java
Alternatively, you can compile it in Java Analysis Studio by clicking on the 'Compile' button on the toolbarYou still must have downloaded the Java Development Kit from Sun in order to get the compiler.  Be sure to save the file before compiling.   Either way, you get a class file from your source file.  In my example, it would be called 'MyAnalysis.class'.

To load the program, select 'Load...' from the 'Job' menu.  Do not type any extension.  In my example, I would just type 'MyAnalysis'.

To run the program, click on the 'Run' button on the toolbar.


You are visitor number Hit Counter.

Page maintained by Jonas Gifford.   Last updated 01/14/04.