opmcoils.panels.PCBPanel#
- class opmcoils.panels.PCBPanel(pcb_folder=None, half_names=None, standoff=None, rearrange=False, panel_dict=None)[source]#
- Attributes:
length
The total length of the panel.
Methods
adjust_standoff
(standoff)Adjust the standoff.
Link PCBs into continuous loops.
magnetic_field
(target_points, current)Calculate total magnetic field from panel.
plot
([target_points, current, pl, show])Plot the PCBs.
plot_profile
(current[, profile_dir, ...])Plot line profile for panel.
resistance
([cu_oz, trace_width])The coil resistance.
to_dict
- __init__(pcb_folder=None, half_names=None, standoff=None, rearrange=False, panel_dict=None)[source]#
A Panel is a collection of PCBs used to null one field component.
- Parameters:
- pcb_folderstr
The path to the kicad folder with the PCB design.
- half_nameslist of str
The names of the halves used for folder naming. E.g., [‘top’, ‘bott’]
- standofffloat
The standoff between the two biplanar PCBs. Typically, this is equal to the length of the PCBs, i.e., 1.4 m.
- Attributes:
- pcbsdict of PCB
keys of dictionary can be ‘left_top’, ‘left_bott’, ‘right_top’, ‘right_bott’ etc.
Methods
__init__
([pcb_folder, half_names, standoff, ...])A Panel is a collection of PCBs used to null one field component.
adjust_standoff
(standoff)Adjust the standoff.
Link PCBs into continuous loops.
magnetic_field
(target_points, current)Calculate total magnetic field from panel.
plot
([target_points, current, pl, show])Plot the PCBs.
plot_profile
(current[, profile_dir, ...])Plot line profile for panel.
resistance
([cu_oz, trace_width])The coil resistance.
to_dict
()Attributes
The total length of the panel.
- adjust_standoff(standoff)[source]#
Adjust the standoff.
- Parameters:
- standofffloat
The new standoff distance (in m).
- property length#
The total length of the panel.
- magnetic_field(target_points, current)[source]#
Calculate total magnetic field from panel.
- Parameters:
- currentdict
The current.
- plot_profile(current, profile_dir='x', field_component='x', spacing=0.01, min_pos=-0.2, max_pos=0.2, ax=None)[source]#
Plot line profile for panel.
- Parameters:
- currentdict of floats
current to be applied to the panel.
- profile_dirstring (‘x’, ‘y’, or ‘z’)
axis along which the field will plotted.
- field_componentstring (‘x’, ‘y’, or ‘z’)
axis of field to be plotted.
- spacingfloat
distance between points
- min_posfloat
negative disctance from (0,0) in meters
- max_posfloat
positive disctance from (0,0) in meters
- axAxes
matplotlib axes on which to create the plot