stella.adapter
Class NasmythGuider

java.lang.Object
  extended by util.PropertyContainer
      extended by util.PropertyResources
          extended by util.PropertyBundles
              extended by stella.adapter.StellaGuider
                  extended by stella.adapter.AbstractStarGuider
                      extended by stella.adapter.AbstractNasmythGuider
                          extended by stella.adapter.NasmythGuider
All Implemented Interfaces:
Cloneable, Guiding, Mirroring, Shutterless, Initializable, LocalizedSupplying, PropertySupplying, ResourceSupplying

public class NasmythGuider
extends AbstractNasmythGuider
implements Mirroring, Shutterless

A helper class that houses methods for the adapter master and its subsystems.


Nested Class Summary
 
Nested classes/interfaces inherited from class stella.adapter.AbstractStarGuider
AbstractStarGuider.Exposure, AbstractStarGuider.Magnitudes
 
Nested classes/interfaces inherited from class stella.adapter.StellaGuider
StellaGuider.Continuous, StellaGuider.Single
 
Nested classes/interfaces inherited from class util.PropertyResources
PropertyResources.URLResource
 
Nested classes/interfaces inherited from interface stella.adapter.Guiding
Guiding.RawFrame, Guiding.RawStar
 
Field Summary
private static double DEFALIGNMENTANGLE
          Alignment angle of the guider ccd with respect to north.
private static double DEFALTITUDEFLIP
          If the altitude is flipped, it cannot be compensated by a rotation.
private static double DEFDARKGUIDER
          The default dark/sky countrate.
private static double DEFDETECTIONLIMIT
          The default minimum instrumental magnitude to not be spurious.
private static Point2D DEFDIRECTPINHOLE
          The pinhole location on the direct image.
private static double DEFELONGATIONMAX
          The default maximum elongation for round stars.
private static double DEFELONGATIONWIDTH
          The minimum fwhm for a valid star detection.
private static double DEFEPSILONMAG
          The default epsilon for the full light guider CCD.
private static boolean DEFFIXEDDEROTATOR
          Default status of the derotator.
private static double DEFGHOSTDISTANCE
          The mxium offset of the mirror ghost from the ghostellipse.
private static MyEllipse DEFGHOSTELLIPSE
          The ring with the ghosts of the mirror image if on edge.
private static double DEFGUIDERSCALE
          The image scale on the direct image.
private static double DEFKMAG
          The default k prime parameter for the full light guider CCD.
private static long DEFMAXTIMEGUIDER
          Maximum exposure time on acquire in ms.
private static Point2D DEFMIRRORCENTER
          The virtual center of mirroring.
private static double DEFMIRRORDECAY
          The expected magnitude decay constant of mirror image.
private static double DEFMIRRORDECAYHALF
          The expected pixel length over which a decay occurs.
private static double DEFMIRROREDGE
          The maximum offset from mirrorellipse to produce ghosts.
private static MyEllipse DEFMIRRORELLIPSE
          The circlular mirror at the fiber entrance, as seen on guider.
private static double DEFMIRRORFAINT
          The distance whithin mirror magnitude is low due to fiber entrance.
private static double DEFMIRRORMAG
          The expected magnitude difference of mirror image.
private static double DEFMIRRORMAGSIGMA
          The deviation of the mirror mag to be considered as mirror.
private static double DEFMIRROROFFSET
          The sigma on the mirror center position.
private static double DEFMIRROROUTSIDE
          The multiplier for mirror image fainterness error if outside main.
private static Point2D DEFMIRRORPINHOLE
          The pinhole location on the mirror image.
private static double DEFMIRRORSCALE
          The default image scale on the mirror image.
private static double DEFMOUNTPORT
          Mountport East/west = +/-1.
private static double DEFREADOUTGUIDER
          The default bias level on the guider CCD.
private static double DEFSHARPPEAK
          The default minimum sharpness for star images.
