stella.adapter
Class StellaGuider.ReduceThread

java.lang.Object
  extended by java.lang.Thread
      extended by stella.adapter.StellaGuider.ReduceThread
All Implemented Interfaces:
Runnable
Enclosing class:
StellaGuider

private class StellaGuider.ReduceThread
extends Thread

This thread does the reduction of CCD data to a level that a list of detected stars can be retrieved. It is intended for continuous operation only, thus allowing a new exposure to be taken while the old one is reduced.


Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
 
Field Summary
private  String biasname
          On moving frames, the bias fits name.
private  int binx
          The binning used in x-direction.
private  int biny
          The binning used in x-direction.
private  long btime
          The bias time.
private  boolean cancel
          Gets true if we should cancel.
private  Point corner
          On moving frames, the upper-left corner shifts.
private  String darkname
          On moving frames, the dark fits name.
private  int datamax
          The integer value of a maximum detection.
private  int datamin
          The integer value of a minimum detection.
private  long dtime
          The dark time.
private  float gaussfwhm
          The fwhm of the gauss that should be used on star detect.
private  float gausstrunc
          The truncation of the gaussian used on star detect.
private  PostReducing loop
          If we have an active post-reducer, i.e.
private  StellaGuider.ExposeThread retrieve
          The exposure thread that has the fits file.
private  int search
          The unbinned radius of the search box.
private  List<Guiding.RawStar> stars
          The list is update on each successful reduce.
private  int steps
          The mask of reduction step-fits files to write.
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
protected StellaGuider.ReduceThread(float fwhm, float trunc, int min, int max, int box, int what)
          Constructs a new reduce thread.
 
Method Summary
 void cancel()
          Sets the cancel flag.
protected  List<Guiding.RawStar> getRecentlyFound()
          Returns the list of stars recently found.
 void run()
          On run, we ask the exposure thread to deliver the last fits file.
protected  void setBias(File bias, long time)
          Sets the bias frame and bias integration time by the exposure thread.
protected  void setBinning(Dimension bin)
          Set the binning to use.
protected  void setDark(File dark, long time)
          Sets the dark frame and dark integration time by the exposure thread.
protected  void setExposeThread(StellaGuider.ExposeThread fechi)
          Sets the coresponding exposure thread.
protected  void setPostReducer(PostReducing guiderloop)
          Sets a post-reducer interface.
protected  void setStart(Point upleft)
          Sets the upper left corner of the ccd image read by the exposure thread.
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

binx

private int binx
The binning used in x-direction.


biny

private int biny
The binning used in x-direction.


gaussfwhm

private float gaussfwhm
The fwhm of the gauss that should be used on star detect.


gausstrunc

private float gausstrunc
The truncation of the gaussian used on star detect.


datamin

private int datamin
The integer value of a minimum detection.


datamax

private int datamax
The integer value of a maximum detection.


search

private int search
The unbinned radius of the search box.


steps

private int steps
The mask of reduction step-fits files to write.


corner

private Point corner
On moving frames, the upper-left corner shifts.


biasname

private String biasname
On moving frames, the bias fits name.


btime

private long btime
The bias time.


darkname

private String darkname
On moving frames, the dark fits name.


dtime

private long dtime
The dark time.


retrieve

private StellaGuider.ExposeThread retrieve
The exposure thread that has the fits file.


stars

private List<Guiding.RawStar> stars
The list is update on each successful reduce.


cancel

private boolean cancel
Gets true if we should cancel.


loop

private PostReducing loop
If we have an active post-reducer, i.e. a guiing loop.

Constructor Detail

StellaGuider.ReduceThread

protected StellaGuider.ReduceThread(float fwhm,
                                    float trunc,
                                    int min,
                                    int max,
                                    int box,
                                    int what)
Constructs a new reduce thread.

Method Detail

setPostReducer

protected void setPostReducer(PostReducing guiderloop)
Sets a post-reducer interface.


setExposeThread

protected void setExposeThread(StellaGuider.ExposeThread fechi)
Sets the coresponding exposure thread.


setBinning

protected void setBinning(Dimension bin)
Set the binning to use.


setStart

protected void setStart(Point upleft)
Sets the upper left corner of the ccd image read by the exposure thread.


setBias

protected void setBias(File bias,
                       long time)
Sets the bias frame and bias integration time by the exposure thread.


setDark

protected void setDark(File dark,
                       long time)
Sets the dark frame and dark integration time by the exposure thread.


run

public void run()
On run, we ask the exposure thread to deliver the last fits file. If the exposure thread is not ready, we sleep.

Specified by:
run in interface Runnable
Overrides:
run in class Thread

getRecentlyFound

protected List<Guiding.RawStar> getRecentlyFound()
Returns the list of stars recently found.


cancel

public void cancel()
Sets the cancel flag.