public class SpectrogramPlotter extends Object implements Plotter<SpectrogramPlotter.SpectroStyle>
| Modifier and Type | Class and Description |
|---|---|
static interface |
SpectrogramPlotter.ChannelGrid
Defines the spectrum frequency channels.
|
static class |
SpectrogramPlotter.SpectroStyle
Style subclass for SpectrogramPlotter.
|
| Constructor and Description |
|---|
SpectrogramPlotter(FloatingCoord xCoord)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
PlotLayer |
createLayer(DataGeom geom,
DataSpec dataSpec,
SpectrogramPlotter.SpectroStyle style)
The supplied
geom is ignored. |
SpectrogramPlotter.SpectroStyle |
createStyle(ConfigMap config)
Creates a style that can be used when creating a plot layer.
|
SpectrogramPlotter.ChannelGrid |
getChannelGrid(SpectrogramPlotter.SpectroStyle style,
ColumnInfo specInfo,
StarTable table)
Returns the channel grid to use for a given style, spectrum column
and table.
|
CoordGroup |
getCoordGroup()
Returns an object describing which data coordinates are used for
this plotter and how they are arranged in supplied DataSpec objects.
|
int |
getExtentCoordIndex()
Returns the coordinate index for the time extent coordinate.
|
String |
getPlotterDescription()
Returns an XML description of this plotter.
|
Icon |
getPlotterIcon()
Returns an icon for this plotter for use in user interface.
|
String |
getPlotterName()
Returns the name of this plotter for use in user interface.
|
Object |
getRangeStyleKey(SpectrogramPlotter.SpectroStyle style)
Returns an opaque object characterising the region of the plot surface
covered when using a given plotter style.
|
int |
getSpectrumCoordIndex()
Returns the coordinate index for the spectral coordinate.
|
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.
|
public SpectrogramPlotter(FloatingCoord xCoord)
xCoord - horizontal axis coordinatepublic int getSpectrumCoordIndex()
public int getExtentCoordIndex()
public String getPlotterName()
PlottergetPlotterName in interface Plotter<SpectrogramPlotter.SpectroStyle>public Icon getPlotterIcon()
PlottergetPlotterIcon in interface Plotter<SpectrogramPlotter.SpectroStyle>public String getPlotterDescription()
PlotterNote: really this should appear at the LayerType level.
getPlotterDescription in interface Plotter<SpectrogramPlotter.SpectroStyle>public CoordGroup getCoordGroup()
PlottergetCoordGroup in interface Plotter<SpectrogramPlotter.SpectroStyle>public ConfigKey<?>[] getStyleKeys()
PlotterPlotter.createStyle(uk.ac.starlink.ttools.plot2.config.ConfigMap) method.getStyleKeys in interface Plotter<SpectrogramPlotter.SpectroStyle>public SpectrogramPlotter.SpectroStyle createStyle(ConfigMap config)
PlotterPlotter.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<SpectrogramPlotter.SpectroStyle>config - map of style configuration itemspublic Object getRangeStyleKey(SpectrogramPlotter.SpectroStyle style)
PlotterextendCoordinateRanges).
In many cases, such as scatter-plot-like plotters, the range
is determined only by the coordinate data
(managed by DataSpec inputs)
so a null value may be returned.
This method is chiefly required by histogram-like plotters for which
the region on the plot surface is not the union of the input positions.
getRangeStyleKey in interface Plotter<SpectrogramPlotter.SpectroStyle>style - plot style to assesspublic boolean hasReports()
PlotterhasReports in interface Plotter<SpectrogramPlotter.SpectroStyle>Drawing.getReport(java.lang.Object)public PlotLayer createLayer(DataGeom geom, DataSpec dataSpec, SpectrogramPlotter.SpectroStyle style)
geom is ignored.createLayer in interface Plotter<SpectrogramPlotter.SpectroStyle>geom - indicates base position coordinates and their
mapping to points in the data spacedataSpec - specifies the data required for the plotstyle - data style as obtained from createStylepublic SpectrogramPlotter.ChannelGrid getChannelGrid(SpectrogramPlotter.SpectroStyle style, ColumnInfo specInfo, StarTable table)
Currently, anything that looks like an array with shape
(n) is interpreted as central channel positions,
and an array with shape (2,n) is interpreted as
channel low/high bounds.
It's a bit ad hoc.
style - stylespecInfo - column metadata for spectral columntable - table from which spectral column is takenCopyright © 2025 Central Laboratory of the Research Councils. All Rights Reserved.