stella.adapter
Class AdapterReduce

java.lang.Object
  extended by util.CommandLineParser
      extended by stella.adapter.AdapterReduce

public class AdapterReduce
extends CommandLineParser

Allows off-line reduction of acquire, guiding, and focus frames. Supports command line switches that make it possible to also test new setups for the guider without interfereing with the running system. All methods produce the list of detections in the frame, depending on the type of reduction requested, some additional info is put forth.


Nested Class Summary
 
Nested classes/interfaces inherited from class util.CommandLineParser
CommandLineParser.Test
 
Field Summary
private  AbstractStarGuider ag
          The reductional instance used, contains also the C++ part.
static String COARSE
          Defines the coarse acquire frame.
static String FINE
          Defines the fine acquire frame.
private static String FIVESWITCH
          The switches for adding properties.
private static String FOOT
          A footer message.
private static String FOURSWITCH
          The switches for adding properties.
private static String ONESWITCH
          The switches for adding properties.
private static String TWOSWITCH
          The switches for adding properties.
private static Map USE
          Detailed use of switches.
private static String ZEROSWITCH
          The switches for adding properties.
 
Constructor Summary
AdapterReduce()
          Constructs the parser to the fits finder.
 
Method Summary
private static void ds9Print(int xoff, int yoff, int binx, int biny, List<Guiding.RawStar> what, String head, String tail)
           
private  boolean loopProcess(String[] arg, File fitsfile)
          It was necessary to allow in-VM looping over filenames.
static void main(String[] arg)
          The command line version for reducing acquire/guiding frames.
private static void prettyPrint(List raw, String head)
          Does a one-per line print of a raw-star list.
private  boolean process(String[] arg)
          Reads the command line and find the stars.
 
Methods inherited from class util.CommandLineParser
getArguments, getCommandLine, getCommands, getRegisteredSwitches, hasAnySwitch, hasSwitch, hasSwitch, haveAllSwitches, parse, printCommandLine, registerLine, registerSwitches, setCommands, staticUsage, usage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COARSE

public static final String COARSE
Defines the coarse acquire frame.

See Also:
Constant Field Values

FINE

public static final String FINE
Defines the fine acquire frame.

See Also:
Constant Field Values

ZEROSWITCH

private static final String ZEROSWITCH
The switches for adding properties.

See Also:
Constant Field Values

ONESWITCH

private static final String ONESWITCH
The switches for adding properties.

See Also:
Constant Field Values

TWOSWITCH

private static final String TWOSWITCH
The switches for adding properties.

See Also:
Constant Field Values

FOURSWITCH

private static final String FOURSWITCH
The switches for adding properties.

See Also:
Constant Field Values

FIVESWITCH

private static final String FIVESWITCH
The switches for adding properties.

See Also:
Constant Field Values

USE

private static final Map USE
Detailed use of switches.


FOOT

private static final String FOOT
A footer message.

See Also:
Constant Field Values

ag

private AbstractStarGuider ag
The reductional instance used, contains also the C++ part.

Constructor Detail

AdapterReduce

public AdapterReduce()
Constructs the parser to the fits finder. All known switches are registered.

Method Detail

process

private boolean process(String[] arg)
                 throws ParseException,
                        IOException,
                        nom.tam.fits.FitsException
Reads the command line and find the stars. Returns true, if all necessarry parameters were present and reduction was possible, otherwise return false. Usage never displayed.

Throws:
ParseException
IOException
nom.tam.fits.FitsException

loopProcess

private boolean loopProcess(String[] arg,
                            File fitsfile)
                     throws ParseException,
                            IOException,
                            nom.tam.fits.FitsException
It was necessary to allow in-VM looping over filenames. This is the method that reduces a single fits file.

Throws:
ParseException
IOException
nom.tam.fits.FitsException

prettyPrint

private static void prettyPrint(List raw,
                                String head)
Does a one-per line print of a raw-star list.


ds9Print

private static void ds9Print(int xoff,
                             int yoff,
                             int binx,
                             int biny,
                             List<Guiding.RawStar> what,
                             String head,
                             String tail)

main

public static void main(String[] arg)
                 throws ParseException,
                        IOException,
                        nom.tam.fits.FitsException
The command line version for reducing acquire/guiding frames.

Throws:
ParseException
IOException
nom.tam.fits.FitsException