core

Package Contents

Classes

Functions

Attributes

_workspace_path
class text_format[source]
software_version()[source]
find_and_replace(begin_char, end_char, theStr, replace_function)[source]
create_unique_dirname(dirname)[source]

Create dirname if it doesn’t exists, otherwise append an integer to dirname and create it.

Parameters:dirname – name of the directory to create
Returns:name of the directory created
applyEquation(objectIn, s)[source]

Apply literal expression based on an object

Parameters:
  • objectIn – Object
  • s – literal expression. Float variables taken from the object are written between {}, int between []. Example: s=”{x}+{y}*2” if x and y are attributes of objectIn.
Returns:

value (float)

arithmeticEval(s)[source]
isNonePrintMessage(theObject, theMessage, show_type=SHOW_INFO)[source]
getPath_workspace()[source]

Get workspace path (i.e., location where optimeed files will be created). Create directory if doesn’t exist.

setPath_workspace(thePath)[source]

Set workspace path (i.e., location where optimeed files will be created)

getLineInfo(lvl=1)[source]
printIfShown(theStr, show_type=SHOW_DEBUG, isToPrint=True, appendTypeName=True, end='n')[source]
universalPath(thePath)[source]
add_suffix_to_path(thePath, suffix)[source]
get_object_attrs(obj)[source]
rsetattr(obj, attr, val)[source]

setattr, but recursively. Works with list (i.e. theObj.myList[0].var_x)

rgetattr(obj, attr)[source]

getattr, but recursively. Works with list.

indentParagraph(text_in, indent_level=1)[source]

Add ‘ ‘ at beginning of strings and after each ‘ ‘.

truncate(theStr, truncsize)[source]
get_recursive_attrs(theObject, max_recursion_level=2)[source]
str_all_attr(theObject, max_recursion_level)[source]
get_2D_pareto(xList, yList, max_X=True, max_Y=True)[source]

Get 2D pareto front

Parameters:
  • xList – list of x coordinates
  • yList – list of y coordinates
  • max_X – True if x is to maximize
  • max_Y – true if y is to maximize
Returns:

x pareto-optimal coordinates, y pareto-optimal coordinates, indices of these points in input parameters

get_ND_pareto(objectives_list, are_maxobjectives_list=None)[source]

Return the N-D pareto front

Parameters:
  • objectives_list – list of list of objectives: example [[0,1], [1,1], [2,2]]
  • are_maxobjectives_list – for each objective, tells if they are to be maximized or not: example [True, False]. Default: False
Returns:

extracted_pareto, indices: list of [x, y, …] points forming the pareto front, and list of the indices of these points from the base list.

delete_indices_from_list(indices, theList)[source]

Delete elements from list at indices

Parameters:
  • indices – list
  • theList – list
merge_two_dicts(dict1, dict2)[source]

Merge two dicts without affecting them

Returns:new dictionary
deep_sizeof(obj)[source]
order_lists(ref_list, linked_list)[source]
SHOW_CURRENT
setCurrentShow(show_types)[source]

Change text type to be displayed by PrintIfShown

getCurrentShow()[source]

Get text type to be displayed by PrintIfShown

disableLogs()[source]

Disable all logs

enableLogs()[source]

Show all logs

SHOW_CURRENT
setCurrentShow(show_types)[source]

Change text type to be displayed by PrintIfShown

getCurrentShow()[source]

Get text type to be displayed by PrintIfShown

disableLogs()[source]

Disable all logs

enableLogs()[source]

Show all logs

getPath_workspace()[source]

Get workspace path (i.e., location where optimeed files will be created). Create directory if doesn’t exist.

obj_to_json(theObj)[source]

Extract the json dictionary from the object. The data saved are automatically detected, using typehints. ex: x: int=5 will be saved, x=5 won’t. Inheritance of annotation is managed by this function

json_to_obj(json_dict)[source]

Convenience class to create object from dictionary. Only works if CLASS_TAG is valid

