|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectutil.PropertyContainer
util.PropertyResources
util.PropertyBundles
astro.fits.Overscan
public class Overscan
Class to model an overscan region and to subtract it from an image hdu. Mainly for column-overscan .
| Nested Class Summary | |
|---|---|
static class |
Overscan.Column
Fits a column and prints out the row-average, stddev and the fit. |
static class |
Overscan.Corner
Prints the corner pixel of the overscan region in the first imagehdu |
static class |
Overscan.Extract
Extracts the smoothened column overscan from a wifsip image for the stated extension. |
static class |
Overscan.Solver
|
static class |
Overscan.Wifsip
Subtracts a wifsip overscan. |
static class |
Overscan.WifsipBias
Subtracts a wifsip overscan. |
static class |
Overscan.WifsipOverscan
A non-linear model for fitting the exponentially glow in WiFSIP data. |
| Nested classes/interfaces inherited from class util.PropertyResources |
|---|
PropertyResources.URLResource |
| Field Summary | |
|---|---|
private static double |
DEFADDOFFSET
Default additional offset. |
private static int |
DEFFITOVERLAP
Default half overlap. |
private static int |
DEFFITREGIONMAX
Default fit region. |
private static int |
DEFFITREGIONMIN
Default fit region. |
private static Dimension |
DEFMASTERCLIP
The default master clip. |
private static int |
DEFORDER
Default fit order. |
private static Rectangle |
DEFOVERSCAN
Default overscan region. |
private static double |
DEFRMSINCREASE
Default additional offset. |
private static Rectangle |
DEFROWOVERSCAN
Default overscan region. |
private static int |
DEFRUNNINGAVERAGE
Default running average half-size. |
static String |
KEY_ADDOFFSET
Artificial raise of level. |
static String |
KEY_FITOVERLAP
The overlap region around fitmin where we match Legendre and exp. |
static String |
KEY_FITREGIONMAX
The region where we use an overscan fit, outside median. |
static String |
KEY_FITREGIONMIN
The region where we use an overscan fit, outside median. |
static String |
KEY_MASTERCLIP
Key that denotes the active window per quadrant. |
static String |
KEY_ORDER
The legendre order to which we fit in the region. |
static String |
KEY_OVERSCAN
The rectangle where we have the column overscan region. |
static String |
KEY_RMSINCREASE
Maximum factorial increase in RMS from linear to exponential fit. |
static String |
KEY_ROWOVERSCAN
The rectangle where we have the row overscan region. |
static String |
KEY_RUNNINGAVERAGE
If no fit is found, use an running average of this size. |
static String |
OSAV
The key that states the overscan model RMS. |
static String |
OSAVREM
The comment to the overscan rms header entry. |
static String |
OSRMS
The key that states the overscan model RMS. |
static String |
OSRMSREM
The comment to the overscan rms header entry. |
private double[][] |
scan
The extracted overscan region. |
| 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 | |
|---|---|
Overscan(Map<String,String> prop)
Defaults the overscan region. |
|
| Method Summary | |
|---|---|
static double[] |
averageOverscan(double[][] adu,
int window)
From a rectangluar overscan, we first smooth along the minor axis, then calculating a running average of given length on the smoothened overscan. |
private static double[] |
averageOverscan(Vector2D[] smooth,
int window)
From a rectangluar overscan, we first smooth along the minor axis, then calculating a running average of given length on the smoothened overscan. |
nom.tam.fits.ImageHDU |
correct(nom.tam.fits.ImageHDU image,
boolean expf)
In the object version, do the entire fit. |
double[][] |
extractOverscan(nom.tam.fits.ImageHDU image)
Extracts the overscan as a two-dimensional double array. |
static double[][] |
extractOverscan(nom.tam.fits.ImageHDU image,
Rectangle reg)
Extracts the overscan as a two-dimensional double array. |
static Legendre |
fitRegion(int order,
int min,
int max,
double[][] adu)
Fits the input array with a legendre polynom of the defined order. |
private static Legendre |
fitRegion(int order,
int min,
int max,
double[][] adu,
Vector1D nn)
Fits the input array with a legendre polynom of the defined order. |
private static Legendre |
fitRegion(int order,
int min,
int max,
Vector2D[] smooth,
Vector1D nn)
Fits the input array with a legendre polynom of the defined order. |
private static double[] |
getBestOverscanModel(int s0,
Vector2D[] ovscn,
double[] exp,
Function legendre,
double[] average,
int window,
int min,
int overlap,
int max,
double rms)
From the exponential and the Legendre fit on one hand, and from the running average on the other hand, we decide which fit is best to model the overscan. |
static double[] |
nonlinearFit(Class<? extends AbstractGradientModel> wifsip,
int s0,
int max,
double[][] adu,
VectorG start,
VectorG len,
double maxrms)
Tries to fit outside the region. |
static double[] |
nonlinearFit(Class<? extends AbstractGradientModel> wifsip,
Map<String,String> prop,
int s0,
int max,
double[][] adu,
VectorG start,
VectorG len,
double maxrms)
Tries to fit outside the region. |
static double[] |
nonlinearFit(Class<? extends AbstractGradientModel> wifsip,
Map<String,String> prop,
int s0,
int max,
Vector2D[] adu,
VectorG start,
VectorG len,
double maxrms)
Tries to fit outside the region. |
private static double[] |
pumpUp(double[] post,
int s0)
|
private static int |
searchCrossing(int row,
int width,
Function legendre,
double[] expsolve,
double rms)
Starting from the row given, we scan at most overlap rows to the top and bottom, searching for the index where the exponential fit and the Legendre fit cross. |
static GeneralLinearRegression |
setupFit(Function[] legendre,
int min,
int max,
Vector2D[] adu)
Converts an adu with the fit axis on the first index plus the fitting functions into a general linear regression. |
private static GradientModel |
setupModel(Class<? extends AbstractGradientModel> wifsip,
Map<String,String> prop,
int s0,
int max,
Vector2D[] adu)
Converts an adu-array into a data model of the given class type. |
static Vector2D[] |
smoothOverscan(double[][] adu)
From a rectangluar overscan we calculate the average across the minor axis, leaving out the lowest and highest value. |
private static VectorG |
solveFor(Overscan.Solver s,
GradientModel exp,
VectorG start,
VectorG len)
Takes a differtiable model of the non-linear gradient region and fits it with one of the specified solvers. |
static nom.tam.fits.ImageHDU |
subtractOverscanColumn(nom.tam.fits.ImageHDU image,
double[] overscan,
double addoff,
Rectangle os,
Dimension thick,
double modrms)
Corrects an image hdu by subtracting the overscan fit in the fitting region or by subtracting the exponential not-to-fit region. |
| 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, init, 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 |
| Methods inherited from interface util.Initializable |
|---|
init |
| Field Detail |
|---|
public static final String OSAV
public static final String OSAVREM
public static final String OSRMS
public static final String OSRMSREM
public static final String KEY_OVERSCAN
public static final String KEY_ROWOVERSCAN
public static final String KEY_FITREGIONMIN
public static final String KEY_FITOVERLAP
public static final String KEY_FITREGIONMAX
public static final String KEY_ORDER
public static final String KEY_ADDOFFSET
public static final String KEY_RMSINCREASE
public static final String KEY_RUNNINGAVERAGE
public static final String KEY_MASTERCLIP
private static final double DEFRMSINCREASE
private static final double DEFADDOFFSET
private static final int DEFORDER
private static final int DEFFITOVERLAP
private static final int DEFFITREGIONMIN
private static final int DEFFITREGIONMAX
private static final int DEFRUNNINGAVERAGE
private static final Rectangle DEFROWOVERSCAN
private static final Rectangle DEFOVERSCAN
private static final Dimension DEFMASTERCLIP
private double[][] scan
| Constructor Detail |
|---|
public Overscan(Map<String,String> prop)
| Method Detail |
|---|
public nom.tam.fits.ImageHDU correct(nom.tam.fits.ImageHDU image,
boolean expf)
throws nom.tam.fits.FitsException
expf - If true, also do the exponential fit.
nom.tam.fits.FitsException
private static double[] getBestOverscanModel(int s0,
Vector2D[] ovscn,
double[] exp,
Function legendre,
double[] average,
int window,
int min,
int overlap,
int max,
double rms)
public double[][] extractOverscan(nom.tam.fits.ImageHDU image)
throws nom.tam.fits.FitsException
nom.tam.fits.FitsException
public static Legendre fitRegion(int order,
int min,
int max,
double[][] adu)
private static Legendre fitRegion(int order,
int min,
int max,
double[][] adu,
Vector1D nn)
private static Legendre fitRegion(int order,
int min,
int max,
Vector2D[] smooth,
Vector1D nn)
public static double[] nonlinearFit(Class<? extends AbstractGradientModel> wifsip,
int s0,
int max,
double[][] adu,
VectorG start,
VectorG len,
double maxrms)
public static double[] nonlinearFit(Class<? extends AbstractGradientModel> wifsip,
Map<String,String> prop,
int s0,
int max,
double[][] adu,
VectorG start,
VectorG len,
double maxrms)
public static double[] nonlinearFit(Class<? extends AbstractGradientModel> wifsip,
Map<String,String> prop,
int s0,
int max,
Vector2D[] adu,
VectorG start,
VectorG len,
double maxrms)
private static final double[] pumpUp(double[] post,
int s0)
private static VectorG solveFor(Overscan.Solver s,
GradientModel exp,
VectorG start,
VectorG len)
public static nom.tam.fits.ImageHDU subtractOverscanColumn(nom.tam.fits.ImageHDU image,
double[] overscan,
double addoff,
Rectangle os,
Dimension thick,
double modrms)
throws nom.tam.fits.FitsException
nom.tam.fits.FitsException
private static int searchCrossing(int row,
int width,
Function legendre,
double[] expsolve,
double rms)
public static double[][] extractOverscan(nom.tam.fits.ImageHDU image,
Rectangle reg)
throws nom.tam.fits.FitsException
nom.tam.fits.FitsException
private static GradientModel setupModel(Class<? extends AbstractGradientModel> wifsip,
Map<String,String> prop,
int s0,
int max,
Vector2D[] adu)
Overscan.WifsipOverscan, i.e. a
double-exponential drop.
public static GeneralLinearRegression setupFit(Function[] legendre,
int min,
int max,
Vector2D[] adu)
public static Vector2D[] smoothOverscan(double[][] adu)
adu - Overscan region, major axis on first index.column - If true, CCD column is the major axis.extractOverscan
public static double[] averageOverscan(double[][] adu,
int window)
private static double[] averageOverscan(Vector2D[] smooth,
int window)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||