|
||||||||||
| 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.FitsCheck
public class FitsCheck
Class for checking raw input files. Especially for calibration files, as discarding too many there does no harm. Bias and darks only have to have low signal, so a pure moments check is ok there, flats need some more thourogh investigation, thus
FlatCheck| Nested Class Summary | |
|---|---|
static class |
FitsCheck.Failure
|
| Nested classes/interfaces inherited from class util.PropertyResources |
|---|
PropertyResources.URLResource |
| Field Summary | |
|---|---|
static String |
DEFFAILEXT
The parental reduce directory. |
private static String |
DEFTMPDIR
Temporal directory including slash. |
private static String |
DEFTMPFITS
Temporal fits file for uncompressing |
static String |
KEY_BIASMAXIMA
The statistic minima valid bias must fulfill. |
static String |
KEY_BIASMINIMA
The statistic minima valid bias must fulfill. |
static String |
KEY_DARKMAXIMA
The statistic minima valid dark must fulfill. |
static String |
KEY_DARKMINIMA
The statistic minima valid dark must fulfill. |
static String |
KEY_FAILDIR
Parent directory where the failture files should be writtn/retrieved. |
static String |
KEY_FAILEXT
The parent directory of the reduced files. |
static String |
KEY_OBSDB
If non-default properties are needed for the obs db. |
static String |
KEY_TMPDIR
Temporal directory including slash. |
static String |
KEY_TMPFITS
Temporal fits file for uncompressing |
protected ObserveSql |
obs
Access to the obs table. |
static String |
PREFIX_FLATMAXIMA
The statistic minima valid flats must fulfill. |
static String |
PREFIX_FLATMINIMA
The statistic minima valid flats must fulfill. |
static String |
PREFIX_SCIENCEMAXIMA
The statistic minima valid science frames must fulfill. |
static String |
PREFIX_SCIENCEMINIMA
The statistic minima valid science frames must fulfill. |
| 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 | |
|---|---|
FitsCheck(Map<String,String> prop)
Defaults everything. |
|
| Method Summary | |
|---|---|
List<FitsCheck.Failure> |
check(String unique)
We check an oberservation specified by its unique ID. |
protected List<FitsCheck.Failure> |
checkAdu(String unique,
String minkey,
String maxkey,
boolean strict)
Checks average, standard deviation and higher order moments of the stated file to be within the bounds. |
List<FitsCheck.Failure> |
checkBias(String unique)
In the basic version diverts to strcit checking of adu statistics. |
List<FitsCheck.Failure> |
checkCentroid(String unique,
float xcen,
float ycen)
From the unique id of a flat observation, we check if the centroid is withinin bounds. |
List<FitsCheck.Failure> |
checkCentroidFromAverage(float[] av,
float xcen,
float ycen)
From the average of a flat observation, we check if the centroid is withinin bounds. |
List<FitsCheck.Failure> |
checkDark(String unique)
In the basic version diverts to strcit checking of adu statistics. |
List<FitsCheck.Failure> |
checkFlat(String unique)
In the basic version diverts to strict checking of adu statistics. |
List<FitsCheck.Failure> |
checkScience(String unique)
In the basic version, do a non-strict checking of adu statistic (failure only if all quadrants fail for the same reason). |
protected List<List<Double>> |
getAduConstraints(String key)
Parses a double-linked list into a list of a list of doubles, representing in the outer index the moment, in the inner list the amplifier. |
void |
init()
Creates and initializes the obs db. |
List<FitsCheck.Failure> |
isAduCompatible(String unique,
List<List<Double>> min,
List<List<Double>> max,
boolean strict)
Checks for a single file if it satisfies the ADU constriants. |
List<FitsCheck.Failure> |
readFailure(String unique)
We read the failure flag file. |
static List<FitsCheck.Failure> |
readFailureFile(File fail)
|
protected static void |
updateFailure(List<FitsCheck.Failure> target,
FitsCheck.Failure with,
double r)
Helps to add a new failure to the list if, not already there. |
boolean |
writeFailure(String unique,
List<FitsCheck.Failure> outcome)
As long as there is no table for indicating failed files, we write a flag-file into the reduced dir. |
static boolean |
writeFailureFile(File fail,
List<FitsCheck.Failure> outcome)
|
| 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, 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 |
| Field Detail |
|---|
public static final String KEY_TMPDIR
public static final String KEY_TMPFITS
public static final String KEY_FAILDIR
public static final String KEY_FAILEXT
public static final String KEY_BIASMINIMA
public static final String KEY_BIASMAXIMA
public static final String KEY_DARKMINIMA
public static final String KEY_DARKMAXIMA
public static final String PREFIX_FLATMINIMA
public static final String PREFIX_FLATMAXIMA
public static final String PREFIX_SCIENCEMINIMA
public static final String PREFIX_SCIENCEMAXIMA
public static final String KEY_OBSDB
public static final String DEFFAILEXT
private static final String DEFTMPDIR
private static final String DEFTMPFITS
protected ObserveSql obs
| Constructor Detail |
|---|
public FitsCheck(Map<String,String> prop)
| Method Detail |
|---|
public void init()
init in interface Initializableinit in class PropertyResourcespublic List<FitsCheck.Failure> check(String unique)
public List<FitsCheck.Failure> checkBias(String unique)
public List<FitsCheck.Failure> checkDark(String unique)
public List<FitsCheck.Failure> checkFlat(String unique)
public List<FitsCheck.Failure> checkScience(String unique)
protected static void updateFailure(List<FitsCheck.Failure> target,
FitsCheck.Failure with,
double r)
protected List<FitsCheck.Failure> checkAdu(String unique,
String minkey,
String maxkey,
boolean strict)
public List<FitsCheck.Failure> isAduCompatible(String unique,
List<List<Double>> min,
List<List<Double>> max,
boolean strict)
public List<FitsCheck.Failure> checkCentroid(String unique,
float xcen,
float ycen)
x_c=0.5*(-Q0+Q1-Q2+Q3)/ΣQ
y_c=0.5*(-Q0-Q1+Q2+Q3)/ΣQ
where the Q's are the average of the respective quadrants. A stuck
filter wheel will manifest itself in a possible higher y-centroid.
public List<FitsCheck.Failure> checkCentroidFromAverage(float[] av,
float xcen,
float ycen)
x_c=0.5*(-Q0+Q1-Q2+Q3)/ΣQ
y_c=0.5*(-Q0-Q1+Q2+Q3)/ΣQ
where the Q's are the average of the respective quadrants. A stuck
filter wheel will manifest itself in a possible higher y-centroid.
public boolean writeFailure(String unique,
List<FitsCheck.Failure> outcome)
throws IOException
IOException
public static boolean writeFailureFile(File fail,
List<FitsCheck.Failure> outcome)
throws IOException
IOException
public List<FitsCheck.Failure> readFailure(String unique)
throws IOException
IOException
public static final List<FitsCheck.Failure> readFailureFile(File fail)
throws IOException
IOExceptionprotected List<List<Double>> getAduConstraints(String key)
10000,11000,12000,9000;300,-1,100,200
is interprated as, averages 10000,11000,12000,9000 for the four
amplifiers and as variances 300,don't care, 100, and 200. It is used for
the minima and maxima. If the maxima is less then the minima, this means
this moment for this particular quadrant is ignored.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||