astro.fits
Class AmplifierCrosstalk.Simul

java.lang.Object
  extended by util.CommandLineParser
      extended by astro.fits.AmplifierCrosstalk.Simul
Enclosing class:
AmplifierCrosstalk

public static class AmplifierCrosstalk.Simul
extends CommandLineParser

Test class to generate artificial illumination fits files. This class generates a single illumination fit, thus you have to call this class N times for N amplifiers.

It allows the user to specify an illumintion quadrant (0...N-1) using the -qdr switch. In this quadrant, the illumination is non-zero in a ring around -center, outer radius and inner radius -radius. The illumination peaks in the central circle to -illu, from where it falls off according to 1/cosh(d*pixel), where pixel is the distance to the central circle and d is specified with -d. For all other, N-1, quadrants, that will be generated as individual fits extensions in a single fits, the user has to specify a response function with -response xq,yq,Iq,fwhm;x... . Each four-tupel describes the quadrant response function by specifying the central pixel xq,yq where the crosstalk peaks with Iq, at distances from xq,yq the crosstalk falls off like a Gaussian, its fwhm specified in fwhm. Use semicolon to separate the N-1 response functions for all quadrant. The resulting fits will be writtn to -o.
Note that the size of the amplifiers section is specified, not the size of the CCD.


Nested Class Summary
 
Nested classes/interfaces inherited from class util.CommandLineParser
CommandLineParser.Test
 
Field Summary
private static String FOOT
          The footer message.
 String ONE
           
 String TWO
           
private static Map<String,String> USE
          The usage map.
 
Constructor Summary
AmplifierCrosstalk.Simul()
           
 
Method Summary
 nom.tam.fits.ImageData createCrosstalk(nom.tam.fits.ImageData src, Point2D p0, double peak, double fwhm)
          Generates the crosstalk signal.
 nom.tam.fits.Fits createFits(int q0, List<VectorG> quad, Point2D p0, double r1, double r2, double adu, double dscale, Dimension size)
          Creates an artificial fits object.
 nom.tam.fits.ImageData createIllumination(Point2D p0, double r1, double r2, double adu, double dscale, Dimension size)
          Generates an illuminated qudrant.
static void main(String[] arg)
          Reads the switches and does as told.
 boolean process()
          Processes the command line switches.
 
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

ONE

public String ONE

TWO

public String TWO

USE

private static final Map<String,String> USE
The usage map.


FOOT

private static final String FOOT
The footer message.

See Also:
Constant Field Values
Constructor Detail

AmplifierCrosstalk.Simul

public AmplifierCrosstalk.Simul()
Method Detail

createIllumination

public nom.tam.fits.ImageData createIllumination(Point2D p0,
                                                 double r1,
                                                 double r2,
                                                 double adu,
                                                 double dscale,
                                                 Dimension size)
Generates an illuminated qudrant. The illumination tries to represent the out-of-focus image of a bright star.


createCrosstalk

public nom.tam.fits.ImageData createCrosstalk(nom.tam.fits.ImageData src,
                                              Point2D p0,
                                              double peak,
                                              double fwhm)
Generates the crosstalk signal. The input intensity at the pixel in question is scaled with a Gaussian centered at the specified point and having the peak response peak there. It falls of from this point with a full-width half maximum of fwhm. The size of the quadrant is specified by the input illu.


createFits

public nom.tam.fits.Fits createFits(int q0,
                                    List<VectorG> quad,
                                    Point2D p0,
                                    double r1,
                                    double r2,
                                    double adu,
                                    double dscale,
                                    Dimension size)
                             throws nom.tam.fits.FitsException
Creates an artificial fits object.

Throws:
nom.tam.fits.FitsException

process

public boolean process()
                throws nom.tam.fits.FitsException,
                       IOException
Processes the command line switches. Switches must be parsed before.

Throws:
nom.tam.fits.FitsException
IOException

main

public static void main(String[] arg)
                 throws ParseException,
                        nom.tam.fits.FitsException,
                        IOException
Reads the switches and does as told.

Throws:
ParseException
nom.tam.fits.FitsException
IOException