RenderableFluxNodes

Inherits Renderable

Members

Name

Documentation

Type

Description

Optional

ColorTablePath

Color Table/Transfer Function to use for ‘By Flux Value’ coloring

String

Value of type ‘String’

No

SourceFolder

path to source folder with the 3 binary files in it

Directory

Value of type ‘Directory’

No

ColorTableRange

Valid range for the color table as the exponent, with base 10, of flux values. [Min, Max]

Vector2<double>

Value of type ‘Vector2

Yes

EnergyBin

Select which energy bin you want to show. GOES = Geostationary Operational Environmental Satellites. Emin01 is values > 10 MeV, Default is Emin03 where values > 100 MeV

Integer

Value of type ‘Integer’

Yes

Inherited members from Renderable

Name

Documentation

Type

Description

Optional

DimInAtmosphere

Enables/Disables if the object should be dimmed when the camera is in the sunny part of an atmosphere

Boolean

Value of type ‘Boolean’

Yes

Enabled

This setting determines whether this object will be visible or not

Boolean

Value of type ‘Boolean’

Yes

Opacity

This value determines the opacity of this renderable. A value of 0 means completely transparent

Double

In range: ( 0,1 )

Yes

RenderBinMode

This value specifies if the renderable should be rendered in the Background,Opaque, Pre/PostDeferredTransparency, or Overlay rendering step

String

In list { Background, Opaque, PreDeferredTransparent, PostDeferredTransparent, Overlay }

Yes

Tag

A single tag or a list of tags that this renderable will respond to when setting properties

Table, or String

Value of type ‘Table’, or Value of type ‘String’

Yes

Type

This tells the type of the renderable

String

Value of type ‘String’

Yes

Asset Examples

 1local heliosphereTransforms = asset.require("scene/solarsystem/sun/transforms_heliosphere")
 2local propertyHelper = asset.require("util/property_helper")
 3local rot = asset.require("./carrington_to_heeq_rotation")
 4
 5
 6
 7local fluxNodesBinaries = asset.resource({
 8  Name = "Bastille day Flux nodes binaries",
 9  Type = "HttpSynchronization",
10  Identifier = "bastille_day_streamnodes_binaries",
11  Version = 1
12})
13
14
15-- FluxNodes from binaries
16local Fluxnodes = {
17  Identifier = "MAS-MHD-FluxNodes-bastille-day-2000",
18  Parent = heliosphereTransforms.HEEQ180ReferenceFrame.Identifier,
19  -- TODO Elon: 21 April 2022. Interaction sphere should not depend on the transform scale.
20  -- InteractionSphere = sunAsset.Sun.Renderable.Radii[1] * 1.05,
21  InteractionSphere = 695700000.0,
22  Transform = {
23    Rotation = rot.CarringtonLongitudeToHEEQ180Rotation
24  },
25  Renderable = {
26    Type = "RenderableFluxNodes",
27    SourceFolder = fluxNodesBinaries,
28    ColorTablePath = asset.resource("transferfunctions/CMR.txt"),
29    ColorTableRange = { -2.0, 4.0 }
30  },
31  GUI = {
32    Path = "/Solar System/Heliosphere/Bastille Day 2000",
33    Name = "Flux Nodes",
34    Description = [[Flux nodes for the bastille day CME event. This asset contains data
35      from 2000-07-14 08:38 to 2000-07-14 19:48]]
36  }
37}
38
39local ToggleFluxnodes = {
40  Identifier = "os.bastilleday.fluxnodes.ToggleFluxnodes",
41  Name = "Toggle flux nodes",
42  Command = [[
43    if openspace.propertyValue("Scene.MAS-MHD-FluxNodes-bastille-day-2000.Renderable.Enabled") then
44      openspace.setPropertyValueSingle(
45        "Scene.MAS-MHD-FluxNodes-bastille-day-2000.Renderable.Fade",
46        0.0,
47        openspace.propertyValue("OpenSpaceEngine.FadeDuration"),
48        "Linear",
49        'openspace.setPropertyValueSingle("Scene.MAS-MHD-FluxNodes-bastille-day-2000.Renderable.Enabled", false)'
50      )
51    else
52      openspace.setPropertyValueSingle("Scene.MAS-MHD-FluxNodes-bastille-day-2000.Renderable.Enabled", true)
53      openspace.setPropertyValueSingle(
54        "Scene.MAS-MHD-FluxNodes-bastille-day-2000.Renderable.Fade",
55        1.0,
56        openspace.propertyValue("OpenSpaceEngine.FadeDuration"),
57        "Linear"
58      )
59    end
60  ]],
61  Documentation = "Toggle flux node rendering of CME",
62  GuiPath = "/Bastille-Day 2000",
63  IsLocal = false
64}
65
66
67asset.onInitialize(function()
68  openspace.action.registerAction(ToggleFluxnodes)
69  openspace.addSceneGraphNode(Fluxnodes)
70end)
71
72asset.onDeinitialize(function()
73  openspace.removeSceneGraphNode(Fluxnodes)
74  openspace.action.removeAction(ToggleFluxnodes)
75end)
76
77asset.export(Fluxnodes)
78asset.export("ToggleFluxnodes", ToggleFluxnodes.Identifier)
79
80
81
82asset.meta = {
83  Name = "Predictive Science Inc. Flux nodes Bastille Day",
84  Version = "1.1",
85  Description = "Flux nodes for the bastille day CME event",
86  Author = "CCMC, Christian Adamsson, Emilie Ho",
87  URL = "https://dx.doi.org/10.3847/1538-4357/aab36d",
88  License = "CC-BY"
89}