Object

com.spark3d.spatial3DRDD

Loader

Related Doc: package spatial3DRDD

Permalink

object Loader

Put here routine to load data for a specific data format Currently available: CSV, JSON, TXT, FITS

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Loader
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. def Point3DRDDFromFITS(spark: SparkSession, filename: String, hdu: Int, colnames: String, isSpherical: Boolean): RDD[Point3D]

    Permalink

    Construct a RDD[Point3D] from FITS data.

    Construct a RDD[Point3D] from FITS data.

    val fn = "src/test/resources/astro_obs.fits"
    val rdd = new Point3DRDDFromFITS(spark, fn, 1, "Z_COSMO,RA,Dec", true)
    spark

    : (SparkSession) The spark session

    filename

    : (String) File name where the data is stored

    hdu

    : (Int) HDU to load.

    colnames

    : (String) Comma-separated names of (x, y, z) columns. Example: "Z_COSMO,RA,Dec".

    isSpherical

    : (Boolean) If true, it assumes that the coordinates of the Point3D are (r, theta, phi). Otherwise, it assumes cartesian coordinates (x, y, z). Default is false.

    returns

    (RDD[Point3D])

  5. def Point3DRDDFromText(spark: SparkSession, filename: String, colnames: String, isSpherical: Boolean): RDD[Point3D]

    Permalink

    Construct a RDD[Point3D] from CSV, JSON or TXT data.

    Construct a RDD[Point3D] from CSV, JSON or TXT data.

    // CSV
    val fn = "src/test/resources/astro_obs.csv"
    val rdd = new Point3DRDD(spark, fn, "Z_COSMO,RA,Dec", true)
    // JSON
    val fn = "src/test/resources/astro_obs.json"
    val rdd = new Point3DRDD(spark, fn, "Z_COSMO,RA,Dec", true)
    // TXT
    val fn = "src/test/resources/astro_obs.txt"
    val rdd = new Point3DRDD(spark, fn, "Z_COSMO,RA,Dec", true)
    spark

    : (SparkSession) The spark session

    filename

    : (String) File name where the data is stored. Extension must be explicitly written (.cvs, .json, or .txt)

    colnames

    : (String) Comma-separated names of (x, y, z) columns. Example: "Z_COSMO,RA,Dec".

    isSpherical

    : (Boolean) If true, it assumes that the coordinates of the Point3D are (r, theta, phi). Otherwise, it assumes cartesian coordinates (x, y, z).

    returns

    (RDD[Point3D])

  6. def SphereRDDFromFITS(spark: SparkSession, filename: String, hdu: Int, colnames: String, isSpherical: Boolean = false): RDD[ShellEnvelope]

    Permalink

    Construct a RDD[ShellEnvelope] from FITS data.

    Construct a RDD[ShellEnvelope] from FITS data.

    val fn = "src/test/resources/cartesian_spheres.fits"
    val sphereRDD = new SphereRDD(spark, fn, 1, "x,y,z,radius", false)
    spark

    : (SparkSession) The spark session

    filename

    : (String) File name where the data is stored

    hdu

    : (Int) HDU to load.

    colnames

    : (String) Comma-separated names of (x, y, z, r) columns to read. Example: "Z_COSMO,RA,Dec,Radius".

    isSpherical

    : (Boolean) If true, it assumes that the coordinates of the center of the ShellEnvelope are (r, theta, phi). Otherwise, it assumes cartesian coordinates (x, y, z). Default is false.

    returns

    (RDD[ShellEnvelope)

  7. def SphereRDDFromText(spark: SparkSession, filename: String, colnames: String, isSpherical: Boolean = false): RDD[ShellEnvelope]

    Permalink

    Construct a RDD[ShellEnvelope] from CSV, JSON or TXT data.

    Construct a RDD[ShellEnvelope] from CSV, JSON or TXT data.

    // CSV
    val fn = "src/test/resources/cartesian_spheres.csv"
    val rdd = new SphereRDD(spark, fn, "x,y,z,radius", false)
    // JSON
    val fn = "src/test/resources/cartesian_spheres.json"
    val rdd = new SphereRDD(spark, fn, "x,y,z,radius", false)
    // TXT
    val fn = "src/test/resources/cartesian_spheres.txt"
    val rdd = new SphereRDD(spark, fn, "x,y,z,radius", false)
    spark

    : (SparkSession) The spark session

    filename

    : (String) File name where the data is stored. Extension must be explicitly written (.cvs, .json, or .txt)

    colnames

    : (String) Comma-separated names of (x, y, z, r) columns to read. Example: "Z_COSMO,RA,Dec,Radius".

    isSpherical

    : (Boolean) If true, it assumes that the coordinates of the center of the ShellEnvelope are (r, theta, phi). Otherwise, it assumes cartesian coordinates (x, y, z). Default is false.

    returns

    (RDD[ShellEnvelope])

  8. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  9. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  10. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  11. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  12. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  13. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  14. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  15. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  16. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  17. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  18. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  19. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  20. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  21. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  22. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  23. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped