Package gaiasky.data.group
Class SDSSDataProvider
java.lang.Object
gaiasky.data.group.SDSSDataProvider
- All Implemented Interfaces:
IParticleGroupDataProvider
public class SDSSDataProvider extends java.lang.Object implements IParticleGroupDataProvider
Loads SDSS data from a text file with a series of [ra, dec, z]
-
Constructor Summary
Constructors Constructor Description SDSSDataProvider()
-
Method Summary
Modifier and Type Method Description java.util.List<IParticleRecord>
loadData(java.io.InputStream is, double factor)
Loads the data applying a factor.java.util.List<IParticleRecord>
loadData(java.lang.String file)
Loads the data as it is.java.util.List<IParticleRecord>
loadData(java.lang.String file, double factor)
Loads the data applying a factor.java.util.List<IParticleRecord>
loadDataMapped(java.lang.String file, double factor)
Loads the data applying a factor using a memory mapped file for improved speed.void
setFileNumberCap(int cap)
Sets a cap on the number of files to load.void
setStarNumberCap(int cap)
Sets the maximum number of stars to be processed per file.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
SDSSDataProvider
public SDSSDataProvider()
-
-
Method Details
-
loadData
Description copied from interface:IParticleGroupDataProvider
Loads the data as it is.- Specified by:
loadData
in interfaceIParticleGroupDataProvider
- Parameters:
file
- The file to load- Returns:
- Array of particle beans
-
loadData
Description copied from interface:IParticleGroupDataProvider
Loads the data applying a factor.- Specified by:
loadData
in interfaceIParticleGroupDataProvider
- Parameters:
file
- The file to loadfactor
- Factor to apply to the positions- Returns:
- Array of particle beans
-
loadData
Description copied from interface:IParticleGroupDataProvider
Loads the data applying a factor.- Specified by:
loadData
in interfaceIParticleGroupDataProvider
- Parameters:
is
- Input stream to load the data fromfactor
- 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
- Parameters:
cap
- The file cap number
-
setStarNumberCap
public void setStarNumberCap(int cap)Description copied from interface:IParticleGroupDataProvider
Sets the maximum number of stars to be processed per file. Set to negative for unlimited- Specified by:
setStarNumberCap
in interfaceIParticleGroupDataProvider
- Parameters:
cap
- The star cap number
-
loadDataMapped
Description copied from interface:IParticleGroupDataProvider
Loads the data applying a factor using a memory mapped file for improved speed.- Specified by:
loadDataMapped
in interfaceIParticleGroupDataProvider
- Parameters:
file
- The file to loadfactor
- Factor to apply to the positions- Returns:
- Array of particle beans
-