stella.adapter
Class CenterOfGravityShift
java.lang.Object
util.PropertyContainer
util.PropertyResources
util.PropertyBundles
stella.adapter.AbstractPinholeShift
stella.adapter.CenterOfGravityShift
- All Implemented Interfaces:
- Cloneable, PinholeShift, Initializable, LocalizedSupplying, PropertySupplying, ResourceSupplying
public class CenterOfGravityShift
- extends AbstractPinholeShift
Simple implementation of a pinhole shift detector. From a fixed pinhole
position given in the properties, we calculate the shift be appyling a
simple center-of-gravity method. The center of gravity is not necessarily
the true shift from the pinhole. This can be in a simple way accounted
for by the gain factor, splitted for convenience into an x and y gain
factor. The recommended way, though, is to feed the shifts derived from this
class into a PID control, adjusting the P-term accordingly.
|
Field Summary |
private static double |
DEFXGAIN
Default gain factor from fitting artificial images. |
private static double |
DEFYGAIN
Default gain factor from fitting artificial images. |
static String |
KEY_XGAIN
This key is the scaling of the center of gravity shift. |
static String |
KEY_YGAIN
This key is the scaling of the center of gravity shift. |
|
Method Summary |
Vector2D |
getBackground(nom.tam.fits.ImageHDU hdu)
This method calculates the background as the median of a frame at the
outer edge of the apllicable window. |
Point2D |
initFiberView(nom.tam.fits.Fits ccd)
Returns the center of gravity shift of the image from the pinhole
position. |
| Methods inherited from class stella.adapter.AbstractPinholeShift |
backgroundFrameMean, backgroundFrameMedian, backgroundMean, backgroundMedian, getAduSignal, getApplicableWindow, getFlux, getFwhm, getPinholePosition, getSignalToNoise, init |
| 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 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 |
KEY_XGAIN
public static final String KEY_XGAIN
- This key is the scaling of the center of gravity shift.
- See Also:
- Constant Field Values
KEY_YGAIN
public static final String KEY_YGAIN
- This key is the scaling of the center of gravity shift.
- See Also:
- Constant Field Values
DEFXGAIN
private static final double DEFXGAIN
- Default gain factor from fitting artificial images.
- See Also:
- Constant Field Values
DEFYGAIN
private static final double DEFYGAIN
- Default gain factor from fitting artificial images.
- See Also:
- Constant Field Values
CenterOfGravityShift
public CenterOfGravityShift(Map<String,String> prop)
- Constructs a new CenterOfGravityShift object.
getBackground
public Vector2D getBackground(nom.tam.fits.ImageHDU hdu)
- This method calculates the background as the median of a frame at the
outer edge of the apllicable window.
- Returns:
- The background ADU in x and its ADU-sigma in y.
initFiberView
public Point2D initFiberView(nom.tam.fits.Fits ccd)
- Returns the center of gravity shift of the image from the pinhole
position. The true center of gravity is scaled with two functions
to return true shifts.
- Parameters:
ccd - The image of the pinhole entrance
- Returns:
- The pixel shift from the pinhole center to the star.