mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-26 22:19:17 -06:00
Put together fieldlines and mhd in a scene
This commit is contained in:
committed by
Matthias Berg
parent
e1775121f7
commit
676ffc4d07
@@ -16,19 +16,19 @@ asset.request('customization/globebrowsing')
|
||||
asset.require('scene/solarsystem/sun/sun')
|
||||
|
||||
-- We need to specify paths to the prepared fieldline files before requesting the BATSRUS, ENLIL, and PFSS fieldline assets:
|
||||
local FieldLineBasePath = "C:/Users/CCMC/data/fieldlines_binaries/"
|
||||
ENLILPaths = {
|
||||
EqPlane011AU1 = FieldLineBasePath .. "enlil/july2012/downsampled40/011AU_eq_plane_1/",
|
||||
EqPlane011AU2 = FieldLineBasePath .. "enlil/july2012/downsampled40/011AU_eq_plane_2/",
|
||||
Lat4011AU1 = FieldLineBasePath .. "enlil/july2012/downsampled40/011AU_lat4_1/",
|
||||
Lat4011AU2 = FieldLineBasePath .. "enlil/july2012/downsampled40/011AU_lat4_2/",
|
||||
Earth = FieldLineBasePath .. "enlil/july2012/downsampled40/earth/",
|
||||
StereoA = FieldLineBasePath .. "enlil/july2012/downsampled40/stereoa/"
|
||||
}
|
||||
asset.require('./fieldlines/enlil')
|
||||
-- local FieldLineBasePath = "C:/Users/CCMC/data/fieldlines_binaries/"
|
||||
-- ENLILPaths = {
|
||||
-- EqPlane011AU1 = FieldLineBasePath .. "enlil/july2012/downsampled40/011AU_eq_plane_1/",
|
||||
-- EqPlane011AU2 = FieldLineBasePath .. "enlil/july2012/downsampled40/011AU_eq_plane_2/",
|
||||
-- Lat4011AU1 = FieldLineBasePath .. "enlil/july2012/downsampled40/011AU_lat4_1/",
|
||||
-- Lat4011AU2 = FieldLineBasePath .. "enlil/july2012/downsampled40/011AU_lat4_2/",
|
||||
-- Earth = FieldLineBasePath .. "enlil/july2012/downsampled40/earth/",
|
||||
-- StereoA = FieldLineBasePath .. "enlil/july2012/downsampled40/stereoa/"
|
||||
-- }
|
||||
-- asset.require('./fieldlines/enlil')
|
||||
|
||||
MASPaths = {
|
||||
Sun = FieldLineBasePath .. "mas_multiple_timesteps/"
|
||||
Sun = "E:/MAS_Bastille/fieldlines/osfls"
|
||||
}
|
||||
asset.require('./fieldlines/mas')
|
||||
|
||||
|
||||
@@ -19,14 +19,13 @@ local masDensityColorTable = transferFunctions .. "/enlil_density.txt"
|
||||
|
||||
local sunRadius = 695508000
|
||||
|
||||
|
||||
-- Fieldlies from binaries
|
||||
local MAS = {
|
||||
Identifier = "FL_MAS",
|
||||
Parent = transforms.HNMReferenceFrame.Identifier,
|
||||
Renderable = {
|
||||
Type = "RenderableFieldlinesSequence",
|
||||
SourceFolder = MASPaths.Sun,
|
||||
SourceFolder = "E:/MAS_Bastille/fieldlines/osfls",
|
||||
InputFileType = "osfls",
|
||||
-- StartStateOffset = 309,
|
||||
-- MaxNumStates = 1,
|
||||
@@ -39,24 +38,11 @@ local MAS = {
|
||||
{ 0, 1000000 },
|
||||
{ 100, 2000 }
|
||||
},
|
||||
-- ExtraMinMaxLimits = {
|
||||
-- { -1, 10000000 },
|
||||
-- { 0, 5000 }
|
||||
-- },
|
||||
-- RadialDomainLimits = { 0, 30 },
|
||||
-- CartesianDomainLimits = {
|
||||
-- { -20.5, 20.5 },
|
||||
-- { -20.5, 20.5 },
|
||||
-- { -20.5, 20.5}
|
||||
-- },
|
||||
LoadAtRuntime = true,
|
||||
ScaleToMeters = 1.0,
|
||||
SecondsBefore = 50*365*24*60*60, -- 50 years before
|
||||
SecondsAfter = 50*365*24*60*60, -- 50 years after
|
||||
SimulationModel = "mas",
|
||||
-- MaskingRanges = {
|
||||
-- {-1000, 1000},
|
||||
-- }
|
||||
},
|
||||
GUI = {
|
||||
Name = "Fieldlines MAS"
|
||||
@@ -81,7 +67,8 @@ local MAS = {
|
||||
-- Renderable = {
|
||||
-- Type = "RenderableFieldlinesSequence",
|
||||
-- -- TracingMethod = "PreTracedBinary",
|
||||
-- SourceFolder = "C:/Users/CCMC/data/fieldlines_json/mas_multiple_timesteps/JSON/",
|
||||
-- -- SourceFolder = "C:/Users/CCMC/data/fieldlines_json/mas_multiple_timesteps/JSON/",
|
||||
-- SourceFolder = "E:/MAS_Bastille/fieldlines/JSON_renamed/",
|
||||
-- InputFileType = "json",
|
||||
-- -- StartStateOffset = 309,
|
||||
-- -- MaxNumStates = 1,
|
||||
@@ -105,7 +92,8 @@ local MAS = {
|
||||
-- { -2.5, 2.5}
|
||||
-- },
|
||||
-- LoadAtRuntime = true,
|
||||
-- OutputFolder = "C:/Users/CCMC/data/fieldlines_binaries/mas_multiple_timesteps/",
|
||||
-- -- OutputFolder = "C:/Users/CCMC/data/fieldlines_binaries/mas_multiple_timesteps/",
|
||||
-- OutputFolder = "C:/Users/gberg2/OpenSpace/data/mas_fieldlines/",
|
||||
-- SimulationModel = "mas",
|
||||
-- ScaleToMeters = 1.0,
|
||||
-- SecondsBefore = 50*365*24*60*60, -- 50 years before
|
||||
@@ -114,7 +102,8 @@ local MAS = {
|
||||
-- GUI = {
|
||||
-- Name = "Fieldlines MAS"
|
||||
-- },
|
||||
-- }
|
||||
-- }
|
||||
|
||||
|
||||
local objects = { MAS }
|
||||
|
||||
|
||||
@@ -7,9 +7,13 @@ asset.require('spice/base')
|
||||
|
||||
assetHelper.requestAll(asset, 'scene/solarsystem/sun')
|
||||
assetHelper.requestAll(asset, 'scene/digitaluniverse')
|
||||
-- asset.require('scene/solarsystem/planets')
|
||||
-- asset.require('scene/digitaluniverse/stars')
|
||||
|
||||
-- Load default key bindings applicable to most scenes
|
||||
asset.require('util/default_keybindings')
|
||||
asset.require('util/default_dashboard')
|
||||
-- asset.request('customization/globebrowsing')
|
||||
|
||||
local sunAsset = asset.require('scene/solarsystem/sun/sun')
|
||||
local masMhdAsset = asset.require('scene/solarsystem/model/mas/mas_mhd')
|
||||
@@ -23,6 +27,18 @@ local toggleMas = function ()
|
||||
end
|
||||
|
||||
local Keybindings = {
|
||||
{
|
||||
Key = "F5",
|
||||
Command = "openspace.time.setTime('2000 JUL 14 08:33:37.100');",
|
||||
Documentation = "Jumps to first of the MAS-fieldline timesteps",
|
||||
Local = true
|
||||
},
|
||||
{
|
||||
Key = "F6",
|
||||
Command = "openspace.time.setTime('2012 JUL 01 00:07:00.000');",
|
||||
Documentation = "Jumps to first of the Enlil-fieldline timesteps",
|
||||
Local = true
|
||||
},
|
||||
{
|
||||
Key = "F7",
|
||||
Command = "openspace.time.setTime('2017 AUG 20 00:00:00');",
|
||||
@@ -55,9 +71,30 @@ local Keybindings = {
|
||||
},
|
||||
}
|
||||
|
||||
-- FIELDLINES --
|
||||
|
||||
-- We need to specify paths to the prepared fieldline files before requesting the BATSRUS, ENLIL, and PFSS fieldline assets:
|
||||
-- local FieldLineBasePath = "C:/Users/CCMC/data/fieldlines_binaries/"
|
||||
-- ENLILPaths = {
|
||||
-- EqPlane011AU1 = FieldLineBasePath .. "enlil/july2012/downsampled40/011AU_eq_plane_1/",
|
||||
-- EqPlane011AU2 = FieldLineBasePath .. "enlil/july2012/downsampled40/011AU_eq_plane_2/",
|
||||
-- Lat4011AU1 = FieldLineBasePath .. "enlil/july2012/downsampled40/011AU_lat4_1/",
|
||||
-- Lat4011AU2 = FieldLineBasePath .. "enlil/july2012/downsampled40/011AU_lat4_2/",
|
||||
-- Earth = FieldLineBasePath .. "enlil/july2012/downsampled40/earth/",
|
||||
-- StereoA = FieldLineBasePath .. "enlil/july2012/downsampled40/stereoa/"
|
||||
-- }
|
||||
-- asset.require('./fieldlines/enlil')
|
||||
|
||||
asset.require('./fieldlines/mas')
|
||||
|
||||
local sunAsset = asset.require('scene/solarsystem/sun/sun')
|
||||
local sunRadius = 695508000
|
||||
|
||||
asset.onInitialize(function ()
|
||||
-- openspace.time.setTime("2017 JUN 01 00:00:00")
|
||||
openspace.time.setTime(openspace.time.currentWallTime())
|
||||
openspace.time.setTime("2000 JUL 14 08:33:37.100")
|
||||
|
||||
-- openspace.time.setTime(openspace.time.currentWallTime())
|
||||
sceneHelper.bindKeys(Keybindings)
|
||||
|
||||
openspace.setPropertyValueSingle('Scene.SunGlare.renderable.Enabled', false);
|
||||
@@ -65,7 +102,7 @@ asset.onInitialize(function ()
|
||||
openspace.setDefaultGuiSorting()
|
||||
|
||||
openspace.markInterestingNodes({
|
||||
"Mas_MHD"
|
||||
"Earth", "Sun", "Moon", "FL_ENLIL_earth", "FL_MAS", "Mas_MHD"
|
||||
})
|
||||
|
||||
openspace.addVirtualProperty(
|
||||
@@ -81,7 +118,7 @@ asset.onInitialize(function ()
|
||||
openspace.navigation.setCameraState({
|
||||
Focus = masMhdAsset.Mas_MHD.Identifier,
|
||||
Position = { 100000000000.0, 0, 0 },
|
||||
Rotation = { 0.758797, 0.221490, -0.605693, -0.091135 },
|
||||
Rotation = { 0.758797, 0.221490, -0.605693, -0.091135 }
|
||||
})
|
||||
|
||||
end)
|
||||
@@ -90,7 +127,7 @@ asset.onDeinitialize(function ()
|
||||
sceneHelper.unbindKeys(Keybindings)
|
||||
|
||||
openspace.removeInterestingNodes({
|
||||
"Mas_MHD"
|
||||
"Earth", "Sun", "Moon", "FL_ENLIL_earth", "FL_MAS", "Mas_MHD"
|
||||
})
|
||||
|
||||
openspace.removeVirtualProperty("*Trail.renderable.Enabled")
|
||||
|
||||
@@ -13,7 +13,7 @@ local Mas_MHD = {
|
||||
Type = "RenderableTimeVaryingVolume",
|
||||
StepSize = 0.002,
|
||||
TransferFunction = asset.localResource("transferfunctions/mas_mhd_r_squared.txt"),
|
||||
SourceDirectory = "${DATA}/mas/bastille/generated",
|
||||
SourceDirectory = "E:/MAS_Bastille/rawvolumes/density_23_05_2018",
|
||||
LowerValueBound = 0,
|
||||
UpperValueBound = 1,
|
||||
GridType = "Spherical",
|
||||
@@ -29,7 +29,7 @@ local Mas_MHD = {
|
||||
},
|
||||
Scale = {
|
||||
Type = "StaticScale",
|
||||
Scale = 4.0 * sunRadius
|
||||
Scale = sunRadius
|
||||
}
|
||||
},
|
||||
GUI = {
|
||||
|
||||
Reference in New Issue
Block a user