Parameters:

json_dict – dictionary loaded from a json file.

Raises:
  • TypeError – if class can not be found
  • KeyError – if CLASS_TAG not present in dictionary
json_to_obj_safe(json_dict, cls)[source]

Safe class to create object from dictionary.

Parameters:
  • json_dict – dictionary loaded from a json file
  • cls – class object to instantiate with dictionary
encode_str_json(theStr)[source]
decode_str_json(theStr)[source]
get_json_module_tree_from_dict(jsonDict)[source]

Return dict containing {CLASS_TAG: “class_name”, MODULE_TAG: “module_name”, “attribute1”:{“class_name”: “module_name”, …}}

remove_module_tree_from_string(theStr)[source]

Used to compress string by removing __module__ and __class__ entries (used with get_json_module_tree_from_dict)

apply_module_tree_to_dict(nestedTree, nestedObject, raiseError=False)[source]

Restore __module__ and __class__ entries from nestedTree in nestedDict

indentParagraph(text_in, indent_level=1)[source]

Add ‘ ‘ at beginning of strings and after each ‘ ‘.

rgetattr(obj, attr)[source]

getattr, but recursively. Works with list.

printIfShown(theStr, show_type=SHOW_DEBUG, isToPrint=True, appendTypeName=True, end='n')[source]
delete_indices_from_list(indices, theList)[source]

Delete elements from list at indices

Parameters:
  • indices – list
  • theList – list
class SingleObjectSaveLoad[source]
class DataStruct_Interface[source]
__str__()[source]

Return str(self).

class ListDataStruct_Interface[source]

Bases: DataStruct_Interface

get_list_attributes(attributeName)[source]

Get the value of attributeName of all the data in the Collection

Parameters:attributeName – string (name of the attribute to get)
Returns:list
class AutosaveStruct(dataStruct, filename='', change_filename_if_exists=True)[source]

Structure that provides automated save of DataStructures

__str__()[source]

Return str(self).

get_filename()[source]

Get set filename

set_filename(filename, change_filename_if_exists)[source]
Parameters:
  • filename – Filename to set
  • change_filename_if_exists – If already exists, create a new filename
stop_autosave()[source]

Stop autosave

start_autosave(timer_autosave, safe_save=True)[source]

Start autosave

save(safe_save=True)[source]

Save

get_datastruct()[source]

Return :class:’~DataStruct_Interface’

__getstate__()[source]
__setstate__(state)[source]
class ListDataStruct(compress_save=False)[source]

Bases: ListDataStruct_Interface

__len__()[source]
get_length()[source]
clone(filename)[source]

Clone the datastructure to a new location

save(filename)[source]

Save data using json format. The data to be saved are automatically detected, see obj_to_json()

extract_collection_from_indices(indices)[source]

Extract data from the collection at specific indices, and return it as new collection

_format_str_save()[source]

Save data using json format. The data to be saved are automatically detected, see obj_to_json()

_format_data_lines()[source]
_get_json_module_tree()[source]
add_data(data_in)[source]

Add a data to the list

get_data()[source]

Get full list of datas

get_data_generator()[source]

Get a generator to all the data stored

get_data_at_index(index)[source]
set_data(theData)[source]

Set full list of datas

set_data_at_index(data_in, index)[source]

Replace data at specific index

extract_collection_from_attribute(attributeName)[source]

Convenience class to create a sub-collection from an attribute of all the items.

Parameters:attributeName – Name of the attribute to extract
Returns:ListDataStruct
reset_data()[source]
delete_points_at_indices(indices)[source]

Delete several elements from the Collection

Parameters:indices – list of indices to delete
merge(collection)[source]

Merge a collection with the current collection

Parameters:collectionCollection to merge
get_nbr_elements()[source]
Returns:the number of elements contained inside the structure
theLock
class Performance_ListDataStruct(stack_size=500)[source]

Bases: ListDataStruct_Interface

