Package uk.ac.starlink.topcat.activate
Class Hips2fitsConfigurator
- java.lang.Object
-
- uk.ac.starlink.topcat.activate.AbstractActivatorConfigurator
-
- uk.ac.starlink.topcat.activate.SkyPosConfigurator
-
- uk.ac.starlink.topcat.activate.Hips2fitsConfigurator
-
- All Implemented Interfaces:
ActivatorConfigurator
public abstract class Hips2fitsConfigurator extends SkyPosConfigurator
Partial ActivatorConfigurator implementation for activators that will use the CDS Hips2fits service. This class manages the UI components required to select a HiPS survey and make cutout queries on it.- Since:
- 22 Oct 2019
- Author:
- Mark Taylor
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class uk.ac.starlink.topcat.activate.SkyPosConfigurator
SkyPosConfigurator.SkyPosActivator
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
Hips2fitsConfigurator(TopcatModelInfo tinfo, java.util.function.Predicate<HipsSurvey> filter)
Constructor.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description Activator
createActivator(uk.ac.starlink.table.ColumnData raData, uk.ac.starlink.table.ColumnData decData)
Constructs an Activator based on selected RA and Dec column values.Safety
getSafety()
Indicates whether an activator created by the current state of this configurator is known to be harmless.java.lang.String
getSkyConfigMessage()
Returns a config message given that non-blank sky position columns have been supplied.ConfigState
getState()
Returns an object that contains the current state of this configurator.void
setState(ConfigState state)
Restores the state of this object from a given state object.protected abstract Outcome
useHips(java.lang.String hipsId, double raDeg, double decDeg, double fovDeg, int npix)
Invoked on activation with the configured HiPS details.-
Methods inherited from class uk.ac.starlink.topcat.activate.SkyPosConfigurator
getActivator, getConfigMessage, getSkyPosState, getStack, setSkyPosState
-
Methods inherited from class uk.ac.starlink.topcat.activate.AbstractActivatorConfigurator
addActionListener, createDisplayField, createDisplayLabel, getActionForwarder, getPanel, removeActionListener
-
-
-
-
Constructor Detail
-
Hips2fitsConfigurator
protected Hips2fitsConfigurator(TopcatModelInfo tinfo, java.util.function.Predicate<HipsSurvey> filter)
Constructor.- Parameters:
tinfo
- topcat model informationfilter
- indicates which Hips image surveys are suitable
-
-
Method Detail
-
useHips
protected abstract Outcome useHips(java.lang.String hipsId, double raDeg, double decDeg, double fovDeg, int npix)
Invoked on activation with the configured HiPS details.- Parameters:
hipsId
- hips survey ID or match stringraDeg
- RA position in degreesdecDeg
- Dec position in degreesfovDeg
- field of view in degreesnpix
- linear dimension of cutout in pixels- Returns:
- outcome
-
getSafety
public Safety getSafety()
Description copied from interface:ActivatorConfigurator
Indicates whether an activator created by the current state of this configurator is known to be harmless.Implementations should be cautious; if some slightly adjusted state might be dangerous, false could be returned as well (that's why this method is on ActivatorConfigurator and not Activator itself).
- Returns:
- safety status of the currently configured state
-
getState
public ConfigState getState()
Description copied from interface:ActivatorConfigurator
Returns an object that contains the current state of this configurator. This includes options selected by the user, but does not include any description of the table on which this configurator is working.- Returns:
- configuration state
-
setState
public void setState(ConfigState state)
Description copied from interface:ActivatorConfigurator
Restores the state of this object from a given state object.- Parameters:
state
- stored state
-
createActivator
public Activator createActivator(uk.ac.starlink.table.ColumnData raData, uk.ac.starlink.table.ColumnData decData)
Description copied from class:SkyPosConfigurator
Constructs an Activator based on selected RA and Dec column values.- Specified by:
createActivator
in classSkyPosConfigurator
- Parameters:
raData
- right ascension in radiansdecData
- declination in radians- Returns:
- new activator
-
getSkyConfigMessage
public java.lang.String getSkyConfigMessage()
Description copied from class:SkyPosConfigurator
Returns a config message given that non-blank sky position columns have been supplied.- Specified by:
getSkyConfigMessage
in classSkyPosConfigurator
- Returns:
- reason why activator is not supplied, or null
-
-