Feature/gaia mission merge (#766)

* Add Adam Aslegård's module that renders Gaia mission stars
 * Add module for Gaia mission
 * Add CCfits and cfitsio submodules and the implemented fitsfilereader module from the OpenSpace-sun-earth-event branch
 * Add a TaskRunner to read from a fits file
This commit is contained in:
Emil Axelsson
2018-11-21 00:19:08 +01:00
committed by Alexander Bock
parent 4b696b2463
commit 0d2935c43b
71 changed files with 10150 additions and 19 deletions
+39
View File
@@ -0,0 +1,39 @@
local assetHelper = asset.require('util/asset_helper')
asset.require('default')
-- Augment default scene with gaia data, 3D model and trail
asset.require('scene/milkyway/gaia/gaiastars')
asset.require('scene/milkyway/gaia/apogee')
asset.require('scene/milkyway/gaia/galah')
asset.require('scene/solarsystem/missions/gaia/gaia')
asset.require('scene/solarsystem/missions/gaia/trail')
assetHelper.registerDashboardItems(asset, {
{
Type = "DashboardItemDistance",
Identifier = "GaiaEarthDistance",
GuiName = "Gaia Earth Distance",
SourceType = "Node",
SourceNodeName = "Gaia",
DestinationType = "Node Surface",
DestinationNodeName = "Earth"
}
})
asset.onInitialize(function ()
openspace.setPropertyValueSingle('Scene.Stars.Renderable.Enabled', false);
openspace.markInterestingNodes({ "Gaia" })
openspace.navigation.setCameraState({
Focus = "Gaia",
Position = { 1000000000000.0, 1000000000000.0, 1000000000000.0 },
Rotation = { 0.683224, -0.765934, -0.601234, -0.418073 },
})
end)
-- Remove interesting nodes and added virtual properties
asset.onDeinitialize(function ()
openspace.removeInterestingNodes({ "Gaia" })
end)
@@ -0,0 +1,19 @@
-- Download a dataset of 618 million stars (28 GB), already preprocessed and stored in a binary octree.
-- The octree was generated from the full DR2 by filtering away all stars with a parallax error higher than 0.5
-- Max Star Per Node = 50,000 and max distance = 500kpc
asset.syncedResource({
Name = "Gaia DR2 618M Octree",
Type = "HttpSynchronization",
Identifier = "gaia_stars_618M_octree",
Version = 1
})
-- Download the full DR2 dataset with 24 values per star (preprocessed with theReadFitsTask (gaia_read.task) into 8 binary files).
-- From these files new subsets can be created with the ConstructOctreeTask (gaia_octree.task).
-- Total size of download is 151 GB.
asset.syncedResource({
Name = "Gaia DR2 Full Raw",
Type = "HttpSynchronization",
Identifier = "gaia_stars_dr2_raw",
Version = 1
})
@@ -0,0 +1,60 @@
local assetHelper = asset.require("util/asset_helper")
local textures = asset.syncedResource({
Name = "Stars Textures",
Type = "HttpSynchronization",
Identifier = "stars_textures",
Version = 1
})
local colorLUT = asset.syncedResource({
Name = "Stars Color Table",
Type = "HttpSynchronization",
Identifier = "stars_colormap",
Version = 1
})
-- Download a preprocessed binary octree of Radial Velocity subset values per star (preprocessed into 8 binary files).
local starsFolder = asset.syncedResource({
Name = "Gaia Stars RV",
Type = "HttpSynchronization",
Identifier = "gaia_stars_rv_octree",
Version = 1
})
local GaiaStars = {
Identifier = "GaiaStars",
Renderable = {
Type = "RenderableGaiaStars",
File = starsFolder .. "/",
FileReaderOption = "StreamOctree",
RenderOption = "Motion",
ShaderOption = "Point_SSBO",
Texture = textures .. "/halo.png",
ColorMap = colorLUT .. "/colorbv.cmap",
LuminosityMultiplier = 35,
MagnitudeBoost = 25,
CutOffThreshold = 38,
BillboardSize = 1,
CloseUpBoostDist = 250,
Sharpness = 1.45,
LodPixelThreshold = 0,
MaxGpuMemoryPercent = 0.24,
MaxCpuMemoryPercent = 0.4,
FilterSize = 5,
Sigma = 0.5,
AdditionalNodes = {3.0, 2.0},
FilterPosX = {0.0, 0.0},
FilterPosY = {0.0, 0.0},
FilterPosZ = {0.0, 0.0},
FilterGMag = {20.0, 20.0},
FilterBpRp = {0.0, 0.0},
FilterDist = {9.0, 9.0},
},
GUI = {
Name = "Gaia Stars",
Path = "/Milky Way"
}
}
assetHelper.registerSceneGraphNodesAndExport(asset, { GaiaStars })
@@ -0,0 +1,67 @@
local assetHelper = asset.require('util/asset_helper')
local transforms = asset.require('./transforms')
local sunTransforms = asset.require('scene/solarsystem/sun/transforms')
local textures = asset.syncedResource({
Name = "Gaia Textures",
Type = "HttpSynchronization",
Identifier = "gaia_textures",
Version = 1
})
local model = asset.syncedResource({
Name = "Gaia Model",
Type = "HttpSynchronization",
Identifier = "gaia_model",
Version = 1
})
local Gaia = {
Identifier = "Gaia",
Parent = transforms.GaiaPosition.Identifier,
Transform = {
Rotation = {
Type = "FixedRotation",
Attached = "Gaia",
XAxis = { 1.0, 0.0, 0.0 },
XAxisOrthogonal = true,
YAxis = "Sun",
YAxisInverted = true
},
Scale = {
Type = "StaticScale",
Scale = 10.0
}
},
-- X Orthogonal
Renderable = {
Type = "RenderableModel",
Body = "GAIA",
Geometry = {
Type = "MultiModelGeometry",
GeometryFile = model .. "/gaia.obj"
},
ColorTexture = textures .. "/gaia-baked.png",
LightSources = {
{
Type = "SceneGraphLightSource",
Identifier = "Sun",
Node = sunTransforms.SolarSystemBarycenter.Identifier,
Intensity = 0.3
},
{
Identifier = "Camera",
Type = "CameraLightSource",
Intensity = 0.4
}
}
},
GUI = {
Name = "Gaia",
Path = "/Solar System/Missions/Gaia"
}
}
assetHelper.registerSceneGraphNodesAndExport(asset, { Gaia })
@@ -0,0 +1,64 @@
local assetHelper = asset.require('util/asset_helper')
local earthTransforms = asset.require('scene/solarsystem/planets/earth/transforms')
local sunTransforms = asset.require('scene/solarsystem/sun/transforms')
local trail = asset.syncedResource({
Name = "Gaia Trail",
Type = "HttpSynchronization",
Identifier = "gaia_trail",
Version = 2
})
local GaiaTrail = {
Identifier = "GaiaTrail",
Parent = earthTransforms.EarthBarycenter.Identifier,
Renderable = {
Type = "RenderableTrailTrajectory",
Enabled = false,
Translation = {
Type = "HorizonsTranslation",
HorizonsTextFile = trail .. "/gaia_orbit_horizons.dat"
},
Color = { 0.0, 0.8, 0.7 },
ShowFullTrail = false,
StartTime = "2013 DEC 19 09:55:10",
EndTime = "2019 JUN 20 05:55:10",
PointSize = 5,
SampleInterval = 12000,
TimeStampSubsampleFactor = 1,
EnableFade = false,
Rendering = "Lines"
},
GUI = {
Name = "Gaia Trail",
Path = "/Solar System/Missions/Gaia"
}
}
local GaiaTrailEclip = {
Identifier = "GaiaTrail_Eclip",
Parent = sunTransforms.SolarSystemBarycenter.Identifier,
Renderable = {
Type = "RenderableTrailTrajectory",
Enabled = false,
Translation = {
Type = "HorizonsTranslation",
HorizonsTextFile = trail .. "/gaia_orbit_horizons_sun.dat"
},
Color = { 1.0, 0.0, 0.0 },
ShowFullTrail = false,
StartTime = "2013 DEC 19 09:55:10",
EndTime = "2019 JUN 20 05:55:10",
PointSize = 5,
SampleInterval = 6000,
TimeStampSubsampleFactor = 1,
EnableFade = false,
Rendering = "Lines"
},
GUI = {
Name = "Gaia Ecliptic Trail",
Path = "/Solar System/Missions/Gaia"
}
}
assetHelper.registerSceneGraphNodesAndExport(asset, { GaiaTrail, GaiaTrailEclip } )
@@ -0,0 +1,27 @@
local assetHelper = asset.require('util/asset_helper')
local earthTransforms = asset.require('scene/solarsystem/planets/earth/transforms')
local trail = asset.syncedResource({
Name = "Gaia Trail",
Type = "HttpSynchronization",
Identifier = "gaia_trail",
Version = 1
})
local GaiaPosition = {
Identifier = "GaiaPosition",
Parent = earthTransforms.EarthBarycenter.Identifier,
Transform = {
Translation = {
Type = "HorizonsTranslation",
HorizonsTextFile = trail .. "/gaia_orbit_horizons.dat"
},
},
GUI = {
Name = "Position",
Path = "/Solar System/Missions/Gaia"
}
}
assetHelper.registerSceneGraphNodesAndExport(asset, { GaiaPosition })
+6
View File
@@ -0,0 +1,6 @@
return {
{
Type = "SyncAssetTask",
Asset = "scene/milkyway/gaia/gaia_dr2_download_stars"
}
}
+45
View File
@@ -0,0 +1,45 @@
local dataFolder = "E:/gaia_sync_data"
return {
{
Type = "ConstructOctreeTask",
InFileOrFolderPath = dataFolder .. "/Gaia_DR2_full_24columns/",
OutFileOrFolderPath = dataFolder .. "/DR2_full_Octree_test_50,50/",
MaxDist = 500,
MaxStarsPerNode = 50000,
SingleFileInput = false,
-- Specify filter thresholds
--FilterPosX = {0.0, 0.0},
--FilterPosY = {0.0, 0.0},
--FilterPosZ = {0.0, 0.0},
FilterGMag = {20.0, 20.0},
FilterBpRp = {0.0, 0.0},
--FilterVelX = {0.0, 0.0},
--FilterVelY = {0.0, 0.0},
--FilterVelZ = {0.0, 0.0},
--FilterBpMag = {20.0, 20.0},
--FilterRpMag = {20.0, 20.0},
--FilterBpG = {0.0, 0.0},
--FilterGRp = {0.0, 0.0},
--FilterRa = {0.0, 0.0},
--FilterRaError = {0.0, 0.0},
--FilterDec = {0.0, 0.0},
--FilterDecError = {0.0, 0.0},
FilterParallax = {0.01, 0.0},
FilterParallaxError = {0.00001, 0.5},
--FilterPmra = {0.0, 0.0},
--FilterPmraError = {0.0, 0.0},
--FilterPmdec = {0.0, 0.0},
--FilterPmdecError = {0.0, 0.0},
--FilterRv = {0.0, 0.0},
--FilterRvError = {0.0, 0.0},
},
-- {
-- Type = "ConstructOctreeTask",
-- InFileOrFolderPath = dataFolder .. "/AMNH/Binary/GaiaUMS.bin",
-- OutFileOrFolderPath = dataFolder .. "/AMNH/Octree/GaiaUMS_Octree.bin",
-- MaxDist = 10,
-- MaxStarsPerNode = 20000,
-- SingleFileInput = true,
-- },
}
+16
View File
@@ -0,0 +1,16 @@
local dataFolder = "E:/gaia_sync_data"
return {
{
Type = "ReadFitsTask",
InFileOrFolderPath = "L:/Gaia_DR2/gaia_source/fits/",
OutFileOrFolderPath = dataFolder .. "/Gaia_DR2_full_24columns/",
SingleFileProcess = false,
ThreadsToUse = 8,
},
--{
-- Type = "ReadSpeckTask",
-- InFilePath = dataFolder .. "/AMNH/GaiaUMS/GaiaUMS.speck",
-- OutFilePath = dataFolder .. "/AMNH/Binary/GaiaUMS.bin",
--},
}