upsp.processing.p3d_utilities

class StructGrid[source]

Bases: object

Manage plot3d-style structured grid and write formatted to file

x, y, z

Cartesian coordinates [N]

Type

array_like

r, theta

Cylindrical coordinates [N]

Type

array_like

load_grid(grid_file)[source]

Read a formatted p3d file

Parameters

grid_file (str) – formatted plot3d file

reduce_grid(good_indices)[source]

try to reduce all member variables to those covered by good_indices. I have no idea what this does to the sz variable :( NOT CURRENTLY ROBUST TO OOB ERRORS :(

read_p3d_function(filename)[source]

Read in the plot3d function file (first function)

Parameters

filename (str) – plot3d binary function file

Returns

first function in the file (Cp)

Return type

numpy.ndarray

read_p3d_grid(filename)[source]

Read an unformatted plot3d grid

Parameters

filename (str) – unformatted plot3d grid file

Returns

grid

Return type

StructGrid

to_cartesian(r, theta)[source]

moves r,theta (in degrees) to cartesian y,z

to_cylindrical(y, z)[source]

moves y,z to cylindrical (using x,r,theta) theta returned in degrees