mcstasscript.helper.mcstas_objects.provide_parameter

mcstasscript.helper.mcstas_objects.provide_parameter

mcstasscript.helper.mcstas_objects.provide_parameter(*args, **kwargs)

Makes a libpyvinyl parameter object

Examples

Creates a parameter with name wavelength and associated comment A = provide_parameter(“wavelength”, comment=”wavelength in [AA]”)

Creates a parameter with name A3 and default value A = provide_parameter(“A3”, value=30, comment=”A3 angle in [deg]”)

Creates a parameter with type string and name sample_name A = provide_parameter(“string”, “sample_name”)

Parameters
  • type (If not giving) –

  • 1 (Positional argument) – Type of the parameter, double, int or string

  • 2 (Positional argument) – Name of input parameter

  • type

  • 1 – Name of input parameter

  • arguments (Keyword) –

    valuefloat, int or str

    sets default value of parameter

    unitstr

    string that describes the unit

    commentstr

    sets comment displayed next to declaration

    optionslist or value

    list or value of allowed values for this parameter