private static double DEFSHARPWIDTH
          The default maximum sharpness for star images.
private static double DEFSOURCEGUIDER
          The gain for a R=10 star.
private static double DEFSTRIPDISTANCE
          The maximum column offset of read-out stripes.
private static double DEFSTRIPESMAX
          The maximum stroke value read-out stripes may have.
private static double DEFSURESTRIPES
          Detection with a stroke below this are always stripes..
private static double DEFZETAMAG
          The default zero point for the guider CCD.
static String KEY_GHOSTDISTANCE
          The expected maximum distance from ghost ring.
static String KEY_GHOSTELLIPSE
          The shape on the CCD where mirrored images will fall into.
static String KEY_MIRRORCENTER
          The mirror point of the center.
static String KEY_MIRRORDECAY
          The expected magnitude decay constant of mirror image.
static String KEY_MIRRORDECAYHALF
          The expected pixel length over which a decay occurs.
static String KEY_MIRROREDGE
          The expected thickness where ghost may occur.
static String KEY_MIRRORELLIPSE
          The shape on the CCD where mirrored images will fall into.
static String KEY_MIRRORFAINT
          The distance within the pinhole where mirrors are fainter.
static String KEY_MIRRORMAG
          The expected magnitude difference of mirror image.
static String KEY_MIRRORMAGSIGMA
          The maximum deviation of the mirror mag to be considered as mirror.
static String KEY_MIRROROFFSET
          The sigma on the mirror center position.
static String KEY_MIRROROUTSIDE
          The multiplier for mirror image fainterness error if outside main.
static String KEY_MIRRORPINHOLE
          The pinhole position on the direct image.
static String KEY_MIRRORSCALE
          The guider scale on the reflected image, normally not used.
 
Fields inherited from class stella.adapter.AbstractNasmythGuider
KEY_FIXEDDEROTATOR, KEY_MOUNTPORT
 
Fields inherited from class stella.adapter.AbstractStarGuider
KEY_ALIGNMENTANGLE, KEY_ALTITUDEFLIP, KEY_DARKGUIDER, KEY_DETECTIONLIMIT, KEY_DIRECTPINHOLE, KEY_ELONGATIONMAX, KEY_ELONGATIONWIDTH, KEY_EPSILONMAG, KEY_GUIDERSCALE, KEY_KMAG, KEY_MAXTIMEGUIDER, KEY_READOUTGUIDER, KEY_SHARPPEAK, KEY_SHARPWIDTH, KEY_SOURCEGUIDER, KEY_STRIPDISTANCE, KEY_STRIPESMAX, KEY_SURESTRIPES, KEY_ZETAMAG, REFERENCEEXPOSE, REFERENCEMAG
 
Fields inherited from class stella.adapter.StellaGuider
biasfits, biastime, CLEAN, CLEANNAME, darkfits, darktime, GAUSS, GAUSSNAME, KEY_DEPTHMEDIAN, KEY_FITSDIR, KEY_GAUSSFWHM, KEY_GAUSSTRUNCATE, KEY_GUIDINGIMG, KEY_LOWPASS, KEY_MAGTRUNCATE, KEY_MATCHERVERSION, KEY_REDUCEDIR, KEY_REDUCETIME, KEY_SIZELOWPASS, KEY_SIZEMEDIAN, LOWPASS, LOWPASSNAME, maxsize, MEDIAN, MEDIANNAME, RECTANGULARMATCHER, REDUCED, REDUCEDNAME, SKYFRAME, STARREGISTER
 
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
NasmythGuider(Map<String,String> prop)
          Constructs a new adapter helper, defaulting all properties.
 
Method Summary
 double getMirrorFaintness()
          Returns the mirror faintness.
 Point2D getMirrorPosition(Point2D direct)
          Converts a position on the direct image to the mirror position.
