mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-02-25 06:19:02 -06:00
version of data fix
This commit is contained in:
@@ -23,7 +23,7 @@ local earthMagnetosphere = {
|
||||
-- FlowEnabled = false,
|
||||
LineWidth = 3.0,
|
||||
AlphaBlendlingEnabled = false,
|
||||
InputFileType = "osfls",
|
||||
InputFileType = "osfls", -- openspace Field lines Sequence
|
||||
--ColorTablePaths = {
|
||||
-- masDensityColorTable,
|
||||
-- masVelocityColorTable,
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
local TexturesPath = asset.syncedResource({
|
||||
Name = "PREDSCI MAS Bastille Day Textures",
|
||||
Type = "HttpSynchronization",
|
||||
Identifier = "mas_bastille_day_2000_sun_textures",
|
||||
Version = 2
|
||||
Identifier = "bastille_day_magnetogram",
|
||||
Version = 4
|
||||
})
|
||||
|
||||
asset.export("TexturesPath", TexturesPath)
|
||||
|
||||
@@ -10,7 +10,7 @@ local fieldlinesDirectory = asset.syncedResource({
|
||||
Name = "Bastille Day MAS Fieldlines",
|
||||
Type = "HttpSynchronization",
|
||||
Identifier = "bastille_day_mas_fieldlines",
|
||||
Version = 1
|
||||
Version = 2
|
||||
})
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,70 @@
|
||||
local assetHelper = asset.require('util/asset_helper')
|
||||
local sunTransforms = asset.require('scene/solarsystem/sun/transforms')
|
||||
local transforms = asset.require('scene/solarsystem/planets/earth/transforms')
|
||||
|
||||
local transferFunctions = asset.localResource("transferfunctions")
|
||||
local masVelocityColorTable = transferFunctions .. "/velocity_fieldlines.txt"
|
||||
local masDensityColorTable = transferFunctions .. "/density_fieldlines.txt"
|
||||
|
||||
local fieldlinesDirectory = 'D:/data/2000_01_01_event/cdf'
|
||||
local seedPointFile = 'D:/data/2000_01_01_event/seedpoints/mp_position_257532008271_20000101_040000.txt'
|
||||
|
||||
--local sunRadius = 6.957E8
|
||||
local earthRadius = 6378137
|
||||
|
||||
|
||||
-- Fieldlies from binaries
|
||||
local fieldlines = {
|
||||
Identifier = "MAS_MHD_Fieldlines",
|
||||
--wrong Parent = sunTransforms.HNMReferenceFrame.Identifier,
|
||||
Parent = transforms.GSMReferenceFrame.Identifier,
|
||||
Renderable = {
|
||||
Type = "RenderableFieldlinesSequence",
|
||||
SourceFolder = fieldlinesDirectory,
|
||||
SeedPointFile = seedPointFile,
|
||||
TracingVariable = 'b',
|
||||
|
||||
-- FlowEnabled = false,
|
||||
-- LineWidth = 1.0;
|
||||
AlphaBlendlingEnabled = false,
|
||||
InputFileType = "cdf",
|
||||
|
||||
ColorTablePaths = {
|
||||
masDensityColorTable,
|
||||
masVelocityColorTable,
|
||||
},
|
||||
ColorTableMinMax = {
|
||||
{ 0, 1000000 },
|
||||
{ 100, 2000 }
|
||||
},
|
||||
LoadAtRuntime = true,
|
||||
ScaleToMeters = 1.0,
|
||||
SecondsBefore = 24*60*60,
|
||||
SecondsAfter = 24*60*60,
|
||||
SimulationModel = "batsrus",
|
||||
Color = {
|
||||
Uniform = {1.0, 0.0, 0.5, 1}
|
||||
}
|
||||
},
|
||||
GUI = {
|
||||
Path = "/Solar System/Heliosphere",
|
||||
Name = "Batsrus Fieldlines"
|
||||
},
|
||||
Transform = {
|
||||
Scale = {
|
||||
Type = "StaticScale",
|
||||
Scale = 1
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
assetHelper.registerSceneGraphNodesAndExport(asset, { fieldlines })
|
||||
|
||||
asset.meta = {
|
||||
Name = "CDF fieldlines files Bastille Day",
|
||||
Version = "1.0",
|
||||
Description = " Magnetic fieldlines",
|
||||
Author = "OpenSpace team",
|
||||
URL = "",
|
||||
License = ""
|
||||
}
|
||||
@@ -0,0 +1,81 @@
|
||||
local assetHelper = asset.require('util/asset_helper')
|
||||
local sunTransforms = asset.require('scene/solarsystem/sun/transforms')
|
||||
local transforms = asset.require('scene/solarsystem/planets/earth/transforms')
|
||||
|
||||
local transferFunctions = asset.localResource("transferfunctions")
|
||||
local masVelocityColorTable = transferFunctions .. "/velocity_fieldlines.txt"
|
||||
local masDensityColorTable = transferFunctions .. "/density_fieldlines.txt"
|
||||
|
||||
local fieldlinesDirectory = 'D:/data/bastille_day/mas-filedlines/MAS_BastilleDay_mhd_field_lines/BastilleDay/mhd_field_lines/JSON'
|
||||
|
||||
|
||||
local sunRadius = 6.957E8
|
||||
|
||||
-- Fieldlies from binaries
|
||||
local fieldlines = {
|
||||
Identifier = "MAS_MHD_Fieldlines",
|
||||
Parent = sunTransforms.HNMReferenceFrame.Identifier,
|
||||
-- wrong Parent = sunTransforms.SunIAU.Identifier,
|
||||
Renderable = {
|
||||
Type = "RenderableFieldlinesSequence",
|
||||
SourceFolder = fieldlinesDirectory,
|
||||
-- FlowEnabled = false,
|
||||
-- LineWidth = 1.0;
|
||||
AlphaBlendlingEnabled = false,
|
||||
InputFileType = "json",
|
||||
|
||||
ColorTablePaths = {
|
||||
masDensityColorTable,
|
||||
masVelocityColorTable,
|
||||
},
|
||||
ColorTableMinMax = {
|
||||
{ 0, 1000000 },
|
||||
{ 100, 2000 }
|
||||
},
|
||||
LoadAtRuntime = true,
|
||||
ScaleToMeters = 1.0,
|
||||
SecondsBefore = 24*60*60,
|
||||
SecondsAfter = 24*60*60,
|
||||
SimulationModel = "enlil",
|
||||
Color = {
|
||||
Uniform = {1.0, 0.0, 0.5, 1}
|
||||
}
|
||||
},
|
||||
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}
|
||||
}
|
||||
]]--
|
||||
}
|
||||
}
|
||||
|
||||
assetHelper.registerSceneGraphNodesAndExport(asset, { fieldlines })
|
||||
|
||||
asset.meta = {
|
||||
Name = "Json fieldlines files Bastille Day",
|
||||
Version = "1.0",
|
||||
Description = " Magnetic fieldlines for the bastille day CME event ",
|
||||
Author = "OpenSpace team",
|
||||
URL = "",
|
||||
License = ""
|
||||
}
|
||||
@@ -2,7 +2,7 @@ local TexturesPath = asset.syncedResource({
|
||||
Type = "HttpSynchronization",
|
||||
Name = "Streamnodes textures",
|
||||
Identifier = "streamnodes_legend",
|
||||
Version = 4
|
||||
Version = 1
|
||||
})
|
||||
|
||||
asset.require("spice/base")
|
||||
|
||||
@@ -2,7 +2,7 @@ local TexturesPath = asset.syncedResource({
|
||||
Name = "Bastille Day Magnetogram",
|
||||
Type = "HttpSynchronization",
|
||||
Identifier = "bastille_day_magnetogram",
|
||||
Version = 2
|
||||
Version = 3
|
||||
})
|
||||
|
||||
asset.export("TexturesPath", TexturesPath)
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
set (OPENSPACE_DEPENDENCIES
|
||||
space
|
||||
kameleon
|
||||
)
|
||||
|
||||
@@ -821,7 +821,7 @@ void RenderableFluxNodes::writeCachedFile() const {
|
||||
|
||||
fileStream.write(reinterpret_cast<const char*>(&nValues), sizeof(int32_t));
|
||||
|
||||
for(int i = 0; i < _nStates; ++i){
|
||||
for(unsigned int i = 0; i < _nStates; ++i){
|
||||
fileStream.write(reinterpret_cast<const char*>(_statesPos[i].data()),
|
||||
nValues * sizeof(glm::vec3));
|
||||
fileStream2.write(reinterpret_cast<const char*>(_statesColor[i].data()),
|
||||
@@ -886,7 +886,7 @@ bool RenderableFluxNodes::loadBinaryfilesDirectly(const std::string& energybin)
|
||||
_statesPos.clear();
|
||||
_statesRadius.clear();
|
||||
|
||||
for (int i = 0; i < _nStates; ++i) {
|
||||
for (unsigned int i = 0; i < _nStates; ++i) {
|
||||
_vertexPositions.resize(nNodesPerTimestep);
|
||||
fileStream.read(reinterpret_cast<char*>(
|
||||
_vertexPositions.data()),
|
||||
@@ -895,7 +895,7 @@ bool RenderableFluxNodes::loadBinaryfilesDirectly(const std::string& energybin)
|
||||
_statesPos.push_back(_vertexPositions);
|
||||
_vertexPositions.clear();
|
||||
}
|
||||
for (int i = 0; i < _nStates; ++i) {
|
||||
for (unsigned int i = 0; i < _nStates; ++i) {
|
||||
_vertexColor.resize(nNodesPerTimestep);
|
||||
fileStream2.read(reinterpret_cast<char*>(
|
||||
_vertexColor.data()),
|
||||
@@ -904,7 +904,7 @@ bool RenderableFluxNodes::loadBinaryfilesDirectly(const std::string& energybin)
|
||||
_statesColor.push_back(_vertexColor);
|
||||
_vertexColor.clear();
|
||||
}
|
||||
for (int i = 0; i < _nStates; ++i) {
|
||||
for (unsigned int i = 0; i < _nStates; ++i) {
|
||||
_vertexRadius.resize(nNodesPerTimestep);
|
||||
fileStream3.read(reinterpret_cast<char*>(
|
||||
_vertexRadius.data()),
|
||||
@@ -1271,7 +1271,7 @@ void RenderableFluxNodes::populateStartTimes() {
|
||||
}
|
||||
|
||||
if (timeFile.empty()) {
|
||||
LERROR("Could not find a metadata file with time steps,",
|
||||
LERROR("Could not find a metadata file with time steps,"
|
||||
" such as a csv, dat, txt or no file extention with 'time' in filename");
|
||||
}
|
||||
// time filestream
|
||||
|
||||
Reference in New Issue
Block a user