|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectutil.PropertyContainer
util.PropertyResources
util.PropertyBundles
jview.AbstractDisplayable
stella.jview.JSpectrumCanvas
public class JSpectrumCanvas
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 |
|---|
| Nested classes/interfaces inherited from class util.PropertyResources |
|---|
PropertyResources.URLResource |
| Field Summary | |
|---|---|
private RaTarget |
alp0
Parameter for rest frame. |
private RaApparent |
alpha
Parameter for rest frame. |
private Thread |
animthread
Animation thread, mainly for gadget. |
private BarycentricVelocity |
bv
Parameter for rest frame. |
private boolean |
cancel
Inter-process signal. |
private JDataCanvas |
canvas
The canvas we display the spectrum in. |
static String |
COLON
|
private JLabel |
date
The date of the observation. |
private static long |
DEFANIMATEGADGET
Default playback period (ms). |
private static DateFormat |
DEFDATEFORMAT
The default date formatter, known for this special chron. |
private static boolean |
DEFOVERPLOTTING
Default overplotting. |
private static long |
DEFPLAYBACK
Default playback period (ms). |
private static boolean |
DEFRESTFRAME
If true, convert to restframe. |
private static int |
DEFSGSHALFWIDTH
Default half-length of smoothing set. |
private static int |
DEFSGSORDER
Default order of the SG-smoothing. |
private static boolean |
DEFSHOWFITTED
If true, fit of data is displayed if available. |
private static boolean |
DEFSHOWSMOOTH
Default no smoothing shown. |
private DecTarget |
del0
Parameter for rest frame. |
private DecApparent |
delta
Parameter for rest frame. |
private List<Double> |
doppler
The Doppler shift, if rest frame is required. |
private List<SpectralFits> |
fitted
The spectrum provider for the fited data. |
static String |
FITTED
Name of one-dim spectrum. |
static String |
KEY_ANIMATEGADGET
Playback frame rate. |
static String |
KEY_DATEFORMAT
The date formatter to use. |
static String |
KEY_OVERPLOTTING
True, if plots are superimposed. |
static String |
KEY_PLAYBACK
Playback frame rate. |
static String |
KEY_RESTFRAME
If true, calculate rest-frame wavelength. |
static String |
KEY_SGSHALFWIDTH
The number of data points to the left and to the right, half of total. |
static String |
KEY_SGSORDER
The order of the SavitzkyGolaySmoothing employed. |
static String |
KEY_SHOWFITTED
If false, fitted data is not shown. |
static String |
KEY_SHOWSMOOTH
If true, we try to add smoothened data. |
static String |
KEY_SPECTRUM
The properties of the data canvas displaying the spectrum. |
private double |
lamdamax
Minimum angstrom lambda of display. |
private double |
lamdamin
Minimum angstrom lambda of display. |
private List<SpectralFits> |
reduced
The spectrum provider for the reduced data. |
private Box |
representation
The buffered representation. |
static String |
SMOOTH
Name of one-dim spectrum smoothened. |
static String |
SPECTRUM
Name of one-dim spectrum. |
private JLabel |
star
The name of the star from the obs database. |
private SettableTime |
time
Parameter for rest frame. |
private JPanel |
variables
The RV from the reduced database. |
| Fields inherited from class jview.AbstractDisplayable |
|---|
KEY_COMPONENTNAME, KEY_ICON, KEY_INSETS |
| Fields inherited from class util.PropertyBundles |
|---|
KEY_LOCALECOUNTRY, KEY_LOCALELANGUAGE, KEY_RESOURCEBUNDLES |
| Fields inherited from class util.PropertyResources |
|---|
KEY_NOINITONCREATE, localurl, locate, POSTFIX_DIR, POSTFIX_EXT, POSTFIX_FILE, POSTFIX_LIST, POSTFIX_URL, urlset |
| Fields inherited from class util.PropertyContainer |
|---|
KEY_LISTSEPARATOR, KEY_MAPKEYVALUECHAR, KEY_MAPSEPARATOR |
| Fields inherited from interface util.ResourceSupplying |
|---|
KEY_URLRESOURCES, KEY_URLUSECONFIG, KEY_URLUSECURRENT, KEY_URLUSEHOME |
| Fields inherited from interface util.PropertySupplying |
|---|
CONFIG, KEY_CLASS |
| Constructor Summary | |
|---|---|
JSpectrumCanvas(Map<String,String> prop)
Constructs a generic peripheral from a property container. |
|
| Method Summary | |
|---|---|
void |
addFitted(SpectralFits o)
Adds the spectral fits object to our reduced list. |
void |
addReduced(SpectralFits o)
Adds the spectral fits object to our reduced list. |
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. |
protected int |
centerCanvas(double angstrom,
double step)
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 JDataCanvas |
createSpectralCanvas()
Creates a new spectral canvas. |
static Component |
createVariableLabel(Variable v)
Creates a component displaying a variable |
private List<Vector3D[]> |
extractSpectra(int order,
boolean dopcor)
|
int |
getBiggerStrut()
For layout purposes get the size of a bigger strut. |
Collection<JDataCanvas> |
getComposingCanvases()
Only for specialized objects, this method will return more than the main canvas. |
int |
getLesserStrut()
For layout purposes get the size of a lesser strut. |
JDataCanvas |
getMainCanvas()
Grabs a whole canvas of display data. |
double |
getMaximumLambda()
Returns currently displayed minimum lambda. |
double |
getMinimumLambda()
Returns currently displayed minimum lambda. |
Component |
getRepresentation()
Returns the data canvas. |
void |
init()
On init, we try to convert the region buttons list to a lookup map of button labels to Point2Ds. |
boolean |
isDoppler()
Checks, if we have doppler shifts for all spectra, meaning that we can shift to rest frame for all spectra. |
boolean |
isOverplotting()
Returns the status of the overplotting flag. |
boolean |
isRestframe()
Returns the status of the overplotting flag. |
private int[] |
prepareCanvas(List<Vector3D[]> spec,
boolean overpl,
double step)
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. |
protected void |
purgeAll()
Purges all but the last spectra. |
protected void |
purgeLast()
Purges just the last spectra. |
String |
setStar(Date central,
long duration,
StarDescription rvstar,
Variable vhelio)
We set the targetname plus other required parameters for proper display. |
String |
setStar(Date central,
long duration,
StarDescription rvstar,
Variable vhelio,
List<Variable> add)
We set the targetname plus other required parameters for proper display. |
protected void |
showCanvas(int order,
double step)
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 double |
smoothSpectrum(Vector3D[] meas,
List<Vector3D> fillin)
|
protected void |
startAnimation(int o,
double fstep,
double ds)
Animates the drawing in its own thread, can be called from event queue. |
protected void |
stopAnimation(int o,
double step)
|
| Methods inherited from class jview.AbstractDisplayable |
|---|
getComponentName, getIcon, getIcon |
| Methods inherited from class util.PropertyBundles |
|---|
clone, getLocalized, getLocalized, getLocalizedString, getLocalizedString, loadResource |
| Methods inherited from class util.PropertyResources |
|---|
createFrom, createFrom, createFrom, getApplet, getAsResources, getLocalClassLoader, getPropertiesToKey, getPropertiesToKey, getResource, getResourceAsStream, getResourceFromKey, getResources, keyCreate, keyCreate, reload, setApplet |
| Methods inherited from class util.PropertyContainer |
|---|
augment, augment, augment, defaultBoolean, defaultChar, defaultDouble, defaultFloat, defaultInt, defaultLong, defaultObject, defaultObject, defaultProperties, defaultProperty, getAsBoolean, getAsChar, getAsDouble, getAsEnums, getAsFloat, getAsInt, getAsList, getAsLong, getAsMap, getAsMap, getAsObject, getAsObject, getProperties, getProperty, has, isNew, parseObject, reload, removeProperty, rescanned, setObject, setProperties, setProperty, stringProperties, toString |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface util.ResourceSupplying |
|---|
getResource, getResourceAsStream, getResources |
| Methods inherited from interface util.PropertySupplying |
|---|
defaultBoolean, defaultChar, defaultDouble, defaultFloat, defaultInt, defaultLong, defaultObject, defaultObject, defaultProperties, defaultProperty, getAsBoolean, getAsChar, getAsDouble, getAsFloat, getAsInt, getAsList, getAsLong, getAsMap, getAsObject, getAsObject, getProperties, getProperty, has, parseObject, removeProperty, setObject, setProperty, stringProperties |
| Field Detail |
|---|
public static final String COLON
public static final String SPECTRUM
public static final String SMOOTH
public static final String FITTED
public static final String KEY_SPECTRUM
public static final String KEY_SHOWFITTED
public static final String KEY_DATEFORMAT
public static final String KEY_RESTFRAME
public static final String KEY_OVERPLOTTING
public static final String KEY_PLAYBACK
public static final String KEY_ANIMATEGADGET
public static final String KEY_SHOWSMOOTH
public static final String KEY_SGSORDER
SavitzkyGolaySmoothing employed.
public static final String KEY_SGSHALFWIDTH
private static final boolean DEFRESTFRAME
private static final boolean DEFSHOWFITTED
private static final DateFormat DEFDATEFORMAT
private static final boolean DEFOVERPLOTTING
private static final long DEFPLAYBACK
private static final long DEFANIMATEGADGET
private static final boolean DEFSHOWSMOOTH
private static final int DEFSGSORDER
private static final int DEFSGSHALFWIDTH
private Box representation
private JDataCanvas canvas
private JLabel star
private JLabel date
private JPanel variables
private SettableTime time
private RaTarget alp0
private RaApparent alpha
private DecTarget del0
private DecApparent delta
private BarycentricVelocity bv
private List<Double> doppler
private List<SpectralFits> reduced
private List<SpectralFits> fitted
private Thread animthread
private boolean cancel
private double lamdamin
private double lamdamax
| Constructor Detail |
|---|
public JSpectrumCanvas(Map<String,String> prop)
| Method Detail |
|---|
public void init()
init in interface Initializableinit in class PropertyResourcespublic Component getRepresentation()
getRepresentation in interface Displayablepublic int getLesserStrut()
public int getBiggerStrut()
public JDataCanvas getMainCanvas()
DataCanvasProvidingDataCanvasProviding.getComposingCanvases().
getMainCanvas in interface DataCanvasProvidingpublic Collection<JDataCanvas> getComposingCanvases()
DataCanvasProviding
getComposingCanvases in interface DataCanvasProvidingpublic boolean isDoppler()
public boolean isOverplotting()
public boolean isRestframe()
public String setStar(Date central,
long duration,
StarDescription rvstar,
Variable vhelio)
public String setStar(Date central,
long duration,
StarDescription rvstar,
Variable vhelio,
List<Variable> add)
addReduced(astro.SpectralFits)
public void addReduced(SpectralFits o)
public void addFitted(SpectralFits o)
protected void purgeAll()
protected void purgeLast()
private JDataCanvas createSpectralCanvas()
public static Component createVariableLabel(Variable v)
v - The variable - may not be null
protected int centerCanvas(double angstrom,
double step)
throws nom.tam.fits.FitsException
angstrom - The wavelength to displaystep - Offset
nom.tam.fits.FitsException
protected void showCanvas(int order,
double step)
throws nom.tam.fits.FitsException
order - The Echelle order to display.step - Offset
nom.tam.fits.FitsExceptionpublic double getMinimumLambda()
public double getMaximumLambda()
private List<Vector3D[]> extractSpectra(int order,
boolean dopcor)
throws nom.tam.fits.FitsException
nom.tam.fits.FitsException
private int[] prepareCanvas(List<Vector3D[]> spec,
boolean overpl,
double step)
private double smoothSpectrum(Vector3D[] meas,
List<Vector3D> fillin)
protected void startAnimation(int o,
double fstep,
double ds)
protected void stopAnimation(int o,
double step)
throws nom.tam.fits.FitsException
nom.tam.fits.FitsException
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 | |||||||||