_initialize(filename)[source]
_get_list_from_file(filenumber)[source]
extract_collection_from_indices(indices)[source]

Extract data from the collection at specific indices, and return it as new collection

clone(filename)[source]

Clone the datastructure to a new location

_get_str_mainfile()[source]
get_total_nbr_elements(count_unsaved=True)[source]
add_data(theData)[source]

Add data to the collection

add_json_data(theStr)[source]

Add already deserialized data to the collection

_save_moduletree(theDict)[source]
_map_index_to_file(index)[source]
_get_json_str_at_index(index, refresh_cache=False)[source]

Internal method to return the json string at index

get_attribute_value_at_index_fast(attribute, index)[source]

Experimental method to extract the value of an attribute without converting the string to an object. It is based on regex search, and will fail if the element is the last in string.

Parameters:
  • attribute – attribute to search
  • index – index of the element in collection
Returns:

reorder(permutations)[source]

Reorder collection accordingly to permutations. E.G, permutations [0,2,1] with collection elems [0,3,2] => collection elems = [0,2,3] :param permutations: :return: /

get_data_at_index(index, ignore_attributes=None, none_if_error=False)[source]

Same as parent, with additional kwargs

Parameters:
  • index
  • ignore_attributes – ignore attributes to deserialize (list)
  • none_if_error
Returns:

save(filename)[source]

Save the datastructure to filename

get_data_generator(**kwargs)[source]
get_nbr_elements()[source]
Returns:the number of elements contained inside the structure
set_data_at_index(data_in, index)[source]

Replace data at specific index

set_data_at_indices(data_list, indices)[source]

Replace datas at specific indices :param data_list: list of objects to set to the collection, at specific indices :param indices: list of indices :return:

delete_points_at_indices(indices)[source]

Delete several elements from the Collection

Parameters:indices – list of indices to delete
default_palette(N)[source]
blackOnly(N)[source]
dark2(N)[source]
printIfShown(theStr, show_type=SHOW_DEBUG, isToPrint=True, appendTypeName=True, end='n')[source]
convert_color_with_alpha(color, alpha=255)[source]

Same as meth:convert_color but with transparency

class Data(x: list, y: list, x_label='', y_label='', legend='', is_scattered=False, transfo_x=lambda selfData, x: x, transfo_y=lambda selfData, y: y, xlim=None, ylim=None, permutations=None, sort_output=False, color=None, alpha=255, symbol='o', symbolsize=8, fillsymbol=True, outlinesymbol=1.8, linestyle='-', width=2, meta=None)[source]

This class is used to store informations necessary to plot a 2D graph. It has to be combined with a gui to be useful (ex. pyqtgraph)

set_kwargs(kwargs)[source]

Set a kwarg after creation of the class

set_data(x: list, y: list)[source]

Overwrites current datapoints with new set

set_meta(meta)[source]

Set associated ‘Z’ data

get_x()[source]

Get x coordinates of datapoints

get_symbolsize()[source]

Get size of the symbols

symbol_isfilled()[source]

Check if symbols has to be filled or not

get_symbolOutline()[source]

Get color factor of outline of symbols

get_length_data()[source]

Get number of points

get_xlim()[source]

Get x limits of viewbox

get_ylim()[source]

Get y limits of viewbox

get_y()[source]

Get y coordinates of datapoints

get_meta()[source]

Get associated ‘Z’ data

get_color()[source]

Get color of the line, without transformation

get_color_alpha()[source]

Get color of the line. Return r, g, b in 0, 255 scale

get_alpha()[source]

Get opacity

get_width()[source]

Get width of the line

get_number_of_points()[source]

Get number of points

get_plot_data()[source]

Call this method to get the x and y coordinates of the points that have to be displayed. => After transformation, and after permutations.

Returns:x (list), y (list)
get_plot_meta(x, y)[source]

Call this method to get the z coordinates of the points that been displayed. => After transformation, and after permutations.

