stella.parameter
Class SignalToNoise
java.lang.Object
util.PropertyContainer
util.PropertyResources
util.PropertyBundles
stella.parameter.AbstractParameter
stella.parameter.AbstractRemoteParameter
stella.parameter.AbstractFitsParameter
stella.parameter.AbstractFitsValue
stella.parameter.SignalToNoise
- All Implemented Interfaces:
- Cloneable, Remote, EventListener, EventTrigger, Parameter, RemoteFitsParameter, RemoteParameter, Value, ExitCleaning, Initializable, LocalizedSupplying, PropertySupplying, Reloadable, ResourceSupplying, RmiCaster
public class SignalToNoise
- extends AbstractFitsValue
- implements Reloadable
From a fits file, we extract a window and estimate the Signal-to-Noise from
photon statistics. The array of adus provided by the parental class is
sorted, the background is estimated and an average row-sum is calculated.
After applying the gain factor, the sqrt from this number gets the S/N.
|
Nested Class Summary |
static class |
SignalToNoise.File
Test class and class for processing fits files in-situ. |
|
Method Summary |
private Double |
estimateSignalToNoise(List<Double> adus)
Provide a fits file, an exposure time in seconds and an R-magnitude of
the object and determine the fraction of photons detected. |
Number |
getValue()
Returns the efficiency measure as a Double value. |
double |
rescanned(String key,
String old,
String newval)
Makes this method public, no further changes. |
Number |
setValue(Number val)
Sets the efficiency, which is a read-only variable, therefore this method
throws an UnsupportedOperationException. |
| Methods inherited from class stella.parameter.AbstractFitsParameter |
addRmiListener, getDateObs, getExposureTime, getRegistered, registerFits, registerMonitor, removeRmiListener, rmiDateObs, rmiExposureTime, rmiRegistered, set, setDateObs, setExposureTime, setRegistered |
| Methods inherited from class stella.parameter.AbstractParameter |
createParameter, delivers, getFormatted, getFormatted, getName, getPreserveFile, getString, getString, register, setName, toString |
| 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, setObject, setProperties, setProperty, stringProperties |
| 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 |
KEY_GAIN
public static final String KEY_GAIN
- Gain of the SES CCD.
- See Also:
- Constant Field Values
KEY_READNOISE
public static final String KEY_READNOISE
- Estimate of the read-noise of the CCD, just for histogram bins.
- See Also:
- Constant Field Values
KEY_HIGHSIGNAL
public static final String KEY_HIGHSIGNAL
- Multiplier to get from statistic sigma to upper-limit bound.
- See Also:
- Constant Field Values
DEFNAME
public static final String DEFNAME
- Name of this parameter.
- See Also:
- Constant Field Values
DEFGAIN
private static final double DEFGAIN
- Default gain.
- See Also:
- Constant Field Values
DEFREADNOISE
private static final double DEFREADNOISE
- Default readnoise.
- See Also:
- Constant Field Values
DEFHIGHSIGNAL
private static final double DEFHIGHSIGNAL
- See Also:
- Constant Field Values
SignalToNoise
public SignalToNoise(Map<String,String> prop)
- Constructs a new S/N estimate. After construction, the fits file must be
registerd before retrieving the value.
rescanned
public double rescanned(String key,
String old,
String newval)
- Makes this method public, no further changes.
- Specified by:
rescanned in interface Reloadable- Overrides:
rescanned in class AbstractFitsValue
getValue
public Number getValue()
- Returns the efficiency measure as a Double value. If the rmag is missing
or not set or the fits file is invalid, we return null.
- Specified by:
getValue in interface Value
setValue
public Number setValue(Number val)
throws UnsupportedOperationException
- Sets the efficiency, which is a read-only variable, therefore this method
throws an UnsupportedOperationException.
- Specified by:
setValue in interface Value- Overrides:
setValue in class AbstractFitsValue
- Throws:
UnsupportedOperationException
estimateSignalToNoise
private Double estimateSignalToNoise(List<Double> adus)
- Provide a fits file, an exposure time in seconds and an R-magnitude of
the object and determine the fraction of photons detected. If anything
fails, -1 is returned.
- Parameters:
adus - Extracted adus from SES spectrograph.