protected  Vector2D getRaDeCenter()
          We guide directly on the object, thus we return the first object in the field of view.
 List<Guiding.RawStar> removeGhosts(List<Guiding.RawStar> mirrors, List<Guiding.RawStar> stars)
          A further complication are mirrors that spark ghosts.
 List<Guiding.RawStar> removeMirrors(List<Guiding.RawStar> stars)
          Iterates through a list of stars and tries to detect mirror images.
 List<Guiding.RawStar> removeStripes(List<Guiding.RawStar> stars)
          Makes the underlying method available.
 
Methods inherited from class stella.adapter.AbstractNasmythGuider
getCurrentAzAltRotation, getCurrentFieldRotation
 
Methods inherited from class stella.adapter.AbstractStarGuider
closestToPinhole, closestToPixel, detect, detect, estimateDataMin, estimateExposureTime, estimateGuiderMag, estimateReferenceMag, fieldOfViewOffset, fieldOfViewShift, formatWithUnique, getAltitude, getAzimuth, getCatalogPosition, getDerotator, getExpectedList, getFocus, getFov, getGuiderScale, getMaximumExposureTime, getNeighbours, getPinhole, getPinholeNeighbours, getRotation, getStrip, getUnique, isStar, offsetAzAltToPixel, pixelToAzAltOffset, removeSpurious, setFocus, setFov, setOrientationValues, setOrientationValues, setPinhole, setUnique, starOffset, starOffset, starShift, starShift
 
Methods inherited from class stella.adapter.StellaGuider
background, cancelContinuous, countSum, fluxInside, getCcd, getCcdSize, getContinuousList, getContinuousMinimumExpose, getCurrentExpsoureNumber, getFitsDir, getGuidingStars, getGuidingStars, getGuidingStars, isReady, match, photometry, prepareContinuous, reduceFitsFile, registerCcd, setBiasReduction, setDarkReduction, startContinuous, startContinuous, stopContinuous
 
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, init, 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
 
Methods inherited from interface util.Initializable
init
 

Field Detail

KEY_MIRRORELLIPSE

public static final String KEY_MIRRORELLIPSE
The shape on the CCD where mirrored images will fall into.

See Also:
Constant Field Values

KEY_GHOSTELLIPSE

public static final String KEY_GHOSTELLIPSE
The shape on the CCD where mirrored images will fall into.

See Also:
Constant Field Values

KEY_MIRRORSCALE

public static final String KEY_MIRRORSCALE
The guider scale on the reflected image, normally not used.

See Also:
Constant Field Values

KEY_MIRRORPINHOLE

public static final String KEY_MIRRORPINHOLE
The pinhole position on the direct image.

See Also:
Constant Field Values

KEY_MIRRORCENTER

public static final String KEY_MIRRORCENTER
The mirror point of the center.

See Also:
Constant Field Values

KEY_MIRRORFAINT

public static final String KEY_MIRRORFAINT
The distance within the pinhole where mirrors are fainter.

See Also:
Constant Field Values

KEY_MIRROROFFSET

public static final String KEY_MIRROROFFSET
The sigma on the mirror center position. Search radius 3sigma.

See Also:
Constant Field Values

KEY_MIRRORMAG

public static final String KEY_MIRRORMAG
The expected magnitude difference of mirror image.

See Also:
Constant Field Values

KEY_MIRRORMAGSIGMA

public static final String KEY_MIRRORMAGSIGMA
The maximum deviation of the mirror mag to be considered as mirror.

See Also:
Constant Field Values

KEY_MIRROROUTSIDE

public static final String KEY_MIRROROUTSIDE
The multiplier for mirror image fainterness error if outside main.

See Also:
Constant Field Values

KEY_MIRRORDECAY

public static final String KEY_MIRRORDECAY
The expected magnitude decay constant of mirror image.

See Also:
Constant Field Values

KEY_MIRRORDECAYHALF

public static final String KEY_MIRRORDECAYHALF
The expected pixel length over which a decay occurs.