Returns:z (list)
get_permutations(x=None)[source]

Return the transformation ‘permutation’: xplot[i] = xdata[permutation[i]]

get_invert_permutations()[source]

Return the inverse of permutations: xdata[i] = xplot[revert[i]]

get_dataIndex_from_graphIndex(index_graph_point)[source]

From an index given in graph, recovers the index of the data.

Parameters:index_graph_point – Index in the graph
Returns:index of the data
get_dataIndices_from_graphIndices(index_graph_point_list)[source]

Same as get_dataIndex_from_graphIndex but with a list in entry. Can (?) improve performances for huge dataset.

Parameters:index_graph_point_list – List of Index in the graph
Returns:List of index of the data
get_graphIndex_from_dataIndex(index_data)[source]

From an index given in the data, recovers the index of the graph.

Parameters:index_data – Index in the data
Returns:index of the graph
get_graphIndices_from_dataIndices(index_data_list)[source]

Same as get_graphIndex_from_dataIndex but with a list in entry. Can (?) improve performances for huge dataset.

Parameters:index_data_list – List of Index in the data
Returns:List of index of the graph
set_permutations(permutations)[source]

Set permutations between datapoints of the trace

Parameters:permutations – list of indices to plot (example: [0, 2, 1] means that the first point will be plotted, then the third, then the second one)
get_x_label()[source]

Get x label of the trace

get_y_label()[source]

Get y label of the trace

get_legend()[source]

Get name of the trace

get_symbol()[source]

Get symbol

add_point(x, y)[source]

Add point(s) to trace (inputs can be list or numeral)

delete_point(index_point)[source]

Delete a point from the datapoints

isScattered()[source]

Check if plot is scatteded

set_indices_points_to_plot(indices)[source]

Set indices points to plot

get_indices_points_to_plot()[source]

Get indices points to plot

get_linestyle()[source]

Get linestyle

__str__()[source]

Return str(self).

export_str()[source]

Method to save the points constituting the trace

set_color(theColor)[source]

Set trace color

set_legend(theLegend)[source]

Set legend

class Graph[source]

Simple graph container that contains several traces

add_trace(data)[source]

Add a trace to the graph

Parameters:dataData
Returns:id of the created trace
remove_trace(idTrace)[source]

Delete a trace from the graph

Parameters:idTrace – id of the trace to delete
get_trace(idTrace) → Data[source]

Get data object of idTrace

Parameters:idTrace – id of the trace to get
Returns:Data
get_all_traces()[source]

Get all the traces id of the graph

get_all_traces_ids()[source]

Get all the traces id of the graph :return: list of id graphs

export_str()[source]
class Graphs[source]

Contains several Graph

updateChildren()[source]
add_trace_firstGraph(data, updateChildren=True)[source]

Same as add_trace, but only if graphs has only one id :param data: :param updateChildren: :return:

add_trace(idGraph, data, updateChildren=True)[source]

Add a trace to the graph

Parameters:
  • idGraph – id of the graph
  • dataData
  • updateChildren – Automatically calls callback functions
Returns:

id of the created trace

remove_trace(idGraph, idTrace, updateChildren=True)[source]

Remove the trace from the graph

Parameters:
  • idGraph – id of the graph
  • idTrace – id of the trace to remove
  • updateChildren – Automatically calls callback functions
get_first_graph()[source]

Get id of the first graph

Returns:id of the first graph
get_graph(idGraph)[source]

Get graph object at idgraph

Parameters:idGraph – id of the graph to get
Returns:Graph
get_all_graphs_ids()[source]

Get all ids of the graphs

Returns:list of id graphs
get_all_graphs()[source]

Get all graphs. Return dict {id: Graph}

add_graph(updateChildren=True)[source]

Add a new graph

Returns:id of the created graph
remove_graph(idGraph)[source]

Delete a graph

Parameters:idGraph – id of the graph to delete
add_update_method(childObject)[source]

