stella.jview
Class JQuickDisplay

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by java.awt.Window
              extended by java.awt.Frame
                  extended by javax.swing.JFrame
                      extended by jview.JExitFrame
                          extended by jview.JConfirmExitFrame
                              extended by jview.JBorderFrame
                                  extended by jview.JOpenFrame
                                      extended by jview.JClientFrame
                                          extended by stella.jview.JMasterDisplay
                                              extended by stella.jview.JDatabaseDisplay
                                                  extended by stella.jview.JQuickDisplay
All Implemented Interfaces:
ActionListener, ImageObserver, MenuContainer, Serializable, Remote, EventListener, Accessible, ChangeListener, RootPaneContainer, WindowConstants, BorderLabels, ClientLabels, Displayable, PickListener, ClientObject, ExitCleaning, Initializable, PropertyAware, PropertyComposed, Refreshing

public class JQuickDisplay
extends JDatabaseDisplay
implements ChangeListener

Allows the extraction and display of one-dim data from the database. The right row has some pre-defined buttons with spectral ranges.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class stella.jview.JMasterDisplay
JMasterDisplay.Show
 
Nested classes/interfaces inherited from class jview.JClientFrame
JClientFrame.ClientListener
 
Nested classes/interfaces inherited from class javax.swing.JFrame
JFrame.AccessibleJFrame
 
Nested classes/interfaces inherited from class java.awt.Frame
Frame.AccessibleAWTFrame
 
Nested classes/interfaces inherited from class java.awt.Window
Window.AccessibleAWTWindow
 
Nested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
 
Field Summary
private  RaTarget alp0
          Parameter for rest frame.
private  RaApparent alpha
          Parameter for rest frame.
private  BarycentricVelocity bv
          Parameter for rest frame.
private  JTabbedPane canvas
          The canvas we display the spectrum in.
private  int count
          The current spectrum number.
private  String current
          The current region.
private  JLabel date
          The date of the observation.
private  String[] dateerr
          The different date labels.
private  String[] datelabel
          The different date labels.
private static String DEFBROWSER
          The browser command line
private static String DEFBSCALE
          How to convert the one-d int to floats, scale.
private static String DEFBZERO
          How to convert the one-d int to floats, offset.
private static DateFormat DEFDATEFORMAT
          The default date formatter, known for this special chron.
private static String DEFLAMBDASTEP
          The name of the lambda-stepwidth parameter.
private static String DEFLAMBDAZERO
          The name of the lambda-zero parameter.
private static String DEFLOGG
          The name of the logg field.
private static String DEFLOGGERR
          The name of the logg error field.
private static String DEFMETAL
          The name of the metal field.
private static String DEFMETALERR
          The name of the metal error field.
private static String DEFOBJDEC
          The name of the object declination field .
private static String DEFOBJNAME
          The name of the object field .
private static String DEFOBJRA
          The name of the object right ascension field field .
private static String DEFONED
          The name of the lambda-zero parameter.
private static double DEFOVERLAYOFF
          The default offset between spectra on overplotting.
private static String DEFREGIONBUTTONS
          The default regios.
private static String DEFREGIONRANGES
          Their angstroms as a double-linked list.
private static boolean DEFRESTFRAME
          If true, convert to restframe.
private static boolean DEFSHOWFITTED
          If true, fit of data is displayed if available.
private static String DEFSIMBADHOST
          The simabd host.
private static String DEFSIMBADID
          The simabd target identifier form field
private static String DEFSIMBADPOSTID
          The simbad post-id part.
private static int DEFSPECTRUMCOUNT
          The default maximum spectrum number.
private static String DEFTEFF
          The name of the Teff field.
private static String DEFTEFFERR
          The name of the Teff error field.
private static boolean DEFUSEBROWSER
          If pick selection should also trigger a browser re-link
private static String DEFVHELIO
          The name of the rv field.
private static String DEFVHELIOERR
          The name of the rv error field.
private static String DEFVSINI
          The name of the vsini field.
private static String DEFVSINIERR
          The name of the vsini error field.
private  DecTarget del0
          Parameter for rest frame.
private  DecApparent delta
          Parameter for rest frame.
private  double[] dlam
          The wavelength step retrieved from db.
