Record Class ParticleExt
java.lang.Object
java.lang.Record
gaiasky.scene.record.ParticleExt
- 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.muAlpha
- The proper motion in alpha*, in mas/y.muDelta
- The proper motion in delta, in mas/y.radVel
- 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.extra
- Map with extra attributes.
- All Implemented Interfaces:
IParticleRecord
public record ParticleExt(long id, String[] names, double x, double y, double z, float muAlpha, float muDelta, float radVel, float vx, float vy, float vz, short appMag16, short absMag16, float color, float size, com.badlogic.gdx.utils.ObjectMap<UCD,Object> extra)
extends Record
implements IParticleRecord
Record class to store extended particles. These are particles with proper motions, magnitudes, colors and sizes.
-
Constructor Summary
ConstructorsConstructorDescriptionParticleExt
(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, com.badlogic.gdx.utils.ObjectMap<UCD, Object> extra) ParticleExt
(long id, String[] names, double x, double y, double z, float muAlpha, float muDelta, float radVel, float vx, float vy, float vz, short appMag16, short absMag16, float color, float size, com.badlogic.gdx.utils.ObjectMap<UCD, Object> extra) Creates an instance of aParticleExt
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()
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()
Returns the value of themuAlpha
record component.float
muDelta()
Returns the value of themuDelta
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()
Returns the value of theradVel
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.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
-
ParticleExt
-
ParticleExt
public ParticleExt(long id, String[] names, double x, double y, double z, float muAlpha, float muDelta, float radVel, float vx, float vy, float vz, short appMag16, short absMag16, float color, float size, com.badlogic.gdx.utils.ObjectMap<UCD, Object> extra) Creates an instance of aParticleExt
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 componentmuAlpha
- the value for themuAlpha
record componentmuDelta
- the value for themuDelta
record componentradVel
- the value for theradVel
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 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
-
hip
public int hip()- Specified by:
hip
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
-
hashCode
-
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 thecompare
method from their corresponding wrapper classes. -
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
-
muAlpha
public float muAlpha()Returns the value of themuAlpha
record component.- Specified by:
muAlpha
in interfaceIParticleRecord
- Returns:
- the value of the
muAlpha
record component
-
muDelta
public float muDelta()Returns the value of themuDelta
record component.- Specified by:
muDelta
in interfaceIParticleRecord
- Returns:
- the value of the
muDelta
record component
-
radVel
public float radVel()Returns the value of theradVel
record component.- Specified by:
radVel
in interfaceIParticleRecord
- Returns:
- the value of the
radVel
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
-
absMag16
-
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
-
extra
-