Add a callback each time a graph is modified.

Parameters:childObject – method without arguments
export_str()[source]

Export all the graphs in text

Returns:str
merge(otherGraphs)[source]
reset()[source]
is_empty()[source]
class Plot3D_Generic(x_label='', y_label='', z_label='', legend='', x_lim=None, y_lim=None, z_lim=None)[source]
get_lim(axis)[source]
get_label(axis)[source]
get_legend()[source]
class GridPlot_Generic(X, Y, Z, **kwargs)[source]

Bases: Plot3D_Generic

get_plot_data()[source]
class ContourPlot(*args, **kwargs)[source]

Bases: GridPlot_Generic

get_levels()[source]
get_number_of_contours()[source]
class FilledContourPlot(*args, **kwargs)[source]

Bases: ContourPlot

class SurfPlot(X, Y, Z, **kwargs)[source]

Bases: GridPlot_Generic

class MeshPlot(X, Y, Z, **kwargs)[source]

Bases: GridPlot_Generic

class ScatterPlot3(x, y, z, **kwargs)[source]

Bases: Plot3D_Generic

get_plot_data()[source]
get_color()[source]
convert_to_gridplot(x, y, z, x_interval=None, y_interval=None, n_x=20, n_y=20)[source]

Convert set of points x, y, z to a grid

Parameters:
  • x
  • y
  • z
  • x_interval – [Min, max] of the grid. If none, use min and max values
  • y_interval – [Min, max] of the grid. If none, use min and max values
  • n_x – number of points in x direction
  • n_y – number of points in y direction
Returns:

X, Y, Z as grid

class HowToPlotGraph(attribute_x, attribute_y, kwargs_graph=None, check_if_plot_elem=None, meta=None)[source]
__str__()[source]

Return str(self).

class LinkDataGraph[source]
add_collection(theCollection, kwargs=None)[source]

Add a collection (that will be a future trace)

Parameters:
  • theCollection
  • kwargs – kwargs associated with the collection (e.g., color, symbol style, etc.)
Returns:

unique id associated with the collection

remove_collection(collectionId)[source]

Remove collection from the graphs

Parameters:collectionId – ID of the collection
Returns:
set_shadow_collection(master_collectionId, shadow_collection)[source]

Link a collection to an other

Parameters:
  • master_collectionId – ID of the collection that is displayed in the graph
  • shadow_collection – collection to link to the master.
Returns:

get_graphs()[source]
get_howToPlotGraph(idGraph)[source]
add_graph(howToPlotGraph)[source]

Add new graph to be plotted.

Parameters:howToPlotGraphHowToPlotGraph
Returns:
get_idCollections()[source]

Get all ids of the plotted collections

get_idGraphs()[source]

Get all ids of the graphs

get_idTraces(idGraph)[source]

Get all ids of the traces of graph $idGraph

get_idCollection_from_graph(idGraph, idTrace)[source]

Get id of collection plotted in graph $idGraph and trace $idTrace

get_collection(idCollection, getShadow=True)[source]
get_kwargs_collection(idCollection)[source]
update_graphs()[source]

Update the graphs: update graphs, traces, and X-Y data

get_collection_from_graph(idGraph, idTrace, getShadow=True) → optimeed.core.ListDataStruct_Interface[source]

From indices in the graph, get corresponding collection

get_clicked_item(idGraph, idTrace, idPoint, getShadow=True)[source]

Get the data hidden behind the clicked point

Parameters:
  • idGraph – ID of the graph
  • idTrace – ID of the trace
  • idPoint – ID of the point
  • getShadow – If true, will return the data from the collection linked to the collection that is plotted
Returns:

Object in collection

get_clicked_items(idGraph, idTrace, idPoint_list, getShadow=True)[source]

Same as get_clicked_item, but using a list of points

delete_clicked_item(idGraph, idTrace, idPoint)[source]

Remove item from the collection

