Package gaiasky.data.group
Class DR2DataProvider
- java.lang.Object
-
- gaiasky.data.group.AbstractStarGroupDataProvider
-
- gaiasky.data.group.DR2DataProvider
-
- All Implemented Interfaces:
IParticleGroupDataProvider
,IStarGroupDataProvider
public class DR2DataProvider extends AbstractStarGroupDataProvider
Loads the DR2 catalog in CSV formatSource position and corresponding errors are in radians, parallax in mas and proper motion in mas/yr.
-
-
Field Summary
-
Fields inherited from class gaiasky.data.group.AbstractStarGroupDataProvider
adaptiveParallax, colors, countsPerMag, distCap, geoDistances, geoDistErrors, geoDistFile, list, magCorrections, mustLoadIds, NEGATIVE_DIST, parallaxErrorFactorBright, parallaxErrorFactorFaint, parallaxZeroPoint, ruwe, ruweFile, ruweValues, sphericalPositions
-
-
Constructor Summary
Constructors Constructor Description DR2DataProvider()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.badlogic.gdx.utils.Array<StarGroup.StarBean>
loadData(java.io.InputStream is, double factor)
Loads the data applying a factor.com.badlogic.gdx.utils.Array<StarGroup.StarBean>
loadData(java.lang.String file)
Loads the data as it is.com.badlogic.gdx.utils.Array<StarGroup.StarBean>
loadData(java.lang.String file, double factor)
Loads the data applying a factor.com.badlogic.gdx.utils.Array<? extends ParticleGroup.ParticleBean>
loadDataMapped(java.lang.String file, double factor)
Loads the data applying a factor using a memory mapped file for improved speed.com.badlogic.gdx.utils.Array<? extends ParticleGroup.ParticleBean>
loadDataMapped(java.lang.String file, double factor, int fileNumber, long totalFiles)
Uses memory mapped files to load catalog files.void
loadFileIs(java.io.InputStream is, double factor, gaiasky.data.group.DR2DataProvider.LongWrap addedStars, gaiasky.data.group.DR2DataProvider.LongWrap discardedStars)
void
setFileNumberCap(int cap)
Sets a cap on the number of files to load.-
Methods inherited from class gaiasky.data.group.AbstractStarGroupDataProvider
acceptDistance, acceptParallax, countLines, countLines, dumpToDisk, dumpToDiskBin, dumpToDiskCsv, getColors, getCountsPerMag, getGeoDistance, getRuweValue, hasGeoDistance, hasGeoDistances, initLists, initLists, initLists, mustLoad, setAdaptiveParallax, setDistanceCap, setGeoDistancesFile, setMagCorrections, setMustLoadIds, setParallaxErrorFactorBright, setParallaxErrorFactorFaint, setParallaxZeroPoint, setRUWECap, setRUWEFile
-
-
-
-
Method Detail
-
setFileNumberCap
public void setFileNumberCap(int cap)
Description copied from interface:IParticleGroupDataProvider
Sets a cap on the number of files to load. Set to 0 or negative for unlimited- Specified by:
setFileNumberCap
in interfaceIParticleGroupDataProvider
- Overrides:
setFileNumberCap
in classAbstractStarGroupDataProvider
- Parameters:
cap
- The cap number
-
loadData
public com.badlogic.gdx.utils.Array<StarGroup.StarBean> loadData(java.lang.String file)
Description copied from interface:IParticleGroupDataProvider
Loads the data as it is.- Parameters:
file
- The file to load- Returns:
- Array of particle beans
-
loadData
public com.badlogic.gdx.utils.Array<StarGroup.StarBean> loadData(java.lang.String file, double factor)
Description copied from interface:IParticleGroupDataProvider
Loads the data applying a factor.- Parameters:
file
- The file to loadfactor
- Factor to apply to the positions- Returns:
- Array of particle beans
-
loadData
public com.badlogic.gdx.utils.Array<StarGroup.StarBean> loadData(java.io.InputStream is, double factor)
Description copied from interface:IParticleGroupDataProvider
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
-
loadFileIs
public void loadFileIs(java.io.InputStream is, double factor, gaiasky.data.group.DR2DataProvider.LongWrap addedStars, gaiasky.data.group.DR2DataProvider.LongWrap discardedStars)
-
loadDataMapped
public com.badlogic.gdx.utils.Array<? extends ParticleGroup.ParticleBean> loadDataMapped(java.lang.String file, double factor)
Description copied from interface:IParticleGroupDataProvider
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
-
loadDataMapped
public com.badlogic.gdx.utils.Array<? extends ParticleGroup.ParticleBean> loadDataMapped(java.lang.String file, double factor, int fileNumber, long totalFiles)
Uses memory mapped files to load catalog files. This is not working right now- Parameters:
file
-factor
-fileNumber
-- Returns:
-
-