Record Class ParticleVariable

java.lang.Object
java.lang.Record
gaiasky.scene.record.ParticleVariable
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.
tEff - Effective temperature.
nVari - Number of variable star samples.
period - Period in days.
variMags - Vector with magnitudes.
variCols - Vector with packed RGBA colors. May be null. If present, it must have the same length as variMags and variTimes.
variTimes - Vector with times corresponding to magnitudes, in Julian days.
extra - Map with extra attributes.
All Implemented Interfaces:
IParticleRecord

public record ParticleVariable(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, float tEff, int nVari, double period, float[] variMags, float[] variCols, double[] variTimes, com.badlogic.gdx.utils.ObjectMap<UCD,Object> extra) extends Record implements IParticleRecord
Record class to store variable stars. Like ParticleStar, but contains the time series variability.
  • Constructor Details

    • ParticleVariable

      public ParticleVariable(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, int nVari, double period, float[] variMags, double[] variTimes, com.badlogic.gdx.utils.ObjectMap<UCD,Object> extra)
    • ParticleVariable

      public ParticleVariable(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, int nVari, double period, float[] variMags, float[] variCols, double[] variTimes, com.badlogic.gdx.utils.ObjectMap<UCD,Object> extra)
    • ParticleVariable

      public ParticleVariable(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, float tEff, int nVari, double period, float[] variMags, float[] variCols, double[] variTimes, com.badlogic.gdx.utils.ObjectMap<UCD,Object> extra)
      Creates an instance of a ParticleVariable 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
      tEff - the value for the tEff record component
      nVari - the value for the nVari record component
      period - the value for the period record component
      variMags - the value for the variMags record component
      variCols - the value for the variCols record component
      variTimes - the value for the variTimes 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.
    • 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.
    • 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
    • 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
    • variMag

      public float variMag(int i)
    • variTime

      public double variTime(int i)
    • variColor

      public float variColor(int i)
    • hasVariColors

      public boolean hasVariColors()
    • 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
    • tEff

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

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

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

      public float[] variMags()
      Returns the value of the variMags record component.
      Specified by:
      variMags in interface IParticleRecord
      Returns:
      the value of the variMags record component
    • variCols

      public float[] variCols()
      Returns the value of the variCols record component.
      Returns:
      the value of the variCols record component
    • variTimes

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