delete_clicked_items(idGraph, idTrace, idPoints)[source]

Same, but for a list of points

get_graph_and_trace_from_idCollection(idCollection)[source]

Reverse search: from a collection, get all associated graphs

get_idcollection_from_collection(theCollection)[source]

Reverse search: from a collection, find its id

get_idPoints_from_indices_in_collection(idGraph, idTrace, indices_in_collection)[source]

From indices in a collection, find the associated idPoints of the graph

get_collections()[source]
set_meta_from_shadow()[source]

Use this method if ‘howToPlot’ must use shadow collection

class Base_Option(name, based_value, choices=None)[source]
get_value()[source]
get_name()[source]
set_value(value)[source]
get_choices()[source]
class Option_bool(name, based_value, choices=None)[source]

Bases: Base_Option

set_value(value)[source]
get_choices()[source]
class Option_str(name, based_value, choices=None)[source]

Bases: Base_Option

set_value(value)[source]
class Option_int(name, based_value, choices=None)[source]

Bases: Base_Option

set_value(value)[source]
class Option_float(name, based_value, choices=None)[source]

Bases: Base_Option

set_value(value)[source]
class Option_dict(name, based_value, choices=None)[source]

Bases: Base_Option

set_value(value)[source]
class Option_class[source]
add_option(idOption, theOption)[source]
get_option_name(idOption)[source]
get_option_value(idOption)[source]
set_option(idOption, value)[source]
_pack_options()[source]
__str__()[source]

Return str(self).

class fast_LUT_interpolation(independent_variables, dependent_variables)[source]

Class designed for fast interpolation in look-up table when successive searchs are called often. Otherwise use griddata

interpolate(point, fill_value=np.nan)[source]

Perform the interpolation :param point: coordinates to interpolate (tuple or list of tuples for multipoints) :param fill_value: value to put if extrapolated. :return: coordinates

interpolate_table(x0, x_values, y_values)[source]

From sorted table (x,y) find y0 corresponding to x0 (linear interpolation)

derivate(t, y)[source]
linspace(start, stop, npoints)[source]
reconstitute_signal(amplitudes, phases, numberOfPeriods=1, x_points=None, n_points=50)[source]

Reconstitute the signal from fft. Number of periods of the signal must be specified if different of 1

my_fft(y)[source]

Real FFT of signal Bx, with real amplitude of harmonics. Input signal must be within a period.

cart2pol(x, y)[source]
pol2cart(rho, phi)[source]
partition(array, begin, end)[source]
quicksort(array)[source]
dist(p, q)[source]

Return the Euclidean distance between points p and q. :param p: [x, y] :param q: [x, y] :return: distance (float)

sparse_subset(points, r)[source]

Returns a maximal list of elements of points such that no pairs of points in the result have distance less than r. :param points: list of tuples (x,y) :param r: distance :return: corresponding subset (list), indices of the subset (list)

integrate(x, y)[source]

Performs Integral(x[0] to x[-1]) of y dx

Parameters:
  • x – x axis coordinates (list)
  • y – y axis coordinates (list)
Returns:

integral value

my_fourier(x, y, n, L)[source]

Fourier analys

Parameters:
  • x – x axis coordinates
  • y – y axis coordinates
  • n – number of considered harmonic
  • L – half-period length
Returns:

a and b coefficients (y = a*cos(x) + b*sin(y))

get_ellipse_axes(a, b, dphi)[source]

