|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectutil.PropertyContainer
util.PropertyResources
util.PropertyBundles
stella.parameter.AbstractParameter
stella.parameter.AbstractRemoteParameter
stella.parameter.AbstractFitsParameter
stella.parameter.FitsMoments
public class FitsMoments
Fits moments calculates statistical moments of the ADU distribution. It does not calculate image moments, no x/y info of the image is stored.
This parameter is best situated in the VM that also does the fits retireval. To allow outside masters access to it, the moments can be queried as a remote parameter.
| Nested Class Summary | |
|---|---|
private class |
FitsMoments.Calculate
The thread that calculates the moments. |
static class |
FitsMoments.File
Takes a fits file and processes it. |
| Nested classes/interfaces inherited from class util.PropertyResources |
|---|
PropertyResources.URLResource |
| Field Summary | |
|---|---|
private Rectangle |
box
The read-out window for moment calculation if no frame registered. |
private FitsMoments.Calculate |
calcthread
The thread that does the calculation. |
private static boolean |
DEFBIND
The default auto-binding as a RemoteParameter. |
static String |
DEFBINDNAME
Default binding name. |
private static String |
DEFFRAMENAME
Default frame. |
private static int |
DEFMOMENTORDER
Default order of the central moments. |
static String |
DEFNAME
My default name. |
private static boolean |
DEFUSECACHED
The default auto-binding as a RemoteParameter. |
private Parameter |
frameprovider
The frame provider used to get the moments window. |
static String |
KEY_BIND
The key in the Map for auto-binding of the trigger. |
static String |
KEY_FRAMENAME
This is the name of the frame providing parameter we use |
static String |
KEY_MOMENTORDER
We calculate up to this moment order. |
static String |
KEY_MOMENTWINDOW
The window we take pixels from |
static String |
KEY_ORDERNAME
This is the name of the order providing parameter we use |
static String |
KEY_TARGETNAME
This is the name of the order providing parameter we use |
static String |
KEY_USECACHED
If false we wait for the new moments to be calculated. |
private Object |
oldname
The name of the target when the last fits was registered. |
private int |
order
The order to which moments are calculated. |
private Value |
orderprovider
The order provider used to get the moments order to which we calc. |
private List<CentralMoments> |
quadrants
The pixel extracted from the fits file as a list of Doubles. |
private List<RmiListener> |
stubs
A list of registered rmi listners. |
private Parameter |
targetname
The target name. |
| Fields inherited from class stella.parameter.AbstractParameter |
|---|
KEY_FORMAT, KEY_NAME, KEY_PRESERVE, UNKNOWN |
| 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.PropertySupplying |
|---|
CONFIG, KEY_CLASS |
| Fields inherited from interface util.ResourceSupplying |
|---|
KEY_URLRESOURCES, KEY_URLUSECONFIG, KEY_URLUSECURRENT, KEY_URLUSEHOME |
| Constructor Summary | |
|---|---|
FitsMoments(Map<String,String> prop)
Constructs a new fits-order moments parameter. |
|
| Method Summary | |
|---|---|
void |
addRmiListener(RmiListener ear)
Adds a listener for notification on exit. |
boolean |
bindToRegistry()
Binds to registry. |
List<CentralMoments> |
blockGet()
Always wait for the calc thread to exit. |
void |
exit()
Unbinds from registry, if bound. |
Object |
get()
Returns all moments accumulated. |
Rectangle |
getBox()
We return the current moment frame or null if none is set. |
int |
getOrder()
We return the current active moment oreder. |
List<CentralMoments> |
getQuadrants()
Returns all moments accumulated. |
void |
init()
We scan our default properties for a possible read-out window and use the default order. |
boolean |
isValid()
Returns true. |
protected boolean |
processFits(nom.tam.fits.Fits file,
Rectangle readout,
Dimension bin,
Date when,
long registered,
double expt)
The fits file should be registered just when the fits file resides in memory. |
void |
registerParameter(Parameter p)
We register a frame parameter of the name KEY_FRAMENAME |
Object |
remoteGet()
The remote edge of this trigger. |
void |
removeRmiListener(RmiListener ear)
Removes a listener. |
void |
setBox(Rectangle b)
We set the current moment frame or null if none is ddesired. |
void |
setOrder(int o)
We set the current active moment oreder. |
boolean |
unbindFromRegistry()
Unbinds from registry. |
| Methods inherited from class stella.parameter.AbstractFitsParameter |
|---|
getDateObs, getExposureTime, getRegistered, registerFits, registerMonitor, rmiDateObs, rmiExposureTime, rmiRegistered, set, setDateObs, setExposureTime, setRegistered |
| Methods inherited from class stella.parameter.AbstractRemoteParameter |
|---|
rescanned |
| Methods inherited from class stella.parameter.AbstractParameter |
|---|
createParameter, delivers, getFormatted, getFormatted, getName, getPreserveFile, getString, getString, register, setName, toString |
| 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, setObject, setProperties, setProperty, stringProperties |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| 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 |
| Methods inherited from interface util.ResourceSupplying |
|---|
getResource, getResourceAsStream, getResources |
| Field Detail |
|---|
public static final String KEY_MOMENTWINDOW
public static final String KEY_MOMENTORDER
public static final String KEY_FRAMENAME
public static final String KEY_ORDERNAME
public static final String KEY_TARGETNAME
public static final String KEY_BIND
public static final String KEY_USECACHED
public static final String DEFNAME
public static final String DEFBINDNAME
private static final int DEFMOMENTORDER
private static final String DEFFRAMENAME
private static final boolean DEFBIND
RemoteParameter.
private static final boolean DEFUSECACHED
RemoteParameter.
private List<CentralMoments> quadrants
private List<RmiListener> stubs
private int order
private Rectangle box
private Parameter frameprovider
private Parameter targetname
private Object oldname
private Value orderprovider
private FitsMoments.Calculate calcthread
| Constructor Detail |
|---|
public FitsMoments(Map<String,String> prop)
throws RemoteException
RemoteException| Method Detail |
|---|
public void init()
init in interface Initializableinit in class AbstractRemoteParameterpublic void exit()
exit in interface ExitCleaningexit in class AbstractRemoteParameterpublic void registerParameter(Parameter p)
KEY_FRAMENAME
registerParameter in interface ParameterDependingpublic int getOrder()
public void setOrder(int o)
public Rectangle getBox()
public void setBox(Rectangle b)
protected boolean processFits(nom.tam.fits.Fits file,
Rectangle readout,
Dimension bin,
Date when,
long registered,
double expt)
processFits in class AbstractFitsParameterfile - The fits object holding the datareadout - The readout framebin - The applied binningwhen - The time of the exposure or the register time, if dateobs unknown.registered - The time this fits was registered.expt - Exposure time in seconds.public Object get()
get in interface Parameterpublic List<CentralMoments> blockGet()
public List<CentralMoments> getQuadrants()
public boolean bindToRegistry()
throws RemoteException
bindToRegistry in interface RmiCasterbindToRegistry in class AbstractRemoteParameterRemoteException
public boolean unbindFromRegistry()
throws RemoteException
unbindFromRegistry in interface RmiCasterunbindFromRegistry in class AbstractRemoteParameterRemoteException
public Object remoteGet()
throws RemoteException
remoteGet in interface RemoteParameterremoteGet in class AbstractRemoteParameterRemoteException
public void addRmiListener(RmiListener ear)
throws RemoteException
addRmiListener in interface RemoteParameteraddRmiListener in class AbstractFitsParameterRemoteException
public void removeRmiListener(RmiListener ear)
throws RemoteException
removeRmiListener in interface RemoteParameterremoveRmiListener in class AbstractFitsParameterRemoteException
public boolean isValid()
throws RemoteException
isValid in interface RmiCasterisValid in class AbstractRemoteParameterRemoteException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||