private  int[][] fitted
          The 1-d vectors mapping fitted intensity vs.
static String FITTED
          Name of one-dim spectrum.
static String KEY_BROWSER
          The browser command line
static String KEY_BSCALE
          How to convert the one-d int to floats, scale.
static String KEY_BZERO
          How to convert the one-d int to floats, offset.
static String KEY_DATEFORMAT
          The date formatter to use.
static String KEY_FITTED
          The name of the fitted array.
static String KEY_LAMBDASTEP
          The name of the lambda-stepwidth parameter.
static String KEY_LAMBDAZERO
          The name of the lambda-zero parameter.
static String KEY_LOGG
          The name of the logg field.
static String KEY_LOGGERR
          The name of the logg error field.
static String KEY_METAL
          The name of the metal field.
static String KEY_METALERR
          The name of the metal error field.
static String KEY_OBJDEC
          The name of the object declination field .
static String KEY_OBJNAME
          The name of the object field .
static String KEY_OBJRA
          The name of the object right ascension field field .
static String KEY_ONED
          The name of the lambda array.
static String KEY_OVERLAYOFF
          On overplotting, spectra are shifted by this amount.
static String KEY_REGIONBUTTONS
          The names of the wavelength region buttons.
static String KEY_REGIONRANGES
          To each name above, central wavelength plus width in Angstrom.
static String KEY_RESTFRAME
          If true, calculate rest-frame wavelength.
static String KEY_SHOWFITTED
          If false, fitted data is not shown.
static String KEY_SIMBADHOST
          The simabd host.
static String KEY_SIMBADID
          The simabd target identifier form field
static String KEY_SIMBADPOSTID
          The simbad post-id part.
static String KEY_SPECTRUM
          The properties of the data canvas displaying the spectrum.
static String KEY_SPECTRUMCOUNT
          The maximum number of spectra to overplot/tab.
static String KEY_TEFF
          The name of the Teff field.
static String KEY_TEFFERR
          The name of the Teff error field.
static String KEY_USEBROWSER
          If pick selection should also trigger a browser re-link
static String KEY_VHELIO
          The name of the rv field.
static String KEY_VHELIOERR
          The name of the rv error field.
static String KEY_VSINI
          The name of the vsini field.
static String KEY_VSINIERR
          The name of the vsini error field.
private  double[] lam0
          The starting point retrieved from db.
private  JLabel logg
          The logg from the reduced database.
private  String[] loggerr
          The different rv errors.
private  String[] logglabel
          The different rv.
private  JLabel metal
          The metallicity from the reduced database.
private  String[] metalerr
          The different rv errors.
private  String[] metallabel
          The different rv.
private  JButton multi
          A button with three states: replace, to tabs or overlay.
static String OVERLAY
          Action for overplot.
private static String PM
          The plus/minus char as a string.
private  Map regions
          Mapping of button names to central wavelength plus width.
static String REPLACE
          Action for replace.
private  JLabel rv
          The RV from the reduced database.
private  String[] rverr
          The different rv errors.
private  String[] rvlabel
          The different rv.
private  double[] scale
          The scale of the data retrieved from db.
private  int[][] spectrum
          The 1-d vectors mapping spectral intensity vs.
static String SPECTRUM
          Name of one-dim spectrum.
private  JLabel star
          The name of the star from the obs database.
static String TAB
          Action for new tabs.
private  JLabel teff
          The Teff from the reduced database.
private  String[] tefferr
          The different rv errors.
private  String[] tefflabel
          The different rv.
private  SettableTime time
          Parameter for rest frame.
private  JLabel vsini
          The vsini from the reduced database.
private  String[] vsinierr
          The different rv errors.
private  String[] vsinilabel
          The different rv.
private  double[] zero
          The zero point of the data retrieved from db.
 
Fields inherited from class stella.jview.JDatabaseDisplay
ISODATE, KEY_DONETABLE, KEY_ENVTABLE, KEY_OBJID, KEY_OBSTABLE, KEY_PERMISSIONTABLE, KEY_PROPOSALTABLE, KEY_REDUCEDTABLE, KEY_TARGETTABLE, KEY_TASKTABLE, KEY_USERNAME, KEY_USERTABLE
 