Trouve les longueurs des axes majeurs et mineurs de l’ellipse, ainsi que l’orientation de l’ellipse. ellipse: x(t) = A*cos(t), y(t) = B*cos(t+dphi) Etapes: longueur demi ellipse CENTRéE = sqrt(a^2 cos^2(x) + b^2 cos^2(t+phi) Minimisation de cette formule => obtention formule tg(2x) = alpha/beta

convert_color(color)[source]

Convert a color to a tuple if color is a char, otherwise return the tuple.

Parameters:color – (r,g,b) or char.
Returns:
convert_color_with_alpha(color, alpha=255)[source]

Same as meth:convert_color but with transparency

rgetattr(obj, attr)[source]

getattr, but recursively. Works with list.

rsetattr(obj, attr, val)[source]

setattr, but recursively. Works with list (i.e. theObj.myList[0].var_x)

printIfShown(theStr, show_type=SHOW_DEBUG, isToPrint=True, appendTypeName=True, end='n')[source]
EXCLUDED_TAGS
getExecPath()[source]
class SaveableObject[source]

Abstract class for dynamically type-hinted objects. This class is to solve the special case where the exact type of an attribute is not known before runtime, yet has to be saved.

get_additional_attributes_to_save()[source]

Return list of attributes corresponding to object, whose type cannot be determined statically (e.g. topology change)

get_additional_attributes_to_save_list()[source]

Same behavior as get_additional_attributes_to_save, but where the attributes contains list of unknown items

_isclass(theObject)

Extends the default isclass method with typing

get_type_class(typ)[source]

Get the type of the class. used to compare objects from Typing.

_get_object_class(theObj)
_get_object_module(theObj)
_object_to_FQCN(theobj)

Gets module path of object

_find_class(moduleName, className)
json_to_obj(json_dict)[source]

Convenience class to create object from dictionary. Only works if CLASS_TAG is valid

Parameters:

json_dict – dictionary loaded from a json file.

Raises:
  • TypeError – if class can not be found
  • KeyError – if CLASS_TAG not present in dictionary
json_to_obj_safe(json_dict, cls)[source]

Safe class to create object from dictionary.

Parameters:
  • json_dict – dictionary loaded from a json file
  • cls – class object to instantiate with dictionary
_instantiates_annotated_object(_json_dict, _cls)
_get_annotations(theObj)

Return annotated attributes (theObj being the type of the object)

obj_to_json(theObj)[source]

Extract the json dictionary from the object. The data saved are automatically detected, using typehints. ex: x: int=5 will be saved, x=5 won’t. Inheritance of annotation is managed by this function

_get_attributes_to_save(theObj)

Return list (attribute, is_first)

get_json_module_tree_from_dict(jsonDict)[source]

Return dict containing {CLASS_TAG: “class_name”, MODULE_TAG: “module_name”, “attribute1”:{“class_name”: “module_name”, …}}

remove_module_tree_from_string(theStr)[source]

Used to compress string by removing __module__ and __class__ entries (used with get_json_module_tree_from_dict)

apply_module_tree_to_dict(nestedTree, nestedObject, raiseError=False)[source]

Restore __module__ and __class__ entries from nestedTree in nestedDict

encode_str_json(theStr)[source]
decode_str_json(theStr)[source]
export_to_tikz_groupGraphs(theGraphs: optimeed.core.graphs.Graphs, foldername, additionalPreamble=lambda: '', additionalAxisOptions=lambda graphId: '', additionalTraceOptions=lambda graphId, traceId: '', debug=False)[source]

Export the graphs as group

Parameters:
  • theGraphs – Graphs to save
  • foldername – Foldername to save
  • additionalPreamble – method that returns string for custom tikz options
  • additionalAxisOptions – method that returns string for custom tikz options
  • additionalTraceOptions – method that returns string for custom tikz options
Returns:

export_to_tikz_contour_plot(list_of_traces3, foldername, filename_data='data')[source]

Export the graphs as group

Parameters:
  • list_of_traces3 – List of 3D traces
  • foldername – Foldername to save
  • filename_data – filename of the data
Returns:

printIfShown(theStr, show_type=SHOW_DEBUG, isToPrint=True, appendTypeName=True, end='n')[source]
get_path_to_inkscape()[source]
get_inkscape_version()[source]
inkscape_version
inkscape_svg_to_pdf(filename_svg, filename_pdf)[source]
inkscape_svg_to_png(filename_svg, filename_png)[source]