ccd
Class DarkOverlapTiler.TilerThread

java.lang.Object
  extended by java.lang.Thread
      extended by ccd.DarkOverlapTiler.TilerThread
All Implemented Interfaces:
Runnable
Enclosing class:
DarkOverlapTiler

private class DarkOverlapTiler.TilerThread
extends Thread

A tiler thread is a thread that runs forever until its cancel method is called. It generatesd darks and bias averages of the tile pointed to by #tile. If successful, the tile number is advanced and the process is restarted. Once all tiles have been finished, the tiler starts again, writing master to a new directory.


Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
 
Field Summary
private  boolean cancel
          If true, execution is stopped as soon as possible.
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
protected DarkOverlapTiler.TilerThread()
          All required parameters are stored in the outer class.
 
Method Summary
 void cancel()
          If this method is called, we try to cancel as soon as possible.
 void run()
          Executes tiling darks.
 
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

cancel

private boolean cancel
If true, execution is stopped as soon as possible.

Constructor Detail

DarkOverlapTiler.TilerThread

protected DarkOverlapTiler.TilerThread()
All required parameters are stored in the outer class.

Method Detail

run

public void run()
Executes tiling darks. As long as we are not canceled, we use the current run number to create a new dark-tiles directory, if not existing. Then, the current tile number is used to construct a read-out window on the ccd, which is set. Then, we expose bias and dark frames until we reach the requested number of frames. These are than averaged and stored, along with the temperature, if available.

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

cancel

public void cancel()
If this method is called, we try to cancel as soon as possible. All the frames read for the current tile are lost.