scripts.example_script

EXAMPLE SCRIPT.

Example demonstrating how to call code API as an executable script.

Examples

To see the available arguments run:

bash
example_script.py -h

For example, to calculate the luminosity of the Sun:

bash
example_script.py --radius 7e8 --eff_temp 5800
get_args()[source]

Get Script Arguments.

Returns

Command line arguments

Return type

argparse.Namespace

call_hello()[source]

Call Hello World.

This function calls the hello_world function and prints the output.

See also

pyraliddemo.example.hello.hello_world

Implementation of the hello_world function.

call_stefboltz(radius: float, eff_temp: float)[source]

Call StefBoltz.

This function calls the StefBoltz class and prints the luminosity corresponding to the radius and effective temperature provided.

Parameters
  • radius (float) – Stellar radius

  • eff_temp (float) – Effective temperature

See also

pyraliddemo.example.classes.StefBoltz

Implementation of the StefBoltz class.

run_steps()[source]

Call Script Steps.

This is the main method called by the script. It runs the various steps involved.