Fields inherited from class stella.jview.JMasterDisplay
KEY_BINDNAME, KEY_REFRESH, KEY_ROBOTPROPS, KEY_ROBOTSEQUENCE, KEY_SWITCHMONITOR, KEY_TELESCOPECHAR
 
Fields inherited from class jview.JClientFrame
CONNECTACTION, DISCONNECTACTION, KEY_CONNECTONINIT, KEY_ICONCONNECT, KEY_ICONDISCONNECT
 
Fields inherited from class jview.JOpenFrame
EMPTYACTION, EXITACTION, EXPORTACTION, KEY_FILEACTIONS, KEY_FILEHOME, OPENACTION, PRINTACTION, SAVEACTION
 
Fields inherited from class jview.JBorderFrame
DATACLEANSE, KEY_ABOUTURL, KEY_ACTIONCLASS, KEY_AIPLOGO, KEY_BIGGERSTRUT, KEY_DATAANALYSER, KEY_EASTALIGNMENT, KEY_FITTERS, KEY_FITTERTIPS, KEY_HELPSIZE, KEY_LESSERSTRUT, KEY_NOLOGO, KEY_NORTHALIGNMENT, KEY_SOUTHALIGNMENT, KEY_WESTALIGNMENT, MODELFITTER
 
Fields inherited from class javax.swing.JFrame
accessibleContext, EXIT_ON_CLOSE, rootPane, rootPaneCheckingEnabled
 
Fields inherited from class java.awt.Frame
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface jview.ClientLabels
KEY_CONNECTERROR, KEY_CONNECTTITLE, KEY_DISCONNECTERROR
 
Fields inherited from interface jview.BorderLabels
KEY_ABOUT, KEY_ABOUTACC, KEY_FILEACCS, KEY_FILEITEMS, KEY_FILEMENU, KEY_FILEMNEMONIC, KEY_HELPMENU, KEY_HELPMNEMONIC, KEY_HELPTITLE, KEY_NOHELP, KEY_NOURLACCESS, KEY_TITLE
 
Fields inherited from interface javax.swing.WindowConstants
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSE
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
JQuickDisplay(Map<String,String> prop)
          Constructs a generic peripheral from a property container.
JQuickDisplay(PropertyBearing prop)
          Constructs a new quick-view display.
 
Method Summary
 void actionPerformed(ActionEvent ae)
          Grab the action buttons label and link it up with the regions.
private  double barycentricVelocity(double ra, double de, Date at)
          Takes right ascension and declination, both in degrees of the target and calculates the projected baryonic velocity of Earth onto the line of sight for the given date.
private  boolean cacheData(Map db, Date obstime)
          We cache the entire quick-look spectrum, meaning that we materialize the database array and convert it into a list of vectors, linking wavelength to intensity.
private  JDataCanvas createSpectralCanvas()
          Creates a new spectral canvas.
private  List createSpectrum(Vector2D central, int[] oned, double lam0, double dlam, double zero, double scale, int n)
          Creates a list of plottable points from the one-d spectrum.
 Component getRepresentation()
          Returns the data canvas.
protected  Map getRequestedFields()
          The quick display request the scaling fields, the zero lambda and lamda stepwidth as well as the array itself.
protected  List getRightItems()
          To the right, we display the region buttons.
protected  String getTableName()
          Returns the table name.
 void init()
          On init, we try to convert the region buttons list to a lookup map of button labels to Point2Ds.
private  void initCanvas(Vector2D central)
          Initializes the canvas such that it converts the central wavelength and the region width in array offsets of our wavelength cache, does averaging, if required (if the number of points in the plotting canvas is less than the resolution elements) and updates the display.
static void main(String[] arg)
          Launches a the allsky display
private  double normalize(int[] spec, int index, double zero, double scale)
          Converts the integer spectrum value to the reduced and normalized spextrum value.
protected  boolean processLocally(HistoryAware.Pick pick)
          Process the pick in a way that it retrieves the field needed from the database and updates the display.
 void setComposedProperties(PropertyBearing prop)
          Defaults some properties.
 void stateChanged(ChangeEvent ce)
          If we have multiple tab, we update the RV etc.
 
