class documentation

class Field(Validatable):

View In Hierarchy

Field class.
Static Method get_arrows Returns the field arrow parameters needed by VisPyCanvas.
Method __init__ Initializes a field.
Method get_units Gets field units.
Method recalculate Recalculates field vectors.
Method set Sets the parameters.
Instance Variable type Undocumented
Property total_calculations Gets total number of calculations.
Property total_skipped_calculations Gets total number of skipped calculations.
Property vectors Gets field vectors. (The selected field type determined which field was calculated.)
Property vectors_count Number of field vectors
Instance Variable _distance_limit Undocumented
Instance Variable _length_scale Undocumented
Instance Variable _total_calculations Undocumented
Instance Variable _total_skipped_calculations Undocumented
Instance Variable _vectors Undocumented

Inherited from Validatable:

Method valid.setter
Property valid True if valid, False if invalid
Instance Variable _valid Undocumented
@staticmethod
@ConditionalDecorator(get_jit_enabled(), jit, nopython=True, parallel=True)
def get_arrows(sampling_volume_points, field_vectors, line_pairs, head_points, arrow_scale, magnitude_limit):
Returns the field arrow parameters needed by VisPyCanvas.
Parameters
sampling_volume_points:np.ndarraySampling volume points
field_vectors:np.ndarrayField vectors
line_pairs:np.ndarrayArrow line pairs (ordered list of arrow start/stop 3D points)
head_points:np.ndarrayArrow head points (ordered list of arrow stop 3D points)
arrow_scale:floatArrow scale
magnitude_limit:floatMagnitude limit (mitigating divisions by zero)
Returns
Tuple[np.ndarray, np.ndarray]Line pairs, head points
def __init__(self):
Initializes a field.
def get_units(self, show_gauss=False):
Gets field units.
Parameters
show_gaussEnable to show Gauss instead of Tesla
Returns
Tuple[str, float]Field units, field factor
@validator
def recalculate(self, wire, sampling_volume, progress_callback, num_cores, backend_type):
Recalculates field vectors.
Parameters
wire:WireWire
sampling_volume:SamplingVolumeSampling volume
progress_callback:CallableProgress callback
num_cores:intNumber of cores to use for multiprocessing
backend_type:intBackend type
Returns
boolTrue if successful, False if interrupted (CUDA backend currently not interruptable)
def set(self, type, distance_limit, length_scale):
Sets the parameters.
Parameters
type:intField type
distance_limit:floatDistance limit (mitigating divisions by zero)
length_scale:floatLength scale (m)
type =

Undocumented

@property
@require_valid
total_calculations: int =
Gets total number of calculations.
@property
@require_valid
total_skipped_calculations: int =
Gets total number of skipped calculations.
@property
@require_valid
vectors: np.ndarray =
Gets field vectors. (The selected field type determined which field was calculated.)
@property
@require_valid
vectors_count: int =
Number of field vectors
_distance_limit =

Undocumented

_length_scale =

Undocumented

_total_calculations =

Undocumented

_total_skipped_calculations =

Undocumented

_vectors =

Undocumented