astro.fits
Class IcatMaster

java.lang.Object
  extended by util.PropertyContainer
      extended by util.PropertyResources
          extended by util.PropertyBundles
              extended by astro.fits.Icat
                  extended by astro.fits.IcatMaster
All Implemented Interfaces:
Cloneable, ExitCleaning, Initializable, LocalizedSupplying, PropertySupplying, Refreshing, ResourceSupplying

public class IcatMaster
extends Icat
implements Refreshing, ExitCleaning

Very simple class that prepares the reduction of wifsip science frames using the icat pipeline. This is the entry point for a demon process.


Nested Class Summary
static class IcatMaster.Standalone
          Controll is done in the JVM, not in a cron job.
 
Nested classes/interfaces inherited from class astro.fits.Icat
Icat.Compress, Icat.Snoop, Icat.Uncompress
 
Nested classes/interfaces inherited from class util.PropertyResources
PropertyResources.URLResource
 
Field Summary
private static String DEFDIRLIST
          All archive dirs that need reduction.
private static String DEFREDUCESCRIPT
          The path to reduce.sh.
private static long DEFWAKEUP
          4 times a day.
private static Process exe
           
static String KEY_DIRLIST
          All archive dirs that need reduction.
static String KEY_REDUCESCRIPT
          The path to reduce.sh.
static String KEY_WAKEUP
          Wakeup call.
private static boolean working
           
 
Fields inherited from class astro.fits.Icat
BIASCOMBINED, DATAEXTENSION, DEFFROM, EXPTIME, FE, FLATHEADBIAS, FLATHEADDARK, FLATMASTERBIAS, FLATMASTERDARK, FLATMASTERSIGMA, INDEXCAL, INDEXSCI, INPUTBIAS, INPUTDARK, INPUTFLATPART, KEY_ANALYSISPAR, KEY_ANALYSISPARNO, KEY_ANALYSISPARYES, KEY_ARCHIVE, KEY_CALIBPAR, KEY_CALIBPARDARK, KEY_CALIBPARNODARK, KEY_CALIBPARSKIP, KEY_DATEKEY, KEY_EXPOSUREKEY, KEY_FILTERKEY, KEY_FROM, KEY_ICATDIR, KEY_ICATIN, KEY_IMAGETYPEKEY, KEY_IMCOPY, KEY_IMCOPYFLAG, KEY_LOCALFITS, KEY_LOCALTMP, KEY_MODEANALYSE, KEY_MODEPAR, KEY_REDUCED, KEY_REDUCEDONE, KEY_REPLACEFROM, KEY_REPLACETO, KEY_SERIALIZE, KEY_TO, lookbias, lookdark, lookflat, lookup, OUT, OUTBDSFLAT, OUTBIAS, OUTBSFLAT, PHOTOMETRYASC, QUADRANTS, SCIENCEBDFLAT, SCIENCEBFLAT, SCIENCEBIAS, SCIENCEDARK, SCIENCEFINAL, SCIENCERAW, SCIENCETEMP, YYYYMMDD
 
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
IcatMaster(Map<String,String> prop)
           
 
Method Summary
private  boolean createDirList()
           
 void exit()
          On exit, we destroy the process, if still active.
 long getRefreshInterval()
          Returns the period in milliseconds of the refresh intervall.
 boolean isFixedRate()
          Returns true if fixed rate scheduling is desired, otherwise fixed delay is assumed.
static void main(String[] arg)
          Call this method to generate a new directory list.
 void refresh()
          The method that should be invoked on refresh.
private  void startReduction()
           
 
Methods inherited from class astro.fits.Icat
addExtension, compress, getIcatInputExtension, getIcatName, getIcatOutputExtension, getInput, getMain, getOutput, getQuadrantInput, getQuadrantOutput, getSerializeFile, init, reducedDir, restoreLookup, saveLookup, sendMail, uncompress
 
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_REDUCESCRIPT

public static final String KEY_REDUCESCRIPT
The path to reduce.sh.

See Also:
Constant Field Values

KEY_DIRLIST

public static final String KEY_DIRLIST
All archive dirs that need reduction.

See Also:
Constant Field Values

KEY_WAKEUP

public static final String KEY_WAKEUP
Wakeup call.

See Also:
Constant Field Values

DEFREDUCESCRIPT

private static final String DEFREDUCESCRIPT
The path to reduce.sh.

See Also:
Constant Field Values

DEFDIRLIST

private static final String DEFDIRLIST
All archive dirs that need reduction.

See Also:
Constant Field Values

DEFWAKEUP

private static final long DEFWAKEUP
4 times a day.

See Also:
Constant Field Values

working

private static boolean working

exe

private static Process exe
Constructor Detail

IcatMaster

public IcatMaster(Map<String,String> prop)
Method Detail

exit

public void exit()
On exit, we destroy the process, if still active.

Specified by:
exit in interface ExitCleaning

isFixedRate

public boolean isFixedRate()
Description copied from interface: Refreshing
Returns true if fixed rate scheduling is desired, otherwise fixed delay is assumed. Returning false is appropriate for blinking cursors, execution is scheduled relative to the last execution. Returning true here is appropriate for cron job, execution is always relative to the first execution.

Specified by:
isFixedRate in interface Refreshing
See Also:
Timer

getRefreshInterval

public long getRefreshInterval()
Description copied from interface: Refreshing
Returns the period in milliseconds of the refresh intervall.

Specified by:
getRefreshInterval in interface Refreshing

refresh

public void refresh()
Description copied from interface: Refreshing
The method that should be invoked on refresh. The method must not take any argument.

Specified by:
refresh in interface Refreshing

createDirList

private boolean createDirList()

startReduction

private void startReduction()

main

public static void main(String[] arg)
Call this method to generate a new directory list.