Package gaiasky.data.group
Class STILDataProvider
java.lang.Object
gaiasky.data.group.AbstractStarGroupDataProvider
gaiasky.data.group.STILDataProvider
- All Implemented Interfaces:
IParticleGroupDataProvider
,IStarGroupDataProvider
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, fileNumberCap, indexMap, list, magCorrections, mustLoadIds, NEGATIVE_DIST, parallaxErrorFactorBright, parallaxErrorFactorFaint, parallaxZeroPoint, parallelism, ruwe, sphericalPositions, starNumberCap
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncom.badlogic.gdx.utils.LongMap<float[]>
loadData(InputStream is, double factor)
Loads the data applying a factor.Loads the data applying a factor.loadData(uk.ac.starlink.util.DataSource ds, double factor)
loadData(uk.ac.starlink.util.DataSource ds, double factor, Runnable preCallback, RunnableLongLong updateCallback, Runnable postCallback)
loadDataMapped(String file, double factor)
Loads the data applying a factor using a memory mapped file for improved speed.void
setDatasetOptions(DatasetOptions datasetOptions)
void
setFileNumberCap(int cap)
Sets a cap on the number of files to load.void
setMagCorrections(boolean magCorrections)
Sets the flag to apply magnitude and color corrections for extinction and reddeningvoid
setParallaxErrorFactorBright(double parallaxErrorFactor)
The loader will only load stars for which the parallax error is at most the percentage given here, in [0..1].void
setParallaxErrorFactorFaint(double parallaxErrorFactor)
The loader will only load stars for which the parallax error is at most the percentage given here, in [0..1].void
setParallaxZeroPoint(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, colIdFromStr, countLines, countLines, dumpToDisk, dumpToDiskBin, dumpToDiskCsv, getAdditionalValue, getCountsPerMag, getGeoDistance, getRuweValue, hasAdditional, hasAdditionalColumn, hasCol, idx, initLists, initLists, initLists, loadData, mustLoad, setAdaptiveParallax, setAdditionalFiles, setColumns, setDistanceCap, setMustLoadIds, setOutputFormatVersion, setRUWECap, setStarNumberCap
-
Constructor Details
-
STILDataProvider
public STILDataProvider()
-
-
Method Details
-
setDatasetOptions
-
loadData
Description copied from interface:IStarGroupDataProvider
Loads the data applying a factor.- Parameters:
file
- The file to loadfactor
- Factor to apply to the positions- Returns:
- Array of particle beans
-
loadData
-
loadData
public List<IParticleRecord> loadData(uk.ac.starlink.util.DataSource ds, double factor, Runnable preCallback, RunnableLongLong updateCallback, Runnable postCallback)- Parameters:
ds
- The data source.factor
- Length factor.preCallback
- A function that runs before.updateCallback
- A function that runs after each object has loaded. Gets two longs, the first holds the current number of loaded objects and the second holds the total number of objects to load.postCallback
- A function that runs after the data has been loaded.- Returns:
- The list of particle records.
-
loadData
Description copied from interface:IStarGroupDataProvider
Loads the data applying a factor.- Parameters:
is
- Input stream to load the data fromfactor
- Factor to apply to the positions- Returns:
- Array of particle beans
-
loadDataMapped
Description copied from interface:IStarGroupDataProvider
Loads the data applying a factor using a memory mapped file for improved speed.- Parameters:
file
- The file to loadfactor
- Factor to apply to the positions- Returns:
- Array of particle beans
-
setFileNumberCap
public void setFileNumberCap(int cap)Description copied from interface:IParticleGroupDataProvider
Sets a cap on the number of files to load. Set to negative for unlimited- Specified by:
setFileNumberCap
in interfaceIParticleGroupDataProvider
- Overrides:
setFileNumberCap
in classAbstractStarGroupDataProvider
- Parameters:
cap
- The file cap number
-
getColors
public com.badlogic.gdx.utils.LongMap<float[]> getColors()- Specified by:
getColors
in interfaceIStarGroupDataProvider
- Overrides:
getColors
in classAbstractStarGroupDataProvider
-
setParallaxErrorFactorFaint
public void setParallaxErrorFactorFaint(double parallaxErrorFactor)Description copied from interface:IStarGroupDataProvider
The 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:
setParallaxErrorFactorFaint
in interfaceIStarGroupDataProvider
- Overrides:
setParallaxErrorFactorFaint
in classAbstractStarGroupDataProvider
- Parameters:
parallaxErrorFactor
- The percentage value of parallax errors with respect to parallax
-
setParallaxErrorFactorBright
public void setParallaxErrorFactorBright(double parallaxErrorFactor)Description copied from interface:IStarGroupDataProvider
The 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:
setParallaxErrorFactorBright
in interfaceIStarGroupDataProvider
- Overrides:
setParallaxErrorFactorBright
in classAbstractStarGroupDataProvider
- Parameters:
parallaxErrorFactor
- The percentage value of parallax errors with respect to parallax
-
setParallaxZeroPoint
public void setParallaxZeroPoint(double parallaxZeroPoint)Description copied from interface:IStarGroupDataProvider
Sets the zero point of the parallax as an addition to the parallax values, in [mas]- Specified by:
setParallaxZeroPoint
in interfaceIStarGroupDataProvider
- Overrides:
setParallaxZeroPoint
in classAbstractStarGroupDataProvider
- Parameters:
parallaxZeroPoint
- The parallax zero point
-
setMagCorrections
public void setMagCorrections(boolean magCorrections)Description copied from interface:IStarGroupDataProvider
Sets the flag to apply magnitude and color corrections for extinction and reddening- Specified by:
setMagCorrections
in interfaceIStarGroupDataProvider
- Overrides:
setMagCorrections
in classAbstractStarGroupDataProvider
- Parameters:
magCorrections
- Whether to apply the corrections
-