Class Cosmo

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--java.awt.Panel
                    |
                    +--java.applet.Applet
                          |
                          +--Cosmo

public class Cosmo
extends java.applet.Applet

The initializing class of the Cosmology applet

See Also:
Serialized Form

Field Summary
static Case[] cases
          An array for the cases to be plotted
static java.awt.Color[] colors
          An array of colors in which the cases will be plotted
static boolean dataIsNew
          When true Cosmo will recalculate the scale of a window before redrawing the plots.
static DataPoint[] dataPoints
          An array for the data points to be plotted
static java.awt.Button editButton
          Button to switch the displayed panel between cosmology and data point inputs
protected  GraphPane graph
          The graphing pane on which the output will be plotted
static int plotType
          0 for Lookback time, 1 for age
static java.awt.Choice plotTypeCombo
          Combobox to choose plot type
static java.awt.Checkbox traceCheckbox
          Checkbox used to toggle tracing on and off
static java.awt.Label traceLabel
          The label to display the coordinates of the trace
static java.awt.Label xLabel
          The label for the horizontal axis
static java.awt.Label yLabel
          The label for the vertical axis
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Constructor Summary
Cosmo()
           
 
Method Summary
static double compute(Case c, double z)
          Computes a simple case (ol=0) for a given cosmology case and redshift z.
 void init()
          Initializes this applet, does the layout
 void paint(java.awt.Graphics g)
          Repaint Cosmo's main pane Currently nothing particular is being done here
 void stop()
          Destroy Cosmo and its cases
static double TA1(double om, double ol, double z)
          Used by zt2 for some non-trivial calculations
static double TA2(double om, double ol, double z)
          Used by zt2 for some non-trivial calculations
static double TB(double om, double z)
          z2t for om+ol==1.0e0 universe
static double TOLZ(double om, double z)
          z2t for ol=0.0e0 universe this function is included for completeness, for ol = 0.0e0 it containts no calls to any elliptic functions
static double TOMZ(double ol, double z)
          Z2t for 0m=0.0e0 Universe This function is included for completeness, for om=0.0.
static double z2t(Case c, double z)
          Replaces compute to calculate cosmologies of both trivial (OmegaL=0) and nontrivial cases.
 
Methods inherited from class java.applet.Applet
destroy, getAppletContext, getAppletInfo, getAudioClip, getAudioClip, getCodeBase, getDocumentBase, getImage, getImage, getLocale, getParameter, getParameterInfo, isActive, newAudioClip, play, play, resize, resize, setStub, showStatus, start
 
Methods inherited from class java.awt.Panel
addNotify
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getInsets, getLayout, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, paramString, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setCursor, setFont, setLayout, update, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, addPropertyChangeListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getInputContext, getInputMethodRequests, getLocation, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isDisplayable, isDoubleBuffered, isEnabled, isFocusTraversable, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, remove, removeComponentListener, removeFocusListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, setBackground, setBounds, setBounds, setComponentOrientation, setDropTarget, setEnabled, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

graph

protected GraphPane graph
The graphing pane on which the output will be plotted

dataIsNew

public static boolean dataIsNew
When true Cosmo will recalculate the scale of a window before redrawing the plots. The integration process can take some time on slower machines and therefore it would not be feasible to recalculate the size of the window everytime it is redrawn, such as while tracing

cases

public static Case[] cases
An array for the cases to be plotted

dataPoints

public static DataPoint[] dataPoints
An array for the data points to be plotted

colors

public static java.awt.Color[] colors
An array of colors in which the cases will be plotted

plotTypeCombo

public static java.awt.Choice plotTypeCombo
Combobox to choose plot type

editButton

public static java.awt.Button editButton
Button to switch the displayed panel between cosmology and data point inputs

traceCheckbox

public static java.awt.Checkbox traceCheckbox
Checkbox used to toggle tracing on and off

xLabel

public static java.awt.Label xLabel
The label for the horizontal axis

yLabel

public static java.awt.Label yLabel
The label for the vertical axis

traceLabel

public static java.awt.Label traceLabel
The label to display the coordinates of the trace

plotType

public static int plotType
0 for Lookback time, 1 for age
Constructor Detail

Cosmo

public Cosmo()
Method Detail

stop

public void stop()
Destroy Cosmo and its cases
Overrides:
stop in class java.applet.Applet

init

public void init()
Initializes this applet, does the layout
Overrides:
init in class java.applet.Applet

paint

public void paint(java.awt.Graphics g)
Repaint Cosmo's main pane Currently nothing particular is being done here
Overrides:
paint in class java.awt.Container

compute

public static double compute(Case c,
                             double z)
Computes a simple case (ol=0) for a given cosmology case and redshift z. Defined in An Introduction to Modern Astrophysics by Bradley W. Carroll and Dale A. Ostlie

z2t

public static double z2t(Case c,
                         double z)
Replaces compute to calculate cosmologies of both trivial (OmegaL=0) and nontrivial cases. Converted from fortran90 code provied by Rollin C. Thomas of the University of Oklahoma.

TOLZ

public static double TOLZ(double om,
                          double z)
z2t for ol=0.0e0 universe this function is included for completeness, for ol = 0.0e0 it containts no calls to any elliptic functions

TOMZ

public static double TOMZ(double ol,
                          double z)
Z2t for 0m=0.0e0 Universe This function is included for completeness, for om=0.0. It containts no calls to any elliptic functions, and is good only for 0.0e0 < ol < 1.0e0.

TA1

public static double TA1(double om,
                         double ol,
                         double z)
Used by zt2 for some non-trivial calculations

TA2

public static double TA2(double om,
                         double ol,
                         double z)
Used by zt2 for some non-trivial calculations

TB

public static double TB(double om,
                        double z)
z2t for om+ol==1.0e0 universe