stella.adapter
Class AveragePinhole

java.lang.Object
  extended by util.PropertyContainer
      extended by util.PropertyResources
          extended by util.PropertyBundles
              extended by stella.adapter.AbstractPinholeShift
                  extended by stella.adapter.AbstractPinholeModel
                      extended by stella.adapter.AveragePinhole
All Implemented Interfaces:
Cloneable, PinholeShift, Initializable, LocalizedSupplying, PropertySupplying, ResourceSupplying

public class AveragePinhole
extends AbstractPinholeModel

Class that determines the pixel shift between pinhole and star plus the pinhole drift to the zero position, all by modelling the star plus pinhole. This should be used on high signal-to-noise data, like averaged guiding frames. To allow for smeared images, we do not use a moffat function, but rather a gauss profile. The pinhole is moddeled as

   ph(r)=1+(atan(k*(x-FWHM/2))-atan(k*(x+FWHM/2)))/π,
   
where bigger k's mean steeper slope. A plot can be found . This class models the fwhm of the pinhole, its steepness factor k and its remainder reflectivity, all these must have good starting values in the pinhole parameters named size, steep, deep. Additionally to the shift of the pinhole, we also get a hold on the seeing and total flux of the star.

This class is similar to ModelShift, but it goes a step further and also models pinhole movements. This can only be used on very high S/N date.


Nested Class Summary
static class AveragePinhole.FullPinhole
          A pinhole model is the model of a star with fitted intensity and FWHM close to the fixed pinhole position at the given coordinates.
static class AveragePinhole.Test
          Test class.
 
Nested classes/interfaces inherited from class stella.adapter.AbstractPinholeModel
AbstractPinholeModel.PinholeModel
 
Nested classes/interfaces inherited from class stella.adapter.AbstractPinholeShift
AbstractPinholeShift.Background, AbstractPinholeShift.Evaluate, AbstractPinholeShift.Reconstruct
 
Nested classes/interfaces inherited from class util.PropertyResources
PropertyResources.URLResource
 
Field Summary
private static boolean DEFFITDEEP
           
private static boolean DEFFITSTEEP
           
private static double DEFMOFFATBETA
          The moffat-beta, 4.765 is literature value.
private static double DEFPINHOLEDEEP
          Broad-band anti-reflective coating, typically.
private static double DEFPINHOLESIZE
          Default size (FWHM) of pinhole, pixel.
private static double DEFPINHOLESTEEP
          Pinhole model steepness.
static String KEY_FITDEEP
          The pinhole model minimum transmission .
static String KEY_FITSTEEP
          The pinhole model minimum transmission .
static String KEY_MOFFATBETA
          The moffat-beta, 4.765 is literature value.
static String KEY_PINHOLEDEEP
          The pinhole model minimum transmission .
static String KEY_PINHOLESIZE
          The pinhole diameter.
static String KEY_PINHOLESTEEP
          The pinhole model steepness .
 
Fields inherited from class stella.adapter.AbstractPinholeModel
fit, KEY_MU, KEY_PIXELSCALE, KEY_USESIMPLEX
 
Fields inherited from class stella.adapter.AbstractPinholeShift
KEY_ADNOISE, KEY_APPLICABLE, KEY_GAIN, KEY_PINHOLE, KEY_SIGMACLIP, KEY_SKYTHICK
 
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
AveragePinhole(Map<String,String> prop)
          Constructs a model-shift.
 
Method Summary
protected  AbstractPinholeModel.PinholeModel generatePinholeModel(nom.tam.fits.ImageHDU hdu, Rectangle frame, double back, double backerr, Point2D pinhole)
          This method intializes the pinhole model used in the fitting process during initFiberView(nom.tam.fits.Fits).
 Vector2D getBackground(nom.tam.fits.ImageHDU hdu)
          This method calculates the background as the median of a frame at the outer edge of the applicable window.
 double getFlux()
          Returns the total flux from the last solution, if possible.
 double getFwhm()
          Returns the fwhm from the last solution, if possible.
 Point2D getPinholePosition()
          Returns the pinhole position.
 Point2D getStarPosition()
          Returns the star position.
 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.AbstractPinholeModel