Methods inherited from class stella.jview.JDatabaseDisplay
getRequestedNames, getResultSetMethod, getUserName, lookUp, processExternally, queryDatabase, queryDatabase, queryDatabase, querySingle
 
Methods inherited from class stella.jview.JMasterDisplay
connect, disconnect, execute, execute, getIcon, getRefreshInterval, isFixedRate, openFile, processPick, refresh, scanDir
 
Methods inherited from class jview.JClientFrame
abolishConnection, createConnect, establishConnection, exit, getBottomItems
 
Methods inherited from class jview.JOpenFrame
createCheckBoxMenuItem, createLocalizedCheckBoxMenuItem, exportCenter, getExportRepresentation, getHelpActions, getMenus, getOpenFilter, getPrintRepresentation, getSaveFilter, getSaveRepresentation, populateMenu, printCenter, saveFile
 
Methods inherited from class jview.JBorderFrame
analyserListenTo, createButton, createCheckBox, createDataAnalysers, createFitters, createHelp, createLabel, createLocalizedButton, createLocalizedCheckBox, createLocalizedHelp, createLocalizedLabel, createStatus, getAboutAction, getActiveFit, getBiggerStrut, getComposedProperties, getDataAnalysers, getFitterButtonGroup, getFitterComboBox, getLeftItems, getLesserStrut, getModelFittings, getStatusField, getTopItems, hasFired, printAlignment, setAlignment, setFired
 
Methods inherited from class jview.JConfirmExitFrame
disposeAndExit
 
Methods inherited from class jview.JExitFrame
setVisible
 
Methods inherited from class javax.swing.JFrame
addImpl, createRootPane, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setIconImage, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, update
 
Methods inherited from class java.awt.Frame
addNotify, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setResizable, setState, setTitle, setUndecorated
 
Methods inherited from class java.awt.Window
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getGraphicsConfiguration, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOwnedWindows, getOwner, getOwnerlessWindows, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, hide, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isShowing, pack, paint, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImages, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, show, toBack, toFront
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusBackward, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resize, resize, setBackground, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface util.PropertyComposed
getComposedProperties
 
Methods inherited from interface java.awt.MenuContainer
getFont, postEvent
 

Field Detail

SPECTRUM

public static final String SPECTRUM
Name of one-dim spectrum.

See Also:
Constant Field Values

FITTED

public static final String FITTED
Name of one-dim spectrum.

See Also:
Constant Field Values

REPLACE

public static final String REPLACE
Action for replace.

See Also:
Constant Field Values

TAB

public static final String TAB
Action for new tabs.

See Also:
Constant Field Values

OVERLAY

public static final String OVERLAY
Action for overplot.

See Also:
Constant Field Values

KEY_SPECTRUM

public static final String KEY_SPECTRUM
The properties of the data canvas displaying the spectrum.

See Also:
Constant Field Values

KEY_SPECTRUMCOUNT

public static final String KEY_SPECTRUMCOUNT
The maximum number of spectra to overplot/tab.

See Also:
Constant Field Values

KEY_ONED

public static final String KEY_ONED
The name of the lambda array.

See Also:
Constant Field Values

KEY_FITTED

public static final String KEY_FITTED
The name of the fitted array.

See Also:
Constant Field Values

KEY_SHOWFITTED

public static final String KEY_SHOWFITTED
If false, fitted data is not shown.

See Also:
Constant Field Values

KEY_OVERLAYOFF

public static final String KEY_OVERLAYOFF
On overplotting, spectra are shifted by this amount.

See Also:
Constant Field Values

KEY_LAMBDAZERO

public static final String KEY_LAMBDAZERO
The name of the lambda-zero parameter.

See Also:
Constant Field Values

KEY_LAMBDASTEP

public static final String KEY_LAMBDASTEP
The name of the lambda-stepwidth parameter.

See Also:
Constant Field Values

KEY_BZERO

public static final String KEY_BZERO
How to convert the one-d int to floats, offset.

See Also:
Constant Field Values

KEY_BSCALE

public static final String KEY_BSCALE
How to convert the one-d int to floats, scale.

See Also:
Constant Field Values

KEY_RESTFRAME

