|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
java.awt.Window
java.awt.Frame
javax.swing.JFrame
jview.JExitFrame
jview.JConfirmExitFrame
jview.JBorderFrame
jview.JOpenFrame
jview.JClientFrame
stella.jview.JMasterDisplay
stella.jview.JDatabaseDisplay
stella.jview.JSpectrumDisplay
public class JSpectrumDisplay
Allows the extraction and display of one-dim data from the database. The right row has some pre-defined buttons with spectral ranges.
| Nested Class Summary | |
|---|---|
static class |
JSpectrumDisplay.Client
Launches as a listener. |
static class |
JSpectrumDisplay.Save
Launches a standalone version of spectrum display. |
static class |
JSpectrumDisplay.Standalone
Launches a standalone version of spectrum display. |
| 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.BltBufferStrategy, Component.FlipBufferStrategy |
| Field Summary | |
|---|---|
private RaTarget |
alp0
Parameter for rest frame. |
private RaActual |
alpha
Parameter for rest frame. |
private BarycentricVelocity |
bv
Parameter for rest frame. |
private JDataCanvas |
canvas
The canvas we display the spectrum in. |
private JLabel |
date
The date of the observation. |
private static String |
DEFBINDNAME
Default bind name. |
private static DateFormat |
DEFDATEFORMAT
The default date formatter, known for this special chron. |
private static String |
DEFFILEACTIONS
The action commands used for identfiying file menu actions. |
private static String |
DEFFITSHEAD
The part of the file name before unique. |
private static String |
DEFFITSTAIL
The part of the file name after unique. |
private static String |
DEFLOCALDIR
The name of the local directory. |
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 String |
DEFREGIONBUTTONS
The default regios. |
private static String |
DEFREGIONRANGES
Their angstroms as a double-linked list. |
private static String |
DEFRESOURCEBUNDLES
The resource bundles for localized labels and text. |
private static boolean |
DEFRESTFRAME
If true, convert to restframe. |
private static String |
DEFSCPCOMMAND
The scp command to copy to local directory. |
private static boolean |
DEFSHOWFITTED
If true, fit of data is displayed if available. |
private static DateFormat |
DEFSUBDIRFORMAT
The name of the local directory. |
private static String |
DEFTEFF
The name of the Teff field. |
private static String |
DEFTEFFERR
The name of the Teff error field. |
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 DecActual |
delta
Parameter for rest frame. |
private Double |
doppler
The doppler shift, if rest frame is required. |
private JCheckBox |
errorbar
Toggles error bars. |
private SpectralFits |
fitted
The spectrum provider for the fited data. |
static String |
FITTED
Name of one-dim spectrum. |
static String |
KEY_DATEFORMAT
The date formatter to use. |
static String |
KEY_FITSHEAD
The part of the file name before unique. |
static String |
KEY_FITSTAIL
The part of the file name after unique. |
static String |
KEY_FITTED
The class name of the fitted array. |
static String |
KEY_LOCALDIR
The name of the local directory. |
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 class name of the spectrum producer. |
static String |
KEY_REGIONBUTTONS
The names of the wavelength region buttons. |
static String |
KEY_REGIONRANGES
To each name above, the order number. |
static String |
KEY_RESTFRAME
If true, calculate rest-frame wavelength. |
static String |
KEY_SCPCOMMAND
The scp command to copy to local directory. |
static String |
KEY_SHOWFITTED
If false, fitted data is not shown. |
static String |
KEY_SPECTRUM
The properties of the data canvas displaying the spectrum. |
static String |
KEY_SUBDIRFORMAT
The name of the local directory. |
static String |
KEY_TEFF
The name of the Teff field. |
static String |
KEY_TEFFERR
The name of the Teff error field. |
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 JLabel |
lamlam
And the wavelength range for that. |
private JLabel |
logg
The logg from the reduced database. |
private JLabel |
metal
The metallicity from the reduced database. |
private MySpinner |
order
The currently displayed order. |
private static String |
ORDER
Action command for spinner. |
private static String |
PM
The plus/minus char as a string. |
private SpectralFits |
reduced
The spectrum provider for the reduced data. |
private Map<String,Integer> |
regions
Mapping of button names to Echelle order. |
private JCheckBox |
restframe
Toggles doppler shift. |
private JLabel |
rv
The RV from the reduced database. |
static String |
SPECTRUM
Name of one-dim spectrum. |
private JLabel |
star
The name of the star from the obs database. |
private JLabel |
teff
The Teff from the reduced database. |
private FakeTime |
time
Parameter for rest frame. |
private JLabel |
vsini
The vsini from the reduced database. |
| 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_SWITCHMONITOR |
| Fields inherited from class jview.JClientFrame |
|---|
CONNECTACTION, DISCONNECTACTION, KEY_CONNECTONINIT, KEY_ICONCONNECT, KEY_ICONDISCONNECT |
| Fields inherited from class jview.JOpenFrame |
|---|
EMPTYACTION, EXITACTION, 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_HELPSIZE, KEY_LESSERSTRUT, 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 | |
|---|---|
JSpectrumDisplay(Map<String,String> prop)
Constructs a generic peripheral from a property container. |
|
JSpectrumDisplay(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<String,Object> 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. |
FileFilter |
getOpenFilter()
Returns a file filter allowing only fits files. |
protected Component |
getPrintRepresentation()
For saving, we return the spectral component only |
Component |
getRepresentation()
Returns the data canvas. |
protected Map<String,Method> |
getRequestedFields()
The quick display request the scaling fields, the zero lambda and lamda stepwidth as well as the array itself. |
protected List<Object> |
getRightItems()
To the right, we display the region buttons. |
protected Component |
getSaveRepresentation()
For saving, we return the spectral component only |
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(int order)
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. |
private boolean |
loadSpectrum(String unique)
We load the spectrum that has been transferred to the local machine. |
protected void |
openFile(File spec)
Opens the file, which resides locally on the file system. |
protected boolean |
processExternally(HistoryAware.Pick pick)
Tries to find the reduced spectrum in the archive and copies it to the local host. |
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. |
| Methods inherited from class stella.jview.JDatabaseDisplay |
|---|
getRequestedNames, getResultSetMethod, getUserName, lookUp, queryDatabase, querySingle |
| Methods inherited from class stella.jview.JMasterDisplay |
|---|
connect, disconnect, execute, execute, getIcon, getRefreshInterval, isFixedRate, processPick, refresh |
| Methods inherited from class jview.JClientFrame |
|---|
abolishConnection, createConnect, establishConnection, exit, getBottomItems |
| Methods inherited from class jview.JOpenFrame |
|---|
createCheckBoxMenuItem, createLocalizedCheckBoxMenuItem, getHelpActions, getMenus, getSaveFilter, populateMenu, printCenter, saveFile |
| Methods inherited from class jview.JConfirmExitFrame |
|---|
disposeAndExit |
| Methods inherited from class jview.JExitFrame |
|---|
setVisible |
| Methods inherited from class java.awt.Frame |
|---|
addNotify, finalize, 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.lang.Object |
|---|
clone, equals, 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 |
|---|
public static final String SPECTRUM
public static final String FITTED
public static final String KEY_FITSHEAD
public static final String KEY_FITSTAIL
public static final String KEY_LOCALDIR
public static final String KEY_SUBDIRFORMAT
public static final String KEY_SCPCOMMAND
public static final String KEY_SPECTRUM
public static final String KEY_ONED
public static final String KEY_FITTED
public static final String KEY_SHOWFITTED
public static final String KEY_RESTFRAME
public static final String KEY_OBJNAME
public static final String KEY_OBJRA
public static final String KEY_OBJDEC
public static final String KEY_VHELIO
public static final String KEY_VHELIOERR
public static final String KEY_VSINI
public static final String KEY_VSINIERR
public static final String KEY_TEFF
public static final String KEY_TEFFERR
public static final String KEY_LOGG
public static final String KEY_LOGGERR
public static final String KEY_METAL
public static final String KEY_METALERR
public static final String KEY_REGIONBUTTONS
public static final String KEY_REGIONRANGES
public static final String KEY_DATEFORMAT
private static final String ORDER
private static final String PM
private static final String DEFBINDNAME
private static final String DEFONED
private static final boolean DEFRESTFRAME
private static final String DEFOBJNAME
private static final String DEFOBJRA
private static final String DEFOBJDEC
private static final String DEFVHELIO
private static final String DEFVHELIOERR
private static final String DEFVSINI
private static final String DEFVSINIERR
private static final String DEFTEFF
private static final String DEFTEFFERR
private static final String DEFLOGG
private static final String DEFLOGGERR
private static final String DEFMETAL
private static final String DEFMETALERR
private static final String DEFREGIONBUTTONS
private static final String DEFREGIONRANGES
private static final boolean DEFSHOWFITTED
private static final DateFormat DEFDATEFORMAT
private static final String DEFFITSHEAD
private static final String DEFFITSTAIL
private static final String DEFLOCALDIR
private static final DateFormat DEFSUBDIRFORMAT
private static final String DEFSCPCOMMAND
private static final String DEFFILEACTIONS
private static final String DEFRESOURCEBUNDLES
private Map<String,Integer> regions
private MySpinner order
private JLabel lamlam
private JDataCanvas canvas
private JLabel star
private JLabel date
private JLabel rv
private JLabel vsini
private JLabel teff
private JLabel metal
private JLabel logg
private JCheckBox errorbar
private JCheckBox restframe
private Double doppler
private FakeTime time
private RaTarget alp0
private RaActual alpha
private DecTarget del0
private DecActual delta
private BarycentricVelocity bv
private SpectralFits reduced
private SpectralFits fitted
| Constructor Detail |
|---|
public JSpectrumDisplay(PropertyBearing prop)
throws RemoteException
RemoteException
public JSpectrumDisplay(Map<String,String> prop)
throws RemoteException
RemoteException| Method Detail |
|---|
public void setComposedProperties(PropertyBearing prop)
setComposedProperties in interface PropertyComposedsetComposedProperties in class JDatabaseDisplaypublic void init()
init in interface Initializableinit in class JMasterDisplaypublic void actionPerformed(ActionEvent ae)
actionPerformed in interface ActionListeneractionPerformed in class JClientFramepublic Component getRepresentation()
getRepresentation in interface DisplayablegetRepresentation in class JBorderFramepublic FileFilter getOpenFilter()
getOpenFilter in class JOpenFrameprotected Component getSaveRepresentation()
getSaveRepresentation in class JOpenFrameprotected Component getPrintRepresentation()
getPrintRepresentation in class JOpenFrameprotected List<Object> getRightItems()
getRightItems in class JBorderFrameprotected String getTableName()
getTableName in class JDatabaseDisplayprotected Map<String,Method> getRequestedFields()
getRequestedFields in class JDatabaseDisplayprotected boolean processLocally(HistoryAware.Pick pick)
processLocally in class JMasterDisplayprotected boolean processExternally(HistoryAware.Pick pick)
processExternally in class JDatabaseDisplayprivate boolean loadSpectrum(String unique)
protected void openFile(File spec)
openFile in class JMasterDisplay
private boolean cacheData(Map<String,Object> db,
Date obstime)
private JDataCanvas createSpectralCanvas()
private void initCanvas(int order)
central - the central wavelength plus the display width in y.
private double barycentricVelocity(double ra,
double de,
Date at)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||