opmcoils.panels.PCB#
- class opmcoils.panels.PCB(fname=None, offset=None, loops=None, pcb_dict=None)[source]#
- Attributes:
- length
Methods
adjust_offset
(offsets)Adjust the offset for a panel.
Returns continuous loops in pcb, builds them if needed.
magnetic_field
(target_points)Calculate total magnetic field from both layers for unit current.
plot
([ax, pl, show])Plots PCB
plot2D
([ax, pl])Plots PCB
to_dict
()Convert to dictionary
adjust_scale
- __init__(fname=None, offset=None, loops=None, pcb_dict=None)[source]#
Class to represent a PCB loaded from KiCAD.
- Attributes:
- loopsdict of list
The keys may be ‘via’, ‘F.Cu’, ‘B.Cu’ for via, front, and back copper layer.
Methods
__init__
([fname, offset, loops, pcb_dict])Class to represent a PCB loaded from KiCAD.
adjust_offset
(offsets)Adjust the offset for a panel.
adjust_scale
(mult)Returns continuous loops in pcb, builds them if needed.
magnetic_field
(target_points)Calculate total magnetic field from both layers for unit current.
plot
([ax, pl, show])Plots PCB
plot2D
([ax, pl])Plots PCB
to_dict
()Convert to dictionary
Attributes
length
- adjust_offset(offsets)[source]#
Adjust the offset for a panel.
- Parameters:
- offsetslist of length 3
The x, y, and z offset
- magnetic_field(target_points)[source]#
Calculate total magnetic field from both layers for unit current.
- Parameters:
- target_pointsarray, shape (n_points, 3)
The target points at which to evaluate the magnetic fields.
- Returns:
- fieldarray, shape (n_points, 3)
The magnetic field at the target points