Class CsvCatalogDataProvider

    • Constructor Detail

      • CsvCatalogDataProvider

        public CsvCatalogDataProvider()
    • Method Detail

      • setDR2Columns

        public void setDR2Columns()
        Default columns for DR2
      • setColumns

        public void setColumns​(java.lang.String... cols)
        Set the CSV columns to work out the indices, as a comma-separated string
        Parameters:
        cols - The columns
      • loadData

        public java.util.List<ParticleGroup.ParticleBean> loadData​(java.lang.String file,
                                                                   double factor,
                                                                   boolean compat)
        Description copied from interface: IStarGroupDataProvider
        Loads the data applying a factor.
        Parameters:
        file - The file to load
        factor - Factor to apply to the positions
        compat - Use compatibility mode (DR1/DR2)
        Returns:
        Array of particle beans
      • loadData

        public java.util.List<ParticleGroup.ParticleBean> loadData​(java.io.InputStream is,
                                                                   double factor,
                                                                   boolean compat)
        Description copied from interface: IStarGroupDataProvider
        Loads the data applying a factor.
        Parameters:
        is - Input stream to load the data from
        factor - Factor to apply to the positions
        compat - Use compatibility mode (DR1/DR2)
        Returns:
        Array of particle beans
      • loadFileIs

        public void loadFileIs​(java.io.InputStream is,
                               double factor,
                               java.util.concurrent.atomic.AtomicLong addedStars,
                               java.util.concurrent.atomic.AtomicLong discardedStars)
      • loadDataMapped

        public java.util.List<ParticleGroup.ParticleBean> loadDataMapped​(java.lang.String file,
                                                                         double factor,
                                                                         boolean compat)
        Description copied from interface: IStarGroupDataProvider
        Loads the data applying a factor using a memory mapped file for improved speed.
        Parameters:
        file - The file to load
        factor - Factor to apply to the positions
        compat - Use compatibility mode (DR1/DR2)
        Returns:
        Array of particle beans
      • loadDataMapped

        public java.util.List<ParticleGroup.ParticleBean> loadDataMapped​(java.lang.String file,
                                                                         double factor,
                                                                         int fileNumber,
                                                                         long totalFiles)
        Uses memory mapped files to load catalog files.
        Parameters:
        file - The file to load
        factor - Position factor
        fileNumber - File number
        totalFiles - Total number of files
        Returns:
      • setParallel

        public void setParallel​(boolean parallel)
      • setParallelBufferSize

        public void setParallelBufferSize​(int size)