public static final String KEY_RESTFRAME
If true, calculate rest-frame wavelength.

See Also:
Constant Field Values

KEY_OBJNAME

public static final String KEY_OBJNAME
The name of the object field .

See Also:
Constant Field Values

KEY_OBJRA

public static final String KEY_OBJRA
The name of the object right ascension field field .

See Also:
Constant Field Values

KEY_OBJDEC

public static final String KEY_OBJDEC
The name of the object declination field .

See Also:
Constant Field Values

KEY_VHELIO

public static final String KEY_VHELIO
The name of the rv field.

See Also:
Constant Field Values

KEY_VHELIOERR

public static final String KEY_VHELIOERR
The name of the rv error field.

See Also:
Constant Field Values

KEY_VSINI

public static final String KEY_VSINI
The name of the vsini field.

See Also:
Constant Field Values

KEY_VSINIERR

public static final String KEY_VSINIERR
The name of the vsini error field.

See Also:
Constant Field Values

KEY_TEFF

public static final String KEY_TEFF
The name of the Teff field.

See Also:
Constant Field Values

KEY_TEFFERR

public static final String KEY_TEFFERR
The name of the Teff error field.

See Also:
Constant Field Values

KEY_LOGG

public static final String KEY_LOGG
The name of the logg field.

See Also:
Constant Field Values

KEY_LOGGERR

public static final String KEY_LOGGERR
The name of the logg error field.

See Also:
Constant Field Values

KEY_METAL

public static final String KEY_METAL
The name of the metal field.

See Also:
Constant Field Values

KEY_METALERR

public static final String KEY_METALERR
The name of the metal error field.

See Also:
Constant Field Values

KEY_REGIONBUTTONS

public static final String KEY_REGIONBUTTONS
The names of the wavelength region buttons.

See Also:
Constant Field Values

KEY_REGIONRANGES

public static final String KEY_REGIONRANGES
To each name above, central wavelength plus width in Angstrom.

See Also:
Constant Field Values

KEY_USEBROWSER

public static final String KEY_USEBROWSER
If pick selection should also trigger a browser re-link

See Also:
Constant Field Values

KEY_BROWSER

public static final String KEY_BROWSER
The browser command line

See Also:
Constant Field Values

KEY_SIMBADHOST

public static final String KEY_SIMBADHOST
The simabd host.

See Also:
Constant Field Values

KEY_SIMBADID

public static final String KEY_SIMBADID
The simabd target identifier form field

See Also:
Constant Field Values

KEY_SIMBADPOSTID

public static final String KEY_SIMBADPOSTID
The simbad post-id part.

See Also:
Constant Field Values

KEY_DATEFORMAT

public static final String KEY_DATEFORMAT
The date formatter to use.

See Also:
Constant Field Values

PM

private static final String PM
The plus/minus char as a string.

See Also:
Constant Field Values

DEFSPECTRUMCOUNT

private static final int DEFSPECTRUMCOUNT
The default maximum spectrum number.

See Also:
Constant Field Values

DEFOVERLAYOFF

private static final double DEFOVERLAYOFF
The default offset between spectra on overplotting.

See Also:
Constant Field Values

DEFONED

private static final String DEFONED
The name of the lambda-zero parameter.

See Also:
Constant Field Values

DEFLAMBDAZERO

private static final String DEFLAMBDAZERO
The name of the lambda-zero parameter.

See Also:
Constant Field Values

DEFLAMBDASTEP

private static final String DEFLAMBDASTEP
The name of the lambda-stepwidth parameter.

See Also:
Constant Field Values

DEFBZERO

private static final String DEFBZERO
How to convert the one-d int to floats, offset.

See Also:
Constant Field Values

DEFBSCALE

private static final String DEFBSCALE
How to convert the one-d int to floats, scale.

See Also:
Constant Field Values

DEFRESTFRAME

private static final boolean DEFRESTFRAME
If true, convert to restframe.

See Also:
Constant Field Values

DEFOBJNAME

private static final String DEFOBJNAME
The name of the object field .

See Also:
Constant Field Values

DEFOBJRA

private static final String DEFOBJRA
The name of the object right ascension field field .

See Also:
Constant Field Values

