Record Class ParticleVector

java.lang.Object
java.lang.Record
gaiasky.scene.record.ParticleVector
All Implemented Interfaces:
IParticleRecord

public record ParticleVector(double[] data) extends Record implements IParticleRecord
  • Constructor Details

    • ParticleVector

      public ParticleVector(double[] data)
      Creates an instance of a ParticleVector record class.
      Parameters:
      data - the value for the data record component
  • Method Details

    • x

      public double x()
      Specified by:
      x in interface IParticleRecord
    • y

      public double y()
      Specified by:
      y in interface IParticleRecord
    • z

      public double z()
      Specified by:
      z in interface IParticleRecord
    • names

      public String[] names()
      Specified by:
      names in interface IParticleRecord
    • namesConcat

      public String namesConcat()
      Specified by:
      namesConcat in interface IParticleRecord
    • hasName

      public boolean hasName(String candidate)
      Specified by:
      hasName in interface IParticleRecord
    • hasName

      public boolean hasName(String candidate, boolean matchCase)
      Specified by:
      hasName in interface IParticleRecord
    • vx

      public float vx()
      Specified by:
      vx in interface IParticleRecord
    • vy

      public float vy()
      Specified by:
      vy in interface IParticleRecord
    • vz

      public float vz()
      Specified by:
      vz in interface IParticleRecord
    • appMag

      public float appMag()
      Specified by:
      appMag in interface IParticleRecord
    • absMag

      public float absMag()
      Specified by:
      absMag in interface IParticleRecord
    • hasColor

      public boolean hasColor()
      Specified by:
      hasColor in interface IParticleRecord
    • color

      public float color()
      Specified by:
      color in interface IParticleRecord
    • size

      public float size()
      Specified by:
      size in interface IParticleRecord
    • radius

      public double radius()
      Specified by:
      radius in interface IParticleRecord
    • id

      public long id()
      Specified by:
      id in interface IParticleRecord
    • hip

      public int hip()
      Specified by:
      hip in interface IParticleRecord
    • muAlpha

      public float muAlpha()
      Specified by:
      muAlpha in interface IParticleRecord
    • muDelta

      public float muDelta()
      Specified by:
      muDelta in interface IParticleRecord
    • radVel

      public float radVel()
      Specified by:
      radVel in interface IParticleRecord
    • rgb

      public double[] rgb()
      Specified by:
      rgb in interface IParticleRecord
    • hasSize

      public boolean hasSize()
      Specified by:
      hasSize in interface IParticleRecord
    • pos

      public Vector3D pos(Vector3D aux)
      Specified by:
      pos in interface IParticleRecord
    • hasProperMotion

      public boolean hasProperMotion()
      Specified by:
      hasProperMotion in interface IParticleRecord
    • distance

      public double distance()
      Description copied from interface: IParticleRecord
      Distance in internal units. Beware, does the computation on the fly.
      Specified by:
      distance in interface IParticleRecord
      Returns:
      The distance, in internal units.
    • parallax

      public double parallax()
      Description copied from interface: IParticleRecord
      Parallax in mas.
      Specified by:
      parallax in interface IParticleRecord
      Returns:
      The parallax in mas.
    • ra

      public double ra()
      Description copied from interface: IParticleRecord
      Right ascension in degrees. Beware, does the conversion on the fly.
      Specified by:
      ra in interface IParticleRecord
      Returns:
      The right ascension, in degrees.
    • dec

      public double dec()
      Description copied from interface: IParticleRecord
      Declination in degrees. Beware, does the conversion on the fly.
      Specified by:
      dec in interface IParticleRecord
      Returns:
      The declination, in degrees.
    • lambda

      public double lambda()
      Description copied from interface: IParticleRecord
      Ecliptic longitude in degrees.
      Specified by:
      lambda in interface IParticleRecord
      Returns:
      The ecliptic longitude, in degrees.
    • beta

      public double beta()
      Description copied from interface: IParticleRecord
      Ecliptic latitude in degrees.
      Specified by:
      beta in interface IParticleRecord
      Returns:
      The ecliptic latitude, in degrees.
    • l

      public double l()
      Description copied from interface: IParticleRecord
      Galactic longitude in degrees.
      Specified by:
      l in interface IParticleRecord
      Returns:
      The galactic longitude, in degrees.
    • b

      public double b()
      Description copied from interface: IParticleRecord
      Galactic latitude in degrees.
      Specified by:
      b in interface IParticleRecord
      Returns:
      The galactic latitude, in degrees.
    • tEff

      public float tEff()
      Description copied from interface: IParticleRecord
      Returns the effective temperature, in K.
      Specified by:
      tEff in interface IParticleRecord
      Returns:
      The effective temperature in K.
    • setExtraAttributes

      public void setExtraAttributes(com.badlogic.gdx.utils.ObjectMap<UCD,Object> extra)
      Specified by:
      setExtraAttributes in interface IParticleRecord
    • hasExtra

      public boolean hasExtra()
      Specified by:
      hasExtra in interface IParticleRecord
    • extraKeys

      public com.badlogic.gdx.utils.ObjectMap.Keys<UCD> extraKeys()
      Specified by:
      extraKeys in interface IParticleRecord
    • getType

      public ParticleType getType()
      Description copied from interface: IParticleRecord
      Returns the particle record type.
      Specified by:
      getType in interface IParticleRecord
      Returns:
      The type.
    • isVariable

      public boolean isVariable()
      Description copied from interface: IParticleRecord
      Returns whether this particle record has a Variable attached, making it a variable star.
      Specified by:
      isVariable in interface IParticleRecord
      Returns:
      True if this record is a variable star.
    • nVari

      public int nVari()
      Specified by:
      nVari in interface IParticleRecord
      Returns:
      The number of variable star samples
    • period

      public double period()
      Specified by:
      period in interface IParticleRecord
      Returns:
      The variability period in days.
    • variMags

      public float[] variMags()
      Specified by:
      variMags in interface IParticleRecord
      Returns:
      The vector with the variable star magnitudes.
    • variTimes

      public double[] variTimes()
      Specified by:
      variTimes in interface IParticleRecord
      Returns:
      The vector with the variable star times corresponding to the magnitudes.
    • hasExtra

      public boolean hasExtra(String name)
      Specified by:
      hasExtra in interface IParticleRecord
    • hasExtra

      public boolean hasExtra(UCD ucd)
      Specified by:
      hasExtra in interface IParticleRecord
    • getExtra

      public com.badlogic.gdx.utils.ObjectMap<UCD,Object> getExtra()
      Description copied from interface: IParticleRecord
      Gets the extra attributes map.
      Specified by:
      getExtra in interface IParticleRecord
      Returns:
      The map.
    • getExtra

      public Object getExtra(String name)
      Description copied from interface: IParticleRecord
      Gets the extra data filed with the given name.
      Specified by:
      getExtra in interface IParticleRecord
      Parameters:
      name - The name of the data filed to get.
      Returns:
      The data field, or null if it does not exist.
    • getExtra

      public Object getExtra(UCD ucd)
      Description copied from interface: IParticleRecord
      Gets the extra data filed with the given UCD.
      Specified by:
      getExtra in interface IParticleRecord
      Parameters:
      ucd - The UCD of the data filed to get.
      Returns:
      The data field, or null if it does not exist.
    • getExtraNumber

      public double getExtraNumber(String name)
      Description copied from interface: IParticleRecord
      Gets the extra data filed with the given name, as a double number.
      Specified by:
      getExtraNumber in interface IParticleRecord
      Parameters:
      name - The name of the data filed to get.
      Returns:
      The data field as a double, or NaN if it does not exist or is not a number.
    • getExtraNumber

      public double getExtraNumber(UCD ucd)
      Description copied from interface: IParticleRecord
      Gets the extra data filed with the given UCD, as a double number.
      Specified by:
      getExtraNumber in interface IParticleRecord
      Parameters:
      ucd - The UCD of the data filed to get.
      Returns:
      The data field as a double, or NaN if it does not exist or is not a number.
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • data

      public double[] data()
      Returns the value of the data record component.
      Returns:
      the value of the data record component