public class MFitsStarFind extends PropertyResources implements MSifting, Initializable
| Modifier and Type | Class and Description |
|---|---|
static class |
MFitsStarFind.FileMatch |
static class |
MFitsStarFind.Reduce
Allows off-line reduction of acquire, guiding, and focus frames.
|
PropertyResources.Load, PropertyResources.URLResource| Modifier and Type | Field and Description |
|---|---|
private static boolean |
DEFFASTGAUSS |
private static int |
DEFSKYFRAME |
private static double |
DEFSKYTHRESHOLD |
static String |
KEY_DETECTIONLIMIT
Stars have a probability higher than this value.
|
static String |
KEY_ELONGATIONMAX
The maximum elongation for a valid star detection, 0=round.
|
static String |
KEY_ELONGATIONWIDTH
The steepness of the elongation drop.
|
static String |
KEY_FASTGAUSS |
static String |
KEY_GLOBALWIDTH
The sharpness peak width for a valid star detection.
|
static String |
KEY_SHARPLOWLIMIT
Overexposed star may even fall below this.
|
static String |
KEY_SHARPLOWVALUE
Then we give this for the sharpness indicator.
|
static String |
KEY_SHARPPEAKS
The sharpness peak for a valid star detection.
|
static String |
KEY_SHARPWIDTHS
The sharpness peak width for a valid star detection.
|
static String |
KEY_SKYFRAME |
static String |
KEY_SKYTHRESHOLD |
static String |
KEY_STRIPDISTANCE
Read-out stripes have this maximum column offset.
|
static String |
KEY_STRIPESMAX
Read-out stripes have this maximum stroke.
|
static String |
KEY_SURESTRIPES
Strokes below this are immediately identified as stripes.
|
KEY_NOINITONCREATE, POSTFIX_ALPHABET, POSTFIX_BYTES, POSTFIX_DIR, POSTFIX_EXT, POSTFIX_FILE, POSTFIX_LIST, POSTFIX_MODTIME, POSTFIX_URLKEY_LISTSEPARATOR, KEY_MAPKEYVALUECHAR, KEY_MAPSEPARATORKEY_URLRESOURCES, KEY_URLUSECONFIG, KEY_URLUSECURRENT, KEY_URLUSEHOMECONFIG, KEY_CLASS| Constructor and Description |
|---|
MFitsStarFind(Map<String,String> props) |
| Modifier and Type | Method and Description |
|---|---|
float[] |
gauss(MImageHDU hdu,
double fwhm,
double trunc)
Prepares a reduced image for star detection by applying a truncated
Gaussian filter to it.
|
List<StarDetection> |
getDetectedStars(Rectangle readout,
Dimension binning,
MImageHDU reduced,
float[] gauss,
int datamin,
int datamax,
int searchbox,
int thick,
float[] xstripes,
float[] ystripes)
Detect stars in the images using the reduced (or raw) frame plus the
gaussian-filtered one.If the detector is shutterless, consider also to
look for horizontal or vertical stripes.
|
private List<StarDetection> |
getStrip(List<StarDetection> principal,
Point2D center)
We scan a list of
StarDetections and return all entries
that
are within a certain column, defined in center. |
void |
init() |
private boolean |
isStar(StarDetection star)
We compare the stars sharpness with an allowed list of peaks and width.
|
MImageHDU |
reduce(MImageHDU raw,
double exptime,
MImageHDU bias,
MImageHDU dark,
double darktime,
MImageHDU flat)
Prepares a raw image HDU by applying bias reduction, dark and
flat-field correction.
|
List<StarDetection> |
removeSpurious(List<StarDetection> raw)
We compare each entry to a allowed range of sharpness and elongation.
|
protected List<StarDetection> |
removeStripes(List<StarDetection> stars)
For bright stars, stars brighter than 9th mag, read-out stripes can be
seen in the image because of the shutterless operation.
|
static boolean |
save(File write,
ArrayLayout geom,
float[] reduced)
Convenience for saving 16-bit image hdu in fits files.
|
static boolean |
save(File write,
MImageHDU reduced)
Convenience for saving image hdu in fits files.
|
float[] |
xstripes(MImageHDU reduced,
double fwhm,
double trunc)
Prepares a reduced image for star detection by applying a truncated
Gaussian filter parallel to the x-axis.
|
float[] |
ystripes(MImageHDU reduced,
double fwhm,
double trunc)
Prepares a reduced image for star detection by applying a truncated
Gaussian filter parallel to the y-axis.
|
clone, createFrom, createFrom, createFrom, createInstance, getApplet, getAsResources, getLocate, getPropertiesToKey, getPropertiesToKey, getResource, getResourceAsStream, getResourceFromKey, getResources, hasLocalURLs, initProperties, keyCreate, keyCreate, reload, setAppletaugment, augment, 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, parseObject, reload, removeProperty, requires, rescanned, setObject, setProperties, setProperty, stringProperties, toStringequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitdefaultBoolean, 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, stringPropertiespublic static final String KEY_SKYFRAME
public static final String KEY_SKYTHRESHOLD
public static final String KEY_FASTGAUSS
public static final String KEY_DETECTIONLIMIT
public static final String KEY_SHARPPEAKS
public static final String KEY_SHARPWIDTHS
public static final String KEY_GLOBALWIDTH
public static final String KEY_ELONGATIONMAX
public static final String KEY_ELONGATIONWIDTH
public static final String KEY_SHARPLOWLIMIT
public static final String KEY_SHARPLOWVALUE
public static final String KEY_SURESTRIPES
public static final String KEY_STRIPESMAX
public static final String KEY_STRIPDISTANCE
private static final int DEFSKYFRAME
private static final double DEFSKYTHRESHOLD
private static final boolean DEFFASTGAUSS
public void init()
init in interface Initializablepublic MImageHDU reduce(MImageHDU raw, double exptime, MImageHDU bias, MImageHDU dark, double darktime, MImageHDU flat) throws BasicFitsException
MSiftingreduce in interface MSiftingexptime - The exposure time in multiples of the dark nominal exposure timeBasicFitsExceptionpublic float[] gauss(MImageHDU hdu, double fwhm, double trunc) throws BasicFitsException
MSiftinggauss in interface MSiftingBasicFitsExceptionpublic float[] xstripes(MImageHDU reduced, double fwhm, double trunc) throws BasicFitsException
MSiftingxstripes in interface MSiftingBasicFitsExceptionpublic float[] ystripes(MImageHDU reduced, double fwhm, double trunc) throws BasicFitsException
MSiftingystripes in interface MSiftingBasicFitsExceptionpublic List<StarDetection> getDetectedStars(Rectangle readout, Dimension binning, MImageHDU reduced, float[] gauss, int datamin, int datamax, int searchbox, int thick, float[] xstripes, float[] ystripes) throws BasicFitsException
MSiftinggetDetectedStars in interface MSiftingreduced - The reduced image, only for photometry.gauss - The convolved image for star center using datamin and maxdatamin - Minimum ADU value to spike star detectiondatamax - Maximum value for a star, can be 65535searchbox - Half-radius of the search box.thick - No stars this close to the edges searched. Must be >= searchbox.BasicFitsExceptionpublic List<StarDetection> removeSpurious(List<StarDetection> raw)
removeSpurious in interface MSiftingraw - All detections (ADU above certain threshold in filtered image).protected List<StarDetection> removeStripes(List<StarDetection> stars)
KEY_STRIPESMAX, the image is
considered a read-out stripe and removed from the list.
This method is only there for convenience, see ReadoutStripes.
private boolean isStar(StarDetection star)
star - private List<StarDetection> getStrip(List<StarDetection> principal, Point2D center)
StarDetections and return all entries
that
are within a certain column, defined in center.public static boolean save(File write, MImageHDU reduced) throws IOException
IOExceptionpublic static boolean save(File write, ArrayLayout geom, float[] reduced) throws IOException, BasicFitsException
BasicFitsExceptionIOException