pyOptiShared.SimResults.NXdata

class pyOptiShared.SimResults.NXdata

Bases: object

A class that supports the Nexus format for data and metada storage/handling.

Methods

Get(field)

Returns a numpy array of the particular signal, (signal, auxiliary_signal or axis).

GetAllData()

Return all the NXdata data as a dictionary.

GetDataNames()

Returns a list containing the names of the avilable signals.

Plot([master, external_figures])

This method create a TKinter app for displaying the NXdata data.

PrintDataNames()

Print a list with available signal names.

Get(field: str) ndarray | None

Returns a numpy array of the particular signal, (signal, auxiliary_signal or axis).

Parameters:

field (str) – The string of the signal name.

Returns:

An nd.array with the value for the signal.

False, if the signal is not present.

Return type:

np.ndarray or False

GetAllData() dict[str, ndarray | str]

Return all the NXdata data as a dictionary.

Returns:

A dictionary with all the NXdata data.

Return type:

dict[str,np.ndarray|str]

GetDataNames() list[str]

Returns a list containing the names of the avilable signals.

Returns:

A list of strings.

Return type:

list[str]

Plot(master=None, external_figures=None)

This method create a TKinter app for displaying the NXdata data. It include interative widgets for controling sweep variables like frequency, mode numbers, and even selecting plot settings. If run is False and master is not a valid tk.widget instance it throws an error.

Parameters:

master (tk.Widget, optional) – Master widget/frame to insert the CustomDataViewer.

Returns:

None if master is None. Otherwise, returns a tk.Frame() with the CustomDataViewer instance.

Return type:

None|CustomDataViewer

PrintDataNames()

Print a list with available signal names.