DEFOBJDEC

private static final String DEFOBJDEC
The name of the object declination field .

See Also:
Constant Field Values

DEFVHELIO

private static final String DEFVHELIO
The name of the rv field.

See Also:
Constant Field Values

DEFVHELIOERR

private static final String DEFVHELIOERR
The name of the rv error field.

See Also:
Constant Field Values

DEFVSINI

private static final String DEFVSINI
The name of the vsini field.

See Also:
Constant Field Values

DEFVSINIERR

private static final String DEFVSINIERR
The name of the vsini error field.

See Also:
Constant Field Values

DEFTEFF

private static final String DEFTEFF
The name of the Teff field.

See Also:
Constant Field Values

DEFTEFFERR

private static final String DEFTEFFERR
The name of the Teff error field.

See Also:
Constant Field Values

DEFLOGG

private static final String DEFLOGG
The name of the logg field.

See Also:
Constant Field Values

DEFLOGGERR

private static final String DEFLOGGERR
The name of the logg error field.

See Also:
Constant Field Values

DEFMETAL

private static final String DEFMETAL
The name of the metal field.

See Also:
Constant Field Values

DEFMETALERR

private static final String DEFMETALERR
The name of the metal error field.

See Also:
Constant Field Values

DEFREGIONBUTTONS

private static final String DEFREGIONBUTTONS
The default regios.

See Also:
Constant Field Values

DEFREGIONRANGES

private static final String DEFREGIONRANGES
Their angstroms as a double-linked list.

See Also:
Constant Field Values

DEFSHOWFITTED

private static final boolean DEFSHOWFITTED
If true, fit of data is displayed if available.

See Also:
Constant Field Values

DEFUSEBROWSER

private static final boolean DEFUSEBROWSER
If pick selection should also trigger a browser re-link

See Also:
Constant Field Values

DEFBROWSER

private static final String DEFBROWSER
The browser command line

See Also:
Constant Field Values

DEFSIMBADHOST

private static final String DEFSIMBADHOST
The simabd host.

See Also:
Constant Field Values

DEFSIMBADID

private static final String DEFSIMBADID
The simabd target identifier form field

See Also:
Constant Field Values

DEFSIMBADPOSTID

private static final String DEFSIMBADPOSTID
The simbad post-id part.

See Also:
Constant Field Values

DEFDATEFORMAT

private static final DateFormat DEFDATEFORMAT
The default date formatter, known for this special chron.


multi

private JButton multi
A button with three states: replace, to tabs or overlay.


regions

private Map regions
Mapping of button names to central wavelength plus width.


current

private String current
The current region. On startup, always the first parsable.


count

private int count
The current spectrum number.


spectrum

private int[][] spectrum
The 1-d vectors mapping spectral intensity vs. lambda.


fitted

private int[][] fitted
The 1-d vectors mapping fitted intensity vs. lambda.


lam0

private double[] lam0
The starting point retrieved from db.


dlam

private double[] dlam
The wavelength step retrieved from db.


zero

private double[] zero
The zero point of the data retrieved from db.


scale

private double[] scale
The scale of the data retrieved from db.


canvas

private JTabbedPane canvas
The canvas we display the spectrum in.


star

private JLabel star
The name of the star from the obs database.


date

private JLabel date
The date of the observation.


datelabel

private String[] datelabel
The different date labels.


dateerr

private String[] dateerr
The different date labels.


rv

private JLabel rv
The RV from the reduced database.


rvlabel

private String[] rvlabel
The different rv.


rverr

private String[] rverr
The different rv errors.


vsini

private JLabel vsini
The vsini from the reduced database.


vsinilabel

private String[] vsinilabel
The different rv.


vsinierr

private String[] vsinierr
The different rv errors.


teff

private JLabel teff
The Teff from the reduced database.


tefflabel

private String[] tefflabel
The different rv.


tefferr

private String[] tefferr
The different rv errors.


metal

private JLabel metal
The metallicity from the reduced database.


metallabel

private String[] metallabel
The different rv.


metalerr

private String[] metalerr
The different rv errors.


logg

private JLabel logg
The logg from the reduced database.


logglabel

private String[] logglabel
The different rv.


loggerr

