Generating a Flux Variation File (*.json) using a script
The following procedure helps you use a script that Speos provides you to
generate a flux variation *.json file that will be used to define a flickering Surface source.
The Iron python script is dedicated to give you a start to generate a *.json file. You can
obviously modify the script at will to generate more complex flux variation *.json files.
Click File > Open and select the IronPython_LED_Pulse.py.
Note: If the python file does not appear, select All Files (*.*) in the
extensions list.
The python script appears in the Script Editor.
In the Script Editor ribbon, click Run Script .
The script pauses at line 14. In the Options - Selection panel, you
can see that five inputs appeared. These inputs have been generated out of the script from the lines 8 to
12. The rest of the script is dedicated to
the generation of the data according to the inputs that you
will define
the writing and the saving of the data in the *.json file to be created
In the Options - Selection panel, define values to input:
Time Duration (s) corresponds to total duration of the modulation
sequence (X periods)
Time Duration is useful particularly when you want to define periods that are different. This
will need you to modify the script if you want to consider variable periods.
Frequence (Hz) corresponds to the periods according to the Time
Duration.
Modulation Index is a ratio corresponds to the maximum value of the signal.
Output Path corresponds to the filepath in which you will generate
the *.json
File Name
In the 3D view, click Validate
.
The *.json file has been generated in the specified location according to the inputs you defined.