Feature/stars (#1598)

* Add the ability to remap SPECK variables to usage values
This commit is contained in:
Alexander Bock
2021-05-23 00:42:44 +02:00
committed by GitHub
parent 3154d37043
commit 63e9deab5f
12 changed files with 386 additions and 158 deletions
+26 -5
View File
@@ -1,6 +1,6 @@
local assetHelper = asset.require('util/asset_helper')
local colorLUT = asset.require('./stars_colormap').BvColorLUT
local colormaps = asset.require('./stars_colormap').ColorMaps
local textures = asset.syncedResource({
Name = "Stars Textures",
@@ -30,10 +30,21 @@ local stars = {
File = speck .. "/stars.speck",
Texture = textures .. "/halo.png",
--ShapeTexture = textures .. "/disc.png",
ColorMap = colorLUT .. "/colorbv.cmap",
ColorMap = colormaps .. "/colorbv.cmap",
OtherDataColorMap = colormaps .. "/viridis.cmap",
MagnitudeExponent = 6.2,
SizeComposition = "Distance Modulus",
RenderMethod = "Texture Based" -- or PSF
RenderMethod = "Texture Based", -- or PSF
DataMapping = {
Bv = "colorb_v",
Luminance = "lum",
AbsoluteMagnitude = "absmag",
ApparentMagnitude = "appmag",
Vx = "vx",
Vy = "vy",
Vz = "vz",
Speed = "speed"
}
},
GUI = {
Name = "Stars",
@@ -55,12 +66,22 @@ local sunstar = {
File = sunspeck .. "/sunstar.speck",
Texture = textures .. "/halo.png",
--ShapeTexture = textures .. "/disc.png",
ColorMap = colorLUT .. "/colorbv.cmap",
ColorMap = colormaps .. "/colorbv.cmap",
MagnitudeExponent = 6.2,
SizeComposition = "Distance Modulus",
RenderMethod = "Texture Based", -- or PSF
FadeInDistances = { 0.0001, 0.1 },
RenderableType = "PostDeferredTransparent"
RenderableType = "PostDeferredTransparent",
DataMapping = {
Bv = "colorb_v",
Luminance = "lum",
AbsoluteMagnitude = "absmag",
ApparentMagnitude = "appmag",
Vx = "vx",
Vy = "vy",
Vz = "vz",
Speed = "speed",
}
},
GUI = {
Name = "Sun",
@@ -1,20 +1,20 @@
local assetHelper = asset.require('util/asset_helper')
local BvColorLUT = asset.syncedResource({
local colormaps = asset.syncedResource({
Name = "Stars Color Table",
Type = "HttpSynchronization",
Identifier = "stars_colormap",
Version = 2
})
asset.export("BvColorLUT", BvColorLUT)
asset.export("ColorMaps", colormaps)
asset.meta = {
Name = "Stars B-V Colormap",
Name = "Star Colormaps",
Version = "2.0",
Description = [[A lookup table that maps a B-V color index to an RGB color.
The B-V values are in the range (-0.4, 2.0) and each line maps a value
in that range to a color]],
Description = [[Lookup tables used for star datasets, one of the tables map a B-V color
index to an RGB color. The B-V values are in the range (-0.4, 2.0) and each line maps
a value in that range to a color. The other table is the commonly used viridis map]],
Author = "OpenSpace Team",
URL = "https://www.amnh.org/research/hayden-planetarium/digital-universe",
License = "AMNH Digital Universe"
@@ -1,4 +1,4 @@
local bvColorLUT = asset.require('scene/digitaluniverse/stars_colormap').BvColorLUT
local colormaps = asset.require('scene/digitaluniverse/stars_colormap').ColorMaps
local DataPath = asset.syncedResource({
Name = "Exoplanet Data Files",
@@ -15,7 +15,7 @@ asset.onInitialize(function ()
p = "Modules.Exoplanets.BvColormap";
if (openspace.getPropertyValue(p) == "") then
openspace.setPropertyValueSingle(p, bvColorLUT .. "/colorbv.cmap")
openspace.setPropertyValueSingle(p, colormaps .. "/colorbv.cmap")
end
end)
+11 -1
View File
@@ -39,7 +39,17 @@ local gaia_abundance_apogee = {
ColorMap = colorLUT .. "/colorbv.cmap",
OtherDataColorMap = colorLUT .. "/viridis.cmap",
StaticFilter = -9999,
StaticFilterReplacement = 0.0
StaticFilterReplacement = 0.0,
DataMapping = {
Bv = "colorb_v",
Luminance = "lum",
AbsoluteMagnitude = "absmag",
ApparentMagnitude = "appmag",
Vx = "vx",
Vy = "vy",
Vz = "vz",
Speed = "speed"
}
},
GUI = {
Path = "/Milky Way/Gaia"
+11 -1
View File
@@ -39,7 +39,17 @@ local gaia_abundance_galah = {
ColorMap = colorLUT .. "/colorbv.cmap",
OtherDataColorMap = colorLUT .. "/viridis.cmap",
StaticFilter = -9999,
StaticFilterReplacement = 0.0
StaticFilterReplacement = 0.0,
DataMapping = {
Bv = "colorb_v",
Luminance = "lum",
AbsoluteMagnitude = "absmag",
ApparentMagnitude = "appmag",
Vx = "vx",
Vy = "vy",
Vz = "vz",
Speed = "speed"
}
},
GUI = {
Path = "/Milky Way/Gaia"
@@ -19,7 +19,17 @@ local OrionClusterStars = {
ColorMap = sync .. "/colorbv.cmap",
MagnitudeExponent = 5.02,
SizeComposition = "Distance Modulus",
RenderMethod = "Texture Based"
RenderMethod = "Texture Based",
DataMapping = {
Bv = "colorb_v",
Luminance = "lum",
AbsoluteMagnitude = "absmag",
ApparentMagnitude = "appmag",
Vx = "vx",
Vy = "vy",
Vz = "vz",
Speed = "speed"
}
},
GUI = {
Name = "Orion Nebula Star Cluster",
+11 -1
View File
@@ -32,7 +32,17 @@ local object = {
ColorMap = colorLUT .. "/denver_colorbv.cmap",
MagnitudeExponent = 6.2,
SizeComposition = "Distance Modulus",
RenderMethod = "Texture Based" -- or PSF
RenderMethod = "Texture Based", -- or PSF
DataMapping = {
Bv = "colorb_v",
Luminance = "lum",
AbsoluteMagnitude = "absmag",
ApparentMagnitude = "appmag",
Vx = "vx",
Vy = "vy",
Vz = "vz",
Speed = "speed"
}
},
GUI = {
Name = "Stars (Denver)",