See Also:
Constant Field Values

KEY_MIRROREDGE

public static final String KEY_MIRROREDGE
The expected thickness where ghost may occur.

See Also:
Constant Field Values

KEY_GHOSTDISTANCE

public static final String KEY_GHOSTDISTANCE
The expected maximum distance from ghost ring.

See Also:
Constant Field Values

DEFREADOUTGUIDER

private static final double DEFREADOUTGUIDER
The default bias level on the guider CCD.

See Also:
Constant Field Values

DEFDARKGUIDER

private static final double DEFDARKGUIDER
The default dark/sky countrate.

See Also:
Constant Field Values

DEFSOURCEGUIDER

private static final double DEFSOURCEGUIDER
The gain for a R=10 star.

See Also:
Constant Field Values

DEFMAXTIMEGUIDER

private static final long DEFMAXTIMEGUIDER
Maximum exposure time on acquire in ms.

See Also:
Constant Field Values

DEFSHARPPEAK

private static final double DEFSHARPPEAK
The default minimum sharpness for star images.

See Also:
Constant Field Values

DEFSHARPWIDTH

private static final double DEFSHARPWIDTH
The default maximum sharpness for star images.

See Also:
Constant Field Values

DEFELONGATIONMAX

private static final double DEFELONGATIONMAX
The default maximum elongation for round stars.

See Also:
Constant Field Values

DEFELONGATIONWIDTH

private static final double DEFELONGATIONWIDTH
The minimum fwhm for a valid star detection.

See Also:
Constant Field Values

DEFSURESTRIPES

private static final double DEFSURESTRIPES
Detection with a stroke below this are always stripes..

See Also:
Constant Field Values

DEFSTRIPESMAX

private static final double DEFSTRIPESMAX
The maximum stroke value read-out stripes may have.

See Also:
Constant Field Values

DEFSTRIPDISTANCE

private static final double DEFSTRIPDISTANCE
The maximum column offset of read-out stripes.

See Also:
Constant Field Values

DEFDETECTIONLIMIT

private static final double DEFDETECTIONLIMIT
The default minimum instrumental magnitude to not be spurious.

See Also:
Constant Field Values

DEFMIRRORELLIPSE

private static final MyEllipse DEFMIRRORELLIPSE
The circlular mirror at the fiber entrance, as seen on guider.


DEFGHOSTELLIPSE

private static final MyEllipse DEFGHOSTELLIPSE
The ring with the ghosts of the mirror image if on edge.


DEFMIRROREDGE

private static final double DEFMIRROREDGE
The maximum offset from mirrorellipse to produce ghosts.

See Also:
Constant Field Values

DEFGHOSTDISTANCE

private static final double DEFGHOSTDISTANCE
The mxium offset of the mirror ghost from the ghostellipse.

See Also:
Constant Field Values

DEFGUIDERSCALE

private static final double DEFGUIDERSCALE
The image scale on the direct image. Pixel per radian, 0.297"/px.

See Also:
Constant Field Values

DEFMIRRORSCALE

private static final double DEFMIRRORSCALE
The default image scale on the mirror image. Pixel per radian.

See Also:
Constant Field Values

DEFDIRECTPINHOLE

private static final Point2D DEFDIRECTPINHOLE
The pinhole location on the direct image. Calculated from mirror.


DEFMIRRORPINHOLE

private static final Point2D DEFMIRRORPINHOLE
The pinhole location on the mirror image. Measured with backlight.


DEFMIRRORCENTER

private static final Point2D DEFMIRRORCENTER
The virtual center of mirroring.


DEFMIRRORFAINT

private static final double DEFMIRRORFAINT
The distance whithin mirror magnitude is low due to fiber entrance.

See Also:
Constant Field Values

DEFMIRROROFFSET

private static final double DEFMIRROROFFSET
The sigma on the mirror center position. Search radius 3sigma.