getGnuPlotLines, getMeasures, getModel, getModel, getRelativeStarModel, getRemainingFlux, getResiduals, getRms, getSolution, getStarModel, sumup
 
Methods inherited from class stella.adapter.AbstractPinholeShift
backgroundFrameMean, backgroundFrameMedian, backgroundMean, backgroundMedian, getAduSignal, getApplicableWindow, getSignalToNoise, init
 
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

KEY_MOFFATBETA

public static final String KEY_MOFFATBETA
The moffat-beta, 4.765 is literature value.

See Also:
Constant Field Values

KEY_PINHOLESIZE

public static final String KEY_PINHOLESIZE
The pinhole diameter.

See Also:
Constant Field Values

KEY_PINHOLESTEEP

public static final String KEY_PINHOLESTEEP
The pinhole model steepness .

See Also:
Constant Field Values

KEY_PINHOLEDEEP

public static final String KEY_PINHOLEDEEP
The pinhole model minimum transmission .

See Also:
Constant Field Values

KEY_FITDEEP

public static final String KEY_FITDEEP
The pinhole model minimum transmission .

See Also:
Constant Field Values

KEY_FITSTEEP

public static final String KEY_FITSTEEP
The pinhole model minimum transmission .

See Also:
Constant Field Values

DEFMOFFATBETA

private static final double DEFMOFFATBETA
The moffat-beta, 4.765 is literature value.

See Also:
Constant Field Values

DEFPINHOLESIZE

private static final double DEFPINHOLESIZE
Default size (FWHM) of pinhole, pixel.

See Also:
Constant Field Values

DEFPINHOLESTEEP

private static final double DEFPINHOLESTEEP
Pinhole model steepness.

See Also:
Constant Field Values

DEFPINHOLEDEEP

private static final double DEFPINHOLEDEEP
Broad-band anti-reflective coating, typically.

See Also:
Constant Field Values

DEFFITSTEEP

private static final boolean DEFFITSTEEP
See Also:
Constant Field Values

DEFFITDEEP

private static final boolean DEFFITDEEP
See Also:
Constant Field Values
Constructor Detail

AveragePinhole

public AveragePinhole(Map<String,String> prop)
Constructs a model-shift.

Method Detail

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 applicable window.

Returns:
The background ADU in x and its ADU-sigma in y.

generatePinholeModel

protected AbstractPinholeModel.PinholeModel generatePinholeModel(nom.tam.fits.ImageHDU hdu,
                                                                 Rectangle frame,
                                                                 double back,
                                                                 double backerr,
                                                                 Point2D pinhole)
                                                          throws nom.tam.fits.FitsException
This method intializes the pinhole model used in the fitting process during initFiberView(nom.tam.fits.Fits). We supply the image data, the applicable image rectangle, the background estimate plus its error and the zero-order pinhole position.

Specified by:
generatePinholeModel in class AbstractPinholeModel
Throws:
nom.tam.fits.FitsException

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.

Specified by:
initFiberView in interface PinholeShift
Overrides:
initFiberView in class AbstractPinholeModel
Parameters:
ccd - The image of the pinhole entrance
Returns:
The pixel shift from the pinhole center to the star.

getPinholePosition

public Point2D getPinholePosition()
Returns the pinhole position.

Specified by:
getPinholePosition in interface PinholeShift
Overrides:
getPinholePosition in class AbstractPinholeShift

getStarPosition

public Point2D getStarPosition()
Returns the star position.

Specified by:
getStarPosition in class AbstractPinholeModel

getFlux

public double getFlux()
Returns the total flux from the last solution, if possible.

Specified by:
getFlux in interface PinholeShift
Overrides:
getFlux in class AbstractPinholeShift

getFwhm

public double getFwhm()
Returns the fwhm from the last solution, if possible.

Specified by:
getFwhm in interface PinholeShift
Overrides:
getFwhm in class AbstractPinholeShift