local speck = asset.syncedResource({
  Name = "Galah Speck Files",
  Type = "HttpSynchronization",
  Identifier = "gaia_galah",
  Version = 1
})

local colormaps = asset.syncedResource({
  Name = "Stars Color Table",
  Type = "HttpSynchronization",
  Identifier = "stars_colormap",
  Version = 3
})

local textures = asset.syncedResource({
  Name = "Stars Textures",
  Type = "HttpSynchronization",
  Identifier = "stars_textures",
  Version = 1
})


local GaiaAbundanceGalah = {
  Identifier = "GaiaAbundanceGalah",
  Renderable = {
    Type = "RenderableStars",
    Enabled = false,
    File = speck .. "GaiaAbundGalah.speck",
    Texture = textures .. "halo.png",
    -- ShapeTexture = textures .. "disc.png",
    MagnitudeExponent = 7.25,
    SizeComposition = "Distance Modulus",
    RenderMethod = "Texture Based",
    ColorOption = "Other Data",
    OtherData = "FeH",
    ColorMap = colormaps .. "colorbv.cmap",
    OtherDataColorMap = colormaps .. "rainbowgradient.cmap",
    ColorRange = { { -0.8, 0.6 } },
    StaticFilter = -9999,
    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",
    Name = "Gaia Abundance Galah",
    Description = "Data set of stars color coded by metallicity"
  }
}


asset.onInitialize(function()
  openspace.addSceneGraphNode(GaiaAbundanceGalah)
end)

asset.onDeinitialize(function()
  openspace.removeSceneGraphNode(GaiaAbundanceGalah)
end)

asset.export(GaiaAbundanceGalah)



asset.meta = {
  Name = "Gaia Abundance Galah",
  Version = "1.0",
  Description = "This asset contains a RenderableStars dataset with metallicity data",
  Author = "OpenSpace Team",
  URL = "http://openspaceproject.com",
  License = "MIT License"
}