See Also:
Constant Field Values

DEFMIRRORMAG

private static final double DEFMIRRORMAG
The expected magnitude difference of mirror image.

See Also:
Constant Field Values

DEFMIRRORMAGSIGMA

private static final double DEFMIRRORMAGSIGMA
The deviation of the mirror mag to be considered as mirror. True 0.08

See Also:
Constant Field Values

DEFMIRROROUTSIDE

private static final double DEFMIRROROUTSIDE
The multiplier for mirror image fainterness error if outside main.

See Also:
Constant Field Values

DEFMIRRORDECAY

private static final double DEFMIRRORDECAY
The expected magnitude decay constant of mirror image.

See Also:
Constant Field Values

DEFMIRRORDECAYHALF

private static final double DEFMIRRORDECAYHALF
The expected pixel length over which a decay occurs.

See Also:
Constant Field Values

DEFFIXEDDEROTATOR

private static final boolean DEFFIXEDDEROTATOR
Default status of the derotator.

See Also:
Constant Field Values

DEFALIGNMENTANGLE

private static final double DEFALIGNMENTANGLE
Alignment angle of the guider ccd with respect to north.

See Also:
Constant Field Values

DEFZETAMAG

private static final double DEFZETAMAG
The default zero point for the guider CCD.

See Also:
Constant Field Values

DEFKMAG

private static final double DEFKMAG
The default k prime parameter for the full light guider CCD.

See Also:
Constant Field Values

DEFEPSILONMAG

private static final double DEFEPSILONMAG
The default epsilon for the full light guider CCD.

See Also:
Constant Field Values

DEFALTITUDEFLIP

private static final double DEFALTITUDEFLIP
If the altitude is flipped, it cannot be compensated by a rotation.

See Also:
Constant Field Values

DEFMOUNTPORT

private static final double DEFMOUNTPORT
Mountport East/west = +/-1.

See Also:
Constant Field Values
Constructor Detail

NasmythGuider

public NasmythGuider(Map<String,String> prop)
Constructs a new adapter helper, defaulting all properties.

Method Detail

getRaDeCenter

protected Vector2D getRaDeCenter()
We guide directly on the object, thus we return the first object in the field of view.

Specified by:
getRaDeCenter in class AbstractStarGuider

getMirrorPosition

public Point2D getMirrorPosition(Point2D direct)
Converts a position on the direct image to the mirror position. No range checks applied.

Specified by:
getMirrorPosition in interface Mirroring

getMirrorFaintness

public double getMirrorFaintness()
Returns the mirror faintness. This is the magnitude difference between the mirror image and the direct image, if the mirror image is not obstructed by the pinhole.

Specified by:
getMirrorFaintness in interface Mirroring

removeMirrors

public List<Guiding.RawStar> removeMirrors(List<Guiding.RawStar> stars)
Iterates through a list of stars and tries to detect mirror images. Normally, the mirror image should be a little bit weaker, as defined in KEY_MIRRORMAG, but, as KEY_MIRRORMAGSIGMA can exceed this difference this is not guranteed. Thus we go through the entire list of stars and try to detect mirrors, either as the entries itself or via its mirror image.

Specified by:
removeMirrors in interface Mirroring

removeGhosts

public List<Guiding.RawStar> removeGhosts(List<Guiding.RawStar> mirrors,
                                          List<Guiding.RawStar> stars)
A further complication are mirrors that spark ghosts. This is only possible on the edge of the mirror, thus from all detected mirrors, we look-up our stars to find those ghosts. The ghosts are removed from the star list and returned in a separate list.

Specified by:
removeGhosts in interface Mirroring

removeStripes

public List<Guiding.RawStar> removeStripes(List<Guiding.RawStar> stars)
Makes the underlying method available.

Specified by:
removeStripes in interface Shutterless
Overrides:
removeStripes in class AbstractStarGuider