public class MasterDark extends Object
| Modifier and Type | Field and Description |
|---|---|
private MandatoryValue.Bitpix |
bitpix
The number of bits per pixel.
|
private MImageHDU[] |
darks
All dark data.
|
private ArrayLayout |
img
The layout of the data.
|
private MImageHDU |
masterdark
The master dark, per extension
|
private MImageHDU |
sigmadark
The master dark sigma map.
|
| Constructor and Description |
|---|
MasterDark(List<File> ff) |
MasterDark(List<File> ff,
int xtension) |
MasterDark(String fitsbase,
int start,
int count,
int xtension)
Constructs a new master dark with a base fits name, a starting index and
the number of images to read.
|
| Modifier and Type | Method and Description |
|---|---|
private static MHeader |
addCardsToHeader(MHeader head,
List<MHeaderCard> cards)
Adds a list of header cards to the fits header.
|
private boolean |
createMasterDark(MHeader head)
Creates a master dark image HDU and ists sigma map in the following way:
Depending on the number of bits, the image data is cast to an
appropriate double-indexed array.
The darks are traversed pixel by pixel.
|
private static String |
getFilename(String base,
int nr) |
private static List<File> |
getNumbered(String fitsbase,
int start,
int count) |
static void |
main(String[] arg)
Reads the fitsbase as the first command line argument, the starting
number as second and the number of images as third.
|
private static void |
printCounts(Number[] counts)
Prints a number array to system.out
|
private static boolean |
writeHDU(File file,
MImageHDU hdu)
Writes an image hdu to the given fits file.
|
boolean |
writeMasterDark(File darkfile)
Writes the master dark to the provided fits file.
|
boolean |
writeMasterDark(File darkfile,
List<MHeaderCard> cards)
Writes the master dark to the provided fits file.
|
boolean |
writeMasterSigma(File darkfile)
Writes the master dark sigma to the provided fits file.
|
boolean |
writeMasterSigma(File darkfile,
List<MHeaderCard> cards)
Writes the master dark sigma to the provided fits file.
|
private final MImageHDU[] darks
private MandatoryValue.Bitpix bitpix
private ArrayLayout img
private MImageHDU masterdark
private MImageHDU sigmadark
public MasterDark(String fitsbase, int start, int count, int xtension)
public boolean writeMasterDark(File darkfile) throws BasicFitsException
BasicFitsExceptionpublic boolean writeMasterDark(File darkfile, List<MHeaderCard> cards) throws BasicFitsException
BasicFitsExceptionpublic boolean writeMasterSigma(File darkfile) throws BasicFitsException
BasicFitsExceptionpublic boolean writeMasterSigma(File darkfile, List<MHeaderCard> cards) throws BasicFitsException
BasicFitsExceptionprivate static MHeader addCardsToHeader(MHeader head, List<MHeaderCard> cards)
private static boolean writeHDU(File file, MImageHDU hdu)
private boolean createMasterDark(MHeader head) throws BasicFitsException
BasicFitsExceptionprivate static void printCounts(Number[] counts)
public static void main(String[] arg) throws BasicFitsException
BasicFitsException