class documentation
Field class.
| Static Method | get |
Returns the field arrow parameters needed by VisPyCanvas. |
| Method | __init__ |
Initializes a field. |
| Method | get |
Gets field units. |
| Method | recalculate |
Recalculates field vectors. |
| Method | set |
Sets the parameters. |
| Instance Variable | type |
Undocumented |
| Property | total |
Gets total number of calculations. |
| Property | total |
Gets total number of skipped calculations. |
| Property | vectors |
Gets field vectors. (The selected field type determined which field was calculated.) |
| Property | vectors |
Number of field vectors |
| Instance Variable | _distance |
Undocumented |
| Instance Variable | _length |
Undocumented |
| Instance Variable | _total |
Undocumented |
| Instance Variable | _total |
Undocumented |
| Instance Variable | _vectors |
Undocumented |
Inherited from Validatable:
| Method | valid |
No summary |
| 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: @ConditionalDecorator(
np.ndarray, field_vectors: np.ndarray, line_pairs: np.ndarray, head_points: np.ndarray, arrow_scale: float, magnitude_limit: float) -> tuple[ np.ndarray, np.ndarray]:
¶
Returns the field arrow parameters needed by VisPyCanvas.
| Parameters | |
samplingnp.ndarray | Sampling volume points |
fieldnp.ndarray | Field vectors |
linenp.ndarray | Arrow line pairs (ordered list of arrow start/stop 3D points) |
headnp.ndarray | Arrow head points (ordered list of arrow stop 3D points) |
arrowfloat | Arrow scale |
magnitudefloat | Magnitude limit (mitigating divisions by zero) |
| Returns | |
tuple[ | Line pairs, head points |
Gets field units.
| Parameters | |
| show | Enable to show Gauss instead of Tesla |
| Returns | |
tuple[ | Field units, field factor |
def recalculate(self, wire:
Wire, sampling_volume: SamplingVolume, progress_callback: Callable, num_cores: int, backend_type: int) -> bool:
¶
Recalculates field vectors.
| Parameters | |
wire:Wire | Wire |
samplingSamplingVolume | Sampling volume |
progressCallable | Progress callback |
numint | Number of cores to use for multiprocessing |
backendint | Backend type |
| Returns | |
bool | True if successful, False if interrupted (CUDA backend currently not interruptable) |
Sets the parameters.
| Parameters | |
type:int | Field type |
distancefloat | Distance limit (mitigating divisions by zero) |
lengthfloat | Length scale (m) |