public class SphericalPolarPointStore extends Object implements PointStore
The error points returned by getErrors(int)
consist of a
1- (radial only), 2- (tangential only) or 3- (tangential followed by
radial) pair array of 3-d coordinate arrays. Each pair is a lower
bound followed by an upper bound along the relevant dimension.
Constructor and Description |
---|
SphericalPolarPointStore(uk.ac.starlink.ttools.plot.ErrorMode radialMode,
boolean hasTanerr,
boolean radialLog,
int npoint)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
calcErrors(double[] centre,
double[] tanErrs,
double[] radErrs,
double[][] errors)
Calculates the returned error points given the raw error values.
|
int |
getCount()
Returns the number of points in this dataset.
|
double[][] |
getErrors(int ipoint)
Reads the errors for one of the stored points.
|
String |
getLabel(int ipoint)
Returns a string associated with a given point.
|
int |
getNdim()
Returns the length of the coordinate array for each point.
|
int |
getNerror()
Returns the number of error points returned for each point.
|
double[] |
getPoint(int ipoint)
Reads the coordinates of one of the stored points.
|
boolean |
hasLabels()
Indicates whether a string label is associated with some points.
|
void |
setMinimumTanError(double minTanError)
Sets the smallest value for tan error which should generate non-blank
tangent error bar points.
|
void |
storePoint(Object[] coordRow,
Object[] errorRow,
String label)
Stores the next point in sequence to this object.
|
public SphericalPolarPointStore(uk.ac.starlink.ttools.plot.ErrorMode radialMode, boolean hasTanerr, boolean radialLog, int npoint)
radialMode
- type of radial error information to storehasTanerr
- whether to store tangential error informationradialLog
- whether radial coordinates are logarithmicnpoint
- number of points to storepublic void storePoint(Object[] coordRow, Object[] errorRow, String label)
PointStore
Points.getNdim()
and Points.getNerror()
methods, since there may be some translation between the arrays.
The PointSelection
submits rows here as retrieved
directly from the AxesSelector AxesSelector.getData()
and
AxesSelector.getErrorData()
tables.
storePoint
in interface PointStore
coordRow
- array of objects representing coordinate valueserrorRow
- array of objects representing error valueslabel
- string labelling the pointpublic int getCount()
Points
public int getNdim()
Points
public double[] getPoint(int ipoint)
Points
public int getNerror()
Points
public double[][] getErrors(int ipoint)
Points
nerror
double[] arrays,
each of which has ndim
elements and represents the
coordinates of the end of an error bar. If any of these
coordinate arrays is null
, it represents an error
bar of zero size, that is one whose end sits right on the data point.
The ordering of these points is up to the user of this object,
but typically they will be in pairs, e.g. (xlo,xhi, ylo,hi, ...).
The content of the returned double[][] array and of its elements
may be modified by subsequent calls to this method. The caller is
also permitted to modify these.public boolean hasLabels()
Points
hasLabels
in interface Points
Points.getLabel(int)
may return a non-null value for
any pointpublic String getLabel(int ipoint)
Points
Points.hasLabels()
returns true.public void setMinimumTanError(double minTanError)
minTanError
- minimum non-negligable tangent error in radianspublic void calcErrors(double[] centre, double[] tanErrs, double[] radErrs, double[][] errors)
centre
- central point coordinatestanErrs
- array of raw tangent error values as storedradErrs
- array of raw radial error values as storederrors
- array of error pointsCopyright © 2003-2025 CCLRC: Council for the Central Laboratory of the Research Councils. All Rights Reserved.