Record Class ParticleStar

java.lang.Object
java.lang.Record
gaiasky.scene.record.ParticleStar
Record Components:
id - The particle identifier.
names - The name array.
x - X component of position vector at epoch.
y - Y component of position vector at epoch.
z - Z component of position vector at epoch.
muAlpha16 - The proper motion in alpha*, in mas/y.
muDelta16 - The proper motion in delta, in mas/y.
radVel16 - The radial velocity, in km/s.
vx - X component of the velocity vector.
vy - Y component of the velocity vector.
vz - Z component of the velocity vector.
appMag16 - Apparent magnitude.
absMag16 - Absolute magnitude.
color - Packed color.
size - Size.
hip - HIP number.
tEff16 - Effective temperature.
extra - Map with extra attributes.
All Implemented Interfaces:
IParticleRecord

public record ParticleStar(long id, String[] names, double x, double y, double z, short muAlpha16, short muDelta16, short radVel16, float vx, float vy, float vz, short appMag16, short absMag16, float color, float size, int hip, short tEff16, com.badlogic.gdx.utils.ObjectMap<UCD,Object> extra) extends Record implements IParticleRecord
Record class to store star particles. Like ParticleExt, but with HIP number and tEff.
  • Constructor Details

    • ParticleStar

      public ParticleStar(long id, String[] names, double x, double y, double z, float muAlpha, float muDelta, float radVel, float vx, float vy, float vz, float appMag, float absMag, float color, float size, int hip, float tEff, com.badlogic.gdx.utils.ObjectMap<UCD,Object> extra)
    • ParticleStar

      public ParticleStar(long id, String[] names, double x, double y, double z, short muAlpha16, short muDelta16, short radVel16, float vx, float vy, float vz, short appMag16, short absMag16, float color, float size, int hip, short tEff16, com.badlogic.gdx.utils.ObjectMap<UCD,Object> extra)
      Creates an instance of a ParticleStar record class.
      Parameters:
      id - the value for the id record component
      names - the value for the names record component
      x - the value for the x record component
      y - the value for the y record component
      z - the value for the z record component
      muAlpha16 - the value for the muAlpha16 record component
      muDelta16 - the value for the muDelta16 record component
      radVel16 - the value for the radVel16 record component
      vx - the value for the vx record component
      vy - the value for the vy record component
      vz - the value for the vz record component
      appMag16 - the value for the appMag16 record component
      absMag16 - the value for the absMag16 record component
      color - the value for the color record component
      size - the value for the size record component
      hip - the value for the hip record component
      tEff16 - the value for the tEff16 record component
      extra - the value for the extra record component
  • Method Details

    • getType

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

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

      public String[] names()
      Returns the value of the names record component.
      Specified by:
      names in interface IParticleRecord
      Returns:
      the value of the names record component
    • 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
    • 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
    • rgb

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

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

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

      public long id()
      Returns the value of the id record component.
      Specified by:
      id in interface IParticleRecord
      Returns:
      the value of the id record component
    • 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
    • ra

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

      public double dec()
      Specified by:
      dec in interface IParticleRecord
      Returns:
      The declination, in degrees.
    • lambda

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

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

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

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

      public float tEff()
      Specified by:
      tEff in interface IParticleRecord
      Returns:
      The effective temperature in K.
    • setExtraAttributes

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

      public boolean hasExtra()
      Specified by:
      hasExtra in interface IParticleRecord
    • 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.
    • extraKeys

      public com.badlogic.gdx.utils.ObjectMap.Keys<UCD> extraKeys()
      Specified by:
      extraKeys in interface IParticleRecord
    • 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. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      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.
    • x

      public double x()
      Returns the value of the x record component.
      Specified by:
      x in interface IParticleRecord
      Returns:
      the value of the x record component
    • y

      public double y()
      Returns the value of the y record component.
      Specified by:
      y in interface IParticleRecord
      Returns:
      the value of the y record component
    • z

      public double z()
      Returns the value of the z record component.
      Specified by:
      z in interface IParticleRecord
      Returns:
      the value of the z record component
    • muAlpha16

      public short muAlpha16()
      Returns the value of the muAlpha16 record component.
      Returns:
      the value of the muAlpha16 record component
    • muDelta16

      public short muDelta16()
      Returns the value of the muDelta16 record component.
      Returns:
      the value of the muDelta16 record component
    • radVel16

      public short radVel16()
      Returns the value of the radVel16 record component.
      Returns:
      the value of the radVel16 record component
    • vx

      public float vx()
      Returns the value of the vx record component.
      Specified by:
      vx in interface IParticleRecord
      Returns:
      the value of the vx record component
    • vy

      public float vy()
      Returns the value of the vy record component.
      Specified by:
      vy in interface IParticleRecord
      Returns:
      the value of the vy record component
    • vz

      public float vz()
      Returns the value of the vz record component.
      Specified by:
      vz in interface IParticleRecord
      Returns:
      the value of the vz record component
    • appMag16

      public short appMag16()
      Returns the value of the appMag16 record component.
      Returns:
      the value of the appMag16 record component
    • absMag16

      public short absMag16()
      Returns the value of the absMag16 record component.
      Returns:
      the value of the absMag16 record component
    • color

      public float color()
      Returns the value of the color record component.
      Specified by:
      color in interface IParticleRecord
      Returns:
      the value of the color record component
    • size

      public float size()
      Returns the value of the size record component.
      Specified by:
      size in interface IParticleRecord
      Returns:
      the value of the size record component
    • hip

      public int hip()
      Returns the value of the hip record component.
      Specified by:
      hip in interface IParticleRecord
      Returns:
      the value of the hip record component
    • tEff16

      public short tEff16()
      Returns the value of the tEff16 record component.
      Returns:
      the value of the tEff16 record component
    • extra

      public com.badlogic.gdx.utils.ObjectMap<UCD,Object> extra()
      Returns the value of the extra record component.
      Returns:
      the value of the extra record component