some minor fixes from notes on PR

This commit is contained in:
elon
2021-07-23 12:40:40 +02:00
parent 37b23d7f3a
commit b248e23ea4
11 changed files with 136 additions and 147 deletions
@@ -24,3 +24,8 @@ debugHelper.registerCartesianAxes(asset, {
Parent = sun_transforms.SunIAU.Identifier,
Scale = sunRadius * 300
})
debugHelper.registerCartesianAxes(asset, {
Parent = sun_transforms.SolarSystemBarycenter.Identifier,
Scale = sunRadius * 300
})
@@ -10,8 +10,8 @@ asset.export("TexturesPath", TexturesPath)
asset.meta = {
Name = "Predictive Science Inc. MAS Bastille Day Textures",
Version = "1.0",
Description = " Magnetograms of the sun ",
Author = "Jonathan Grangien, Matthias Berg",
Description = "Magnetograms of the sun",
Author = "CCMC, Jonathan Grangien, Matthias Berg",
URL = "https://dx.doi.org/10.3847/1538-4357/aab36d",
License = ""
}
@@ -13,10 +13,21 @@ local sunRadius = 6.957E8
local densityVolume = {
Identifier = "MAS_MHD_density",
Parent = sunTransforms.SunIAU.Identifier,
Transform = {
Scale = {
Type = "StaticScale",
Scale = sunRadius
},
Rotation = {
Type = "FixedRotation",
XAxis = { -1.0, 0.0, 0.0 },
YAxis = { 0.0, 1.0, 0.0 },
ZAxis = { 0.0, 0.0, -1.0 }
}
},
Renderable = {
Type = "RenderableTimeVaryingVolume",
StepSize = 0.004,
--Enabled = false,
Opacity = 0.3,
TransferFunction = asset.localResource("transferfunctions/mas_mhd_r_squared.txt"),
SourceDirectory = densityDirectory,
@@ -25,22 +36,9 @@ local densityVolume = {
GridType = "Spherical",
SecondsBefore = 24*60*60,
SecondsAfter = 24*60*60,
Dimensions = {100, 100, 128},
Dimensions = { 100, 100, 128 },
InvertDataAtZ = true
},
Transform = {
Scale = {
Type = "StaticScale",
Scale = sunRadius
},
Rotation = {
--Type = "StaticRotation", --LuaRotation
Type = "FixedRotation",
XAxis = {-1.0, 0.0, 0.0},
YAxis = {0.0, 1.0, 0.0},
ZAxis = {0.0, 0.0, -1.0}
}
},
GUI = {
Name = "MAS Density",
Path = "/Solar System/Heliosphere"
@@ -52,8 +50,8 @@ assetHelper.registerSceneGraphNodesAndExport(asset, { densityVolume })
asset.meta = {
Name = "Predictive Science Inc. Volume Rendering Bastille Day",
Version = "1.0",
Description = " Volumetric rendering for the bastille day CME event ",
Description = "Volumetric rendering for the bastille day CME event",
Author = "CCMC, OpenSpace team",
URL = "https://dx.doi.org/10.3847/1538-4357/aab36d",
License = ""
}
}
@@ -9,7 +9,7 @@ local fieldlinesDirectory = asset.syncedResource({
Name = "Bastille Day MAS Fieldlines",
Type = "HttpSynchronization",
Identifier = "bastille_day_mas_fieldlines",
Version = 2
Version = 1
})
local sunRadius = 6.957E8
@@ -19,6 +19,27 @@ local fieldlines = {
Identifier = "MAS_MHD_Fieldlines",
Parent = heliosphereTransforms.HNMReferenceFrame.Identifier,
--wrong Parent = sunTransforms.SunIAU.Identifier,
Transform = {
Scale = {
Type = "StaticScale",
Scale = sunRadius
},
Rotation = {
-- This is a rotation matrix to go from Carrington longitude referens frame to HEEQ180
-- which is what the renderables parent transforms.HNMReferenceFrame.Identifier is
-- referring to. At the reference time, MAS_seq = 0, 2000-07-14T08:33:37.105 the Carrington
-- longitude was 309.3 degrees.
-- Difference from HEEQ => 360-309.3=50.7
-- (or 0-309.3 = -309.3 However this leads to the same rotation matrix in the end)
-- Since OpenSpace supports HEEQ180 and not HEEQ, 180 was added or subtracted
-- => a1 = -129.3 and a2 = 230.7
-- Rotation matrix: (cos a, -sin a, 0)(sin a, cos a, 0)(0, 0, 1) leads to the result.
Type = "FixedRotation",
XAxis = { -0.63338087262755016203262119192353, -0.77384020972650618518999944537717, 0.0 },
YAxis = { 0.77384020972650618518999944537717, -0.63338087262755016203262119192353, 0.0} ,
ZAxis = { 0.0, 0.0, 1.0 }
}
},
Renderable = {
Type = "RenderableFieldlinesSequence",
SourceFolder = fieldlinesDirectory,
@@ -27,12 +48,12 @@ local fieldlines = {
AlphaBlendlingEnabled = false,
InputFileType = "osfls",
ColorTablePaths = {
masDensityColorTable,
masVelocityColorTable,
masDensityColorTable,
masVelocityColorTable,
},
ColorTableMinMax = {
{ 0, 1000000 },
{ 100, 2000 }
{ 0, 1000000 },
{ 100, 2000 }
},
LoadAtRuntime = true,
ScaleToMeters = 1.0,
@@ -40,33 +61,12 @@ local fieldlines = {
SecondsAfter = 24*60*60,
SimulationModel = "mas",
Color = {
Uniform = {0, 0.725, 0.75, 1}
Uniform = { 0.0, 0.725, 0.75, 1.0 }
}
},
GUI = {
Path = "/Solar System/Heliosphere",
Name = "MAS Fieldlines"
},
Transform = {
Scale = {
Type = "StaticScale",
Scale = sunRadius
},
Rotation = {
--This is a rotation matrix to go from Carrington longitude referens frame to HEEQ180
--which is what the renderables paretn transforms.HNMReferenceFrame.Identifier is
--refering to. At the referens time, MAS_seq = 0, 2000-07-14T08:33:37.105 the Carrington
--longitude was 309.3 degrees.
--Difference from HEEQ => 360-309.3=50.7
--(or 0-309.3 = -309.3 However this leads to the same rotation matrix in the end)
--Since OpenSpace supports HEEQ180 and not HEEQ, 180 was added or subtracted
-- => a1 = -129.3 and a2 = 230.7
--Rotation matrix: (cos a, -sin a, 0)(sin a, cos a, 0)(0, 0, 1) leads to the result.
Type = "FixedRotation",
XAxis = {-0.63338087262755016203262119192353, -0.77384020972650618518999944537717, 0.0},
YAxis = {0.77384020972650618518999944537717, -0.63338087262755016203262119192353, 0.0},
ZAxis = {0.0, 0.0, 1.0}
}
}
}
@@ -75,8 +75,8 @@ assetHelper.registerSceneGraphNodesAndExport(asset, { fieldlines })
asset.meta = {
Name = "Predictive Science Inc. Fieldlines Bastille Day",
Version = "1.0",
Description = " Magnetic fieldlines for the bastille day CME event ",
Author = "Jonathan Grangien, Matthias Berg",
Description = "Magnetic fieldlines for the bastille day CME event",
Author = "CCMC, Jonathan Grangien, Matthias Berg",
URL = "https://dx.doi.org/10.3847/1538-4357/aab36d",
License = ""
}
}
@@ -18,11 +18,31 @@ local fluxnodesBinaries = asset.syncedResource({
local Fluxnodes = {
Identifier = "MAS_MHD_FluxNodes",
Parent = heliosphereTransforms.HNMReferenceFrame.Identifier,
Transform = {
Scale = {
Type = "StaticScale",
Scale = 1
},
Rotation = {
-- This is a rotation matrix to go from Carrington longitude referens frame to HEEQ180
-- which is what the renderables parent transforms.HNMReferenceFrame.Identifier is
-- referring to. At the reference time, MAS_seq = 0, 2000-07-14T08:33:37.105 the Carrington
-- longitude was 309.3 degrees.
-- Difference from HEEQ => 360-309.3=50.7
-- (or 0-309.3 = -309.3 However this leads to the same rotation matrix in the end)
-- Since OpenSpace supports HEEQ180 and not HEEQ, 180 was added or subtracted
-- => a1 = -129.3 and a2 = 230.7
-- Rotation matrix: (cos a, -sin a, 0)(sin a, cos a, 0)(0, 0, 1) leads to the result.
Type = "FixedRotation",
XAxis = { -0.63338087262755016203262119192353, -0.77384020972650618518999944537717, 0.0 },
YAxis = { 0.77384020972650618518999944537717, -0.63338087262755016203262119192353, 0.0 },
ZAxis = { 0.0, 0.0, 1.0 }
}
},
Renderable = {
Type = "RenderableFluxNodes",
SourceFolder = fluxnodesBinaries,
ColorTablePaths = {
ColorTablePaths = {
Standard = fluxnodeColorTable,
CMR = fluxnodeColorTableCMR,
Earth = fluxnodeColorTableEarth,
@@ -38,27 +58,6 @@ local Fluxnodes = {
GUI = {
Path = "/Solar System/Heliosphere",
Name = "Fluxnodes"
},
Transform = {
Scale = {
Type = "StaticScale",
Scale = 1
},
Rotation = {
--This is a rotation matrix to go from Carrington longitude referens frame to HEEQ180
--which is what the renderables paretn transforms.HNMReferenceFrame.Identifier is
--refering to. At the referens time, MAS_seq = 0, 2000-07-14T08:33:37.105 the Carrington
--longitude was 309.3 degrees.
--Difference from HEEQ => 360-309.3=50.7
--(or 0-309.3 = -309.3 However this leads to the same rotation matrix in the end)
--Since OpenSpace supports HEEQ180 and not HEEQ, 180 was added or subtracted
-- => a1 = -129.3 and a2 = 230.7
--Rotation matrix: (cos a, -sin a, 0)(sin a, cos a, 0)(0, 0, 1) leads to the result.
Type = "FixedRotation",
XAxis = {-0.63338087262755016203262119192353, -0.77384020972650618518999944537717, 0.0},
YAxis = {0.77384020972650618518999944537717, -0.63338087262755016203262119192353, 0.0},
ZAxis = {0.0, 0.0, 1.0}
}
}
}
@@ -67,8 +66,8 @@ assetHelper.registerSceneGraphNodesAndExport(asset, { Fluxnodes })
asset.meta = {
Name = "Predictive Science Inc. Flux nodes Bastille Day",
Version = "1.0",
Description = " Flux nodes for the bastille day CME event ",
Description = "Flux nodes for the bastille day CME event",
Author = "CCMC, Christian Adamsson, Emilie Ho",
URL = "https://dx.doi.org/10.3847/1538-4357/aab36d",
License = ""
}
}
@@ -1,6 +1,7 @@
asset.require("spice/base")
local assetHelper = asset.require("util/asset_helper")
local transforms = asset.require('scene/solarsystem/sun/transforms_heliosphere')
--15 cmr emin01, 16 cmr emin03
local TexturesPathEquitorial = asset.syncedResource({
Type = "HttpSynchronization",
@@ -8,6 +9,7 @@ Type = "HttpSynchronization",
Identifier = "cutplanes_textures",
Version = 1
})
local TexturesPathMeridial = asset.syncedResource({
Type = "HttpSynchronization",
Name = "cutplane_meridial_textures",
@@ -18,23 +20,22 @@ local TexturesPathMeridial = asset.syncedResource({
local Cutplane = {
Identifier = "Cutplane",
Parent = transforms.HNMReferenceFrame.Identifier,
--Parent = transforms.SunIAU.Identifier,
Transform = {
--Rotation = {
--This is a rotation matrix to go from Carrington longitude referens frame to HEEQ180
--which is what the renderables paretn transforms.HNMReferenceFrame.Identifier is
--refering to. At the referens time, MAS_seq = 0, 2000-07-14T08:33:37.105 the Carrington
--longitude was 309.3 degrees.
--Difference from HEEQ => 360-309.3=50.7
--(or 0-309.3 = -309.3 However this leads to the same rotation matrix in the end)
--Since OpenSpace supports HEEQ180 and not HEEQ, 180 was added or subtracted
-- This is a rotation matrix to go from Carrington longitude referens frame to HEEQ180
-- which is what the renderables parent transforms.HNMReferenceFrame.Identifier is
-- referring to. At the reference time, MAS_seq = 0, 2000-07-14T08:33:37.105 the Carrington
-- longitude was 309.3 degrees.
-- Difference from HEEQ => 360-309.3=50.7
-- (or 0-309.3 = -309.3 However this leads to the same rotation matrix in the end)
-- Since OpenSpace supports HEEQ180 and not HEEQ, 180 was added or subtracted
-- => a1 = -129.3 and a2 = 230.7
--Rotation matrix: (cos a, -sin a, 0)(sin a, cos a, 0)(0, 0, 1) leads to the result.
--[[ Type = "FixedRotation",
XAxis = {-0.63338087262755016203262119192353, -0.77384020972650618518999944537717, 0.0},
YAxis = {0.77384020972650618518999944537717, -0.63338087262755016203262119192353, 0.0},
ZAxis = {0.0, 0.0, 1.0}
}--]]
-- Rotation matrix: (cos a, -sin a, 0)(sin a, cos a, 0)(0, 0, 1) leads to the result.
-- Type = "FixedRotation",
-- XAxis = { -0.63338087262755016203262119192353, -0.77384020972650618518999944537717, 0.0 },
-- YAxis = { 0.77384020972650618518999944537717, -0.63338087262755016203262119192353, 0.0 },
-- ZAxis = { 0.0, 0.0, 1.0 }
--}
},
Renderable = {
Type = "RenderablePlaneTimeVaryingImage",
@@ -44,45 +45,44 @@ local Cutplane = {
BlendMode = "Normal",
MirrorBackside = false,
Opacity = 0.7
},
},
GUI = {
Name = "Cutplane Equitorial",
Path = "/Solar System/Heliosphere"
},
};
}
}
local Cutplane2 = {
Identifier = "Cutplane2",
Parent = transforms.HNMReferenceFrame.Identifier,
Transform = {
Rotation = {
Rotation = {
Type = "StaticRotation",
Rotation = {-1.5707965, -3.141593, 0}
Rotation = { -1.5707965, -3.141593, 0.0 }
}
},
Renderable = {
Type = "RenderablePlaneTimeVaryingImage",
Size = 1.57*10^11,
Enabled = false,
Texture = TexturesPathMeridial,
BlendMode = "Normal",
MirrorBackside = false,
Opacity = 0.7
Type = "RenderablePlaneTimeVaryingImage",
Size = 1.57*10^11,
Enabled = false,
Texture = TexturesPathMeridial,
BlendMode = "Normal",
MirrorBackside = false,
Opacity = 0.7
},
GUI = {
Name = "Cutplane Meridial",
Path = "/Solar System/Heliosphere"
Name = "Cutplane Meridial",
Path = "/Solar System/Heliosphere"
},
};
}
assetHelper.registerSceneGraphNodesAndExport(asset, { Cutplane, Cutplane2})
--assetHelper.registerSceneGraphNodesAndExport(asset, { Cutplane})
asset.meta = {
Name = "Predictive Science Inc. Flux nodes Bastille Days",
Version = "1.0",
Description = " Flux nodes for the bastille day CME events ",
Author = "Christian Adamsson, Emilie Ho",
Description = "Flux nodes for the bastille day CME events",
Author = "CCMC, Christian Adamsson, Emilie Ho",
URL = "https://dx.doi.org/10.3847/1538-4357/aab36d",
License = ""
}
}
@@ -1,3 +1,7 @@
asset.require("spice/base")
local assetHelper = asset.require("util/asset_helper")
--local textures = asset.require('./streamnodes_textures').TexturesPath
local TexturesPath = asset.syncedResource({
Type = "HttpSynchronization",
Name = "Streamnodes textures",
@@ -5,16 +9,11 @@ local TexturesPath = asset.syncedResource({
Version = 1
})
asset.require("spice/base")
local assetHelper = asset.require("util/asset_helper")
--local textures = asset.require('./streamnodes_textures').TexturesPath
local legend = {
Identifier = "Legendfluxnodes",
--Type = "ScreenSpaceRenderable",
Type = "ScreenSpaceImageLocal",
TexturePath = TexturesPath .. "/CMR_transparent_vittext.png",
};
}
openspace.addScreenSpaceRenderable(legend)
openspace.setPropertyValueSingle('ScreenSpace.Legendfluxnodes.CartesianPosition', {0.677970, 0.0,-1.049180});
@@ -28,8 +27,8 @@ assetHelper.registerSceneGraphNodesAndExport(asset, { legend })
asset.meta = {
Name = "Predictive Science Inc. Stream nodes Bastille Days",
Version = "1.0",
Description = " Stream nodes for the bastille day CME events ",
Description = "Stream nodes for the bastille day CME events",
Author = "Christian Adamsson, Emilie Ho",
URL = "https://dx.doi.org/10.3847/1538-4357/aab36d",
License = ""
}
}
@@ -6,9 +6,7 @@ local focusPoint = {
Parent = "SunIAU",
Transform = {
Translation = {
-- Type = "StaticTranslation",
Type = "GlobeTranslation",
-- Position = {4.44531843286E8, 4.89946069886E8, 2.52887479935E8}
Globe = "Sun",
Longitude = -45,
Latitude = 20,
@@ -23,12 +21,6 @@ local focusPoint = {
assetHelper.registerSceneGraphNodesAndExport(asset, { focusPoint })
-- x = R * cos(lat) * cos(lon) => x = 696340000 * cos(0.31741081375) * cos(0.83395845917) = 444531843.286
-- y = R * cos(lat) * sin(lon) => y = 696340000 * cos(0.31741081375) * sin(0.83395845917) = 489946069.886
-- z = R * sin(lat) => z = 696340000 * sin(0.31741081375) = 217333118.755
-- Lat = 18.1863 => 18.1863 * PI/180 = 0.31741081375 rad
-- Long = 47.7823 => 18.1863 * PI/180 = 0.83395845917 rad
asset.meta = {
Name = "Focus point",
Version = "1.0",
@@ -36,4 +28,4 @@ asset.meta = {
Author = "Christian Adamsson, Emilie Ho",
URL = "https://dx.doi.org/10.3847/1538-4357/aab36d",
License = ""
}
}
@@ -1,11 +1,17 @@
local assetHelper = asset.require('util/asset_helper')
local sunTransforms = asset.require('scene/solarsystem/sun/transforms')
--openspace.setPropertyValueSingle("Modules.Space.ShowExceptions", false)
local travelSpeedIndicator = {
Identifier = "travelSpeedIndicator",
--SunIAU adds an extra rotation. Using barycenter, then offsetting to SunIAU
Parent = sunTransforms.SolarSystemBarycenter.Identifier,
Transform = {
Translation = {
Type = "SpiceTranslation",
Target = "SUN",
Observer = "SSB"
}
},
Renderable = {
Type = "RenderableTravelSpeed",
Target = "Earth", --name of scene graph node. Earth by default
@@ -21,12 +27,11 @@ local travelSpeedIndicator = {
assetHelper.registerSceneGraphNodesAndExport(asset, { travelSpeedIndicator })
asset.meta = {
Name = "Lighttravel sun to earth",
Version = "1.0",
Description = "Speed of light from sun to earth",
Author = "Christian Adamsson, Emilie Ho",
Author = "CCMC, Christian Adamsson, Emilie Ho",
URL = "",
License = ""
}
}
@@ -2,7 +2,7 @@ local TexturesPath = asset.syncedResource({
Name = "Bastille Day Magnetogram",
Type = "HttpSynchronization",
Identifier = "bastille_day_magnetogram",
Version = 3
Version = 2
})
asset.export("TexturesPath", TexturesPath)
@@ -1,12 +1,3 @@
asset.meta = {
Name = "Predictive Science Inc. EUV texture sequence Bastille Days",
Version = "1.0",
Description = "EUV simulation, texture sequence",
Author = "CCMC, OpenSpace team",
URL = "https://dx.doi.org/10.3847/1538-4357/aab36d",
License = ""
}
asset.require("spice/base")
local assetHelper = asset.require("util/asset_helper")
local transforms = asset.require("./transforms")
@@ -38,11 +29,11 @@ local EUV_Layer = {
assetHelper.registerSceneGraphNodesAndExport(asset, { EUV_Layer })
asset.meta = {
Name = "Predictive Science Inc. EUV texture sequence Bastille Days",
Version = "1.0",
Description = "EUV simulation, texture sequence",
Author = "CCMC, OpenSpace team",
URL = "https://dx.doi.org/10.3847/1538-4357/aab36d",
License = ""
}