Plotter<SkyDensityPlotter.SkyDenseStyle>
public class SkyDensityPlotter extends java.lang.Object implements Plotter<SkyDensityPlotter.SkyDenseStyle>
Note it only works with a SkySurface.
Modifier and Type | Class | Description |
---|---|---|
static class |
SkyDensityPlotter.SkyDenseStyle |
Style for configuring with the sky density plot.
|
Modifier and Type | Field | Description |
---|---|---|
static PerUnitConfigKey<SolidAngleUnit> |
ANGLE_KEY |
Config key for solid angle units.
|
static ConfigKey<Combiner> |
COMBINER_KEY |
Config key for combination mode.
|
static ReportKey<java.lang.Double> |
TILESIZE_REPKEY |
Report key for HEALPix tile area in square degrees.
|
static ConfigKey<java.lang.Double> |
TRANSPARENCY_KEY |
Config key for transparency.
|
Constructor | Description |
---|---|
SkyDensityPlotter(boolean transparent,
boolean hasWeight) |
Constructor.
|
Modifier and Type | Method | Description |
---|---|---|
PlotLayer |
createLayer(DataGeom geom,
DataSpec dataSpec,
SkyDensityPlotter.SkyDenseStyle style) |
Creates a PlotLayer based on the given geometry, data and style.
|
SkyDensityPlotter.SkyDenseStyle |
createStyle(ConfigMap config) |
Creates a style that can be used when creating a plot layer.
|
CoordGroup |
getCoordGroup() |
Returns an object describing which data coordinates are used for
this plotter and how they are arranged in supplied DataSpec objects.
|
static int |
getPixelLevel(SkySurface surface) |
Calculates the HEALPix level whose pixels are of approximately
the same size as the screen pixels for a given SkySurface.
|
java.lang.String |
getPlotterDescription() |
Returns an XML description of this plotter.
|
javax.swing.Icon |
getPlotterIcon() |
Returns an icon for this plotter for use in user interface.
|
java.lang.String |
getPlotterName() |
Returns the name of this plotter for use in user interface.
|
ConfigKey[] |
getStyleKeys() |
Returns the configuration keys used to configure style for this plotter.
|
boolean |
hasReports() |
Indicates whether the drawings produced by this plotter will
return general interest report information to upstream plotting code.
|
static double |
vectorSeparation(double[] p1,
double[] p2) |
Angle in radians between two (not necessarily unit) vectors.
|
public static final ReportKey<java.lang.Double> TILESIZE_REPKEY
public static final ConfigKey<java.lang.Double> TRANSPARENCY_KEY
public static final PerUnitConfigKey<SolidAngleUnit> ANGLE_KEY
public SkyDensityPlotter(boolean transparent, boolean hasWeight)
transparent
- if true, there will be a config option for
setting the alpha value of the whole layerhasWeight
- if true, an optional weight coordinate will
be solicited alongside the positional coordinatespublic java.lang.String getPlotterName()
Plotter
getPlotterName
in interface Plotter<SkyDensityPlotter.SkyDenseStyle>
public javax.swing.Icon getPlotterIcon()
Plotter
getPlotterIcon
in interface Plotter<SkyDensityPlotter.SkyDenseStyle>
public CoordGroup getCoordGroup()
Plotter
getCoordGroup
in interface Plotter<SkyDensityPlotter.SkyDenseStyle>
public boolean hasReports()
Plotter
hasReports
in interface Plotter<SkyDensityPlotter.SkyDenseStyle>
Drawing.getReport(java.lang.Object)
public java.lang.String getPlotterDescription()
Plotter
Note: really this should appear at the LayerType level.
getPlotterDescription
in interface Plotter<SkyDensityPlotter.SkyDenseStyle>
public ConfigKey[] getStyleKeys()
Plotter
Plotter.createStyle(uk.ac.starlink.ttools.plot2.config.ConfigMap)
method.getStyleKeys
in interface Plotter<SkyDensityPlotter.SkyDenseStyle>
public SkyDensityPlotter.SkyDenseStyle createStyle(ConfigMap config)
Plotter
Plotter.getStyleKeys()
.
The return value can be used as input to Plotter.createLayer(uk.ac.starlink.ttools.plot2.DataGeom, uk.ac.starlink.ttools.plot2.data.DataSpec, S)
.createStyle
in interface Plotter<SkyDensityPlotter.SkyDenseStyle>
config
- map of style configuration itemspublic PlotLayer createLayer(DataGeom geom, DataSpec dataSpec, SkyDensityPlotter.SkyDenseStyle style)
Plotter
The style
parameter is the result of a call to
Plotter.createStyle(uk.ac.starlink.ttools.plot2.config.ConfigMap)
.
The dataSpec
parameter must contain the coordinates
defined by this plotter's CoordGroup.
The pointDataGeom
parameter is only used if
getCoordGroup()
.
getPositionCount
returns a non-zero value,
otherwise the plot does not have point positions.
It is legal to supply null for any of the parameters; if insufficient data is supplied to generate a plot, then the method should return null.
Creating a layer should be cheap; layers may be created and not used.
createLayer
in interface Plotter<SkyDensityPlotter.SkyDenseStyle>
geom
- indicates base position coordinates and their
mapping to points in the data space;
if non-null, the data geom's
DataGeom.hasPosition()
method will return truedataSpec
- specifies the data required for the plotstyle
- data style as obtained from createStyle
public static int getPixelLevel(SkySurface surface)
surface
- public static double vectorSeparation(double[] p1, double[] p2)
p1
- first input vectorp2
- second input vectorCopyright © 2018 Central Laboratory of the Research Councils. All Rights Reserved.