pyg4ometry.geant4.solid.OpticalSurface

Classes

Module Contents

class pyg4ometry.geant4.solid.OpticalSurface.OpticalSurface(name, finish, model, surf_type, value, registry, addRegistry=True)

Bases: pyg4ometry.geant4.solid.SolidBase.SolidBase

allowed_models = ['glisur', 'unified', 'LUT', 'DAVIS', 'dichroic']
allowed_types = ['dielectric_metal', 'dielectric_dielectric', 'dielectric_LUT', 'dielectric_LUTDAVIS',...
allowed_finishes = ['polished', 'polishedfrontpainted', 'polishedbackpainted', 'ground', 'groundfrontpainted',...
finish
model
osType
value
properties
__repr__()
__str__()
addProperty(name, matrix)

Add a property to this surface from a matrix.

Parameters:
  • name (str) – key of the surface property

  • matrix (Matrix) – matrix defining the value(s) of the property

addVecProperty(name, e, v, eunit='eV', vunit='')

Add a property from an energy and a value vector to this object.

Parameters:
  • name (str) – key of property

  • e (list or numpy.array - shape (1,)) – energy list/vector in units of eunit

  • v (list or numpy.array - shape (1,)) – value list/vector in units of vunit

  • eunit (str) – unit for the energy vector (default: eV)

  • vunit (str) – unit for the value vector (default: unitless)

addConstProperty(name, value, vunit='')

Add a constant scalar property to this object.

Parameters:
  • name (str) – key of property

  • value (str,float,int) – constant value for this property

  • vunit (str) – unit for the value vector (default: unitless)