|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectastro.fits.FitsTools
public class FitsTools
Some tools in dealing with FITS images.
| Nested Class Summary | |
|---|---|
static class |
FitsTools.Binning
Flip according to the second and third command line argument |
static class |
FitsTools.Clip
Reads the four extensions of an WiFSIP image, does clipping, flipping and tiling to produce a single output fits. |
static class |
FitsTools.ClipOne
Reads one extensions of an WiFSIP image, does clipping to produce a single output fits. |
static class |
FitsTools.Dump
Dumps the pixel values to stdout. |
static class |
FitsTools.E2V
Reads the two extensions of an WiFSIP/Robotel image, does clipping, flipping and tiling to produce a single output fits. |
static class |
FitsTools.Flag
Constructs a flag map from a weight map in a way that only values above a certain trashhold are set to 0, others to 1. |
static class |
FitsTools.Flip
Flip according to the second and third command line argument |
static class |
FitsTools.Histogram
Dumps the historgram to stdout. |
static class |
FitsTools.Limit
Limits an image to ADU borders. |
static class |
FitsTools.Pixel
Take the pixel at the given coordinates and print its value. |
static class |
FitsTools.SiraitV
Transformas small IRAIT V-data. |
static class |
FitsTools.Size
|
static class |
FitsTools.Split
Splits a fits file given on the command line into its image hdu's, each image found saved to a fits file with a number indication at the end of the fits file name (extensionless). |
static class |
FitsTools.Stitcher
Full use control on how to stitch quadrants together. |
static class |
FitsTools.Test
|
static class |
FitsTools.TestFits
Generates a test fits file, whose pixel value is adu=256*y+x. |
static class |
FitsTools.Weight
Constructs a weight map from a normalized flat in a way that all values above a certain trashhold are set to a lower threshold. |
static class |
FitsTools.Wifsip
Reads the four extensions of an WiFSIP image, does clipping, flipping and tiling to produce a single output fits. |
static class |
FitsTools.WifsipTime
We read the comment to the simple keyword, extract the creation date out of it, parse it, subtract 34 seconds from it and write this as DATE-OBS to the header again. |
| Field Summary | |
|---|---|
static String |
DATEKEY
The FITS key denoting the yyyy-mm-tt of the observing date. |
static List<String> |
DATEKEYS
A list of fits keys that might also indicate a date. |
static String |
DATEOBSKEY
The FITS key denoting the yyyy-mm-tt of the observing date. |
static String |
FITSBITPIX
The mandatory FITS key denoting the end of the header section. |
static DateFormat |
FITSDATE
The default formatter used for FITS-header dates. |
static DateFormat |
FITSDATEMS
|
static String |
FITSEND
The mandatory FITS key denoting the end of the header section. |
static String |
FITSEXTENSION
The extension for fits files. |
static String |
FITSNAXIS
The mandatory FITS key denoting the end of the header section. |
static String |
FITSSCALE
The FITS key denoting the scale of image data. |
static String |
FITSSCALEREM
The FITS key denoting the scale of image data. |
static String |
FITSSIMPLE
The mandatory FITS key denoting the end of the header section. |
static String |
FITSXTENSION
The mandatory FITS key denoting the end of the header section. |
static String |
FITSZERO
The FITS key denoting the zero point of image data. |
static String |
FITSZEROREM
The FITS key denoting the zero point of image data. |
static String |
FITZEXTENSION
The extension for compressed fits files. |
static String |
TIMEKEY
The FITS key denoting the HH:MM:ss of the observing date. |
static String |
TIMEOBSKEY
The FITS key denoting the HH:MM:ss of the observing date. |
static String |
XBIN
Fits key for entering x-bin info to header. |
static String |
XORIGIN
Fits key for entering x-pregap info to header. |
static String |
XTENSIONIMAGE
The recognized extensions is an image |
static String |
YBIN
Fits key for entering y-bin info to header. |
static String |
YORIGIN
Fits key for entering y-pregap info to header. |
| Constructor Summary | |
|---|---|
FitsTools()
|
|
| Method Summary | ||
|---|---|---|
static nom.tam.fits.ImageHDU |
bin(nom.tam.fits.ImageHDU l,
int xbin,
int ybin)
Bins ADUs in an imageHDU to the given values. |
|
static nom.tam.fits.ImageHDU |
cap(nom.tam.fits.ImageHDU l,
double cap,
double low)
Caps ADUs in an imageHDU whose values are above a certain threshold to a lower one. |
|
static nom.tam.fits.ImageData |
flag(nom.tam.fits.ImageHDU in,
double trig)
Extracts ADU's from an Image HDU and converts them to an integer flag map. |
|
static nom.tam.fits.ImageHDU |
flip(nom.tam.fits.ImageHDU in,
boolean xflip,
boolean yflip)
We take a source HDU and flip it according to the flip indicators, where a positive value means leave unchanged, while negative values change the direction. |
|
static
|
getHduOfType(nom.tam.fits.Fits fits,
Class<T> type,
boolean ignorenull)
Reads a fits file until a HDU is discovered that is of the provided type. |
|
static
|
getHduOfType(nom.tam.fits.Fits fits,
Class<T> type,
boolean ignorenull,
int skip)
Reads a fits file until a HDU is discovered that is of the provided type. |
|
static Number |
getRawValue(nom.tam.fits.Fits image,
int x,
int y)
Scans an image hdu and retrieves the data there. |
|
static Number |
getRawValue(nom.tam.fits.ImageHDU image,
int x,
int y)
Scans an image hdu and retrieves the data there. |
|
static List<Number> |
getRawWindow(nom.tam.fits.Fits file,
Rectangle window)
Extracts a window from an image hdu and returns non-scaled, raw, ADUs as a list of Numbers. |
|
static List<Number> |
getRawWindow(nom.tam.fits.ImageHDU image,
Rectangle window)
Extracts a window from an image hdu and returns ADUs as a list of Numbers. |
|
static Dimension |
getSize(nom.tam.fits.ImageHDU raw)
Reads the header for the axes and returns a dimension object out of it, if image is two-dimensional. |
|
static List<Number> |
getTrueFrame(nom.tam.fits.ImageHDU hdu,
Rectangle active,
int thick)
Extracts a frame at the inside of the active window. |
|
static Number |
getTrueValue(nom.tam.fits.Fits image,
int x,
int y)
Scans an image hdu and retrieves the data there. |
|
static Number |
getTrueValue(nom.tam.fits.ImageHDU image,
int x,
int y)
Scans an image hdu and retrieves the data there. |
|
static List<Number> |
getTrueWindow(nom.tam.fits.Fits file,
Rectangle window)
Extracts a window from an image hdu and returns zero-shifted and scaled ADUs as a list of Numbers. |
|
static List<Number> |
getTrueWindow(nom.tam.fits.ImageHDU image,
Rectangle window)
Extracts a window from an image hdu and returns ADUs as a list of Numbers. |
|
static nom.tam.fits.ImageHDU |
hilo(nom.tam.fits.ImageHDU l,
double cap,
double low)
Caps ADUs in an imageHDU whose values are above a certain threshold to a lower one. |
|
static nom.tam.fits.Fits |
limit(nom.tam.fits.Fits raw,
double min,
double max)
Limits ADUs in an image to the given values. |
|
static nom.tam.fits.ImageData |
limit(nom.tam.fits.ImageHDU l,
double low,
double hi)
Limits ADUs in an imageHDU to the given values. |
|
static boolean |
saveAs(nom.tam.fits.Fits src,
File as)
To overcome the crude logic behind saving a fits file, we can do this here more easily. |
|
static boolean |
saveAs(nom.tam.fits.Fits src,
String as)
To overcome the crude logic behind saving a fits file, we can do this here more easily. |
|
static nom.tam.fits.ImageHDU |
scalarMultiply(nom.tam.fits.ImageHDU in,
double scale)
Multiplies the image with the given scalar. |
|
static nom.tam.fits.ImageHDU |
scalarOffset(nom.tam.fits.ImageHDU in,
double offset)
Multiplies the image with the given scalar. |
|
static nom.tam.fits.ImageHDU |
stitch(nom.tam.fits.ImageHDU left,
nom.tam.fits.ImageHDU right,
boolean rowpatch)
Composes an image from two tiles and returns the union of both in a new ImageHDU. |
|
static nom.tam.fits.Fits |
transform(nom.tam.fits.Fits image,
Function eval)
Extracts ADU's from an Image HDU, transforms them according to the given function f(ADU), and constructs an Image HDU of likewise type. |
|
static nom.tam.fits.ImageHDU |
transform(nom.tam.fits.ImageHDU in,
Function eval)
Extracts ADU's from an Image HDU, transforms them according to the given function f(ADU), and constructs an Image HDU of likewise type. |
|
static nom.tam.fits.ImageHDU |
trim(nom.tam.fits.ImageHDU in,
Rectangle active)
We take a source image hdu and trim it to the given active area. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String FITSEXTENSION
public static final String FITZEXTENSION
public static final DateFormat FITSDATE
public static final DateFormat FITSDATEMS
public static final String FITSSIMPLE
public static final String FITSXTENSION
public static final String FITSBITPIX
public static final String FITSNAXIS
public static final String FITSZERO
public static final String FITSSCALE
public static final String FITSEND
public static final String DATEKEY
public static final String DATEOBSKEY
public static final String TIMEKEY
public static final String TIMEOBSKEY
public static final List<String> DATEKEYS
public static final String XTENSIONIMAGE
public static final String FITSZEROREM
public static final String FITSSCALEREM
public static final String XORIGIN
public static final String XBIN
public static final String YORIGIN
public static final String YBIN
| Constructor Detail |
|---|
public FitsTools()
| Method Detail |
|---|
public static <T extends nom.tam.fits.BasicHDU> T getHduOfType(nom.tam.fits.Fits fits,
Class<T> type,
boolean ignorenull)
throws nom.tam.fits.FitsException,
IOException
ignorenull - Ignore empty HDU's
nom.tam.fits.FitsException
IOException
public static <T extends nom.tam.fits.BasicHDU> T getHduOfType(nom.tam.fits.Fits fits,
Class<T> type,
boolean ignorenull,
int skip)
throws nom.tam.fits.FitsException,
IOException
ignorenull - Ignore empty HDU's
nom.tam.fits.FitsException
IOException
public static Number getTrueValue(nom.tam.fits.Fits image,
int x,
int y)
throws nom.tam.fits.FitsException,
IOException
nom.tam.fits.FitsException
IOException
public static Number getTrueValue(nom.tam.fits.ImageHDU image,
int x,
int y)
throws nom.tam.fits.FitsException
nom.tam.fits.FitsException
public static Number getRawValue(nom.tam.fits.Fits image,
int x,
int y)
throws nom.tam.fits.FitsException,
IOException
nom.tam.fits.FitsException
IOException
public static Number getRawValue(nom.tam.fits.ImageHDU image,
int x,
int y)
throws nom.tam.fits.FitsException
nom.tam.fits.FitsException
public static nom.tam.fits.ImageHDU bin(nom.tam.fits.ImageHDU l,
int xbin,
int ybin)
throws nom.tam.fits.FitsException
nom.tam.fits.FitsException
public static nom.tam.fits.Fits limit(nom.tam.fits.Fits raw,
double min,
double max)
throws nom.tam.fits.FitsException,
IOException
nom.tam.fits.FitsException
IOException
public static nom.tam.fits.ImageData limit(nom.tam.fits.ImageHDU l,
double low,
double hi)
throws nom.tam.fits.FitsException
nom.tam.fits.FitsException
public static nom.tam.fits.ImageHDU cap(nom.tam.fits.ImageHDU l,
double cap,
double low)
throws nom.tam.fits.FitsException
nom.tam.fits.FitsException
public static nom.tam.fits.ImageHDU hilo(nom.tam.fits.ImageHDU l,
double cap,
double low)
throws nom.tam.fits.FitsException
nom.tam.fits.FitsException
public static nom.tam.fits.ImageHDU trim(nom.tam.fits.ImageHDU in,
Rectangle active)
throws nom.tam.fits.FitsException
SIMPLE = T / Java FITS
BITPIX = -32
NAXIS = 2 / Dimensionality
NAXIS1 = 4066
NAXIS2 = 4064
EXTEND = T / Extensions are permitted
END
active - If null or fill size, return the original image. O therwise a
new image is allocated.
IllegalArgumentException - If the active size does not fit in the source one.
nom.tam.fits.FitsException
public static nom.tam.fits.ImageHDU flip(nom.tam.fits.ImageHDU in,
boolean xflip,
boolean yflip)
throws nom.tam.fits.FitsException
nom.tam.fits.FitsException
public static nom.tam.fits.ImageHDU stitch(nom.tam.fits.ImageHDU left,
nom.tam.fits.ImageHDU right,
boolean rowpatch)
throws nom.tam.fits.FitsException
IllegalArgumentException - if the stitched edges are different.
nom.tam.fits.FitsException
public static nom.tam.fits.Fits transform(nom.tam.fits.Fits image,
Function eval)
throws nom.tam.fits.FitsException,
IOException
nom.tam.fits.FitsException
IOException
public static nom.tam.fits.ImageData flag(nom.tam.fits.ImageHDU in,
double trig)
throws nom.tam.fits.FitsException
nom.tam.fits.FitsException
public static nom.tam.fits.ImageHDU scalarMultiply(nom.tam.fits.ImageHDU in,
double scale)
throws nom.tam.fits.FitsException
nom.tam.fits.FitsException
public static nom.tam.fits.ImageHDU scalarOffset(nom.tam.fits.ImageHDU in,
double offset)
throws nom.tam.fits.FitsException
nom.tam.fits.FitsException
public static nom.tam.fits.ImageHDU transform(nom.tam.fits.ImageHDU in,
Function eval)
throws nom.tam.fits.FitsException
nom.tam.fits.FitsException
public static Dimension getSize(nom.tam.fits.ImageHDU raw)
throws nom.tam.fits.FitsException
nom.tam.fits.FitsException
public static List<Number> getRawWindow(nom.tam.fits.Fits file,
Rectangle window)
throws nom.tam.fits.FitsException,
IOException
window - If null, entire HDU is read.
nom.tam.fits.FitsException
IOException
public static List<Number> getRawWindow(nom.tam.fits.ImageHDU image,
Rectangle window)
throws nom.tam.fits.FitsException
window - If null, entire HDU is read.
nom.tam.fits.FitsException
public static List<Number> getTrueWindow(nom.tam.fits.Fits file,
Rectangle window)
throws nom.tam.fits.FitsException,
IOException
window - If null, entire HDU is read.
nom.tam.fits.FitsException
IOException
public static List<Number> getTrueWindow(nom.tam.fits.ImageHDU image,
Rectangle window)
throws nom.tam.fits.FitsException
window - If null, entire HDU is read.
nom.tam.fits.FitsException
public static List<Number> getTrueFrame(nom.tam.fits.ImageHDU hdu,
Rectangle active,
int thick)
throws nom.tam.fits.FitsException
nom.tam.fits.FitsException
public static boolean saveAs(nom.tam.fits.Fits src,
File as)
throws IOException
IOException
public static boolean saveAs(nom.tam.fits.Fits src,
String as)
throws IOException
IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||