Package gaiasky.data.group
Class STILDataProvider
- java.lang.Object
-
- gaiasky.data.group.AbstractStarGroupDataProvider
-
- gaiasky.data.group.STILDataProvider
-
- All Implemented Interfaces:
IParticleGroupDataProvider,IStarGroupDataProvider
public class STILDataProvider extends AbstractStarGroupDataProvider
Loads VOTables, FITS, etc. This data provider makes educated guesses using UCDs and column names to match columns to attributes.More information on this can be found here.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class gaiasky.data.group.AbstractStarGroupDataProvider
AbstractStarGroupDataProvider.AdditionalCols, AbstractStarGroupDataProvider.ColId
-
-
Field Summary
-
Fields inherited from class gaiasky.data.group.AbstractStarGroupDataProvider
adaptiveParallax, additional, additionalFiles, colors, countsPerMag, distCap, indexMap, list, magCorrections, mustLoadIds, NEGATIVE_DIST, parallaxErrorFactorBright, parallaxErrorFactorFaint, parallaxZeroPoint, ruwe, sphericalPositions
-
-
Constructor Summary
Constructors Constructor Description STILDataProvider()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.badlogic.gdx.utils.LongMap<float[]>getColors()java.util.List<ParticleGroup.ParticleBean>loadData(java.io.InputStream is, double factor, boolean compat)Loads the data applying a factor.java.util.List<ParticleGroup.ParticleBean>loadData(java.lang.String file, double factor, boolean compat)Loads the data applying a factor.java.util.List<? extends ParticleGroup.ParticleBean>loadData(uk.ac.starlink.util.DataSource ds, double factor)java.util.List<? extends ParticleGroup.ParticleBean>loadData(uk.ac.starlink.util.DataSource ds, double factor, boolean compat)java.util.List<ParticleGroup.ParticleBean>loadDataMapped(java.lang.String file, double factor, boolean compat)Loads the data applying a factor using a memory mapped file for improved speed.voidsetDatasetOptions(DatasetOptions dops)voidsetFileNumberCap(int cap)Sets a cap on the number of files to load.voidsetMagCorrections(boolean magCorrections)Sets the flag to apply magnitude and color corrections for extinction and reddeningvoidsetParallaxErrorFactorBright(double parallaxErrorFactor)The loader will only load stars for which the parallax error is at most the percentage given here, in [0..1].voidsetParallaxErrorFactorFaint(double parallaxErrorFactor)The loader will only load stars for which the parallax error is at most the percentage given here, in [0..1].voidsetParallaxZeroPoint(double parallaxZeroPoint)Sets the zero point of the parallax as an addition to the parallax values, in [mas]-
Methods inherited from class gaiasky.data.group.AbstractStarGroupDataProvider
acceptDistance, acceptParallax, countLines, countLines, dumpToDisk, dumpToDiskBin, dumpToDiskCsv, getAdditionalValue, getCountsPerMag, getGeoDistance, getRuweValue, hasAdditional, hasAdditionalColumn, hasCol, idx, initLists, initLists, initLists, loadData, loadData, loadData, loadDataMapped, mustLoad, setAdaptiveParallax, setAdditionalFiles, setColumns, setDistanceCap, setMustLoadIds, setRUWECap
-
-
-
-
Method Detail
-
setDatasetOptions
public void setDatasetOptions(DatasetOptions dops)
-
loadData
public java.util.List<ParticleGroup.ParticleBean> loadData(java.lang.String file, double factor, boolean compat)
Description copied from interface:IStarGroupDataProviderLoads the data applying a factor.- Parameters:
file- The file to loadfactor- Factor to apply to the positionscompat- Use compatibility mode (DR1/DR2)- Returns:
- Array of particle beans
-
loadData
public java.util.List<? extends ParticleGroup.ParticleBean> loadData(uk.ac.starlink.util.DataSource ds, double factor)
-
loadData
public java.util.List<? extends ParticleGroup.ParticleBean> loadData(uk.ac.starlink.util.DataSource ds, double factor, boolean compat)
-
loadData
public java.util.List<ParticleGroup.ParticleBean> loadData(java.io.InputStream is, double factor, boolean compat)
Description copied from interface:IStarGroupDataProviderLoads the data applying a factor.- Parameters:
is- Input stream to load the data fromfactor- Factor to apply to the positionscompat- Use compatibility mode (DR1/DR2)- Returns:
- Array of particle beans
-
loadDataMapped
public java.util.List<ParticleGroup.ParticleBean> loadDataMapped(java.lang.String file, double factor, boolean compat)
Description copied from interface:IStarGroupDataProviderLoads the data applying a factor using a memory mapped file for improved speed.- Parameters:
file- The file to loadfactor- Factor to apply to the positionscompat- Use compatibility mode (DR1/DR2)- Returns:
- Array of particle beans
-
setFileNumberCap
public void setFileNumberCap(int cap)
Description copied from interface:IParticleGroupDataProviderSets a cap on the number of files to load. Set to 0 or negative for unlimited- Specified by:
setFileNumberCapin interfaceIParticleGroupDataProvider- Overrides:
setFileNumberCapin classAbstractStarGroupDataProvider- Parameters:
cap- The cap number
-
getColors
public com.badlogic.gdx.utils.LongMap<float[]> getColors()
- Specified by:
getColorsin interfaceIStarGroupDataProvider- Overrides:
getColorsin classAbstractStarGroupDataProvider
-
setParallaxErrorFactorFaint
public void setParallaxErrorFactorFaint(double parallaxErrorFactor)
Description copied from interface:IStarGroupDataProviderThe loader will only load stars for which the parallax error is at most the percentage given here, in [0..1]. This applies to faint stars (gmag >= 13.1) More specifically, the following must be met:
pllx_err < pllx * pllxErrFactor- Specified by:
setParallaxErrorFactorFaintin interfaceIStarGroupDataProvider- Overrides:
setParallaxErrorFactorFaintin classAbstractStarGroupDataProvider- Parameters:
parallaxErrorFactor- The percentage value of parallax errors with respect to parallax
-
setParallaxErrorFactorBright
public void setParallaxErrorFactorBright(double parallaxErrorFactor)
Description copied from interface:IStarGroupDataProviderThe loader will only load stars for which the parallax error is at most the percentage given here, in [0..1]. This applies to bright stars (gmag < 13.1) More specifically, the following must be met:
pllx_err < pllx * pllxErrFactor- Specified by:
setParallaxErrorFactorBrightin interfaceIStarGroupDataProvider- Overrides:
setParallaxErrorFactorBrightin classAbstractStarGroupDataProvider- Parameters:
parallaxErrorFactor- The percentage value of parallax errors with respect to parallax
-
setParallaxZeroPoint
public void setParallaxZeroPoint(double parallaxZeroPoint)
Description copied from interface:IStarGroupDataProviderSets the zero point of the parallax as an addition to the parallax values, in [mas]- Specified by:
setParallaxZeroPointin interfaceIStarGroupDataProvider- Overrides:
setParallaxZeroPointin classAbstractStarGroupDataProvider- Parameters:
parallaxZeroPoint- The parallax zero point
-
setMagCorrections
public void setMagCorrections(boolean magCorrections)
Description copied from interface:IStarGroupDataProviderSets the flag to apply magnitude and color corrections for extinction and reddening- Specified by:
setMagCorrectionsin interfaceIStarGroupDataProvider- Overrides:
setMagCorrectionsin classAbstractStarGroupDataProvider- Parameters:
magCorrections- Whether to apply the corrections
-
-