private String[] loggerr
The different rv errors.


time

private SettableTime time
Parameter for rest frame.


alp0

private RaTarget alp0
Parameter for rest frame.


alpha

private RaApparent alpha
Parameter for rest frame.


del0

private DecTarget del0
Parameter for rest frame.


delta

private DecApparent delta
Parameter for rest frame.


bv

private BarycentricVelocity bv
Parameter for rest frame.

Constructor Detail

JQuickDisplay

public JQuickDisplay(PropertyBearing prop)
              throws RemoteException
Constructs a new quick-view display.

Throws:
RemoteException

JQuickDisplay

public JQuickDisplay(Map<String,String> prop)
              throws RemoteException
Constructs a generic peripheral from a property container.

Throws:
RemoteException
Method Detail

setComposedProperties

public void setComposedProperties(PropertyBearing prop)
Defaults some properties.

Specified by:
setComposedProperties in interface PropertyAware
Overrides:
setComposedProperties in class JDatabaseDisplay

init

public void init()
On init, we try to convert the region buttons list to a lookup map of button labels to Point2Ds.

Specified by:
init in interface Initializable
Overrides:
init in class JMasterDisplay

getRepresentation

public Component getRepresentation()
Returns the data canvas.

Specified by:
getRepresentation in interface Displayable
Overrides:
getRepresentation in class JBorderFrame

stateChanged

public void stateChanged(ChangeEvent ce)
If we have multiple tab, we update the RV etc. displays.

Specified by:
stateChanged in interface ChangeListener

actionPerformed

public void actionPerformed(ActionEvent ae)
Grab the action buttons label and link it up with the regions.

Specified by:
actionPerformed in interface ActionListener
Overrides:
actionPerformed in class JClientFrame

getTableName

protected String getTableName()
Returns the table name.

Specified by:
getTableName in class JDatabaseDisplay

getRequestedFields

protected Map getRequestedFields()
The quick display request the scaling fields, the zero lambda and lamda stepwidth as well as the array itself.

Specified by:
getRequestedFields in class JDatabaseDisplay

getRightItems

protected List getRightItems()
To the right, we display the region buttons. Additionally, we have a choosable range.

Overrides:
getRightItems in class JBorderFrame

processLocally

protected boolean processLocally(HistoryAware.Pick pick)
Process the pick in a way that it retrieves the field needed from the database and updates the display.

Specified by:
processLocally in class JMasterDisplay

cacheData

private boolean cacheData(Map db,
                          Date obstime)
We cache the entire quick-look spectrum, meaning that we materialize the database array and convert it into a list of vectors, linking wavelength to intensity.

Returns:
true, if cache was updated.

createSpectralCanvas

private JDataCanvas createSpectralCanvas()
Creates a new spectral canvas. This canvas can than be filled with one-d spectra and shows up as a component in the central tabbed pane.


initCanvas

private void initCanvas(Vector2D central)
Initializes the canvas such that it converts the central wavelength and the region width in array offsets of our wavelength cache, does averaging, if required (if the number of points in the plotting canvas is less than the resolution elements) and updates the display.

Parameters:
central - the central wavelength plus the display width in y.

createSpectrum

private List createSpectrum(Vector2D central,
                            int[] oned,
                            double lam0,
                            double dlam,
                            double zero,
                            double scale,
                            int n)
Creates a list of plottable points from the one-d spectrum.

Parameters:
central - Central wavelength plus width of plot area.
oned - The integer spectrum,
lam0 - The starting wavelength of the integer spectrum
dlam - The stepwidth in wavelength
zero - Zero point in the integer spectrum.
scale - Scaling factor of the integer spectrum
n - Maximum length of returned list

normalize

private double normalize(int[] spec,
                         int index,
                         double zero,
                         double scale)
Converts the integer spectrum value to the reduced and normalized spextrum value. Index is not checked.


barycentricVelocity

private double barycentricVelocity(double ra,
                                   double de,
                                   Date at)
Takes right ascension and declination, both in degrees of the target and calculates the projected baryonic velocity of Earth onto the line of sight for the given date.


main

public static void main(String[] arg)
                 throws RemoteException
Launches a the allsky display

Throws:
RemoteException