Package gaiasky.scene.record
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 Summary
ConstructorsConstructorDescriptionParticleStar
(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
(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 aParticleStar
record class. -
Method Summary
Modifier and TypeMethodDescriptionfloat
absMag()
short
absMag16()
Returns the value of theabsMag16
record component.float
appMag()
short
appMag16()
Returns the value of theappMag16
record component.double
b()
Galactic latitude in degrees.double
beta()
Ecliptic latitude in degrees.float
color()
Returns the value of thecolor
record component.double
dec()
Declination in degrees.double
distance()
Distance in internal units.final boolean
Indicates whether some other object is "equal to" this one.extra()
Returns the value of theextra
record component.com.badlogic.gdx.utils.ObjectMap.Keys
<UCD> getExtra()
Gets the extra attributes map.Gets the extra data filed with the given UCD.Gets the extra data filed with the given name.double
getExtraNumber
(UCD ucd) Gets the extra data filed with the given UCD, as a double number.double
getExtraNumber
(String name) Gets the extra data filed with the given name, as a double number.getType()
Returns the particle record type.boolean
hasColor()
boolean
hasExtra()
boolean
boolean
final int
hashCode()
Returns a hash code value for this object.boolean
boolean
boolean
boolean
hasSize()
int
hip()
Returns the value of thehip
record component.long
id()
Returns the value of theid
record component.boolean
Returns whether this particle record has aVariable
attached, making it a variable star.double
l()
Galactic longitude in degrees.double
lambda()
Ecliptic longitude in degrees.float
muAlpha()
short
Returns the value of themuAlpha16
record component.float
muDelta()
short
Returns the value of themuDelta16
record component.String[]
names()
Returns the value of thenames
record component.int
nVari()
double
parallax()
Parallax in mas.double
period()
double
ra()
Declination in degrees.double
radius()
float
radVel()
short
radVel16()
Returns the value of theradVel16
record component.double[]
rgb()
void
setExtraAttributes
(com.badlogic.gdx.utils.ObjectMap<UCD, Object> e) float
size()
Returns the value of thesize
record component.float
tEff()
Returns the effective temperature, in K.short
tEff16()
Returns the value of thetEff16
record component.final String
toString()
Returns a string representation of this record class.float[]
variMags()
double[]
float
vx()
Returns the value of thevx
record component.float
vy()
Returns the value of thevy
record component.float
vz()
Returns the value of thevz
record component.double
x()
Returns the value of thex
record component.double
y()
Returns the value of they
record component.double
z()
Returns the value of thez
record component.
-
Constructor Details
-
ParticleStar
-
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 aParticleStar
record class.- Parameters:
id
- the value for theid
record componentnames
- the value for thenames
record componentx
- the value for thex
record componenty
- the value for they
record componentz
- the value for thez
record componentmuAlpha16
- the value for themuAlpha16
record componentmuDelta16
- the value for themuDelta16
record componentradVel16
- the value for theradVel16
record componentvx
- the value for thevx
record componentvy
- the value for thevy
record componentvz
- the value for thevz
record componentappMag16
- the value for theappMag16
record componentabsMag16
- the value for theabsMag16
record componentcolor
- the value for thecolor
record componentsize
- the value for thesize
record componenthip
- the value for thehip
record componenttEff16
- the value for thetEff16
record componentextra
- the value for theextra
record component
-
-
Method Details
-
getType
Description copied from interface:IParticleRecord
Returns the particle record type.- Specified by:
getType
in interfaceIParticleRecord
- Returns:
- The type.
-
isVariable
public boolean isVariable()Description copied from interface:IParticleRecord
Returns whether this particle record has aVariable
attached, making it a variable star.- Specified by:
isVariable
in interfaceIParticleRecord
- Returns:
- True if this record is a variable star.
-
nVari
public int nVari()- Specified by:
nVari
in interfaceIParticleRecord
- Returns:
- The number of variable star samples
-
period
public double period()- Specified by:
period
in interfaceIParticleRecord
- Returns:
- The variability period in days.
-
variMags
public float[] variMags()- Specified by:
variMags
in interfaceIParticleRecord
- Returns:
- The vector with the variable star magnitudes.
-
variTimes
public double[] variTimes()- Specified by:
variTimes
in interfaceIParticleRecord
- Returns:
- The vector with the variable star times corresponding to the magnitudes.
-
pos
- Specified by:
pos
in interfaceIParticleRecord
-
hasProperMotion
public boolean hasProperMotion()- Specified by:
hasProperMotion
in interfaceIParticleRecord
-
names
Returns the value of thenames
record component.- Specified by:
names
in interfaceIParticleRecord
- Returns:
- the value of the
names
record component
-
namesConcat
- Specified by:
namesConcat
in interfaceIParticleRecord
-
hasName
- Specified by:
hasName
in interfaceIParticleRecord
-
hasName
- Specified by:
hasName
in interfaceIParticleRecord
-
appMag
public float appMag()- Specified by:
appMag
in interfaceIParticleRecord
-
absMag
public float absMag()- Specified by:
absMag
in interfaceIParticleRecord
-
hasColor
public boolean hasColor()- Specified by:
hasColor
in interfaceIParticleRecord
-
rgb
public double[] rgb()- Specified by:
rgb
in interfaceIParticleRecord
-
hasSize
public boolean hasSize()- Specified by:
hasSize
in interfaceIParticleRecord
-
radius
public double radius()- Specified by:
radius
in interfaceIParticleRecord
-
id
public long id()Returns the value of theid
record component.- Specified by:
id
in interfaceIParticleRecord
- Returns:
- the value of the
id
record component
-
muAlpha
public float muAlpha()- Specified by:
muAlpha
in interfaceIParticleRecord
-
muDelta
public float muDelta()- Specified by:
muDelta
in interfaceIParticleRecord
-
radVel
public float radVel()- Specified by:
radVel
in interfaceIParticleRecord
-
distance
public double distance()Distance in internal units. Beware, does the computation on the fly.- Specified by:
distance
in interfaceIParticleRecord
- Returns:
- The distance, in internal units
-
parallax
public double parallax()Parallax in mas.- Specified by:
parallax
in interfaceIParticleRecord
- Returns:
- The parallax in mas.
-
ra
public double ra()Declination in degrees. Beware, does the conversion on the fly.- Specified by:
ra
in interfaceIParticleRecord
- Returns:
- The declination, 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 interfaceIParticleRecord
- Returns:
- The declination, in degrees.
-
lambda
public double lambda()Ecliptic longitude in degrees.- Specified by:
lambda
in interfaceIParticleRecord
- Returns:
- The ecliptic longitude, in degrees
-
beta
public double beta()Ecliptic latitude in degrees.- Specified by:
beta
in interfaceIParticleRecord
- Returns:
- The ecliptic latitude, in degrees
-
l
public double l()Galactic longitude in degrees.- Specified by:
l
in interfaceIParticleRecord
- Returns:
- The galactic longitude, in degrees
-
b
public double b()Galactic latitude in degrees.- Specified by:
b
in interfaceIParticleRecord
- 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 interfaceIParticleRecord
- Returns:
- The effective temperature in K.
-
setExtraAttributes
- Specified by:
setExtraAttributes
in interfaceIParticleRecord
-
hasExtra
public boolean hasExtra()- Specified by:
hasExtra
in interfaceIParticleRecord
-
hasExtra
- Specified by:
hasExtra
in interfaceIParticleRecord
-
hasExtra
- Specified by:
hasExtra
in interfaceIParticleRecord
-
getExtra
Description copied from interface:IParticleRecord
Gets the extra attributes map.- Specified by:
getExtra
in interfaceIParticleRecord
- Returns:
- The map.
-
getExtra
Description copied from interface:IParticleRecord
Gets the extra data filed with the given name.- Specified by:
getExtra
in interfaceIParticleRecord
- Parameters:
name
- The name of the data filed to get.- Returns:
- The data field, or null if it does not exist.
-
getExtra
Description copied from interface:IParticleRecord
Gets the extra data filed with the given UCD.- Specified by:
getExtra
in interfaceIParticleRecord
- Parameters:
ucd
- The UCD of the data filed to get.- Returns:
- The data field, or null if it does not exist.
-
getExtraNumber
Description copied from interface:IParticleRecord
Gets the extra data filed with the given name, as a double number.- Specified by:
getExtraNumber
in interfaceIParticleRecord
- 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
Description copied from interface:IParticleRecord
Gets the extra data filed with the given UCD, as a double number.- Specified by:
getExtraNumber
in interfaceIParticleRecord
- 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
- Specified by:
extraKeys
in interfaceIParticleRecord
-
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. -
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. -
equals
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 withObjects::equals(Object,Object)
; primitive components are compared with '=='. -
x
public double x()Returns the value of thex
record component.- Specified by:
x
in interfaceIParticleRecord
- Returns:
- the value of the
x
record component
-
y
public double y()Returns the value of they
record component.- Specified by:
y
in interfaceIParticleRecord
- Returns:
- the value of the
y
record component
-
z
public double z()Returns the value of thez
record component.- Specified by:
z
in interfaceIParticleRecord
- Returns:
- the value of the
z
record component
-
muAlpha16
public short muAlpha16()Returns the value of themuAlpha16
record component.- Returns:
- the value of the
muAlpha16
record component
-
muDelta16
public short muDelta16()Returns the value of themuDelta16
record component.- Returns:
- the value of the
muDelta16
record component
-
radVel16
public short radVel16()Returns the value of theradVel16
record component.- Returns:
- the value of the
radVel16
record component
-
vx
public float vx()Returns the value of thevx
record component.- Specified by:
vx
in interfaceIParticleRecord
- Returns:
- the value of the
vx
record component
-
vy
public float vy()Returns the value of thevy
record component.- Specified by:
vy
in interfaceIParticleRecord
- Returns:
- the value of the
vy
record component
-
vz
public float vz()Returns the value of thevz
record component.- Specified by:
vz
in interfaceIParticleRecord
- Returns:
- the value of the
vz
record component
-
appMag16
public short appMag16()Returns the value of theappMag16
record component.- Returns:
- the value of the
appMag16
record component
-
absMag16
public short absMag16()Returns the value of theabsMag16
record component.- Returns:
- the value of the
absMag16
record component
-
color
public float color()Returns the value of thecolor
record component.- Specified by:
color
in interfaceIParticleRecord
- Returns:
- the value of the
color
record component
-
size
public float size()Returns the value of thesize
record component.- Specified by:
size
in interfaceIParticleRecord
- Returns:
- the value of the
size
record component
-
hip
public int hip()Returns the value of thehip
record component.- Specified by:
hip
in interfaceIParticleRecord
- Returns:
- the value of the
hip
record component
-
tEff16
public short tEff16()Returns the value of thetEff16
record component.- Returns:
- the value of the
tEff16
record component
-
extra
Returns the value of theextra
record component.- Returns:
- the value of the
extra
record component
-