syned.beamline.shape.NumericalMesh

class syned.beamline.shape.NumericalMesh(xx=None, yy=None, zz=None, surface_data_file=None)[source]

Implements an optical surface from a numerical mesh.

Constructor.

Parameters:
  • xx (numpy array, optional) – The x vector.

  • yy (numpy array, optional) – The y vector.

  • zz (numpy array, optional) – The z (2D) array.

  • surface_data_file (str, optional) – a file name from where the dara may come.

Notes

This is exactly the same as OasysSurfaceData class OasysSurfaceData(object), with added methods.

__init__(xx=None, yy=None, zz=None, surface_data_file=None)[source]

Methods

__init__([xx, yy, zz, surface_data_file])

duplicate()

Returns a copy of the SYNED object instance.

from_hex_tring(hex_string)

get_convexity()

Gets the convexity flag.

get_value_from_key_name(key)

Gets a value using its key value.

has_surface_data()

Returns True is data is loaded.

has_surface_data_file()

Returns True is data file is set.

info()

Get text info of recurrent SYNED objects.

info_recurrent(fd[, prefix])

Get text info of recurrent SYNED objects.

keys()

Returns the keys of the supporting doctionary.

set_value_from_key_name(key, value)

Sets a value using its key value.

to_dictionary()

Returns a dictionary with the object fields.

to_full_dictionary()

Returns a dictionary with the object fields, including other syned objects embedded or list of elements.

to_hex_tring()

to_json([file_name])

Writes a json file with the SYNED object data.