|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.ac.starlink.ttools.plot2.Scaling
@Equality public abstract class Scaling
Defines a policy for scaling values to a fixed interval.
Field Summary | |
---|---|
static Scaling |
AUTO
Asinh-based scaling with default parameters. |
static Scaling |
LINEAR
Linear scaling. |
static Scaling |
LOG
Logarithmic scaling. |
static Scaling |
SQRT
Square root scaling. |
static Scaling |
SQUARE
Square scaling. |
Constructor Summary | |
---|---|
protected |
Scaling(String name,
String description,
boolean isLogLike)
Constructor. |
Method Summary | |
---|---|
static Scaling |
createAsinhScaling(String name,
double delta)
Constructs an asinh-based scaling. |
static Scaler |
createRangeScaler(Scaling scaling,
Range range)
Utility method to return a scaler based on a Range object. |
abstract Scaler |
createScaler(double lo,
double hi)
Returns a scaler instance that can scale input values in a given range. |
String |
getDescription()
Returns a short description of this scaling. |
String |
getName()
Returns the name of this scaling. |
static Scaling[] |
getStretchOptions()
Returns a list of standard options for colour map stretch. |
boolean |
isLogLike()
Indicates whether this scaling is logarithmic. |
static Scaling |
subrangeScaling(Scaling scaling,
Subrange subrange)
Adjusts a scaling by applying a fractional subrange to the scaler inputs before scaling is applied, so that the input range is subranged, rather than the output range. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final Scaling LINEAR
public static final Scaling LOG
public static final Scaling SQRT
public static final Scaling SQUARE
public static final Scaling AUTO
Constructor Detail |
---|
protected Scaling(String name, String description, boolean isLogLike)
name
- scaling namedescription
- short description of scaling ruleisLogLike
- whether the scaling is logarithmic,
for instance should be displayed on a log axisMethod Detail |
---|
public String getName()
public String getDescription()
public boolean isLogLike()
public abstract Scaler createScaler(double lo, double hi)
s
:
s.scaleValue(x) == s.scaleValue(lo) for x<lo s.scaleValue(x) == s.scaleValue(hi) for x>hi
lo
- lower bound of unclipped input data valuehi
- upper bound of unclipped input data value
public String toString()
toString
in class Object
public static final Scaling[] getStretchOptions()
public static Scaling subrangeScaling(Scaling scaling, Subrange subrange)
scaling
- base scalingsubrange
- fractional subrange to apply to input values
public static Scaler createRangeScaler(Scaling scaling, Range range)
scaling
- scalingrange
- value range
public static Scaling createAsinhScaling(String name, double delta)
name
- scaling namedelta
- output difference for lower-end input unit difference
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |